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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
txomon/SpockBot | spock/plugins/core/net.py | 1 | 9269 | """
Provides an asynchronous, crypto and compression aware socket for connecting to
servers and processing incoming packet data.
Coordinates with the Timers plugin to honor clock-time timers
"""
import logging
import select
import socket
import time
from Crypto.Cipher import AES
from spock import utils
from spock.mc... | mit | -8,122,943,707,253,785,000 | 32.828467 | 79 | 0.575467 | false | 3.884744 | false | false | false |
jameshensman/VFF | experiments/setting_a_b_M/gpr_special.py | 1 | 4803 | # Copyright 2016 James Hensman
#
# 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, so... | apache-2.0 | -2,842,001,661,177,074,000 | 39.025 | 88 | 0.600042 | false | 3.260692 | false | false | false |
angr/angr | angr/analyses/cfg/indirect_jump_resolvers/mips_elf_fast.py | 1 | 7361 | from typing import Dict, TYPE_CHECKING
import logging
import pyvex
import archinfo
from .... import options, BP_BEFORE
from ....blade import Blade
from ....annocfg import AnnotatedCFG
from ....exploration_techniques import Slicecutor
from .resolver import IndirectJumpResolver
if TYPE_CHECKING:
from angr.block ... | bsd-2-clause | 5,518,427,772,508,819,000 | 42.556213 | 133 | 0.537835 | false | 4.177639 | false | false | false |
csomerlot/WIPTools | addin/Install/SingleBMP.py | 1 | 12719 |
# Import system modules
import sys, os
import Helper
import regression
import arcpy
from arcpy import env
from arcpy.sa import *
hp = Helper.Helper(sys.argv)
try:
# Local variables
Rural_1yrQ = Raster(os.path.join(hp.Workspace + "\\WIPoutput.mdb", "UndevQ"))
BMPpts = os.path.join(hp.SWorkspace, "BMPp... | gpl-3.0 | -7,616,929,208,638,953,000 | 46.636704 | 259 | 0.526378 | false | 3.510627 | false | false | false |
baliga-lab/cmonkey2 | cmonkey/network.py | 1 | 13490 | # vi: sw=4 ts=4 et:
"""network.py - cMonkey network module
This file is part of cMonkey Python. Please see README and LICENSE for
more information and licensing details.
"""
import numpy as np
import logging
import os.path
import cmonkey.util as util
import cmonkey.datamatrix as dm
import cmonkey.scoring as scoring
... | lgpl-3.0 | 2,727,564,660,023,877,000 | 39.510511 | 105 | 0.592809 | false | 4.048619 | false | false | false |
fvilca/cnn_tensorflow_cifar | cifar10_multi_gpu_train.py | 1 | 10371 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | mit | -3,657,095,802,407,810,000 | 36.576087 | 80 | 0.646514 | false | 3.775391 | false | false | false |
food52/thumbor | thumbor/console.py | 1 | 2470 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/globocom/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com timehome@corp.globo.com
import optparse
from thumbor.context import ServerParameters
from t... | mit | 8,738,400,710,362,373,000 | 53.888889 | 204 | 0.640891 | false | 3.805855 | false | false | false |
gautam1858/tensorflow | tensorflow/tools/compatibility/tf_upgrade_v2.py | 1 | 54358 | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -5,698,780,922,763,350,000 | 36.933008 | 80 | 0.559642 | false | 3.814329 | false | false | false |
deklungel/iRulez | old/modules/telegram/telegram.py | 1 | 12009 | #!/usr/bin/env python
#Version 1.9
import sys
sys.path.append('/var/www/html/modules/libraries')
import time
import pprint
import telepot
import mysql.connector
import datetime
import iRulez_logging as logger
import paho.mqtt.client as mqtt
from telepot.namedtuple import InlineKeyboardMarkup, InlineKeyboardButton
from ... | mit | -7,143,340,784,685,586,000 | 35.840491 | 219 | 0.696394 | false | 3.0015 | false | false | false |
efiop/dvc | dvc/repo/get.py | 1 | 1920 | import logging
import os
from dvc.exceptions import DvcException
from dvc.path_info import PathInfo
from dvc.utils import resolve_output
from dvc.utils.fs import remove
logger = logging.getLogger(__name__)
class GetDVCFileError(DvcException):
def __init__(self):
super().__init__(
"the given ... | apache-2.0 | 8,423,483,636,947,428,000 | 32.684211 | 74 | 0.663542 | false | 3.713733 | false | false | false |
GoogleCloudPlatform/iot-core-micropython | third_party/rsa/cli.py | 1 | 9382 | # -*- coding: utf-8 -*-
#
# Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu>
#
# 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
#
# Un... | apache-2.0 | -8,427,974,887,891,780,000 | 31.572917 | 87 | 0.612941 | false | 3.874845 | false | false | false |
rachekalmir/pyJolt | pyjolt/util/tree_manager.py | 1 | 6011 | import itertools
from collections import defaultdict
from typing import Union, List, Dict
from pyjolt.exceptions import JoltException
def pairwise(iterable):
"""s -> (s0,s1), (s1,s2), (s2, s3), ..."""
a, b = itertools.tee(iterable)
next(b, None)
return itertools.zip_longest(a, b)
def type_generator... | apache-2.0 | -7,570,709,542,070,465,000 | 31.491892 | 131 | 0.562635 | false | 4.105874 | false | false | false |
BirkbeckCTP/janeway | src/review/views.py | 1 | 87770 | __copyright__ = "Copyright 2017 Birkbeck, University of London"
__author__ = "Martin Paul Eve & Andy Byers"
__license__ = "AGPL v3"
__maintainer__ = "Birkbeck Centre for Technology and Publishing"
from uuid import uuid4
from collections import Counter
from datetime import timedelta
from django.contrib import message... | agpl-3.0 | 7,063,019,516,852,951,000 | 33.460149 | 194 | 0.606278 | false | 4.176342 | false | false | false |
mickstar/2048-ai-python | game/gameboard.py | 1 | 3987 | import random
from game.cell import Cell
from game.move import Move
class GameBoard:
'''GameBoard defines the 2048 grid that should be a 4x4 square.
This class contains 16 cells, and provides methods for permuting the board state in conjunction with
2048 rules. The code is designed with an unconcrete size, though... | gpl-3.0 | 5,492,649,167,837,388,000 | 29.204545 | 105 | 0.641084 | false | 2.88913 | false | false | false |
rlindner81/pyload | module/plugins/hoster/LinksnappyCom.py | 1 | 1943 | # -*- coding: utf-8 -*-
import re
import urlparse
from module.plugins.internal.misc import json
from module.plugins.internal.MultiHoster import MultiHoster
class LinksnappyCom(MultiHoster):
__name__ = "LinksnappyCom"
__type__ = "hoster"
__version__ = "0.16"
__status__ = "testing"
__pattern__ = ... | gpl-3.0 | 4,289,568,237,312,601,000 | 33.696429 | 89 | 0.513639 | false | 3.973415 | false | false | false |
majkelx/astwro | astwro/coord/CoordMatch.py | 1 | 2213 | # coding=utf-8
from __future__ import absolute_import, division, print_function
from astropy.coordinates import SkyCoord
import astropy.units as u
import numpy as np
class CoordMatch(object):
"""Two catalogues crossmatch
Object interface to `astropy.coordinates.match_to_catalog_sky`"""
def __init__(self... | mit | -650,743,030,654,543,700 | 21.814433 | 87 | 0.597379 | false | 3.501582 | false | false | false |
zhangzr1026/monitor2 | src/collector/tasks/APP_RECORD/projectXfile.py | 1 | 1566 | '''
Created on 2014-12-29
@author: Administrator
'''
from lib import db_mysql
from lib import common
def conf_file_daily_num(resource=None):
'''
Get daliy file num
Just yesterday because today is not finished
'''
yesterday = common.lastday()
TARGET_TABLE='apprec_file_daily_num'
... | lgpl-3.0 | -2,242,246,343,074,945,800 | 28 | 108 | 0.572158 | false | 3.616628 | false | false | false |
UCSC-MedBook/MedBook_ | tools/old-external-tools/shazam/htmlFG.py | 1 | 17966 | #!/usr/bin/python2.6
import sys, string, os, time, fnmatch, imgFG, markup, re
from markup import oneliner as o
from numpy import *
rootDir = ""
pngDir = ""
pngBase = 'png/'
pathwayNameDict = {}
entityDict = {}
entityFile = {}
imgFG.printPDF = True
class1 = []
class2 = []
class3 = []
def parseContrast(file_name, red... | bsd-3-clause | 7,746,036,898,464,188,000 | 31.844607 | 166 | 0.560169 | false | 3.495331 | false | false | false |
mcxiaoke/python-labs | archives/learning/security/otp.py | 1 | 4777 | # -*- coding: UTF-8 -*-
# -*- coding: utf-8 -*-
"""
otpauth
~~~~~~~
Implements two-step verification of HOTP/TOTP.
:copyright: (c) 2013 - 2014 by Hsiaoming Yang.
:license: BSD, see LICENSE for more details.
"""
import base64
import hashlib
import hmac
import struct
import sys
import time
import ... | apache-2.0 | 2,432,917,757,027,583,500 | 26.454023 | 75 | 0.601005 | false | 3.608006 | false | false | false |
bmd/twittrscrapr | twittrscrapr/scrapers/profilescrapr.py | 1 | 2613 | from datetime import datetime as dt
import logging
from base_scraper import TwittrScrapr
logger = logging.getLogger("TwittrScrapr.ProfileScrapr")
class ProfileScrapr(TwittrScrapr):
def __init__(self, api_keys, writer):
"""
Construct the ProfileScraper object
:param api_keys: A dict con... | mit | -934,643,122,492,740,400 | 33.381579 | 113 | 0.570608 | false | 4.076443 | false | false | false |
ParuninPavel/lenta4_hack | vkapp/bot/models/news.py | 1 | 1052 | from django.db import models
from .users import Blogger, Admin
class News(models.Model):
id = models.AutoField(primary_key=True)
link = models.CharField(max_length=300, blank=True, null=True)
pic = models.CharField(max_length=300, blank=True, null=True)
blogger = models.ForeignKey(Blogger, on_delete=m... | mit | 6,350,823,177,180,132,000 | 36.571429 | 77 | 0.734791 | false | 3.460526 | false | false | false |
caperren/Archives | OSU Robotics Club/Mars Rover 2017-2018/software/testing/ubiradio_testing.py | 1 | 2372 | import paramiko
import json
import time
# ath0 21 channels in total; available frequencies :
# Channel 01 : 2.412 GHz
# Channel 31 : 2.414 GHz
# Channel 02 : 2.417 GHz
# Channel 32 : 2.419 GHz
# Channel 03 : 2.422 GHz
# Channel 33 : 2.424 GHz
# ... | gpl-3.0 | -8,870,408,355,310,936,000 | 34.402985 | 153 | 0.623524 | false | 3.171123 | false | false | false |
leschzinerlab/FreeHand | lib/fspace_param_consolidate.py | 1 | 1070 | #!/usr/bin/env python
import linecache
import sys
#Convert parameter file format with CTF info
untilt = sys.argv[1]
ctf2 = sys.argv[2]
fout = '%s_format' %(ctf2[:-4])
o1 = open(fout,'a')
o1.write("C Frealign format parameter file created from Search_fspace parameter file\n")
o1.write("C\n")
o1.write("C P... | mit | 2,811,378,361,588,945,000 | 17.77193 | 130 | 0.592523 | false | 2.049808 | false | false | false |
jordillinares/addons | stock_lot_enh_base/models/stock.py | 1 | 10625 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2012 Tiny SPRL (http://tiny.be). All Rights Reserved
#
# This module,
# Copyright (C) 2015 Jordi Llinares López - bigandopen@bigandopen.c... | agpl-3.0 | 1,831,910,691,091,152,100 | 47.290909 | 107 | 0.483528 | false | 5.080823 | false | false | false |
donovanhide/BitMagic | bm/__init__.py | 1 | 4167 | ## Copyright(c) 2009 William Waites <wwaites_at_gmail.com>
##
## 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, co... | mit | 6,690,548,970,383,246,000 | 25.373418 | 84 | 0.62947 | false | 3.041606 | false | false | false |
sjdv1982/seamless | docs/archive/0.2-cleanup/fireworks/tutorial/cell-display-numpy.py | 1 | 2519 | from PyQt5.QtWidgets import QMainWindow, QLabel, QWidget, QFrame, QSizePolicy
from PyQt5.QtGui import QImage, QPixmap
from PyQt5.QtCore import Qt, QSize
import numpy as np
w = QMainWindow(size=QSize(640, 640))
ww = QWidget()
w.setCentralWidget(ww)
asp = AspectLayout(1.0)
ww.setLayout(asp)
w.setWindowFlags(Qt.WindowSta... | mit | 7,318,279,161,187,710,000 | 31.714286 | 79 | 0.598253 | false | 3.005967 | false | false | false |
emilbjorklund/django-simplewebmentions | simplewebmentions/views.py | 1 | 4196 | """
TODO: send relevant signals when creating, deleting, unpublishing etc...
TODO: How to best connect various bit that we can read from the URLs?
"""
from __future__ import unicode_literals
from urlparse import urlparse
from webmentiontools.urlinfo import UrlInfo
from django.shortcuts import render, g... | mit | -3,596,693,950,043,964,400 | 32.677686 | 83 | 0.624881 | false | 4.361746 | false | false | false |
wikimedia/ve-needcheck-reporter-bot | ircecho.py | 1 | 1213 | # Quick and ugly script to echo something to a given IRC channel
# Alex Monk, 2014-07-22
from socket import socket, AF_INET, SOCK_STREAM
def ircecho(nick, channel, message, host = "chat.freenode.net", port = 6667):
s = socket(AF_INET, SOCK_STREAM)
s.connect((host, port))
f = s.makefile()
def readLineWithoutServe... | mit | -5,310,313,400,393,842,000 | 27.209302 | 93 | 0.608409 | false | 2.788506 | false | false | false |
djurodrljaca/salamander-alm | server/trackermanagement/tracker_management.py | 1 | 27334 | """
Salamander ALM
Copyright (c) 2016 Djuro Drljaca
This Python module 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 Python module ... | gpl-2.0 | -3,854,890,622,643,095,000 | 35.013175 | 100 | 0.498207 | false | 5.608125 | false | false | false |
TheWardoctor/Wardoctors-repo | script.stargate.guide/strings.py | 1 | 2287 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2012 Tommy Winther
# http://tommy.winther.nu
#
# Modified for FTV Guide (09/2014 onwards)
# by Thomas Geppert [bluezed] - bluezed.apps@gmail.com
#
# Modified for Stargate Guide (2016)
# by wardoctor - wardoctor@tardisbuilds.com
#
# This Program is... | apache-2.0 | -2,401,772,511,313,800,700 | 26.238095 | 72 | 0.738085 | false | 3.069799 | false | false | false |
darvelo/chime | chime/error_functions.py | 1 | 4103 | from __future__ import absolute_import
from logging import getLogger
Logger = getLogger('chime.error_functions')
from flask import current_app, request
from urllib import quote
from urlparse import urlparse
from os.path import join, exists
from .view_functions import get_repo, strip_index_file, path_display_type, get_... | bsd-3-clause | -526,122,277,231,651,140 | 40.867347 | 159 | 0.63612 | false | 3.706414 | false | false | false |
ThierryM/bCNC | bCNC/lib/bmath.py | 2 | 53783 | #
# Copyright European Organization for Nuclear Research (CERN)
# All rights reserved
#
# Author: Vasilis.Vlachoudis@cern.ch
# Date: 15-May-2004
from __future__ import generators
from __future__ import absolute_import
__author__ = "Vasilis Vlachoudis"
__email__ = "Vasilis.Vlachoudis@cern.ch"
import random
from ma... | gpl-2.0 | 1,152,561,699,915,834,500 | 26.538658 | 100 | 0.457226 | false | 2.856392 | false | false | false |
kdmurray91/khmer | sandbox/find-high-abund-kmers.py | 1 | 2443 | #! /usr/bin/env python2
#
# This file is part of khmer, https://github.com/dib-lab/khmer/, and is
# Copyright (C) Michigan State University, 2009-2015. It is licensed under
# the three-clause BSD license; see LICENSE.
# Contact: khmer-project@idyll.org
#
"""
@@
"""
import sys
import screed
import khmer
from khmer.khme... | bsd-3-clause | 1,175,521,753,674,455,300 | 29.160494 | 78 | 0.588621 | false | 3.32381 | false | false | false |
ncbray/pystream | lib/PADS/Sudoku.py | 1 | 67213 | """Sudoku.py
PADS-based command-line application for generating and solving Sudoku puzzles.
These puzzles are given as a 9x9 grid of cells, some of which are filled with
digits in the range 1-9. The task is to fill the remaining cells in such a
way that each row of the grid, each column of the grid, and each of nine ... | apache-2.0 | 2,277,679,837,284,832,000 | 41.245757 | 220 | 0.512326 | false | 4.230958 | false | false | false |
CityGrid/twonicorn | twonicornweb/views/cp_user.py | 1 | 8124 | # Copyright 2015 CityGrid Media, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | apache-2.0 | 223,268,084,307,298,000 | 40.661538 | 242 | 0.546406 | false | 4.233455 | false | false | false |
mseclab/PyJFuzz | pyjfuzz/core/pjf_server.py | 1 | 8559 | """
The MIT License (MIT)
Copyright (c) 2016 Daniele Linguaglossa <d.linguaglossa@mseclab.com>
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 th... | mit | -7,245,142,948,344,012,000 | 38.442396 | 112 | 0.592242 | false | 4.164964 | true | false | false |
elebihan/yaprogen | data/templates/setuptools-python-app/skeleton/disthelpers.py | 1 | 7324 | # -*- coding: utf-8 -*-
#
# disthelpers.py - useful distutils helper commands
#
# Copyright (c) 2014 Eric Le Bihan <eric.le.bihan.dev@free.fr>
#
# 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 Softwar... | gpl-3.0 | 159,195,571,268,875,170 | 34.553398 | 79 | 0.578372 | false | 3.995636 | false | false | false |
cctags/gumpad2 | gumpad2.py | 1 | 50733 | #!/usr/bin/env python
# coding: utf-8
import wx
import wx.richtext
import wx.lib
import wx.lib.wordwrap
import os
import sys
import uuid
import tempfile
import optparse
import StringIO
import time
import locale
import hashlib
import zshelve
import PyRTFParser
import xtea
from wx.lib.embeddedimage import PyEmbeddedI... | mit | -7,152,632,794,733,037,000 | 32.421268 | 176 | 0.58031 | false | 3.292747 | false | false | false |
arunkgupta/gramps | gramps/gui/merge/mergefamily.py | 1 | 9809 | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2010 Michiel D. Nauta
#
# 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... | gpl-2.0 | -4,250,079,644,733,064,000 | 42.402655 | 79 | 0.574269 | false | 3.489506 | false | false | false |
tensorflow/datasets | tensorflow_datasets/scripts/documentation/generate_visualization.py | 1 | 2247 | # coding=utf-8
# Copyright 2021 The TensorFlow Datasets 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 appl... | apache-2.0 | 7,384,031,377,480,852,000 | 31.1 | 76 | 0.723632 | false | 3.738769 | false | false | false |
endlessm/chromium-browser | third_party/catapult/dashboard/dashboard/graph_csv_test.py | 1 | 6662 | # Copyright 2015 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.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import csv
import StringIO
import unittest
imp... | bsd-3-clause | -4,719,458,784,556,416,000 | 32.31 | 80 | 0.613329 | false | 3.326011 | true | false | false |
huntxu/neutron | neutron/common/constants.py | 1 | 9868 | # Copyright (c) 2012 OpenStack Foundation.
#
# 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... | apache-2.0 | 3,229,446,407,521,964,500 | 38.15873 | 78 | 0.583502 | false | 3.750665 | false | false | false |
davzhang/helix-python-binding | org/apache/helix/messaging/handling/GroupMessageHandler.py | 1 | 3490 | # package org.apache.helix.messaging.handling
#from org.apache.helix.messaging.handling import *
#from java.util import HashMap
#from java.util import List
#from java.util import Map
#from java.util.concurrent import ConcurrentHashMap
#from java.util.concurrent import ConcurrentLinkedQueue
#from java.util.concurrent.at... | apache-2.0 | -5,867,024,208,946,304,000 | 23.928571 | 83 | 0.619771 | false | 4.335404 | false | false | false |
qedsoftware/commcare-hq | corehq/apps/repeaters/tests/test_dbaccessors.py | 1 | 3943 | from datetime import datetime, timedelta
from django.test import TestCase
from corehq.apps.repeaters.dbaccessors import (
get_pending_repeat_record_count,
get_success_repeat_record_count,
get_failure_repeat_record_count,
get_repeat_record_count,
get_repeaters_by_domain,
get_paged_repeat_records... | bsd-3-clause | -8,391,664,742,251,161,000 | 30.293651 | 90 | 0.628963 | false | 3.678172 | true | false | false |
y4smeen/friendly-spork | camera/take-picture.py | 1 | 3087 | from __future__ import print_function
import sys
import cv2
def main(argv):
#capture from camera at location 0
cap = cv2.VideoCapture(0)
# Change the camera setting using the set() function
# cap.set(cv2.cv.CV_CAP_PROP_EXPOSURE, -6.0)
# cap.set(cv2.cv.CV_CAP_PROP_GAIN, 4.0)
# cap.set(cv2.cv.CV... | mit | 2,285,477,887,663,510,300 | 41.875 | 127 | 0.675089 | false | 2.814038 | false | false | false |
SumiTomohiko/Yog | tools/update_prototype.py | 1 | 8073 | #! python
# -*- coding: utf-8 -*-
from glob import glob
import re
class DeclarationInserter(object):
start = "/* PROTOTYPE_START */"
end = "/* PROTOTYPE_END */"
files = {
"include/yog/dir.h": [ "src/dir.c", ],
"include/yog/path.h": [ "src/path.c", ],
"include/yog/proce... | mit | -4,793,780,574,572,863,000 | 34.563877 | 119 | 0.440852 | false | 3.618557 | false | false | false |
jopcode/whoUR | whoUR.py | 1 | 1600 | import sys, os
import argparse
import urllib3, urllib
import re
# Modules
from libs.colors import *
from libs.selectChoice import select_choice
Parser = argparse.ArgumentParser(prog='whoUR.py', description='Tool for information gathering')
'''
this has been use in the future
Parser.add_argument('-d', '--dic-path', he... | gpl-3.0 | 5,525,027,244,532,273,000 | 31 | 166 | 0.476875 | false | 3.11284 | false | false | false |
fake-name/ReadableWebProxy | WebMirror/management/rss_parser_funcs/feed_parse_extractWanderingmusetranslationWordpressCom.py | 1 | 1211 | def extractWanderingmusetranslationWordpressCom(item):
'''
Parser for 'wanderingmusetranslation.wordpress.com'
'''
vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title'])
if not (chp or vol) or "preview" in item['title'].lower():
return None
chp_prefixes = [
('SH Chapter ', 'Swain Hakush... | bsd-3-clause | 9,097,084,817,052,766,000 | 35.666667 | 122 | 0.595533 | false | 3.321429 | false | false | false |
portableant/open-context-py | opencontext_py/apps/edit/inputs/rules/models.py | 1 | 1257 | import collections
from jsonfield import JSONField
from datetime import datetime
from django.utils import timezone
from django.db import models
# Stores information about fields for a data entry form
class InputRule(models.Model):
uuid = models.CharField(max_length=50, primary_key=True) # uuid for the rule itsel... | gpl-3.0 | 2,131,226,074,972,182,500 | 38.28125 | 95 | 0.674622 | false | 4.067961 | false | false | false |
henriquegemignani/randovania | randovania/game_description/node_search.py | 1 | 2783 | from typing import Dict, Optional
import networkx
from randovania.game_description.area import Area
from randovania.game_description.game_patches import GamePatches
from randovania.game_description.node import Node, DockNode, TeleporterNode, PickupNode, ResourceNode
from randovania.game_description.resources.pickup_i... | gpl-3.0 | -1,139,548,063,911,922,300 | 42.484375 | 117 | 0.673015 | false | 3.903226 | false | false | false |
m-ober/byceps | scripts/import_permissions_and_roles.py | 1 | 1418 | #!/usr/bin/env python
"""Import permissions, roles, and their relations from a JSON file.
:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
import json
import click
from byceps.services.authorization import service as authz_service
from byceps.util.system import get_co... | bsd-3-clause | -46,085,055,061,123,140 | 25.259259 | 78 | 0.687588 | false | 3.571788 | false | false | false |
platformio/platformio | platformio/proc.py | 1 | 5706 | # Copyright (c) 2014-present PlatformIO <contact@platformio.org>
#
# 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 appli... | apache-2.0 | -7,367,964,481,521,665,000 | 28.564767 | 82 | 0.58307 | false | 3.935172 | false | false | false |
monaparty/counterparty-lib | counterpartylib/lib/messages/destroy.py | 1 | 4261 | #! /usr/bin/python3
"""Destroy a quantity of an asset."""
import struct
import json
import logging
logger = logging.getLogger(__name__)
from counterpartylib.lib import util
from counterpartylib.lib import config
from counterpartylib.lib import script
from counterpartylib.lib import message_type
from counterpartylib.... | mit | -1,950,463,795,646,828,500 | 29.007042 | 125 | 0.596574 | false | 4.073614 | false | false | false |
DeltaEpsilon-HackFMI2/FMICalendar-REST | venv/lib/python2.7/site-packages/rest_framework/views.py | 1 | 15361 | """
Provides an APIView class that is the base of all views in REST framework.
"""
from __future__ import unicode_literals
from django.core.exceptions import PermissionDenied
from django.http import Http404
from django.utils.datastructures import SortedDict
from django.views.decorators.csrf import csrf_exempt
from res... | mit | -931,368,044,246,631,700 | 35.143529 | 84 | 0.627238 | false | 4.61985 | false | false | false |
monikagrabowska/osf.io | osf/models/base.py | 1 | 26122 |
import logging
import random
from datetime import datetime
import bson
import modularodm.exceptions
import pytz
from django.contrib.contenttypes.fields import (GenericForeignKey,
GenericRelation)
from django.contrib.contenttypes.models import ContentType
from django.con... | apache-2.0 | 2,214,120,148,595,470,600 | 34.588556 | 129 | 0.607917 | false | 4.037403 | false | false | false |
rohitwaghchaure/frappe | frappe/model/meta.py | 1 | 15604 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
# metadata
'''
Load metadata (DocType) class
Example:
meta = frappe.get_meta('User')
if meta.has_field('first_name'):
print "DocType" table has field "first_name"
'''
from __future__ import unicode_literals
im... | mit | -7,037,875,001,456,010,000 | 28.721905 | 101 | 0.680338 | false | 3.147872 | false | false | false |
mkhutornenko/incubator-aurora | src/test/python/apache/aurora/client/cli/test_help.py | 1 | 3763 | #
# 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, software
# distributed under ... | apache-2.0 | -4,082,335,328,770,860,000 | 39.902174 | 85 | 0.68642 | false | 3.594078 | true | false | false |
MindPass/Code | Interface_graphique/mindmap/svgwrite-1.1.6/tests/test_elementfactory.py | 1 | 2340 | #!/usr/bin/env python
#coding:utf-8
# Author: mozman --<mozman@gmx.at>
# Purpose: test elementfactory
# Created: 15.10.2010
# Copyright (C) 2010, Manfred Moitzi
# License: MIT License
import sys
import unittest
from svgwrite.elementfactory import ElementFactory
from svgwrite.params import Parameter
class MockFactor... | gpl-3.0 | -9,142,067,781,533,273,000 | 27.888889 | 57 | 0.632479 | false | 3.639191 | true | false | false |
CloudNiner/fadds-parser | fadds/twr.py | 1 | 2207 | # -*- coding: utf-8 -*-
"""
Author: @sposs
Date: 19.08.16
"""
from fadds.base_file import BaseFile, BaseData
import re
value_re = re.compile(r"(?P<value>[0-9]+\.*[0-9]*)(?P<use>[A-Z ()0-9-/&]*)")
class TWRParser(BaseFile):
def __init__(self, twr_file):
super(TWRParser, self).__init__(twr_file)
se... | mit | 4,184,547,079,323,127,000 | 28.426667 | 79 | 0.492524 | false | 3.323795 | false | false | false |
apbard/scipy | scipy/spatial/tests/test_kdtree.py | 1 | 41366 | # Copyright Anne M. Archibald 2008
# Released under the scipy license
from __future__ import division, print_function, absolute_import
from numpy.testing import (assert_equal, assert_array_equal,
assert_almost_equal, assert_array_almost_equal, assert_,
assert_raises)
import numpy as np
from scipy.spatial imp... | bsd-3-clause | 5,765,639,288,397,933,000 | 30.055556 | 102 | 0.572282 | false | 2.921328 | true | false | false |
cfc603/django-twilio-sms-models | django_twilio_sms/models.py | 1 | 12882 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import time
from django.conf import settings
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django_twilio.client import twilio_client
from django_twilio.models import Caller
from twilio.rest.exceptions im... | bsd-3-clause | 5,583,914,624,737,663,000 | 28.682028 | 79 | 0.613957 | false | 3.925046 | false | false | false |
totalgood/twote | twote/models_calendar.py | 1 | 1157 | from django.db import models
from django.utils import timezone
from django.contrib.auth.models import User
from django.core.exceptions import ValidationError
class Event(models.Model):
'''
This model represents an one-time event
'''
title = models.CharField(max_length=255)
description = models.Tex... | mit | -7,334,137,260,139,386,000 | 34.060606 | 130 | 0.675886 | false | 4.045455 | false | false | false |
compmem/ptsa | ptsa/data/hdf5wrapper.py | 1 | 10253 | #emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
#ex: set sts=4 ts=4 sw=4 et:
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See the COPYING file distributed along with the PTSA package for the
# copyright and license terms.
#
### ### ### ### ### ### ### #... | gpl-3.0 | 8,240,189,674,893,211,000 | 34.477509 | 84 | 0.531649 | false | 4.111067 | false | false | false |
gdraynz/nyuki | nyuki/bus/persistence/memory_backend.py | 1 | 1899 | import logging
from nyuki.bus.persistence.events import EventStatus
from nyuki.bus.persistence.backend import PersistenceBackend
log = logging.getLogger(__name__)
class FIFOSizedQueue(object):
def __init__(self, size):
self._list = list()
self._size = size
def __len__(self):
retur... | apache-2.0 | -7,991,617,701,439,254,000 | 24.662162 | 76 | 0.567667 | false | 4.049041 | false | false | false |
aristanetworks/arista-ovs-quantum | quantum/plugins/ryu/db/models_v2.py | 1 | 2004 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Isaku Yamahata <yamahata at private email ne jp>
# 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
#... | apache-2.0 | 5,778,167,961,306,299,000 | 36.111111 | 79 | 0.63523 | false | 3.711111 | false | false | false |
dNG-git/pas_gapi_core | setup.py | 1 | 2785 | # -*- coding: utf-8 -*-
"""
direct PAS
Python Application Services
----------------------------------------------------------------------------
(C) direct Netware Group - All rights reserved
https://www.direct-netware.de/redirect?pas;gapi;core
The following license agreement remains valid unless any additions or
chan... | gpl-2.0 | -6,165,827,496,580,687,000 | 34.253165 | 130 | 0.631957 | false | 4.238965 | false | false | false |
gford1000/awssl | examples/wait_state_example.py | 1 | 1277 | import os
import sys
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
import awssl
def wait_state_example():
# Construct states
final_state = awssl.Task(
Name="FinalState",
EndState=True,
ResourceArn="arn:aws:lambda:REGION:ACCOUNT_ID:function:FUNCTION_NAME")
wait_using_sec... | mit | -2,577,020,994,533,087,700 | 25.061224 | 82 | 0.735317 | false | 3.011792 | false | false | false |
KarnUllrich/HDToolsPython | classification.py | 1 | 1403 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Provides a kNN classier.
"""
import numpy as np
__author__ = ["Karen Ullrich"]
__email__ = "karen.ullrich@ofai.at"
__version__ = "Dec 2014"
def kNN(data, k):
'''
Performs kNN. Computes LOOCV accuracy.
k ...neighborhood size
D ...distance matr... | gpl-2.0 | 8,126,564,849,569,907,000 | 22.79661 | 75 | 0.577334 | false | 3.348449 | false | false | false |
cullophid/Scienceman | spritesheettest.py | 1 | 1419 | import sys, os
import pygame
from pygame.locals import *
from pygame.color import *
from gamelib import data
class Spritesheet:
def __init__(self, filename):
self.sheet = pygame.image.load(os.path.join('data',filename)).convert()
def imgat(self,rect,colorkey=None):
rect = Rect(rect)
image = pygame.Surface(rect.... | lgpl-2.1 | -1,517,194,131,688,636,400 | 27.38 | 73 | 0.674419 | false | 2.667293 | false | false | false |
davy39/eric | Helpviewer/Bookmarks/BookmarksManager.py | 1 | 21594 | # -*- coding: utf-8 -*-
# Copyright (c) 2009 - 2014 Detlev Offenbach <detlev@die-offenbachs.de>
#
"""
Module implementing the bookmarks manager.
"""
from __future__ import unicode_literals
import os
from PyQt5.QtCore import pyqtSignal, Qt, QT_TRANSLATE_NOOP, QObject, QFile, \
QIODevice, QXmlStreamReader, QDate... | gpl-3.0 | -6,105,752,820,382,670,000 | 32.635514 | 79 | 0.563119 | false | 4.687215 | false | false | false |
Gavitron/pipulator | tcp_fakeclient.py | 1 | 2704 | # Connect to a known game Server and spew out whatever it tells us, before the missing heartbeat causes us to disco
#
import socket
import struct
import sys
import json
# internet variables
game_address = ('127.0.0.1', 27001) # a hack so that I can use the tcpserver when testing.
######
# misc helper function decl... | bsd-3-clause | -4,238,135,791,722,192,400 | 36.555556 | 144 | 0.565089 | false | 3.896254 | false | false | false |
ebar0n/SD-Fumadores | agent.py | 1 | 3769 | import threading
import time
from random import choice
import socketserver
from storage import codes, packet_size, store, time_sleep, time_smoke
from utils import _print
global smoke
smoke = False
global smoke_code
class MyTCPServer(socketserver.ThreadingMixIn, socketserver.TCPServer):
pass
class MyTCPServerH... | bsd-3-clause | 6,229,673,584,993,234,000 | 30.940678 | 87 | 0.557177 | false | 3.905699 | false | false | false |
anselmobd/fo2 | src/lotes/views/ajax/estoque_depositos_modelo.py | 1 | 1486 | from pprint import pprint
from django.db.models import Exists, OuterRef
from django.http import JsonResponse
from fo2.connections import db_cursor_so
from systextil.queries.deposito.total_modelo import totais_modelos_depositos
import comercial.models
def estoque_depositos_modelo(request, modelo, filtra=''):
c... | mit | 5,535,124,717,280,641,000 | 27.557692 | 76 | 0.556229 | false | 3.527316 | false | false | false |
sistason/pa3 | src/pa3_frontend/pa3_django/pa3/statistics_handling.py | 1 | 4335 | import logging
import time
from django.utils import timezone
from django.db.models import Sum
from django.http import HttpResponse
from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned
from pa3.models import WaitingNumberBatch, WaitingNumber, NewestNumberBatch, StatisticalData
def get_src_s... | gpl-3.0 | -7,438,429,729,537,712,000 | 39.148148 | 116 | 0.62722 | false | 3.206361 | false | false | false |
ElettraSciComp/STP-Core | STP-Core/preview_phaseretrieval.py | 1 | 5490 | ###########################################################################
# (C) 2016 Elettra - Sincrotrone Trieste S.C.p.A.. All rights reserved. #
# #
# #
# This file is ... | gpl-3.0 | 5,234,524,101,130,132,000 | 35.838926 | 120 | 0.598579 | false | 3.255042 | false | false | false |
williamyangcn/iBlah_py | ui/ui_profile_dialog.py | 1 | 4945 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '/Users/lee/backups/code/iblah_py/ui/ui_profile_dialog.ui'
#
# Created: Fri May 6 21:47:58 2011
# by: PyQt4 UI code generator 4.8.3
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fro... | bsd-3-clause | -4,948,456,608,463,711,000 | 57.535714 | 132 | 0.702054 | false | 3.519685 | false | false | false |
thoreg/satchmo | store/localsite/templatetags/email_munge.py | 1 | 1857 | """
Stolen from: http://tomcoote.co.uk/code-bank/django-email-munger/
"""
from django import template
from django.template.defaultfilters import stringfilter
from django.utils.safestring import mark_safe
from django.utils.html import conditional_escape
import re
register = template.Library()
@register.filter
@string... | bsd-3-clause | -8,291,347,823,628,032,000 | 32.160714 | 98 | 0.655358 | false | 3.655512 | false | false | false |
vicente-gonzalez-ruiz/QSVC | trunk/src/old_py/info_mc_j2k.py | 1 | 7723 | #!/usr/bin/python
# -*- coding: iso-8859-15 -*-
## @file info_mc_j2k.py
# The size in bytes, and a codestream Kbps, even detailed subband
# level and neglecting headers, from a MCJ2K codestream.
#
# @authors Jose Carmelo Maturana-Espinosa\n Vicente Gonzalez-Ruiz.
# @date Last modification: 2015, January 7.
#
## @p... | gpl-2.0 | 6,323,669,541,710,254,000 | 25.179661 | 200 | 0.545125 | false | 2.880642 | false | false | false |
numerical-mathematics/extrapolation | ex_parallel_original.py | 1 | 28458 | from __future__ import division
import numpy as np
import multiprocessing as mp
import math
NUM_WORKERS = None
def set_NUM_WORKERS(nworkers):
global NUM_WORKERS
if nworkers == None:
try:
NUM_WORKERS = mp.cpu_count()
except NotImplementedError:
NUM_WORKERS = 4
else: ... | mit | 6,856,311,973,943,909,000 | 35.4379 | 90 | 0.476667 | false | 3.127253 | false | false | false |
sirpercival/kivy | kivy/uix/textinput.py | 1 | 92223 | # -*- encoding: utf8 -*-
'''
Text Input
==========
.. versionadded:: 1.0.4
.. image:: images/textinput-mono.jpg
.. image:: images/textinput-multi.jpg
The :class:`TextInput` widget provides a box of editable plain text.
Unicode, multiline, cursor navigation, selection and clipboard features
are supported.
.. note::... | mit | -7,725,666,435,607,477,000 | 33.735593 | 80 | 0.553452 | false | 4.001519 | false | false | false |
ninepints/hootvetica | food/management/commands/__init__.py | 1 | 2086 | import uuid
from django.db.models import Q
from food.models import Category, Item, WeeklyClosure, OneTimeClosure
def get_closures(current_date):
weekly_closures = set(
vals['location_id'] for vals in WeeklyClosure.objects.filter(
weekday=current_date.weekday())
.values('location_id'))
... | mit | 2,817,346,170,367,118,300 | 36.927273 | 80 | 0.610738 | false | 3.827523 | false | false | false |
openstack/python-openstackclient | openstackclient/common/sdk_utils.py | 2 | 2358 | # 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, software
# distrib... | apache-2.0 | -8,352,966,954,439,167,000 | 39.655172 | 78 | 0.692536 | false | 4.003396 | false | false | false |
mishbahr/django-connected | connected_accounts/providers/instagram.py | 1 | 1535 | from django.utils.translation import ugettext_lazy as _
from connected_accounts.conf import settings
from connected_accounts.provider_pool import providers
from .base import OAuth2Provider, ProviderAccount
class InstagramAccount(ProviderAccount):
PROFILE_URL = 'http://instagram.com/'
def get_profile_url(se... | bsd-3-clause | -4,676,531,674,048,964,000 | 30.979167 | 77 | 0.700326 | false | 3.681055 | false | false | false |
sunset1995/py360convert | py360convert/c2e.py | 1 | 1865 | import numpy as np
from . import utils
def c2e(cubemap, h, w, mode='bilinear', cube_format='dice'):
if mode == 'bilinear':
order = 1
elif mode == 'nearest':
order = 0
else:
raise NotImplementedError('unknown mode')
if cube_format == 'horizon':
pass
elif cube_forma... | mit | -4,961,470,892,452,482,000 | 28.140625 | 83 | 0.538338 | false | 2.601116 | false | false | false |
mad-lab/transit | src/pytransit/draw_trash.py | 1 | 12680 | # Copyright 2015.
# Michael A. DeJesus, Chaitra Ambadipudi, and Thomas R. Ioerger.
#
#
# This file is part of TRANSIT.
#
# TRANSIT 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-3.0 | 3,052,072,579,063,662,000 | 31.429668 | 185 | 0.579101 | false | 2.989156 | false | false | false |
mitsuhiko/fungiform | setup.py | 1 | 1459 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Fungiform
~~~~~~~~~
A form handling system that previously was used for Pocoo's Zine
and Plurk's Solace software. Unbundled into a separate library that
is framework independent.
This is still a preview release. Check the source for more info... | bsd-3-clause | 3,290,813,701,191,853,600 | 29.395833 | 76 | 0.632625 | false | 3.975477 | false | false | false |
googleapis/googleapis-gen | google/devtools/cloudtrace/v1/devtools-cloudtrace-v1-py/google/cloud/trace_v1/types/trace.py | 1 | 12909 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | 8,235,140,834,633,207,000 | 32.270619 | 77 | 0.577736 | false | 4.285857 | false | false | false |
googleapis/googleapis-gen | google/cloud/bigquery/storage/v1beta1/bigquery-storage-v1beta1-py/google/cloud/bigquery/storage_v1beta1/services/big_query_storage/transports/base.py | 1 | 10654 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | -6,510,122,743,847,912,000 | 39.819923 | 161 | 0.598085 | false | 4.489676 | false | false | false |
freeflightsim/fg-flying-club | flying-club.appspot.com/app/AuthHandler.py | 1 | 4541 | # -*- coding: utf-8 -*-
import os
import uuid
import datetime
from google.appengine.ext import webapp
from google.appengine.api import users
from google.appengine.ext import db
from google.appengine.api import mail
from google.appengine.ext.webapp import template
from django.utils import simplejson as json
from goog... | gpl-2.0 | -6,413,474,163,439,239,000 | 24.227778 | 100 | 0.566175 | false | 3.168876 | false | false | false |
amitdhiman000/dais | politics/migrations/0001_initial.py | 1 | 4585 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-12-18 20:58
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('user', '0002_auto_20161215_0806'),
... | apache-2.0 | -7,740,220,461,772,860,000 | 39.9375 | 136 | 0.551145 | false | 4.198718 | false | false | false |
gandelman-a/neutron-lbaas | neutron_lbaas/tests/tempest/lib/common/utils/linux/remote_client.py | 2 | 6497 | # 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, software
# d... | apache-2.0 | -1,462,144,387,955,705,300 | 37.217647 | 78 | 0.59843 | false | 3.725344 | false | false | false |
zxjsdp/NodeFinderGUI | setup.py | 1 | 1280 | from setuptools import setup, find_packages
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='NodeFinderGUI',
version='0.5.0',
description=('GUI Tool for node... | apache-2.0 | -9,152,846,158,618,841,000 | 31.820513 | 63 | 0.609375 | false | 3.914373 | false | false | false |
AndiDog/git-cola | cola/widgets/merge.py | 1 | 8995 | from __future__ import division, absolute_import, unicode_literals
from qtpy import QtWidgets
from qtpy.QtCore import Qt
from ..i18n import N_
from ..interaction import Interaction
from ..qtutils import get
from .. import cmds
from .. import icons
from .. import qtutils
from . import completion
from . import standard... | gpl-2.0 | 5,567,192,275,756,753,000 | 39.518018 | 80 | 0.597332 | false | 4.236929 | false | false | false |
tyiannak/pySLRF | slrf.py | 1 | 4205 | import numpy
import scipy.signal
import scipy.interpolate
from matplotlib import pyplot as plt
from breezylidar import URG04LX
def flags2segs(Flags, window):
'''
ARGUMENTS:
- Flags: a sequence of class flags (per time window)
- window: window duration (in seconds)
RETURNS:
- seg... | apache-2.0 | 1,125,670,961,743,430,300 | 28.612676 | 117 | 0.557669 | false | 3.05374 | false | false | false |
cbetheridge/simpleclassroom | views/views.py | 1 | 4252 | """
Contains all of the page view handlers for the app.
These handlers should be GET handlers indended for the serving of HTTP. AJAX or
otherwise action-based handlers should be stored in another module.
"""
import json
from django.core.urlresolvers import reverse
from django.http import HttpResponse
from django.sho... | mit | -7,785,976,437,739,663,000 | 28.123288 | 79 | 0.699671 | false | 3.60339 | false | false | false |
ARM-software/armnn | python/pyarmnn/examples/example_utils.py | 1 | 6828 | # Copyright 2020 NXP
# SPDX-License-Identifier: MIT
from urllib.parse import urlparse
import os
from PIL import Image
import pyarmnn as ann
import numpy as np
import requests
import argparse
import warnings
def parse_command_line(desc: str = ""):
"""Adds arguments to the script.
Args:
desc(str): Scr... | mit | -5,464,050,138,903,942,000 | 29.895928 | 96 | 0.616139 | false | 3.89726 | false | false | false |
symbooglix/boogie-runner | prepare-smoke-tests.py | 1 | 6375 | #!/usr/bin/env python
# vim: set sw=2 ts=2 softtabstop=2 expandtab:
"""
Script to run a Symbooglix's AxiomAndEntryRequiresCheckTransformPass
pass on a set of boogie programs (from a program List) in preparation
for running a smoke test to check that all the assumptions leading to
an entry point are sati... | bsd-3-clause | -8,607,544,325,035,027,000 | 34.614525 | 128 | 0.694431 | false | 3.689236 | false | false | false |
datawire/mdk | functionaltests/webservers/djangoserver/settings.py | 1 | 3262 | """
Django settings for djangoserver project.
Generated by 'django-admin startproject' using Django 1.9.9.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
import ... | apache-2.0 | 610,415,732,512,119,600 | 25.737705 | 91 | 0.692213 | false | 3.518878 | false | false | false |
erikdejonge/newsrivr | daemons/hn.py | 1 | 17357 | """
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT... | gpl-2.0 | -2,107,189,339,879,482,400 | 30.965009 | 159 | 0.567667 | false | 2.371823 | false | false | false |
johnoleary/Farkel | game.py | 1 | 4955 | ####################
### Farkel Game ####
####################
import dice
import player
dice_list = [dice.Dice() for i in range(6)]
### Set up players ###
number_of_players = input("How many players? ")
player_list = []
for i in range(number_of_players):
player_list.append(player.Player(raw_input("What is player "... | mit | 8,157,945,392,773,263,000 | 24.152284 | 124 | 0.655298 | false | 2.703219 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.