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
josephsuh/extra-specs
nova/api/openstack/compute/contrib/admin_actions.py
1
11980
# Copyright 2011 OpenStack, 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 or agreed...
apache-2.0
6,645,631,397,457,932,000
37.770227
79
0.619783
false
4.328035
false
false
false
google-research/falken
service/api/list_handler.py
1
6465
# Copyright 2021 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 or agreed to in writing, ...
apache-2.0
4,493,962,096,543,435,300
35.117318
80
0.673163
false
3.832247
false
false
false
takinbo/rapidsms-borno
lib/rapidsms/webui/urls.py
1
1892
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 import os from django.conf.urls.defaults import * urlpatterns = [] # load the rapidsms configuration from rapidsms.config import Config conf = Config(os.environ["RAPIDSMS_INI"]) # iterate each of the active rapidsms apps (from the ini), # and (attempt to) import ...
lgpl-3.0
-2,910,192,388,190,700,000
32.785714
70
0.60518
false
4.060086
false
false
false
yuuki0xff/mika
util/cache2db.py
1
3883
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # 朔のキャッシュをmikaのデータベースへインポートします # 使い方: # python3 cache2db.py path/to/cache/dir # OR # python3 cache2db.py --exclude-removed path/to/cache/dir # DBの設定 DB_NAME = 'mika' DB_USER = 'root' DB_PASSWD = 'root' from mysql.connector import connect as mysqlConnect import...
mit
4,827,436,285,283,069,000
27.962121
135
0.634319
false
2.918321
false
false
false
cuemacro/findatapy
findatapy/timeseries/retstats.py
1
5797
__author__ = 'saeedamen' # Saeed Amen # # Copyright 2016 Cuemacro # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the # License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
apache-2.0
-4,241,608,317,845,960,000
26.215962
121
0.56236
false
4.079521
false
false
false
G4brym/GetCompany.info
Main/handlers/utilities.py
1
1191
import uuid import datetime as dt import json import urllib.request import urllib.parse from Main.handlers.settings import RECAPTCHA_SECRET_KEY def get_title(title=""): if title == "": return "GetCompany info" else: return title + " - GetCompany info" def get_new_token(): return str(str(...
mit
-1,532,371,701,429,810,400
28.04878
105
0.65995
false
3.326816
false
false
false
canaryhealth/pyramid_test
pyramid_test/db.py
1
3807
# -*- coding: utf-8 -*- import string import unittest import morph from six.moves.urllib import parse import sqlalchemy as sa from .runner import settings, test_dbs #------------------------------------------------------------------------------ class DbTestCase(unittest.TestCase): ''' Creates database using alem...
mit
3,173,176,315,719,206,000
33.926606
80
0.589703
false
4.12013
true
false
false
yohanesgultom/id-openie
scripts/classifier.py
1
11866
""" classifier.py @author yohanes.gultom@ui.ac.id Running experiments: * Comparing triple classifiers (optimized by grid search) performance using cross validation * Comparing feature sets performance agains the best triple classifier Train models: * Train triple classifier model using the best model and feature set ...
mit
-8,539,020,964,095,053,000
35.736842
188
0.561605
false
3.76818
false
false
false
callowayproject/django-viewpoint
viewpoint/models.py
1
11692
import datetime from django.conf import settings from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from django.core.exceptions import ObjectDoesNotExist from django.core.files.storage import get_storage_class from django.core.files.images import get_image_dimens...
apache-2.0
-615,712,380,407,333,900
32.310541
97
0.599897
false
4.030334
false
false
false
cmusatyalab/opendiamond
opendiamond/dataretriever/diamond_store.py
1
4460
# # The OpenDiamond Platform for Interactive Search # # Copyright (c) 2009-2018 Carnegie Mellon University # All rights reserved. # # This software is distributed under the terms of the Eclipse Public # License, Version 1.0 which can be found in the file named LICENSE. # ANY USE, REPRODUCTION OR DISTRIBUTION OF T...
epl-1.0
-411,859,994,685,598,340
30.188811
84
0.606951
false
3.661741
false
false
false
denis-pitul/web-trash
log/views.py
1
1249
from django.shortcuts import render from django.http import HttpResponse, HttpResponseRedirect from django.template import RequestContext, loader, Template, Context from django.core.urlresolvers import reverse from log.models import Entry from datetime import datetime # Create your views here. def index(request): ...
gpl-2.0
1,626,423,346,961,720,300
30.225
104
0.68775
false
4.003205
false
false
false
ranaroussi/fix-yahoo-finance
yfinance/tickers.py
1
3388
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Yahoo! Finance market data downloader (+fix for Pandas Datareader) # https://github.com/ranaroussi/yfinance # # Copyright 2017-2019 Ran Aroussi # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the ...
apache-2.0
7,683,384,954,263,223,000
33.927835
74
0.56523
false
4.294043
false
false
false
M4rtinK/kdump-anaconda-addon
com_redhat_kdump/gui/spokes/kdump.py
1
6818
# Kdump anaconda configuration # # Copyright (C) 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 distribut...
gpl-2.0
-7,075,292,451,100,770,000
39.826347
88
0.683192
false
3.843292
false
false
false
Fuchai/Philosophy-Machine
vae_mining/binary_mining.py
1
1418
# binary mining. # say we have a pair of binary encoded predicates, and we have have a sample of the truth values of them # we want to learn if some logic exist between the two predicates. A->B or B->A. Nothing more. # given bayesian null prior, establish a confidence method to hypothesize and learn. # Just a sanity ch...
apache-2.0
6,433,734,871,420,775,000
28.5625
104
0.689704
false
3.062635
false
false
false
joepetrini/bike-counter
webapp/account/views.py
1
1523
from django.conf import settings from django.http import HttpResponseRedirect #from django.core.urlresolvers import reverse from django.contrib.auth import login as auth_login, logout, authenticate #from django.views.generic import ListView, DetailView from django.contrib.auth.forms import AuthenticationForm from djang...
mit
8,646,123,147,043,278,000
32.844444
108
0.732108
false
3.976501
false
false
false
nickhand/pypm
pmesh/pm.py
1
49432
import numpy import pfft import mpsort from . import domain from .window import FindResampler, Affine from mpi4py import MPI import numbers # for testing Numbers import warnings def is_inplace(out): return out is Ellipsis class slab(numpy.ndarray): pass class slabiter(object): def __init__(self, field):...
gpl-3.0
1,847,379,235,830,481,700
33.640505
134
0.548066
false
3.941317
false
false
false
assaabloy-ppi/salt-channel-python
saltchannel/dev/mitm_channel.py
1
2987
import asyncio import time from enum import Enum from ..channel import ByteChannel from collections import deque, namedtuple class MitmEventType(Enum): """MITM event type""" UNKNOWN = 0 READ = 1 WRITE = 2 WRITE_WITH_PREVIOUS = 3 DELAY = 4 class MitmChannel(ByteChannel): """Man-in-the-Mi...
mit
7,657,326,372,381,359,000
32.188889
128
0.584868
false
3.489486
false
false
false
wtsi-hgi/CoGS-Webapp
cogs/mail/postman.py
1
5288
""" Copyright (c) 2017 Genome Research Ltd. Authors: * Christopher Harrison <ch12@sanger.ac.uk> * Simon Beal <sb48@sanger.ac.uk> This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version...
agpl-3.0
8,203,861,695,917,734,000
31.84472
129
0.641641
false
4.07396
false
false
false
benjaoming/kolibri
kolibri/core/device/models.py
1
2354
import time from django.conf import settings from django.core.cache import cache from django.db import models from .permissions import UserCanManageDevicePermissions from kolibri.auth.models import Facility from kolibri.auth.models import FacilityUser device_permissions_fields = [ 'is_superuser', 'can_manage...
mit
3,210,103,083,454,890,500
28.425
100
0.6661
false
3.936455
false
false
false
scanny/python-pptx
pptx/shapes/graphfrm.py
1
5007
# encoding: utf-8 """Graphic Frame shape and related objects. A graphic frame is a common container for table, chart, smart art, and media objects. """ from pptx.enum.shapes import MSO_SHAPE_TYPE from pptx.shapes.base import BaseShape from pptx.shared import ParentedElementProxy from pptx.spec import ( GRAPHIC_D...
mit
-2,815,360,789,781,420,500
33.531034
88
0.644697
false
3.954976
false
false
false
xozzo/pyfootball
pyfootball/models/leaguetable.py
1
2078
import traceback class LeagueTable(object): def __init__(self, data): """Takes a dict converted from the JSON response by the API and wraps the league table data within an object. :param data: The league table data from the API's response. :type data: dict """ self...
mit
5,525,228,763,350,347,000
38.207547
77
0.516843
false
4.123016
false
false
false
mitschabaude/nanopores
scripts/numerics/analyticalPNPS_uncoupled_2D.py
1
6254
" analytical test problem to validate 2D and 3D solvers " import math from dolfin import * from nanopores import * from nanopores.physics.simplepnps import * # --- define parameters --- bV = -0.05 # [V] rho = -0.025 # [C/m**2] initialh = .1 Nmax = 1e4 # --- create 2D geometry --- Rz = 2. # [nm] length in z direction ...
mit
-5,602,451,012,872,871,000
32.98913
148
0.612568
false
2.454474
false
false
false
chenkianwee/envuo
py4design/py3dmodel/OCCUtils/types_lut.py
1
8279
##Copyright 2008-2015 Jelle Feringa (jelleferinga@gmail.com) ## ##This file is part of pythonOCC. ## ##pythonOCC is free software: you can redistribute it and/or modify ##it under the terms of the GNU Lesser General Public License as published by ##the Free Software Foundation, either version 3 of the License, or ##(at...
gpl-3.0
-638,546,612,785,316,000
39.18932
79
0.658292
false
3.514007
false
false
false
mlperf/training_results_v0.7
Fujitsu/benchmarks/resnet/implementations/implementation_open/mxnet/3rdparty/onnx-tensorrt/third_party/onnx/onnx/backend/test/case/node/convtranspose.py
1
11604
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import numpy as np # type: ignore import onnx from ..base import Base from . import expect class ConvTranspose(Base): @staticmethod def export(): # type: ()...
apache-2.0
60,739,506,034,685,620
44.505882
89
0.27999
false
3.545371
true
false
false
LxMLS/lxmls-toolkit
lxmls/deep_learning/numpy_models/mlp.py
1
4324
import numpy as np from lxmls.deep_learning.mlp import MLP from lxmls.deep_learning.utils import index2onehot, logsumexp class NumpyMLP(MLP): """ Basic MLP with forward-pass and gradient computation in Numpy """ def __init__(self, **config): # This will initialize # self.config ...
mit
2,092,996,508,712,803,600
29.885714
75
0.579093
false
4.129895
false
false
false
ecorreig/automatic_pattern
create_warnings.py
1
3568
# coding=utf-8 __author__ = 'dracks' import models from Api.Manager import DataManager def create(code, level, label_ca, label_es): warning_list = DataManager.sharedManager().retrieve_all('warning') for w in warning_list: if w.code == code: if w.name is None: w.name = {} ...
gpl-2.0
-7,766,287,667,783,762,000
59.62069
193
0.689989
false
2.476056
false
false
false
jetty840/ReplicatorG
skein_engines/skeinforge-50/skeinforge_application/skeinforge_plugins/analyze_plugins/skeiniso.py
1
44354
""" This page is in the table of contents. Skeiniso is an analyze viewer to display a gcode file in an isometric view. The skeiniso manual page is at: http://fabmetheus.crsndoo.com/wiki/index.php/Skeinforge_Skeiniso ==Operation== The default 'Activate Skeiniso' checkbox is off. When it is on, the functions described...
gpl-2.0
2,105,746,699,415,375,600
48.780022
957
0.764305
false
3.376266
false
false
false
RedHatInsights/insights-core
insights/client/apps/ansible/playbook_verifier/contrib/ruamel_yaml/ruamel/yaml/scalarbool.py
1
1534
# coding: utf-8 from __future__ import print_function, absolute_import, division, unicode_literals """ You cannot subclass bool, and this is necessary for round-tripping anchored bool values (and also if you want to preserve the original way of writing) bool.__bases__ is type 'int', so that is what is used as the ba...
apache-2.0
3,125,975,361,624,574,500
29.078431
93
0.6206
false
3.617925
false
false
false
chrisgarcia001/Jepson-2014-2015
util.py
1
6894
# -------------------------------------------------------------------------------------- # Author: cgarcia@umw.edu # About: This file contains utility functions and classes used throughout the other # code files. # -------------------------------------------------------------------------------------- import ca...
apache-2.0
-4,514,539,080,931,629,000
31.990431
116
0.63461
false
2.963887
false
false
false
callowayproject/django-concepts
concepts/migrations/0001_initial.py
1
3619
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('contenttypes', '0001_initial'), ] operations = [ migrations.CreateModel( name='Concept', fields=[ ...
apache-2.0
2,496,330,661,567,706,600
62.491228
299
0.600718
false
4.237705
false
false
false
kelle/astropy
astropy/table/column.py
1
45861
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) from ..extern import six from ..extern.six.moves import zip import warnings import weakref import re from copy import deepcopy import numpy as n...
bsd-3-clause
6,113,137,543,158,815,000
35.954875
98
0.588714
false
4.264156
false
false
false
patjouk/djangogirls
jobs/migrations/0004_auto_20150707_1518.py
1
2738
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('jobs', '0003_auto_20150510_1707'), ] operations = [ migrations.AlterField( model_name='job', name='e...
bsd-3-clause
-4,039,958,331,240,108,000
41.78125
188
0.573776
false
4.074405
false
false
false
windreamer/dpark
dpark/bitindex.py
1
4778
from __future__ import absolute_import import marshal import math from dpark.portable_hash import portable_hash from six.moves import range from functools import reduce from six.moves import zip as izip from six.moves import zip_longest as izip_longest BYTE_SHIFT = 3 BYTE_SIZE = 1 << BYTE_SHIFT BYTE_MASK = BYTE_SIZE -...
bsd-3-clause
-4,619,686,388,738,669,000
27.610778
93
0.546044
false
3.412857
false
false
false
wdmchaft/taskcoach
taskcoachlib/widgets/draganddrop.py
1
11151
''' Task Coach - Your friendly task manager Copyright (C) 2004-2010 Task Coach developers <developers@taskcoach.org> Task Coach is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or ...
gpl-3.0
-715,933,600,131,836,700
41.238636
115
0.632679
false
4.117799
false
false
false
timjlittle/Python
noughtsandcrosses.py
1
3635
#Noughts and crosses board = ['1','2','3','4','5','6','7','8','9'] player1char = 'X' player2char = 'O' def show_board (): """Loops through the board list to display the players' positions""" counter = 1 linecounter = 1 line = '' for item in board: line = line + item #Add the ve...
mit
4,750,517,937,082,141,000
32.045455
126
0.488858
false
4.498762
false
false
false
Outernet-Project/librarian
librarian/presentation/paginator.py
1
2407
""" pagnation.py: Pagination class Copyright 2014-2015, Outernet Inc. Some rights reserved. This software is free software licensed under the terms of GPLv3. See COPYING file that comes with the source code, or http://www.gnu.org/licenses/gpl.txt. """ import math class Paginator(object): min_per_page = 5 m...
gpl-3.0
889,799,944,669,584,300
26.666667
77
0.590361
false
3.703077
false
false
false
sephii/django
django/contrib/gis/db/models/query.py
1
35171
from django.db import connections from django.db.models.expressions import RawSQL from django.db.models.fields import Field from django.db.models.query import QuerySet from django.contrib.gis.db.models import aggregates from django.contrib.gis.db.models.fields import ( get_srid_info, LineStringField, GeometryField...
bsd-3-clause
-5,961,976,847,156,329,000
43.576679
114
0.583407
false
4.49642
false
false
false
mecirt/cloudly
private_servers/views.py
1
2399
# -*- coding: utf-8 -*- import os import time import pickle import logging import datetime import socket from django.shortcuts import render_to_response from django.http import HttpResponseRedirect from django.template import RequestContext from django.http import HttpResponseForbidden from django.http import HttpRe...
mit
8,628,155,319,665,710,000
29.367089
241
0.734056
false
3.522761
false
false
false
goncalopp/simple-ocr-opencv
simpleocr/improver.py
1
2365
from PIL import ImageEnhance, ImageOps from .pillow_utils import image_to_pil, pil_to_cv_array """ These functions are not suitable for use on images to be grounded and then trained, as the file on disk is not actually modified. These functions are only to be used on ImageFile objects that are meant to be performed OC...
agpl-3.0
8,438,091,662,138,077,000
42.796296
119
0.72389
false
3.90264
false
false
false
smartsheet-platform/smartsheet-python-sdk
smartsheet/cells.py
1
4500
# pylint: disable=C0111,R0902,R0913 # Smartsheet Python SDK. # # Copyright 2016 Smartsheet.com, 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/LICE...
apache-2.0
1,640,794,642,513,187,800
37.461538
120
0.573778
false
3.992902
false
false
false
zaina/nova
nova/tests/unit/virt/ironic/test_driver.py
1
72720
# Copyright 2015 Red Hat, Inc. # Copyright 2013 Hewlett-Packard Development Company, L.P. # # 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/L...
apache-2.0
222,314,369,560,907,100
46.716535
79
0.611262
false
3.83423
true
false
false
Oxygencoin/oxygen
qa/rpc-tests/util.py
1
12457
# Copyright (c) 2014 The Bitcoin Core developers # Copyright (c) 2014-2015 The Dash developers # Copyright (c) 2015-2017 The PIVX developers # Copyright (c) 2017 The OXYGEN developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license....
mit
-7,854,280,444,173,108,000
35.00289
106
0.631292
false
3.507038
true
false
false
spiridoncha/PyGame
balls.py
1
8138
#/usr/bin/env python # coding: utf import math import pygame import random import itertools SIZE = 640, 480 def intn(*arg): return map(int,arg) def Init(sz): '''Turn PyGame on''' global screen, screenrect pygame.init() screen = pygame.display.set_mode(sz) screenrect = screen.get_rect() clas...
gpl-3.0
-336,149,587,549,543,800
32.489712
103
0.553822
false
3.24094
false
false
false
boltunoff/turo
turo_scraping/pytq_turo.py
1
1501
import sys from PyQt4.QtGui import QApplication from PyQt4.QtCore import QUrl from PyQt4.QtWebKit import QWebPage import bs4 as bs import urllib.request import time class Client(QWebPage): def __init__(self, url): self.app = QApplication(sys.argv) QWebPage.__init__(self) self.loadFinished....
gpl-3.0
3,237,000,602,242,771,000
39.567568
368
0.714857
false
2.869981
false
false
false
mertsarica/hack4career
codes/pertem.py
1
3785
# -*- coding: utf-8 -*- # Yedek Subay Sınıflandırma Sonuçları Gözlemcisi v1.0 # # Bu program belirtilen doneme ait yedek subay sinav sonuclarinin # TSK web sitesinde yayinlanmasi durumunda belirtilen # e-posta adresine e-posta gondererek sizi bilgilendirmektedir. # Not: Gmail e-posta adresi kullanmanız gerekmekte...
apache-2.0
7,073,335,630,872,311,000
32.766355
144
0.55914
false
2.931442
false
false
false
Gabotero/GNURadioNext
gr-uhd/apps/uhd_siggen_base.py
1
17016
#!/usr/bin/env python # # Copyright 2008,2009,2011,2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at ...
gpl-3.0
-2,799,497,042,006,516,000
41.646617
123
0.569875
false
3.55537
false
false
false
cpcloud/asv
asv/commands/quickstart.py
1
1376
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import os import shutil from . import Command from ..console import log class Quickstart(Command): @classmethod ...
bsd-3-clause
8,991,185,041,205,818,000
29.577778
73
0.599564
false
4.035191
false
false
false
SMALLplayer/smallplayer-image-creator
storage/.xbmc/addons/script.favourites/default.py
1
7487
# Credits to CF2009 for the original favourites script. import os, sys import xbmc, xbmcgui, xbmcaddon, xbmcvfs from xml.dom.minidom import parse __addon__ = xbmcaddon.Addon() __addonid__ = __addon__.getAddonInfo('id') __addonversion__ = __addon__.getAddonInfo('version') __cwd__ = __addon__.getAd...
gpl-2.0
679,608,168,648,493,800
43.041176
140
0.538667
false
3.710109
false
false
false
olivierverdier/sfepy
sfepy/homogenization/homogen_app.py
1
3272
import os.path as op import shutil from sfepy.base.base import * from sfepy.homogenization.coefficients import Coefficients from sfepy.homogenization.coefs_base import MiniAppBase from sfepy.homogenization.engine import HomogenizationEngine from sfepy.applications import SimpleApp class Volume(MiniAppBase): def ...
bsd-3-clause
3,625,320,961,356,077,600
32.387755
80
0.585575
false
3.975699
false
false
false
chippey/gaffer
python/GafferTest/WeakMethodTest.py
4
2696
########################################################################## # # Copyright (c) 2012, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistrib...
bsd-3-clause
-4,245,694,534,029,878,000
28.304348
77
0.658383
false
4.048048
true
false
false
shhdup/filya
filyaturnir/collector/migrations/0006_auto__add_battleserial__add_field_battle_serial.py
1
8148
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'BattleSerial' db.create_table('collector_battleserial', (...
apache-2.0
6,016,494,831,017,358,000
70.482456
182
0.559892
false
3.713765
false
false
false
apipanda/openssl
app/extensions/allows/allows.py
1
2007
from flask import current_app from flask import request from functools import wraps from werkzeug import LocalProxy from werkzeug.exceptions import Forbidden class Allows(object): def __init__(self, app=None, identity_loader=None, throws=Forbidden, on_fail=None): self._identity_loader = ...
mit
-6,437,879,393,719,348,000
26.121622
65
0.584953
false
4.234177
false
false
false
idworkin/read-cleaning-format-conversion
KSU_bioinfo_lab/util/general.py
1
3646
#!/usr/bin/env python3 ########################################################################## # USAGE: import general # DESCRIPTION: Functions for common tasks (e.g. opening files with # exception handling built in) # Created by Jennifer M Shelton ##############################################################...
mit
8,344,390,730,722,403,000
35.828283
89
0.58859
false
3.907824
false
false
false
dhodhala88/Bosch1
weblate/trans/forms.py
1
22299
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2015 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <http://weblate.org/> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, eithe...
gpl-3.0
-2,615,261,313,693,811,700
28.180628
79
0.539069
false
4.374804
false
false
false
ThinkboxSoftware/Deadline
Custom/events/JobStats/JobStats.py
1
1843
############################################################### # Imports ############################################################### from System import TimeSpan from Deadline.Events import * from Deadline.Scripting import * ############################################################### # Give Deadlin...
apache-2.0
5,003,598,588,302,321,000
35.612245
128
0.536625
false
4.787013
false
false
false
SymbiFlow/symbiflow-arch-defs
testarch/utils/testarch_graph.py
1
12481
#!/usr/bin/env python3 from lib.rr_graph import graph2 from lib.rr_graph import tracks from lib.rr_graph import points import lib.rr_graph_xml.graph2 as xml_graph2 # bi-directional channels def create_tracks(graph, grid_width, grid_height, rcw, verbose=False): print("Creating tracks, channel width: %d" % rcw) ...
isc
-6,518,683,943,789,034,000
29.970223
97
0.537217
false
3.800548
false
false
false
yoann-dufresne/amplicon_pipeline
lib/python_scripts/matrix_creation.py
1
4291
#!/usr/bin/env python3 import sys from Bio import SeqIO def read_uc (filename, origins): # Init true_clusters = [] clusters = {} read_clusters = {} lines = {} treated = {} # File reading with open(filename) as fp: for line in fp: # Line reading split = line.strip().split("\t") line_type, cluster_i...
agpl-3.0
2,485,535,511,343,132,000
22.320652
98
0.622932
false
2.853059
false
false
false
peterlada/backend
tests/__init__.py
1
1164
# -*- coding: utf-8 -*- """ tests ~~~~~ tests package """ from unittest import TestCase from backend.core import db from .factories import UserFactory from .utils import FlaskTestCaseMixin class OverholtTestCase(TestCase): pass class OverholtAppTestCase(FlaskTestCaseMixin, OverholtTestCase): ...
mit
4,713,233,390,077,241,000
23.25
79
0.626289
false
3.972696
true
false
false
youkochan/shadowsocks-analysis
shadowsocks/asyncdns.py
1
21789
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2014-2015 clowwindy # # 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 r...
apache-2.0
8,167,739,762,873,275,000
31.897271
79
0.477092
false
3.552609
false
false
false
yasith/Argo
data/parser.py
1
1060
import json import sys civs = ['Greek', 'Egyptian', 'Norse', 'Atlantean'] resources = {'F': 'food', 'G': 'gold', 'W': 'wood', 'Fv': 'favor'} units = [] for civ in civs: f = open('CSV/' + civ + '-Table 1.csv', 'r') print "Parsing", civ # Top Header for i in range(3): f.readline() columns = f.readline...
mit
5,489,315,706,744,097,000
21.104167
66
0.534906
false
3.271605
false
false
false
bnadeau/open-test-jig
TestEyePowerOn.py
1
1398
import time import ClydeUnitTest import ClydeLog import TestRig class TestEyePowerOn(ClydeUnitTest.ClydeTestCase): def __init__(self, methodName): super(TestEyePowerOn, self).__init__(methodName) self.testRig = TestRig.rig def test_010_off_current(self): MIN_OFF_CURRENT = 0 MAX_OFF_CURRENT = ...
apache-2.0
-1,296,605,699,537,550,600
28.765957
116
0.664521
false
3.099778
true
false
false
asoliveira/NumShip
scripts/inteZigZag.py
2
3284
# -*- coding: utf-8 -*- p = (Multbeta, Multr, Multl, Multbrl) if TipoModelo == 'MARAD': arq = os.path.abspath('./dados/marad_derivada.dat') elif TipoModelo == 'TP': arq = os.path.abspath('./dados/tp_derivada.dat') en = ('Navioteste', arq, 'inputtab.dat') io = es(en) DicionarioDerivadas = io.lerarqder...
gpl-3.0
-3,060,549,058,970,648,600
34.706522
85
0.528624
false
2.696223
false
false
false
RomanSharapov/algorithms_part1
Analysis/ThreeSum_problem.py
1
1095
import time from Analysis.ThreeSum_bruteForce import three_sum def main(source): a = [int(i.strip()) for i in source if i] start = time.time() print(three_sum(a)) print('Elapsed {} seconds'.format(time.time() - start)) if __name__ == "__main__": while True: choice = input('What do you ...
mit
3,548,231,221,764,768,300
31.205882
79
0.475799
false
3.802083
false
false
false
VirusTotal/vt-graph-api
tests/test_save_graph.py
1
2843
"""Test save graph on VT and get links.""" import pytest import vt_graph_api import vt_graph_api.errors test_graph = vt_graph_api.VTGraph( "Dummy api key", verbose=False, private=False, name="Graph test", user_editors=["agfernandez"], group_viewers=["virustotal"]) def test_save_graph(mocker): """Test sa...
apache-2.0
3,732,017,616,000,913,400
33.253012
79
0.701724
false
2.812067
true
false
false
ArisKots1992/Similar-World-News-Articles
NewsAggregator.py
1
5185
from __future__ import division from Classifier import * class NewsAggregator: def __init__(self, similarity_threshold, weights): NewsAggregator.weights = weights self.articles = dict() # key: article id, value: NewsArticle instance self.topics = dict() # key: topic id , value:...
mit
-8,951,213,586,964,012,000
42.208333
117
0.562006
false
4.633601
false
false
false
flux242/dotfiles
.bin/byzanz_window.py
1
3046
#!/usr/bin/env python3 """ Use byzanz to create a GIF screencast of a specific window. Required tools: sudo apt-get install byzanz x11-utils xdotool A tip: use an extra-long duration (-d 100), record your shot, and use gimp to shorten the duration of the last frame. You need to rename the layer from "Frame 123 (10000...
gpl-2.0
-8,117,333,417,211,492,000
38.558442
92
0.604399
false
3.365746
false
false
false
open-build/TolaActivity
tola/forms.py
1
3592
from crispy_forms.helper import FormHelper from crispy_forms.layout import * from crispy_forms.bootstrap import * from crispy_forms.layout import Layout, Submit, Reset, Div from django import forms from django.contrib.auth.forms import UserChangeForm, UserCreationForm from activitydb.models import Feedback, TolaUser fr...
gpl-2.0
4,058,895,820,320,949,000
30.787611
256
0.646158
false
3.657841
false
false
false
SkylarKelty/AI
src/ai/pathfinding.py
1
1970
import random # # Pathfinding class, avoids other objects # class Path(object): # Create a new Path def __init__(self, world, actor, src, dest): self.path = [] self.actor = actor self.world = world self.maxG = self.world.grid_density - 1 self.setSource(src) self.setDestination(dest) self.exclusions = {...
mit
8,322,737,446,470,176,000
22.464286
79
0.677157
false
3.035439
false
false
false
mochrul/zorp
pylib/Zorp/Dispatch.py
1
41438
############################################################################ ## ## Copyright (c) 2000-2015 BalaBit IT Ltd, Budapest, Hungary ## Copyright (c) 2015-2018 BalaSys IT Ltd, Budapest, Hungary ## ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General...
gpl-2.0
-4,124,550,113,501,944,300
38.577841
212
0.56202
false
4.616019
false
false
false
stevedh/queryutils
scripts/print_similar_sessions.py
1
1054
#!/usr/bin/env python from art.splqueryutils.sessions import * def output_highly_similar_sessions(threshhold=.5): out = open('similar_sessions.out', 'w') jsonfiles = get_json_files(limit=1000*BYTES_IN_MB) all_sessions = sessionize_searches(jsonfiles) for (user, user_sessions) in all_sessions.iteritems...
bsd-3-clause
3,231,406,050,093,726,000
44.826087
105
0.589184
false
3.685315
false
false
false
rezoo/chainer
chainermn/communicators/mpi_communicator_base.py
1
22877
import collections import mpi4py import numpy import chainer.cuda import chainer.utils from chainermn.communicators import _communication_utility from chainermn.communicators._communication_utility import chunked_bcast_obj from chainermn.communicators import _memory_utility from chainermn.communicators import communi...
mit
2,058,997,123,445,331,200
35.957997
88
0.592473
false
3.968945
false
false
false
calancha/DIRAC
RequestManagementSystem/Client/Operation.py
1
14538
######################################################################## # $HeadURL$ # File: Operation.py # Author: Krzysztof.Ciba@NOSPAMgmail.com # Date: 2012/07/24 12:12:05 ######################################################################## """ :mod: Operation .. module: Operation :synopsis: Operation implem...
gpl-3.0
5,299,326,011,531,214,000
31.092715
128
0.578346
false
3.807753
false
false
false
miriamfx/Projeto-Final
logs.py
1
1438
#!/usr/bin/env python #coding: utf-8 # @autor: Míriam Félix Lemes da Silva # @contato: miriamfx2@gmail.com # @data: 08 de Abril de 2017 import get import dbmanager import os,sys from os import path from datetime import datetime import time def logGet(self): date = str(time.strftime("%Y-%m-%d")) # now = str(...
gpl-3.0
-4,255,468,893,241,480,700
26.09434
79
0.626741
false
2.866267
false
false
false
dreispt/todo_app
todo_wizard/models/todo_wizard_model.py
1
2217
from odoo import api, fields, models from odoo import exceptions import logging _logger = logging.getLogger(__name__) class TodoWizard(models.TransientModel): _name = 'todo.wizard' _description = 'To-do Mass Assignment' task_ids = fields.Many2many( 'todo.task', string='Tasks') new_d...
agpl-3.0
-8,525,583,195,190,846,000
29.369863
66
0.566982
false
3.764007
false
false
false
novafloss/pydocusign
demo/accounts.py
1
4398
#!/usr/bin/env python # coding=utf-8 """Sample script that demonstrates `pydocusign` usage for managing accounts. See also http://iodocs.docusign.com/#tabEndpoint6 """ import os import pydocusign try: raw_input except NameError: raw_input = input def prompt(environ_key, description, default): try: ...
bsd-3-clause
441,574,995,502,563,140
26.660377
77
0.66553
false
3.47943
true
false
false
Laurawly/tvm-1
python/tvm/topi/vision/rcnn/proposal.py
2
15572
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
3,643,694,839,613,732,400
33.758929
100
0.549191
false
3.028983
false
false
false
hkpeprah/git-achievements
app/achievement/tests.py
1
4230
import json from django.test import TestCase from django.core import management from django.contrib.auth.models import User from app.services.models import Event from app.achievement.utils import find_nested_json from app.achievement.hooks import check_for_unlocked_achievements from app.achievement.models import UserP...
gpl-2.0
2,445,610,528,114,596,400
34.25
110
0.596454
false
4.151129
true
false
false
augustodossantosti/word-count-web
wordcountweb/word-count-app.py
1
2182
""" Este modulo contem as configuracoes da interface grafica da aplicacao e metodos uteis ao processo de analise de palavras-chave. author: Augusto Santos version: 1.0 """ # -*- coding: utf-8 -*- from tkinter import Tk, Button, Label, Entry, messagebox from tkinter.constants import CENTER from wordcountweb....
mit
-6,581,029,849,413,118,000
26.974359
94
0.691109
false
2.948649
false
false
false
Sranshaft/script.extendedinfo.immersive
resources/lib/MiscScraper.py
1
7101
import os import re import random import sys import urllib import xbmc import xbmcaddon import datetime from Utils import * import simplejson tvrage_key = 'VBp9BuIr5iOiBeWCFRMG' bandsintown_apikey = 'xbmc_open_source_media_center' Addon_Data_Path = os.path.join(xbmc.translatePath("special://profile/addon_data/%s" % xb...
gpl-2.0
8,820,487,332,097,677,000
36.571429
144
0.497958
false
3.807507
false
false
false
XKNX/xknx
xknx/telegram/address.py
1
11672
""" Module for serialization/deserialization and handling of KNX addresses. The module can handle: * individual addresses of devices. * (logical) group addresses. * xknx internal group addresses. The module supports all different writings of group addresses: * 3rn level: "1/2/3" * 2nd level: "1/2" * Free format: "1...
mit
2,654,972,231,720,759,000
30.208556
85
0.590045
false
4.127298
false
false
false
chrislit/abydos
abydos/distance/_baulieu_ix.py
1
4401
# Copyright 2019-2020 by Christopher C. Little. # This file is part of Abydos. # # Abydos is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later versio...
gpl-3.0
-2,705,700,562,942,558,700
28.34
78
0.585549
false
3.89814
false
false
false
onlytiancai/warning-collector
src/yuezhangmen.py
1
7652
# -*- coding: utf-8 -*- import web import hashlib from xml.etree import ElementTree import logging from datetime import datetime, timedelta from db import LianjianLog TOKEN = '855dde440a874ef798227147f6686f55' welcom_txt = u'''改变世界,从改变自己开始,从现在开始每天"练剑"吧,总共5招。 (1): 每天睡个好觉 (2): 每天保持好心情 (3): 每天学习半小时 (4): 每天运动半小时 (5): 每...
mit
-1,004,960,420,255,074,600
27.961039
90
0.573842
false
2.415162
false
false
false
sajuptpm/murano
murano/engine/system/net_explorer.py
1
7105
# Copyright (c) 2014 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
apache-2.0
1,588,943,267,198,722,800
39.141243
78
0.601407
false
4.104564
false
false
false
nmpiazza/Hermes
run.py
1
1139
#!/usr/bin/env python3 from app import app from app.config import BASE_DIR from argparse import ArgumentParser from os import path import ssl def main(): ssl_base_dir = path.join(BASE_DIR, 'ssl') parser = ArgumentParser() parser.add_argument('--bind', '-b', action='store', help='the address to bind to',...
mit
5,680,353,569,888,431,000
35.741935
120
0.656716
false
3.291908
false
false
false
ReneVolution/profanity-omemo-plugin
src/profanity_omemo_plugin/omemo/liteaxolotlstore.py
1
7155
# -*- coding: utf-8 -*- # # Copyright 2015 Tarek Galal <tare2.galal@gmail.com> # # This file is part of Gajim-OMEMO plugin. # # The Gajim-OMEMO plugin 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 ver...
gpl-3.0
7,764,650,079,685,825,000
36.857143
80
0.733473
false
3.811934
false
false
false
yuxng/Deep_ISM
FCN/lib/utils/blob.py
1
1595
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- """Blob helper functions.""" import numpy as np import cv2 def im_lis...
mit
-2,253,726,264,039,259,000
34.444444
75
0.567398
false
3.24187
false
false
false
luizalabs/django-toolkit
django_toolkit/oauth2/validators.py
1
1549
# -*- coding: utf-8 -*- from django.core.cache import caches from django.utils import timezone from oauth2_provider.models import get_access_token_model from oauth2_provider.oauth2_validators import OAuth2Validator from django_toolkit import toolkit_settings cache = caches[toolkit_settings.ACCESS_TOKEN_CACHE_BACKEND]...
mit
7,068,397,750,952,066,000
30.612245
72
0.6204
false
4.425714
false
false
false
Parsely/birding
src/birding/gnip.py
1
2699
"""Minimal Gnip API using HTTP requests.""" import textwrap import requests from .search import SearchManager class Gnip(object): """Simple binding to Gnip search API.""" session_class = requests.Session default_params = { 'publisher': 'twitter', 'maxResults': 500, } def __in...
apache-2.0
6,738,795,703,647,642,000
28.659341
79
0.579844
false
4.089394
false
false
false
jaipaddy/env-reserve-slackbot
src/reserveQAStack.py
1
16720
#!/usr/bin/env python import json, os, logging, requests from datetime import datetime from slackclient import SlackClient from time import sleep from syslog import LOG_DEBUG __app_name__ = 'QA environment reservation Slack Bot' __author__ = 'Jaishankar Padmanabhan' __credits__ = ["Jaishankar Padmanabhan"] __maintain...
mit
3,290,977,912,939,990,500
45.187845
234
0.636902
false
3.414335
false
false
false
AsymmetricVentures/asym-core
setup.py
1
2617
# -*- coding: utf-8 -*- # Asymmetric Base Framework - A collection of utilities for django frameworks # Copyright (C) 2013 Asymmetric Ventures Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free S...
gpl-2.0
461,079,647,612,198,000
33.893333
90
0.716087
false
3.329517
false
false
false
odicraig/kodi2odi
addons/script.favourites/default.py
1
7928
# Credits to CF2009 for the original favourites script. import os, sys, re import xbmc, xbmcgui, xbmcaddon, xbmcvfs from xml.dom.minidom import parse ADDON = xbmcaddon.Addon() ADDONID = ADDON.getAddonInfo('id') ADDONVERSION = ADDON.getAddonInfo('version') CWD = ADDON.getAddonInfo('path').decode("...
gpl-3.0
-1,701,810,789,181,660,200
43.79096
153
0.551211
false
3.748463
false
false
false
1200wd/bitcoinlib
examples/wallet_multisig_3of5.py
1
4152
# -*- coding: utf-8 -*- # # BitcoinLib - Python Cryptocurrency Library # # Create Multisig 3-of-5 wallet # # © 2017 November - 1200 Web Development <http://1200wd.com/> # from pprint import pprint from bitcoinlib.wallets import wallet_exists, Wallet, wallet_delete_if_exists from bitcoinlib.keys import HDKey ...
gpl-3.0
-1,036,085,004,712,584,400
36.396396
128
0.656227
false
3.135196
false
false
false
wdsx/igor
application.py
1
1871
from operator import itemgetter import sys from flask import Flask from flask import abort from flask import render_template from flask import send_from_directory from flask import request from wds.igor.security import secure from wds.igor import igor from wds.logging import log_writer from wds.igor.job import JobBuild...
mit
9,106,251,353,785,425,000
26.514706
102
0.690005
false
3.661448
true
false
false
chromity/thinkcspy3-solutions
chapter3/chapter3-6.py
1
1265
# Use for loops to make a turtle draw these regular polygons # (regular means all sides the same lengths, all angles the # the same): # * An equilateral triangle # * A square # * A hexagon (six sides) # * An octagon (eight sides) import turtle window = turtle.Screen() # instantiate a window pointer = t...
gpl-3.0
7,162,397,278,488,118,000
23.326923
63
0.660079
false
3.277202
false
false
false
maciejkula/spotlight
spotlight/factorization/representations.py
1
2709
""" Classes defining user and item latent representations in factorization models. """ import torch.nn as nn from spotlight.layers import ScaledEmbedding, ZeroEmbedding class BilinearNet(nn.Module): """ Bilinear factorization representation. Encodes both users and items as an embedding layer; the score...
mit
-5,419,416,714,538,240,000
28.769231
85
0.611665
false
4.433715
false
false
false
topic2k/EventGhost
plugins/EventGhost/__init__.py
1
29935
# -*- coding: utf-8 -*- # # This file is part of EventGhost. # Copyright © 2005-2019 EventGhost Project <http://www.eventghost.org/> # # EventGhost 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 versio...
gpl-2.0
3,989,129,650,640,978,000
30.878594
79
0.602191
false
4.063807
true
false
false
opennode/waldur-mastermind
src/waldur_core/structure/backend.py
1
2666
import functools import logging from waldur_core.structure.exceptions import ServiceBackendNotImplemented logger = logging.getLogger(__name__) def log_backend_action(action=None): """ Logging for backend method. Expects django model instance as first argument. """ def decorator(func): @fun...
mit
5,614,517,261,532,236,000
24.883495
87
0.602776
false
4.320908
false
false
false
anconaesselmann/ClassesAndTests
classes_and_tests/srcTest/LiveUnitTestingTest.py
1
3196
import unittest import os if __name__ == '__main__' and __package__ is None: from os import sys, path sys.path.append(path.abspath(path.join(__file__, "..", ".."))) from src.LiveUnitTesting import LiveUnitTesting from src.mocking.MockFileSystem import MockFileSystem from src.mocking.sublime import MockSublimeV...
mit
-8,632,220,786,647,808,000
41.065789
121
0.647997
false
3.531492
true
false
false
googleapis/python-compute
google/cloud/compute_v1/services/region_backend_services/transports/base.py
1
8608
# -*- 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 or...
apache-2.0
8,765,405,341,646,848,000
35.016736
103
0.634758
false
4.310466
false
false
false
GrognardsFromHell/TemplePlus
tpdatasrc/tpgamefiles/scr/Spell3003 - Bard Fascinate.py
1
2189
from toee import * def OnBeginSpellCast( spell ): print "Fascinate OnBeginSpellCast" print "spell.target_list=", spell.target_list print "spell.caster=", spell.caster, " caster.level= ", spell.caster_level def OnSpellEffect( spell ): print "Fascinate OnSpellEffect" spell.duration = spell.caster_level print "Du...
mit
-21,402,029,424,928,710
29.84507
207
0.711284
false
2.581368
false
false
false