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
Southpaw-TACTIC/TACTIC
src/pyasm/web/palette.py
1
13401
########################################################### # # Copyright (c) 2010, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
epl-1.0
5,284,234,413,447,526,000
28.64823
106
0.50929
false
3.814688
false
false
false
faber03/AndroidMalwareEvaluatingTools
framework sources/Alan/dalvikobfuscator/baksmali-modifier.py
1
2307
#!/usr/bin/env python # Copyright (C) 2012 pleed@dexlabs.org # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-1,676,058,413,938,096,400
28.576923
91
0.682271
false
3.348331
false
false
false
lemmingapex/ProjectEuler
Problem018/src/MaximumPathSum.py
1
1162
#!/usr/bin/python3 # # 09/21/2016 # MaximumPathSum.py # Maximum path sum I # Maximum path sum II # # Scott Wiedemann # import sys class MaximumPathSum: _triangleData = [] def __init__(self, InputFile): for line in InputFile: self._triangleData.append([int(v) for v in line.split()]) return def sumMaxPath(s...
mit
4,385,577,479,959,194,600
20.127273
65
0.638554
false
2.677419
false
false
false
open-craft/xblock-mentoring
mentoring/mentoring.py
1
22696
# -*- coding: utf-8 -*- # # Copyright (C) 2014 Harvard # # Authors: # Xavier Antoviaque <xavier@antoviaque.org> # # This software's license gives you freedom; you can copy, convey, # propagate, redistribute and/or modify this program under the terms of # the GNU Affero General Public License (AGPL) as publishe...
agpl-3.0
2,307,463,548,119,067,600
37.337838
113
0.60341
false
4.379776
false
false
false
mpunkenhofer/irc-telegram-bot
telepot/telepot/__init__.py
1
39572
import sys import io import time import json import threading import traceback import collections import bisect try: import Queue as queue except ImportError: import queue # Patch urllib3 for sending unicode filename from . import hack from . import exception __version_info__ = (10, 5) __version__ = '.'.jo...
mit
-1,966,166,402,499,118,800
37.531646
131
0.550996
false
4.154105
false
false
false
ImmobilienScout24/cfn-sphere
src/main/python/cfn_sphere/template/__init__.py
1
1485
import json class CloudFormationTemplate(object): def __init__(self, body_dict, name): self.name = name self.template_format_version = body_dict.get('AWSTemplateFormatVersion', '2010-09-09') self.description = body_dict.get('Description', '') self.metadata = body_dict.get('Metadata...
apache-2.0
-3,528,714,139,985,188,400
38.078947
112
0.607407
false
3.96
false
false
false
Mangara/ArboralExplorer
lib/Cmpl/cmplServer/cmplServer/CmplGridScheduler.py
1
24624
#*********************************************************************** # This code is part of CmplServer # # Copyright (C) 2013, 2014 # Mike Steglich - Technical University of Applied Sciences # Wildau, Germany # # CmplServer is a project of the Technical University of # Applied Sciences Wildau and t...
apache-2.0
5,686,667,388,055,705,000
30.897668
201
0.610867
false
3.447774
false
false
false
nycz/gimptools
NyczAddTextOutline.py
1
1238
#!/usr/bin/env python2 from gimpfu import * ## WORKFLOW # # Right-click on layer -> alpha to selection # Grow selection by 1 pixel # Make a new empty layer # Fill selection with black # Move new layer below old layer # Merge down old layer def add_text_outline(image, layer): gimp.pdb.gimp_image_undo_group_start...
mit
-366,173,237,773,243,100
25.913043
101
0.668821
false
2.954654
false
false
false
iLoop2/ResInsight
ThirdParty/Ert/devel/python/python/ert/test/source_enumerator.py
1
2491
import os import re class SourceEnumerator(object): @classmethod def findDevRoot(cls, root_directory_name = "devel", verbose=False): dev_root = os.path.dirname(os.path.realpath(__file__)) while True: if verbose: print("Looking at: %s" % dev_root) dev_pat...
gpl-3.0
-6,384,688,368,757,242,000
33.123288
149
0.577278
false
3.729042
false
false
false
cskyan/chmannot
bin/chm_gendata.py
1
14312
#!/usr/bin/env python # -*- coding=utf-8 -*- ########################################################################### # Copyright (C) 2013-2016 by Caspar. All rights reserved. # File Name: chm_gendata.py # Author: Shankai Yan # E-mail: sk.yan@my.cityu.edu.hk # Created Time: 2016-03-01 22:15:59 ######################...
apache-2.0
-7,199,348,447,836,130,000
46.71
245
0.666015
false
2.603128
true
false
false
gawel/panoramisk
examples/fast_agi_server_ivr.py
1
1407
from pprint import pprint import asyncio from panoramisk import fast_agi loop = asyncio.get_event_loop() async def call_waiting(request): pprint(['AGI variables:', request.headers]) pprint((await request.send_command('ANSWER'))) pprint((await request.send_command('SAY DIGITS 1 \"\"'))) # To Raise a...
mit
-8,811,220,548,279,284,000
28.93617
78
0.673063
false
3.562025
false
false
false
cdman/hnarchive
app.py
1
8451
import datetime import logging import re import webapp2 from google.appengine.ext import ndb from google.appengine.api import urlfetch import bs4 class Node(ndb.Model): parent = ndb.KeyProperty('Node', indexed=False) title = ndb.StringProperty(indexed=False) url = ndb.TextProperty(indexed=False) use...
gpl-3.0
3,507,052,515,939,519,000
33.076613
102
0.636611
false
3.344282
false
false
false
jdemon519/cfme_tests
sprout/appliances/tasks.py
1
83964
# -*- coding: utf-8 -*- from __future__ import absolute_import import diaper import fauxfactory import hashlib import iso8601 import random import re import command import yaml from contextlib import closing from django.core.cache import cache from django.core.exceptions import ObjectDoesNotExist from django.core.mail...
gpl-2.0
6,819,446,563,095,956,000
41.771268
100
0.617997
false
4.081474
true
false
false
jeff-99/toolbox
toolbox/config.py
1
5198
import json import collections from .mixins import ConfigMixin from .defaults import * class ConfigManager(object): """ The config manager has the responsibility of persisting plugin configs. On initialisation it creates a default file structure in the user's home directory """ FILE_EXT = '.json' ...
isc
3,188,271,387,001,703,400
29.397661
119
0.585995
false
4.267652
true
false
false
flexpeace/btb
scanblog/scanning/views.py
1
31871
import json import datetime import tempfile import logging logger = logging.getLogger("django.request") from django.conf import settings from django.contrib import messages from django.contrib.auth.decorators import login_required, permission_required from django.contrib.contenttypes.models import ContentType from dja...
agpl-3.0
-3,211,643,835,057,357,300
38.739401
200
0.555395
false
4.451257
false
false
false
yuntae1000/SoftwareDesignFall15
Mini_project1/MP1_postfeedback.py
1
3420
#code to mining the urls from google and save it to local .txt files # using patter. to search from Google # I integrated all files in one single file after the feedback # Using functions and readable documents from pattern.web import Google import indicoio indicoio.config.api_key = '8d05933c4c2ca769d1e064dfbea1fe8a' ...
mit
-1,029,171,061,040,329,300
30.376147
98
0.713158
false
2.971329
false
false
false
ecotux/objectDetection
04saveSVM.py
1
1784
import cv2 import numpy as np import os import re ############################################# # # Gray magic: # - the value of "C" # - the value of "gamma" # - the functions "preprocess*" # C = 20 gamma = 0.0005 # # blurring image # def preprocess1(data): img = cv2.GaussianBlur(data, (5...
mit
-5,204,423,392,927,158,000
20.582278
109
0.598094
false
2.910277
false
false
false
zeroq/amun
vuln_modules/vuln-mydoom/mydoom_modul.py
1
3864
""" [Amun - low interaction honeypot] Copyright (C) [2014] [Jan Goebel] This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This ...
gpl-2.0
-7,833,382,891,770,390,000
28.272727
239
0.659161
false
3.151713
false
false
false
jgeskens/django
django/core/management/validation.py
1
23298
import collections import sys from django.conf import settings from django.core.management.color import color_style from django.utils.encoding import force_str from django.utils.itercompat import is_iterable from django.utils import six class ModelErrorCollection: def __init__(self, outfile=sys.stdout): ...
bsd-3-clause
-6,676,675,528,759,319,000
62.655738
264
0.533565
false
4.156646
false
false
false
tqchen/tvm
python/tvm/auto_scheduler/auto_schedule.py
1
7844
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
6,643,239,991,650,872,000
35.654206
100
0.666624
false
4.30989
false
false
false
jpwarren/holideck
examples/soundlevel.py
1
1766
#!/usr/bin/python """ A sound level meter for the MooresCloud Holiday. Requires PyAudio. Copyright (c) 2013, Josh Deprez License: MIT (see LICENSE for details) """ __author__ = 'Josh Deprez' __version__ = '0.01-dev' __license__ = 'MIT' import pyaudio import audioop import struct import math import holiday import sy...
mit
655,493,103,852,588,200
20.277108
65
0.665345
false
2.834671
false
false
false
beni55/Sublime-BracketGuard
BracketGuard.py
1
2769
import sublime, sublime_plugin import re from collections import namedtuple BracketPosition = namedtuple("BracketPosition", "position opener") BracketResult = namedtuple("BracketResult", "success start end") # House keeping for the async beast activeChecks = 0 dismissedChecks = 0 # scopeNames is used to...
mit
-2,855,513,871,807,219,000
25.969697
86
0.681835
false
3.9
false
false
false
kotoroshinoto/TCGA_MAF_Analysis
gooch_maf_tools/commands/analysis/get_stats/mutcount_length_linreg.py
1
4685
import rpy2.robjects.packages as rpackages import rpy2.robjects as ro import click import csv import sys from typing import List from typing import Dict from ..get_stats.util import * class GeneLinregEntry: def __init__(self, symbol: str): self.symbol = symbol self.symbol_key = symbol.casefold() self.count = 0...
unlicense
-2,991,018,952,282,382,000
33.962687
158
0.710566
false
2.909938
false
false
false
lmazuel/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_06_01/models/packet_capture_result.py
1
3902
# 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
1,933,286,419,347,813,400
44.372093
114
0.639672
false
4.026832
false
false
false
teng-lin/teng-lin.github.io
scripts/scrape_linkedin.py
1
4038
import sys import subprocess import json import re import pandas as pd from pandas import ExcelWriter _id_offset_pattern = re.compile(u'id=(\d+)&offset=(\d+)') def _decode_list(data): rv = [] for item in data: if isinstance(item, unicode): item = item.encode('utf-8') elif isinsta...
mit
2,318,859,692,451,768,300
25.220779
140
0.620109
false
3.393277
false
false
false
gutouyu/cs231n
cs231n/assignment/assignment2/cs231n/classifiers/cnn.py
1
6283
from builtins import object import numpy as np from cs231n.layers import * from cs231n.fast_layers import * from cs231n.layer_utils import * class ThreeLayerConvNet(object): """ A three-layer convolutional network with the following architecture: conv - relu - 2x2 max pool - affine - relu - affine - sof...
mit
6,995,892,720,637,449,000
48.865079
100
0.482572
false
4.354123
false
false
false
rwblair/cogat
cognitive/apps/atlas/test_urls.py
1
4234
from django.core.urlresolvers import resolve from django.test import TestCase class AtlasUrlTestCase(TestCase): def test_all_concepts(self): found = resolve('/concepts') self.assertEqual(found.view_name, 'all_concepts') def test_all_tasks(self): found = resolve('/tasks') self.a...
mit
-143,582,583,258,756,080
35.188034
113
0.630846
false
3.442276
true
false
false
twosigma/Cook
cli/cook/subcommands/usage.py
1
12216
import json import sys from tabulate import tabulate from cook import http, terminal from cook.format import format_job_memory, format_memory_amount from cook.querying import query_across_clusters, make_job_request from cook.util import guard_no_cluster, current_user, print_info, print_error def get_job_data(cluste...
apache-2.0
-8,236,608,904,435,405,000
41.416667
116
0.580959
false
3.953398
false
false
false
Karajlug/karajlug
news/models.py
1
2584
# coding: utf-8 # ----------------------------------------------------------------------------- # Karajlug.org # Copyright (C) 2010-2012 Karajlug community # # 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 # th...
gpl-2.0
-4,674,412,820,575,546,000
34.888889
79
0.560759
false
4.201626
false
false
false
Sabinu/IDA
IDA.py
1
12694
import sublime import sublime_plugin import os.path # import filecmp # import shutil # import time # import json from subprocess import Popen, PIPE from collections import namedtuple as nt import xml.etree.ElementTree as ET import webbrowser import urllib scripts = {"Script_1D": "0 Master Script", "Script...
mit
7,978,942,153,967,970,000
37.583587
125
0.520561
false
4.019633
false
false
false
gt-ros-pkg/rcommander-pr2
rcommander_ar_tour/src/rcommander_ar_tour/detect_robot_move.py
1
1925
import sensor_msgs.msg as sm import numpy as np import copy import rospy class DetectRobotMove: JOINT_TO_WATCH = ['fl_caster_rotation_joint', 'fl_caster_l_wheel_joint', 'fl_caster_r_wheel_joint', 'fr_caster_rotation_joint', 'fr_caster_l_wheel_joint', 'fr_caster_r_w...
bsd-3-clause
-4,458,813,909,213,405,000
40.847826
174
0.58026
false
3.176568
false
false
false
airanmehr/Utils
Hyperoxia.py
1
10317
import numpy as np import pandas as pd pd.options.display.expand_frame_repr = False import UTILS.Util as utl import UTILS.Plots as pplt import pylab as plt import seaborn as sns path=utl.home+'storage/Data/Dmelanogaster/OxidativeStress/' CHROMS=['2L','2R','3L','3R','X','4'] pops={'C':'Control','H':'Hyperoxia','L':'Hy...
mit
-7,256,639,315,684,374,000
38.231939
190
0.557817
false
2.601362
false
false
false
bil9000/dust
volume_snapshot.py
1
1605
import boto3 #Describe your regions here region_list = ['us-west-2'] #For creating snapshots def create_snapshot(volume): Description='Created for volume '+volume client = boto3.client('ec2') response = client.create_snapshot( DryRun=False, VolumeId=volume, Description=Descriptio...
apache-2.0
-278,141,583,924,431,840
28.740741
66
0.523988
false
4.445983
false
false
false
DailyActie/Surrogate-Model
01-codes/pyOpt-1.2.0/pyOpt/pyMMA/pyMMA.py
1
19464
#!/usr/bin/env python ''' pyMMA - A Python pyOpt interface to MMA. Copyright (c) 2008-2014 by pyOpt Developers All rights reserved. Revision: 1.4 $Date: 21/06/2010 21:00$ Tested on: --------- Linux with g77 Linux with gfortran Linux with pathf95 Win32 with g77 Mac with g95 Developers: ----------- - Mr. Andrew La...
mit
4,926,176,408,482,124,000
32.500861
113
0.457357
false
4.011542
false
false
false
sonofatailor/django-oscar
src/oscar/apps/dashboard/vouchers/forms.py
1
3559
from django import forms from django.utils.translation import ugettext_lazy as _ from oscar.core.loading import get_model from oscar.forms import widgets Voucher = get_model('voucher', 'Voucher') Benefit = get_model('offer', 'Benefit') Range = get_model('offer', 'Range') class VoucherForm(forms.Form): """ A...
bsd-3-clause
1,842,963,705,503,461,600
35.690722
78
0.602135
false
4.231867
false
false
false
mabrosim/mGerritStats
gerrit_stats.py
1
6247
#!/usr/bin/python3 """ Copyright (c) 2014, Maxim Abrosimov All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of c...
bsd-3-clause
-9,002,832,067,118,284,000
32.951087
103
0.637746
false
4.083007
false
false
false
adaptivdesign/odooku-compat
odooku/services/wsgi/rules.py
1
2508
import os.path import json import re from urlparse import urlparse, urlunparse import logging from werkzeug.wsgi import get_current_url from werkzeug.utils import redirect _logger = logging.getLogger(__name__) class BadMatchPattern(Exception): pass def build_url_regex(pattern): regex = "^" # Build ...
apache-2.0
-4,900,918,993,625,054,000
25.680851
92
0.588118
false
3.949606
false
false
false
Diacamma2/financial
setup.py
1
2722
# -*- coding: utf-8 -*- ''' setup module to pip integration of Diacamma accounting @author: Laurent GAY @organization: sd-libre.fr @contact: info@sd-libre.fr @copyright: 2015 sd-libre.fr @license: This file is part of Lucterios. Lucterios is free software: you can redistribute it and/or modify it under the terms of t...
gpl-3.0
-5,390,551,900,232,317,000
37.885714
88
0.649155
false
3.754483
false
false
false
Quantipy/quantipy
quantipy/core/builds/powerpoint/pptx_painter.py
1
52718
# encoding: utf-8 ''' @author: Majeed.sahebzadha ''' from __future__ import unicode_literals import copy import time import numpy as np import pandas as pd import quantipy as qp from os import path from collections import OrderedDict from pptx import Presentation from quantipy.core.cluster import Cluster from quantip...
mit
-3,561,614,369,308,608,000
43.263644
187
0.393509
false
5.346111
false
false
false
Spurlock/loveletter
engine.py
1
14563
""" NOTES AND DEFINITIONS round: each time an affection token is given, one round has ended game: each time a player reaches AFFECTION_GOAL, one game has ended match: a set of games, ending at a given number of wins deck = [CARD_RANK, CARD_RANK, ..., CARD_RANK] # burner is not separate, is just the last card player_...
mit
-6,736,501,290,146,427,000
33.265882
133
0.606468
false
3.589598
false
false
false
netsamir/dotfiles
files/vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/__main__.py
1
5997
# Copyright (C) 2013 Google Inc. # # This file is part of ycmd. # # ycmd is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # ycmd is di...
unlicense
541,239,393,013,748,600
31.770492
80
0.677505
false
3.805203
false
false
false
ellisonbg/altair
altair/vegalite/tests/test_common.py
1
2712
"""Tests of functionality that should work in all vegalite versions""" import pytest import pandas as pd from .. import v1, v2 v1_defaults = { 'width': 400, 'height': 300 } v2_defaults = { 'config': { 'view': { 'height': 300, 'width': 400 } } } basic_spec = ...
bsd-3-clause
-2,823,563,517,079,322,600
23.880734
74
0.580383
false
3.21327
true
false
false
maruqu/flask-jsonapi
flask_jsonapi/response.py
1
2412
import http import json from flask import helpers class BaseResponse: def __init__(self, headers=None, status=None): self.status = status or http.HTTPStatus.OK self.headers = headers or {} def make_response(self): response = helpers.make_response( self.get_content(), ...
bsd-3-clause
-8,647,365,526,588,198,000
27.046512
100
0.623964
false
3.986777
false
false
false
basilfx/Happening-eetlijst
server.py
1
3840
from flask import request, abort, jsonify, Flask from werkzeug.contrib.cache import SimpleCache, RedisCache from datetime import datetime import pytz import cPickle import eetlijst import calendar import functools # App definition app = Flask(__name__) app.debug = True # Use simple cache for cli-mode. For WSGI mod...
mit
2,811,164,308,548,508,000
24.952703
80
0.605469
false
3.995838
false
false
false
joshbressers/cve-analysis
check-url.py
1
2597
#!/usr/bin/env python import sys from elasticsearch import Elasticsearch import requests from queue import Queue import threading # Setup some queues global total_size global url_q global count_q url_q = Queue() url_q.maxsize = 1000 count_q = Queue() q_threads = 8 class Reference: "CVE References class" def...
gpl-3.0
-8,219,658,797,768,336,000
23.5
104
0.576434
false
3.547814
false
false
false
nickw444/quadcopter
single_prop/PIDTest.py
1
1390
#!/usr/bin/env python3 from BasicPID import BasicPID2, VideoPID from RPIO import PWM from MiniMu9 import Accelerometer from MotorControl import MotorControl import sys import time PWM.set_loglevel(PWM.LOG_LEVEL_ERRORS) servo = PWM.Servo(pulse_incr_us=1) PWM_MAX = 2000 PWM_MIN = 1000 PWM_RANGE = PWM_MAX - PWM_MIN ...
gpl-3.0
-8,715,218,448,289,010,000
22.559322
140
0.701439
false
3.075221
false
false
false
apache/incubator-datafu
datafu-spark/src/main/resources/pyspark_utils/bridge_utils.py
2
2961
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
3,148,224,414,666,694,000
40.125
122
0.716988
false
3.796154
false
false
false
arpan-chavda/rh_app
libs/venus/planet/shell/dj.py
1
1662
import os.path import urlparse import datetime import tmpl from planet import config def DjangoPlanetDate(value): return datetime.datetime(*value[:6]) # remap PlanetDate to be a datetime, so Django template authors can use # the "date" filter on these values tmpl.PlanetDate = DjangoPlanetDate def run(script, d...
gpl-3.0
7,470,166,845,927,974,000
31.588235
72
0.669073
false
4.053659
true
false
false
joshrabinowitz/bitcoin
test/functional/test_framework/messages.py
1
39921
#!/usr/bin/env python3 # Copyright (c) 2010 ArtForz -- public domain half-a-node # Copyright (c) 2012 Jeff Garzik # Copyright (c) 2010-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Bitcoin test...
mit
287,877,331,666,698,980
28.246154
262
0.576188
false
3.446516
false
false
false
RoboticsClubatUCF/RoboSub
ucf_sub_catkin_ros/src/sub_vision/src/particle.py
1
1397
import math import numpy as np import random def initParticles(particleNum, imageHeight, imageWidth): particles = np.zeros((particleNum,3), dtype=float) for i in range(particleNum): particles[i][0] = random.randint(0,imageWidth) particles[i][1] = random.randint(0,imageHeight) particles[i][2] = 0 return par...
mit
-780,931,888,643,623,800
28.104167
86
0.718683
false
2.959746
false
false
false
mcjug2015/mfserver2
django_app/services/user_service.py
1
4947
''' user services module ''' # pylint: disable=no-member import logging import random import string import django.core.mail as django_mail from django.contrib.auth.models import User from django.utils import timezone from django.http.response import HttpResponseForbidden from django_app.models import UserConfirmation L...
gpl-3.0
8,109,688,632,868,514,000
37.952756
108
0.642612
false
4.074959
false
false
false
deep-compute/django-yada
setup.py
1
1803
from setuptools import setup, find_packages import os HERE = os.path.abspath(os.path.dirname(__file__)) def get_long_description(): dirs = [ HERE ] if os.getenv("TRAVIS"): dirs.append(os.getenv("TRAVIS_BUILD_DIR")) long_description = "" for d in dirs: rst_readme = os.path.join(d, "REA...
mit
5,523,698,637,969,473,000
30.631579
84
0.621187
false
3.911063
false
false
false
kizbitz/train
train/vpc/config.py
2
3380
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import amis def check_env(env, default=None): """Check/Set environment variables""" if not os.environ.get(env) and not default: print "Error: '{0}' environment variable not set".format(env) sys.exit() return os.environ....
apache-2.0
-8,407,919,099,661,274,000
23.671533
121
0.602959
false
3.067151
false
false
false
pombredanne/git-git.fedorahosted.org-git-pyrpm
tests/coverage.py
1
21827
#!/usr/bin/python # # Perforce Defect Tracking Integration Project # <http://www.ravenbrook.com/project/p4dti/> # # COVERAGE.PY -- COVERAGE TESTING # # Gareth Rees, Ravenbrook Limited, 2001-12-04 # # # 1. INTRODUCTION # # This module provides coverage testing for P...
gpl-2.0
-8,898,638,311,535,234,000
34.376013
74
0.570028
false
3.965661
false
false
false
peterheim1/robbie
bin/robbie_brain.py
1
4654
#!/usr/bin/env python # coding: utf-8 # # Software License Agreement (GPLv2 License) # # Copyright (c) 2011 Thecorpora, S.L. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of...
gpl-3.0
-1,518,513,515,117,545,500
27.906832
144
0.609368
false
3.881568
false
false
false
tuturto/pyherc
src/pyherc/test/builders/action.py
1
12422
# -*- coding: utf-8 -*- # Copyright (c) 2010-2017 Tuukka Turto # # 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,...
mit
-5,472,398,915,691,913,000
27.821346
81
0.585815
false
4.518734
true
false
false
pivotal-energy-solutions/django-appsearch
demo_app/users/search.py
1
1036
# -*- coding: utf-8 -*- """search.py: Django """ import logging from django.contrib.auth import get_user_model from appsearch.registry import ModelSearch, search __author__ = "Steven Klass" __date__ = "08/07/2019 21:59" __copyright__ = "Copyright 2011-2020 Pivotal Energy Solutions. All rights reserved." __credits...
apache-2.0
7,934,878,455,402,386,000
20.142857
84
0.527027
false
3.535836
false
false
false
vipints/genomeutils
pairwise_distance/seq_alignment_run.py
1
2256
#!/usr/bin/env python """ Program to run different multiple sequence alignment programs. Requirement: mafft - http://mafft.cbrc.jp/alignment/server/index.html clustalw2 - http://www.ebi.ac.uk/Tools/msa/clustalw2/ install these packages and set the path correctly if it is not a standard one. """ impo...
bsd-3-clause
-536,085,624,397,585,540
29.90411
129
0.64805
false
3.317647
false
false
false
AntonioMtn/NZBMegaSearch
werkzeug/contrib/atom.py
1
14958
# -*- coding: utf-8 -*- """ werkzeug.contrib.atom ~~~~~~~~~~~~~~~~~~~~~ This module provides a class called :class:`AtomFeed` which can be used to generate feeds in the Atom syndication format (see :rfc:`4287`). Example:: def atom_feed(request): feed = AtomFeed("My Blog", feed...
gpl-2.0
-2,882,186,171,540,563,000
42.609329
78
0.550809
false
4.050366
false
false
false
openmotics/gateway
src/gateway/migrations/orm/019_fix_user_foreign_keys.py
1
4180
# Copyright (C) 2021 OpenMotics BV # # 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, either version 3 of the # License, or (at your option) any later version. # # This program is distribu...
agpl-3.0
-7,860,201,654,605,407,000
38.065421
113
0.663158
false
3.899254
false
false
false
Pajn/RAXA-Django
RAXA/urls.py
1
1596
''' Copyright (C) 2013 Rasmus Eneman <rasmus@eneman.eu> 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, either version 3 of the License, or (at your option) any later version. This program is...
agpl-3.0
5,589,374,140,238,752,000
37.02381
79
0.692982
false
3.685912
false
false
false
tuffery/Frog2
frowns/extensions/vflib/NetworkGraph/test.py
1
1347
from NetworkGraph.GraphObject import GraphObject N = GraphObject() print N.handle M = GraphObject() print M.handle print N == M print N is M print N.handle == M.handle from NetworkGraph.Graph import Graph g = Graph() from NetworkGraph.GraphObject import GraphNode node1 = GraphNode() node2 = GraphNode(label="blue") prin...
gpl-3.0
-3,975,437,605,503,335,000
24.903846
64
0.743875
false
2.915584
false
false
false
Azure/azure-sdk-for-python
sdk/datalake/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/catalog/models/usql_procedure_py3.py
1
2005
# 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,115,003,405,439,517,000
41.659574
181
0.611471
false
4.050505
false
false
false
singhdev/streamparse
streamparse/ipc.py
1
8967
""" Utilities for interprocess communication between Python and Storm. """ from __future__ import absolute_import, print_function, unicode_literals try: import simplejson as json except ImportError: import json import logging import logging.handlers import os import sys from collections import deque from threa...
apache-2.0
6,611,379,435,026,955,000
31.966912
143
0.597413
false
3.880138
false
false
false
beni55/pre-commit
setup.py
1
1759
from setuptools import find_packages from setuptools import setup setup( name='pre_commit', description=( 'A framework for managing and maintaining multi-language pre-commit ' 'hooks.' ), url='https://github.com/pre-commit/pre-commit', version='0.5.5', author='Anthony Sottile'...
mit
4,702,655,874,889,281,000
29.327586
96
0.563388
false
4.062356
false
false
false
woopsi/newbie-app-install
src/main_functions.py
1
2603
import os,fnmatch from gi.repository import Gtk, GObject,GdkPixbuf def get_app_info_path(code): home_path = os.path.expanduser('~/') return{ 1: home_path + ".ap_helper/info/1/", 2: home_path + ".ap_helper/info/2/", 3: home_path + ".ap_helper/info/3/", 4: home_path + ".ap_hel...
gpl-3.0
-1,004,511,021,433,330,200
33.706667
135
0.608144
false
2.911633
false
false
false
hugo-lorenzo-mato/meteo-galicia-db
django/www/MeteoGaliciaDB/registros/views.py
1
2191
from django.shortcuts import render from . import forms from django.core.urlresolvers import reverse from django.contrib.auth.decorators import login_required from django.http import HttpResponse, HttpResponseRedirect from django.contrib.auth import authenticate,login,logout # Create your views here. @login_required...
mit
-4,794,422,289,503,203,000
32.166667
136
0.640311
false
4.183556
false
false
false
dstufft/warehouse
warehouse/csrf.py
1
2444
# 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 Li...
apache-2.0
1,147,295,129,712,310,300
39.065574
81
0.713584
false
4.100671
false
false
false
mathemage/h2o-3
h2o-py/h2o/model/metrics_base.py
1
25978
# -*- encoding: utf-8 -*- """ Regression model. :copyright: (c) 2016 H2O.ai :license: Apache License Version 2.0 (see LICENSE for details) """ from __future__ import absolute_import, division, print_function, unicode_literals import imp from h2o.model.confusion_matrix import ConfusionMatrix from h2o.utils.backward...
apache-2.0
4,609,477,976,568,163,300
36.758721
120
0.604319
false
3.928323
false
false
false
pegasus-isi/pegasus
share/pegasus/examples/grid-blackdiamond-python/blackdiamond.py
1
2722
#!/usr/bin/env python3 from Pegasus.DAX3 import * import sys import os if len(sys.argv) != 2: print "Usage: %s PEGASUS_HOME" % (sys.argv[0]) sys.exit(1) # Create a abstract dag diamond = ADAG("diamond") # Add input file to the DAX-level replica catalog a = File("f.a") a.addPFN(PFN("file://" + os.getcwd() + "/f.a"...
apache-2.0
2,515,423,209,064,240,600
33.455696
123
0.713446
false
2.69505
false
true
false
kHarshit/DAT210x_Microsoft
Module2/sunspots.py
1
1053
import numpy as np import matplotlib.pyplot as plt import pandas as pd df = pd.read_csv('Datasets/SN_d_tot_V2.0.csv') # print(df) """ CSV file doesn't have column labels Column 1-3: Gregorian calendar date Column 4: Date in fraction of year Column 5: Daily total sunspot number. A value of -1 indicates that ...
mit
-5,525,578,550,921,758,000
45.863636
129
0.702754
false
3.025862
false
false
false
semenzato/trunks
ttl_generator.py
2
24570
#!/usr/bin/python # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # # Originally written by Mario and Luigi at Google. """A code generator for TPM utility functions. The generator inputs the Trouse...
bsd-3-clause
1,337,511,305,563,541,800
29.446097
79
0.649206
false
3.354266
false
false
false
vtemian/git-to-trello
github/hook.py
1
1448
import json from flask import Blueprint, render_template, request import requests import config from tracker.API import TrackerAPI hook = Blueprint('hooks', __name__, 'templates') @hook.route('/github/hook') def home(): return render_template('new.html') @hook.route('/github/hook/new', methods=['POST']) def new(...
mit
440,589,313,761,384,800
25.814815
78
0.620166
false
3.43128
false
false
false
eberle1080/tesserae-ng
website/tesserae_ng/forms.py
1
2640
from django import forms import logging from website.tesserae_ng.models import SourceTextVolume logger = logging.getLogger(__name__) class SourceTextSubmitForm(forms.Form): LANGUAGE_CHOICES = ( ('latin', 'Latin'), ('greek', 'Greek'), ('english', 'English') ) def _boundText(auto...
bsd-2-clause
3,137,745,687,063,789,600
46.142857
108
0.675758
false
3.760684
false
false
false
ebroder/anygit
anygit/client/git_parser.py
1
5600
#!/usr/bin/python import os import subprocess import sys import tempfile from dulwich import pack DIR = os.path.abspath(os.path.dirname(__file__)) UNPACK_DIR = os.path.join(DIR, '../../tmp/unpack') GIT_CMD = os.path.join(DIR, '../../pkgs/git/git') types = {'t' : 'tree', 'b' : 'blob', 'c' : 'commit', 'a' : 'tag'} cl...
mit
-6,383,588,600,727,762,000
28.62963
93
0.503036
false
3.786342
false
false
false
altai/focus2
focus2/utils/jinja.py
1
3386
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Focus2 # Copyright (C) 2012 Grid Dynamics Consulting Services, Inc # All Rights Reserved # # 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; e...
lgpl-2.1
7,323,760,017,044,286,000
30.943396
77
0.623449
false
3.556723
false
false
false
rishubhjain/commons
tendrl/commons/event.py
1
2085
import struct from gevent import socket from gevent.socket import error as socket_error from gevent.socket import timeout as socket_timeout import sys from tendrl.commons.message import Message from tendrl.commons.logger import Logger import traceback class Event(object): def __init__(self, message, socket_path=...
lgpl-2.1
5,323,745,002,074,403,000
34.948276
73
0.573621
false
3.889925
false
false
false
tedunderwood/horizon
logistic/reproduce_poetic_prestige.py
1
8056
#!/usr/bin/env python3 # reproduce.py import csv, os, sys, pickle, math import versatiletrainer as train import pandas as pd # sourcefolder = # extension = # metadatapath = # outputpath = '/Users/tunder/Dropbox/GenreProject/python/reception/fiction/predictions.csv' def genre_gridsearch(modelname, ...
mit
2,061,403,125,019,920,400
40.740933
178
0.676514
false
3.585225
true
false
false
pbdeuchler/deaddrop
deaddrop/settings.py
1
5647
import sys, os import dj_database_url # PATH vars here = lambda *x: os.path.join(os.path.abspath(os.path.dirname(__file__)), *x) PROJECT_ROOT = here("") root = lambda *x: os.path.join(os.path.abspath(PROJECT_ROOT), *x) sys.path.insert(0, root('apps')) SENDGRID_API_KEY = os.environ["SENDGRID_API_KEY"] TWILIO_ACCOUN...
bsd-3-clause
3,880,424,737,240,773,000
24.668182
95
0.618736
false
3.416213
false
false
false
acil-bwh/SlicerCIP
Scripted/CIP_LesionModel/FeatureExtractionLib/ParenchymalVolume.py
1
3862
from __main__ import vtk, qt, ctk, slicer import numpy as np from collections import OrderedDict class ParenchymalVolume: def __init__(self, parenchymaLabelmapArray, sphereWithoutTumorLabelmapArray, spacing, keysToAnalyze=None): """ Parenchymal volume study. Compare each ones of the different label...
bsd-3-clause
-4,590,892,784,457,792,000
44.435294
121
0.667012
false
4.027112
false
false
false
RecipeML/Recipe
utils/partitionpy/progress.py
1
1067
# This Python file uses the following encoding: utf-8 # coding: utf-8 import sys # Print iterations progress def printProgress (iteration, total, prefix = '', suffix = '', decimals = 1, barLength = 20): """ Call in a loop to create terminal progress bar @params: iteration - Required : current i...
gpl-3.0
9,108,792,661,962,851,000
41.6
93
0.612207
false
3.790036
false
false
false
4degrees/segue
source/segue/frontend/exporter.py
1
5730
# :coding: utf-8 # :copyright: Copyright (c) 2013 Martin Pengelly-Phillips # :license: See LICENSE.txt. import traceback from PySide import QtGui from .selector import SelectorWidget from .options import OptionsWidget from .worker import Worker from ..backend.processor.foreground import ForegroundProcessor class E...
apache-2.0
1,471,412,097,358,342,700
31.556818
77
0.578883
false
4.547619
false
false
false
ooici/coi-services
ion/agents/data/test/test_dsa_moas_ctdgv.py
1
4167
#!/usr/bin/env python """ @package ion.agents.data.test.test_moas_ctdgv @file ion/agents/data/test_moas_ctdgv @author Bill French @brief End to end testing for moas ctdgv """ __author__ = 'Bill French' import gevent import os from pyon.public import log from nose.plugins.attrib import attr from ion.agents.data.tes...
bsd-2-clause
-7,171,835,464,924,616,000
36.205357
214
0.631629
false
3.260563
true
false
false
ibab/tensorprob
tensorprob/distribution.py
1
4055
from collections import Iterable import numpy as np import tensorflow as tf from . import config from . import utilities from .model import Description, Model, ModelError, Region class DistributionError(Exception): pass def _parse_bounds(num_dimensions, lower, upper, bounds): def _parse_bounds_1D(lower, u...
mit
-929,911,865,791,577,300
36.546296
91
0.603699
false
4.398048
false
false
false
uq-eresearch/uqam
subcollections/models.py
1
13830
from django.db import models from datetime import datetime from django.db.models.signals import post_save, post_delete from cat.models import Category from location.models import GlobalRegion, Country, StateProvince, RegionDistrict, Locality from django.utils.xmlutils import SimplerXMLGenerator from django.core.urlreso...
bsd-3-clause
478,843,069,451,846,800
36.378378
100
0.617137
false
4.053341
false
false
false
hasgeek/funnel
migrations/versions/d0097ec29880_fix_membership_granted_by.py
1
1147
"""Fix membership granted_by. Revision ID: d0097ec29880 Revises: bd465803af3a Create Date: 2021-04-22 05:20:50.774828 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'd0097ec29880' down_revision = 'bd465803af3a' branch_labels = None depends_on = None def upgr...
agpl-3.0
5,611,952,987,367,919,000
21.057692
86
0.617262
false
3.344023
false
false
false
nextgis/ngw_external_api_python
core/ngw_resource.py
1
5940
# -*- coding: utf-8 -*- """ /*************************************************************************** NextGIS WEB API ------------------- begin : 2014-11-19 git sha : $Format:%H$ copyright : (C) 2014 by NextGIS e...
gpl-2.0
3,923,616,607,574,778,000
33.137931
129
0.543098
false
3.907895
false
false
false
heyglen/netobj
nettool/host.py
1
2534
# -*- coding: utf-8 -*- from nettool.hostname import Hostname from nettool.hostname_list import HostnameList from nettool.utilities import raise_type_exception class Host(HostnameList): """ Represents all the names and IPs referring to the same host """ def __init__(self, value, ip=None): super(Host...
mit
8,635,459,251,104,732,000
33.243243
93
0.579321
false
4.339041
false
false
false
Bam4d/neon
examples/imagenet_allcnn.py
1
4337
#!/usr/bin/env python # ---------------------------------------------------------------------------- # Copyright 2015 Nervana Systems 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 # # ...
apache-2.0
-934,133,652,730,482,200
38.788991
98
0.669126
false
3.450278
false
false
false
lukaszb/django-richtemplates
example_project/examples/admin.py
1
1099
from django import forms from django.contrib import admin from examples.models import Task, Status, Project, Priority from richtemplates.forms import RestructuredTextAreaField class TaskFormAdmin(forms.ModelForm): content = RestructuredTextAreaField() class Meta: model = Task class TaskAdmin(admin....
bsd-3-clause
326,583,783,829,779,600
26.475
77
0.705187
false
3.687919
false
false
false
mcbor/adventofcode
2017/09a.py
1
4643
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ 09a.py ~~~~~~ Advent of Code 2017 - Day 9: Stream Processing Part One A large stream blocks your path. According to the locals, it's not safe to cross the stream at the moment because it's full of garbage. You look down at the stream; rathe...
mit
3,018,516,245,006,827,000
29.748344
79
0.56149
false
3.624512
false
false
false
larsyencken/csvdiff
csvdiff/__init__.py
1
8525
#!/usr/bin/env python # -*- coding: utf-8 -*- # # __init__.py # csvdiff # import sys from typing.io import TextIO import io import click from . import records, patch, error __author__ = 'Lars Yencken' __email__ = 'lars@yencken.org' __version__ = '0.3.1' # exit codes for the command-line EXIT_SAME = 0 EXIT_DIFF...
bsd-3-clause
3,120,723,631,916,017,000
33.1
96
0.602698
false
3.812612
false
false
false
ResolveWang/algrithm_qa
arrandmatrix/q5.py
1
1037
""" 给定一个无序数组arr,求出需要排序的最短子数组长度。 例如: arr=[1, 5, 3, 4, 2, 6, 7],返回4,因为只有[5, 3, 2, 4]需要排序。 """ class ShortestSubarr: @classmethod def get_shortest_subarr(cls, arr): if not arr or len(arr) == 1: return 0 length = len(arr) max_index = -1 index = length - 1 min_va...
mit
4,220,207,234,826,846,000
22.512195
68
0.464174
false
2.963077
false
false
false
gongbudaizhe/bilib
demos/minion_interrogation/solution.py
1
1039
# This problem can be really computational expensive if we simply traverse all # the possible orderings (50! = 3.0414093e+64) # Instead, we observe that if two adjacent minions(m[i], m[i+1]) in the ordering # with property(t[i], t[i+1], t is the time the minion takes to complete the # task) and (p[i], p[i+1], p is prob...
mit
-1,202,021,335,986,941,400
38.961538
80
0.628489
false
2.838798
false
false
false
yo-alan/personal
v/ui_editar.py
1
11697
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '/home/alan/dev/personal/v/ui_editar.ui' # # Created: Sat Jan 31 18:27:20 2015 # by: PyQt4 UI code generator 4.9.1 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QSt...
mit
4,544,980,707,808,152,000
68.595238
139
0.729644
false
3.384081
false
false
false
soasme/wikisensei
wikisensei/wiki/migrations/0001_initial.py
1
1769
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-04-12 08:39 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations...
gpl-3.0
-5,097,590,489,198,971,000
35.854167
122
0.568683
false
4.411471
false
false
false
tchellomello/home-assistant
tests/components/homematicip_cloud/test_device.py
1
8283
"""Common tests for HomematicIP devices.""" from homematicip.base.enums import EventType from homeassistant.components.homematicip_cloud import DOMAIN as HMIPC_DOMAIN from homeassistant.components.homematicip_cloud.hap import HomematicipHAP from homeassistant.const import STATE_ON, STATE_UNAVAILABLE from homeassistant...
apache-2.0
-8,402,342,774,571,276,000
33.227273
88
0.683569
false
3.154227
true
false
false
yeming233/rally
rally/plugins/openstack/scenarios/cinder/volume_backups.py
1
2728
# All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
apache-2.0
-3,003,851,158,195,206,000
44.466667
78
0.70088
false
4.158537
false
false
false
MapQuest/mapquest-osm-server
src/python/frontend/maphandler.py
1
7622
# Copyright (c) 2011 AOL Inc. All Rights Reserved. # # 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, merg...
mit
5,400,930,514,382,168,000
32.875556
77
0.581737
false
3.865112
false
false
false
matus-stehlik/glowing-batman
problems/migrations/0005_auto__add_field_usersolution_score.py
1
16422
# -*- 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): # Adding field 'UserSolution.score' db.add_column(u'problems_usersolution...
mit
1,788,266,054,158,258,400
82.790816
230
0.563512
false
3.618775
false
false
false