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
mahim97/zulip
zilencer/models.py
2
1101
import datetime from typing import Text from django.db import models import zerver.models def get_remote_server_by_uuid(uuid: Text) -> 'RemoteZulipServer': return RemoteZulipServer.objects.get(uuid=uuid) class RemoteZulipServer(models.Model): uuid = models.CharField(max_length=36, unique=True) # type: Text...
apache-2.0
-1,857,730,610,358,638,600
39.777778
97
0.735695
false
3.574675
false
false
false
matthijsvk/multimodalSR
code/Experiments/neon-master/examples/faster-rcnn/convert_xml_to_json.py
1
5828
# ---------------------------------------------------------------------------- # Copyright 2016 Nervana Systems Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.o...
mit
-8,247,601,090,197,011,000
36.121019
94
0.577385
false
3.799218
false
false
false
ncsulug/ncsulug-website
lug_people/migrations/0003_auto__add_accountrequest.py
1
6919
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'AccountRequest' db.create_table('lug_people_accountrequest', ( ('id', self.gf('d...
gpl-3.0
-3,249,888,237,023,225,300
67.514851
182
0.554849
false
3.698022
false
false
false
scrapinghub/dateparser
tests/test_hijri.py
1
2000
import sys import unittest from datetime import datetime from parameterized import parameterized, param from tests import BaseTestCase is_python_supported = sys.version_info >= (3, 6) try: from dateparser.calendars.hijri import HijriCalendar except ImportError: if is_python_supported: raise @unitt...
bsd-3-clause
1,600,178,833,128,748,500
37.313725
93
0.648414
false
3.043614
true
false
false
miquelo/caviar
packages/caviar/engine/__init__.py
1
3783
# # This file is part of CAVIAR. # # CAVIAR is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # CAVIAR is distributed in the hope that ...
gpl-3.0
-3,241,001,883,956,268,000
20.016667
75
0.680412
false
3.258398
false
false
false
msikma/zembu.py
zembu.py
1
7381
#!/usr/bin/env python # coding=utf8 # # zembu.py 0.1 # Script that checks whether dictionary words are available as domain names. import subprocess import datetime import argparse import pprint import time import sys import os # Get current console size. ROWS, COLS = [int(n) for n in os.popen('stty size', 'r').read()...
mit
-5,755,920,373,877,593,000
26.85283
89
0.581493
false
3.806601
false
false
false
carlosb1/examples-python
ideas/forecast-example/forecast.py
1
6733
"""Docstring for MyClass.""" import datetime import requests from sqlalchemy import Column, Integer, String , create_engine from celery import Celery from sqlalchemy.sql import exists from sqlalchemy.orm import sessionmaker from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() # define o...
gpl-2.0
1,305,902,914,330,439,400
37.039548
323
0.613397
false
3.55491
false
false
false
ssato/sos-analyzer
sos_analyzer/cli.py
1
3519
# # Author: Satoru SATOH <ssato redhat.com> # License: GPLv3+ # import anyconfig import logging import optparse import os import os.path import sys from sos_analyzer.globals import DATA_SUBDIR import sos_analyzer.archive import sos_analyzer.runner import sos_analyzer.utils LOGGER = logging.getLogger(__name__) DEFA...
gpl-3.0
8,322,061,659,670,095,000
30.141593
77
0.611253
false
3.594484
false
false
false
JohnKendrick/PDielec
PDielec/pickled_reader.py
1
1689
#!/usr/bin/env python """Read the contents of a directory containing DFT output and create a csv style file of information""" from __future__ import print_function import sys import dill as pickle import PDielec.__init__ version = PDielec.__init__.__version__ def print_help(): print('pickled_reader filenames', fil...
mit
1,048,433,540,079,126,100
29.709091
111
0.611604
false
3.891705
false
false
false
google/tink
python/tink/core/_registry.py
1
9252
# Copyright 2019 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
-6,869,653,254,760,174,000
37.87395
114
0.670774
false
3.928662
false
false
false
bazzile/THE_BIG_ONE
Main/Tenderplan/participants2excel.py
1
6915
from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By from selenium.common.exceptions import TimeoutException from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions impor...
mit
-720,732,314,296,447,400
47.625954
121
0.537991
false
3.498078
false
false
false
mateoqac/unqTip
language/vgbs/web/base.py
1
1839
"Base classes for services." import web import local def have_role(role_id): "Return True iff the currently logged user has the given role." user_id = local.session.user_id it = local.db.select('role_assignments', where='user_id=$user_id AND role_id=$role_id', vars=locals() ...
gpl-3.0
8,681,706,271,270,517,000
25.652174
70
0.594345
false
3.791753
false
false
false
whosonfirst/whosonfirst-www-boundaryissues
services/geojson-server/wof-geojson-server.py
1
7923
#!/usr/bin/env python import StringIO import sys import logging import os import re import flask from flask import Flask, request, jsonify import geojson import requests import json import mapzen.whosonfirst.geojson import mapzen.whosonfirst.export import mapzen.whosonfirst.search import mapzen.whosonfirst.utils impo...
bsd-3-clause
-3,751,734,502,847,514,000
28.453532
158
0.689133
false
2.880044
false
false
false
ZeitOnline/zeit.content.author
src/zeit/content/author/author.py
1
9296
from requests.exceptions import RequestException from zeit.cms.content.property import ObjectPathProperty from zeit.cms.i18n import MessageFactory as _ from zeit.content.author.interfaces import IAuthor import UserDict import grokcore.component as grok import lxml.objectify import requests import urllib import zeit.cms...
bsd-3-clause
8,814,673,143,389,612,000
31.390244
79
0.668675
false
3.697693
false
false
false
ilblackdragon/tf_examples
seq2seq/data.py
1
2291
import tensorflow as tf from tensorflow.contrib import layers from tensorflow.contrib import learn def make_input_fn(mode, filename_in, filename_out, in_vocab_file, out_vocab_file, batch_size, vocab_size, input_max_length, output_max_length, queue_capacity=10000, num_threads=10): def input_fn():...
apache-2.0
-6,994,326,927,575,541,000
51.068182
138
0.634657
false
3.54644
false
false
false
joseamaya/tambox
almacen/managers.py
1
2042
# -*- coding: utf-8 -*- from django.db import models class DetalleMovimientoManager(models.Manager): def guardar_detalles_con_referencia(self, objs, orden): requerimiento = None if orden.cotizacion is not None: requerimiento = orden.cotizacion.requerimiento for detalle in obj...
gpl-3.0
-8,774,856,473,957,981,000
39.84
116
0.63859
false
3.108067
false
false
false
admiralspark/NetSpark-Scripts
Example_Scripts/Cisco/auditQOS.py
1
2040
#Global imports from netmiko import ConnectHandler from datetime import datetime import csv, os.path #Local imports import credentials # Begin timing the script start_time = datetime.now() # Define the primary function (to be moved to a separate module some day...) def nc(username, password, secret, customer): wi...
gpl-3.0
1,225,461,975,589,799,000
36.090909
76
0.604412
false
4.112903
false
false
false
TheWardoctor/Wardoctors-repo
script.stargate.guide/resources/playwith/playwith.py
1
2975
import sys import xbmc,xbmcaddon,xbmcvfs import sqlite3 from subprocess import Popen import datetime,time # from vpnapi import VPNAPI channel = sys.argv[1] start = sys.argv[2] ADDON = xbmcaddon.Addon(id='script.stargate.guide') def adapt_datetime(ts): # http://docs.python.org/2/library/sqlite3.html#registering-a...
apache-2.0
375,599,105,848,866,940
30.648936
100
0.667227
false
3.287293
false
false
false
capocchi/DEVSimPy-plugin-SIG-viewer
ExtendedFrame.py
1
9957
# -*- coding: utf-8 -*- #import wxversion #wxversion.select('2.8.11') import wx import os import sys import wx.combo import wx.lib.agw.foldpanelbar as fpb _ = wx.GetTranslation def GetCollapsedIconData(): return \ '\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x10\x00\x00\x00\x10\x08\x06\ \x00\x00\x00\x1f\x...
lgpl-3.0
-2,606,609,827,446,889,500
35.472527
125
0.63262
false
2.503646
false
false
false
thiagoss/splitencoder
splitencoder/splitter.py
1
4258
#!/usr/bin/env python # # splitencoder # # Copyright (C) 2015 Samsung Electronics. All rights reserved. # Author: Thiago Santos <thiagoss@osg.samsung.com> # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free ...
lgpl-2.1
-6,288,029,190,002,081,000
33.33871
139
0.683654
false
3.425583
false
false
false
SDX2000/hotwire
hotwire/builtins/json.py
1
2675
# This file is part of the Hotwire Shell project API. # Copyright (C) 2007 Colin Walters <walters@verbum.org> # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, includin...
gpl-2.0
7,491,138,800,768,257,000
42.145161
96
0.647477
false
4.414191
false
false
false
paineliu/tflearn
helen.py
1
1084
import os from PIL import Image img_path = '/home/palm/deep/helen/train' lab_path = '/home/palm/deep/helen/annotation' filename = '/home/palm/deep/helen/trainnames.txt' f = open(filename) index = 1 for each in f: each = each.strip() img_file = os.path.join(img_path, each + '.jpg') img = Image.open(img_fi...
apache-2.0
-8,658,315,276,180,879,000
26.1
71
0.530443
false
3.011111
false
false
false
douglask3/allocationModules
runGday/DUKE/simulations/duke_spinup_to_equilibrium.py
1
24694
#!/usr/bin/env python """ Duke Simulation for NCEAS FACE experiment Site History: ------------- * Pre-1850 temperate broadleaved deciduous forest * Harvest forest. * Grassland from 1850-1982, mowed (+/- annually - DO NOT SIMULATE MOWING :P) * burnt prior to planting * At start of experiment aboveground biomass 5.5-1...
gpl-2.0
-6,334,218,371,737,026,000
45.948669
231
0.39787
false
3.762609
false
false
false
ToonTownInfiniteRepo/ToontownInfinite
toontown/toon/InventoryNew.py
1
56688
from direct.gui.DirectGui import * from pandac.PandaModules import * from toontown.toonbase.ToontownBattleGlobals import * import InventoryBase from toontown.toonbase import TTLocalizer from toontown.quest import BlinkingArrows from direct.interval.IntervalGlobal import * from direct.directnotify import DirectNotifyGlo...
mit
6,129,025,153,131,687,000
44.386709
433
0.609741
false
3.685347
false
false
false
thiagopio/vendas_healthcheck
vendas/healthcheck/models.py
1
3084
# -*- coding: utf-8 -*- from django.db import models import requests import re class Project(models.Model): name = models.CharField(max_length=50) environment = models.CharField(max_length=10, choices=(('DEV', 'DEV'), ('QA', 'QA'), ('PROD', 'PROD'))) related_project = models.ManyToManyField('Project', bla...
gpl-2.0
4,263,134,354,998,096,400
36.156627
107
0.604734
false
4.139597
false
false
false
jodal/comics
comics/core/migrations/0001_initial.py
1
5776
import django.core.files.storage from django.db import migrations, models import comics.core.models class Migration(migrations.Migration): dependencies = [] operations = [ migrations.CreateModel( name="Comic", fields=[ ( "id", ...
agpl-3.0
-7,052,791,291,109,992,000
32.777778
87
0.340547
false
5.881874
false
false
false
ndn/somacube
python/somacube.py
1
1941
#!/usr/bin/python import sys import argparse from threading import Thread import problems from solver import Solver if __name__ != "__main__": sys.exit() parser = argparse.ArgumentParser(description="Kloetze algorithm.") parser.add_argument("-p", "--problem") parser.add_argument("-a", "--all", action="store_tru...
mit
2,865,622,385,344,816,600
25.589041
112
0.64915
false
3.621269
false
false
false
scorphus/politicos
politicos/migrations/versions/585774625ec2_create_mandate_events_table.py
1
1328
"""create mandate events table Revision ID: 585774625ec2 Revises: 2cbbef3d8e8f Create Date: 2015-07-06 00:58:44.470013 """ # revision identifiers, used by Alembic. revision = '585774625ec2' down_revision = '2cbbef3d8e8f' from alembic import op import sqlalchemy as sa def upgrade(): op.create_table( 'm...
agpl-3.0
-2,576,167,274,743,739,400
25.039216
77
0.626506
false
3.11007
false
false
false
mendersoftware/meta-mender-qemu
scripts/list-all-org-repos.py
1
1955
#!/usr/bin/python3 import argparse import json import re import subprocess import sys parser = argparse.ArgumentParser() parser.add_argument( "--token", help="Github Personal Access token, get it from https://github.com/settings/tokens.", ) parser.add_argument( "--org", default="mendersoftware", h...
apache-2.0
-3,530,668,890,544,722,400
29.076923
311
0.630179
false
3.263773
false
false
false
hulop/SfMLocalization
PyViewMatch/src/viewMatchPyCV.py
1
5231
################################################################################ # Copyright (c) 2015 IBM Corporation # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, in...
mit
-5,417,052,964,673,170,000
41.877049
166
0.5909
false
3.560926
false
false
false
PLyczkowski/Sticky-Keymap
2.74/scripts/addons/add_mesh_extra_objects/add_mesh_pipe_joint.py
1
33743
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
gpl-2.0
-6,384,896,267,242,268,000
33.016129
78
0.532259
false
3.805029
false
false
false
darkpeach/AlgorithmCoding
_046_Permutations.py
1
1275
class Solution(object): def permute(self, nums): """ :type nums: List[int] :rtype: List[List[int]] """ # Non-recursive solution if not nums: return [] stack = [-1] permutation = [] permutations = [] while len(stack): ...
epl-1.0
-9,072,442,125,490,642,000
26.717391
80
0.443922
false
4.458042
false
false
false
shakamunyi/os-cloud-config
os_cloud_config/neutron.py
1
5961
# Copyright (c) 2014 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/LICENSE-2.0 # # Unless required by applica...
apache-2.0
3,773,661,173,082,691,600
41.578571
79
0.631605
false
4.113872
false
false
false
michaelmior/pylinks
pylinks/links/views.py
1
2010
from django.db.models import F from django.http import Http404, HttpResponseRedirect from django.shortcuts import get_object_or_404 from django.views.generic import ListView from pylinks.links.models import Category, Link class LinkListView(ListView): model = Link context_object_name = 'links' paginate_b...
mit
-3,037,833,652,373,392,000
26.162162
76
0.653234
false
3.715342
false
false
false
zutshi/S3CAMR
src/nonlinprog/pyfmincon.py
1
3601
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import numpy as np import sympy as sym import functools as ft import atexit from pymatopt.optimmatlab import init, deinit, fmincon from utils import print import nonlinprog.spec as spec import settings in...
bsd-2-clause
394,142,603,970,509,250
25.284672
100
0.5604
false
2.867038
false
false
false
tysonholub/twilio-python
tests/integration/ip_messaging/v2/service/test_binding.py
1
6696
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from tests import IntegrationTestCase from tests.holodeck import Request from twilio.base.exceptions import TwilioException from twilio.http.response import Response class BindingTestCase(Integrati...
mit
-7,395,701,536,092,922,000
39.581818
148
0.52509
false
4.685794
true
false
false
WangWenjun559/Weiss
summary/sumy/sklearn/feature_selection/rfe.py
1
17079
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Vincent Michel <vincent.michel@inria.fr> # Gilles Louppe <g.louppe@gmail.com> # # License: BSD 3 clause """Recursive feature elimination for feature ranking""" import warnings import numpy as np from ..utils import check_X_y, safe_sqr fro...
apache-2.0
-7,817,962,312,882,349,000
37.466216
79
0.607705
false
4.198378
true
false
false
thanm/devel-scripts
munge-root-dump.py
1
3865
#!/usr/bin/python3 """Post-process a GC roots dump. """ import getopt import os import re import sys import script_utils as u # Input and output file (if not specified, defaults to stdin/stdout) flag_infile = None flag_outfile = None # Binary to analyze flag_module = None #............................................
apache-2.0
1,785,765,340,868,774,400
21.602339
82
0.591721
false
3.149959
false
false
false
esikachev/scenario
sahara/tests/unit/service/edp/test_job_utils.py
1
10221
# Copyright (c) 2013 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
-3,134,688,741,239,969,300
40.048193
79
0.540945
false
3.920598
true
false
false
Fredehagelund92/Cheetax
setup.py
1
1885
from setuptools import setup, find_packages from cheetax import __version__ as VERSION long_description = 'Cheetax is a data loader command-line interface that helps transfer data between storages, \ databases and files into EXASOL. Cheetax is build around generic EXASOL import statements \ in order to maximize the pe...
apache-2.0
4,553,665,502,626,639,400
32.070175
112
0.603183
false
3.762475
false
false
false
thw17/NextGenUtilities
fasta_utils/Trim_Ns_fasta.py
1
17895
""" Trim_Ns_Fasta.py Author: Tim Webster, Arizona State University Date: April 17, 2017 Currently requires Python 2.7 This script takes as input a fasta file and trims Ns from the beginning and end. It also allows for abitrarily sized "buffers" to ignore in this procedure. For example, if you set a buffer to 2 and...
mit
2,278,740,378,926,010,400
30.505282
95
0.644985
false
3.011612
false
false
false
opencord/cord
scripts/imagebuilder.py
1
50939
#!/usr/bin/env python # Copyright 2017-present Open Networking 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 b...
apache-2.0
4,126,865,346,177,031,700
34.423505
89
0.505899
false
4.336341
false
false
false
jeffsilverm/presentation
whats_new_in_python_3.6/secrets_demo.py
1
2020
#! /usr/bin/python3.6 # -*- coding: utf-8 -*- # # secrets.py - a demonstration of the secrets module new in python 3.6 # secrets implements a cryptographically secure random number generator # PEP-506 describes the motivation for CSPRNG https://www.python.org/dev/peps/pep-0506/ import tempfile import secrets import s...
gpl-2.0
-3,875,744,184,314,663,000
37.113208
116
0.712376
false
3.613596
false
false
false
Awayet/twitter_ebooks
log.py
1
2954
#!/usr/bin/env python # -*- coding: UTF-8 -*- import sys import escape from time import gmtime, strftime, time import sqlite3 from traceback import format_exc import config import os htime = strftime("%a %Y-%m-%d %H:%M:%S%z",gmtime()) utime = int(time()) def print_message(_body, _section, _level, _time=""): try: ...
bsd-2-clause
-2,550,176,049,428,005,000
41.214286
211
0.624915
false
2.771107
false
false
false
MERegistro/meregistro
meregistro/apps/oferta_nacional/views.py
1
3879
# -*- coding: UTF-8 -*- from django.http import HttpResponseRedirect, HttpResponse from datetime import datetime from django.core.urlresolvers import reverse from meregistro.shortcuts import my_render from apps.seguridad.decorators import login_required, credential_required from apps.seguridad.models import Usuario, P...
bsd-3-clause
5,083,109,251,535,814,000
32.405172
115
0.693419
false
3.114952
false
false
false
iainr/fridgid
Fridge.py
1
9372
import RPi.GPIO as GPIO import datetime import time import pandas as pd import logging import logging.handlers import sys logger = logging.getLogger('fridge') handler = logging.StreamHandler() fHandler = logging.FileHandler('fridge.log') formatter = logging.Formatter("%(asctime)s %(levelname)s %(message)s", "%Y-...
lgpl-3.0
-535,857,558,960,737,660
29.930693
265
0.663786
false
2.869565
false
false
false
billyvg/piebot
piebot/modules/isup.py
1
1085
"""Checks isup.me to see if a website is up @package ppbot @syntax isup <word> """ import requests import re from piebot.modules import * class Isup(Module): def __init__(self, *args, **kwargs): """Constructor""" Module.__init__(self, kwargs=kwargs) self.url = "http://www.isup.me/%s" ...
mit
-6,112,824,534,458,880,000
23.659091
62
0.504147
false
4.033457
false
false
false
cryptapus/electrum-uno
gui/kivy/__init__.py
1
2137
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2012 thomasv@gitorious # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including witho...
mit
-7,917,904,028,191,334,000
35.844828
83
0.702387
false
4.133462
false
false
false
MjAbuz/foundation
foundation/djangocms_pagebanner/cms_toolbar.py
1
2382
from cms.api import get_page_draft from cms.toolbar_pool import toolbar_pool from cms.toolbar_base import CMSToolbar from cms.utils import get_cms_setting from cms.utils.permissions import has_page_change_permission from django.core.urlresolvers import reverse, NoReverseMatch from django.utils.translation import ugette...
mit
-2,477,144,145,600,178,700
41.535714
76
0.588581
false
4.44403
false
false
false
perryjohnson/biplaneblade
sandia_blade_lib/prep_stn32_mesh.py
1
10860
"""Write initial TrueGrid files for one Sandia blade station. Usage ----- start an IPython (qt)console with the pylab flag: $ ipython qtconsole --pylab or $ ipython --pylab Then, from the prompt, run this script: |> %run sandia_blade_lib/prep_stnXX_mesh.py or |> import sandia_blade_lib/prep_stnXX_mesh Au...
gpl-3.0
6,537,902,515,466,472,000
32.919614
87
0.635912
false
2.903743
false
false
false
plotly/plotly.py
packages/python/plotly/plotly/validators/streamtube/legendgrouptitle/_font.py
1
1540
import _plotly_utils.basevalidators class FontValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name="font", parent_name="streamtube.legendgrouptitle", **kwargs ): super(FontValidator, self).__init__( plotly_name=plotly_name, parent_n...
mit
-1,890,112,731,083,013,000
38.487179
85
0.53961
false
4.502924
false
false
false
Bobobol/nemubot-1
prompt/builtins.py
1
4530
# -*- coding: utf-8 -*- # Nemubot is a modulable IRC bot, built around XML configuration files. # Copyright (C) 2012 Mercier Pierre-Olivier # # 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 Foundat...
agpl-3.0
7,489,317,525,911,491,000
33.846154
120
0.564238
false
3.935708
true
false
false
wilseypa/warped2-models
scripts/plotBags.py
1
12059
#!/usr/bin/python # Calculates statistics and plots the bag metrics from raw data from __future__ import print_function import csv import os, sys import numpy as np import scipy as sp import scipy.stats as sps import pandas as pd import re, shutil, tempfile import itertools, operator import subprocess import Gnuplot ...
mit
7,852,792,263,206,142,000
35.10479
108
0.556846
false
3.862588
false
false
false
EDUlib/edx-platform
cms/djangoapps/contentstore/outlines.py
1
8767
""" This is where Studio interacts with the learning_sequences application, which is responsible for holding course outline data. Studio _pushes_ that data into learning_sequences at publish time. """ from datetime import timezone from typing import List, Tuple from edx_django_utils.monitoring import function_trace, s...
agpl-3.0
-2,202,070,757,564,624,000
41.352657
97
0.685982
false
4.241413
false
false
false
ghgr/BetFair_Arbitrer
estimator.py
1
4553
""" The MIT License (MIT) Copyright (c) 2015 Eduardo Pena Vina Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, m...
mit
3,506,045,811,491,324,000
46.926316
115
0.762354
false
2.801846
false
false
false
ctbrennan/cross-platform-message-analytics
imessage_export.py
1
11626
##Author: https://github.com/alexwchan #!/usr/bin/python # -*- encoding: utf8 -*- """imessage_export.py - this script takes the chat.db or sms.db SQL database used to store messages on OS X or iOS and spits out a set of JSON files, one for each thread. The script is fairly rudimentary, and doesn't do anything to catch...
mit
723,629,280,178,813,400
33.589286
110
0.62898
false
3.622818
false
false
false
LuckyLukert/Turnierserver
Frontend/commons.py
1
1422
from database import db from flask import abort, make_response, Response from flask.ext.login import current_user from flask.ext.cache import Cache from functools import wraps class CommonErrors: BAD_REQUEST = ({'error': 'Bad request.'}, 400) INVALID_ID = ({'error': 'Invalid id.'}, 404) NO_ACCESS = ({'error': 'Ins...
lgpl-3.0
6,538,015,089,394,203,000
22.7
58
0.659634
false
3.064655
false
false
false
akshmakov/Dolfin-Fijee-Fork
site-packages/dolfin/mesh/meshes.py
1
2144
"This module provides a simple Python wrapper for the SWIG-generated Mesh class" # Copyright (C) 2012-2014 Anders Logg # # This file is part of DOLFIN. # # DOLFIN 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 Fo...
gpl-3.0
1,277,378,265,807,057,700
27.972973
80
0.69916
false
3.671233
false
false
false
kivy-garden/garden.matplotlib
backend_kivy.py
1
50958
''' Backend Kivy ===== .. image:: images/backend_kivy_example.jpg :align: right The :class:`FigureCanvasKivy` widget is used to create a matplotlib graph. This widget has the same properties as :class:`kivy.ext.mpl.backend_kivyagg.FigureCanvasKivyAgg`. FigureCanvasKivy instead of rendering a static image, uses th...
mit
-5,166,271,607,176,573,000
37.751331
92
0.597943
false
3.989197
false
false
false
TouK/vumi
vumi/application/bridge.py
1
4451
# -*- test-case-name: vumi.application.tests.test_bridge -*- from base64 import b64encode from twisted.python import log from twisted.web import http from twisted.internet.defer import inlineCallbacks from vumi.application.base import ApplicationWorker from vumi.utils import http_request_full from vumi.errors import...
bsd-3-clause
4,079,045,445,123,715,600
37.37069
78
0.609526
false
4.255258
true
false
false
40123103/2015cd_40123103
wsgi.py
1
34518
#@+leo-ver=5-thin #@+node:2014fall.20141212095015.1775: * @file wsgi.py # coding=utf-8 # 上面的程式內容編碼必須在程式的第一或者第二行才會有作用 ################# (1) 模組導入區 # 導入 cherrypy 模組, 為了在 OpenShift 平台上使用 cherrypy 模組, 必須透過 setup.py 安裝 #@@language python #@@tabwidth -4 #@+<<declarations>> #@+node:2014fall.20141212095015.1776: ** <<declar...
gpl-3.0
-2,623,990,950,825,067,000
26.151852
137
0.552926
false
2.127085
false
false
false
kgsn1763/deep-learning-from-scratch
ch08/deep_convnet.py
1
6086
#!/usr/bin/env python # coding: utf-8 import sys, os sys.path.append(os.pardir) # 親ディレクトリのファイルをインポートするための設定 import pickle import numpy as np from common.layers import Convolution, Relu, Pooling, Affine, Dropout, SoftmaxWithLoss class DeepConvNet: """認識率99%以上の高精度なConvNet ネットワーク構成は下記の通り conv - relu -...
mit
-2,856,591,327,936,851,500
41.318841
181
0.547774
false
2.925852
false
false
false
kswiat/django
django/core/urlresolvers.py
1
24713
""" This module converts requested URLs to callback view functions. RegexURLResolver is the main class here. Its resolve() method takes a URL (as a string) and returns a tuple in this format: (view_function, function_args, function_kwargs) """ from __future__ import unicode_literals import functools from importl...
bsd-3-clause
8,041,523,996,252,233,000
36.961598
107
0.569983
false
4.454398
false
false
false
Conjuro/GitPython
refs/headref.py
1
5050
from reference import Reference from git.config import SectionConstraint from git.util import join_path __all__ = ["Head"] class Head(Reference): """The GitPyhton Head implementation provides more git-command based features A Head is a named reference to a Commit. Every Head instance contains a name and a Commit...
bsd-3-clause
5,981,455,038,793,663,000
28.705882
117
0.70495
false
3.377926
true
false
false
tensorflow/models
research/delf/delf/python/datasets/google_landmarks_dataset/compute_recognition_metrics.py
1
3672
# Copyright 2019 The TensorFlow Authors All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
apache-2.0
4,918,161,215,022,337,000
36.090909
80
0.660675
false
4.061947
false
false
false
googleapis/python-api-core
owlbot.py
1
1224
# 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 agreed to in writing, s...
apache-2.0
4,730,541,908,791,895,000
29.6
87
0.629085
false
3.986971
false
false
false
obulpathi/reversecoin
reversecoin/bitcoin/rpc.py
1
9261
# Copyright 2011 Jeff Garzik # # RawProxy has the following improvements over python-jsonrpc's ServiceProxy # class: # # - HTTP connections persist for the life of the RawProxy object (if server # supports HTTP/1.1) # - sends protocol 'version', per JSON-RPC 1.1 # - sends proper, incrementing 'id' # - sends Basic HTT...
gpl-2.0
-1,278,897,766,811,167,700
36.646341
116
0.558579
false
4.366337
false
false
false
marcosschroh/Flask-Simple-Serializer
flask_simple_serializer/serializers.py
1
2916
import six from werkzeug.datastructures import MultiDict from collections import OrderedDict from wtforms.form import Form from wtforms_alchemy import ModelForm def serializer_factory(base=Form): class BaseSerializer(base): def __init__(self, data_dict=None, model_instance=None, **kwargs): ...
mit
-1,948,295,642,213,331,000
31.764045
83
0.627915
false
4.599369
false
false
false
USGSDenverPychron/pychron
pychron/core/filtering.py
1
3462
# =============================================================================== # Copyright 2015 Jake Ross # # 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...
apache-2.0
-8,211,237,435,859,037,000
30.761468
118
0.553726
false
3.675159
false
false
false
peterhenderson/python-enunciate-samples
familytree.py
1
5994
try: import json except ImportError: import simplejson as json def parse(input): """Parse specified file or string and return a FamilyTree object created from it.""" if hasattr(input, "read"): data = json.load(input) else: data = json.loads(input) return FamilyTree(data) clas...
apache-2.0
-720,568,518,906,619,600
25.522124
88
0.489823
false
3.755639
false
false
false
anthrotype/nototools
nototools/emoji_ordering.py
1
16038
#!/usr/bin/env python # # 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 require...
apache-2.0
-3,333,971,750,348,480,500
30.695652
80
0.635304
false
3.443109
false
false
false
peckhams/topoflow
topoflow/components/met_base.py
1
111479
## Does "land_surface_air__latent_heat_flux" make sense? (2/5/13) # Copyright (c) 2001-2014, Scott D. Peckham # # Sep 2014. Fixed sign error in update_bulk_richardson_number(). # Ability to compute separate P_snow and P_rain. # Aug 2014. New CSDMS Standard Names and clean up. # Nov 2013. Con...
mit
1,734,465,488,273,013,200
48.057925
117
0.417065
false
3.976848
false
false
false
liebermeister/flux-enzyme-cost-minimization
scripts/monod_curve.py
1
6430
# -*- coding: utf-8 -*- """ Created on Wed Oct 1 2015 @author: noore """ import os import numpy as np import matplotlib.pyplot as plt from matplotlib import gridspec from scipy.optimize import curve_fit import definitions as D import pandas as pd #LOW_GLUCOSE = D.LOW_CONC['glucoseExt'] LOW_GLUCOSE = 1e-3 # in mM, i...
gpl-2.0
4,124,050,108,786,699,300
38.453988
94
0.511664
false
2.878245
false
false
false
archman/phantasy
phantasy/__init__.py
1
1546
import logging # from phantasy.library.model import flame as flameutils # from phantasy.library import channelfinder from phantasy.library import lattice from phantasy.library import layout from phantasy.library import misc from phantasy.library import model from phantasy.library import operation from phantasy.librar...
bsd-3-clause
1,526,866,146,709,107,500
28.730769
79
0.741915
false
3.220833
false
false
false
ioanpocol/superdesk-core
apps/ldap/commands.py
1
3036
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import loggi...
agpl-3.0
-403,445,568,034,705,700
39.48
118
0.682477
false
4.058824
false
false
false
makersauce/ConstructSecur
Overlord/newAdmin.py
1
1055
#!/usr/bin/env python from dblayer import DBlayer import getpass db = DBlayer(DEBUG=True) print 'so you want to add an admin, eh?' name = raw_input("full name: ") usern = raw_input("user name: ") trys = 0 while True: pw = getpass.getpass("password: ") pw2 = getpass.getpass("re-type password: ") if pw == ...
mit
-1,214,313,228,223,056,000
20.1
63
0.557346
false
3.286604
false
false
false
Yukarumya/Yukarum-Redfoxes
testing/talos/talos/mainthreadio.py
1
5541
# -*- Mode: python; tab-width: 8; indent-tabs-mode: nil -*- # vim: set ts=8 sts=4 et sw=4 tw=80: # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import os import utils ...
mpl-2.0
3,836,834,524,344,885,000
34.06962
79
0.507851
false
3.969198
false
false
false
elbeardmorez/quodlibet
quodlibet/quodlibet/ext/events/iradiolog.py
1
1277
# -*- coding: utf-8 -*- # Copyright 2006 Joe Wreschnig # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. from quodlibet...
gpl-2.0
-5,624,163,564,637,453,000
31.74359
74
0.631167
false
4.079872
false
false
false
icoxfog417/pykintone
pykintone/application_settings/general_settings.py
1
1816
import pykintone.structure as ps from pykintone.application_settings.base_administration_api import BaseAdministrationAPI import pykintone.application_settings.setting_result as sr class GeneralSettingsAPI(BaseAdministrationAPI): API_ROOT = "https://{0}.cybozu.com/k/v1{1}/app/settings.json" def __init__(self...
apache-2.0
-5,686,781,153,414,757,000
32.62963
94
0.616189
false
3.59604
false
false
false
cloudbase/nova-virtualbox
nova/api/openstack/compute/plugins/v3/servers.py
1
49282
# Copyright 2010 OpenStack Foundation # Copyright 2011 Piston Cloud Computing, 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.apach...
apache-2.0
-4,313,281,383,121,071,000
43.119964
79
0.58983
false
4.59463
false
false
false
zyantific/IDASkins
plugins/idaskins/themeselector.py
1
3976
from __future__ import absolute_import, division, print_function import json import os import idaapi from idaskins import THEMES_DIR, UI_DIR from idaskins.objectinspector import ObjectInspector from idaskins.thememanifest import ManifestError, ThemeManifest from PyQt5 import uic from PyQt5.QtCore import Qt from PyQt5...
mit
1,388,974,520,345,956,400
30.307087
74
0.600352
false
3.879024
false
false
false
TQRG/physalia
physalia/utils/monsoon.py
1
1143
"""Module with util functions to use with Monsoon.""" import usb.core from math import isclose from Monsoon import Operations import click def _device_matcher(device): """Check if device is monsoon. Method copied from official Monsoon API. """ # pylint: disable=bare-except try: return dev...
mit
-4,251,350,282,491,658,000
32.617647
103
0.703412
false
3.59434
false
false
false
alephnullplex/mmdb
mmdb/settings.py
1
3188
""" Django settings for mmdb project. Generated by 'django-admin startproject' using Django 1.8.1. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build paths i...
mit
-4,423,116,664,178,087,000
24.918699
118
0.687265
false
3.384289
false
false
false
florianpirchner/nndesigner
org.eclipse.athene.nn.model/python/test_nodes_mergeNodes.py
1
1106
from tensorflow.contrib.keras.api.keras.layers import Conv2D, MaxPooling2D, Flatten from tensorflow.contrib.keras.api.keras.layers import Input, LSTM, Embedding, Dense, concatenate from tensorflow.contrib.keras.api.keras.layers import Input, LSTM, Embedding, Dense, concatenate, Add #from keras.layers import Conv2D, Max...
epl-1.0
1,678,182,526,708,775,000
34.677419
101
0.72604
false
3.178161
false
false
false
NLeSC/pyxenon
xenon/compat.py
1
1807
""" Define cross-platform methods. """ from pathlib import Path import logging import subprocess import os import sys import site import signal from .create_keys import create_self_signed_cert from .version import xenon_grpc_version def find_xenon_grpc_jar(): """Find the Xenon-GRPC jar-file, windows version."""...
apache-2.0
1,734,724,604,722,553,600
23.753425
75
0.605423
false
3.657895
false
false
false
rapilabs/django-db-constraints
django_db_constraints/autodetector.py
1
2101
from django.db.migrations import operations from django.db.migrations.autodetector import MigrationAutodetector from .operations import AlterConstraints class MigrationAutodetectorWithDbConstraints(MigrationAutodetector): db_constraints_operations = [] def generate_created_models(self, *args, **kwargs): ...
mit
-5,550,860,368,678,752,000
43.702128
107
0.611138
false
4.349896
false
false
false
rsm5139/learning-bowtie
build/src/server.py
1
10189
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import traceback from functools import wraps from builtins import bytes import click import msgpack import flask from flask import Flask, render_template, copy_current_request_context from flask import request, Response from flask_socketio import Sock...
mit
-6,304,443,163,228,809,000
31.867742
161
0.57248
false
3.435266
false
false
false
karec/extrapypi
extrapypi/models/package.py
1
1284
import datetime from pkg_resources import parse_version from extrapypi.extensions import db package_maintainers = db.Table( 'package_maintainers', db.Column('package_id', db.Integer, db.ForeignKey('package.id', name='_fk_package_maintainers_package')), db.Column('user_id', db.Integer, db.ForeignKey('user...
mit
6,965,193,574,589,484,000
31.923077
109
0.672118
false
3.710983
false
false
false
jiajiax/crosswalk-test-suite
stability/stability-embeddingapi-android-tests/inst.apk.py
1
3492
#!/usr/bin/env python import os import shutil import glob import time import sys import subprocess from optparse import OptionParser, make_option SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) PARAMETERS = None ADB_CMD = "adb" def doCMD(cmd): # Do not need handle timeout in this short script, let tool...
bsd-3-clause
-7,293,157,340,284,342,000
30.178571
92
0.52921
false
3.941309
false
false
false
sleibrock/discord-bots
junkyard/hacker-bot.py
1
16271
#!/usr/bin/env python #-*- coding: utf-8 -*- """ Hacker bot Designed as a way to interact with the host machine Also comes with a Lis.py interpreter (thanks Peter Norvig) Requires: cowsay, screenfetch, cowfortune """ from botinfo import * from bs4 import BeautifulSoup as BS from requests import get as re_get from ra...
mit
-9,011,880,900,304,550,000
33.916309
105
0.545633
false
3.458236
false
false
false
yephper/django
tests/fixtures/tests.py
1
81690
<<<<<<< HEAD from __future__ import unicode_literals import os import sys import tempfile import unittest import warnings from django.apps import apps from django.contrib.sites.models import Site from django.core import management from django.core.files.temp import NamedTemporaryFile from django.core.mana...
bsd-3-clause
-7,300,563,850,230,031,000
54.83931
117
0.586082
false
3.98177
true
false
false
wikimedia/analytics-user-metrics
user_metrics/api/engine/request_manager.py
1
18101
""" This module implements the request manager functionality. Job Queue and Processing ^^^^^^^^^^^^^^^^^^^^^^^^ As requests are issued via http to the API a process queue will store all active jobs. Processes will be created and assume one of the following states throughout their existence: ::...
bsd-3-clause
-8,343,050,285,931,087,000
36.244856
82
0.540081
false
4.403065
false
false
false
waveFrontSet/box_management
config/wsgi.py
1
1714
""" WSGI config for box_management project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICA...
mit
5,159,017,453,702,388,000
46.611111
79
0.790548
false
4.242574
true
false
false
jaumemarti/l10n-spain-txerpa
l10n_es_payment_order/wizard/csb32.py
1
10991
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2006 ACYSOS S.L. (http://acysos.com) # Pedro Tarrafeta <pedro@acysos.com> # Copyright (c) 2008 Pablo Rocandio. All Rights Res...
agpl-3.0
6,699,676,158,848,605,000
39.821561
79
0.519169
false
3.43049
true
false
false
itstriz/chicago_bus_equity
download_stops.py
1
2860
#!env/bin/python import csv, os, urllib2 import xml.etree.ElementTree as ET from app import db from app.models import Route, Stop from bs4 import BeautifulSoup from config_local import STOPS_FILE from zipfile import ZipFile # Define URLs and file name url = 'https://data.cityofchicago.org/download/84eu-buny/applicatio...
gpl-2.0
1,675,823,052,416,249,300
29.425532
73
0.573776
false
3.685567
false
false
false
ross128/stg
ships/migrations/0005_add_ship_cargo.py
1
1089
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from goods.models import Stock def insertDefaultCargoIDs(apps, schema_editor): """inserts the default stock IDs for the newly created OneToOneField""" Ship = apps.get_model("ships", "Ship") for ship in...
gpl-3.0
2,214,675,344,242,729,700
28.432432
92
0.606061
false
3.96
false
false
false
Spike96/Python_Training_
fixture/application.py
1
1045
from selenium import webdriver from fixture.session import SessionHelper from fixture.group import GroupHelper from fixture.users import UsersHelper class Application: def __init__(self, browser, base_url): if browser == "firefox": self.wd = webdriver.Firefox() elif browser == "chrome...
apache-2.0
1,959,849,266,787,313,200
27.243243
80
0.596172
false
4.282787
false
false
false
Nateowami/flex-languagedepot-metadata
src/createDb.py
1
3005
#!/usr/bin/python3 from LanguageDepotAnalyze import getListOfCapabilities from importlib import import_module # in this file, we write a SQL script which will create the database. # the script will take this format: # # -- create schemas # CREATE SCHEMA project; # # -- set search path # SET search_path TO project,publi...
mit
-8,978,644,242,884,128,000
35.204819
79
0.623295
false
4.105191
false
false
false
partofthething/home-assistant
homeassistant/components/mobile_app/http_api.py
1
3847
"""Provides an HTTP API for mobile_app.""" import secrets from typing import Dict from aiohttp.web import Request, Response import emoji from nacl.secret import SecretBox import voluptuous as vol from homeassistant.components.http import HomeAssistantView from homeassistant.components.http.data_validator import Reque...
mit
1,513,010,812,742,371,000
33.044248
82
0.606447
false
3.949692
false
false
false
udacity/gae-discourse-sso
example.py
1
1068
""" Example usage for using DiscourseSSOHandler: - set SSO_SECRET to the same value as sso_secret from the Discourse settings - setup DISCOURSE_URL - set enable_sso in Discourse and set sso_url to http://localhost:8080/ """ import sys sys.path.insert(0, '..') import discourse_sso from google.appengine.api import user...
apache-2.0
-4,249,812,954,010,984,000
26.384615
94
0.674157
false
3.490196
false
false
false