repo_name
stringlengths
5
92
path
stringlengths
4
221
copies
stringclasses
19 values
size
stringlengths
4
6
content
stringlengths
766
896k
license
stringclasses
15 values
hash
int64
-9,223,277,421,539,062,000
9,223,102,107B
line_mean
float64
6.51
99.9
line_max
int64
32
997
alpha_frac
float64
0.25
0.96
autogenerated
bool
1 class
ratio
float64
1.5
13.6
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
Chaffelson/whoville
whoville/cloudbreak/models/blueprint_input.py
1
4561
# coding: utf-8 """ Cloudbreak API Cloudbreak is a powerful left surf that breaks over a coral reef, a mile off southwest the island of Tavarua, Fiji. Cloudbreak is a cloud agnostic Hadoop as a Service API. Abstracts the provisioning and ease management and monitoring of on-demand clusters. SequenceIQ's Cloud...
apache-2.0
-7,454,445,487,106,906,000
29.610738
984
0.585617
false
4.339676
false
false
false
DramaFever/calcifer
calcifer/tree.py
1
9183
""" `calcifer.tree` module This module implements a non-deterministic nested dictionary (tree). The tree comprises leaf nodes, dict nodes, and "unknown nodes" -- nodes which are known to exist but undefined beyond that. Ultimately, the policy tree contains *definitions*, a higher-level abstraction on "value": LeafPol...
mit
1,653,217,216,247,063,300
25.850877
105
0.5765
false
4.231797
false
false
false
amol9/fbstats
fbstats/main.py
1
2731
import sys import os from os.path import exists from mutils.system.scheduler import get_scheduler, PlatformError, FrequencyError from redcmd import subcmd, CommandLine, CommandLineError, CommandError from . import globals from .fb import FB from .action import Action @subcmd def job(): '''Run fbstats as a job.''' ...
mit
7,284,842,101,302,858,000
18.789855
107
0.70011
false
2.946063
false
false
false
awong1900/platformio
platformio/maintenance.py
1
7117
# Copyright (C) Ivan Kravets <me@ikravets.com> # See LICENSE for details. import re import struct from os import remove from os.path import isdir, isfile, join from shutil import rmtree from time import time import click from platformio import __version__, app, telemetry from platformio.commands.install import cli a...
mit
-8,118,982,638,193,287,000
32.729858
77
0.603344
false
3.651616
true
false
false
RPi-Distro/pgzero
pgzero/rect.py
1
15799
# -*- coding: utf-8 -*- import pygame.rect class Rect(pygame.rect.Rect): __slots__ = () # From Pygame docs VALID_ATTRIBUTES = """ x y top left bottom right topleft bottomleft topright bottomright midtop midleft midbottom midright center cente...
lgpl-3.0
-2,143,938,976,755,739,000
29.722892
110
0.510318
false
3.395959
false
false
false
Netflix-Skunkworks/cloudaux
cloudaux/orchestration/aws/sqs.py
1
2280
from cloudaux.aws.sqs import get_queue_url, get_queue_attributes, list_queue_tags, list_dead_letter_source_queues from cloudaux.decorators import modify_output from flagpole import FlagRegistry, Flags import logging from cloudaux.orchestration.aws import ARN logger = logging.getLogger('cloudaux') registry = FlagReg...
apache-2.0
8,771,817,787,487,272,000
30.666667
115
0.645614
false
3.551402
false
false
false
MarkNenadov/YNABpy
YNABpy/BaseClasses.py
1
3510
""" BaseClasses.py INTRODUCTION YNABpy - A Python module for the YNAB (You Need A Budget) application. AUTHOR Mark J. Nenadov (2011) * Essex, Ontario * Email: <marknenadov@gmail.com> LICENSING This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public...
lgpl-3.0
-2,300,809,593,029,452,800
22.092105
78
0.611111
false
3.993174
false
false
false
zhuzhezhe/django_blog
mywebsite/settings.py
1
3965
#coding:utf-8 """ Django settings for mywebsite project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(B...
mit
2,951,843,428,582,509,600
24.227273
81
0.663063
false
3.078447
false
false
false
lesh1k/beatport-verifier
v 1/BP_top100_v_1.1.0.py
1
3528
#This program is supposed to fetch the top 100 list from Beatport and compare it to the previously #saved list, then present the difference, hence the new entries. #Dependencies. It is written in Python 2.7 on Windows and it uses BeautifulSoup4 ####Version log################## #######################################...
cc0-1.0
-2,010,492,077,310,553,000
24.021277
132
0.692744
false
3.119363
false
false
false
jingzhehu/udacity_mlnd
P4_Training_a_Smartcab_to_Drive/smartcab/simulator.py
1
8851
import os import time import random import importlib class Simulator(object): """Simulates agents in a dynamic smartcab environment. Uses PyGame to display GUI, if available. """ colors = { 'black' : ( 0, 0, 0), 'white' : (255, 255, 255), 'red' : (255, 0, 0), ...
mit
-5,244,304,932,999,362,000
49.00565
220
0.54073
false
3.805245
false
false
false
ctwiz/stardust
qa/rpc-tests/test_framework/key.py
1
7367
# Copyright (c) 2011 Sam Rushing # # key.py - OpenSSL wrapper # # This file is modified from python-stardustlib. # """ECC secp256k1 crypto routines WARNING: This module does not mlock() secrets; your private keys may end up on disk in swap! Use with caution! """ import ctypes import ctypes.util import hashlib import...
mit
4,338,475,104,793,338,400
33.265116
130
0.641102
false
2.883366
false
false
false
openstack/oslo.versionedobjects
oslo_versionedobjects/base.py
1
51253
# Copyright 2013 IBM Corp. # # 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
-5,300,163,210,659,548,000
41.287954
79
0.612491
false
4.523255
false
false
false
henkhaus/wow
testing/plotter.py
1
1278
from pymongo import MongoClient from matplotlib import pyplot as plt import os from datetime import datetime, date, time, timedelta client = MongoClient() # using wowtest.auctiondata db = client.wowtest posts = db.auctiondata auctions = posts.find().limit(10) #time.time() into datetime ---> #datetime.datetime.fromti...
apache-2.0
1,368,956,586,611,997,000
22.666667
86
0.649452
false
3.079518
false
false
false
davy39/eric
Graphics/UMLDialog.py
1
14316
# -*- coding: utf-8 -*- # Copyright (c) 2007 - 2014 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing a dialog showing UML like diagrams. """ from __future__ import unicode_literals from PyQt5.QtCore import pyqtSlot, Qt, QFileInfo from PyQt5.QtWidgets import QAction, QToolBar, QGraphicsScene fr...
gpl-3.0
6,361,713,874,534,443,000
36.37859
78
0.551132
false
4.452877
false
false
false
kylefrost/budget
main.py
1
1783
from flask import Flask, render_template, request, redirect from sql import select # Create Flask app app = Flask(__name__) # API Blueprint from api import api app.register_blueprint(api, url_prefix="/api") # Load Index page @app.route("/") def index(): return render_template("index.html") # ...
gpl-3.0
-3,901,554,615,492,134,400
21.155844
66
0.621985
false
3.301852
false
false
false
ApptuitAI/xcollector
collectors/etc/metric_naming.py
1
1357
#!/usr/bin/env python def print_if_apptuit_standard_metric(metric, mapping, timestamp, value, tags=None, tags_str=None): if metric not in list(mapping["metrics"].keys()): return new_metric_name = mapping["metrics"][metric]["standard_name"] new_metric_tags_str = "" if tags is not None or tags_st...
lgpl-3.0
-2,912,226,242,471,547,400
47.464286
109
0.559322
false
3.609043
false
false
false
danielfrg/ec2hosts
ec2hosts/cli.py
1
1208
from __future__ import print_function, absolute_import, division import sys import click CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help']) import ec2hosts def main(): try: cli(obj={}) except Exception as e: import traceback click.echo(traceback.format_exc(), err=True) ...
apache-2.0
8,346,817,316,003,575,000
23.16
81
0.663907
false
3.309589
false
false
false
brupoon/mustachedNinja
any_lowercase_test.py
1
1080
#Chapter 9, Exercise 11...any_lowercase tests def any_lowercase1(s): for c in s: if c.islower(): return True else: return False def any_lowercase2(s): for c in s: if 'c'.islower(): return 'True' else: return 'False' ...
mit
566,311,769,260,755,700
23.761905
65
0.542593
false
3.624161
false
false
false
mpunkenhofer/irc-telegram-bot
telepot/telepot/aio/__init__.py
1
26958
import io import json import time import asyncio import traceback import collections from concurrent.futures._base import CancelledError from . import helper, api from .. import _BotBase, flavor, _find_first_key, _isstring, _dismantle_message_identifier, _strip, _rectify # Patch aiohttp for sending unicode filename fr...
mit
7,597,339,703,148,460,000
41.655063
123
0.545664
false
4.327127
false
false
false
amcat/amcat
api/rest/viewsets/coding/codingschemafield.py
1
2536
########################################################################### # (C) Vrije Universiteit, Amsterdam (the Netherlands) # # # # This file is part of AmCAT - The Amsterdam Content Analysis Toolkit # # ...
agpl-3.0
930,094,134,368,315,800
54.130435
122
0.594637
false
4.793951
false
false
false
GETLIMS/LIMS-Backend
lims/shared/migrations/0005_auto_20180301_0958.py
1
1248
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2018-03-01 09:58 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('shared', '0004_trigger_fire_on_create'), ] operations = [ migrations.AlterM...
mit
1,684,550,303,918,089,200
27.363636
83
0.532853
false
4.691729
false
false
false
qualitio/qualitio
qualitio/core/views.py
1
9056
import operator from mptt.models import MPTTModel from reversion.models import Version from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.db.models import Q from django.db.models.loading import get_model from django.views.generic.simple import direct_to_template from q...
gpl-3.0
-4,864,936,522,159,101,000
33.830769
103
0.599823
false
3.932262
false
false
false
hhorak/rebase-helper
test/test_application.py
1
4369
# -*- coding: utf-8 -*- # # This tool helps you to rebase package to the latest version # Copyright (C) 2013-2014 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # he Free Software Foundation; either version 2 ...
gpl-2.0
800,306,180,075,415,300
38.718182
107
0.487984
false
4.04537
true
false
false
indautgrp/erpnext
erpnext/accounts/report/trial_balance_for_party/trial_balance_for_party.py
1
5770
# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import flt, cint from erpnext.accounts.report.trial_balance.trial_balance import validate_filters def exe...
gpl-3.0
8,733,647,437,386,378,000
24.995495
101
0.644541
false
2.963534
false
false
false
lycying/seeking
sklib/ui/wysiwyg/syntax.py
1
2930
# coding:utf-8 # # Copyright (c) 2010, guo.li <lycying@gmail.com> # Site < http://code.google.com/p/seeking/ > # All rights reserved. # vim: set ft=python sw=2 ts=2 et: # from PyQt5.QtGui import QFont from PyQt5.QtGui import QTextCharFormat from PyQt5.QtGui import QSyntaxHighlighter from PyQt5.QtCore import Qt from Py...
gpl-2.0
-3,336,502,950,754,958,000
36.564103
146
0.639249
false
3.885942
false
false
false
nheijmans/random_scripts
mock_http_server/http_https_server.py
1
1185
# given a pem file ... openssl req -new -x509 -keyout yourpemfile.pem -out yourpemfile.pem -days 365 -nodes import sys import ssl import time import signal import threading import BaseHTTPServer, SimpleHTTPServer def http_worker(): httpd = BaseHTTPServer.HTTPServer(('localhost', 8080), SimpleHTTPServer.SimpleHTTP...
gpl-3.0
8,117,941,957,505,710,000
27.214286
107
0.699578
false
3.822581
false
false
false
boazjohn/pyspark-job-server
lib/receiver.py
1
8167
#!/usr/bin/python # Standard Library import json import time import logging import socket from threading import Thread, Lock # Third Party # Local # set up logging logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) class EventBroadcastReceiver: def __init__(self, host='localhost',...
bsd-3-clause
7,201,294,214,269,019,000
28.806569
119
0.501408
false
4.585626
false
false
false
AvadootNachankar/gstudio
gnowsys-ndf/gnowsys_ndf/ndf/views/data_review.py
2
15718
''' -- Imports from python libraries -- ''' # import os, re import json ''' -- imports from installed packages -- ''' from django.http import HttpResponse from django.shortcuts import render_to_response # , render #uncomment when to use from django.template import RequestContext from django.contrib.auth.decorators i...
agpl-3.0
8,873,485,038,332,246,000
42.905028
124
0.599313
false
3.63254
false
false
false
RakanNimer/hackathon
main.py
1
1342
from flask import Flask import flask from reddit import Submissions from reddit import Submission import redis import json try: from flask.ext.cors import CORS # The typical way to import flask-cors except ImportError: # Path hack allows examples to be run without installation. import os parentdir = o...
mit
1,764,334,778,868,504,600
28.195652
75
0.681073
false
3.646739
false
false
false
xhochy/g-octave
g_octave/config.py
1
2924
# -*- coding: utf-8 -*- """ g_octave.config ~~~~~~~~~~~~~~~ This module implements a Python object to handle the configuration of g-octave. :copyright: (c) 2009-2010 by Rafael Goncalves Martins :license: GPL-2, see LICENSE for more details. """ from __future__ import absolute_import import o...
gpl-2.0
2,911,297,229,804,912,600
28.836735
75
0.576949
false
3.967436
true
false
false
banesullivan/ParaViewGeophysics
PVGeo/ubc/tensor.py
1
21910
__all__ = [ 'TensorMeshReader', 'TensorMeshAppender', 'TopoMeshAppender', ] __displayname__ = 'Tensor Mesh' import os import sys import numpy as np import pandas as pd import vtk from .. import _helpers, interface from ..base import AlgorithmBase from .two_file_base import ModelAppenderBase, ubcMeshRead...
bsd-3-clause
8,269,175,232,248,584,000
37.371278
110
0.557599
false
3.942775
false
false
false
Nettacker/Nettacker
lib/transactions/maltego/nettacker_transforms/src/nettacker_transforms/transforms/wp_xmlrpc_dos_vuln.py
1
1880
import random from canari.maltego.transform import Transform from canari.maltego.entities import URL from canari.framework import EnableDebugWindow from common.entities import NettackerScan from lib.scan.wp_xmlrpc.engine import start from database.db import __logs_by_scan_id as find_log __author__ = 'Shaddy Garg' _...
gpl-3.0
8,579,453,768,622,444,000
37.367347
119
0.653723
false
3.74502
false
false
false
xmichael/tagger
src/main/lib/logtool.py
1
1546
## Just some utility functions for logging messages. Most important is getLogger. import sys, pprint, json, logging, configuration ### Constants ### ################# ## Can only log in stderr (or environ['wsgi.errors']) when using WSGI: def dbg(msg): print >> sys.stderr, msg def pp(obj): """ shortcut ...
bsd-3-clause
-8,895,426,044,850,906,000
31.893617
93
0.651358
false
4.35493
false
false
false
Labbiness/Pancake
setup.py
1
1437
# -*- encoding:utf-8 -*- # # Copyright (c) 2017-2018 Shota Shimazu # # 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 ap...
apache-2.0
5,198,664,308,909,516,000
31.659091
74
0.631872
false
3.811671
false
false
false
ciarams87/PyU4V
PyU4V/tools/openstack/migrate.py
1
7265
# Copyright (c) 2020 Dell Inc. or its subsidiaries. # # 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...
mit
42,564,993,807,781,930
36.838542
78
0.615416
false
3.939805
false
false
false
mailgun/talon
talon/signature/learning/helpers.py
1
6879
# -*- coding: utf-8 -*- """ The module provides: * functions used when evaluating signature's features * regexp's constants used when evaluating signature's features """ from __future__ import absolute_import import unicodedata import regex as re from talon.utils import to_unicode from talon.signature.constants im...
apache-2.0
-8,025,110,656,605,266,000
29.303965
79
0.594709
false
3.321584
false
false
false
Vagab0nd/SiCKRAGE
lib3/twilio/rest/voice/v1/dialing_permissions/country/__init__.py
1
18104
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import InstanceResource from twilio.base.list_resource import ListResource f...
gpl-3.0
4,873,446,034,144,213,000
39.410714
155
0.648641
false
4.319733
false
false
false
Farious/PersonTracker
Source/LoadImageTextPrint_sample.py
1
4907
# import numpy as np import cv2 # import linecache import LoadImagePrintText as f # >>> import os # >>> os.chdir("C:\Users\dario\Desktop\Dropbox\Work\DemoHDA\git\Source\\") ## Input cam = 60 frame = 26 debugREID = 1 img = f.loadImagePrintText(cam, frame, debugREID=0, debugPD=1, PDthreshold=20) cv2.namedWindow("1", c...
apache-2.0
-2,488,138,149,678,787,000
37.944444
130
0.627675
false
2.600424
false
false
false
michaelcontento/whirlwind
whirlwind/view/filters.py
1
6750
from datetime import datetime import pytz, sys, re, locale from dateutil import parser try: import simplejson except ImportError: import json as simplejson class Filters(): ''' Checks whether the passed in value is considered useful otherwise will return None will return None on the f...
mit
1,393,791,378,986,615,300
27.246862
90
0.480296
false
4.187345
false
false
false
cuemacro/chartpy
chartpy_examples/subplot_example.py
1
2359
__author__ = 'saeedamen' # Saeed Amen # # Copyright 2016 Cuemacro # # 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
-2,607,866,110,523,156,500
32.225352
121
0.705384
false
3.170699
false
false
false
monokrome/django-drift
setup.py
1
1462
import os import sys try: from setuptools import setup except ImportError: from . import ez_setup from setuptools import setup parent_directory = os.path.abspath(os.path.dirname(__file__)) metafiles = { 'README.md': None, 'CHANGES.md': None, 'CLASSIFIERS.txt': None, } # The following bit w...
mit
7,593,647,087,996,668,000
23.366667
82
0.629275
false
3.407925
false
false
false
davidhax0r/dojme
dojme/routes.py
1
2223
from dojme import app from flask import render_template, request, redirect from urlparse import urlparse import httplib2 import re def status_check(url): """ Get the headers of a web resource to check if it exists """ h = httplib2.Http() try: resp = h.request(url, 'HEAD') if resp[0...
mit
4,382,458,863,198,709,000
26.109756
73
0.504723
false
3.638298
false
false
false
lhfei/spark-in-action
spark-2.x/src/main/python/ml/correlation_example.py
1
1843
# # 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 n...
apache-2.0
8,634,468,812,316,314,000
34.137255
74
0.658709
false
3.517176
false
false
false
kyleabeauchamp/mdtraj
mdtraj/tests/test_dtr.py
1
11033
############################################################################## # MDTraj: A Python Library for Loading, Saving, and Manipulating # Molecular Dynamics Trajectories. # Copyright 2012-2013 Stanford University and the Authors # # Authors: Robert McGibbon # Contributors: Teng Lin # # MDTraj is free so...
lgpl-2.1
-1,750,320,178,704,864,000
32.537994
97
0.608719
false
3.044426
true
false
false
f5devcentral/f5-cccl
f5_cccl/resource/ltm/internal_data_group.py
1
3015
"""Provides a class for managing BIG-IP iRule resources.""" # coding=utf-8 # # Copyright (c) 2017-2021 F5 Networks, 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.apac...
apache-2.0
8,203,400,656,434,464,000
30.736842
77
0.659701
false
4.118852
false
false
false
saketkc/ribo-seq-snakemake
configs/config_Shalgi_et_al_Cell_2013.mouse.py
1
1460
GENOMES_DIR = '/home/cmb-panasas2/skchoudh/genomes' OUT_DIR = '/staging/as/skchoudh/rna/September_2017_Shalgi_et_al_Cell_2013' SRC_DIR = '/home/cmb-panasas2/skchoudh/github_projects/clip_seq_pipeline/scripts' RAWDATA_DIR = '/home/cmb-06/as/skchoudh/dna/September_2017_Shalgi_et_al_Cell_2013/sra_single_end_mouse' GENOME_...
bsd-3-clause
-6,291,594,674,228,733,000
80.111111
146
0.7
false
2.409241
false
true
false
kanishkarj/Rave
Qt_Designer_files/playlist_design.py
1
2791
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'playlist.ui' # # Created by: PyQt4 UI code generator 4.12.1 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: def _fromUtf8(s): ...
gpl-3.0
8,714,846,205,213,983,000
42.609375
79
0.694375
false
3.797279
false
false
false
belese/luciphone
Luciphone/modules/NFCmonitor.py
1
1642
import time from py532lib.i2c import * from py532lib.frame import * from py532lib.constants import * class NFCmonitor : def __init__(self) : self.cardIn = False self.UUID = [] self.stopped = False self.cbcardin = None self.cbcardout = None #Initialise NFC_re...
gpl-2.0
6,317,143,941,664,688,000
31.84
95
0.477467
false
3.956627
false
false
false
XBMC-Addons/plugin.library.node.editor
resources/lib/orderby.py
1
8285
# coding=utf-8 import os, sys import xbmc, xbmcaddon, xbmcplugin, xbmcgui, xbmcvfs import xml.etree.ElementTree as xmltree from traceback import print_exc from urllib.parse import unquote from resources.lib.common import * class OrderByFunctions(): def __init__(self, ltype): self.ltype = ltype def _l...
gpl-2.0
-1,985,181,185,056,589,800
41.487179
179
0.551358
false
4.222732
false
false
false
ScottWales/rose
lib/python/rose/scheme_handler.py
1
5051
# -*- coding: utf-8 -*- #----------------------------------------------------------------------------- # (C) British Crown Copyright 2012-5 Met Office. # # This file is part of Rose, a framework for meteorological suites. # # Rose is free software: you can redistribute it and/or modify # it under the terms of the GNU G...
gpl-3.0
441,689,296,259,777,660
38.771654
78
0.545239
false
4.625458
false
false
false
hocinebendou/bika.gsoc
bika/lims/utils/analysis.py
1
12208
# -*- coding: utf-8 -*- import math import zope.event from bika.lims.utils import formatDecimalMark from Products.Archetypes.event import ObjectInitializedEvent from Products.CMFCore.WorkflowCore import WorkflowException from Products.CMFPlone.utils import _createObjectByType def create_analysis(context, service, ke...
mit
269,186,533,421,347,600
39.138158
85
0.632028
false
4.242698
false
false
false
VerstandInvictus/NachIOs
ifthentrack.py
1
1181
## Hook.io Nach tracker updater. ## This takes a query with parameters of ?val=<number>&tr=<Nach tracker ID>&sec=<secret word> ## and adds a data point to the Nach tracker with ID corresponding to the "tr" param. ## It is intended to be used with IFTTT's Maker channel action but could be triggered from anywhere. ## It ...
mit
6,501,709,542,593,637,000
42.740741
100
0.711262
false
3.423188
false
false
false
kansanmuisti/datavaalit
web/political/views.py
1
6227
import json import time from django.template import RequestContext from django.shortcuts import render_to_response from social.models import * from political.models import * from political.api import * from geo.models import Municipality from django.core.urlresolvers import reverse from django.core.mail import mail_ad...
agpl-3.0
-3,575,229,711,720,876,500
38.411392
126
0.666131
false
3.584917
false
false
false
santegoeds/bfair
bfair/_types.py
1
7481
#!/usr/bin/env python # # Copyright 2011 Tjerk Santegoeds # # 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
4,085,828,044,796,257,000
19.439891
84
0.515573
false
3.714499
false
false
false
tuxskar/caluny
caluny/core/admin.py
1
2473
"""Admin site registration models for Caluma""" from django.contrib import admin from .models import SemesterDate from .models import Student, Course, Level, Exam, Timetable, CourseLabel, Degree from .models import Subject, Teacher, TeachingSubject, School, University @admin.register(Subject) class SubjectAdmin(admi...
gpl-2.0
8,265,881,122,111,337,000
26.175824
103
0.68702
false
3.537911
false
false
false
frnhr/django-stdnumfield
testproject/testproject/settings.py
1
3320
""" Django settings for testproject project. Generated by 'django-admin startproject' using Django 1.10.3. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ impor...
unlicense
-7,300,196,891,010,927,000
23.592593
79
0.654217
false
3.566058
false
false
false
talipovm/terse
terse/ReportGenerator/Charges.py
1
3037
from ReportGenerator.Top_ReportGenerator import Top_ReportGenerator from ReportGenerator.Geom import Geom import logging log = logging.getLogger(__name__) class Charges(Top_ReportGenerator): def __init__(self,we,parsed): self.Q = list() super().__init__(we,parsed) def prepare_for_report(self...
mit
8,360,541,386,781,269,000
30.978947
94
0.498848
false
3.127703
false
false
false
oldm/OldMan
tests/attr_entry_test.py
1
1916
import unittest from oldman.model.attribute import Entry class AttributeEntryTest(unittest.TestCase): def test_1(self): entry = Entry() value1 = 1 self.assertNotEquals(entry.current_value, value1) entry.current_value = value1 self.assertEquals(entry.current_value, value1)...
bsd-3-clause
-1,405,675,632,503,099,600
27.176471
57
0.613779
false
3.855131
true
false
false
mitar/django-pushserver
setup.py
1
1615
#!/usr/bin/env python import os from setuptools import setup, find_packages try: # Workaround for http://bugs.python.org/issue15881 import multiprocessing except ImportError: pass VERSION = '0.3.4' if __name__ == '__main__': setup( name = 'django-pushserver', version = VERSION, ...
agpl-3.0
-6,908,667,698,903,055,000
33.361702
113
0.570898
false
3.687215
false
false
false
JohanComparat/nbody-npt-functions
bin/bin_SMHMr/create_AGN_catalog_gawk.py
1
2344
# overall python packages import glob #import astropy.io.fits as fits # 2397897 143.540054 0.032711 20.449619 119.370173 9.753314 33.197590 -1.000000 25.191960 40.977921 2 127 # ------ -------- -------- ra dec import os import time import numpy as n import sys t0=time.time() #from astropy.cosmology import ...
cc0-1.0
3,773,433,743,117,480,000
45.88
189
0.566126
false
2.712963
false
false
false
erdc/proteus
proteus/tests/surface_tension/rising_bubble_rans3p/vof_n.py
1
1873
from __future__ import absolute_import from proteus import * try: from .risingBubble import * from .vof_p import * except: from risingBubble import * from vof_p import * if timeDiscretization=='vbdf': timeIntegration = VBDF timeOrder=2 stepController = Min_dt_cfl_controller elif timeDi...
mit
-7,382,594,697,588,394,000
24.657534
130
0.732515
false
2.977742
false
true
false
rwl/PyCIM
CIM14/IEC61970/Dynamics/BlockUsageOutputReference.py
1
4616
# Copyright (C) 2010-2011 Richard Lincoln # # 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...
mit
-6,126,209,542,516,952,000
42.961905
468
0.717071
false
4.375355
false
false
false
O-T-L/PyOptimization
parameters/indicator/pf.py
1
3441
""" Copyright (C) 2014, 申瑞珉 (Ruimin Shen) This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed i...
lgpl-3.0
-4,490,129,093,049,562,600
43.038462
115
0.63901
false
3.29023
false
false
false
YeEmrick/learning
stanford-tensorflow/assignments/01/q1_sol.py
1
5009
""" Solution to simple exercises to get used to TensorFlow API You should thoroughly test your code. TensorFlow's official documentation should be your best friend here CS20: "TensorFlow for Deep Learning Research" cs20.stanford.edu Created by Chip Huyen (chiphuyen@cs.stanford.edu) """ import os os.environ['TF_CPP_MIN_...
apache-2.0
-4,323,550,377,722,852,000
43.336283
80
0.498503
false
3.47124
false
false
false
Noirello/bonsai
.ci/delay.py
1
5135
import os import subprocess import xmlrpc.server as rpc import time import sys import multiprocessing as mp try: import pydivert except ImportError: pass class LinuxDelayHandler: @staticmethod def get_interface_name(): """ Get the first interface name that is not the localhost. """ ne...
mit
509,284,448,804,491,300
29.02924
86
0.427848
false
4.655485
false
false
false
Karspexet/Karspexet
karspexet/ticket/tasks.py
1
1458
import logging from django.conf import settings from django.core.mail import send_mail from django.contrib.sites.models import Site from django.template.loader import render_to_string logger = logging.getLogger(__file__) def send_ticket_email_to_customer(reservation, email, name=None): '''Send an email to the cu...
mit
7,935,162,058,853,896,000
33.690476
118
0.693892
false
4.081232
false
false
false
jonparrott/nox
nox/command.py
1
3925
# Copyright 2016 Alethea Katherine Flowers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
apache-2.0
-6,808,519,644,293,755,000
28.074074
118
0.593376
false
4.179979
false
false
false
pombredanne/discern
tastypie/resources.py
1
94958
from __future__ import with_statement import sys import logging import warnings import django from django.conf import settings try: from django.conf.urls import patterns, url except ImportError: # Django < 1.4 from django.conf.urls.defaults import patterns, url from django.core.exceptions import ObjectDoesNotEx...
agpl-3.0
4,679,845,014,758,824,000
37.120434
213
0.600623
false
4.360672
false
false
false
MuffinMedic/CloudBot
cloudbot/hook.py
1
14146
import collections import inspect import re from enum import Enum, unique, IntEnum from cloudbot.event import EventType valid_command_re = re.compile(r"^\w+$") @unique class Priority(IntEnum): # Reversed to maintain compatibility with sieve hooks numeric priority LOWEST = 127 LOW = 63 NORMAL = 0 ...
gpl-3.0
-573,451,123,311,893,000
26.901381
112
0.588294
false
3.807806
false
false
false
collinstocks/eventlet
eventlet/greenio/base.py
1
17181
import errno import os import socket import sys import time import warnings import eventlet from eventlet.hubs import trampoline, notify_opened, IOClosed from eventlet.support import get_errno, six __all__ = [ 'GreenSocket', '_GLOBAL_DEFAULT_TIMEOUT', 'set_nonblocking', 'SOCKET_BLOCKING', 'SOCKET_CLOSED', 'CO...
mit
3,253,789,823,497,832,000
34.645228
92
0.584483
false
4.158035
false
false
false
mgrygoriev/CloudFerry
cloudferrylib/os/estimation/procedures.py
1
6018
# Copyright (c) 2016 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the License); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, so...
apache-2.0
263,699,053,650,078,880
38.333333
75
0.588069
false
4.116279
false
false
false
rksaxena/crawler_templates
crawler_type2/crawler_type2/spiders/type_two.py
1
1779
# -*- coding: utf-8 -*- import scrapy import crawler_type2.config as config from crawler_type2.items import CrawlerType2Item import urlparse class TypeTwo(scrapy.Spider): name = 'crawler_type2' def start_requests(self): source = getattr(self, 'source', None) if source is None or source not in...
mit
1,685,810,864,093,220,900
39.431818
81
0.610455
false
3.72956
false
false
false
piaoyaoshi/inf1340_2015_asst1
exercise3.py
1
3174
#!/usr/bin/env python """ Assignment 1, Exercise 3, INF1340, Fall, 2015. Troubleshooting Car Issues. This module contains one function diagnose_car(). It is an expert system to interactive diagnose car issues. """ __author__ = 'Susan Sim' __email__ = "ses@drsusansim.org" __copyright__ = "2015 Susan Sim" __license__...
mit
-2,540,198,713,976,936,400
23.604651
110
0.587902
false
3.792115
false
false
false
cnddu/cactusblog
form/post.py
1
1329
#!/usr/bin/env python # coding=utf-8 # # Copyright 2013 meiritugua.com from wtforms import TextField, HiddenField, validators from lib.forms import Form class NewForm(Form): title = TextField('Title', [ validators.Required(message = "请填写帖子标题"), validators.Length(min = 3, message = "帖子标题长度过短(3-...
gpl-3.0
-6,134,245,195,717,030,000
23.354167
70
0.585115
false
2.750588
false
false
false
GuillaumeSeren/alot
alot/helper.py
1
20203
# -*- coding: utf-8 -*- # Copyright (C) 2011-2012 Patrick Totzke <patricktotzke@gmail.com> # Copyright © 2017-2018 Dylan Baker # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file from datetime import timedelta from datetime import datetime from collectio...
gpl-3.0
-2,359,341,438,656,932,400
32.440397
79
0.624171
false
3.934164
false
false
false
AenBleidd/man2wiki
man2wiki.py
1
2114
import sys import re from os import listdir, linesep from os.path import isfile, join, splitext def clearLine(line): return line.strip().replace(r'\&', '').replace(r'\fB', '').replace(r'\fC', '').replace(r'\fP', '').replace(r'\-', '-').replace(r'#', '<nowiki>#</nowiki>') def convert(in_filename, out_filename): f = ...
gpl-3.0
-1,009,650,140,952,821,800
27.581081
155
0.556291
false
2.446759
false
false
false
magne-max/zipline-ja
zipline/pipeline/loaders/utils.py
1
9840
import datetime import numpy as np import pandas as pd from zipline.utils.pandas_utils import mask_between_time def is_sorted_ascending(a): """Check if a numpy array is sorted.""" return (np.fmax.accumulate(a) <= a).all() def validate_event_metadata(event_dates, event_timestamps...
apache-2.0
8,966,708,791,491,797,000
34.912409
79
0.618699
false
4.016327
false
false
false
mrrrgn/build-relengapi
relengapi/lib/auth/ldap_group_authz.py
1
2918
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import itertools import ldap import logging from relengapi import p from relengapi.lib.auth import permissions_stale ...
mpl-2.0
-6,353,090,569,641,761,000
37.394737
93
0.585675
false
4.002743
false
false
false
swatlab/uplift-analysis
src_code_metrics.py
1
4848
import re, csv, pytz, json, subprocess from dateutil import parser import pandas as pd import get_bugs from libmozdata import patchanalysis # Execute a shell command def shellCommand(command_str): cmd =subprocess.Popen(command_str.split(' '), stdout=subprocess.PIPE) cmd_out, cmd_err = cmd.communicate() ret...
mpl-2.0
8,802,598,191,561,831,000
36.007634
128
0.591172
false
3.546452
false
false
false
VapourApps/va_master
va_master/utils/old_to_new_store.py
1
3048
import requests, json, functools import base64 import os path = 'http://127.0.0.1:8500' from va_master.handlers.datastore_handler import DatastoreHandler from va_master.consul_kv.datastore import ConsulStore import tornado.ioloop folder_pwd = os.path.join(os.path.dirname(os.path.realpath(__file__)), '') datastore = ...
gpl-3.0
821,649,943,494,431,100
37.582278
196
0.624016
false
3.367956
false
false
false
AparatTechnologies/django-connectwise
djconnectwise/api.py
1
16448
import logging from django.conf import settings from djconnectwise.utils import RequestSettings import re import requests from retrying import retry class ConnectWiseAPIError(Exception): """Raise this, not request exceptions.""" pass class ConnectWiseRecordNotFoundError(ConnectWiseAPIError): """The rec...
mit
-2,677,239,882,592,082,400
34.912664
79
0.557515
false
4.284449
false
false
false
mark-rushakoff/FlackOverstow
grabber.py
1
1835
#!/usr/bin/env python __author__ = "Mark Rushakoff" __license__ = "MIT" import sys import urllib2 import re import StringIO import gzip try: import simplejson as json except ImportError: try: import json except ImportError: sys.stderr.write("simplejson or json required for operation. Abo...
mit
-9,221,221,283,494,337,000
29.583333
117
0.643052
false
3.475379
false
false
false
ddico/odoo
addons/l10n_hr/__manifest__.py
1
1748
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Author: Goran Kliska # mail: goran.kliska(AT)slobodni-programi.hr # Copyright (C) 2011- Slobodni programi d.o.o., Zagreb # Contributions: # Tomislav Bošnjaković, Storm Computers d.o.o. : # - ac...
agpl-3.0
3,099,756,170,522,868,700
26.603175
80
0.66015
false
2.654962
false
false
false
minlexx/pyevemon
esi_client/models/delete_fleets_fleet_id_squads_squad_id_forbidden.py
1
3083
# coding: utf-8 """ EVE Swagger Interface An OpenAPI for EVE Online OpenAPI spec version: 0.4.6 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class DeleteFleetsFleetIdSquadsSquadIdForbidden(object): """...
gpl-3.0
3,020,769,290,137,850,000
25.350427
82
0.537464
false
4.258287
false
false
false
PrzemyslawUrbanczyk/pu_zadanie1
fixture/contact.py
1
10214
import re from model.contact import Contact class ContactHelper: def __init__(self, app): self.app = app def return_to_home_page(self): wd = self.app.wd wd.find_element_by_link_text("home page").click() def create(self, contact): wd = self.app.wd # init contact ...
apache-2.0
-1,192,542,450,972,658,000
42.455319
109
0.600372
false
3.431452
false
false
false
wavefrontHQ/python-client
wavefront_api_client/models/response_container_service_account.py
1
4422
# coding: utf-8 """ Wavefront REST API <p>The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.</p><p>When you make REST API calls outside the Wavefront REST ...
apache-2.0
1,939,211,225,929,616,100
30.140845
409
0.593171
false
4.453172
false
false
false
wdv4758h/ZipPy
edu.uci.python.test/regressiontests/test_grammar.py
1
33140
# Python test set -- part 1, grammar. # This just tests whether the parser accepts them all. #from test.support import run_unittest, check_syntax_error # Currently test.support cannot be imported import unittest #import sys # testing import * #from sys import * class TokenTests(unittest.TestCase): def testBack...
bsd-3-clause
-3,071,993,888,614,629,400
33.129763
132
0.490616
false
3.379908
true
false
false
z01nl1o02/tests
text/mlpbase.py
1
8554
import os,sys,pdb,pickle import numpy as np import cv2 import theano import theano.tensor as T import random #you may try several times to get a good model and the init 'cost' may be quite large, 78 .e.g. class Layer(object): """ a layer is a maxtrix with row = output of this layer and col = output of prev...
gpl-2.0
3,815,222,287,935,987,700
35.4
162
0.513561
false
3.653994
false
false
false
wpoely86/vsc-base
lib/vsc/utils/run.py
2
31071
# # Copyright 2009-2013 Ghent University # # This file is part of vsc-base, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en), # the Hercules foundation (http:...
lgpl-2.1
4,259,829,277,435,143
35.813981
132
0.568408
false
4.003479
false
false
false
madoodia/codeLab
python/Built-in_Functions.py
1
15493
######################################### Built-in Functions ######################################### abs(x) # Return the absolute value of a number # ......................................... all(iterable) # Return True if all elements of the iterable are true # equivalent to: def all(iterable): for element i...
mit
4,427,158,441,983,250,000
46.904025
217
0.545208
false
4.106423
false
false
false
pmrowla/goonbcs
goonbcs/models.py
1
3450
# Copyright (c) 2013 Peter Rowlands from __future__ import absolute_import from flask.ext.security import UserMixin, RoleMixin from . import db class Conference(db.Model): """A college football conference""" id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(255), unique=True) ...
mit
-7,676,578,578,878,434,000
33.848485
75
0.648406
false
3.317308
false
false
false
charany1/googlecl
src/debug_util.py
2
2144
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
mit
1,641,560,307,784,319,000
34.733333
79
0.695429
false
3.702936
false
false
false
heromod/migrid
mig/edpickle.py
1
2501
#!/usr/bin/python # -*- coding: utf-8 -*- # # edpickle - a simple pickled object editor. # Copyright (C) 2009 Jonas Bardino # # This file is part of MiG. # # MiG 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...
gpl-2.0
-489,058,328,799,537,700
32.346667
81
0.628149
false
3.727273
false
false
false
NewAcropolis/api
app/routes/venues/rest.py
1
3126
import os from flask import ( Blueprint, current_app, jsonify, request ) from flask_jwt_extended import jwt_required from app.dao.venues_dao import ( dao_create_venue, dao_get_venues, dao_update_venue, dao_get_venue_by_id ) from app.errors import register_errors from app.routes.venues...
mit
2,526,085,522,634,169,000
25.948276
119
0.636916
false
3.332623
false
false
false
ifcharming/voltdb2.1
tools/vis.py
1
5697
#!/usr/bin/env python # This is a visualizer which pulls TPC-C benchmark results from the MySQL # databases and visualizes them. Four graphs will be generated, latency graph on # sinigle node and multiple nodes, and throughput graph on single node and # multiple nodes. # # Run it without any arguments to see what argu...
gpl-3.0
7,035,395,335,418,342,000
30.131148
80
0.552923
false
3.421622
false
false
false
klahnakoski/jx-sqlite
vendor/mo_collections/unique_index.py
1
5570
# encoding: utf-8 # # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Contact: Kyle Lahnakoski (kyle@lahnakoski.com) # from __future__ import absolute_import, divis...
mpl-2.0
-1,573,903,108,648,493,300
28.315789
129
0.523878
false
3.760972
false
false
false
gdetor/SI-RF-Structure
Statistics/clear_data.py
1
5369
# Copyright (c) 2014, Georgios Is. Detorakis (gdetor@gmail.com) and # Nicolas P. Rougier (nicolas.rougier@inria.fr) # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redis...
gpl-3.0
-1,296,385,003,780,873,000
37.625899
106
0.631589
false
3.092742
false
false
false
cheral/orange3
doc/development/source/orange-demo/orangedemo/OWLearningCurveB.py
2
13882
import sys from collections import OrderedDict from functools import reduce import numpy import sklearn.cross_validation from PyQt4.QtGui import QTableWidget, QTableWidgetItem import Orange.data import Orange.classification from Orange.widgets import widget, gui, settings from Orange.evaluation.testing import Resul...
bsd-2-clause
929,211,082,219,131,100
33.02451
96
0.590693
false
3.962889
true
false
false
leandro86/epubcreator
epubcreator/epubbase/ebook.py
1
14784
import os from lxml import etree from epubcreator.pyepub.pyepubwriter import epub from epubcreator.epubbase import ebook_metadata, ebook_data, files, images from epubcreator.misc import utils from epubcreator.misc.options import Options, Option class Ebook(Options): OPTIONS = [Option(name="includeOptionalFiles"...
unlicense
1,965,789,741,287,960,000
50.632867
149
0.609237
false
4.06889
false
false
false
artminster/artminster
core/utils/fields.py
1
10035
from django.utils.translation import ugettext as _ from django.db import models, connection from django.utils.text import capfirst from itertools import chain from django.utils.html import conditional_escape from django.utils.safestring import mark_safe from django.utils.encoding import force_unicode, smart_unicode fro...
mit
4,693,943,054,560,884,000
30.264798
98
0.47703
false
3.151696
false
false
false