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
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.2/Lib/email/MIMEAudio.py
1
2545
# Author: Anthony Baxter """Class representing audio/* type MIME documents. """ import sndhdr from cStringIO import StringIO import MIMEBase import Errors import Encoders _sndhdr_MIMEmap = {'au' : 'basic', 'wav' :'x-wav', 'aiff':'x-aiff', 'aifc':'x-aiff',...
mit
3,961,440,915,732,128,300
33.863014
77
0.639293
false
4.033281
false
false
false
chehanr/moodlescrapr
moodlescrapr3.py
1
9047
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """A simple (improved + 1) ACBT scraper to download course files (by /u/chehanr).""" import getpass import os import urllib from argparse import ArgumentParser import requests from bs4 import BeautifulSoup, SoupStrainer CWD = os.getcwd() class Download: """Downlo...
gpl-3.0
-6,424,722,299,303,595,000
37.828326
196
0.543053
false
4.15
false
false
false
kave/deepscrub
core/models.py
1
2346
from django.db import models class Price(models.Model): cost = models.FloatField(blank=False) promotion = models.CharField(max_length=100, blank=False) def __unicode__(self): return '${0}'.format(self.cost) class Color(models.Model): WHITE = 1 BLACK = 2 name = models.CharField(max_l...
artistic-2.0
4,112,472,593,783,800,300
26.6
93
0.665814
false
3.538462
false
false
false
mmromero/dwybss
dwybss/bss/bss.py
1
12622
''' Created on 8 Sep 2017 Root class for all the bss methods (scalability) @author: Miguel Molina Romero, Techical University of Munich @contact: miguel.molina@tum.de @license: LPGL ''' import nibabel as nib import numpy as np import dwybss.bss.utils as ut import os from joblib import Parallel, delayed class BSS: ...
lgpl-3.0
3,995,142,767,246,093,000
41.19398
243
0.567261
false
3.668218
false
false
false
Milias/ModellingSimulation
Week9/python/plots.py
1
14528
#!/usr/bin/env python # -*- coding: utf8 -*- import json import sys from numpy import * from scipy.optimize import curve_fit import matplotlib.pyplot as plt color = {20:"r-", 40:"g-", 100:"b-", 30: "k--", 60:"m--", 50:"g--"} def MagnetizationVsStep(savefile, filenames): try: data = [] for filename in filen...
mit
-4,814,993,212,101,208,000
27.998004
130
0.52712
false
2.422141
false
false
false
tuxfux-hlp-notes/python-batches
batch-67/14-Logging/seventh.py
1
2186
#!/usr/bin/python # l.basicConfig? # l.Formatter? # man date or time.strftime() # subprocess:https://docs.python.org/2/library/subprocess.html # crontab or scheduler # shelx # handlers: https://docs.python.org/2/howto/logging.html#useful-handlers # lh.SysLogHandler? import logging from logging.handlers import SysLogHa...
gpl-3.0
-5,970,782,362,328,364,000
34.274194
95
0.692132
false
3.322188
false
false
false
martysyuk/PY-3-Learning
homeworks/lesson2-5.py
1
1229
# -*- coding: UTF-8 -*- # Домашнее задание по уроку 2.5 # «Работа с папками, путями» # Выполнил Мартысюк Илья PY-3 import glob from os.path import join def search_in_files(search, files_list): temp_filtered_list = list() for index, file in enumerate(files_list): with open(file, 'r') as work_file: ...
mit
4,530,041,229,361,432,600
25.756098
62
0.630811
false
2.569087
false
false
false
JorgeDeLosSantos/NanchiPlot
nanchi/uiaux.py
1
25587
# -*- coding: utf-8 -*- import matplotlib.pyplot as plt import numpy as np import wx import wx.html as html import wx.grid as wxgrid import wx.lib.floatbar as wxfb import webbrowser try: import uibase as ui import iodata as io from _const_ import * from util import isempty except: import nanchi.ui...
mit
7,859,190,531,030,774,000
34.098765
99
0.559425
false
3.188411
false
false
false
hugs/selenium
firefox/src/py/extensionconnection.py
1
2732
# Copyright 2008-2009 WebDriver committers # Copyright 2008-2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
-2,958,718,092,136,119,300
33.15
75
0.675695
false
4.350318
false
false
false
openfisca/openfisca-matplotlib
openfisca_matplotlib/tests/test_inversion.py
1
5053
# -*- coding: utf-8 -*- from __future__ import division import datetime from openfisca_core import periods from openfisca_core.tools import assert_near from openfisca_france import FranceTaxBenefitSystem from openfisca_france.reforms.inversion_directe_salaires import inversion_directe_salaires from matplotlib impo...
agpl-3.0
-3,216,029,010,520,110,000
35.092857
116
0.645953
false
2.984643
false
false
false
dag10/EventLCD
website/app/events.py
1
2672
import requests from datetime import datetime import dateutil.parser import pytz import urllib import yaml import dateutil.parser import re class Events: def __init__(self): try: with open('app.yaml', 'r') as f: self.config = yaml.load(f) except: raise Exception('Missing/invalid config') ...
mit
-1,262,797,832,440,862,700
23.740741
80
0.611901
false
3.878084
false
false
false
Lattyware/unrest
unrest.py
1
5481
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ Copyright © 2011: Lattyware <gareth@lattyware.co.uk> This file is part of unrest. unrest 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...
gpl-3.0
8,282,483,104,794,054,000
27.393782
131
0.679015
false
2.913344
false
false
false
wontfix-org/wtf
_setup/py3/ext.py
1
7479
# -*- coding: ascii -*- # # Copyright 2007, 2008, 2009, 2010, 2011 # Andr\xe9 Malo or his licensors, as applicable # # 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.or...
apache-2.0
1,383,966,553,002,570,800
28.561265
78
0.594732
false
4.295807
true
false
false
xZise/pywikibot-core
scripts/unlink.py
1
7673
#!/usr/bin/python # -*- coding: utf-8 -*- """ This bot unlinks a page on every page that links to it. This script understands this command-line argument: -namespace:n Number of namespace to process. The parameter can be used multiple times. It works in combination with all other ...
mit
3,933,467,441,758,765,600
36.612745
125
0.545158
false
4.453279
false
false
false
nemerle/reko
src/tools/Dll2Lib.py
3
1769
TOOLCHAIN = "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\bin\\amd64\\" def getNativePath(filePath): if strtoupper(PHP_OS) == "CYGWIN": return rtrim(shell_exec("cygpath -w '{$filePath}'")) return filePath def getLocalPath(filePath): if(strtoupper(PHP_OS) == "CYGWIN"): return rtrim(shell_exec("cyg...
gpl-2.0
-3,016,731,800,723,802,600
28.483333
85
0.670435
false
2.672205
false
false
false
mdj2/django
django/views/generic/edit.py
2
8429
import warnings from django.forms import models as model_forms from django.core.exceptions import ImproperlyConfigured from django.http import HttpResponseRedirect from django.utils.encoding import force_text from django.views.generic.base import TemplateResponseMixin, ContextMixin, View from django.views.generic.deta...
bsd-3-clause
-5,578,284,978,364,074,000
30.334572
96
0.606596
false
4.440991
false
false
false
yaybu/touchdown
touchdown/goals/refresh.py
1
1493
# Copyright 2015 Isotoma Limited # # 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...
apache-2.0
3,562,553,157,625,070,600
30.765957
75
0.679169
false
4.112948
false
false
false
spiralray/kondo
scripts/kondo.py
1
1370
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on 2015/02/26 @author: spiralray ''' import sys import yaml import roslib roslib.load_manifest("kondo"); import rospy from _servo import servo import serial import struct import time import threading import math class kondo(serial.Serial): def setAngle...
mit
1,974,135,662,869,258,200
23.482143
97
0.622628
false
2.997812
false
false
false
adsr303/unjabber
unjabberlib/tkui.py
1
2101
from tkinter import * from tkinter.scrolledtext import ScrolledText from tkinter.ttk import * from unjabberlib import formatters class ScrolledTextFormatter(formatters.Formatter): def __init__(self, scrolled_text): super().__init__() self.text = scrolled_text self.text.tag_configure(forma...
mit
-5,649,839,388,989,175,000
34.610169
76
0.60019
false
3.673077
false
false
false
esistgut/django-content-toolkit
accounts/migrations/0003_auto_20150608_1342.py
1
1142
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('accounts', '0002_auto_20150520_2341'), ] operations = [ migrations.AlterField( mode...
mit
5,197,411,857,469,430,000
33.606061
257
0.609457
false
4.309434
false
false
false
zeraien/pyjade
pyjade/parser.py
1
10550
from __future__ import absolute_import from .lexer import Lexer from . import nodes import six textOnly = ('script','style') class Parser(object): def __init__(self,str,filename=None,**options): self.input = str self.lexer = Lexer(str,**options) self.filename = filename self.bloks ...
mit
-330,388,523,607,640,800
29.403458
117
0.525877
false
4.022112
false
false
false
sternshus/Arelle
arelle/plugin/xbrlDB/XbrlOpenSqlDB.py
1
79112
''' XbrlOpenSqlDB.py implements an SQL database interface for Arelle, based on a concrete realization of the Open Information Model and Abstract Model Model PWD 2.0. This is a semantic representation of XBRL Open Information Model (instance) and XBRL Abstract Model (DTS) information. This module may save directly t...
apache-2.0
6,938,166,424,874,139,000
56.452433
201
0.514562
false
4.694796
false
false
false
RyanSkraba/beam
sdks/python/apache_beam/examples/snippets/transforms/elementwise/tostring_test.py
1
2310
# coding=utf-8 # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License");...
apache-2.0
-8,804,167,728,325,690,000
27.3125
79
0.735982
false
3.094262
true
false
false
chanmodoi/plugin.video.chantube
lib/youtube.py
1
1088
import xbmcaddon import thread, threading import urllib, urllib2 import datetime, time import xbmc import logging from bs4 import BeautifulSoup import requests import html5lib class Item: def __init__(self, link, title, img): self.link = link self.title = title self.img = img def getListVideos(url): r = reques...
gpl-2.0
-879,495,629,093,435,400
26.225
79
0.669118
false
2.693069
false
false
false
GEverding/touchVision
io/cleaner/plotter.py
1
1125
import numpy as np from matplotlib import pyplot as plt import time class Plotter: def __init__(self, id): self.id = id self.initialize_canvas() def initialize_canvas(self): plt.ion() self.fig = plt.figure() self.ay = self.fig.add_subplot(211) self.dline, = plt.plot([0], [0]) # ay.set_xlim([-1, 99]) ...
mit
-520,473,535,467,576,700
24.568182
54
0.650667
false
2.383475
false
false
false
programa-stic/barf-project
examples/kaos-toy-project/solve.py
1
5341
#! /usr/bin/env python # Copyright (c) 2014, Fundacion Dr. Manuel Sadosky # 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 notic...
bsd-2-clause
-998,339,934,289,517,700
33.019108
115
0.677214
false
3.401911
false
false
false
mostaszewski/SleepWell
app.py
1
3919
""" The script is designed for scraping hotel prices from Trivago website. It saves scraping result in easy to read HTML file. """ import argparse import time from selenium.common.exceptions import NoSuchElementException, \ StaleElementReferenceException from tqdm import tqdm from browser import Browser fr...
mit
6,142,783,174,376,353,000
41.129032
90
0.53803
false
3.894632
false
false
false
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247971765/PyQt4/QtCore/QReadWriteLock.py
1
1655
# encoding: utf-8 # module PyQt4.QtCore # from /usr/lib/python3/dist-packages/PyQt4/QtCore.cpython-34m-x86_64-linux-gnu.so # by generator 1.135 # no doc # imports import sip as __sip class QReadWriteLock(): # skipped bases: <class 'sip.simplewrapper'> """ QReadWriteLock() QReadWriteLock(QReadWriteLock.Re...
gpl-2.0
-2,338,360,780,281,634,300
30.226415
130
0.645921
false
3.839907
false
false
false
martinkirch/tofbot
plugins/lag.py
1
5024
# -*- coding: utf-8 -*- # This file is part of tofbot, a friendly IRC bot. # You may redistribute it under the Simplified BSD License. # If we meet some day, and you think this stuff is worth it, # you can buy us a beer in return. # # Copyright (c) 2015 Christophe-Marie Duquesne <chmd@chmd.fr> "See PluginLag" from tof...
bsd-2-clause
-3,239,078,850,862,541,300
31.79085
76
0.518437
false
3.847393
false
false
false
hackersql/sq1map
plugins/dbms/hsqldb/fingerprint.py
1
4673
#!/usr/bin/env python #coding=utf-8 """ Copyright (c) 2006-2017 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ import re from lib.core.common import Backend from lib.core.common import Format from lib.core.common import unArrayizeValue from lib.core.data import conf from ...
gpl-3.0
1,755,618,997,009,516,500
33.555556
146
0.584995
false
3.771221
false
false
false
plaidml/plaidml
plaidml2/ffi.py
1
2449
# Copyright 2019 Intel Corporation. import logging import os import platform import sys import threading import pkg_resources from plaidml2._ffi import ffi logger = logging.getLogger(__name__) _TLS = threading.local() _TLS.err = ffi.new('plaidml_error*') _LIBNAME = 'plaidml2' if os.getenv('PLAIDML_MLIR') == '1': ...
apache-2.0
6,785,233,738,009,265,000
22.548077
67
0.584728
false
3.248011
false
false
false
nikcub/Sketch
sketch/util/unicode.py
1
1401
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim:ts=2:sw=2:expandtab # # Copyright (c) 2011, Nik Cubrilovic. All rights reserved. # # <nikcub@gmail.com> <http://nikcub.appspot.com> # # Licensed under a BSD license. You may obtain a copy of the License at # # http://nikcub.appspot.com/bsd-license # """ Sketch...
bsd-2-clause
-7,632,726,280,004,726,000
17.932432
77
0.65596
false
3.408759
false
false
false
eayunstack/neutron
neutron/api/rpc/handlers/dhcp_rpc.py
1
14401
# Copyright (c) 2012 OpenStack Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
apache-2.0
-6,443,986,046,153,658,000
46.216393
79
0.593431
false
4.389211
false
false
false
vrtsystems/pyhaystack
pyhaystack/client/ops/vendor/niagara.py
1
6824
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Niagara AX operation implementations. """ import fysom import re from ....util import state from ....util.asyncexc import AsynchronousException from ...http.auth import BasicAuthenticationCredentials from ...http.exceptions import HTTPStatusError class NiagaraAXAuth...
apache-2.0
5,503,633,175,312,445,000
37.994286
80
0.520516
false
4.836286
false
false
false
mjabri/holoviews
holoviews/core/layout.py
1
16803
""" Supplies Pane, Layout, NdLayout and AdjointLayout. Pane extends View to allow multiple Views to be presented side-by-side in a NdLayout. An AdjointLayout allows one or two Views to be ajoined to a primary View to act as supplementary elements. """ from functools import reduce from itertools import chain import nu...
bsd-3-clause
-7,848,132,722,060,934,000
32.011788
111
0.58799
false
3.999762
false
false
false
AutorestCI/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_08_01/models/express_route_circuit.py
1
5408
# 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
-3,854,368,947,551,258,000
49.542056
343
0.673262
false
4.06311
false
false
false
AutorestCI/azure-sdk-for-python
azure-mgmt-batchai/azure/mgmt/batchai/models/clusters_list_by_resource_group_options.py
1
1251
# 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
-7,282,982,308,689,821,000
38.09375
78
0.630695
false
4.633333
false
false
false
Southpaw-TACTIC/Team
src/python/Lib/site-packages/pythonwin/pywin/framework/intpydde.py
1
1360
# DDE support for Pythonwin # # Seems to work fine (in the context that IE4 seems to have broken # DDE on _all_ NT4 machines I have tried, but only when a "Command Prompt" window # is open. Strange, but true. If you have problems with this, close all Command Prompts! import win32ui import win32api, win32con...
epl-1.0
-7,496,053,804,317,189,000
22.285714
90
0.672059
false
3.090909
false
false
false
tysonholub/twilio-python
twilio/rest/voice/v1/dialing_permissions/country/__init__.py
1
18230
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import InstanceResource from twilio.base.list_resource import ListResource f...
mit
-5,479,682,154,332,818,000
38.803493
155
0.644158
false
4.318882
false
false
false
guoxu3/oms_backend
oms/handlers/task_status.py
1
1474
#!/usr/bin/env python # -*- coding:utf-8 -*- """ update task status handlers """ import tornado.web import tornado.escape from db import db_task, db_machine import json import check # 调用更新脚本 class TaskStatusHandler(tornado.web.RequestHandler): def data_received(self, chunk): pass def __init__(self,...
mit
387,555,845,934,136,000
27.666667
89
0.618331
false
3.701266
false
false
false
Hybrid-Cloud/badam
fs_patches_of_hybrid_cloud/cherry_for_111T/cinder_client/v2/shell.py
1
65497
# Copyright (c) 2013-2014 OpenStack Foundation # 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 ...
apache-2.0
-8,371,715,886,487,103,000
32.866081
83
0.595768
false
3.913774
false
false
false
diN0bot/ProcrasDonate
procrasdonate/applib/sendgrid.py
1
2828
from procrasdonate.applib import SmtpApiHeader from django.utils import simplejson as json hdr = SmtpApiHeader.SmtpApiHeader() receiver = ['lucy@bilumi.org','cwallardo@gmail.com','messenger@bilumi.org'] times = ['1pm', '2pm', '3pm'] names = ['lucy', 'clay', 'messenger'] hdr.addTo(receiver) hdr.addSubVal('<time>',...
agpl-3.0
5,409,071,453,438,566,000
25.933333
76
0.716407
false
3.14922
false
false
false
TomasTomecek/osbs
osbs/build/build_request.py
1
12272
""" Copyright (c) 2015 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ from __future__ import print_function, absolute_import, unicode_literals import json import logging import os from osbs.build.manipulate imp...
bsd-3-clause
-6,186,058,528,523,075,000
36.414634
97
0.625652
false
3.952335
false
false
false
maestro-hybrid-cloud/heat
heat/tests/generic_resource.py
1
10736
# # 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
-8,903,765,915,186,320,000
32.23839
79
0.622113
false
4.280702
false
false
false
lleszczu/PerfKitBenchmarker
perfkitbenchmarker/kubernetes/kubernetes_disk.py
1
3923
# Copyright 2015 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 by applicable law or agr...
apache-2.0
-9,028,376,455,270,050,000
31.966387
77
0.629875
false
3.649302
false
false
false
rickdberg/mgmodel
bottom_mg_error_estimate.py
1
3824
# -*- coding: utf-8 -*- """ Created on Wed Mar 8 16:55:05 2017 @author: rickdberg Calculate the rmse of modeled bottom water Mg concentration vs actual measurements """ import numpy as np from sqlalchemy import create_engine import pandas as pd import matplotlib.pyplot as plot import seawater engine = create_engin...
mit
-4,699,286,989,374,539,000
34.738318
100
0.665272
false
2.522427
false
false
false
Diacamma2/financial
diacamma/invoice/migrations/0001_initial.py
1
6535
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.db.models import deletion from django.core.validators import MinValueValidator, MaxValueValidator from django.conf import settings from lucterios.framework.tools import set_locale_lang from lucterios.C...
gpl-3.0
-5,824,598,278,623,702,000
52.565574
142
0.542005
false
4.421516
false
false
false
bil-elmoussaoui/Gnome-TwoFactorAuth
Authenticator/models/keyring.py
1
3464
""" Copyright © 2017 Bilal Elmoussaoui <bil.elmoussaoui@gmail.com> This file is part of Authenticator. Authenticator 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, o...
gpl-2.0
82,455,778,413,601,300
30.364486
86
0.573202
false
4.660834
false
false
false
gmarkall/COFFEE
doc/source/conf.py
2
7963
# -*- coding: utf-8 -*- # # COFFEE documentation build configuration file, created by # sphinx-quickstart on Tue Sep 30 11:25:59 2014. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All ...
bsd-3-clause
4,981,702,581,545,656,000
31.502041
80
0.699987
false
3.73149
true
false
false
ityaptin/ceilometer
ceilometer/storage/base.py
1
8967
# # Copyright 2012 New Dream Network, LLC (DreamHost) # # 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
7,802,330,857,842,974,000
34.442688
76
0.597078
false
4.699686
false
false
false
bolkedebruin/airflow
tests/providers/apache/druid/operators/test_hive_to_druid.py
1
5078
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
apache-2.0
2,081,559,194,940,097,300
35.797101
93
0.51221
false
4.423345
true
false
false
plumdog/pysql_browser
pysql_browser/tab_widgets.py
1
1485
from PySide import QtCore, QtGui from .query_widgets import QueryWidget from .results_widgets import ResultsWidget from . import app_config class Tabs(QtGui.QTabWidget): def __init__(self, parent=None): super().__init__(parent) self.tabBar().tabCloseRequested.connect(self.close_tab) def clos...
gpl-3.0
3,306,132,935,044,650,500
36.125
81
0.678788
false
3.666667
false
false
false
xmdevops/xm_zoomeye_upgradeserver
upgradeserver_lua/models.py
1
17639
#!/usr/bin/env python # -*- coding: utf-8 -*- # author: limanman # emails: xmdevops@vip.qq.com from __future__ import unicode_literals from django.db import models from django.utils import timezone AREA_CHOICE = [ ('亚洲区域', ( ('Asia', 'Asia'), ('Asia_Afghanistan', 'Asia_Afghanistan'), ('...
gpl-3.0
-1,720,569,387,226,788,900
45.253333
99
0.607783
false
2.863156
false
false
false
hadim/spindle_tracker
spindle_tracker/spatial/packer.py
1
7486
from PIL import Image from copy import copy from os.path import join from glob import glob import functools __all__ = ["pack_images"] class Rect(object): """Represent a rectangle in the BinPack tree.""" def __init__(self, x1, y1, x2, y2): self.x1 = x1 self.y1 = y1 # bottom self.x2 = x...
bsd-3-clause
7,871,469,997,638,940,000
34.311321
95
0.604595
false
3.54955
false
false
false
moiseslorap/RIT
Computer Science 1/Practical Exam/drawString.py
1
1130
""" Moisés Lora Pérez """ from turtle import * def init(): reset() setup(600,600) setworldcoordinates(-300,-300,300,300) def drawC(): circle(30) def drawP(): forward(30) left(72) forward(30) left(72) forward(30) left(72) forward(30) left(72) ...
mit
-3,508,877,732,127,080,400
12.125
47
0.420213
false
3.073569
false
false
false
mrksbrg/moped
new-server/misc/testmoped.py
1
1068
import base64 import json import re def ack(client, app): vin = "20UYA31581L000000" while True: y = client.service.listInstalledApps() y = json.loads(y) for t in y['result']: if t['vin'] == vin: if int(t['appId']) == app: print t['installa...
gpl-2.0
-4,124,176,131,638,919,000
23.837209
97
0.527154
false
3.07781
false
false
false
alt-core/sheetbot
condition_expr.py
1
5691
# coding: utf-8 import re import string from unicodedata import normalize from arpeggio import ParserPython, PTNodeVisitor, visit_parse_tree, Optional, ZeroOrMore, OneOrMore, EOF from arpeggio import RegExMatch as _ from syntax_tree import SyntaxNode, SyntaxTreeEvaluator DEBUG = False def token_and(): return _(u...
mit
-6,069,350,434,592,281,000
32.837349
104
0.588214
false
3.697828
false
false
false
googlei18n/glyphsLib
Lib/glyphsLib/builder/sources.py
1
8954
# Copyright 2015 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 by applicable law or a...
apache-2.0
-2,613,525,136,835,783,000
39.7
88
0.623409
false
4.107339
false
false
false
asoplata/dynasim-benchmark-brette-2007
Brian2/brian2_benchmark_COBAHH_clocksyn_hidens_compiled_0004.py
1
3909
""" # Notes: - This simulation seeks to emulate the COBAHH benchmark simulations of (Brette et al. 2007) using the Brian2 simulator for speed benchmark comparison to DynaSim. However, this simulation includes CLOCK-DRIVEN synapses, for direct comparison to DynaSim's clock-driven architecture. The synaptic connec...
gpl-3.0
-6,110,867,096,197,492,000
30.764228
132
0.638341
false
2.486951
false
false
false
Fokko/incubator-airflow
tests/operators/test_python_operator.py
1
23039
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
apache-2.0
5,132,822,653,135,645,000
35.803514
104
0.556795
false
4.12073
true
false
false
KangHsi/youtube-8m
youtube-8m/train.py
1
26303
# Copyright 2016 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 by applicable law or ...
apache-2.0
-5,588,164,957,105,381,000
44.508651
114
0.636505
false
3.832022
true
false
false
heejongahn/hjlog
migrations/versions/3255e6bed08_.py
1
1189
"""empty message Revision ID: 3255e6bed08 Revises: 46ae0d2b68d Create Date: 2015-12-31 22:35:01.740168 """ # revision identifiers, used by Alembic. revision = '3255e6bed08' down_revision = '46ae0d2b68d' from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql def upgrade(): ###...
mit
1,213,826,446,446,747,100
32.971429
91
0.699748
false
3.53869
false
false
false
kurniawano/pythymiodw
pythymiodw/sm/__init__.py
1
4836
from .. import * from ..io import Input from ..pyro import Thymio3D from threading import Thread, Event import sys class ThymioSMSim(): def __init__(self, MySM, world=None, graphic='pygame', scale=1): if graphic == 'pygame': self.thymio = ThymioSMPG(MySM, world, scale) elif graphic ==...
mit
-4,015,822,135,599,048,700
28.13253
79
0.577337
false
3.542857
false
false
false
pravisankar/solum
doc/source/conf.py
1
2732
# -*- coding: utf-8 -*- # 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
-3,590,725,781,218,680,000
31.915663
79
0.683382
false
3.847887
false
false
false
acumb/LatticeDNAOrigami
scripts/tikz/create_tikz_diagram.py
1
3756
#!/usr/bin/env python """Generates tikz scripts for configurations of the origami model. Takes template tikz scripts for geneting configuration diagrams and outputs a script for configurations at specified steps in the specified intput file. """ import argparse import sys import string from origamipy.origami_io imp...
mit
3,299,467,935,302,009,300
33.777778
102
0.587593
false
3.573739
false
false
false
googleapis/python-api-common-protos
google/api/log_pb2.py
1
5430
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
apache-2.0
-4,377,264,029,072,648,700
32.9375
450
0.626888
false
3.737096
false
false
false
bensoer/pychat
crypto/algorithms/randomcaesarcipher.py
1
3378
__author__ = 'bensoer' from crypto.algorithms.algorithminterface import AlgorithmInterface from tools.argparcer import ArgParcer import random class RandomCaesarCipher(AlgorithmInterface): __alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" __scrambledAlphabet = "" __seed = 5 __offse...
mit
-2,099,955,493,845,500,400
31.796117
77
0.597099
false
4.577236
false
false
false
dolph/python-keystoneclient
tests/v2_0/test_auth.py
1
8962
import httplib2 import json from keystoneclient.v2_0 import client from keystoneclient import exceptions from tests import utils def to_http_response(resp_dict): """ Utility function to convert a python dictionary (e.g. {'status':status, 'body': body, 'headers':headers} to an httplib2 response. "...
apache-2.0
1,598,639,294,003,492,900
38.654867
79
0.495314
false
4.432245
true
false
false
nipe0324/flask-todo-api
app.py
1
2962
from flask import Flask, jsonify, abort, url_for, request, make_response from flask.ext.httpauth import HTTPBasicAuth app = Flask(__name__) auth = HTTPBasicAuth() tasks = [ { 'id': 1, 'title': u'Buy groceries', 'description': u'Milk, Cheese, Pizza, Fruit, Tylenol', 'done': False ...
apache-2.0
-1,418,981,903,589,351,700
27.757282
90
0.599257
false
3.216069
false
false
false
Zearin/python-ietflib
pyietflib/rfc6350/vcard.py
1
4743
#!/usr/bin/env python # -*- coding: UTF-8 -*- """`vCard <http://tools.ietf.org/html/rfc6350>`_ object that contains the information in structured form.""" __version__ = '1.0' __copyright__ = """Copyright 2011 Lance Finn Helsten (helsten@acm.org)""" __license__ = """ Licensed under the Apache License, Version 2.0 (the "...
apache-2.0
-7,209,633,680,010,250,000
34.133333
131
0.568206
false
4.022901
false
false
false
openstreetmap/Nominatim
nominatim/nominatim.py
1
12478
#! /usr/bin/env python3 #----------------------------------------------------------------------------- # nominatim - [description] #----------------------------------------------------------------------------- # # Indexing tool for the Nominatim database. # # Based on C version by Brian Quinion # # This program is free...
gpl-2.0
3,152,322,180,283,444,000
33.565097
95
0.552733
false
4.402964
false
false
false
vgrem/SharePointOnline-REST-Python-Client
tests/test_sharepoint_list.py
1
2363
from random import randint from tests.sharepoint_case import SPTestCase from office365.sharepoint.list_creation_information import ListCreationInformation from office365.sharepoint.list_template_type import ListTemplateType class TestSPList(SPTestCase): target_list_id = None target_list_title = "Tasks" + st...
mit
-8,524,878,684,743,771,000
41.196429
94
0.681337
false
3.511144
true
false
false
yuginboy/from_GULP_to_FEFF
feff/libs/GaMnAs_sub_classes.py
1
33150
''' * Created by Zhenia Syryanyy (Yevgen Syryanyy) * e-mail: yuginboy@gmail.com * License: this code is under GPL license * Last modified: 2017-10-18 ''' import sys import os from copy import deepcopy from collections import OrderedDict as odict from itertools import cycle from io import StringIO import inspect import ...
gpl-3.0
3,044,061,559,392,634,400
41.886158
126
0.577074
false
3.134159
false
false
false
Netflix-Skunkworks/napalm-base
napalm_base/base.py
1
57375
# Copyright 2015 Spotify AB. All rights reserved. # # The contents of this file are licensed under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with the # License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
apache-2.0
5,470,869,723,787,131,000
36.871287
100
0.427503
false
4.851598
true
false
false
stephane-martin/salt-debian-packaging
salt-2016.3.2/salt/master.py
1
94538
# -*- coding: utf-8 -*- ''' This module contains all of the routines needed to set up a master server, this involves preparing the three listeners and the workers needed by the master. ''' # Import python libs from __future__ import absolute_import, with_statement import copy import ctypes import os import re import s...
apache-2.0
-931,202,925,453,625,500
37.745082
180
0.525334
false
4.337799
true
false
false
DavideMassidda/Simon
main.py
1
6607
# -*- coding: utf-8 -*- from __future__ import division from psychopy import visual, core, event from settings import * # Carica la maschera per le impostazioni # -------------------------------------- # Impostazioni esprimento # -------------------------------------- buttons = ['l','a'] # Pulsanti di rispos...
gpl-3.0
9,154,638,935,427,574,000
38.789157
139
0.547918
false
3.130332
false
false
false
pztrn/spicecm-prototype
src/lib/spice_server_info.py
1
1045
# -*- coding: utf8 -*- # Construct server info messages greeting_text = \ """<h1>Welcome to SpiceCM!</h1> SpiceCM allows you to manage your SPICE VDI connections.<br /> <br /> SpiceCM licensed under Terms and Conditions of GNU General Public License version 3 or any higher version.<br /> <br /> <a href="http://spice-...
gpl-3.0
2,086,356,318,419,998,200
25.820513
129
0.666029
false
2.80914
false
false
false
rkk09c/SayInterview
API/resources/calc_cargo_resource.py
1
3581
from flask import request, jsonify from flask_restful import Resource class CalcCargo(Resource): def __init__(self): pass def post(self): in_data = request.get_json(force=True, silent=False) vehicles_list = [] if 'total_weight' in in_data: total_weight = in_data[...
apache-2.0
68,001,541,734,344,560
30.690265
101
0.584753
false
3.718588
false
false
false
tempbottle/ghmm
HMMEd/ObjectHMM.py
1
55163
#!/usr/bin/env python ################################################################################ # # This file is part of Gato (Graph Algorithm Toolbox) # # file: ObjectHMM.py # author: Janne Grunau # # Copyright (C) 1998-2002, Alexander Schliep # # Contact:...
gpl-3.0
2,216,229,121,287,193,600
34.293026
144
0.595109
false
3.734042
false
false
false
AutorestCI/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_09_01/models/express_route_circuits_arp_table_list_result.py
1
1235
# 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
8,622,345,961,035,120,000
36.424242
80
0.607287
false
4.172297
false
false
false
Xyrotechnology/Project-Anthrax
SD/libraries/Scripts/Pixhawk/Firmware-master/Tools/px_romfs_pruner.py
1
3366
#!/usr/bin/env python ############################################################################ # # Copyright (C) 2014 PX4 Development Team. All rights reserved. # Author: Julian Oes <joes@student.ethz.ch> # Redistribution and use in source and binary forms, with or without # modification, are permitted provide...
apache-2.0
-8,903,790,954,902,878,000
39.071429
108
0.620618
false
4.482024
false
false
false
danielballan/photomosaic
photomosaic/flickr.py
1
6191
import warnings import os import re import urllib import requests import itertools import json from tqdm import tqdm from .photomosaic import options PUBLIC_URL = "https://www.flickr.com/photos/" API_URL = 'https://api.flickr.com/services/rest/' PATH = "http://farm{farm}.staticflickr.com/{server}/" NAME = "{id}_{secr...
bsd-3-clause
7,755,686,242,330,780,000
36.75
123
0.560491
false
3.96859
false
false
false
PI2-2015-2/server_side
configuration_files/parser.py
1
1183
import json from collections import OrderedDict import execInstructionsProcedural as instruction class Parser(): def parseJson(self, jsonFile): with open("instruction.json", "w") as text_file: text_file.write(jsonFile) # Loads the Json file in a OrderedDict parsed_json = json...
gpl-3.0
-5,921,316,127,386,513,000
38.433333
89
0.568047
false
4.195035
false
false
false
puruckertom/ubertool
ubertool/leslie_probit/leslie_probit_exe.py
1
7835
import numpy as np import os.path import pandas as pd import sys import math # find parent directory and import base (travis) parentddir = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir)) sys.path.append(parentddir) from base.uber_model import UberModel, ModelSharedInputs # print(sys.path) # ...
unlicense
2,785,421,741,394,123,000
38.570707
133
0.534652
false
3.403562
false
false
false
sqall01/alertR
shared_code/clients_all/tests/client/core.py
1
7309
import threading import time import logging import json from typing import List, Tuple from lib.client.core import Connection, RecvTimeout from lib.client.communication import Communication, MsgRequest class BasicConnection(Connection): def __init__(self): self._msg_list = [] # type: List[str] @pro...
agpl-3.0
6,071,460,876,706,926,000
29.839662
84
0.535094
false
4.363582
false
false
false
tcpcloud/openvstorage
ovs/extensions/hypervisor/hypervisors/vmware.py
1
7066
# Copyright 2014 Open vStorage NV # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
apache-2.0
2,021,212,799,868,938,500
34.33
123
0.608973
false
4.149149
false
false
false
lino-framework/lino
lino/modlib/forms/__init__.py
1
1165
# -*- coding: UTF-8 -*- # Copyright 2017 Rumma & Ko Ltd # License: GNU Affero General Public License v3 (see file COPYING for details) """ This started as a copy of :mod:`lino.modlib.bootstrap`. .. autosummary:: :toctree: views renderer models """ from lino.api.ad import Plugin class Plugin(Plugin)...
bsd-2-clause
-6,574,725,036,883,842,000
21.843137
78
0.550215
false
3.467262
false
false
false
noashin/3D_features_classification_CNN
generate_experiment_files/generate_experiment_files.py
1
1824
import click from prepare_args_all_instances import prepare_args from generate_labels import generate_labels from generate_mean_image_binaryprotos import generate_mean_files from read_csv_seperated_rgb_histograms import generate_lmdbs @click.command() @click.option('--source_dir', type=click.STRING, default='/...
mit
-6,617,948,964,496,934,000
41.44186
85
0.606908
false
3.897436
false
false
false
skbkontur/carbonate
carbonate/fill.py
1
3788
# original work: https://github.com/graphite-project/whisper/issues/22 # whisper-fill: unlike whisper-merge, don't overwrite data that's # already present in the target file, but instead, only add the missing # data (e.g. where the gaps in the target file are). Because no values # are overwritten, no data or precisio...
mit
6,861,726,190,305,352,000
31.93913
74
0.636748
false
4.10846
false
false
false
iwconfig/dlffmpeg
binary_builder.py
1
7329
#!/usr/bin/env python from __future__ import print_function from platform import system import os, shutil, argparse def input(): try: return raw_input() except NameError: return __builtins__.input() __version__ = '0.2' def main(args): path = os.getcwd() while not args.file: de...
mit
-2,804,960,794,753,186,300
40.885714
171
0.489835
false
4.166572
false
false
false
cylussec/gameoflife
life.py
1
1914
# -*- coding: utf-8 -*- """ Created on Thu Jul 24 19:49:39 2014 @author: brian """ import socket, time, re class LifeBoard: """ Play the game of life """ def __init__(self, board): """ board - 2d array of the board where '*' is an alive cell and ' ' is a dead cell """ self.board = b...
gpl-2.0
-8,025,376,240,631,603,000
25.597222
104
0.535528
false
3.042925
false
false
false
renatoGarcia/tangram
tangram/widget/buttons.py
1
6856
# Copyright 2017-2018 The Tangram Developers. See the AUTHORS file at the # top-level directory of this distribution and at # https://github.com/renatoGarcia/tangram/blob/master/AUTHORS. # # This file is part of Tangram. # # Tangram is free software: you can redistribute it and/or modify # it under the terms of the GNU...
lgpl-3.0
320,085,339,060,968,200
32.120773
92
0.566803
false
3.821628
false
false
false
bloc11/authsys-brain
tests/test_debit_orders.py
1
3108
from datetime import datetime, timedelta from sqlalchemy import select import py from debit_orders import DebitOrderError, add_two_days, list_pending_transactions, _tstamp from authsys_common.model import meta, pending_transactions, members from authsys_common.scripts import create_db def populate_test_data(): e...
mit
2,692,458,703,641,903,600
45.38806
115
0.634492
false
3.098704
false
false
false
mixkorshun/django-safe-filefield
safe_filefield/clamav.py
1
1084
from urllib.parse import urlparse import clamd from django.conf import settings from django.utils.functional import SimpleLazyObject from safe_filefield import default_settings def get_scanner(socket, timeout=None): if socket.startswith('unix://'): return clamd.ClamdUnixSocket(socket[7:], timeout) e...
mit
6,824,187,474,666,307,000
24.809524
77
0.664207
false
3.843972
false
false
false
melver/bibmanage
lib/python/bibman/bibfetch/frontend.py
1
2186
# Copyright (c) 2012-2016, Marco Elver <me AT marcoelver.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 applica...
apache-2.0
-8,679,017,488,649,756,000
34.258065
89
0.616651
false
4.24466
false
false
false
HRODEV/Frequency
Frequency/Menu/InGameMenu/SaveGameButton.py
1
1252
import pickle import pygame from pygame.surface import Surface from Menu.StartMenu.StartMenuItems.StartMenuItem import StartMenuItem from Vector2 import Vector2 class SaveGameButton(StartMenuItem): def __init__(self, offset: Vector2, image: Surface = None, hover: Surface = None, rect=None, newState=None): ...
mit
-4,127,266,724,686,686,000
39.387097
119
0.658147
false
3.748503
false
false
false
Juvawa/bib2web
bib2web/bibtexparser/tests/test_bwriter.py
1
2564
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: Francois Boulogne # License: from __future__ import unicode_literals import unittest import sys from bibtexparser.bparser import BibTexParser from bibtexparser.bwriter import BibTexWriter, to_bibtex from bibtexparser.customization import author class TestBibt...
mit
-8,285,331,172,103,560,000
29.891566
89
0.592434
false
3.710564
true
false
false
pombredanne/readthedocs.org
readthedocs/comments/models.py
1
8353
"""Models for the comments app.""" from __future__ import absolute_import from builtins import str from builtins import object from django.contrib.auth.models import User from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ f...
mit
-15,031,181,141,574,940
33.233607
100
0.626841
false
4.266088
true
false
false
jdilallo/jdilallo-test
examples/adwords/v201309/campaign_management/get_all_disapproved_ads.py
1
2122
#!/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
330,944,383,159,758,600
28.068493
80
0.637135
false
3.67128
false
false
false
Locbit/OctoPrint-Locbit
setup.py
1
3967
# coding=utf-8 ######################################################################################################################## ### Do not forget to adjust the following variables to your own plugin. # The plugin's identifier, has to be unique plugin_identifier = "Locbit" # The plugin's python package, shoul...
mit
-7,069,196,337,411,426,000
41.202128
140
0.679859
false
4.274784
false
false
false