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
julio-vaz/iolanda
main.py
1
1453
import subprocess import os import shutil from urllib.parse import urlparse import feedparser import requests import newspaper from ffmpy import FFmpeg feed = feedparser.parse('http://feeds.feedburner.com/iolandachannel') chapters = [] for entry in feed['entries']: title = entry['title'] print(f'Parsing: {tit...
apache-2.0
2,849,347,827,935,572,000
28.04
94
0.653581
false
3.36891
false
false
false
djphan/c410-Repo
c410-A4CanvasAJAX/server.py
1
3497
#!/usr/bin/env python # coding: utf-8 # Copyright 2013 Abram Hindle # # 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 b...
gpl-3.0
-8,542,675,591,337,391,000
28.635593
104
0.645696
false
3.627593
false
false
false
redhat-openstack/rdo-infra
ci-scripts/dlrnapi_promoter/qcow_client.py
1
10253
""" This file contains classes and functionto interact with qcow images servers """ import copy import logging import os import paramiko from common import PromotionError class QcowConnectionClient(object): """ Proxy class for client connection """ _log = logging.getLogger("promoter") def __ini...
apache-2.0
5,680,711,239,510,294,000
37.115242
80
0.558276
false
4.436608
true
false
false
execunix/vinos
xsrc/external/mit/MesaLib7/dist/src/glsl/builtins/tools/generate_builtins.py
4
8415
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import with_statement import re import sys from glob import glob from os import path from subprocess import Popen, PIPE from sys import argv # Local module: generator for texture lookup builtins from texture_builtins import generate_texture_functions builtin...
apache-2.0
990,475,953,581,760,400
31.237548
88
0.624673
false
3.598802
false
false
false
joshuamorton/coursesat.tech
app.py
1
1337
from flask import Flask, jsonify import pymongo import json app = Flask(__name__) client = pymongo.MongoClient() db = client.grouch courses = db.courses @app.route('/') def index(): return 'test' @app.route('/spring2016/') def year(): schools = courses.distinct('school') response = jsonify({'schools':...
mit
-256,736,483,378,657,400
21.283333
77
0.559461
false
3.967359
false
false
false
usajusaj/sga_utils
sga/toolbox/table_norm.py
1
3016
''' MIT License Copyright (c) 2017 Matej Usaj Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, di...
mit
-7,065,601,722,802,952,000
32.88764
112
0.706233
false
3.482679
false
false
false
relayr/python-sdk
demos/noise.py
1
3222
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Example script accessing data from a WunderBar microphone via MQTT. This will connect to a microphone, read its noise level and send an email notification to some receiver if that noise level exceeds a certain threshold. """ import sys import json import time import ...
mit
-8,249,296,945,999,933,000
29.685714
82
0.639044
false
3.768421
false
false
false
EricMuller/mywebmarks-backend
requirements/twisted/Twisted-17.1.0/docs/core/howto/tutorial/listings/finger/finger22.py
2
8392
# Do everything properly, and componentize from twisted.application import internet, service, strports from twisted.internet import protocol, reactor, defer, endpoints from twisted.words.protocols import irc from twisted.protocols import basic from twisted.python import components from twisted.web import resource, serv...
mit
-8,842,067,437,010,118,000
25.225
78
0.626549
false
4.075765
false
false
false
eayunstack/neutron
neutron/services/logapi/drivers/manager.py
1
4600
# Copyright (c) 2017 Fujitsu Limited # 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 requi...
apache-2.0
-6,518,660,458,877,669,000
34.658915
78
0.626087
false
4.189435
false
false
false
fujy/ROS-Project
src/rbx2/rbx2_diagnostics/nodes/monitor_dynamixels.py
1
5378
#!/usr/bin/env python """ monitor_dynamixels.py - Version 0.1 2013-07-07 Monitor the /diagnostics topic for Dynamixel messages and disable a servo if we receive an ERROR status message (e.g. overheating). Created for the Pi Robot Project: http://www.pirobot.org Copyright (c) 2014 Patrick Goebel. All...
mit
8,523,361,733,486,667,000
37.421429
121
0.587207
false
4.344103
false
false
false
liweitianux/97dev
97suifangqa/apps/info/models.py
1
4844
# -*- coding: utf-8 -*- from django.db import models from django.contrib import admin from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic # Create your models here. class KeyWord(models.Model): content = ...
bsd-2-clause
472,562,872,915,401,660
37.386555
139
0.644046
false
3.14384
false
false
false
ShadowApex/Tuxemon
tuxemon/core/states/persistance/save_menu.py
2
3498
from __future__ import division import logging import os import pygame from core import prepare from core.tools import open_dialog from core.components import save from core.components.menu import PopUpMenu from core.components.menu.interface import MenuItem from core.components.ui import text # Create a logger for...
gpl-3.0
-4,179,556,928,142,119,400
35.4375
98
0.595769
false
3.76129
false
false
false
xiaoyongaa/ALL
ATM/src/user.py
1
15988
import os import json import datetime import logging import sys d2=os.getcwd() d2=d2.replace("bin","") d2=d2.replace("\\","/") sys.path.append(d2) d2=d2+"db/admin/" ################## d3=os.getcwd() d3=d3.replace("bin","") d3=d3.replace("\\","/") sys.path.append(d3) d3=d3+"db/user/" time=datetime.date.today() time=str(...
apache-2.0
5,816,718,957,689,920,000
32.576733
159
0.488204
false
2.69823
false
false
false
pedrolegold/uforge-cli
src/uforgecli/uforgecli.py
1
8700
''' UForgeCLI ''' try: from urllib.parse import urlencode except ImportError: from urllib import urlencode import argparse import getpass import base64 import httplib2 import os import sys import ussclicore.utils.generics_utils from ussclicore.utils import printer from ussclicore.cmd import Cmd, Cmd...
apache-2.0
6,297,265,963,414,802,000
38.545455
198
0.564483
false
4.300544
false
false
false
fenceFoil/canopto
NarrowWavyLines01.py
1
1459
#!/bin/python3 from Canopto import Canopto import pygame from pygame import * from pygame.locals import * import time from random import randint from colorsys import * import sys display_size = (8, 8) cans = Canopto (display_size[0], display_size[1], True, True) # Create an image, wider than the display, with random...
bsd-3-clause
2,710,826,725,089,136,000
27.627451
144
0.699109
false
2.989754
false
false
false
jiafengwu0301/App_BackEnd
api/serializers.py
1
3530
from rest_framework import serializers from django.contrib.auth.models import User from .models import Account from rest_framework.exceptions import ValidationError class AccountCreateSerializer(serializers.ModelSerializer): username = serializers.CharField(source='user.username') password = serializers.Cha...
apache-2.0
2,381,743,067,424,387,000
27.467742
128
0.609632
false
4.554839
false
false
false
googleapis/releasetool
tests/commands/tag/test_tag_java.py
1
1502
# Copyright 2019 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
1,289,058,786,634,031,900
34.52381
90
0.736595
false
3.352809
false
false
false
anythingrandom/eclcli
eclcli/dh/dhclient/common/cliutils.py
1
7010
from __future__ import print_function import getpass import inspect import os import sys import textwrap from oslo_utils import encodeutils from oslo_utils import strutils import prettytable import six from six import moves from ..common._i18n import _ class MissingArgs(Exception): """Supplied arguments are no...
apache-2.0
-5,111,194,649,591,776,000
27.495935
79
0.593723
false
3.992027
false
false
false
kiwiheretic/logos-v2
feed/migrations/0005_auto_20160418_0325.py
1
1833
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('feed', '0004_auto_20160418_0027'), ] ...
apache-2.0
-2,000,784,673,389,948,000
29.55
114
0.515548
false
4.640506
false
false
false
redapesolutions/django-pin-auth
tests/test_models.py
1
4150
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_django-pin-auth ------------ Tests for `django-pin-auth` models module. """ import mock import datetime from django.test import TestCase from django.apps import apps from django.contrib.auth.models import User from faker import Faker from django_pin_auth import...
mit
850,674,357,809,966,200
37.794393
149
0.661928
false
3.821363
true
false
false
Azure/azure-sdk-for-python
sdk/synapse/azure-synapse/azure/synapse/accesscontrol/aio/operations_async/_access_control_operations_async.py
1
20087
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
mit
-6,482,964,127,619,796,000
45.605568
144
0.642256
false
4.191778
true
false
false
Taluu/vdebug
tests/test_breakpoint_breakpoint.py
3
7373
import unittest import vdebug.breakpoint import vdebug.error import vdebug.util import base64 try: from unittest.mock import Mock except ImportError: from mock import Mock class LineBreakpointTest(unittest.TestCase): def test_get_file(self): """ Test that the line number is retrievable.""" ...
mit
2,124,813,365,746,041,000
38.010582
97
0.631765
false
4.028962
true
false
false
ancafarcas/superdesk-core
superdesk/vocabularies/vocabularies.py
1
6887
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import logg...
agpl-3.0
-1,100,923,193,334,934,500
31.952153
110
0.577029
false
4.238154
true
false
false
hasgeek/funnel
funnel/views/contact.py
1
6404
from __future__ import annotations from datetime import datetime, timedelta from io import StringIO from typing import Dict, Optional import csv from sqlalchemy.exc import IntegrityError from flask import ( Response, current_app, jsonify, make_response, render_template, request, ) from basef...
agpl-3.0
5,105,638,350,269,869,000
33.06383
88
0.570737
false
4.472067
false
false
false
timothyb89/stackviz
stackviz/settings.py
2
3482
# Copyright 2015 Hewlett-Packard Development Company, L.P. # # 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,850,671,426,330,975,000
26.634921
79
0.742102
false
3.427165
false
false
false
b3j0f/annotation
b3j0f/annotation/async.py
1
8481
# -*- coding: utf-8 -*- # -------------------------------------------------------------------- # The MIT License (MIT) # # Copyright (c) 2015 Jonathan Labéjof <jonathan.labejof@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation fi...
mit
-6,628,463,442,555,860,000
26.983498
79
0.613162
false
4.323814
false
false
false
bernard357/plumbery
plumbery/polishers/prepare.py
1
26568
# 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
-8,472,979,137,495,152,000
31.8
82
0.503312
false
4.95302
false
false
false
vfine/webplatform
pmModules/joblfn.py
1
5460
""" Show he list of Panda Jobs with LFN or versa verse LFNs by Panda IDs </td><td>$Rev$""" # $Id: joblfn.py 19632 2014-07-06 07:30:10Z jschovan $ from pmUtils.pmState import pmstate from pmCore.pmModule import pmRoles from pmTaskBuffer.pmTaskBuffer import pmtaskbuffer as pmt import pmUtils.pmUtils as utils from pmC...
lgpl-3.0
-1,811,687,502,093,652,000
61.045455
195
0.575275
false
3.554688
false
false
false
LokiNetworks/empower-runtime
empower/persistence/persistence.py
1
7560
#!/usr/bin/env python3 # # Copyright (c) 2016 Roberto Riggio # # 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 applicabl...
apache-2.0
5,023,260,074,562,165,000
23.387097
78
0.599339
false
3.882897
false
false
false
kartta-labs/reservoir
third_party/3dmr/modelrepository/settings.py
1
3669
""" Django settings for modelrepository project. Generated by 'django-admin startproject' using Django 1.11.2. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ i...
apache-2.0
-6,878,966,147,424,092,000
25.781022
91
0.681112
false
3.477725
false
false
false
jianajavier/pnc-cli
pnc_cli/productversions.py
1
4985
from argh import arg from six import iteritems import logging from pnc_cli import swagger_client from pnc_cli.swagger_client.apis.productversions_api import ProductversionsApi from pnc_cli.swagger_client.apis.products_api import ProductsApi from pnc_cli import utils versions_api = ProductversionsApi(utils.get_api_cli...
apache-2.0
1,279,193,986,023,931,000
39.201613
178
0.677031
false
3.852396
false
false
false
ltiao/basketball-intelligence
bball_intel/bball_intel/settings/base.py
1
2103
""" Django settings for bball_intel project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: BASE_DIR.child(...) from u...
mit
5,895,827,493,710,168,000
23.741176
71
0.731336
false
3.260465
false
false
false
trammell/bincfi
glookup_policy/extract_code.py
2
1418
#!/usr/bin/python from __future__ import with_statement from struct import * #from __future__ import with_statement import re import os import sys def get_section_info(binname, secname, info): pattern = re.compile(r"\s*\[\s*(?P<num>[\d]{1,2})\]\s*" "(?P<name>[\S]+)\s*" "(?P<type>[\S]+)\s*" "(?P<addr>[\S]...
gpl-2.0
6,978,572,787,141,813,000
23.877193
64
0.59732
false
2.500882
false
false
false
byteweaver/django-skrill
skrill/views.py
1
1731
from django import http from django.views.generic.base import View from skrill.models import PaymentRequest, StatusReport class StatusReportView(View): def post(self, request, *args, **kwargs): payment_request = PaymentRequest.objects.get(pk=request.POST['transaction_id']) report = StatusReport()...
bsd-3-clause
-1,467,092,703,406,649,300
45.783784
87
0.659734
false
3.636555
false
false
false
mjfarmer/scada_py
env/lib/python2.7/site-packages/twisted/conch/ssh/keys.py
3
43907
# -*- test-case-name: twisted.conch.test.test_keys -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Handling of RSA and DSA keys. """ from __future__ import absolute_import, division import base64 import itertools import warnings from hashlib import md5 from cryptography.exceptions i...
gpl-3.0
-1,670,624,420,698,330,600
33.195483
79
0.508279
false
4.011237
false
false
false
geocryology/GeoCryoLabPy
equipment/Agilent4395A.py
1
6615
""" Python class representing the Agilent4395A Frequency Response Analyzer """ import cmath import datetime import sys import visa from draw import draw # Controller class for the Agilent 4395A Frequency Response Analyzer # - operates over GPIB using a National Instruments USB-GPIB cable # # GPIB uses ...
gpl-3.0
-4,691,533,418,516,130,000
29.660287
133
0.562963
false
3.614754
false
false
false
jhajek/euca2ools
euca2ools/commands/iam/getinstanceprofile.py
5
2211
# Copyright 2014-2015 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions ...
bsd-2-clause
-2,087,599,757,317,781,800
47.065217
77
0.720036
false
4.439759
false
false
false
fdroidtravis/fdroidserver
fdroidserver/rewritemeta.py
1
3253
#!/usr/bin/env python3 # # rewritemeta.py - part of the FDroid server tools # This cleans up the original .yml metadata file format. # Copyright (C) 2010-12, Ciaran Gultnieks, ciaran@ciarang.com # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Publi...
agpl-3.0
-6,551,851,765,028,590,000
30.892157
91
0.639102
false
3.991411
false
false
false
cpsaltis/pythogram-core
src/gramcore/data/arrays.py
1
6962
"""Imports/exports arrays and generates artificial ones. The artificial data are DTMs and DSMs are basically numpy arrays with height values. All sizes and 2D coordinates refer to array elements, with (0==row, 0==column) being the top left cell. """ import numpy from scipy.ndimage import measurements def asarray(pa...
mit
-8,977,862,224,966,665,000
31.995261
78
0.652973
false
4.329602
false
false
false
CPLUG/cplug.org-backend
index/migrations/0001_initial.py
1
1643
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-09-14 05:42 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Event'...
mit
-5,968,599,745,039,652,000
41.128205
114
0.576993
false
4.335092
false
false
false
minghuascode/pyj
examples/controls/ControlDemo.py
8
5722
""" ControlDemo Example Bill Winder <wgwinder@gmail.com> added HorizontalSlider demo. Bill Winder <wgwinder@gmail.com> added AreaSlider demo. """ import pyjd # dummy in pyjs from pyjamas.ui.RootPanel import RootPanel from pyjamas.ui.CaptionPanel import CaptionPanel from pyjamas.ui.Label import Label from pyjam...
apache-2.0
6,881,778,421,363,607,000
29.92973
79
0.632296
false
3.467879
false
false
false
matk86/pymatgen
pymatgen/command_line/tests/test_critic2_caller.py
6
3331
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import division, unicode_literals import unittest from pymatgen import Structure from pymatgen.command_line.critic2_caller import * from monty.os.path import which __author__ = "Matthew Horton...
mit
1,198,286,598,272,625,000
36.011111
97
0.558691
false
3.233981
true
false
false
artemp/MapQuest-Render-Stack
py/tile_worker/worker_opts.py
1
2608
#!/usr/bin/python #------------------------------------------------------------------------------ # # Process tile worker arguments from command line # # Author: john.novak@mapquest.com # # Copyright 2010-1 Mapquest, Inc. All Rights reserved. # import os import sys import getopt class worker_opts: def __init__( s...
lgpl-2.1
1,195,247,672,633,795,000
27.358696
125
0.415261
false
4.094192
false
false
false
sergiohgz/incubator-airflow
tests/contrib/operators/test_ecs_operator.py
7
8022
# -*- coding: utf-8 -*- # # 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 #...
apache-2.0
4,431,884,348,846,554,600
35.298643
120
0.592122
false
3.727695
true
false
false
ActiveState/code
recipes/Python/580698_Reversi_Othello/recipe-580698.py
1
12673
# Reversi/Othello Board Game using Minimax and Alpha-Beta Pruning # https://en.wikipedia.org/wiki/Reversi # https://en.wikipedia.org/wiki/Computer_Othello # https://en.wikipedia.org/wiki/Minimax # https://en.wikipedia.org/wiki/Alpha%E2%80%93beta_pruning # https://en.wikipedia.org/wiki/Negamax # https://en.wikipedia.org...
mit
-6,430,002,800,367,195,000
37.874233
97
0.527184
false
3.603355
false
false
false
stephane-martin/salt-debian-packaging
salt-2016.3.3/tests/unit/states/hg_test.py
2
1920
# -*- coding: utf-8 -*- ''' :codeauthor: :email:`Rahul Handay <rahulha@saltstack.com>` ''' # Import Python libs from __future__ import absolute_import import os # Import Salt Libs from salt.states import hg # Import Salt Testing Libs from salttesting import skipIf, TestCase from salttesting.helpers import ensure_...
apache-2.0
-7,226,903,616,466,534,000
29.967742
79
0.570833
false
3.847695
true
false
false
Habbie/weakforced
regression-tests/test_helper.py
1
3021
from datetime import datetime import os import requests import urlparse import unittest import json from subprocess import call, check_output DAEMON = os.environ.get('DAEMON', 'authoritative') class ApiTestCase(unittest.TestCase): def setUp(self): # TODO: config self.server_address = '127.0.0.1'...
gpl-2.0
5,715,002,648,871,436,000
34.127907
163
0.594505
false
3.814394
false
false
false
UTSA-ICS/python-openstackclient-SID
tools/install_venv.py
5
2151
# Copyright 2013 OpenStack, LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
apache-2.0
-4,115,733,392,282,553,300
31.590909
84
0.701999
false
3.968635
false
false
false
mvwicky/ScotusScraper
scotus_parser.py
1
6953
#!/cygdrive/c/Anaconda3/python.exe import os import sys import multiprocessing as mp import requests from bs4 import BeautifulSoup, SoupStrainer from PyQt4.QtCore import * from PyQt4.QtGui import * from logger import Logger class ScotusParser(QThread): def __init__(self, name='Parser', log_dir='.', save_dir=...
mit
1,598,903,029,727,719,700
37.843575
79
0.477923
false
4.114201
false
false
false
nukui-s/sscomdetection
TestUpdate.py
1
1512
# Author : Hoang NT # Date : 2016-03-08 # # Simple test case for Updater.py import tensorflow as tf import numpy as np import Update as ud # Made-up matrix for testing # A is 5-by-5 adj matrix # O is 5-by-5 prior knowledge matrix # D is 5-by-5 diagonal matrix of O # k = 4 - Suppose we have 4 clustering # lambda = 0.5...
apache-2.0
-7,122,712,059,874,937,000
26.490909
80
0.632275
false
2.805195
false
false
false
amirouche/pythonium
pythonium/main.py
1
1579
#!/usr/bin/env python3 """Usage: pythonium [-h]|[-v]|[-r]|[FILE] Options: -h --help show this -v --version show version -r --runtime output pythonium runtime (exclusive option) You will need to use the library generated with -r or --runtime option to run the code. """ import os import sys from as...
lgpl-2.1
-2,693,304,183,785,684,500
24.467742
68
0.59278
false
3.81401
false
false
false
swalladge/snsrv
old/db_frontend.py
1
5710
# high level db access # must define lowerlevel db something... import datetime import uuid import copy import re class Database(): def __init__(self, thedatabase): self.database = thedatabase def get_user(self, username): userdata = self.database.get_user(username) if not userdata: ...
gpl-3.0
-7,271,441,237,214,232,000
30.899441
139
0.571979
false
3.957034
false
false
false
TrentonSarnowski/GenomeBusters
polymorphs-master/setup.py
1
1030
#!/bin/env python3 import json import os from pprint import pprint from requests import get import subprocess print("starting...") def download_latest_release(): print("downloading prodigal...") req_content = json.loads(get("https://api.github.com/repos/hyattpd/Prodigal/releases/latest").content.decode('utf...
mit
-9,127,763,450,498,961,000
28.428571
122
0.651456
false
3.468013
false
false
false
MalloyDelacroix/DownloaderForReddit
DownloaderForReddit/extractors/comment_extractor.py
1
2178
import os from .self_post_extractor import SelfPostExtractor from ..core.errors import Error from ..utils import system_util class CommentExtractor(SelfPostExtractor): def __init__(self, post, **kwargs): super().__init__(post, **kwargs) def extract_content(self): try: ext = self...
gpl-3.0
2,644,559,677,840,326,000
41.705882
117
0.581267
false
3.875445
false
false
false
vathpela/blivet
blivet/mounts.py
2
4059
# mounts.py # Active mountpoints cache. # # Copyright (C) 2015 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is...
gpl-2.0
8,593,153,931,211,163,000
34.295652
104
0.631683
false
4.095863
false
false
false
masneyb/cavedbmanager
cavedb/docgen_gis_maps.py
1
2782
# SPDX-License-Identifier: Apache-2.0 import os from django.conf import settings import cavedb.docgen_gis_common import cavedb.utils class GisMaps(cavedb.docgen_gis_common.GisCommon): def __init__(self, bulletin, gis_x_buffer=0.005, gis_y_buffer=0.005): cavedb.docgen_gis_common.GisCommon.__init__(self, gi...
apache-2.0
-8,005,233,630,944,951,000
32.926829
97
0.59885
false
3.063877
false
false
false
sam-m888/gprime
gprime/lib/family.py
1
27884
# # gPrime - A web-based genealogy program # # Copyright (C) 2000-2007 Donald N. Allingham # Copyright (C) 2010 Michiel D. Nauta # Copyright (C) 2010 Nick Hall # Copyright (C) 2011 Tim G L Lyons # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU G...
gpl-2.0
-2,009,945,109,026,395,400
37.998601
82
0.565486
false
4.342626
false
false
false
chrisdickinson/nappingcat
nappingcat/contrib/auth/backends/jsonauth.py
1
1145
from nappingcat.auth import AuthBackend import os try: import json as simplejson except ImportError: import simplejson SECTION_NAME = 'jsonauth' class JSONAuthBackend(AuthBackend): def __init__(self, *args, **kwargs): super(JSONAuthBackend, self).__init__(*args, **kwargs) settings_dict = d...
bsd-3-clause
-518,137,101,240,385,400
38.482759
94
0.627074
false
3.948276
false
false
false
laplab/carbon
carbon/process.py
1
6603
import shlex from subprocess import Popen, PIPE, TimeoutExpired from queue import Queue, Empty from threading import Thread import psutil import time from utils import Map class Process: """Allows to run processes with limits Attributes: cmd (str): Command to execute input (Optional[str]): I...
mit
5,675,861,900,556,990,000
35.486188
112
0.547933
false
4.630435
false
false
false
danforthcenter/plantcv
plantcv/plantcv/morphology/fill_segments.py
1
3054
# Fill a mask using watershed and skeleton segments import os import cv2 import numpy as np from skimage.segmentation import watershed from plantcv.plantcv import outputs from plantcv.plantcv import params from plantcv.plantcv.visualize import colorize_label_img from plantcv.plantcv._debug import _debug def fill_seg...
mit
46,040,409,376,672,670
37.658228
101
0.579895
false
4.045033
false
false
false
Zerknechterer/pyload
module/plugins/internal/Crypter.py
1
3529
# -*- coding: utf-8 -*- import urlparse from module.plugins.internal.Plugin import Plugin from module.utils import decode, save_path class Crypter(Plugin): __name__ = "Crypter" __type__ = "crypter" __version__ = "0.03" __pattern__ = r'^unmatchable$' __config__ = [("use_subfolder", "bool"...
gpl-3.0
-8,256,083,987,422,104,000
32.609524
146
0.575801
false
4.005675
false
false
false
cloudera/hue
desktop/libs/notebook/src/notebook/consumer.py
2
2022
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
apache-2.0
-3,856,826,571,091,781,000
26.69863
74
0.661227
false
3.956947
false
false
false
RAPD/RAPD
src/launch/launcher_adapters/echo_simple.py
1
3396
""" Simple echo RAPD launcher adapter For use in testing setup """ """ This file is part of RAPD Copyright (C) 2017, Cornell University All rights reserved. RAPD 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 Foun...
agpl-3.0
-115,120,683,335,896,460
24.923664
90
0.676678
false
4.208178
false
false
false
stxent/kmodgen
mod.py
1
6212
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # mod.py # Copyright (C) 2016 xent # Project is distributed under the terms of the GNU General Public License v3.0 import argparse import inspect import json import os import re import sys import numpy from wrlconv import model from wrlconv import vrml_export from wrlc...
gpl-3.0
-6,714,082,840,905,657,000
35.541176
98
0.619929
false
3.887359
false
false
false
lexodistro/blissflixx
lib/player/processpipe.py
2
6422
from Queue import Queue from threading import Thread import subprocess32 as subprocess import os, select, signal, cherrypy, shutil MSG_PROCESS_READY = 1 MSG_PROCESS_HALTED = 2 MSG_PROCESS_FINISHED = 3 MSG_PLAYER_PIPE_STOPPED = 4 TMP_DIR = "/tmp/blissflixx" OUT_FILE = "/tmp/blissflixx/bf.out" def _start_thread(targe...
gpl-2.0
-3,475,898,093,572,110,300
23.7
79
0.622859
false
3.461995
false
false
false
eggmaster/tempest
tempest/api_schema/response/compute/v2_1/quota_classes.py
31
1490
# Copyright 2014 IBM Corporation. # 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...
apache-2.0
-242,331,995,297,467,940
47.064516
78
0.730201
false
3.581731
false
false
false
bentzinir/Buffe
Applications/mgail/mgail.py
1
11459
from ER import ER import tensorflow as tf import common import numpy as np class MGAIL(object): def __init__(self, environment): self.env = environment self.do_keep_prob = tf.placeholder("float", shape=(), name='do_keep_prob') self.forward_model = __import__('forward_model').ForwardMod...
mit
8,101,156,917,626,142,000
54.357488
136
0.516275
false
3.856951
false
false
false
Glutanimate/image-occlusion-2-enhanced
src/image_occlusion_enhanced/nconvert.py
1
10279
# -*- coding: utf-8 -*- # Image Occlusion Enhanced Add-on for Anki # # Copyright (C) 2016-2020 Aristotelis P. <https://glutanimate.com/> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation...
bsd-2-clause
-7,466,364,075,666,562,000
36.790441
83
0.583909
false
3.698813
false
false
false
hmeine/vigra
vigranumpy/examples/eccentricity/eccentricity_transform.py
3
5735
import vigra import numpy import vigra.graphs as vigraph import matplotlib.pyplot as plt import scipy.misc import sys gamma = 0.0001 percentage = 2 f = "figure_1.png" ## img: image segment with 0: inside, 1: outside ## distFunc: function applied after distance transform, must be one of "exponential", "linear", ...
mit
2,636,803,325,228,039,700
33.969512
116
0.656844
false
3.265945
false
false
false
nerevu/riko
riko/modules/fetchtext.py
1
5602
# -*- coding: utf-8 -*- # vim: sw=4:ts=4:expandtab """ riko.modules.fetchtext ~~~~~~~~~~~~~~~~~~~~~~ Provides functions for fetching text data sources. Accesses and extracts data from text sources on the web. This data can then be merged with other data in your Pipe. Examples: basic usage:: >>> from riko...
mit
-4,538,184,047,259,151,400
28.177083
78
0.577294
false
3.959011
false
false
false
rolandschulz/speedup
measure.py
1
3753
#!/usr/bin/env python3 # Copyright 2017 Jussi Pakkanen # # 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 la...
apache-2.0
-8,321,515,540,365,940,000
37.295918
149
0.591527
false
3.719524
false
false
false
openego/dingo
ding0/flexopt/check_tech_constraints.py
1
26442
"""This file is part of DING0, the DIstribution Network GeneratOr. DING0 is a tool to generate synthetic medium and low voltage power distribution grids based on open data. It is developed in the project open_eGo: https://openegoproject.wordpress.com DING0 lives at github: https://github.com/openego/ding0/ The docume...
agpl-3.0
1,344,183,671,160,117,000
36.497872
169
0.585225
false
3.704596
false
false
false
meteorfox/PerfKitBenchmarker
perfkitbenchmarker/providers/gcp/gcp_dataproc.py
1
6608
# Copyright 2016 PerfKitBenchmarker 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 appli...
apache-2.0
-2,838,796,046,700,911,600
35.10929
77
0.634231
false
3.771689
false
false
false
disrupts/SicPy
sicpy/ciphers/railfence.py
1
4491
from sicpy.cryptobox import Cryptobox from sicpy.utils.iterators import integer_iterator class RailFence(Cryptobox): """ Rail-fence Sawtooth """ # DOES NOT NEED ALPHASBET def __init__(self, alphabet=None, key=None, plain_text=None, cipher_text=None): """ """ Cryptobox._...
gpl-3.0
-4,004,982,648,631,174,000
31.773723
77
0.557461
false
4.104205
false
false
false
etal/cladecompare
cladeweb.py
1
7840
#!/usr/bin/env python """Web browser interface for CladeCompare. Input (GET): Form for submitting FG, [BG, HMM]. Output (POST): CladeReport (heat map) of submission. """ # TODO: # - take boolean do_weight as a form option (checkbox?) # ENH (in the report): # - asterisks up top link to PDF pairlogos # -...
bsd-2-clause
1,552,306,808,442,255,000
27.303249
86
0.585459
false
3.391003
false
false
false
kovidgoyal/kitty
kittens/hyperlinked_grep/main.py
1
2181
#!/usr/bin/env python # vim:fileencoding=utf-8 # License: GPLv3 Copyright: 2020, Kovid Goyal <kovid at kovidgoyal.net> import os import re import signal import socket import subprocess import sys from typing import Callable, cast from urllib.parse import quote_from_bytes def write_hyperlink(write: Callable[[bytes], ...
gpl-3.0
3,550,360,851,716,614,700
31.073529
104
0.544246
false
3.546341
false
false
false
HunanTV/redis-ctl
models/node.py
1
2671
from werkzeug.utils import cached_property from base import db, Base from cluster import Cluster from models.base import commit_session class RedisNode(Base): __tablename__ = 'redis_node' host = db.Column(db.String(255), nullable=False) port = db.Column(db.Integer, nullable=False) eru_container_id =...
mit
8,090,166,741,273,736,000
29.011236
77
0.667166
false
3.334582
false
false
false
OpenKMIP/PyKMIP
kmip/tests/unit/core/objects/test_attribute.py
1
3119
# 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 the...
apache-2.0
2,686,189,043,021,573,000
27.354545
75
0.611735
false
4.175368
true
false
false
lmoresi/UoM-VIEPS-Intro-to-Python
scripts/run-jupyter8.py
1
1679
#!/usr/bin/env python from subprocess import call import os import time # We want to start a server from each www directory # where everything was built by the site-builder script # Make sure jupyter defaults are correct (globally) call("jupyter nbextension enable hide_input/main", shell=True) # call("jupyter nbext...
mit
-5,864,566,678,173,984,000
35.5
124
0.589041
false
3.025225
false
false
false
1flow/1flow
oneflow/core/migrations/0011_auto__del_field_mailaccount_date_test__add_field_mailaccount_date_last.py
2
9154
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'MailAccount.date_test' db.delete_column(u'core_mailacco...
agpl-3.0
-1,872,303,365,812,109,300
70.523438
195
0.550142
false
3.592622
false
false
false
alexortizrosado/pyBreezeChMS
samples/easytithe_importer.py
2
8096
#!/usr/bin/python """Import contributions from EasyTithe to BreezeChMS. Logs into your EasyTithe account and imports contributions into BreezeChMS using the Python Breeze API. Usage: python easytithe_importer.py \\ --username user@email.com \\ --password easytithe_password \\ --breeze_url https://demo.b...
apache-2.0
-7,111,658,035,406,301,000
29.550943
80
0.567811
false
3.956989
false
false
false
ctSkennerton/fxtract
fxtract_test/speed_test/plot_times.py
2
1384
#!/usr/bin/env python from __future__ import print_function import sys, os, glob, re fixed_re = re.compile('fxtract-(\w+)_random_(10{2,5})_(\d\d)bp_patterns_times\.txt') norm_re = re.compile('fxtract-(\w+)_random_(10{2,5})_patterns_minus_small_times\.txt') impl_codes = {'ac': 'aho-corasick', 'sh': 'set horspool', 'mb...
mit
-3,389,505,375,175,508,500
31.952381
86
0.554191
false
3.248826
false
false
false
bobbybabra/codeGuild
kevinStore.py
1
2222
__author__ = 'kevin' class Store(): def __init__(self): self.available_items = [] self.customer_list = [] class InventoryItem(): def __init__(self, name, on_hand, price): self.name = name self.on_hand = on_hand self.price = price def __repr__(self): outpu...
bsd-2-clause
-5,598,137,168,085,619,000
20.365385
62
0.578308
false
3.41321
false
false
false
cygx/nqp
3rdparty/dyncall/test/suite2_x86win32std/mkcase.py
6
2026
#!/usr/bin/python #////////////////////////////////////////////////////////////////////////////// # # Copyright (c) 2007,2009 Daniel Adler <dadler@uni-goettingen.de>, # Tassilo Philipp <tphilipp@potion-studios.com> # # Permission to use, copy, modify, and distribute this software for any # purp...
artistic-2.0
2,967,816,954,526,329,000
29.69697
79
0.591313
false
3.288961
false
false
false
bjornfor/fgui
.ycm_extra_conf.py
1
1648
# YouCompleteMe Vim plugin config import os import ycm_core import subprocess # These are the compilation flags that will be used in case there's no # compilation database set (by default, one is not set). flags = [ '-Wall', '-Wextra', '-Werror', '-fexceptions', #'-DNDEBUG', # THIS IS IMPORTAN...
mit
8,540,638,513,112,684,000
28.963636
82
0.652306
false
3.476793
false
false
false
cudacode/RPIBigTrak
python/CommandInterface.py
1
3300
# Copyright (c) 2015 'cudacode' # Permission is hereby granted, free of charge, to any person obtaining a copy of this # software and associated documentation files (the "Software"), to deal in the Software # without restriction, including without limitation the rights to use, copy, modify, # merge, publish, distri...
mit
-4,700,101,757,885,334,000
25.612903
92
0.727273
false
3.283582
false
false
false
lmazuel/azure-sdk-for-python
azure-keyvault/azure/keyvault/models/certificate_update_parameters.py
4
1565
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
-5,860,635,482,764,688,000
40.184211
89
0.64345
false
4.830247
false
false
false
sabel83/metashell
3rd/templight/libcxx/utils/sym_diff.py
8
2793
#!/usr/bin/env python #===----------------------------------------------------------------------===## # # The LLVM Compiler Infrastructure # # This file is dual licensed under the MIT and the University of Illinois Open # Source Licenses. See LICENSE.TXT for details. # #===--------------------------...
gpl-3.0
-3,208,067,089,656,349,000
37.260274
79
0.58038
false
3.950495
false
false
false
asb29/Redundant
auth/tests/test_views.py
2
1446
from django.test import TestCase from django.test import Client class RegisterTestCase(TestCase): def test_register(self): c = Client() # on success redirects to / response = c.post('/accounts/register/', { 'username': 'asdas', 'password1': 'asdasdasd12', ...
mit
-5,282,888,757,211,514,000
29.765957
52
0.531812
false
4.167147
true
false
false
stanfordnqp/spins-b
spins/goos/generic.py
1
4455
"""Defines nodes for generic operations.""" from typing import List, Optional, Union from spins import goos from spins.goos import flows from spins.goos import optplan def cast(node: goos.ProblemGraphNode, cls_type, name: Optional[str] = None) -> goos.ProblemGraphNode: """Casts a problem graph ...
gpl-3.0
5,058,664,186,843,052,000
29.724138
80
0.627609
false
3.92511
false
false
false
haakenlid/django-skeleton
settings/base.py
1
5649
# -*- coding: utf-8 -*- """ Django settings for skeleton project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ import os # import django.conf.global_settings as...
mit
2,878,011,207,863,782,000
29.203209
102
0.659348
false
3.581484
false
false
false
topazproject/topaz
topaz/modules/ffi/function.py
1
2041
from topaz.module import ClassDef from topaz.modules.ffi import type as ffitype from topaz.modules.ffi.pointer import W_PointerObject from topaz.modules.ffi.dynamic_library import coerce_dl_symbol from topaz.modules.ffi.function_type import W_FunctionTypeObject from topaz.objects.moduleobject import W_FunctionObject f...
bsd-3-clause
4,059,170,644,656,358,000
36.109091
77
0.66193
false
3.276083
false
false
false
alexzhang2015/zhihuSpider
followee_list.py
1
4983
# -*- coding: utf-8 -*- import requests import re import math import codecs import json import time import datetime global user_list,login_dat, processed_user #user_list = ['wang-wei-63','allenzhang','kentzhu'] #user_list = ['yangbo','baiya','junyu','wang-xiao-chuan'] #user_list = ['wangxing','gongjun','zhouyuan'] ...
mit
-9,131,285,511,980,202,000
29.71519
148
0.58706
false
2.766819
false
false
false
appleseedhq/blenderseed
ui/meshes.py
2
2263
# # This source file is part of appleseed. # Visit https://appleseedhq.net/ for additional information and resources. # # This software is released under the MIT license. # # Copyright (c) 2019 Jonathan Dent, The appleseedhq Organization # # Permission is hereby granted, free of charge, to any person obtaining a copy #...
mit
1,035,809,832,209,433,200
37.355932
139
0.730004
false
3.803361
false
false
false
cprogrammer1994/ModernGL
moderngl/texture_cube.py
1
7703
from .buffer import Buffer __all__ = ['TextureCube'] class TextureCube: ''' A Texture is an OpenGL object that contains one or more images that all have the same image format. A texture can be used in two ways. It can be the source of a texture access from a Shader, or it can be used ...
mit
7,221,561,308,332,472,000
30.440816
101
0.543425
false
4.286589
false
false
false
jonmsawyer/maio
maio/management/commands/maio_get_images.py
1
18823
import os import sys import hashlib from pprint import pprint from getpass import getpass from datetime import datetime import magic from PIL import Image import pytz from django.conf import settings from django.core.management.base import CommandError import django.db.utils from django.contrib.auth import authentic...
mit
1,934,864,507,498,044,400
46.175439
98
0.403655
false
5.422933
false
false
false
iluxa-com/mercurial-crew-tonfa
mercurial/localrepo.py
1
86188
# localrepo.py - read/write repository class for mercurial # # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from node import bin, hex, nullid, nullrev, short from i18n import _...
gpl-2.0
-7,958,617,751,188,088,000
37.840919
81
0.51412
false
4.372362
false
false
false
dusenberrymw/systemml
src/main/pythondoc/conf.py
8
6839
# -*- coding: utf-8 -*- # #------------------------------------------------------------- # # 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 license...
apache-2.0
6,972,552,690,581,151,000
31.412322
79
0.679924
false
3.957755
false
false
false
idbedead/RNA-sequence-tools
RNA_Seq_analysis/cluster.py
2
33129
import cPickle as pickle import numpy as np import pandas as pd import os from subprocess import call import matplotlib matplotlib.use('QT4Agg') import matplotlib.pyplot as plt from matplotlib.ticker import LinearLocator import scipy import json from sklearn.decomposition import PCA as skPCA from scipy.spatial.distance...
mit
-4,946,865,316,839,125,000
43.890244
175
0.609587
false
2.931251
false
false
false
lancevalour/adbpy
adbpy/device.py
1
2819
""" Device class to control the connected Android device through Android Debug Bridge. """ import subprocess import os class Device: def __init__(self, device_id): self.__device_id = device_id # Device properties def get_id(self): return self.__device_id def get_screen_density(self)...
mit
-1,329,071,152,124,937,000
42.369231
114
0.561901
false
3.247696
false
false
false