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
hakanozadam/bal
bal/reference/prepare.py
1
5583
#!/bin/env python3 # AUTHORS: # Hakan Ozadam # Rachel Brown # # Moore Laboratory # UMASS Medical School / HHMI # RNA Therapeutics Institute # Albert Sherman Center, ASC4-1009 # 368 Plantation Street # Worcester, MA 01605 # USA # ###########################...
gpl-2.0
3,486,771,046,450,948,000
37.770833
118
0.547376
false
3.920646
false
false
false
ebrelsford/growing_cities
growing_cities/team/migrations/0001_initial.py
1
1453
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'TeamMember' db.create_table(u'team_teammember', ( (u'id', self.gf('django.db.mod...
gpl-3.0
-6,899,176,736,712,854,000
37.263158
102
0.582932
false
3.623441
false
false
false
carlos-jenkins/confspec
lib/confspec/validation.py
1
10924
# -*- coding: utf-8 -*- # # Copyright (C) 2014 Carlos Jenkins <carlos@jenkins.co.cr> # # 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 # # Unles...
apache-2.0
-175,904,754,583,558,660
18.647482
79
0.53149
false
3.880639
false
false
false
CommonsCloud/Core-API
CommonsCloudAPI/models/statistic.py
1
9805
""" For CommonsCloud copyright information please see the LICENSE document (the "License") included with this software package. This file may not be used in any manner except in compliance with the License Unless required by applicable law or agreed to in writing, software distributed under the License is distributed...
agpl-3.0
-501,611,573,143,487,740
33.403509
129
0.65895
false
4.304214
false
false
false
thombashi/tcconfig
tcconfig/shaper/_interface.py
1
7593
""" .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com> """ import abc import subprocrunner import typepy from humanreadable import ParameterError from .._common import run_command_helper from .._const import TcSubCommand, TrafficDirection from .._iptables import IptablesMangleMarkEntry from .._logger im...
mit
4,832,686,497,575,263,000
29.991837
99
0.550507
false
3.689504
false
false
false
gautamMalu/XenInBox
pyanaconda/ui/tui/spokes/user.py
1
6705
# User creation text spoke # # Copyright (C) 2013-2014 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distrib...
gpl-2.0
1,448,730,758,010,517,000
43.403974
117
0.656078
false
3.921053
false
false
false
EndyKaufman/django-postgres-angularjs-blog
app/file/migrations/0002_fill_from_mock.py
1
1054
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-01-31 16:13 from __future__ import unicode_literals from django.db import migrations from project import helpers, settings import json import os def fill_from_mock(apps, schema_editor): helpers.mkdir_recursive(settings.MEDIA_ROOT) helpers.copy_dir_rec...
mit
-2,137,496,670,613,839,400
26.736842
113
0.627135
false
3.621993
false
false
false
google/edward2
edward2/tensorflow/layers/made.py
1
9581
# coding=utf-8 # Copyright 2021 The Edward2 Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
apache-2.0
-7,966,163,768,912,077,000
40.656522
80
0.659639
false
3.808029
false
false
false
dietrichc/streamline-ppc-reports
examples/dfp/v201405/audience_segment_service/populate_first_party_audience_segments.py
1
2571
#!/usr/bin/python # # Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
apache-2.0
3,754,272,147,470,007,000
29.607143
81
0.669778
false
3.797637
false
false
false
ssjssh/algorithm
src/ssj/queue/list_queue.py
1
1674
#!/usr/bin/env python # -*- coding:utf-8 -*- """ 用list实现队列 """ class Queue(object): """docstring for Queue""" class EmptyNode(object): """ 用EmptyNode来实现特殊的空节点表示 """ pass def __init__(self, cap): super(Queue, self).__init__() self.__empty = self.EmptyNode()...
gpl-2.0
1,703,777,181,144,225,300
27.703704
88
0.499355
false
3.362256
false
false
false
jonathf/chaospy
chaospy/quadrature/newton_cotes.py
1
4349
""" Example usage ------------- Generate Newton-Cotes quadrature rules:: >>> distribution = chaospy.Uniform(0, 1) >>> for order in range(5): ... abscissas, weights = chaospy.generate_quadrature( ... order, distribution, rule="newton_cotes") ... print(order, abscissas.round(3), wei...
mit
1,887,471,795,179,704,600
36.817391
80
0.574155
false
3.018043
false
false
false
avalentino/gsdview
gsdview/qtsupport.py
1
32996
# GSDView - Geo-Spatial Data Viewer # Copyright (C) 2008-2021 Antonio Valentino <antonio.valentino@tiscali.it> # # This module 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 ...
gpl-2.0
8,448,601,159,089,923,000
28.355872
100
0.552128
false
3.518447
false
false
false
pombredanne/django-rest-framework-api-server
api/tests/test_login.py
1
1037
from django_webtest import WebTest from django.contrib.auth.models import User class TestLogInAndGetUserList(WebTest): def testLoginAnGetUsers(self): User.objects.create_user("prairiedogg", **{"password": "my_$pecial_password"}) username_and_password = {"username": "prairiedogg", ...
bsd-2-clause
8,711,859,397,793,313,000
38.884615
86
0.544841
false
4.232653
false
false
false
camptocamp/QGIS
python/plugins/processing/gui/MessageBarProgress.py
1
2019
# -*- coding: utf-8 -*- """ *************************************************************************** SilentProgress.py --------------------- Date : April 2013 Copyright : (C) 2013 by Victor Olaya Email : volayaf at gmail dot com *************************...
gpl-2.0
3,237,296,405,584,719,400
32.098361
107
0.505201
false
4.695349
false
false
false
ThreatCentral/blackberries
src/ThreatCentral/transforms/EmailToActors.py
1
6520
#!/usr/bin/env python # -*- coding: utf-8 -*- # (c) Copyright [2016] Hewlett Packard Enterprise Development LP 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 Unless required by applicable # ...
apache-2.0
-68,039,911,885,579,130
45.241135
114
0.468712
false
4.588318
false
false
false
npdoty/pywikibot
pywikibot/families/wikisource_family.py
1
3906
# -*- coding: utf-8 -*- """Family module for Wikisource.""" # # (C) Pywikibot team, 2004-2017 # # Distributed under the terms of the MIT license. # from __future__ import absolute_import, unicode_literals from pywikibot import family __version__ = '$Id$' # The Wikimedia family that is known as Wikisource class Fami...
mit
5,903,984,611,172,784,000
31.025424
78
0.387933
false
2.980284
false
false
false
PPC64/folly
folly/build/generate_varint_tables.py
1
3152
#!/usr/bin/env python # # Generate tables for GroupVarint32 # Copyright 2011 Facebook # # @author Tudor Bosman (tudorb@fb.com) # # Reference: http://www.stepanovpapers.com/CIKM_2011.pdf # # From 17 encoded bytes, we may use between 5 and 17 bytes to encode 4 # integers. The first byte is a key that indicates how many ...
apache-2.0
2,212,862,077,880,834,300
25.711864
83
0.56948
false
2.932093
false
false
false
ROCmSoftwarePlatform/Tensile
Tensile/Utilities/merge.py
1
19273
################################################################################ # Copyright 2020-2021 Advanced Micro Devices, 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 t...
mit
-3,096,896,397,483,536,000
41.639381
157
0.660613
false
3.853829
false
false
false
ruohoruotsi/librosa
tests/test_dtw.py
1
2995
#!/usr/bin/env python # -*- encoding: utf-8 -*- import librosa import numpy as np from test_core import srand import warnings warnings.resetwarnings() warnings.simplefilter('always') def test_dtw_global(): # Example taken from: # Meinard Mueller, Fundamentals of Music Processing X = np.array([[1, 3, 3,...
isc
-4,646,562,285,603,238,000
28.362745
68
0.451753
false
2.634125
true
false
false
petry/django-pressroom-googlecode
src/pressroom/models.py
1
4225
# python imports from datetime import datetime import os # django imports from django.conf import settings from django.contrib.comments.moderation import CommentModerator, moderator from django.core.urlresolvers import reverse from django.db import models from django.utils.translation import ugettext_lazy as ...
bsd-3-clause
-5,970,563,566,317,768,000
34.111111
127
0.633373
false
4.06641
false
false
false
ch-aurich/lint_eagle
lint_eagle/lint_eagle.py
1
1332
from lxml import objectify import argparse import eagle_lbr import eagle_brd #import helper import sys import lint_framework #TODO: state contains a list of issues structured like that: $object_name(str), $object_type(component, symbol, package, library, schematic, board, etc.), $issue_type(E1, E2, E3, W1...) pars...
gpl-2.0
-4,695,327,184,534,536,000
32.3
191
0.713213
false
3.097674
false
false
false
Neill3d/MoPlugs
PythonScripts/Startup/CmdLineRenderingTool.py
1
11975
######################################################### ## ## Prepare command line to run a rendering processing from *.bat ## ## Github repo - https://github.com/Neill3d/MoPlugs ## Licensed under BSD 3-clause ## https://github.com/Neill3d/MoPlugs/blob/master/LICENSE ## ## Author Sergey Solokhin (Neill3d) 2017 ## ...
bsd-3-clause
5,143,914,506,032,319,000
26.531034
132
0.605762
false
3.413626
false
false
false
tamasgal/django-tornado
run_tornado.py
1
1230
#!/usr/bin/env python # # Runs a Tornado web server with a django project # Make sure to edit the DJANGO_SETTINGS_MODULE to point to your settings.py # # http://localhost:8080/hello-tornado # http://localhost:8080 import sys import os from tornado.options import options, define, parse_command_line import tornado.http...
mit
3,685,607,962,132,046,300
23.6
80
0.695122
false
3.773006
false
false
false
sserrot/champion_relationships
venv/Lib/site-packages/networkx/algorithms/shortest_paths/astar.py
1
5469
# -*- coding: utf-8 -*- # Copyright (C) 2004-2019 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # All rights reserved. # BSD license. # # Authors: Salim Fadhley <salimfadhley@gmail.com> # Matteo Dell'Amico <matteodellamico@gmail.com> "...
mit
4,869,253,740,673,929,000
30.073864
79
0.59115
false
3.771724
false
false
false
diegocortassa/TACTIC
src/tactic/ui/container/wizard_wdg.py
1
19950
############################################################ # # Copyright (c) 2005-2011, 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...
epl-1.0
-4,576,897,553,243,658,000
28.599407
132
0.501955
false
3.704735
false
false
false
EnriquePS/ProtocoloPokemon
cliente/cliente.py
1
2612
import socket import sys import struct import webbrowser #este metdo lee la trivia, descarga la imagen y recive la respuesta del usuario def read_trivia(data): print 'pokemon id:'+ str(data[1]) size = struct.unpack('I',data[2:6]) #print 'image size:'+ str(size[0]) print 'QUIEN ES ESTE POKEMON?' im...
mit
6,914,311,003,820,070,000
24.115385
79
0.546708
false
3.50604
false
false
false
tommasoberlose/p2p_bittorrent
DaemonDownload.py
1
3554
import threading import sys import socket import Constant as const import Function as func import Package as pack from threading import * import TextFunc as tfunc import SocketFunc as sfunc import Upload as upl import PartFunc as pfunc import Download as dnl mutex = Lock() class DaemonDownload(Thread): def __init_...
mit
224,405,308,559,656,350
33.173077
224
0.669668
false
2.752905
false
false
false
markkorput/py2030
py2030/app.py
1
1195
#!/usr/bin/env python import time from optparse import OptionParser from .component_manager import ComponentManager if __name__ == '__main__': parser = OptionParser() parser.add_option('-p', '--profile', dest='profile', default=None) # parser.add_option('-f', '--file', dest='file', default=None) parser...
mit
3,093,308,684,881,002,000
26.790698
97
0.574059
false
4.134948
false
false
false
Strayer/dev-services-launcher
services/PHP.py
1
1039
import subprocess from tools import win32_kill import settings class PHP(object): def __init__(self, addresses): self.path = settings.PHP_CWD self.executable = settings.PHP_EXECUTABLE self.ini = settings.PHP_INI self.addresses = addresses self.processes = [] def start(s...
gpl-2.0
1,621,063,283,698,960,100
29.558824
113
0.573628
false
4.206478
false
false
false
SonyCSL/CSLAIER
src/common/utils.py
1
6890
# -*- coding: utf-8 -*- import sys import os import random import datetime import pkg_resources import subprocess from .nvidia_devices_info import get_devices_info from xml.etree import ElementTree import nkf def get_python_version(): v = sys.version_info return str(v[0]) + '.' + str(v[1]) + '.' + str(v[2]) ...
mit
5,650,222,858,885,279,000
27.554622
98
0.568128
false
3.366023
false
false
false
falcondai/batch_geocode
geocode_csv.py
1
1165
#!/usr/bin/python # geocode_csv.py # A script to geocode the "address" column in a CSV and outputing the result # into a new CSV with "latitude" and "longitude" columns # # Author: Falcon Dai # Date: 4/7/2013 # License: MIT License if __name__ == '__main__': import sys, csv, time from batch_geocode im...
mit
-6,442,824,608,657,742,000
25.785714
85
0.612876
false
2.623874
false
false
false
EmreAtes/spack
var/spack/repos/builtin/packages/abyss/package.py
1
2512
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
3,412,379,314,919,958,500
40.866667
78
0.64371
false
3.578348
false
false
false
levilucio/SyVOLT
UMLRT2Kiltera_MM/Properties/from_thesis/HMM4_then1_ConnectedLHS.py
1
2650
from core.himesis import Himesis, HimesisPreConditionPatternLHS import uuid class HMM4_then1_ConnectedLHS(HimesisPreConditionPatternLHS): def __init__(self): """ Creates the himesis graph representing the AToM3 model HMM4_then1_ConnectedLHS. """ #...
mit
5,102,672,214,256,245,000
42.442623
125
0.47434
false
5.206287
false
false
false
jbzdak/data-base-checker
bdchecker/api.py
1
9195
from operator import itemgetter import re from sqlalchemy.orm import sessionmaker __author__ = 'jb' import uuid from .db_utils import * import os import unittest import io import logging logging.getLogger('sqlalchemy.engine').setLevel(logging.INFO) def create_engine_for(user, password, database, echo=False, host=N...
gpl-3.0
-821,261,610,025,321,200
24.470914
114
0.576835
false
4.043536
true
false
false
jamesni/zanata-python-client
zanataclient/zanatalib/projectservice.py
1
7020
#vim:set et sts=4 sw=4: # # Zanata Python Client # # Copyright (c) 2011 Jian Ni <jni@redhat.com> # Copyright (c) 2011 Red Hat, Inc. # # This library 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; eit...
gpl-3.0
8,598,788,224,025,806,000
38.886364
158
0.628205
false
4.32
false
false
false
beproud/bp-cron
src/utils/holiday.py
1
2425
import logging from datetime import date, datetime, timedelta from dateutil import parser from dateutil.rrule import DAILY, rrule from src.utils.google_api import get_service CALENDAR_ID = "ja.japanese#holiday@group.v.calendar.google.com" # 日本の祝日を入れておくセット holiday_set = set() # 年末年始休暇の開始日と終了日 START = date(2016, 12,...
mit
6,716,281,637,206,581,000
23.590361
79
0.641842
false
2.288117
false
false
false
katerina7479/pypdflite
pypdflite/pdfobjects/pdftable.py
1
3779
from .pdfrow import PDFRow from .pdfcolumn import PDFColumn class PDFTable(object): def __init__(self, session, page, rows, cols, cursor, def_font): self.session = session self.page = page self.font = def_font self.number_of_rows = rows self.number_of_columns = cols ...
mit
5,406,865,965,786,356,000
30.231405
74
0.552263
false
3.545028
false
false
false
ActiveState/code
recipes/Python/579113_defdict/recipe-579113.py
1
9898
#!/usr/bin/env python # This file is licensed under the GNU General Public License found at <http://www.gnu.org/licenses> # email: Mark Janssen <dreamingforward@gmail.com> """Dictionary with default values, collision function, and sorted string output.""" import exceptions import copy class KeyAlreadyE...
mit
-815,319,348,620,935,200
39.73251
141
0.591635
false
3.921553
false
false
false
twitter/pants
src/python/pants/base/workunit.py
1
9444
# 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, print_function, unicode_literals import os import re import time import uuid from builtins import object, range from colle...
apache-2.0
8,871,256,780,476,791,000
31.453608
98
0.64443
false
3.773072
true
false
false
Aravinthu/odoo
addons/website_sale/models/product.py
1
11241
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, tools, _ from odoo.addons import decimal_precision as dp from odoo.tools import pycompat from odoo.tools.translate import html_translate class ProductStyle(models.Model): _name...
agpl-3.0
-4,400,069,424,017,847,000
48.96
183
0.649675
false
4.129684
false
false
false
rzabini/gradle-sphinx
src/main/jython/os.py
1
25197
r"""OS routines for Mac, NT, or Posix depending on what system we're on. This exports: - all functions from posix, nt, os2, or ce, e.g. unlink, stat, etc. - os.path is one of the modules posixpath, or ntpath - os.name is 'posix', 'nt', 'os2', 'ce' or 'riscos' - os.curdir is a string representing the current di...
apache-2.0
1,019,734,515,747,745,500
33.706612
83
0.604794
false
4.03281
false
false
false
barneygale/cedar
cedar/cedar.py
1
3829
import os #temp directory import tempfile import shutil import contextlib #jar downloader import urllib2 import json #cedar code from blocks import BlockColours from spiral import Spiral from world import World from wrapper import Wrapper from lib.png import Writer @contextlib.contextmanager def tempdir(*a, **k): ...
mit
-7,296,568,467,212,249,000
30.916667
118
0.538783
false
3.915133
false
false
false
michal-ruzicka/archivematica
src/MCPClient/lib/clientScripts/archivematicaCreateProcessedStructmap.py
1
3081
#!/usr/bin/python -OO from __future__ import print_function import os import sys from custom_handlers import get_script_logger from archivematicaCreateMETS import createFileSec, each_child from archivematicaCreateMETS2 import createDigiprovMD import archivematicaXMLNamesSpace as ns from lxml import etree def crea...
agpl-3.0
-3,433,260,524,036,228,600
41.205479
133
0.654982
false
3.637544
false
false
false
jimsize/PySolFC
pysollib/util.py
1
5339
#!/usr/bin/env python # -*- mode: python; coding: utf-8; -*- # ---------------------------------------------------------------------------## # # Copyright (C) 1998-2003 Markus Franz Xaver Johannes Oberhumer # Copyright (C) 2003 Mt. Hood Playing Card Co. # Copyright (C) 2005-2009 Skomoroh # # This program is free softwa...
gpl-3.0
6,557,655,274,380,356,000
33.895425
79
0.540925
false
3.741416
false
false
false
alazanman/py_epg_tests
fixture/channel_db.py
1
2699
# -*- coding: utf-8 -*- from model.channel import Channel class DbChannelHelper: def __init__(self, db): self.db = db def get_channels(self): channels = [] cursor = self.db.connection.cursor() try: cursor.execute( "select id, name, service_id, epg_...
apache-2.0
-2,066,353,362,194,304,800
41.857143
157
0.56206
false
4.046477
false
false
false
mnahm5/django-estore
Lib/site-packages/awscli/customizations/datapipeline/translator.py
1
7212
# Copyright 2014 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file acc...
mit
1,967,457,875,482,338,000
34.527094
79
0.642263
false
4.210158
false
false
false
akuster/yali
yali/gui/runner.py
1
5413
# -*- coding: utf-8 -*- # # Copyright (C) 2005-2010 TUBITAK/UEKAE # # 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. # # ...
gpl-2.0
-2,483,951,368,154,206,700
35.560811
116
0.608021
false
3.967009
false
false
false
bflaven/BlogArticlesExamples
extending_streamlit_usage/001_nlp_spacy_python_realp/002c_nlp_spacy_python.py
1
1651
#!/usr/bin/python # -*- coding: utf-8 -*- """ [path] cd /Users/brunoflaven/Documents/01_work/blog_articles/extending_streamlit_usage/001_nlp_spacy_python_realp/ [file] python 002c_nlp_spacy_python.py # source Source: https://realpython.com/natural-language-processing-spacy-python/ # required pip install spacy-...
mit
1,533,434,948,254,148,000
27.964912
285
0.690491
false
3.25
false
false
false
archesproject/arches
arches/app/search/base_index.py
1
7123
import pyprind from datetime import datetime from django.utils.translation import ugettext as _ from arches.app.models import models from arches.app.models.resource import Resource from arches.app.models.system_settings import settings from arches.app.utils import import_class_from_string from arches.app.search.search_...
agpl-3.0
8,049,778,892,263,966,000
35.331633
166
0.63404
false
4.213609
false
false
false
itnihao/thriftpy
thriftpy/protocol/binary.py
1
10025
# -*- coding: utf-8 -*- from __future__ import absolute_import import struct from ..thrift import TType from .exc import TProtocolException # VERSION_MASK = 0xffff0000 VERSION_MASK = -65536 # VERSION_1 = 0x80010000 VERSION_1 = -2147418112 TYPE_MASK = 0x000000ff def pack_i8(byte): return struct.pack("!b", byt...
mit
-7,436,702,996,779,655,000
25.038961
75
0.569476
false
3.283655
false
false
false
skdaccess/skdaccess
skdaccess/examples/terminal_groundwater_example.py
2
2474
#!/usr/bin/env python3 # The MIT License (MIT) # Copyright (c) 2016,2017 Massachusetts Institute of Technology # # Author: Cody Rude # This software has been created in projects supported by the US National # Science Foundation and NASA (PI: Pankratius) # # Permission is hereby granted, free of charge, to any person o...
mit
-3,362,070,544,281,174,500
33.361111
79
0.738884
false
3.601164
false
false
false
atmtools/typhon
typhon/math/array.py
1
6240
"""Functions operating on arrays.""" # Any commits made to this module between 2015-05-01 and 2017-03-01 # by Gerrit Holl are developed for the EC project “Fidelity and # Uncertainty in Climate Data Records from Earth Observations (FIDUCEO)”. # Grant agreement: 638822 # # All those contributions are dual-licensed unde...
mit
-2,880,749,940,338,907,600
30.77551
85
0.594733
false
3.678677
false
false
false
domfarolino/material-message-board
app/google.py
1
3680
""" OAuthSignIn sub-class to support Google login """ from oauth import * class GoogleSignIn(OAuthSignIn): public_name = "Google" provider_name = "google" def __init__(self): import ast print "GoogleSignIn Object __init__()" super(GoogleSignIn, self).__init__(self.provider_name) print " * Cr...
gpl-3.0
1,862,180,900,680,866,300
45.0125
273
0.692391
false
3.622047
false
false
false
iris-edu/ispaq
ispaq/orientationCheck_metrics.py
1
17555
""" ISPAQ Business Logic for Orientation Check Metrics. :copyright: Mazama Science :license: GNU Lesser General Public License, Version 3 (http://www.gnu.org/copyleft/lesser.html) """ from __future__ import (absolute_import, division, print_function) import numpy as np import pandas as pd from .concierg...
lgpl-3.0
-514,858,001,789,757,000
45.197368
220
0.554543
false
4.025453
false
false
false
tiborsimko/analysis-preservation.cern.ch
cap/modules/schemas/models.py
1
7772
# -*- coding: utf-8 -*- # # This file is part of CERN Analysis Preservation Framework. # Copyright (C) 2016 CERN. # # CERN Analysis Preservation Framework 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-2.0
4,545,314,367,023,224,000
32.938865
79
0.585821
false
4.289183
false
false
false
asceth/devsyn
devsyn/procedural/trees/simple.py
1
6441
import math import __builtin__ from pandac.PandaModules import Vec3, GeomVertexData, GeomVertexFormat from pandac.PandaModules import Geom, GeomVertexWriter, GeomVertexRewriter from pandac.PandaModules import GeomVertexReader, GeomTristrips, CullFaceAttrib from pandac.PandaModules import GeomNode, NodePath, Mat4, Vec4...
mit
3,595,269,286,669,190,000
37.112426
111
0.656575
false
3.330403
false
false
false
PatrickKennedy/pygab
common/argparse.py
1
75204
# -*- coding: utf-8 -*- # Copyright © 2006 Steven J. Bethard <steven.bethard@gmail.com>. # # Redistribution and use in source and binary forms, with or without # modification, are permitted under the terms of the 3-clause BSD # license. No warranty expressed or implied. # For details, see the accompanying file LICE...
bsd-2-clause
-6,090,538,348,669,467,000
35.955283
86
0.560143
false
4.587008
false
false
false
jntkym/rappers
preprocess.py
1
6424
#!/usr/bin/env python # -*- coding: utf-8 -*- import re import csv import time import sys import subprocess import codecs from utils import * import unicodedata import argparse import cPickle as pickle reload(sys) sys.setdefaultencoding('utf8') # pattern for removing redundunt spaces space_pat = re.compile(u'\s\s+', ...
mit
-3,816,924,360,779,933,700
30.068627
116
0.563427
false
3.314854
false
false
false
richard-willowit/odoo
addons/website_slides/models/slides.py
2
30970
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import requests from PIL import Image import base64 import datetime import io import json import re from werkzeug import urls from odoo import api, fields, models, SUPERUSER_ID, _ from odoo.addons.http_routing.models.i...
gpl-3.0
-3,198,032,734,659,106,000
48.63141
189
0.607653
false
3.925719
true
false
false
pyhmsa/pyhmsa
pyhmsa/fileformat/datafile.py
1
13644
""" Reader and writer of data file """ # Standard library modules. import os import io import logging logger = logging.getLogger(__name__) import binascii import xml.etree.ElementTree as etree import xml.dom.minidom as minidom # Third party modules. from pkg_resources import iter_entry_points # Local modules. from p...
mit
-8,320,272,475,336,594,000
34.34715
96
0.597699
false
3.887179
false
false
false
dormouse/read
make_mobi.py
1
9766
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import hashlib import logging import os import platform import re import subprocess import shutil from functools import reduce from urllib.parse import urlparse, urljoin import httplib2 from bs4 import BeautifulSoup from jinja2 import Template from yttools import YtTool...
lgpl-3.0
5,856,424,823,413,545,000
31.098684
78
0.521931
false
3.697613
false
false
false
espressopp/espressopp
src/FixedPairListAdress.py
1
3687
# Copyright (C) 2012,2013,2015,2016 # Max Planck Institute for Polymer Research # Copyright (C) 2008,2009,2010,2011 # Max-Planck-Institute for Polymer Research & Fraunhofer SCAI # # This file is part of ESPResSo++. # # ESPResSo++ is free software: you can redistribute it and/or modify # it under the term...
gpl-3.0
-5,355,600,725,343,704,000
31.06087
83
0.643341
false
3.724242
false
false
false
ArcherSys/ArcherSys
ArcherBash/lists.py
1
2561
<<<<<<< HEAD <<<<<<< HEAD def count(sequence, item): number = 0 for i in sequence: if i is item: number += 1 return number def purify(x): l=[] for c in x: if c%2==0: l.append(c) return l def product(x): res = 1 for i in x: res *= i return...
mit
5,035,323,708,409,660,000
17.557971
60
0.5041
false
3.229508
false
false
false
kinsney/sport
bikeConvert.py
1
3455
import pymysql as pm import time from django.contrib.auth.hashers import make_password qike = pm.connect(host='localhost',user='root',passwd='root',db='qike',port=3306,charset='utf8') sport = pm.connect(host='localhost',user='root',passwd='root',db='sport',port=3306,charset='utf8') try: qc = qike.cursor() sc = ...
mit
4,098,447,866,214,811,000
46.753623
396
0.566313
false
2.720892
false
false
false
RedHatInsights/insights-core
insights/parsers/tests/test_aws_instance_type.py
1
2273
import pytest import doctest from insights.parsers import aws_instance_type from insights.parsers.aws_instance_type import AWSInstanceType from insights.tests import context_wrap from insights.parsers import SkipException, ParseException from insights.core.plugins import ContentException AWS_TYPE = "r3.xlarge" AWS_TYP...
apache-2.0
1,821,836,155,644,708,900
28.907895
79
0.639683
false
3.192416
true
false
false
hortont424/phiface
phiface/capitals.py
1
22542
# -*- coding: utf-8 -*- from glyph import * @glyph('A') class AGlyph(Glyph): def __init__(self, x, y, capHeight): super(AGlyph, self).__init__(x, y, capHeight) def width(self): return self.em() def getPolygon(self): super(AGlyph, self).setupDrawing() leftLine = Line(self...
bsd-2-clause
-2,085,489,251,625,412,600
31.202857
80
0.497516
false
3.131268
false
false
false
AutorestCI/azure-sdk-for-python
azure-mgmt-consumption/azure/mgmt/consumption/consumption_management_client.py
1
4350
# 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,939,566,008,101,267,000
44.3125
113
0.716322
false
4.728261
true
false
false
previtus/MGR-Project-Code
DatasetHandler/DatasetObj.py
1
22075
import Downloader.DataOperations as DataOperations import Downloader.KerasPreparation as KerasPreparation import os import shutil import numpy as np import random import math import Downloader.Defaults from Omnipresent import file_exists_and_accesible class Dataset: ''' Common base class for a Dataset Wha...
mit
866,294,932,582,097,700
36.799658
169
0.555062
false
3.853203
false
false
false
vuolter/pyload
src/pyload/plugins/accounts/SmoozedCom.py
1
2338
# -*- coding: utf-8 -*- import hashlib import json import time from ..base.multi_account import MultiAccount class SmoozedCom(MultiAccount): __name__ = "SmoozedCom" __type__ = "account" __version__ = "0.13" __status__ = "testing" __config__ = [ ("mh_mode", "all;listed;unlisted", "Filter...
agpl-3.0
-2,423,730,721,708,056,000
30.173333
86
0.517964
false
3.864463
false
false
false
yuokada/pyp2rpm
pyp2rpm/package_data.py
1
3746
import subprocess import time import locale import logging from pyp2rpm import version from pyp2rpm import utils logger = logging.getLogger(__name__) def get_deps_names(runtime_deps_list): ''' data['runtime_deps'] has format: [['Requires', 'name', '>=', 'version'], ...] this function creates list of...
mit
-8,890,636,851,773,060,000
38.020833
95
0.563001
false
3.906152
false
false
false
dlebauer/plantcv
scripts/dev/vis_tv_z500_L2.py
1
5084
#!/usr/bin/python import sys, traceback import cv2 import numpy as np import argparse import string import plantcv as pcv ### Parse command-line arguments def options(): parser = argparse.ArgumentParser(description="Imaging processing with opencv") parser.add_argument("-i", "--image", help="Input image file.", req...
gpl-2.0
6,379,036,647,077,785,000
42.084746
167
0.700236
false
3.092457
false
false
false
andybrnr/QuantEcon.py
lecture scratch scripts/QuantEcon_Exercises_Ch2Sec2.py
1
2123
# -*- coding: utf-8 -*- """ Created on Tue Jun 30 08:45:53 2015 @author: ABerner """ from __future__ import print_function # Ex 1 import numpy as np import scipy as sp import scipy.stats as stats import quantecon as qe import matplotlib.pyplot as plt alpha = 0.1 beta = 0.1 P = np.array([[1-alpha,alpha],[beta,1-be...
bsd-3-clause
4,790,539,041,443,056,000
21.585106
87
0.558172
false
2.426286
false
false
false
fmfn/UnbalancedDataset
imblearn/metrics/pairwise.py
2
7730
"""Metrics to perform pairwise computation.""" # Authors: Guillaume Lemaitre <g.lemaitre58@gmail.com> # License: MIT import numpy as np from scipy.spatial import distance_matrix from sklearn.base import BaseEstimator from sklearn.utils import check_consistent_length from sklearn.utils.multiclass import unique_labels ...
mit
1,577,381,145,551,678,200
37.267327
87
0.590944
false
3.74153
false
false
false
ingenieroariel/geonode
geonode/layers/urls.py
1
3526
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # 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 ...
gpl-3.0
-1,857,138,730,750,675,500
52.424242
112
0.615712
false
3.612705
false
false
false
qzane/you-get
src/you_get/extractors/qq.py
1
7043
#!/usr/bin/env python __all__ = ['qq_download'] from ..common import * from .qie import download as qieDownload from urllib.parse import urlparse,parse_qs def qq_download_by_vid(vid, title, output_dir='.', merge=True, info_only=False): info_api = 'http://vv.video.qq.com/getinfo?otype=json&appver=3%2E2%2E19%2E333...
mit
-2,776,723,440,680,657,000
42.41358
153
0.55723
false
3.169446
false
false
false
HerculesShek/hercules.python.pro
HZ_BUS/forecast/createAlphaTable2.py
1
2762
# -*- coding: utf-8 -*- import MySQLdb, time conn=MySQLdb.connect(host="localhost",user="root",passwd="xrt512",db="hz_bus", port=3306) cur = conn.cursor(); #创建alphaTable2 cur.execute(u''' create table alphaTable2 as select * from ( select lineid,linedir,stopInfo,AVG(internalTime) as averageInternalTime...
mit
4,831,342,640,800,055,000
29.880952
135
0.650859
false
2.686058
false
false
false
a-lost-shadow/shadowcon
convention/utils.py
1
1782
from django.utils import timezone from .models import ConInfo, Registration, BlockRegistration, TimeBlock, get_choice, Game def friendly_username(user): name = user.first_name + " " + user.last_name name = name.strip() if "" == name: name = user.username return name def get_con_value(parame...
gpl-3.0
-3,381,440,770,113,010,000
30.821429
115
0.627946
false
4.087156
false
false
false
jbalogh/zamboni
apps/discovery/cron.py
1
2467
import httplib import os import shutil import time import urllib2 from tempfile import NamedTemporaryFile from django.conf import settings import commonware.log from pyquery import PyQuery as pq import cronjobs from .models import BlogCacheRyf log = commonware.log.getLogger('z.cron') RYF_IMAGE_PATH = os.path.join...
bsd-3-clause
4,913,052,559,919,793,000
27.686047
79
0.639643
false
3.407459
false
false
false
xaxa89/mitmproxy
mitmproxy/contrib/wbxml/ASWBXMLCodePage.py
1
1770
#!/usr/bin/env python ''' @author: David Shaw, david.shaw.aw@gmail.com Inspired by EAS Inspector for Fiddler https://easinspectorforfiddler.codeplex.com ----- The MIT License (MIT) ----- Filename: ASWBXMLCodePage.py Copyright (c) 2014, David P. Shaw Permission is hereby granted, free of charge, to any person obtain...
mit
4,691,102,491,026,070,000
33.038462
77
0.757627
false
3.695198
false
false
false
guillaume-philippon/aquilon
tests/broker/test_update_alias.py
1
13569
#!/usr/bin/env python # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2011,2012,2013,2014,2015,2016 Contributor # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. #...
apache-2.0
-5,472,717,046,711,124,000
43.343137
86
0.541307
false
3.753527
true
false
false
decatur/ansatz27
build.py
1
1335
# Builds the README.md # Looks for areas between two markers of the form # [//]: # "filename(#hash)?" # and replaces the text of those areas by the referenced text. import codecs import logging import re logging.basicConfig(level=20) # info f = codecs.open("README.md", "r", "utf-8") readme = f.read() f.close() d...
mit
8,769,968,715,114,151,000
23.740741
101
0.59176
false
3.027211
false
false
false
rootfoo/libctf
libctf/process.py
1
1037
from subprocess import Popen, PIPE import fcntl import os import time import signal class Process(object): """ open a process with non-blocking stdin unlike commuinicate() will allow interactive communication without waiting for the process to exit """ def __init__(self, exe): self.exe = exe self.process = ...
mit
-3,288,675,890,906,295,300
21.06383
102
0.693346
false
2.929379
false
false
false
pinac0099/dynamic-bus-scheduling
src/common/functions.py
1
7323
#!/usr/local/bin/python # -*- coding: utf-8 -*- """ - LICENCE The MIT License (MIT) Copyright (c) 2016 Eleftherios Anagnostopoulos for Ericsson AB (EU FP7 CityPulse Project) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software...
mit
5,143,557,972,820,507,000
41.086207
111
0.62529
false
3.18946
false
false
false
slackapi/python-slackclient
slack_sdk/web/legacy_base_client.py
1
22083
"""A Python module for interacting with Slack's Web API.""" import asyncio import copy import hashlib import hmac import io import json import logging import mimetypes import urllib import uuid import warnings from http.client import HTTPResponse from ssl import SSLContext from typing import BinaryIO, Dict, List from ...
mit
-1,541,434,596,766,754,300
39.743542
125
0.525744
false
4.303001
false
false
false
RDeckers/ScientificVisualization-1TD389
Assignments/Assignment 1/part2a/molecules.py
1
7392
"""Molecular dynamics. This script should display the atoms (and their connections) in a molecular dynamics simulation dataset. You can run the script from the command line by typing python molecules.py """ from vtk import * import molecules_io import collections import operator #needed to determine the path to t...
gpl-3.0
3,674,771,079,054,238,000
33.381395
188
0.736201
false
3.340262
false
false
false
dariosena/LearningPython
PY-14/forca.py
1
2811
import random def jogar(): imprime_messagem_de_abertura() palavra_secreta = carrega_palavra_secreta() letras_acertadas = ['_' for letra in palavra_secreta] acertou = False enforcou = False erros = 0 print(letras_acertadas) while (not acertou and not enforcou): chute = pe...
gpl-3.0
1,580,980,590,459,419,000
26.271845
57
0.404202
false
3.162162
false
false
false
forseti-security/forseti-security
google/cloud/forseti/common/gcp_type/appengine.py
1
1911
# Copyright 2017 The Forseti Security Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
apache-2.0
3,290,040,204,077,729,300
38.8125
80
0.689691
false
3.876268
false
false
false
jhogsett/linkit
python/cyclone.py
1
3241
#!/usr/bin/python import serial import time import random import sys s = None num_leds = 93 play_time = 0 def flush_input(): s.flushInput() def wait_for_ack(): while s.inWaiting() <= 0: pass ...
mit
-2,699,644,802,816,666,000
31.089109
151
0.39062
false
4.05632
false
false
false
amcat/amcat
amcat/tools/clustermap.py
1
6550
########################################################################## # (C) Vrije Universiteit, Amsterdam (the Netherlands) # # # # This file is part of AmCAT - The Amsterdam Content Analysis Toolkit # # ...
agpl-3.0
7,175,982,662,567,712,000
36.00565
101
0.611298
false
4.018405
false
false
false
zbarge/zeex
zeex/core/ui/basic/push_grid_ui.py
1
2316
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'C:/Users/Zeke/Google Drive/dev/python/zeex/zeex/core/ui/basic/push_grid.ui' # # Created: Mon Nov 13 22:57:17 2017 # by: pyside-uic 0.2.15 running on PySide 1.2.2 # # WARNING! All changes made in this file will be lost! from PySide impo...
mit
-6,414,148,394,479,850,000
50.466667
131
0.717185
false
3.552147
false
false
false
Eksmo/calibre
src/calibre/devices/usbms/driver.py
1
22481
# -*- coding: utf-8 -*- __license__ = 'GPL v3' __copyright__ = '2009, John Schember <john at nachtimwald.com>' __docformat__ = 'restructuredtext en' ''' Generic USB Mass storage device driver. This is not a complete stand alone driver. It is intended to be subclassed with the relevant parts implemented for a partic...
gpl-3.0
321,990,210,503,236,000
43.962
112
0.558872
false
4.118154
false
false
false
joshbohde/scikit-learn
sklearn/svm/sparse/base.py
1
11891
import numpy as np from ..base import BaseLibSVM, BaseLibLinear, _get_class_weight from . import libsvm from .. import liblinear class SparseBaseLibSVM(BaseLibSVM): _kernel_types = ['linear', 'poly', 'rbf', 'sigmoid', 'precomputed'] _svm_types = ['c_svc', 'nu_svc', 'one_class', 'epsilon_svr', 'nu_svr'] ...
bsd-3-clause
-1,599,776,428,535,825,400
36.511041
89
0.539147
false
4.089065
false
false
false
nbear3/Dolphin-Updater
Source/controllers/dolphin_control.py
1
1169
"""Handle control over dolphin parsing""" import urllib from bs4 import BeautifulSoup def get_dolphin_html(): url = 'https://dolphin-emu.org/download/' response = urllib.request.urlopen(url) data = response.read() return data.decode('utf-8') def get_dolphin_link(dolphin_html=None): if dolphin_...
gpl-3.0
7,803,553,696,066,041,000
31.472222
102
0.627032
false
3.052219
false
false
false
likit/gimme
tests/find_RI_test.py
1
3910
import unittest import networkx as nx from utils.find_RI import get_exon_node, find_RI, add_intervals, Exon from bx.intervals import IntervalTree '''test data contain genes with 0, 1, 2, 3 and 4 retained introns.''' test_file = "../test_data/RI.test.bed" class TestLoadData(unittest.TestCase): def test_load_data...
gpl-3.0
-7,516,247,500,477,240,000
36.961165
72
0.589003
false
2.831282
true
false
false
slarosa/QGIS
python/plugins/sextante/modeler/MultilineTextPanel.py
1
2953
# -*- coding: utf-8 -*- """ *************************************************************************** MultilineTextPanel.py --------------------- Date : January 2013 Copyright : (C) 2013 by Victor Olaya Email : volayaf at gmail dot com *******************...
gpl-2.0
2,789,578,933,932,325,000
36.858974
90
0.533695
false
4.487842
false
false
false
abid-mujtaba/blackout
settings.py
1
5035
# Django settings for blackout project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME':...
apache-2.0
-6,480,240,750,497,485,000
33.724138
115
0.684409
false
3.740713
false
false
false
kaczmarj/neurodocker
examples/test_examples.py
1
1405
"""Run the neurodocker examples and check for failures.""" import glob import os import subprocess here = os.path.dirname(os.path.realpath(__file__)) def test_examples_readme(): with open(os.path.join(here, "README.md")) as f: readme = f.read() readme = readme.replace("\\\n", " ") cmds = [] ...
apache-2.0
5,201,097,463,606,118,000
25.509434
77
0.578648
false
3.54798
false
false
false
tjvr/pyswip
pyswip/core.py
1
28267
# -*- coding: utf-8 -*- # pyswip -- Python SWI-Prolog bridge # Copyright (c) 2007-2012 Yüce Tekol # # 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 ...
mit
-6,129,401,683,637,074,000
31.047619
116
0.602597
false
2.94929
false
false
false
hijoe320/RSSNewsBot
rssnewsbot/spiders/rssspider.py
1
2314
from time import sleep, gmtime, mktime from datetime import datetime import logging import scrapy import redis import msgpack import xxhash import pymongo as pm import feedparser as fp from colorama import Back, Fore, Style from ..settings import MONGODB_URI, REDIS_HOST, REDIS_PORT, REDIS_PWD, REDIS_PENDING_QUEUE def...
mit
-9,142,137,552,510,368,000
31.591549
103
0.601988
false
3.438336
false
false
false
ydkhatri/mac_apt
plugins/msoffice.py
1
20161
''' Copyright (c) 2017 Yogesh Khatri This file is part of mac_apt (macOS Artifact Parsing Tool). Usage or distribution of this software/code is subject to the terms of the MIT License. ''' import logging import sqlite3 import struct from os import path from plistutils.alias import AliasParser from pl...
mit
1,772,681,161,322,302,500
43.7051
231
0.576013
false
3.87637
false
false
false