repo_name stringlengths 6 61 | path stringlengths 4 230 | copies stringlengths 1 3 | size stringlengths 4 6 | text stringlengths 1.01k 850k | license stringclasses 15
values | hash int64 -9,220,477,234,079,998,000 9,219,060,020B | line_mean float64 11.6 96.6 | line_max int64 32 939 | alpha_frac float64 0.26 0.9 | autogenerated bool 1
class | ratio float64 1.62 6.1 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ApproxEng/approxeng.input | src/python/approxeng/input/gui/profiler.py | 1 | 9669 | import curses
import curses.textpad
import re
import signal
from math import floor
import yaml
from evdev import InputDevice
from approxeng.input.controllers import get_valid_devices
from approxeng.input.profiling import Profiler, ProfilerThread, Profile, BUTTON_NAMES, AXIS_NAMES
DEFAULT_AXIS_KEYS = ('z', 'x', 'c', ... | apache-2.0 | 6,403,155,809,056,931,000 | 38.929752 | 117 | 0.559247 | false | 4.077215 | false | false | false |
Seanld/Remagined-Software | Transfer/get.py | 1 | 1266 | import socket
import sys
import os
HOST = sys.argv[1]
PORT = int(sys.argv[2])
s = socket.socket()
try:
s.connect((HOST, PORT))
except:
raise Exception("Device not available to download from.")
STAY = True
def ben(string):
return bytes(string.encode("utf-8"))
def bde(binary):
return str(binary.decode... | mit | 8,095,323,869,432,168,000 | 26.521739 | 105 | 0.534755 | false | 3.701754 | false | false | false |
malexer/meteocalc | meteocalc/windchill.py | 1 | 1625 | """Module for calculation of Wind chill.
Wind-chill or windchill (popularly wind chill factor) is the lowering of
body temperature due to the passing-flow of lower-temperature air.
Wind chill numbers are always lower than the air temperature for values
where the formula is valid.
When the apparent temperature is high... | mit | -8,933,491,278,379,710,000 | 30.862745 | 77 | 0.705231 | false | 3.532609 | false | false | false |
dhrod5/link | fabfile.py | 2 | 11830 | """
Fabfile for deploying and setting up code that looks like the production
environment. it also makes it easy to start up the servers
If you want to run on the localhost you may need to first do::
rm -rf ~/.ssh/known_hosts
"""
from __future__ import with_statement
import os
import re
from fabric.api import ... | apache-2.0 | 9,002,402,062,855,273,000 | 28.066339 | 129 | 0.595182 | false | 3.664808 | true | false | false |
FLHerne/mapgen | hackystuff.py | 1 | 1404 | import numpy
class TerrainType:
DEEPW = 0
WATER = 9
ROCKS = 10
BOGGY = 11
GRASS = 1
SANDY = 2
SNOWY = 3
TREES = 4
PLANK = 5
FLOOR = 6
ROOFD = 12
WALLS = 7
GLASS = 8
BuildCosts = {
TerrainType.DEEPW: 80,
TerrainType.WATER: 40,
TerrainType.ROCKS: 8,
Te... | gpl-2.0 | -3,909,303,735,207,333,400 | 25.490566 | 127 | 0.621083 | false | 2.480565 | false | false | false |
manxueitp/cozmo-test | cozmo_sdk_examples/tutorials/03_vision/01_light_when_face.py | 2 | 1720 | #!/usr/bin/env python3
# Copyright (c) 2016 Anki, 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 in the file LICENSE.txt or at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unles... | mit | -2,022,172,166,260,576,500 | 30.272727 | 83 | 0.67907 | false | 3.628692 | false | false | false |
googleinterns/inventory-visualizer | backend/authentication/token_controller.py | 1 | 1184 | import random
import string
import config
import os
class TokenControllerSingleton:
secret_key = None
@staticmethod
def get_secret_key():
if TokenControllerSingleton.secret_key is None:
TokenControllerSingleton()
return TokenControllerSingleton.secret_key
def get_server_s... | apache-2.0 | 3,258,940,062,933,860,400 | 31.888889 | 102 | 0.647804 | false | 4.027211 | true | false | false |
automl/SpySMAC | cave/analyzer/feature_analysis/feature_clustering.py | 1 | 2199 | from cave.analyzer.base_analyzer import BaseAnalyzer
from cave.analyzer.feature_analysis.feature_analysis import FeatureAnalysis
from cave.utils.helpers import check_for_features
from cave.utils.hpbandster_helpers import format_budgets
class FeatureClustering(BaseAnalyzer):
""" Clustering instances in 2d; the col... | bsd-3-clause | -2,952,882,242,238,624,300 | 48.977273 | 116 | 0.530241 | false | 5.149883 | false | false | false |
polyaxon/polyaxon | sdks/python/http_client/v1/polyaxon_sdk/models/v1_project.py | 1 | 12417 | #!/usr/bin/python
#
# Copyright 2018-2021 Polyaxon, 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 ... | apache-2.0 | -5,995,626,127,572,591,000 | 25.141053 | 278 | 0.56471 | false | 3.939404 | true | false | false |
lneuhaus/pyrpl | pyrpl/widgets/module_widgets/acquisition_module_widget.py | 1 | 6247 | """
Acquisition modules are the modules used to acquire data from the Red Pitaya.
At the moment, they include the
* :mod:`~pyrpl.hardware_modules.scope`,
* :mod:`~pyrpl.software_modules.network_analyzer`,
* :mod:`~pyrpl.software_modules.spectrum_analyzer`.
All the acquisition modules have in common a plot area where... | gpl-3.0 | 2,141,065,530,158,079,000 | 42.381944 | 123 | 0.676645 | false | 3.961319 | false | false | false |
sn6uv/gmpy_cffi | gmpy_cffi/cache.py | 1 | 6327 | import sys
from gmpy_cffi.interface import ffi, gmp
if sys.version > '3':
long = int
xrange = range
cache_size = 100
cache_obsize = 128
def get_cache():
"""
get_cache() -> (cache_size, object_size)
Return the current cache size (number of objects) and maximum size
per object (number of ... | bsd-3-clause | -4,395,362,153,672,936,400 | 25.144628 | 86 | 0.559823 | false | 2.971818 | false | false | false |
WholeGrainGoats/servo | tests/wpt/web-platform-tests/annotation-vocab/tools/vocab_tester.py | 64 | 8320 |
# Author: Rob Sanderson (azaroth42@gmail.com)
# License: Apache2
# Last Modified: 2016-09-02
import json
from rdflib import ConjunctiveGraph, URIRef
from pyld import jsonld
from pyld.jsonld import compact, expand, frame, from_rdf, to_rdf, JsonLdProcessor
import urllib
# Stop code from looking up the contexts online ... | mpl-2.0 | 3,573,403,248,505,460,000 | 33.666667 | 113 | 0.585337 | false | 3.465223 | true | false | false |
ngsutils/ngsutils | ngsutils/bam/pair.py | 1 | 11959 | #!/usr/bin/env python
## category General
## desc Given two separately mapped paired files, re-pair the files
"""
Given two separately mapped paired-end files, re-pair the files, selecting
the most likely pairing partners based upon strand, insert distance, and
maximizing alignment scores.
It is very important that th... | bsd-3-clause | 6,956,855,958,349,268,000 | 31.944904 | 165 | 0.497617 | false | 3.63606 | false | false | false |
UMN-Hydro/GSFLOW_pre-processor | python_scripts/Create_hydcond_array.py | 1 | 5456 | # -*- coding: utf-8 -*-
"""
Created on Sat Oct 7 18:33:11 2017
@author: gcng
"""
# Create_hydcond_array
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt # matlab-like plots
from readSettings import Settings
import platform
import sys
# Set input file
if len(sys.argv) < 2:
settings_input_f... | gpl-3.0 | -4,137,545,378,533,147,000 | 30.356322 | 99 | 0.562317 | false | 3.157407 | false | false | false |
osin-vladimir/ms-thesis-skoltech | mxnet-ssd/symbol/common.py | 1 | 6808 | import mxnet as mx
import numpy as np
def bn_act_conv_layer(from_layer, name, num_filter, kernel=(1,1), pad=(0,0), stride=(1,1)):
bn = mx.symbol.BatchNorm(data=from_layer, name="bn{}".format(name))
relu = mx.symbol.Activation(data=bn, act_type='relu')
conv = mx.symbol.Convolution(data=relu, kernel=kernel, ... | mit | 7,502,084,082,711,160,000 | 51.369231 | 167 | 0.645858 | false | 3.502058 | false | false | false |
Bobypalcka/coinwatcher | lib/details.py | 1 | 6887 |
import datetime
import os
import pickle
import time
from colorama import Fore, init
from .databaseCore import database
class owerview(object):
def __init__(self):
init()
self.p = database()
self.userid = -1
self.coin_table = self.p.load_all_coins()
# load all update... | unlicense | 1,554,088,555,193,229,000 | 33.782828 | 169 | 0.484391 | false | 3.5647 | false | false | false |
proximate/proximate | pic_choose_dlg.py | 1 | 7610 | #
# Proximate - Peer-to-peer social networking
#
# Copyright (c) 2008-2011 Nokia Corporation
#
# All rights reserved.
#
# This software is licensed under The Clear BSD license.
# See the LICENSE file for more details.
#
import gtk
import gobject
import tempfile
import os
from plugins import get_plugin_by_type
from fil... | bsd-3-clause | -8,045,648,536,350,154,000 | 35.066351 | 108 | 0.625361 | false | 3.752465 | false | false | false |
lsaffre/timtools | timtools/sdoc/macros.py | 1 | 1215 | ## Copyright 2003-2009 Luc Saffre
## This file is part of the TimTools project.
## TimTools 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... | bsd-2-clause | 2,663,268,168,025,918,500 | 29.973684 | 71 | 0.670782 | false | 3.347107 | false | false | false |
li-xirong/jingwei | preprocess/count_tags.py | 1 | 2257 | import sys
import os
from basic.constant import ROOT_PATH
from basic.common import checkToSkip, printStatus
INFO = __file__
def process(options, collection):
rootpath = options.rootpath
tpp = options.tpp
tagfile = os.path.join(rootpath, collection, "TextData", "id.userid.%stags.txt" % tpp)
resultfi... | mit | 2,156,322,188,466,346,800 | 30.788732 | 160 | 0.61852 | false | 3.499225 | false | false | false |
chrisseto/Breeze | breeze/resource.py | 1 | 1480 | import re
import abc
from tornado.web import RequestHandler
from breeze.filter import FilterOptions
class _ResourceMeta(abc.ABCMeta):
def __init__(cls, name, bases, nmspc):
super().__init__(name, bases, nmspc)
if bases == (RequestHandler, ):
return
options = getattr(cls, 'Me... | mit | 1,949,619,977,083,950,300 | 22.870968 | 80 | 0.562838 | false | 3.86423 | false | false | false |
auvsi-suas/interop | client/tools/interop_cli.py | 1 | 5988 | #!/usr/bin/env python3
# CLI for interacting with interop server.
from __future__ import print_function
import argparse
import datetime
import getpass
import logging
import sys
import time
from auvsi_suas.client.client import AsyncClient
from auvsi_suas.proto.interop_api_pb2 import Telemetry
from google.protobuf impo... | apache-2.0 | 723,693,729,749,748,200 | 32.082873 | 79 | 0.628925 | false | 4.043214 | false | false | false |
duk3luk3/client | src/chat/chatlineedit.py | 2 | 4552 |
"""
Created on Dec 8, 2011
@author: thygrrr
"""
from PyQt5 import QtCore, QtWidgets
class ChatLineEdit(QtWidgets.QLineEdit):
"""
A special promoted QLineEdit that is used in channel.ui to provide a mirc-style editing experience
with completion and history.
LATER: History and tab completion support
... | gpl-3.0 | 2,154,726,780,059,968,000 | 40.009009 | 157 | 0.607645 | false | 4.335238 | false | false | false |
softwaresaved/fat | lowfat/migrations/0001_initial.py | 2 | 1362 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-04-13 13:17
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.Creat... | bsd-3-clause | 6,138,034,044,976,768,000 | 32.219512 | 108 | 0.553598 | false | 4.351438 | false | false | false |
ntim/g4sipm | sample/plots/sqlite/trace.py | 1 | 1206 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys, os, glob
import matplotlib.pyplot as plt
import numpy as np
import sqlite3
millivolt = 1e-9
if __name__ == "__main__":
filename = glob.glob('results/*.sqlite')[-1]
if len(sys.argv) > 1:
filename = sys.argv[1]
# Plot range from arguments
start = 0
sto... | gpl-3.0 | -2,763,521,255,873,647,000 | 29.897436 | 127 | 0.660581 | false | 2.677778 | false | false | false |
dbcls/dbcls-galaxy | tools/taxonomy/gi2taxonomy.py | 2 | 5229 | import sys
import string
import tempfile
import subprocess
from os import path
# -----------------------------------------------------------------------------------
def stop_err(msg):
sys.stderr.write(msg)
sys.exit()
# -----------------------------------------------------------------------------------
def gi... | mit | 5,218,182,769,841,883,000 | 29.051724 | 87 | 0.468732 | false | 3.502344 | false | false | false |
mtils/ems | ems/qt4/location/geoboundingcircle.py | 1 | 6941 | '''
Created on 24.10.2011
@author: michi
'''
from geoboundingarea import GeoBoundingArea #@UnresolvedImport
from ems.qt4.location.geocoordinate import GeoCoordinate
class GeoBoundingCircle(GeoBoundingArea):
'''
\brief The QGeoBoundingCircle class defines a circular geographic area.
\inmodule QtLocation
... | mit | 4,673,550,547,916,429,000 | 28.662393 | 97 | 0.583057 | false | 4.750856 | false | false | false |
iocube/skitza | setup.py | 1 | 1254 | from setuptools import setup, find_packages
from codecs import open
from os import path
from skitza import __version__
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='skitza',
version=__version__,
de... | mit | -2,550,209,727,861,696,500 | 25.145833 | 63 | 0.582935 | false | 3.955836 | false | true | false |
bgschiller/pre-commit-hooks | pre_commit_hooks/end_of_file_fixer.py | 1 | 2578 | from __future__ import print_function
from __future__ import unicode_literals
import argparse
import os
import sys
import platform
from pre_commit_hooks.util import entry
def quote_file(fname):
return "'{}'".format(fname)
def file_ends_with_newline(file_obj):
# Test for newline at end of file
# Empty ... | mit | -5,802,170,592,564,159,000 | 32.051282 | 108 | 0.629946 | false | 3.526676 | false | false | false |
resec/superhero | controller/user.py | 1 | 8217 | #coding=utf-8
__author__ = 'phithon'
import tornado.web, os, base64, pymongo, time
from controller.base import BaseHandler
from tornado import gen
from bson.objectid import ObjectId
from util.function import time_span, hash, intval
class UserHandler(BaseHandler):
def initialize(self):
super(UserHandler, se... | mit | 7,163,133,643,337,519,000 | 33.892704 | 125 | 0.554066 | false | 3.732323 | false | false | false |
CERT-Solucom/certitude | components/scanner/resources/python_source/getfiles.py | 2 | 1403 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
'''
CERTitude: the seeker of IOC
Copyright (c) 2016 CERT-W
Contact: cert@wavestone.com
Contributors: @iansus, @nervous, @fschwebel
CERTitude is under licence GPL-2.0:
This program is free software; you can redistribute it and/or
modify ... | gpl-2.0 | 7,535,693,596,363,145,000 | 28.25 | 83 | 0.68995 | false | 3.682415 | false | false | false |
gingi99/research_dr | python/MLEM2/rules_stat.py | 1 | 2688 | # coding: utf-8
from collections import defaultdict
# =====================================
# Rules のうち 指定したConsequentを持つ / 持たないRuleの数
# =====================================
def getNumRulesClass(list_rules, consequent, judge=True):
if judge : rules = [r for r in list_rules if r.getConsequent() == consequent]
... | mit | 3,592,265,433,694,491,600 | 35.112676 | 121 | 0.49181 | false | 3.257942 | false | false | false |
volpino/Yeps-EURAC | scripts/scramble/scripts/DRMAA_python-macosx.py | 1 | 1938 | import os, sys, shutil
if "SGE_ROOT" not in os.environ:
print "scramble(): Please set SGE_ROOT to the path of your SGE installation"
print "scramble(): before scrambling DRMAA_python"
sys.exit(1)
# change back to the build dir
if os.path.dirname( sys.argv[0] ) != "":
os.chdir( os.path.dirname( sys.arg... | mit | 814,807,746,194,055,800 | 31.3 | 97 | 0.631063 | false | 2.684211 | false | false | false |
CodethinkLabs/online-atomic-update | migratelib/findmnt.py | 2 | 2345 | # Copyright (C) 2014 Codethink Limited
#
# 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; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHO... | lgpl-2.1 | -322,575,308,686,660,300 | 31.123288 | 73 | 0.645203 | false | 3.934564 | false | false | false |
redhat-openstack/heat | heat/tests/test_clients.py | 1 | 18603 | #
# 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
# ... | apache-2.0 | 8,988,158,018,115,488,000 | 33.771963 | 78 | 0.565339 | false | 3.843595 | true | false | false |
dstftw/youtube-dl | youtube_dl/extractor/linuxacademy.py | 9 | 6559 | from __future__ import unicode_literals
import json
import random
import re
from .common import InfoExtractor
from ..compat import (
compat_b64decode,
compat_HTTPError,
compat_str,
)
from ..utils import (
ExtractorError,
orderedSet,
unescapeHTML,
urlencode_postdata,
urljoin,
)
class ... | unlicense | -3,457,482,050,541,847,000 | 36.695402 | 98 | 0.518524 | false | 3.820035 | false | false | false |
jdodds/feather | feather/plugin.py | 1 | 2692 | from multiprocessing import Process, Queue
class InvalidArguments(ValueError):
pass
class Plugin(Process):
"""A Plugin is a self-contained bit of functionality that runs in it's own
process, and runs via listening for messages and sending messages through
Queues.
"""
listeners = set(['SHUTDOWN... | bsd-3-clause | 357,535,382,207,170,900 | 28.582418 | 80 | 0.581352 | false | 4.434926 | false | false | false |
christydennison/ResumeStripClub | convert.py | 1 | 3312 | #!/usr/bin/env python
import sys
import os
import pdf2txt
import re
REDACTED_TEXT = 'REDACTED'
LINK_REGEX = re.compile('(https?:\/\/)?([a-zA-Z0-9]{2,4}\.)?(linkedin.com|lnkd\.in|github.com)\/.+')
EMAIL_REGEX = re.compile('([\w\.]+@(?:[\w]+\.)+[a-zA-Z]{2,})')
BLACKLIST_FILE = "bad_words.txt"
def get_blacklist_words()... | mit | -276,878,482,242,925,820 | 30.245283 | 103 | 0.583635 | false | 3.580541 | false | false | false |
zzcclp/carbondata | python/pycarbon/tests/hello_world/dataset_with_unischema/pyspark_hello_world_carbon.py | 3 | 1851 | # 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 use ... | apache-2.0 | -1,427,326,797,503,931,100 | 33.924528 | 110 | 0.723933 | false | 3.905063 | false | false | false |
genialis/resolwe-bio | resolwe_bio/processes/import_data/bam_scseq.py | 1 | 2434 | """Upload single cell BAM."""
from resolwe.process import (
Cmd,
DataField,
FileField,
Process,
SchedulingClass,
StringField,
)
class ImportScBam(Process):
"""Import scSeq BAM file and index."""
slug = "upload-bam-scseq-indexed"
name = "Single cell BAM file and index"
process_... | apache-2.0 | 2,919,631,471,827,741,000 | 29.425 | 85 | 0.5682 | false | 3.815047 | false | false | false |
gnsiva/Amphitrite | lib/RawFileProcessor.py | 1 | 6313 | """File for running cppapplication.exe to create Amphitrite
data files from MassLynx raw files.
Deprecated - Use RawFileProcessor_v2.py
"""
__author__ = "Ganesh N. Sivalingam <g.n.sivalingam@gmail.com"
import os
import shutil
import re
import subprocess
import cPickle as pickle
import numpy as np
import time
import u... | gpl-2.0 | 8,928,408,720,065,607,000 | 34.869318 | 98 | 0.546175 | false | 3.913825 | false | false | false |
ProfessorX/Config | .PyCharm30/system/python_stubs/-1247971765/PyKDE4/kdeui/KShortcutsEditor.py | 1 | 1963 | # encoding: utf-8
# module PyKDE4.kdeui
# from /usr/lib/python3/dist-packages/PyKDE4/kdeui.cpython-34m-x86_64-linux-gnu.so
# by generator 1.135
# no doc
# imports
import PyKDE4.kdecore as __PyKDE4_kdecore
import PyQt4.QtCore as __PyQt4_QtCore
import PyQt4.QtGui as __PyQt4_QtGui
import PyQt4.QtSvg as __PyQt4_QtSvg
cl... | gpl-2.0 | -8,009,713,668,091,190,000 | 26.263889 | 82 | 0.652573 | false | 3.819066 | false | false | false |
jh23453/privacyidea | migrations/versions/5402fd96fbca_.py | 2 | 2021 | """Add smsgateway table
Revision ID: 5402fd96fbca
Revises: 50adc980d625
Create Date: 2016-06-19 17:25:05.152889
"""
# revision identifiers, used by Alembic.
revision = '5402fd96fbca'
down_revision = '50adc980d625'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.exc import OperationalError, Programmin... | agpl-3.0 | 1,564,364,602,555,797,000 | 35.089286 | 113 | 0.65908 | false | 3.634892 | false | false | false |
MartinThoma/algorithms | daemon_rpc/call_daemon.py | 1 | 1082 | #!/usr/bin/env python
"""Talk with the daemon."""
import logging
import sys
import Pyro.core
logging.basicConfig(format='%(asctime)s %(levelname)s %(message)s',
level=logging.DEBUG,
stream=sys.stdout)
def main(up):
"""Do something with bartimaeus - who lives in another ... | mit | -7,298,478,674,700,020,000 | 27.473684 | 76 | 0.588725 | false | 4.022305 | false | false | false |
zhuyue1314/archinfo | archinfo/arch.py | 1 | 9301 | ''' This class is responsible for architecture-specific things such as call emulation and so forth. '''
import capstone as _capstone
import struct as _struct
import pyvex as _pyvex
import logging
l = logging.getLogger('arch.Arch')
class Arch(object):
def __init__(self, endness):
if endness not in ('Iend_... | bsd-2-clause | 7,537,236,573,429,404,000 | 29.69637 | 133 | 0.567466 | false | 3.46535 | false | false | false |
IntersectAustralia/asvo-tao | core/sageimport_mpi/BSPTree.py | 1 | 8898 | import pg
import getpass
import math
import string
import sys
import settingReader
import numpy
import matplotlib.pyplot as plt
import matplotlib
from MySQLdb.constants.FLAG import NUM
class BSPTree(object):
def __init__(self,Options):
'''
Constructor
'''
self.Options=Options... | gpl-3.0 | -237,638,071,895,796,670 | 34.313492 | 193 | 0.560351 | false | 3.673823 | false | false | false |
horiajurcut/quantum-app | api/controllers/login.py | 1 | 1523 | from flask import Flask
from flask import session
from flask import Response
from flask import request
from flask import redirect, url_for
from flask import render_template
from api.core import app, db
from api.models.user import User
from api.models.page import Page
import urllib
import json
import datetime
@app.ro... | apache-2.0 | 8,134,327,485,484,134,000 | 22.430769 | 102 | 0.622456 | false | 3.583529 | false | false | false |
kofrasa/pyutils | pyutils/algorithms.py | 1 | 1875 | #!/usr/bin/env python
#-*- coding: utf-8 -*-
__author__ = 'francis'
def permute(xs):
"""Returns a generator for the permutations of elements in the sequence
:param xs: a sequence of elements
"""
if len(xs) == 1:
yield xs
else:
for i in xrange(0, len(xs)):
for p in permu... | mit | 2,186,507,648,000,325,600 | 27.424242 | 82 | 0.523733 | false | 3.712871 | false | false | false |
osrf/osrf_hw | kicad_scripts/generate_BGA_footprint.py | 1 | 4360 | #!/usr/bin/env python
from __future__ import print_function
import os
import sys
from collections import OrderedDict
#FIXME Best way to configur pad size? right now we use half the pitch
if len(sys.argv) >1:
infile = sys.argv[1]
else:
print('please provide a configuration file')
sys.exit()
dictParameters... | apache-2.0 | 1,672,750,590,756,509,200 | 39 | 186 | 0.577982 | false | 2.77884 | false | false | false |
evansde77/cirrus | src/cirrus/plugins/uploaders/fabric_put.py | 1 | 1114 | #!/usr/bin/env python
"""
_fabric_put_
Uploader plugin that uses fabric to do a remote put
"""
from cirrus.logger import get_logger
from cirrus.upload_plugins import Uploader
from cirrus.configuration import get_pypi_auth
from cirrus.scp import put
LOGGER = get_logger()
class Pypi(Uploader):
PLUGGAGE_OBJECT_N... | apache-2.0 | 5,033,704,428,203,177,000 | 24.906977 | 76 | 0.593357 | false | 3.406728 | false | false | false |
beni55/dipy | dipy/sims/voxel.py | 3 | 18837 | from __future__ import division
import numpy as np
from numpy import dot
from dipy.core.geometry import sphere2cart
from dipy.core.geometry import vec2vec_rotmat
# Diffusion coefficients for white matter tracts, in mm^2/s
#
# Based roughly on values from:
#
# Pierpaoli, Basser, "Towards a Quantitative Assessment o... | bsd-3-clause | -2,654,405,943,853,423,000 | 27.98 | 85 | 0.585178 | false | 3.426155 | false | false | false |
anchore/anchore-engine | anchore_engine/analyzers/modules/20_file_list.py | 1 | 1814 | #!/usr/bin/env python3
import sys
import os
import re
import json
import subprocess
import stat
import anchore_engine.analyzers.utils
analyzer_name = "file_list"
try:
config = anchore_engine.analyzers.utils.init_analyzer_cmdline(
sys.argv, analyzer_name
)
except Exception as err:
print(str(err))... | apache-2.0 | -6,814,669,524,152,885,000 | 25.289855 | 81 | 0.677508 | false | 2.968903 | false | false | false |
henrykironde/deletedret | retriever/lib/load_json.py | 1 | 2818 | import json
from collections import OrderedDict
from retriever.lib.templates import TEMPLATES
from retriever.lib.models import myTables
from retriever.lib.tools import open_fr
def read_json(json_file):
"""Read Json dataset package files
Load each json and get the appropriate encoding for the dataset
Relo... | mit | -5,715,605,298,331,527,000 | 38.690141 | 90 | 0.572037 | false | 4.150221 | false | false | false |
bbc/kamaelia | Code/Python/Kamaelia/Kamaelia/File/MaxSpeedFileReader.py | 6 | 5340 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1)
#
# (1) Kamaelia Contributors are listed in the AUTHORS file and at
# http://www.kamaelia.org/AUTHORS - please extend this file,
# not this notice.
#
# Licensed under the Apache License... | apache-2.0 | -237,693,519,546,439,580 | 33.901961 | 150 | 0.652809 | false | 4.431535 | false | false | false |
metaborg/spoofax-deploy | releng/metaborg/util/git.py | 1 | 7900 | import datetime
import os
import re
import time
from enum import Enum, unique
def LatestDate(repo):
date = 0
for submodule in repo.submodules:
subrepo = submodule.module()
head = subrepo.head
if head.is_detached:
commitDate = head.commit.committed_date
else:
commitDate = head.ref.commi... | apache-2.0 | 4,397,770,428,864,752,600 | 26.915194 | 116 | 0.690506 | false | 3.717647 | false | false | false |
quimaguirre/diana | scripts/old_scripts/classify_drug_combinations.py | 1 | 22397 | import argparse
import cPickle
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import pylab
import scipy
import time
import sys, os, re
from context import diana
import diana.classes.comparison as diana_comparison
import diana.classes.analysis as diana_analysis
def main():
options = par... | mit | 5,589,249,258,767,770,000 | 38.431338 | 243 | 0.605394 | false | 3.503363 | false | false | false |
quru/qis | src/imageserver/template_manager.py | 1 | 10243 | #
# Quru Image Server
#
# Document: template_manager.py
# Date started: 22 Sep 2015
# By: Matt Fozard
# Purpose: Provides a managed interface to the image templates
# Requires:
# Copyright: Quru Ltd (www.quru.com)
# Licence:
#
# This program is free software: you can redistribute it and/or ... | agpl-3.0 | -4,422,943,304,084,045,300 | 41.152263 | 99 | 0.586156 | false | 4.358723 | false | false | false |
macbre/3pc | scripts/sources/ghostery.py | 1 | 1251 | import json
import re
from . import ThirdPCSource
# Generate trackers.json using Ghostery data (issue #1)
class GhosterySource(ThirdPCSource):
SOURCE = 'https://raw.githubusercontent.com/jonpierce/ghostery/master/' + \
'firefox/ghostery-statusbar/ghostery/chrome/content/ghostery-bugs.js'
FILENAM... | bsd-2-clause | 3,909,223,640,555,136,500 | 32.810811 | 82 | 0.529976 | false | 3.564103 | false | false | false |
pyinvoke/invoke | tests/_util.py | 1 | 9860 | import os
import sys
try:
import termios
except ImportError:
# Not available on Windows
termios = None
from contextlib import contextmanager
from invoke.vendor.six import BytesIO, b, wraps
from mock import patch, Mock
from pytest import skip
from pytest_relaxed import trap
from invoke import Program, Ru... | bsd-2-clause | 2,217,632,598,268,301,600 | 28.78852 | 79 | 0.593915 | false | 4.069336 | true | false | false |
berkeley-stat159/project-beta | code/utils/tests/test_regression.py | 4 | 1054 | # import numpy as np
# import os
# import sys
# from numpy.testing import assert_almost_equal, assert_array_equal
# __file__ = os.getcwd()
# sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__),"../utils/")))
# from regression import *
# n_splits = 10 # number of subdivisions of validation data fo... | bsd-3-clause | 5,637,090,201,098,224,000 | 46.954545 | 112 | 0.704934 | false | 3.273292 | false | false | false |
fretboardfreak/space | lib/model/building.py | 1 | 6403 | # Copyright 2015 Curtis Sand
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | 1,765,995,792,540,239,400 | 30.387255 | 79 | 0.601124 | false | 4.042298 | false | false | false |
CarlosCorreiaM16e/bismarck | bismarck_cli/utils/term.py | 1 | 4577 | import inspect
import os
import sys
#----------------------------------------------------------------------
class AnsiPrint( object ):
FG_BLACK = "\033[30m"
FG_BLUE = "\033[34m"
FG_GREEN = "\033[32m"
FG_CYAN = "\033[36m"
FG_RED = "\033[31m"
FG_MAGENTA = "\033[35m"
FG_YELLOW = "\033[33m"
... | gpl-3.0 | -3,800,203,227,403,442,700 | 30.784722 | 75 | 0.392834 | false | 3.80782 | false | false | false |
GPflow/GPflow | doc/source/notebooks/basics/classification.pct.py | 1 | 9219 | # ---
# jupyter:
# jupytext:
# formats: ipynb,.pct.py:percent
# text_representation:
# extension: .py
# format_name: percent
# format_version: '1.3'
# jupytext_version: 1.3.3
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
# %% [markdown]
... | apache-2.0 | 7,272,020,779,500,549,000 | 38.566524 | 341 | 0.694869 | false | 3.019653 | false | false | false |
honzajavorek/tipi | tipi/repl.py | 1 | 2146 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from tipi.compat import unicode
from tipi.html import HTMLFragment
__all__ = ('Replacement', 'replace')
class Replacement(object):
"""Replacement representation."""
skipped_tags = (
'code', 'kbd', 'pre', 'samp', 'script', 'style', 't... | mit | -7,513,477,758,203,943,000 | 28 | 79 | 0.560578 | false | 4.041431 | false | false | false |
abawchen/leetcode | solutions/028_remove_duplicated_from_sorted_array.py | 1 | 1614 | # Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.
# Do not allocate extra space for another array, you must do this in place with constant memory.
# For example,
# Given input array nums = [1,1,2],
# Your function should return length = 2, with the... | mit | -9,218,560,894,084,267,000 | 29.471698 | 162 | 0.566914 | false | 3.215139 | false | false | false |
autodesk-cloud/ochonetes | images/portal/resources/toolset/toolset/commands/info.py | 1 | 2028 | #
# Copyright (c) 2015 Autodesk 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 l... | apache-2.0 | 1,971,570,965,618,026,000 | 30.215385 | 131 | 0.569034 | false | 3.930233 | false | false | false |
fosstp/fosstp | alembic/versions/e32bf2e2b443_init.py | 1 | 2881 | """init
Revision ID: e32bf2e2b443
Revises:
Create Date: 2016-11-23 14:33:06.308794
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'e32bf2e2b443'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
### commands auto generated by Ale... | mit | 6,698,585,677,987,855,000 | 34.567901 | 97 | 0.636932 | false | 3.373536 | false | false | false |
BetaRavener/micropython-hw-lib | PCF8574/pcf8574.py | 1 | 1583 | # TODO: Implement input interupts if needed
class PCF8574:
def __init__(self, i2c, address):
self._i2c = i2c
self._address = address
self._input = 0 # Buffers the result of read in memory
self._input_mask = 0 # Mask specifying which pins are set as input
self._output = 0 #... | mit | -60,218,181,321,789,170 | 28.867925 | 87 | 0.557802 | false | 3.630734 | false | false | false |
cloudbau/glance | glance/db/simple/api.py | 1 | 25713 | # Copyright 2012 OpenStack, Foundation
# Copyright 2013 IBM Corp.
# 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/LI... | apache-2.0 | -2,055,230,222,026,911,700 | 28.691686 | 79 | 0.568934 | false | 4.042925 | false | false | false |
ThreeSixes/airSuck | faaIngest.py | 1 | 16742 | #!/usr/bin/python
"""
faaIngest by ThreeSixes (https://github.com/ThreeSixes)
This project is licensed under GPLv3. See COPYING for dtails.
This file is part of the airSuck project (https://github.com/ThreeSixes/airSUck).
"""
import config as config
import csv
import traceback
import datetime
import pymongo
import z... | gpl-3.0 | 8,160,541,461,397,076,000 | 31.571984 | 122 | 0.369191 | false | 5.575092 | true | false | false |
terkkila/cgml | test/test_optimizers.py | 1 | 2318 |
import theano
import theano.tensor as T
import cgml.types
from cgml.optimizers import Momentum,AdaDelta
from cgml.graph import ComputationalGraph
from cgml.layers.base import _make_shared
import numpy as np
from nose.tools import assert_true,assert_equals,assert_almost_equals
def test_momentum():
schema = {'d... | apache-2.0 | 3,047,407,276,439,846,000 | 24.195652 | 69 | 0.477998 | false | 3.604977 | false | false | false |
electronicvisions/brick | source/waf/modules.py | 2 | 1179 | import os, subprocess, time, re
from waflib.Configure import conf
def configure(conf):
conf.start_msg('Checking for program module')
# this does not work, since module is exported as a function on valgol:
# conf.find_program('module')
# Therfore:
if os.system('source /usr/local/Modules/current/init/bash && module... | bsd-3-clause | -4,127,682,612,295,093,000 | 28.475 | 150 | 0.682782 | false | 3 | false | false | false |
baali/Tweet_De_Feed | feeds/migrations/0003_auto_20170205_1207.py | 2 | 1049 | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2017-02-05 12:07
from __future__ import unicode_literals
import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('feeds', '0002_urlshared_cleaned_text'),
]
... | gpl-3.0 | 7,523,856,348,130,655,000 | 28.138889 | 77 | 0.584366 | false | 4.246964 | false | false | false |
hds-lab/textvisdrg | msgvis/apps/enhance/migrations/0003_auto_20150303_2224.py | 1 | 1276 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('enhance', '0002_auto_20150303_2223'),
]
operations = [
migrations.RenameField(
model_name='messagetopic',
... | mit | 7,324,922,098,762,494,000 | 28 | 77 | 0.547022 | false | 4.4 | false | false | false |
geotagx/pybossa | pybossa/auth/webhook.py | 1 | 1831 | # -*- coding: utf8 -*-
# This file is part of PyBossa.
#
# Copyright (C) 2015 SF Isle of Man Limited
#
# PyBossa is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at... | agpl-3.0 | 6,591,285,263,620,765,000 | 33.54717 | 77 | 0.678318 | false | 3.854737 | false | false | false |
nanolearning/edx-platform | common/test/acceptance/tests/test_studio_general.py | 2 | 5023 | """
Acceptance tests for Studio.
"""
from bok_choy.web_app_test import WebAppTest
from ..pages.studio.asset_index import AssetIndexPage
from ..pages.studio.auto_auth import AutoAuthPage
from ..pages.studio.checklists import ChecklistsPage
from ..pages.studio.course_import import ImportPage
from ..pages.studio.course_i... | agpl-3.0 | -2,325,661,804,641,440,000 | 32.939189 | 111 | 0.637667 | false | 4.274894 | true | false | false |
portnov/sverchok | nodes/analyzer/area.py | 1 | 3597 | # ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distrib... | gpl-3.0 | -4,636,814,415,671,273,000 | 28.008065 | 78 | 0.593828 | false | 3.393396 | false | false | false |
majk1/shellrc | utils/unicode.py | 1 | 3190 | #!/usr/bin/env python
#
# === Search for unicode symbol ===
#
# MIT License
# Copyright (c) 2016 Attila Majoros
#
# Source: https://github.com/majk1/shellrc/blob/master/utils/unicode.py
#
import sys
import os.path
import re
try:
from urllib2 import urlopen
except ImportError:
from urllib.request import urlope... | mit | -8,347,624,188,629,027,000 | 32.93617 | 111 | 0.578683 | false | 3.40812 | false | false | false |
miyyer/qb | validate_annotations.py | 2 | 1075 | from qanta import qlogging
from qanta.ingestion.answer_mapping import read_wiki_titles
from qanta.ingestion.annotated_mapping import PageAssigner
log = qlogging.get("validate_annotations")
def normalize(title):
return title.replace(" ", "_")
def check_page(page, titles):
n_page = normalize(page)
if n_... | mit | 7,737,588,136,300,409,000 | 25.219512 | 59 | 0.666047 | false | 3.681507 | false | false | false |
picklepete/pyicloud | pyicloud/utils.py | 1 | 1910 | """Utils."""
import getpass
import keyring
from sys import stdout
from .exceptions import PyiCloudNoStoredPasswordAvailableException
KEYRING_SYSTEM = "pyicloud://icloud-password"
def get_password(username, interactive=stdout.isatty()):
"""Get the password from a username."""
try:
return get_passwor... | mit | -5,112,024,701,855,479,000 | 28.384615 | 78 | 0.683246 | false | 4.143167 | false | false | false |
mixman/django-js-utils | django_js_utils/utils.py | 1 | 3286 | import sys
import re
import types
import fnmatch
from collections import OrderedDict
from django.conf import settings
from django.core.urlresolvers import RegexURLPattern, RegexURLResolver
from django_js_utils import conf_jsutils
import six
class PatternsParser(object):
def __init__(self):
self._patter... | mit | 171,514,094,672,612,260 | 37.209302 | 119 | 0.584297 | false | 4.261997 | false | false | false |
dfm/twitterick | webapp.py | 1 | 5990 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import os
import tornado.web
import tornado.ioloop
import tornado.httpserver
from tornado.escape import json_encode
from tornado.options import define, options, parse_command_line
from twitterick import emoji
from twitterick.limerick... | mit | -3,771,856,059,757,141,000 | 27.660287 | 79 | 0.564608 | false | 3.470452 | false | false | false |
jnewland/ha-config | custom_components/bhyve/pybhyve/client.py | 1 | 6186 | """Define an object to interact with the REST API."""
import logging
import re
import time
from asyncio import ensure_future
from .const import (
API_HOST,
API_POLL_PERIOD,
DEVICES_PATH,
DEVICE_HISTORY_PATH,
TIMER_PROGRAMS_PATH,
LOGIN_PATH,
WS_HOST,
)
from .errors import RequestError
from... | mit | 2,308,968,507,594,210,000 | 31.051813 | 85 | 0.571613 | false | 4.024723 | false | false | false |
cambridgehackers/connectal | scripts/discover_tcp.py | 2 | 7174 | #!/usr/bin/env python
# Copyright (c) 2013-2015 Quanta Research Cambridge, Inc.
# 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 right... | mit | -3,697,450,608,753,739,000 | 34.514851 | 90 | 0.583914 | false | 3.730629 | false | false | false |
Trigition/Village | DataAggregator/AQS_Aggregator.py | 1 | 1036 | #!/usr/bin/env python
import requests
import pandas as pd
from FIPS_Reference import FIPS_Reference
# Load American POSTAL data
columns = ["country", "better_fips", "name", "state", "state_code", "county", "county_code", "subdivision",\
"subdivision_code", "latitude", "longitude", "accuracy"]
#data = pd.read_... | apache-2.0 | 8,320,193,534,384,223,000 | 37.37037 | 108 | 0.649614 | false | 2.943182 | false | false | false |
mesheven/pyOCD | pyocd/test/test_regcache.py | 1 | 8907 | """
mbed CMSIS-DAP debugger
Copyright (c) 2016 ARM Limited
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law o... | apache-2.0 | -298,325,491,646,307,200 | 41.414286 | 105 | 0.639497 | false | 3.338456 | true | false | false |
ta2-1/pootle | tests/pootle_app/views.py | 1 | 2311 | # -*- 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.
import pytest
from django.utils.translation... | gpl-3.0 | -6,459,012,648,656,102,000 | 34.015152 | 77 | 0.667676 | false | 3.99827 | false | false | false |
tiagoprn/experiments | micro/stack_trace_capturing_for_exception.py | 1 | 1729 | import inspect
import sys
import traceback
'''
This print the full stack trace from the current point in the code
(from where "stack = inspect.stack()", below, is called).
It can be useful, e.g., to understand code that makes many calls
or to get information for debugging exceptions.
'''
# reference:
# https://gist.... | mit | 3,846,056,117,046,317,600 | 25.19697 | 85 | 0.631579 | false | 3.647679 | false | false | false |
pwdyson/inflect.py | tests/test_inflections.py | 2 | 8786 | import os
import io
import six
from nose.tools import eq_, assert_not_equal, raises
import inflect
def is_eq(p, a, b):
return (
p.compare(a, b)
or p.plnounequal(a, b)
or p.plverbequal(a, b)
or p.pladjequal(a, b)
)
def test_many():
p = inflect.engine()
data = get_d... | agpl-3.0 | -575,220,977,912,059,460 | 31.18315 | 86 | 0.526519 | false | 2.854451 | true | false | false |
hirofumi0810/asr_preprocessing | timit/path.py | 1 | 5615 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
"""Prepare for making dataset (TIMIT corpus)."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from os.path import join, basename, splitext
from glob import glob
class Path(object):
"""Prepare for maki... | mit | 1,845,563,186,827,868,700 | 34.314465 | 93 | 0.495993 | false | 3.8966 | true | false | false |
clintonblackmore/enchanting2 | event_loop.py | 1 | 7932 | """The event loop triggers and runs all the scripts, as appropriate"""
import gevent
import gevent.pool
try:
from gevent.lock import BoundedSemaphore
except:
print "Enchanting2 requires gevent v1.0 or newer"
raise
import factory
import server
import script
port = 8000
def is_trigger_key(top_block, med... | agpl-3.0 | 172,016,229,269,100,580 | 36.415094 | 81 | 0.611321 | false | 4.078149 | false | false | false |
paulproteus/oppia-test-3 | controllers/editor.py | 1 | 16511 | # Copyright 2012 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 ... | apache-2.0 | 7,582,681,898,049,399,000 | 36.020179 | 88 | 0.589849 | false | 4.442023 | false | false | false |
trondkr/model2roms | IOBry.py | 1 | 45054 | import os
import time
from datetime import datetime
from netCDF4 import Dataset
_author_ = 'Trond Kristiansen'
_email_ = 'me@trondkristiansen.com'
_created_ = datetime(2009, 3, 2)
_modified_ = datetime(2014, 4, 7)
_version_ = "0.1.0"
_status_ = "Development"
def help():
"""
This function generates a BRY fil... | mit | -7,422,311,014,768,623,000 | 49.966063 | 114 | 0.599614 | false | 3.129185 | false | false | false |
yashp241195/OpenCVTutorial | BasicFilters.py | 1 | 8245 | import cv2 as CvObject
import numpy as np
# PART 1 - Introduction
# Topics
# >> Read frames from camera
# >> Baic Filters (Smoothening,blurring)
# >> Morphological Transformation
# >> Edge Detection
Selext_WebCam = 0
Select_External_Camera = 1
CamTitle = "MyCam"
# Store the captured video inside cap va... | apache-2.0 | -7,397,239,752,318,426,000 | 26.529412 | 122 | 0.670224 | false | 3.487733 | false | false | false |
netscaler/neutron | neutron/db/migration/cli.py | 9 | 4487 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2012 New Dream Network, LLC (DreamHost)
#
# 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/li... | apache-2.0 | -1,401,840,322,780,305,200 | 30.377622 | 78 | 0.636728 | false | 3.881488 | true | false | false |
TheTrueTom/HP1100SeriesConverter | src/converter.py | 1 | 2445 | # -*- coding: utf-8 -*-
import struct
import csv
import os
import tkinter as tk
from decrypter import *
from tkinter.filedialog import askdirectory
ext = "ch"
class Application(tk.Frame):
def __init__(self, master=None):
tk.Frame.__init__(self, master)
self.pack()
self.createWidgets()
def createWidgets(sel... | mit | 7,359,510,089,815,305,000 | 28.107143 | 134 | 0.721881 | false | 3.102792 | true | false | false |
xuerenlv/PaperWork | my_version/Main_Run.py | 1 | 17033 | # -*- coding: utf-8 -*-
'''
Created on 2015-08-21
@author: xhj
'''
from craw_page_parse import crawl_real_time_with_keyword, \
crawl_set_time_with_keyword, crawl_set_time_with_keyword_and_nickname
# from craw_page_parse import crawl_set_time_with_only_keyword
import os
import logging.config
import random
import ... | apache-2.0 | -6,991,902,831,607,894,000 | 36.545882 | 174 | 0.628878 | false | 2.700457 | false | false | false |
fabriziocosta/pyMotif | dataset_generator.py | 1 | 2970 | """Dataset generation module."""
import random
import numpy as np
def random_string(length, alphabet_list):
"""Generate a random string."""
rand_str = ''.join(random.choice(alphabet_list) for i in range(length))
return rand_str
def perturb(seed, alphabet_list, p=0.5):
"""Randomize a string."""
s... | mit | -1,912,691,036,445,324,300 | 29.618557 | 92 | 0.601684 | false | 3.253012 | false | false | false |
knowmetools/km-api | km_api/know_me/tests/views/test_accepted_accessor_list_view.py | 1 | 1214 | from unittest import mock
from know_me import serializers, views
@mock.patch("know_me.views.DRYPermissions.has_permission", autospec=True)
def test_check_permissions(mock_dry_permissions):
"""
The view should check for model permissions.
"""
view = views.AcceptedAccessorListView()
view.check_per... | apache-2.0 | 8,413,144,891,487,430,000 | 27.232558 | 78 | 0.710049 | false | 3.712538 | false | false | false |
ksurya/SciPyCentral | scipy_central/comments/views/moderation.py | 4 | 2181 | import simplejson
from django.conf import settings
from django.http import Http404, HttpResponse
from django.shortcuts import get_object_or_404
from django.contrib import comments
from django.contrib.comments.views.moderation import perform_flag, perform_delete
from django.views.decorators.csrf import csrf_protect
@cs... | bsd-3-clause | -7,130,026,666,514,306,000 | 34.754098 | 99 | 0.681339 | false | 4.178161 | false | false | false |
jyejare/robottelo | tests/foreman/cli/test_product.py | 1 | 12864 | # -*- encoding: utf-8 -*-
"""Test class for Product CLI
:Requirement: Product
:CaseAutomation: Automated
:CaseLevel: Component
:CaseComponent: ContentManagement
:TestType: Functional
:CaseImportance: High
:Upstream: No
"""
from fauxfactory import gen_alphanumeric
from fauxfactory import gen_string
from robottel... | gpl-3.0 | -2,658,068,404,343,697,400 | 40.496774 | 98 | 0.593284 | false | 3.749344 | true | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.