repo_name
stringlengths
6
90
path
stringlengths
4
230
copies
stringlengths
1
4
size
stringlengths
4
7
content
stringlengths
734
985k
license
stringclasses
15 values
hash
int64
-9,223,303,126,770,100,000
9,223,233,360B
line_mean
float64
3.79
99.6
line_max
int64
19
999
alpha_frac
float64
0.25
0.96
autogenerated
bool
1 class
ratio
float64
1.5
8.06
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
elentarion/RatticWeb
cred/models.py
1
9946
from django.db import models from django.db.models import Q from django.contrib import admin from django.contrib.auth.models import User, Group from django.utils.translation import ugettext_lazy as _ from django.forms.models import model_to_dict from django.utils.timezone import now from django.conf import settings fr...
gpl-2.0
-8,408,770,771,909,522,000
37.550388
196
0.639151
false
3.760302
true
false
false
dkalashnik/failorama
manage.py
2
1926
import logging import sys import click from crawler import staging from crawler import iso from jenkins_reporting import application from jenkins_reporting import db from jenkins_reporting.extensions import db as flask_db log = logging.getLogger(__name__) def _create_app(): conf = 'jenkins_reporting.config.Pr...
apache-2.0
-5,623,750,848,718,134,000
23.379747
75
0.646417
false
3.495463
false
false
false
gnumdk/eolie
eolie/webview_signals_js.py
1
5255
# Copyright (c) 2017 Cedric Bellegarde <cedric.bellegarde@adishatz.org> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. ...
gpl-3.0
2,208,811,027,702,941,000
38.216418
79
0.56803
false
4.177266
false
false
false
videntity/json-data-tools
jdt/ndjson2mongo.py
1
4151
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: ai ts=4 sts=4 et sw=4 # Alan Viars import argparse import json from collections import OrderedDict from pymongo import MongoClient import ndjson def ndjson2mongo(ndjsonfile, database_name, collection_name, delete_collection_before...
gpl-2.0
-8,430,091,397,081,532,000
32.208
112
0.573838
false
4.248721
false
false
false
robocoder/zaproxy
python/api/src/zapv2/context.py
1
3346
# Zed Attack Proxy (ZAP) and its related class files. # # ZAP is an HTTP/HTTPS proxy for assessing web application security. # # Copyright 2014 the ZAP development team # # 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...
apache-2.0
5,229,967,221,578,129,000
39.804878
170
0.662582
false
3.950413
false
false
false
reimandlab/Visualisation-Framework-for-Genome-Mutations
website/search/gene.py
1
9179
from abc import ABC, abstractmethod from collections import defaultdict from Levenshtein import distance from sqlalchemy import and_ from werkzeug.utils import cached_property from models import Protein, UniprotEntry, ProteinReferences from models import Gene from database import db class GeneMatch: def __init...
lgpl-2.1
3,878,493,219,177,686,500
24.217033
85
0.597342
false
3.989135
false
false
false
hellowebbooks/hellowebbooks-website
books/management/commands/check_customer_added.py
1
1478
import os import csv from django.contrib.auth.models import User from django.core.management.base import BaseCommand def import_csv(path='customers.csv'): csv_rows = [] # import csv print("Importing CSV.") with open(path, 'r') as f: reader = csv.reader(f) for row in reader: ...
mit
1,988,383,114,559,117,300
23.633333
93
0.579161
false
3.789744
false
false
false
mikenawrocki/amt
amt/wsman.py
2
10401
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
apache-2.0
5,007,466,193,341,634,000
46.711009
276
0.702432
false
2.755232
true
false
false
tritemio/FRETBursts
fretbursts/burstlib.py
1
134993
# # FRETBursts - A single-molecule FRET burst analysis toolkit. # # Copyright (C) 2013-2016 The Regents of the University of California, # Antonino Ingargiola <tritemio@gmail.com> # """ This module contains all the main FRETBursts analysis functions. `burstslib.py` defines the fundamental object `Data()`...
gpl-2.0
-2,943,459,112,651,748,000
41.397299
82
0.559333
false
3.487831
false
false
false
benschmaus/catapult
telemetry/telemetry/web_perf/metrics/single_event.py
14
1784
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.value import improvement_direction from telemetry.value import list_of_scalar_values from telemetry.web_perf.metrics import timeline_based_met...
bsd-3-clause
7,335,194,797,226,225,000
37.782609
78
0.704596
false
4.148837
false
false
false
naototty/pyflag
src/plugins_old/NetworkForensics/ProtocolHandlers/DNS.py
5
10103
# ****************************************************** # Copyright 2004: Commonwealth of Australia. # # Michael Cohen <scudette@users.sourceforge.net> # # ****************************************************** # Version: FLAG $Version: 0.87-pre1 Date: Thu Jun 12 00:48:38 EST 2008$ # *********************************...
gpl-2.0
7,812,122,747,221,037,000
39.250996
941
0.55627
false
3.486197
true
false
false
thautwarm/Recognition
PedestrianRecognition/Question2/Q2Support.py
1
1228
# -*- coding: utf-8 -*- """ Created on Sun May 14 18:01:07 2017 @author: thautwarm """ import numpy as np def getData(X,F,window=(30,30),N=10): Y=[] windowGen=[] # ysets= np.unique(F) def toY(i,j): windowGen.append([i,j,window[0],window[1]]) Y.append(np.sum(F[i:i+window[0],j:j+wind...
mit
8,145,719,118,561,977,000
24.081633
78
0.545603
false
2.403131
false
false
false
openai/baselines
baselines/common/mpi_adam_optimizer.py
1
3976
import numpy as np import tensorflow as tf from baselines.common import tf_util as U from baselines.common.tests.test_with_mpi import with_mpi from baselines import logger try: from mpi4py import MPI except ImportError: MPI = None class MpiAdamOptimizer(tf.train.AdamOptimizer): """Adam optimizer that avera...
mit
5,499,548,694,971,151,000
43.177778
117
0.637324
false
3.398291
false
false
false
ceache/treadmill
lib/python/treadmill/cli/admin/krb/forward.py
1
2023
"""Admin forward Kerberos tickets to the cell ticket locker. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import logging import click from treadmill import cli from treadmill import context from treadmill imp...
apache-2.0
-2,936,366,035,848,131,600
27.492958
65
0.618883
false
4.128571
false
false
false
DougBurke/astropy
astropy/coordinates/tests/test_transformations.py
2
14498
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst import numpy as np import pytest from ... import units as u from .. import transformations as t from ..builtin_frames import ICRS, FK5, FK4, FK4NoETerms, Galactic, AltAz from .. import representation as r from ..baseframe import ...
bsd-3-clause
-8,612,281,555,168,397,000
30.79386
86
0.625879
false
3.192689
true
false
false
rbernand/transfert
transfert/resources/ftp.py
1
4938
import ftplib import transfert.conf from transfert.resources._resource import _Resource from transfert.statresult import stat_result from transfert.exceptions import TransfertPermissionError, MethodNotAllowedError class FtpResource(_Resource): TIMEOUT = 10 def __init__(self, url): _Resource.__init__...
mit
4,714,942,904,633,817,000
29.109756
95
0.522074
false
4.132218
false
false
false
non-Jedi/pipey
pipey/utils.py
1
1619
#!/usr/bin/env python3 # Copyright 2016 Adam Beckmeyer # # This file is part of Pipey. # # Pipey is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free # Software Foundation, either version 3 of the License, or (at your # option) any la...
gpl-3.0
8,367,579,973,046,164,000
33.446809
79
0.672637
false
3.519565
false
false
false
ric2b/Vivaldi-browser
thirdparty/create_dmg/support/dmg-license.py
1
7187
#!/usr/bin/env python """ This script adds a license file to a DMG. Requires Xcode and a plain ascii text license file. Obviously only runs on a Mac. Copyright (C) 2011-2013 Jared Hobbs Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (th...
bsd-3-clause
2,379,153,810,819,140,000
32.900943
123
0.611382
false
3.393296
false
false
false
kslundberg/pants
src/python/pants/option/options_bootstrapper.py
1
5369
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import itertools imp...
apache-2.0
-3,103,010,327,190,660,000
44.117647
99
0.661948
false
4.244269
true
false
false
openstack/ironic
ironic/objects/deploy_template.py
1
13127
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
apache-2.0
-2,572,439,448,210,909,000
45.715302
79
0.639598
false
4.494009
false
false
false
Foxnox/robotique-delpeyroux-monseigne
src/direct_kinematics.py
1
1409
from math import * from Vertex import * #Length of the three subparts of the robot leg L1 = 51.0 L2 = 63.7 L3 = 93.0 Alpha = 20.69 #Mecanic constraint on Theta 2 Beta = 5.06 #Mecanic constraint on Theta 3 # Check if the given float match with radian (between 2PI and -2PI) def radValidation (radian): return (radian...
mit
2,066,973,941,957,947,600
28.978723
104
0.677786
false
2.52509
false
false
false
hpicgs/cmake-init
source/tests/googletest/googletest/test/googletest-json-outfiles-test.py
80
5663
#!/usr/bin/env python # Copyright 2018, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list o...
mit
7,272,105,547,636,897,000
28.649215
80
0.59668
false
3.658269
true
false
false
rande/python-simple-ioc
tests/ioc/service.py
1
1038
# # Copyright 2014 Thomas Rabaix <thomas.rabaix@gmail.com> # # 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...
apache-2.0
-4,741,764,847,387,017,000
29.558824
75
0.690751
false
3.816176
false
false
false
bitprophet/ssh
ssh/ssh_exception.py
1
3441
# Copyright (C) 2011 Jeff Forcier <jeff@bitprophet.org> # # This file is part of ssh. # # 'ssh' 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 2.1 of the License, or (at your option) # ...
lgpl-2.1
4,189,332,464,746,030,600
28.921739
88
0.668701
false
4.216912
false
false
false
exercism/xpython
exercises/dot-dsl/example.py
3
1541
NODE, EDGE, ATTR = range(3) class Node: def __init__(self, name, attrs): self.name = name self.attrs = attrs def __eq__(self, other): return self.name == other.name and self.attrs == other.attrs class Edge: def __init__(self, src, dst, attrs): self.src = src self...
mit
7,562,883,453,641,881,000
27.018182
68
0.476963
false
4.120321
false
false
false
streetturtle/AwesomeWM3
EmailWidget/mailWathcer.py
1
2446
#!/usr/bin/python import imaplib import email import datetime def process_mailbox(M): rv, data = M.search(None, "UNSEEN") if rv != 'OK': print "No messages found!" return for num in data[0].split(): # rv, data = M.fetch(num, '(RFC822)') rv, data = M.fetch(num, '(BODY.PEEK[])') if ...
mit
-5,365,607,142,900,059,000
23.46
68
0.591169
false
2.840883
false
false
false
mate-desktop/pluma
plugins/externaltools/tools/outputpanel.py
1
7924
# -*- coding: utf-8 -*- # Pluma External Tools plugin # Copyright (C) 2005-2006 Steve Frécinaux <steve@istique.net> # Copyright (C) 2010 Per Arneng <per.arneng@anyplanet.com> # Copyright (C) 2012-2021 MATE Developers # # This program is free software; you can redistribute it and/or modify # it under...
gpl-2.0
4,044,662,524,962,827,300
33.447826
84
0.600783
false
3.637741
false
false
false
hackersql/sq1map
Web/hack_scripts/zip_cracker/zipcracker.py
1
1154
#!/usr/env python3 ##___glicOne dictionary zipfile brute___## import argparse import zipfile from threading import Thread def extract_zip(zFile, pass_from_file): try: zFile.extractall(pwd=pass_from_file.encode('cp850','replace')) print("[+] Password found: " + pass_from_file + "\n" ) except: ...
gpl-3.0
4,152,948,566,693,841,400
28.589744
104
0.620451
false
3.444776
false
false
false
Ledoux/ShareYourSystem
Pythonlogy/ShareYourSystem/Standards/Classors/Binder/Drafts/__init__JSAISPAS.py
1
3746
# -*- coding: utf-8 -*- """ <DefineSource> @Date : Fri Nov 14 13:20:38 2014 \n @Author : Erwan Ledoux \n\n </DefineSource> Binder... """ #<DefineAugmentation> import ShareYourSystem as SYS BaseModuleStr="ShareYourSystem.Standards.Classors.Observer" DecorationModuleStr="ShareYourSystem.Standards.Classors.Tester" S...
mit
3,043,236,872,465,432,600
20.528736
117
0.691137
false
3.303351
false
false
false
Crowdcomputer/CC
executor/urls.py
1
1645
from django.conf.urls import patterns, url from django.contrib.auth.decorators import login_required from django.views.generic.base import TemplateView from executor import views from executor.views import TaskListExe urlpatterns = patterns('', url(r'^/$', login_required(TemplateView.as_view(t...
apache-2.0
4,292,069,363,445,351,400
62.269231
120
0.49848
false
3.309859
false
true
false
IMDProjects/IM_Climate
IM_Climate_py/StationDict.py
1
12118
import csv from datetime import date import common from Station import Station class StationDict(dict): ''' Object containing all station metadata and associated data StationDict is composed of the following nested objects: Station (or similar subclass) - All metadata and data for a single statio...
mit
-3,468,540,875,675,630,600
32.291209
165
0.545305
false
3.729763
false
false
false
pembeci/ceng2002
Week8/operator_overload.py
1
2167
class Point3D: def __init__(self, x,y,z): self.x = x self.y = y self.z = z def __str__(self): return "({0},{1},{2})".format(self.x, self.y, self.z) def addWithPoint(self, otherPoint): result = Point3D(self.x + otherPoint.x, self.y + otherPoint.y, ...
gpl-2.0
-2,804,832,012,909,921,300
33.951613
123
0.569451
false
3.423381
false
false
false
ogbash/doug
scripts/doug/testtar.py
1
5410
# DOUG - Domain decomposition On Unstructured Grids # Copyright (C) 1998-2006 Faculty of Computer Science, University of Tartu and # Department of Mathematics, University of Bath # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as p...
lgpl-2.1
6,555,246,086,467,681,000
30.453488
83
0.728281
false
3.154519
true
false
false
gromacs/copernicus
cpc/util/cmd/argument_parser.py
2
1749
# This file is part of Copernicus # http://www.copernicus-computing.org/ # # Copyright (C) 2011, Sander Pronk, Iman Pouya, Erik Lindahl, and others. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as published # by the Free Softwa...
gpl-2.0
4,193,149,376,167,739,400
34.693878
116
0.714122
false
4.002288
false
false
false
mantidproject/mantid
scripts/Inelastic/Direct/PropertiesDescriptors.py
3
68521
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source, # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # py...
gpl-3.0
-4,146,258,262,557,719,000
36.669599
126
0.551014
false
4.369962
false
false
false
rbernand/transfert
tests/unit/test_scp.py
1
1313
import mock import pytest import transfert.actions import transfert.exceptions from transfert import Resource def test_simple_copy_scp(monkeypatch): a = Resource("file:///path/to/something") b = Resource("scp://user:pwd@host/path/to/something") mock_copy = mock.MagicMock('return_value=None') monkeypa...
mit
1,910,557,055,060,088,800
37.617647
78
0.721249
false
3.455263
false
false
false
simartin/servo
tests/wpt/web-platform-tests/tools/third_party/zipp/zipp.py
16
7039
# coding: utf-8 from __future__ import division import io import sys import posixpath import zipfile import functools import itertools from collections import OrderedDict try: from contextlib import suppress except ImportError: from contextlib2 import suppress __metaclass__ = type def _parents(path): ...
mpl-2.0
-5,852,609,632,700,399,000
23.506993
78
0.564275
false
3.834245
false
false
false
zepheira/amara
lib/writers/stringwriter.py
1
1735
######################################################################## # amara/xslt/stringwriter.py """ A specialized XSLT output writer that only captures text output events Copyright 2005 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYRIGHT Project home, documentation, d...
apache-2.0
-8,412,423,697,539,294,000
29.438596
78
0.617291
false
4.448718
false
false
false
rusty1s/graph-based-image-classification
train.py
1
1758
import json import tensorflow as tf from data import datasets from patchy import PatchySan from model import train_from_config FLAGS = tf.app.flags.FLAGS tf.app.flags.DEFINE_string('config', None, """Path to the configuration json file of the network.""") tf.ap...
mit
3,739,830,060,703,794,000
28.79661
78
0.578498
false
4.406015
true
false
false
badbytes/pymeg
gui/gtk/preferences.py
1
2111
#!/usr/bin/python2 # # Copyright 2010 dan collins <danc@badbytes.net> # # 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 yo...
gpl-3.0
-4,651,870,677,682,066,000
31.476923
76
0.614401
false
3.749556
false
false
false
openearth/delft3d-gt-server
delft3dworker/migrations/0049_auto_20160825_0932.py
1
1437
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("delft3dworker", "0048_container_scene"), ] operations = [ migrations.AlterField( model_name="container", ...
gpl-3.0
1,618,518,032,709,217,800
28.9375
53
0.406402
false
5.263736
false
false
false
kalyptorisk/daversy
src/daversy/db/object.py
1
2673
from daversy.utils import odict class DbObject(dict): """A dictionary that allows its elements to be accessed as attributes. If any sub-elements are defined, then they are initialized to an empty list.""" def __init__(self): if hasattr(self, 'SubElements'): for name, type in...
gpl-2.0
1,025,769,147,640,830,600
31.597561
75
0.633745
false
4.332253
false
false
false
guorendong/iridium-browser-ubuntu
third_party/mesa/src/src/mapi/glapi/gen/gl_gentable.py
12
4957
#!/usr/bin/env python # (C) Copyright IBM Corporation 2004, 2005 # (C) Copyright Apple Inc. 2011 # 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,...
bsd-3-clause
-7,503,215,958,961,393,000
23.539604
87
0.658059
false
3.04484
false
false
false
nlsdfnbch/bitex-crawler
bitex/api/WSS/bitstamp.py
2
10298
# Import Built-Ins import logging # Import Third-Party import pusherclient # Import Homebrew from bitex.api.WSS.base import WSSAPI # Init Logging Facilities log = logging.getLogger(__name__) class BitstampWSS(WSSAPI): """ Creates a BitstampWSS Object, which automatically describes to all available endp...
mit
7,731,915,991,734,480,000
33.557047
80
0.583317
false
3.702985
false
false
false
streethacker/MACQuery
winSetup.py
1
3511
#!/usr/bin/env python #-*- coding:utf-8 -*- import _winreg import os import sys import re REGEX_PATH = re.compile(r"^[A-Z]{1}:(\\[A-Za-z\s]+){0,5}\\?$") REGEX_FONT = re.compile(r"^SourceCodePro.*\.ttf$") class BadPathFormat(Exception): _info = """ INSTALLATION FAILED: Bad format of installation path, the foll...
apache-2.0
-4,011,281,037,246,160,000
28.504202
91
0.537169
false
3.731137
false
false
false
ciolo/Sniffer-OpenMote
Bro.py
1
1726
#!/usr/bin/env python ######################################################################################################## ### ### @author Alberto Ciolini ### ######################################################################################################## import pyshark from event import * def bro...
gpl-2.0
8,147,390,467,719,326,000
34.958333
107
0.444959
false
4.261728
false
false
false
puttarajubr/commcare-hq
corehq/apps/users/tests/bulk_upload.py
2
3047
from corehq.apps.commtrack.tests.util import CommTrackTest, make_loc from corehq.apps.commtrack.helpers import make_supply_point from corehq.apps.users.bulkupload import UserLocMapping, SiteCodeToSupplyPointCache from corehq.apps.users.models import CommCareUser from mock import patch from corehq.toggles import MULTIPL...
bsd-3-clause
-286,733,319,851,511,800
37.0875
104
0.65146
false
3.563743
true
false
false
xypron/pysispm
examples/sispmctl.py
1
3981
#!/usr/bin/python3 ''' file sispmctl.py - controlling EnerGenie EG-PMS Copyright (c) 2016, Heinrich Schuchardt <xypron.glpk@gmx.de> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions...
bsd-2-clause
3,452,747,403,316,652,000
25.54
79
0.673198
false
3.154517
false
false
false
nlooije/pythreejs
pythreejs/pythreejs.py
1
30290
r""" Python widgets for three.js plotting In this wrapping of three.js, we try to stay close to the three.js API. Often, the three.js documentation at http://threejs.org/docs/ helps in understanding these classes and the various constants. This is meant to be a low-level wrapper around three.js. We hope that others...
bsd-3-clause
-1,777,283,695,888,014,800
39.225764
354
0.645031
false
3.284893
false
false
false
qedsoftware/commcare-hq
custom/intrahealth/sqldata.py
1
29790
# coding=utf-8 import sqlalchemy from sqlagg.base import AliasColumn, QueryMeta, CustomQueryColumn, TableNotFoundException from sqlagg.columns import SumColumn, MaxColumn, SimpleColumn, CountColumn, CountUniqueColumn, MeanColumn from corehq.apps.locations.models import SQLLocation from corehq.apps.products.models impor...
bsd-3-clause
4,620,952,008,453,858,000
36.505038
119
0.599886
false
3.728901
true
false
false
fanstatic/js.sugar
setup.py
1
1293
from setuptools import setup, find_packages import os # The version of the wrapped library is the starting point for the version number of the python package. # In bugfix releases of the python package, add a '-' suffix and an incrementing integer. # For example, a packaging bugfix release version 1.4.4 of the js.jque...
bsd-3-clause
-8,064,156,987,724,133,000
35.942857
107
0.613302
false
3.747826
false
false
false
joaquimrocha/Rancho
rancho/todo/forms.py
1
3283
######################################################################## # Rancho - Open Source Group/Project Management Tool # Copyright (C) 2008 The Rancho Team # # 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 t...
agpl-3.0
-6,568,617,916,561,157,000
48.742424
182
0.624124
false
4.263636
false
false
false
ajinabraham/Node.Js-Security-Course
nodejsshell.py
1
1575
#!/usr/bin/python # Generator for encoded NodeJS reverse shells # Based on the NodeJS reverse shell by Evilpacket # https://github.com/evilpacket/node-shells/blob/master/node_revshell.js # Onelineified and suchlike by infodox (and felicity, who sat on the keyboard) # Insecurety Research (2013) - insecurety.net import s...
gpl-3.0
2,133,754,864,856,897,000
28.716981
134
0.622857
false
3.064202
false
false
false
odrzywolski-lukas/odrzywolskiSprintScripts
python/studentInfo-week1EPCS.py
1
2868
import random import math def main(): students = [ Student("Larsson", "Halsted", 37, 185), Student("BonJovi", "Jon", 55, 170), Student("Odrzywolski", "Lukas", 16, 145) ] printHeader() selection = getUserSelection() if selection == 0: printStudentsByAge(students) elif selection == 1: pri...
mit
6,417,020,809,639,942,000
28.885417
125
0.673291
false
3.311778
false
false
false
eugenezamriy/bomberbot
bomberlib/server.py
1
5943
# -*- mode:python; coding:utf-8; -*- # created: 19.06.2010 16:21 UTC # description: BomberBot server. import datetime import logging from select import select import socket #from socket import socket, AF_INET, SOCK_STREAM import time import Queue try: import json except ImportError: import simplejson as json ...
gpl-2.0
-3,308,631,901,844,118,500
41.148936
112
0.490325
false
4.455022
false
false
false
MichalKononenko/T1erminator
Lorentzian_fit.py
1
2873
""" Created on Fri Jul 17 13:47:55 2015 Fit NMR spectra to Lorentzian Returns Integral of the peak @author: Nachiket """ ######################################################################### ####################### IMPORTING REQUIRED MODULES ###################### def lorentz_fit(title): import numpy as np ...
mit
590,204,087,668,209,400
32.418605
77
0.374869
false
3.908844
false
false
false
alessio/devedeng
src/devedeng/add_files.py
4
2778
# Copyright 2014 (C) Raster Software Vigo (Sergio Costas) # # This file is part of DeVeDe-NG # # DeVeDe-NG 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)...
gpl-3.0
1,916,294,991,808,042,500
31.302326
78
0.645428
false
3.704
true
false
false
start-jsk/jsk_apc
demos/grasp_fusion/grasp_fusion_lib/func.py
2
2064
import hashlib import os import os.path as osp try: import cPickle as pickle except ImportError: import pickle import warnings import grasp_fusion_lib.data memos = {} def memoize(key=None): def _memoize(func): def func_wrapper(*args, **kwargs): if key: contents = pic...
bsd-3-clause
4,793,031,764,049,205,000
28.913043
78
0.515988
false
3.887006
false
false
false
marcore/edx-certificates
gen_pok_cert.py
1
12674
# -*- coding: utf-8 -*- import copy import datetime import gnupg import math import os import re import shutil import StringIO import uuid from reportlab.platypus import Paragraph from PyPDF2 import PdfFileWriter, PdfFileReader from reportlab.lib import colors from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_RI...
agpl-3.0
-2,767,440,276,623,181,300
33.914601
109
0.602967
false
3.803721
false
false
false
fxt0706/YouTools
YouSheet.py
1
1233
import pygsheets import config # 打开文件 读取行数 读取最后一行内容 写入内容 获得对应格子的值 列出所有内容 class YouSheet(): def __init__(self): print('YouSheet Message: start sheet') def append_list(self, value, row, ID): clinet = pygsheets.authorize(outh_nonlocal= True) sh = clinet.open_by_key(ID) ws = sh.s...
gpl-3.0
1,555,156,251,633,997,000
25.477273
65
0.582833
false
2.653759
false
false
false
cloudmesh/cmd3
cmd3/plugins/activate.py
1
3208
import string from cmd3.console import Console # noinspection PyUnusedLocal class activate: command_topics = {} plugins = [] def register_command_topic(self, topic, topic_command): try: a = self.command_topics[topic] except: self.command_topics[topic] = [] s...
apache-2.0
5,593,373,482,014,607,000
33.869565
91
0.465399
false
4.461752
false
false
false
elloop/CS.cpp
build_all.py
1
1966
#coding=utf-8 import os import sys import getopt import shutil PROJECTS = ( "Algorithm", "c_language", "TotalSTL", "TrainingGround", "UnderstandingCpp11" ) #PLATFORMS = ("mac", "windows", "linux") # PLATFORMS = { # "windows":"Visual Studio 14 2013 win64", # "mac":"Xcode", # "linux":""...
mit
-413,250,624,350,314,940
25.567568
95
0.53001
false
3.372213
false
false
false
macbre/index-digest
indexdigest/test/linters/test_0006_not_used_columns_and_tables.py
1
3679
from __future__ import print_function from unittest import TestCase from indexdigest.linters.linter_0006_not_used_columns_and_tables import check_not_used_tables, check_not_used_columns, \ get_used_tables_from_queries from indexdigest.database import Database from indexdigest.test import DatabaseTestMixin, read_q...
mit
227,578,635,917,254,700
35.068627
128
0.657516
false
3.792784
true
false
false
warmlab/bakerycms
config.py
1
4508
import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: SECRET_KEY = os.environ.get('SECRET_KEY') or 'hard to guess string' SSL_DISABLE = True SQLALCHEMY_COMMIT_ON_TEARDOWN = True SQLALCHEMY_RECORD_QUERIES = True MAIL_SERVER = 'smtp-mail.outlook.com' MAIL_PORT = 587 MA...
gpl-3.0
-1,354,155,803,215,459,300
34.496063
115
0.656832
false
3.229226
true
false
false
alatiera/YEAP
src/feed_indexing.py
1
9572
from functools import partial from typing import List from feedparser import FeedParserDict from records import Database, Record, RecordCollection from sqlalchemy.exc import IntegrityError from . import parse_feeds as parf from . import dboperations, dbstructure def single_str_index(dbobj: Database, value: str, tab...
gpl-3.0
-9,130,464,568,149,230,000
36.245136
79
0.62547
false
3.5308
false
false
false
tevtonez/my_training_tasks
task_3_poll_script.py
1
3150
''' Created on Nov 18, 2016 @author: kostya TASK Create a script that asks user a question with 3 possible answers: "Yes", "No", "Maybe". The results should be written in a log file with the date and time of line creation. Once log file contains 10 or more lines script should show total number of votes and percentage ...
gpl-3.0
1,586,172,431,653,781,000
34.393258
117
0.575873
false
4.054054
false
false
false
charanpald/wallhack
wallhack/recommendexp/UpdateExp.py
1
2901
""" Compare the different update methods on a set of sparse matrices """ import numpy import scipy.sparse import time import matplotlib.pyplot as plt from sandbox.util.SparseUtils import SparseUtils from wallhack.recommendexp.SyntheticDataset1 import SyntheticDataset1 from sandbox.misc.RandomisedSVD import Rand...
gpl-3.0
-4,773,387,640,874,438,000
29.87234
126
0.589452
false
2.930303
false
false
false
jebreimo/Yson
tools/mergecpp.py
1
8003
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- # =========================================================================== # Copyright © 2020 Jan Erik Breimo. All rights reserved. # Created by Jan Erik Breimo on 2020-03-05. # # This file is distributed under the BSD License. # License text is included with the source...
bsd-2-clause
8,599,881,718,131,050,000
31.795082
84
0.572482
false
3.832375
false
false
false
MaxLeiter/packages.knightos.org
packages/kpack.py
2
2435
import subprocess import locale import tempfile import os import shutil encoding = locale.getdefaultlocale()[1] class PackageInfo(): name = None repo = None version = None description = None author = None maintainer = None infourl = None copyright = None dependencies = list() c...
mit
631,836,617,015,844,600
32.356164
90
0.549487
false
4.517625
false
false
false
HumanDynamics/openbadge-analysis
openbadge_analysis/preprocessing/hublog.py
1
7539
from __future__ import absolute_import, division, print_function import pandas as pd import re import ast log_pattern = re.compile("^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2},\d+ - \w+ - .*$") def _is_legal_log_line(line): return log_pattern.match(line) is not None def _hublog_read_scan_line(line): """ Parses a...
mit
-2,815,039,506,591,023,000
26.518248
104
0.537074
false
3.890093
false
false
false
jmwat/DjangoLibraryTutorial
catalog/views.py
1
7464
from django.shortcuts import render # Create your views here. from .models import Book, Author, BookInstance, Genre def index(request): """ View function for home page of site. """ # Generate counts of some of the main objects num_books=Book.objects.all().count() num_specbooks=Book.objects.fi...
gpl-3.0
-8,398,201,971,618,996,000
36.325
200
0.682744
false
3.8875
false
false
false
Ictp/indico
indico/MaKaC/plugins/InstantMessaging/XMPP/fossils.py
2
2484
# -*- coding: utf-8 -*- ## ## This file is part of Indico. ## Copyright (C) 2002 - 2014 European Organization for Nuclear Research (CERN). ## ## Indico 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 ...
gpl-3.0
-7,773,235,253,468,796,000
33.985915
80
0.708535
false
3.955414
false
false
false
anhaidgroup/py_entitymatching
py_entitymatching/dask/dask_dtmatcher.py
1
1558
""" This module contains the functions for Decision Tree learning-based matcher. """ # from py_entitymatching.matcher.mlmatcher import MLMatcher import logging from py_entitymatching.dask.daskmlmatcher import DaskMLMatcher from py_entitymatching.matcher.matcherutils import get_ts logger = logging.getLogger(__name__) ...
bsd-3-clause
4,982,814,934,675,099,000
33.644444
89
0.654685
false
4.121693
false
false
false
associatedpress/datakit-data
setup.py
1
1689
""" datakit-data --------------- A `datakit <https://pypi.python.org/pypi/datakit-core/>`_ plugin to simplify use of Amazon S3 as a data store for data science projects. * `Code <https://github.com/associatedpress/datakit-data>`_ * `Docs <http://datakit-data.readthedocs.io/en/latest/>`_ """ from setuptools import s...
isc
3,109,362,447,788,038,700
26.241935
83
0.605684
false
3.593617
true
false
false
acimmarusti/isl_exercises
chap5/chap5ex9.py
1
2124
from __future__ import print_function, division import matplotlib.pyplot as plt import numpy as np import scipy import pandas as pd import seaborn as sns from sklearn.datasets import load_boston import statsmodels.formula.api as smf #Load boston dataset from sklearn# boston = load_boston() #Columns# #print(boston['fe...
gpl-3.0
6,895,443,043,850,429,000
25.222222
75
0.649247
false
3.425806
false
false
false
harnasproject/harnas
harnas/contest/views/testcase.py
1
2200
import os from django.contrib import messages from django.contrib.auth.decorators import login_required from django.core.exceptions import PermissionDenied from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.views.decorators.http import require_POST from harnas.contes...
agpl-3.0
-6,236,750,837,703,381,000
35.666667
78
0.679091
false
3.85289
true
false
false
ubuntu/ubuntu-make
tests/medium/__init__.py
1
11653
# -*- coding: utf-8 -*- # Copyright (C) 2014 Canonical # # Authors: # Didier Roche # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; version 3. # # This program is distributed in the hope that ...
gpl-3.0
-1,829,940,917,699,467,300
49.886463
120
0.587402
false
3.948831
true
false
false
SUNET/eduid-webapp
src/eduid_webapp/idp/tests/test_app.py
1
9685
# -*- coding: utf-8 -*- # # Copyright (c) 2020 SUNET # 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 # noti...
bsd-3-clause
2,211,217,914,777,399,300
41.853982
120
0.650697
false
3.675522
true
false
false
alphagov/notifications-api
migrations/versions/0017_add_failure_types.py
1
2040
"""empty message Revision ID: 0017_add_failure_types Revises: 0016_reply_to_email Create Date: 2016-05-17 11:23:36.881219 """ # revision identifiers, used by Alembic. revision = '0017_add_failure_types' down_revision = '0016_reply_to_email' from alembic import op import sqlalchemy as sa from alembic import op imp...
mit
-628,127,558,891,278,600
40.653061
140
0.694118
false
3.709091
false
false
false
mtmiller/hanoi-game-tree
hanoi.py
1
3515
#!/usr/bin/env python # # hanoi.py - an exhaustive tree search implementation of the Towers of Hanoi # Copyright (C) 2011 Mike Miller # # 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 ve...
gpl-3.0
9,083,462,343,205,916,000
35.614583
78
0.568706
false
3.888274
false
false
false
IlinArkady/IlinArkady
practice11/Prac11.4.py
1
1491
class Point: def __init__(self, descr): self.x, self.y = [float(i) for i in descr.split(',')] def new(x, y): if not (x.__class__==y.__class__==float): raise ValueError('Неправильный тип данных ') return Point(str(x)+','+str(y)) def __str__(self): return '({}; {})'.format(self...
gpl-3.0
8,625,761,671,627,810,000
33.142857
94
0.559972
false
2.710775
false
false
false
vivescere/yajuu
yajuu/extractors/anime/chia_anime.py
1
1927
import re import concurrent.futures import requests from yajuu.extractors.anime.anime_extractor import AnimeExtractor from yajuu.extractors.search_result import SearchResult class ChiaAnimeExtractor(AnimeExtractor): def _get_url(self): return 'http://m.chia-anime.tv' def search(self): soup...
gpl-3.0
-6,615,352,987,506,835,000
26.927536
77
0.56357
false
3.940695
false
false
false
GdZ/scriptfile
software/googleAppEngine/lib/grizzled/grizzled/test/collections/TestLRUDict.py
19
2916
#!/usr/bin/python2.4 # $Id: d013d05ce2f81cd44ec98b5568c26fef11333e0e $ """ Tester. """ # --------------------------------------------------------------------------- # Imports # --------------------------------------------------------------------------- from timeit import Timer import google3 from grizzled.collectio...
mit
8,297,948,141,584,718,000
26
77
0.410151
false
3.617866
false
false
false
lsaffre/lino
lino/utils/demonames/rus.py
1
20501
# -*- coding: UTF-8 -*- # Copyright 2012-2014 Rumma & Ko Ltd # License: BSD (see file COPYING for details) from lino.utils import Cycler def splitter1(s): for ln in s.splitlines(): ln = ln.strip() if len(ln) > 1 and ln[0] != '#': yield ln LAST_NAMES_RUSSIA = u""" A Abezgauz Aleksand...
bsd-2-clause
-3,770,345,879,492,894,700
7.426223
72
0.853861
false
1.768547
false
false
false
konradstrack/stochastic-sudoku-solver
tools/plot.py
1
3006
import argparse from matplotlib import pyplot as plt class Result(): params = {} iterations = [] def __init__(self, lines): info = lines[0].split() self.params = { 'population_size': int(info[0]), 'number_of_tournaments': int(info[1]), 'tournament_siz...
mit
-674,360,215,145,440,100
29.363636
110
0.583167
false
3.83908
false
false
false
caperren/Archives
OSU Coursework/CS 325 - Analysis of Algorithms/Paul Cull - No Pass/HW 4/hw4.py
1
7621
from random import randint import numpy as np from time import time # Edit this section to change runtime parameters for solvers below MAX_TILING_K_VALUE = 12 NUM_RAND_TILING_GAMES = 10 TILING_K_VALUES = [i for i in range(1, MAX_TILING_K_VALUE)] MAX_RAND_COIN_VALUE = 21 NUM_RAND_COIN_GAMES = 10 COINS_K_VALUES = [i f...
gpl-3.0
-60,788,797,687,222,260
33.799087
113
0.592311
false
3.233347
false
false
false
fga-gpp-mds/2017.2-Receituario-Medico
medical_prescription/recommendation/forms/editcustomrecommendation.py
1
1607
# django from django import forms # local django from recommendation.models import CustomRecommendation from recommendation.validators import CustomRecommendationValidator from exam import constants class UpdateCustomRecommendationForm(forms.ModelForm): """ Form to edit a custom recommendation. ...
mit
3,504,870,420,170,344,400
31.14
96
0.617299
false
4.797015
false
false
false
KarlTDebiec/MDclt
MDclt_secondary.py
1
1516
#!/usr/bin/python # -*- coding: utf-8 -*- # MDclt_secondary.py # # Copyright (C) 2012-2015 Karl T Debiec # All rights reserved. # # This software may be modified and distributed under the terms of the # BSD license. See the LICENSE file for details. """ Command Line Tool to manage secondary analysis of molecu...
bsd-3-clause
8,565,326,626,313,671,000
30.583333
80
0.591689
false
4.064343
false
false
false
EuroPython/epcon
p3/management/commands/build_ticket_search_app.py
1
9696
""" Build Ticket Search App ----------------------- Creates a single-page fuzzy full text search list with all tickets and their ticket IDs. Writes the single page to ep-ticket-search-app/index.html This can be used during registration to do quick search in the list of all tickets in orde...
bsd-2-clause
4,236,106,819,653,102,000
29.780952
86
0.565903
false
3.826361
false
false
false
okaywit/livestreamer
src/livestreamer/plugins/ruv.py
20
5317
"""Plugin for RUV, the Icelandic national television.""" import re from livestreamer.plugin import Plugin from livestreamer.stream import RTMPStream, HLSStream from livestreamer.plugin.api import http RTMP_LIVE_URL = "rtmp://ruv{0}livefs.fplive.net/ruv{0}live-live/stream{1}" RTMP_SARPURINN_URL = "rtmp://sipvodfs.fp...
bsd-2-clause
-392,892,110,587,197,400
31.619632
107
0.387625
false
3.929786
false
false
false
umlfri/umlfri2
umlfri2/application/commands/solution/newproject.py
1
1124
from umlfri2.application.events.solution import OpenProjectEvent from umlfri2.model import ProjectBuilder from ..base import Command class NewProjectCommand(Command): def __init__(self, solution, template, project_name): self.__template_id = template.id self.__project_name = project_name s...
gpl-3.0
7,057,520,793,673,943,000
29.378378
86
0.621886
false
4.209738
false
false
false
akshaykamath/StateReviewTrendAnalysisYelp
StateReviewTrendsPOC.py
1
4899
__author__ = 'Akshay' """ File contains code to Mine reviews and stars from a state reviews. This is just an additional POC that we had done on YELP for visualising number of 5 star reviews per state on a map. For each business per state, 5 reviews are taken and the count of the review is kept in the dictionary for e...
mit
6,676,727,531,916,012,000
27.482558
119
0.536232
false
3.759785
false
false
false
elfsternberg/git-linter
git_lint/reporters.py
2
2887
from __future__ import print_function from functools import reduce from .git_lint import load_config, run_linters, git_base import operator import gettext _ = gettext.gettext def print_report(results, unlintable_filenames, cant_lint_filenames, broken_linter_names, unfindable_filenames, options={'byli...
isc
2,312,532,916,288,439,300
34.207317
99
0.555248
false
3.880376
false
false
false
Adria331/WaifuFM
waifufmapp/urls.py
1
2216
from django.conf.urls import patterns, url from django.utils import timezone from django.views.generic import DetailView, ListView, UpdateView from models import Album, Artist, AlbumReview from forms import ArtistForm, AlbumForm, AlbumReviewForm from views import HomepageView, AlbumListView, AlbumReviewCreate, ReviewLi...
gpl-3.0
-917,255,906,488,305,300
39.290909
235
0.672383
false
3.495268
false
true
false
AnoopAlias/nDeploy
scripts/auto_config.py
1
8424
#!/usr/bin/env python import yaml import argparse import os import sys import pwd __author__ = "Anoop P Alias" __copyright__ = "Copyright 2014, PiServe Technologies Pvt Ltd , India" __license__ = "GPL" __email__ = "anoop.alias@piserve.com" installation_path = "/opt/nDeploy" # Absolute Installation Path nginx_bin...
gpl-3.0
7,811,845,216,136,503,000
51
138
0.619421
false
3.75736
false
false
false
openstack/heat
heat/engine/resources/openstack/keystone/domain.py
2
3237
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
apache-2.0
-7,069,492,007,465,081,000
30.735294
78
0.616929
false
4.39213
false
false
false
pysv/djep
pyconde/proposals/urls.py
1
1043
from django.conf.urls import patterns, url from . import views from . import settings urlpatterns = patterns( '', url(r'^/?$', views.IndexView.as_view(), name='proposals_index'), url(r"^view/(?P<pk>\d+)/", views.SingleProposalView.as_view(), name="view_proposal"), url(r'^submi...
bsd-3-clause
5,490,840,033,124,774,000
27.189189
47
0.568552
false
3.430921
false
true
false
peterheim1/robbie
bin/smach_nav (copy).py
1
3727
#!/usr/bin/env python import roslib; roslib.load_manifest('robbie') import rospy import smach import smach_ros import tf from actionlib import SimpleActionClient from move_base_msgs.msg import * from actionlib_msgs.msg import * from geometry_msgs.msg import * #from robbie.msg import * from std_msgs.msg import String f...
gpl-3.0
2,474,433,289,327,824,000
35.539216
96
0.583579
false
3.549524
false
false
false
diafero/libhsplasma
Python/scripts/prp-listobjects.py
5
1405
#!/usr/bin/python # -*- coding: utf-8 -*- # This file is part of HSPlasma. # # HSPlasma 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...
gpl-3.0
-8,211,182,288,905,820,000
33.268293
100
0.716014
false
3.267442
false
false
false
zenoss/ZenPacks.nozen.HPUXMon
ZenPacks/nozen/HPUXMon/modeler/plugins/nozen/snmp/HPUXProcessMap.py
4
2335
########################################################################### # # This program is part of Zenoss Core, an open source monitoring platform. # Copyright (C) 2007, Zenoss Inc. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License versi...
gpl-2.0
-4,756,276,836,208,258,000
31.430556
82
0.564454
false
3.772213
false
false
false