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
lbeltrame/danbooru-client
danbooru/danbooru_client.py
1
2301
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2009 Luca Beltrame <einar@heavensinferno.net> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, under # version 2 of the License, or (at your option) any later version. # # ...
gpl-2.0
-7,075,997,460,315,860,000
33.863636
80
0.70013
false
3.444611
false
false
false
Linaro/lava-dispatcher
lava_dispatcher/actions/deploy/nfs.py
1
3691
# Copyright (C) 2016 Linaro Limited # # Author: Dean Arnold <dean.arnold@linaro.org> # # This file is part of LAVA Dispatcher. # # LAVA Dispatcher 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...
gpl-2.0
-3,845,439,869,651,443,000
39.119565
97
0.701436
false
4.056044
false
false
false
JudoWill/ResearchNotebooks
HIVCpG.py
1
5742
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <codecell> from __future__ import division import os, os.path import sys sys.path.append('/home/will/PySeqUtils/') from collections import Counter os.chdir('/home/will/HIVCpG/') from GeneralSeqTools import fasta_reader # <codecell> from itertools import izip, tee...
mit
-3,894,949,565,167,344,600
27.425743
109
0.608847
false
2.818851
false
false
false
mattkenney/feedsqueeze
feeds.py
1
11864
# # Copyright 2011 Matt Kenney # # This file is part of Feedsqueeze. # # Feedsqueeze 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 3 of the License, or (at your option) any # later vers...
agpl-3.0
3,632,261,670,705,047,600
36.308176
225
0.584204
false
4.162807
false
false
false
Deathsbreed/CoinToss
src/CoinToss.py
1
3924
### # CoinToss, a probability simulator. # Copyright (C) 2014 Nicolas A. Ortega # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License or # (at your option) any later...
gpl-3.0
-2,271,996,259,011,360,500
30.142857
95
0.730632
false
3.36824
false
false
false
trustyou/meetups
pydata/tasks/crawl.py
1
1203
""" Scrapy crawl commands, wrapped in Luigi tasks. """ import os import os.path import subprocess import luigi class CrawlTask(luigi.Task): """ Crawl a specific city. """ city = luigi.Parameter() def output(self): output_path = os.path.join("data", "{}.jsonl".format(self.city)) return luigi.LocalTarget(...
mit
1,939,915,884,518,402,800
27.642857
131
0.685786
false
2.977723
false
false
false
caseyrollins/osf.io
website/project/views/contributor.py
1
34339
# -*- coding: utf-8 -*- import httplib as http from flask import request from django.core.exceptions import ValidationError from framework import forms, status from framework.auth import cas from framework.auth.core import get_user, generate_verification_key from framework.auth.decorators import block_bing_preview, ...
apache-2.0
-5,865,862,233,408,355,000
38.065984
141
0.64568
false
4.067638
false
false
false
sigita42/vagrant-postgres-osm
Code/connectingLines.py
1
7343
from math import sqrt # Select the active layer. mylayer = iface.activeLayer() # List of all start-points and end-points of all line segments and their id startEndPoints = [] for feature in mylayer.getFeatures(): xy = feature.geometry().asPolyline() startEndPoints.append({"line": (xy[0], xy[-1]), "id": featu...
mit
7,870,846,277,306,963,000
38.907609
125
0.646738
false
3.439344
false
false
false
nuxleus/cherokee-webserver
admin/market/Distro.py
1
4186
# -*- coding: utf-8 -*- # # Cherokee-admin # # Authors: # Alvaro Lopez Ortega <alvaro@alobbs.com> # # Copyright (C) 2001-2011 Alvaro Lopez Ortega # # This program is free software; you can redistribute it and/or # modify it under the terms of version 2 of the GNU General Public # License as published by the Free S...
gpl-2.0
787,887,036,080,964,400
24.065868
81
0.595557
false
3.574722
false
false
false
on-three/weeabot
weeabot/hikaritv.py
1
7303
# vim: set ts=2 expandtab: # -*- coding: utf-8 -*- """ Module: hikaritv.py Desc: Hikari tv service channel info Author: on_three Email: on.three.email@gmail.com DATE: Sat, September 6th 2014 """ CHANNEL_LIST = {} class Channel(object): def __init__(self, name, number, jname, desc, tuner, aliases=...
mit
646,073,837,880,905,200
50.965812
127
0.610618
false
1.896847
false
false
false
whardier/AMIty
amity/client.py
1
24696
#!/usr/bin/env python # #Copyright (c) 2012 Shane R. Spencer # #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...
mit
5,105,617,550,143,307,000
32.783858
336
0.586775
false
4.271925
false
false
false
SublimeHaskell/SublimeHaskell
fly_check.py
1
7654
import threading import time import sublime import sublime_plugin import SublimeHaskell.autocomplete as Autocomplete import SublimeHaskell.event_common as EventCommon import SublimeHaskell.internals.backend_mgr as BackendManager import SublimeHaskell.internals.settings as Settings import SublimeHaskell.internals.util...
mit
-9,015,188,472,483,488,000
35.62201
125
0.579044
false
3.994781
false
false
false
cs251-eclipse/EclipseOJ
EclipseOJ/discuss/views.py
1
3211
from django.shortcuts import render, redirect from .models import Post, Comment from .forms import PostForm, CommentForm from django.template.context_processors import csrf from django.utils import timezone def discuss_index(request): """ Display all the discussion threads present in the server. The are put se...
mit
5,184,976,241,893,435,000
33.526882
151
0.633136
false
3.98882
false
false
false
filipenegrao/glyphsapp-scripts
in_progress/log_file_font.py
1
2459
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import os import json from datetime import datetime FONT = Glyphs.font FONTPATH = FONT.filepath NOW = datetime.now() TODAY = '%d-%d-%d' % (NOW.year, NOW.month, NOW.day) CURRENTFOLDER = os.path.dirname(FONTPATH) ONELEVELDOWN = os.p...
apache-2.0
-20,044,706,589,115,780
22.419048
84
0.583977
false
3.039555
false
false
false
OpenTouch/vsphere-client
src/vsphere/tasks.py
1
1842
from pyVmomi import vim from pyVmomi import vmodl def WaitForTasks(service, tasks): ''' Given the service instance and tasks, it returns after all the tasks are complete ''' pc = service.content.propertyCollector taskList = [str(task) for task in tasks] # Create filter objSpecs = [vm...
apache-2.0
-386,874,713,321,558,800
35.117647
94
0.543431
false
4.772021
false
false
false
aristanetworks/arista-ovs-nova
nova/virt/libvirt/imagebackend.py
1
11111
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Grid Dynamics # 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/l...
apache-2.0
9,218,212,727,396,753,000
36.285235
78
0.590406
false
4.043304
false
false
false
linux4kix/Record.activity
recorded.py
1
6789
#Copyright (c) 2008, Media Modifications Ltd. #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, merge, publish,...
mit
-810,221,824,141,829,100
38.248555
145
0.645161
false
4.391332
false
false
false
MerlijnWajer/lewd
src/spiscreen.py
1
1614
""" This file is part of the LEd Wall Daemon (lewd) project Copyright (c) 2009-2012 by ``brainsmoke'' and Merlijn Wajer (``Wizzup'') lewd 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
-5,024,680,735,393,749,000
31.28
87
0.672862
false
3.659864
false
false
false
iotile/coretools
iotilesensorgraph/iotile/sg/parser/statements/when_block.py
1
3730
"""Blocks that execute when someone is connected.""" from .statement import SensorGraphStatement from ...known_constants import user_connected, user_disconnected from ...node import InputTrigger from ...stream import DataStream from ..scopes import GatedClockScope class WhenBlock(SensorGraphStatement): """A bloc...
gpl-3.0
-652,851,651,929,830,500
45.625
172
0.67185
false
4.205186
false
false
false
aldencolerain/boringmanclan
project/migrations/0002_profile_reservation.py
1
1293
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings from django.utils.timezone import utc import datetime class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL...
mit
-6,545,025,830,433,613,000
35.942857
123
0.593968
false
4.295681
false
false
false
duelafn/python-jinja2-apci
jinja2_apci/require.py
1
3207
# -*- coding: utf-8 -*- """ Jinja extension which provides "require" statement The `require` statement will `include` a template only if it has not been previously required (aka, "include once"). Unlike the jinja `import` statement, `require` allows the included template to contain content, not just macros. We use thi...
lgpl-3.0
3,407,615,309,667,528,000
41.197368
81
0.680387
false
4.264628
false
false
false
SlashRoot/WHAT
what_apps/commerce/models.py
1
19774
from django.db import models from django.db.models import Sum, Variance from django.core.exceptions import ValidationError from what_apps.utility.models import GenericPartyForeignKey ''' This app covers three major types of knowledge: 1. What: The stuff we buy and sell. 2. How: The terms and occasions under which we...
mit
-2,084,500,578,838,618,400
35.217949
170
0.630677
false
4.057037
false
false
false
Kediel/BHP
Ch. 3/sniffer_ip_header_decode.py
1
1850
import socket import os import struct from ctypes import * # Host to listen on, (change as needed) host = "0.0.0.0" # Our IP header class IP(Structure): _fields_ = [ ("ihl", c_ubyte, 4), ("version", c_ubyte, 4), ("tos", c_ubyte), ("len", c_ushort), ("id", c_ushort), ("offset", c_ushort), ("ttl", c_ubyte)...
mit
7,438,574,181,705,547,000
23.666667
98
0.679459
false
2.696793
false
false
false
tbentropy/tilecutter
tcp.py
1
7669
# coding: UTF-8 # # TileCutter - .tcp file reading/writing functions # # Copyright © 2011 Timothy Baldock. All Rights Reserved. import logger debug = logger.Log() import sys, os, traceback import pickle import json import tcproject import project import config config = config.Config() class tcp_writer(object): ...
bsd-3-clause
-6,143,976,582,416,560,000
40.225806
132
0.564424
false
4.248199
false
false
false
patyoon/predict_applied
regression/utils.py
1
12028
from MySQLdb import escape_string from optparse import OptionParser import sys import pickle, os from math import sqrt from scipy.sparse import coo_matrix, csr_matrix, lil_matrix from numpy import zeros, array, matrix import numpy as np import datetime, random from collections import Counter import heapq, operator #s...
gpl-2.0
5,484,115,550,030,509,000
47.696356
93
0.518374
false
3.84896
false
false
false
JD-P/misc-scripts
binary_search.py
1
1719
# Binary search a tuple/array of integers according to a list of numbers given # on the command line. import argparse import re import math def main(): parser = argparse.ArgumentParser() parser.add_argument( "csv_list", default=(0,1,2,3,4,5,6,7,8,9,10), help="A comma seperated list of...
bsd-3-clause
-8,160,397,688,528,940,000
30.254545
79
0.574171
false
4.162228
false
false
false
makism/dyfunconn
dyconnmap/cluster/mng.py
1
5085
# -*- coding: utf-8 -*- """ Merge Neural Gas Merge Neural Gas (MNG) [Strickert2003]_ is similar to the original Neural Gas algorithm, but each node, has an additional context vector (:math:`c`) associated; and the best matching unit is determined by a linear combination of both the weight and context vector (thus the ...
bsd-3-clause
-5,872,890,771,141,401,000
29.806061
179
0.571119
false
3.298507
false
false
false
bitcraze/crazyflie-firmware
examples/app_appchannel_test/tools/appchannelTest.py
1
4043
# -*- coding: utf-8 -*- # # || ____ _ __ # +------+ / __ )(_) /_______________ _____ ___ # | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \ # +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/ # || || /_____/_/\__/\___/_/ \__,_/ /___/\___/ # # Copyright (C) 2014 Bitcraze AB # # Cr...
gpl-3.0
7,206,034,029,612,169,000
33.555556
83
0.622558
false
3.500433
false
false
false
taniaka/lingwars-games
appweb/engine/views.py
1
3256
from __future__ import division from __future__ import absolute_import from django.views.generic import DetailView, TemplateView from django.core.urlresolvers import reverse from django.utils import timezone from django.db.models import Sum, F, FloatField from django.shortcuts import redirect from django.contrib.auth ...
gpl-2.0
7,580,475,964,933,480,000
38.707317
204
0.662469
false
3.808187
false
false
false
Transkribus/TranskribusDU
TranskribusDU/tasks/DU_split_collection.py
1
4225
# -*- coding: utf-8 -*- """ DU task: split a collection in N equal parts, at random Copyright Xerox(C) 2019 Jean-Luc Meunier Developed for the EU project READ. The READ project has received funding from the European Union's Horizon 2020 research and innovation programme under g...
bsd-3-clause
5,425,674,053,884,858,000
30.066176
94
0.571124
false
3.385417
false
false
false
ctuning/ck-env
package/dataset-coco-preprocessed-using-opencv/preprocess_image_dataset.py
1
4847
#!/usr/bin/env python3 supported_extensions = ['jpeg', 'jpg', 'gif', 'png'] import errno import os import json import numpy as np import cv2 # Load and preprocess image def load_image(image_path, # Full path to processing image target_size, # Desired size of resulting image ...
bsd-3-clause
-7,654,114,512,817,520,000
38.08871
173
0.615845
false
3.734206
false
false
false
redhat-openstack/python-openstackclient
openstackclient/identity/v2_0/catalog.py
1
3147
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distrib...
apache-2.0
2,654,443,084,731,837,000
31.78125
77
0.579282
false
4.258457
false
false
false
laiji/tb_search
modules/downpic.py
1
5552
# -*- coding:utf-8 -*- import wx,time,threading,os import urllib2,re from urlparse import urlparse from tbsearch import TbSearch import sys reload(sys) sys.setdefaultencoding('utf-8') class Create(): def __init__(self,panel): self.topframe=panel.GetGrandParent() self.draw_Boxsizer(panel) def Run(self,evt): val...
gpl-2.0
-1,693,356,314,666,772,500
29.804734
104
0.667115
false
2.279335
false
false
false
gurubert/python-inotify
setup.py
1
1482
#!/usr/bin/env python import distutils.core import distutils.util try: from distutils.command.build_py import build_py_2to3 \ as build_py except ImportError: from distutils.command.build_py import build_py platform = distutils.util.get_platform() if not platform.startswith('linux'): raise Excep...
lgpl-2.1
-2,956,468,533,631,656,400
31.933333
84
0.58502
false
4.258621
false
true
false
otapliger/defold-api
defold/createdocset.py
1
5836
#!/usr/bin/env python3 from urllib.request import urlopen from subprocess import call import os import re import sys import json import shutil import urllib import sqlite3 import zipfile import string # path definitions REF_PATH = "ref" JSON_PATH = "json" # filenames definitions DOC_ZIP = "refdoc.zip" DB_FILE = "doc...
mit
6,139,007,695,816,343,000
33.738095
249
0.588245
false
3.081309
false
false
false
asipto/kamcli
kamcli/commands/cmd_pstrap.py
1
2324
import click import os import subprocess import json import datetime from kamcli.cli import pass_context from kamcli.iorpc import command_ctl @click.command( "pstrap", short_help="Store runtime details and gdb full backtrace for all Kamailio processes to a file", ) @click.option( "all", "--all", "...
gpl-2.0
6,345,361,868,267,405,000
26.341176
126
0.45654
false
3.8798
false
false
false
anderspitman/scikit-bio
skbio/util/_misc.py
1
11315
# ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # --------------------------------------------...
bsd-3-clause
-3,580,195,774,480,761,000
27.938619
79
0.574812
false
3.900379
false
false
false
reidlindsay/wins
sandbox/experiments/p2p/thesis/parse-per.py
1
6510
#! /usr/bin/env python """ Parse PER data from trace files. Revision Info ============= * $LastChangedBy: mandke $ * $LastChangedDate: 2011-10-19 15:19:51 -0500 (Wed, 19 Oct 2011) $ * $LastChangedRevision: 5216 $ :author: Ketan Mandke <kmandke@mail.utexas.edu> :copyright: Copyright 2009-2011 The University of ...
apache-2.0
-8,490,964,170,456,833,000
34.380435
83
0.554224
false
3.688385
false
false
false
tedlaz/pyted
tests/meta_manager/ui_fmeta_main2.py
1
3528
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '/home/tedlaz/python_work/meta_manager/fmeta_main2.ui' # # Created by: PyQt4 UI code generator 4.11.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 exce...
gpl-3.0
5,779,897,397,412,480,000
45.328947
107
0.699517
false
3.894912
false
false
false
shub0/algorithm-data-structure
python/range_sum.py
1
1720
''' Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. The update(i, val) function modifies nums by updating the element at index i to val. Example: Given nums = [1, 3, 5] sumRange(0, 2) -> 9 update(1, 2) sumRange(0, 2) -> 8 ''' class NumArray(object): def __ini...
bsd-3-clause
-385,557,278,922,065,700
28.62069
101
0.591385
false
3.49187
false
false
false
eosW/CMPE264
P2/src/calibration.py
1
2620
import numpy as np import cv2 import glob def calibration(): # termination criteria criteria = (cv2.TERM_CRITERIA_EPS + cv2.TERM_CRITERIA_MAX_ITER, 30, 0.001) # prepare object points, like (0,0,0), (1,0,0), (2,0,0) ....,(6,5,0) objp = np.zeros((6*9,3), np.float32) objp[:,:2] = np.mgrid[0:9,0:6].T....
mit
2,121,365,206,537,194,500
31.7625
104
0.608779
false
2.775424
false
false
false
lorenanicole/almost_funded
almostfunded/local_settings.py
1
3851
""" Django settings for untitled1 project. Generated by 'django-admin startproject' using Django 1.8.3. 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 pa...
mit
-1,628,201,997,817,143,300
26.705036
89
0.669177
false
3.423111
false
false
false
jgyates/genmon
gensms_modem.py
1
6878
#!/usr/bin/env python #------------------------------------------------------------------------------- # FILE: gensms_modem.py # PURPOSE: genmon.py support program to allow SMS (txt messages) # to be sent when the generator status changes. This program uses # an expansion card to send SMS messages via cellular. # A...
gpl-2.0
7,641,227,349,803,116,000
32.55122
113
0.481681
false
4.803073
false
false
false
daicang/Leetcode-solutions
764-largest-plus-sign.py
1
1491
class Solution(object): def orderOfLargestPlusSign(self, N, mines): """ :type N: int :type mines: List[List[int]] :rtype: int """ orders = [] zero_positions = set((tuple(m) for m in mines)) max_order = 0 for _ in range(N): orders.ap...
mit
5,555,387,117,194,240,000
27.673077
63
0.424547
false
3.944444
false
false
false
nospotfer/livre
LIvRE/WIN/_data/myDataset/extractParseDataset.py
1
3005
import sys, string, os, datetime, time, glob, subprocess, re, fnmatch #Windows version (slashes = / ) def parallelCommands(cmds, numThreads): if not cmds: return # empty list def done(p): return p.poll() is not None def success(p): return p.returncode == 0; def fail(): sys.exit(...
gpl-3.0
1,316,182,597,613,841,000
32.764045
143
0.666223
false
3.56465
false
false
false
bhermanmit/openmc
openmc/data/data.py
1
10221
import itertools import os import re # Isotopic abundances from Meija J, Coplen T B, et al, "Isotopic compositions # of the elements 2013 (IUPAC Technical Report)", Pure. Appl. Chem. 88 (3), # pp. 293-306 (2013). The "representative isotopic abundance" values from # column 9 are used except where an interval is given...
mit
6,114,708,538,174,366,000
44.629464
81
0.532629
false
2.317687
false
false
false
DmZ/ajenti
ajenti/plugins/core/root.py
1
7800
import re import platform from ajenti.ui import UI from ajenti.com import * from ajenti import version from ajenti.api import ICategoryProvider, EventProcessor, SessionPlugin, event, URLHandler, url, get_environment_vars from ajenti.ui import BasicTemplate from ajenti.utils import ConfigurationError from api import IP...
lgpl-3.0
5,793,393,126,775,049,000
34.454545
117
0.520897
false
4.204852
false
false
false
mkukielka/oddt
oddt/docking/GeneticAlgorithm.py
1
4771
from __future__ import division, print_function from itertools import combinations import numpy as np from joblib import Parallel, delayed from oddt.docking.internal import generate_rotor_vector from oddt import random_seed class GeneticAlgorithm(object): def __init__(self, engine, n_population=100, n_generations...
bsd-3-clause
-2,747,617,749,683,166,700
38.758333
111
0.657514
false
4.421687
false
false
false
astrobin/astrobin
astrobin_apps_iotd/api/views/dismissed_image_view_set.py
1
1522
# -*- coding: utf-8 -*- from __future__ import unicode_literals from datetime import datetime, timedelta from django.conf import settings from django.core.exceptions import ValidationError from django.http import HttpResponseForbidden from djangorestframework_camel_case.render import CamelCaseJSONRenderer from rest_f...
agpl-3.0
-5,807,959,650,690,274,000
37.05
98
0.736531
false
3.953247
false
false
false
Aloomaio/googleads-python-lib
examples/ad_manager/v201811/native_style_service/get_all_native_styles.py
1
1863
#!/usr/bin/env python # # Copyright 2017 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 requir...
apache-2.0
-857,157,496,255,707,500
35.529412
74
0.703704
false
4.234091
false
false
false
aldeka/oppia
extensions/widgets/interactive/MusicNotesInput/MusicNotesInput.py
1
1538
from core.domain import widget_domain from extensions.value_generators.models import generators class MusicNotesInput(widget_domain.BaseWidget): """Definition of a widget. Do NOT make any changes to this widget definition while the Oppia app is running, otherwise things will break. This class repres...
apache-2.0
5,120,536,055,611,308,000
32.434783
79
0.658648
false
4.457971
false
false
false
tdlong/YeastRobot
UserPrograms/ASE/Mon_ToBeads_3.py
1
2655
import sys # where RobotControl.py, etc lives sys.path.append('/home/pi/Desktop/ADL/YeastRobot/PythonLibrary') from RobotControl import * ################################# ### Define Deck Layout ################################# deck="""\ DW96P DW96P DW96W DW96W BLANK DW96P DW96P DW96W DW96W BLANK DW96P DW...
gpl-3.0
1,262,072,979,018,115,600
31.378049
84
0.674953
false
2.777197
false
false
false
akrherz/iem
htdocs/json/vtec_emergencies.py
1
2443
"""Listing of VTEC emergencies""" import json import memcache import psycopg2.extras from paste.request import parse_formvars from pyiem.util import get_dbconn, html_escape ISO9660 = "%Y-%m-%dT%H:%M:%SZ" def run(): """Generate data.""" pgconn = get_dbconn("postgis") cursor = pgconn.cursor(cursor_factory...
mit
9,000,021,183,170,090,000
29.5375
77
0.555055
false
3.515108
false
false
false
opensignal/airflow
airflow/bin/cli.py
1
25070
#!/usr/bin/env python from __future__ import print_function import logging import os import subprocess import textwrap import warnings from datetime import datetime import argparse from builtins import input from collections import namedtuple from dateutil.parser import parse as parsedate import json import airflow f...
apache-2.0
8,212,946,903,933,336,000
33.20191
89
0.533546
false
3.88863
false
false
false
rahulunair/cloudFinal
analysis.py
1
20326
import matplotlib.pyplot as plt import numpy as np import pandas as pd import codecs import os import re import csv import os #import census from us import states from collections import defaultdict from pandas import * from math import floor from itertools import islice from pylab import figure, show, savefig from pyl...
mit
4,007,875,639,670,961,700
32.430921
231
0.653744
false
3.181406
false
false
false
juanjetomas/ProyectoIV
rango/forms.py
1
1511
from django import forms from rango.models import Bares, Tapas class BaresForm(forms.ModelForm): nombre = forms.CharField(max_length=128, help_text="Introduzca el nombre del bar.") visitas = forms.IntegerField(widget=forms.HiddenInput(), initial=0) direccion = forms.CharField(max_length=128, help_text="Int...
gpl-3.0
-5,148,140,201,637,137,000
44.787879
90
0.682991
false
3.835025
false
false
false
xR86/ml-stuff
data-engineering/labs-concurrent-distributed-programming/b_pub_c.py
1
1284
import datetime as dt import time import sys import zmq from utils import convert_size, dump_to_csv, parseSize, row_print, utf8len def zeromq_client(lim='10 MB', rounds = 0): context = zmq.Context() publisher = context.socket(zmq.PUB) publisher.bind("tcp://*:5563") cnt = 0 running_bytes = 0 client_start =...
mit
-4,515,918,561,062,609,000
21.526316
91
0.614486
false
2.859688
false
false
false
peterjanes/dosage
tests/test_comicnames.py
1
1148
# -*- coding: utf-8 -*- # Copyright (C) 2004-2008 Tristan Seligmann and Jonathan Jacobs # Copyright (C) 2012-2014 Bastian Kleineidam # Copyright (C) 2015-2019 Tobias Gruetzmacher from __future__ import absolute_import, division, print_function import re from dosagelib import scraper from dosagelib.plugins import old...
mit
589,214,940,600,312,300
33.787879
74
0.626307
false
3.739414
false
false
false
TheAlgorithms/Python
project_euler/problem_008/sol1.py
1
3172
""" Project Euler Problem 8: https://projecteuler.net/problem=8 Largest product in a series The four adjacent digits in the 1000-digit number that have the greatest product are 9 × 9 × 8 × 9 = 5832. 73167176531330624919225119674426574742355349194934 96983520312774506326239578318016984801869478851843 8586...
mit
5,575,469,441,141,830,000
37.646341
74
0.840644
false
2.616846
false
false
false
google/tangent
tangent/fixes.py
1
4635
# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
apache-2.0
-3,927,075,663,630,656,500
36.08
79
0.670982
false
3.780587
false
false
false
mradway/hycohanz
examples/separate_body.py
1
1244
import hycohanz as hfss raw_input('Press "Enter" to connect to HFSS.>') [oAnsoftApp, oDesktop] = hfss.setup_interface() raw_input('Press "Enter" to create a new project.>') oProject = hfss.new_project(oDesktop) raw_input('Press "Enter" to insert a new DrivenModal design named HFSSDesign1.>') oDesign = hfss.insert...
bsd-2-clause
-3,314,997,260,946,289,000
23.392157
112
0.702572
false
2.635593
false
true
false
samarudge/tilepaper
tilepaper/image.py
1
1108
from PIL import Image as Img from PIL import ImageOps class Image(object): """ Image object """ def __init__(self, filePath): self.file = filePath _f = self.rawFile self.im = Img.open(_f) self.size = self.im.size _f.close() def resize(self, width, height):...
mit
2,989,515,071,387,285,500
21.16
62
0.522563
false
3.743243
false
false
false
TinyOS-Camp/DDEA-DEV
Archive/[14_09_12] DDEA_example_code/data_retrieval (Deokwoo Jung's conflicted copy 2014-07-01).py
1
29769
# -*- coding: utf-8 -*- """ Created on Wed Apr 16 10:56:40 2014 @author: deokwoo """ from __future__ import division # To forace float point division import numpy as np import datetime as dt import shlex, subprocess import mytool as mt import time import retrieve_weather as rw #######################################...
gpl-2.0
397,644,382,112,067,800
47.883415
139
0.515536
false
3.870125
false
false
false
dlu-ch/dlb
src/dlb_contrib/tex.py
1
13048
# SPDX-License-Identifier: LGPL-3.0-or-later # dlb - a Pythonic build tool # Copyright (C) 2020 Daniel Lutz <dlu-ch@users.noreply.github.com> """Typeset documents with TeX and LaTeX implementations based on web2c and kpathsea.""" # TeX: <https://www.tug.org/books/index.html#texbook> # TeX: <https://ctan.org/tex-archi...
gpl-3.0
8,868,056,070,374,658,000
43.838488
116
0.588979
false
3.788618
false
false
false
overminder/YASIR
yasir/rt.py
1
1495
from rpython.rlib import jit from . import pretty class ImmutableEnv(object): _immutable_fields_ = ['_w_slots[*]', '_prev'] def __init__(self, w_values, prev): self._w_slots = w_values self._prev = prev @jit.unroll_safe def at_depth(self, depth): #depth = jit.promote(depth) ...
mit
8,646,681,525,053,986,000
21.651515
61
0.561204
false
3.4447
false
false
false
hpi-xnor/BMXNet
smd_hpi/examples/binary-imagenet1k/common/data.py
1
6566
import mxnet as mx import random from mxnet.io import DataBatch, DataIter import numpy as np def add_data_args(parser): data = parser.add_argument_group('Data', 'the input images') data.add_argument('--data-train', type=str, help='the training data') data.add_argument('--data-val', type=str, help='the vali...
apache-2.0
-4,617,027,826,589,166,000
44.282759
110
0.549954
false
3.645752
false
false
false
fukun07/neural-image-captioning
codes/model/gnic.py
1
3878
import h5py import theano import theano.tensor as T import os.path as osp from layers import split_state, MLP, BasicLSTM, Embedding class Model(object): """ an re-implementation of google NIC system, used as the baseline in our paper """ def __init__(self, name='gnic', nimg=2048, nh=512, nw=512, nout...
mit
-7,912,966,944,251,141,000
33.936937
105
0.548994
false
3.325901
false
false
false
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.2/Lib/pty.py
1
4799
"""Pseudo terminal utilities.""" # Bugs: No signal handling. Doesn't set slave termios and window size. # Only tested on Linux. # See: W. Richard Stevens. 1992. Advanced Programming in the # UNIX Environment. Chapter 19. # Author: Steen Lumholt -- with additions by Guido. from select import select imp...
mit
-5,453,051,703,890,811,000
28.623457
76
0.599708
false
3.544313
false
false
false
GoogleCloudPlatform/python-docs-samples
appengine/flexible/scipy/main.py
1
1668
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
194,983,219,756,093,600
31.076923
74
0.708034
false
3.657895
false
false
false
batermj/algorithm-challenger
code-analysis/programming_anguage/python/source_codes/Python3.8.0/Python-3.8.0/Lib/os.py
1
38881
r"""OS routines for NT or Posix depending on what system we're on. This exports: - all functions from posix or nt, e.g. unlink, stat, etc. - os.path is either posixpath or ntpath - os.name is either 'posix' or 'nt' - os.curdir is a string representing the current directory (always '.') - os.pardir is a strin...
apache-2.0
3,236,350,223,061,495,000
34.027928
95
0.604974
false
4.034136
false
false
false
gulopine/steel
tests/byte/fields.py
1
11856
import io import unittest import steel class IOTest(unittest.TestCase): data = b'\x2a\x42' def setUp(self): self.input = io.BytesIO(b'\x2a\x42') self.output = io.BytesIO() def test_read(self): field = steel.Field(size=2) data = field.read(self.input) ...
bsd-3-clause
1,229,060,494,776,363,300
31.971347
93
0.617746
false
3.564642
true
false
false
yzh89/pyuppaal
setup.py
1
2431
#!/usr/bin/env python # -*- coding: utf-8 -*- ### BEGIN LICENSE # Copyright (C) 2010 Mads Chr. Olesen <mchro@cs.aau.dk> #This program is free software: you can redistribute it and/or modify it #under the terms of the GNU General Public License version 3, as published #by the Free Software Foundation. # #This program ...
gpl-3.0
-4,772,858,423,372,974,000
34.75
98
0.613739
false
3.846519
false
false
false
openstack/manila
manila/share/drivers/dell_emc/plugins/powermax/object_manager.py
1
78764
# Copyright (c) 2016 Dell Inc. or its subsidiaries. # 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 # # ...
apache-2.0
3,031,455,887,448,489,500
37.160853
79
0.520136
false
4.085482
false
false
false
3MFConsortium/lib3mf
SDK/Examples/Python/Lib3MF_Example.py
1
3062
'''++ Copyright (C) 2019 3MF Consortium (Original Author) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditi...
bsd-2-clause
-4,721,533,489,894,230,000
33.022222
108
0.759308
false
3.653938
false
false
false
Spacecraft-Code/SPELL
src/spell/spell/lib/adapter/data.py
1
2279
################################################################################### ## MODULE : spell.lib.adapter.data ## DATE : Mar 18, 2011 ## PROJECT : SPELL ## DESCRIPTION: Hook for the C++ data containers ## -------------------------------------------------------------------------------- ## ## Copyr...
lgpl-3.0
2,993,577,859,560,361,000
36.360656
84
0.456341
false
5.087054
false
false
false
feibl/search-rex
search_rex/recommendations/similarity/item_based.py
1
11806
""" In this module, the similarity classes of the item-based approach are defined. The most important classes are the CombinedRecordSimilarity, the CollaborativeRecordSimilarity and the ContentRecordSimilarity. The first one combines the record similarity values of two underlying item based similarity classes. The seco...
mit
4,519,390,855,535,109,000
36.242902
79
0.660088
false
4.480455
false
false
false
pdroalves/mongodb-secure
src/mongodb-secure/cipher/aes.py
1
2426
########################################################################## ########################################################################## # # mongodb-secure # Copyright (C) 2016, Pedro Alves and Diego Aranha # {pedro.alves, dfaranha}@ic.unicamp.br # This program is free software: you can redistribute it an...
gpl-3.0
138,879,618,357,041,940
37.507937
74
0.538747
false
4.332143
false
false
false
pmaigutyak/mp-shop
offers/models.py
1
1833
from django.conf import settings from django.db import models from django.utils.translation import ugettext_lazy as _ class ProductPriceOffer(models.Model): STATUS_NOT_REVIEWED = 'not_reviewed' STATUS_PROCESSING = 'processing' STATUS_CANCELED = 'canceled' STATUS_COMPLETED = 'completed' STATUS_C...
isc
-8,224,324,022,538,134,000
23.44
55
0.576105
false
4.046358
false
false
false
lewisodriscoll/sasview
src/sas/sascalc/data_util/qsmearing.py
1
8765
""" Handle Q smearing """ ##################################################################### #This software was developed by the University of Tennessee as part of the #Distributed Data Analysis of Neutron Scattering Experiments (DANSE) #project funded by the US National Science Foundation. #See the license tex...
bsd-3-clause
5,650,208,888,709,365,000
33.644269
106
0.595094
false
3.636929
false
false
false
kavigupta/61a-analysis
src/profile.py
1
1114
""" A module that when run performs some sort of profiling test. """ from sys import argv from models import plausible_parameters, RandomSeatingModel, binary_cheater, score_diff_summary from graphics import TerminalProgressBar from evaluations import proc_evaluations from seating_chart import SeatingChart, AdjacencyTy...
gpl-3.0
2,569,469,564,744,725,500
31.764706
98
0.678636
false
3.570513
false
false
false
robotenique/mlAlgorithms
supervised/logRegression/ml.py
1
2753
import numpy as np from matplotlib import pyplot as plt from pandas import Series from mpl_toolkits.mplot3d import axes3d def plotData(X, y): pos = X[np.where(y == 1, True, False).flatten()] neg = X[np.where(y == 0, True, False).flatten()] plt.plot(pos[:, 0], pos[:, 1], 'X', markersize=7, markeredgecolor=...
unlicense
-7,326,098,120,286,980,000
33.848101
109
0.60879
false
3.212369
false
false
false
igor-toga/local-snat
neutron/tests/unit/api/v2/test_base.py
1
67514
# Copyright (c) 2012 OpenStack Foundation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
apache-2.0
4,352,241,565,383,894,000
40.778465
79
0.556151
false
4.032372
true
false
false
GoogleCloudPlatform/bigquery-oreilly-book
08_advqueries/param_named.py
1
1440
#!/usr/bin/env python3 from google.cloud import bigquery def print_query_results(client, station_name, min_duration=0, max_duration=84000): print("{} between {} and {}".format( station_name, min_duration, max_duration)) query = "...
apache-2.0
-2,987,177,498,917,457,000
31.022222
62
0.56875
false
3.902439
false
false
false
gic888/MIEN
spatial/animate.py
1
4382
#!/usr/bin/env python # encoding: utf-8 #Created by gic on 2007-03-02. # Copyright (C) 2007 Graham I Cummins # 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 ...
gpl-2.0
7,994,645,279,098,349,000
27.640523
85
0.670242
false
2.688344
false
false
false
Undeterminant/math-modeling
accum-data.py
1
4502
#!/usr/bin/env python3 from datetime import date from mathmodeling import misc, google, wikipedia from scipy.interpolate import interp1d from scipy.integrate import quad as integ from sys import argv, stdout import subprocess, os, os.path def search_data(row): return (float(row[0]), float(row[1])) def article_data(...
cc0-1.0
-2,991,208,148,207,762,400
25.482353
78
0.660817
false
2.845765
false
false
false
hpbader42/Klampt
Python/demos/robotiqtest.py
1
1383
#!/usr/bin/python import sys from klampt import * from klampt import vis from klampt.vis.glrobotprogram import GLSimulationPlugin import robotiq class MyGLViewer(GLSimulationPlugin): def __init__(self,world): GLSimulationPlugin.__init__(self,world) #Put any controller modules or sensor / actuator...
bsd-3-clause
3,076,636,523,788,696,000
29.065217
74
0.642805
false
3.431762
false
false
false
isaac-philip/loolu
common/django/contrib/auth/views.py
1
7669
from django.conf import settings from django.contrib.auth import REDIRECT_FIELD_NAME from django.contrib.auth.decorators import login_required from django.contrib.auth.forms import AuthenticationForm from django.contrib.auth.forms import PasswordResetForm, SetPasswordForm, PasswordChangeForm from django.contrib.auth.to...
mit
-2,413,951,925,234,066,000
45.198795
123
0.680271
false
4.11427
false
false
false
gitsimon/tq_website
courses/admin_actions.py
1
11978
from django import forms from django.contrib import admin from django.contrib import messages from django.contrib.auth.models import Group from django.http import HttpResponseRedirect from django.shortcuts import render from django.urls import reverse import survey.services as survey_services from courses.models impor...
gpl-2.0
7,599,200,071,472,103,000
32.180055
154
0.698447
false
4.182263
false
false
false
dev-sirius/smart-home-controller
mysite/settings.py
1
3319
""" Django settings for mysite project. Generated by 'django-admin startproject' using Django 1.9.7. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os # ...
apache-2.0
-6,621,611,370,329,119,000
24.530769
91
0.694788
false
3.519618
false
false
false
jmbergmann/yogi
yogi-python/tests/test_logging.py
1
7711
#!/usr/bin/env python3 import sys import os sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)) + '/..') import yogi import unittest import json from test_terminals import AsyncCall from proto import yogi_000009cd_pb2 from proto import yogi_0000...
gpl-3.0
-5,275,413,142,340,691,000
38.142132
108
0.59266
false
3.924173
true
false
false
nbp/git-repo
project.py
1
75056
# Copyright (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
apache-2.0
-4,687,669,108,388,952,000
29.399352
102
0.576116
false
3.786118
true
false
false
chenzeyuczy/keba
src/comment/migrations/0001_initial.py
1
1177
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('lesson', '0001_initial'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] oper...
gpl-2.0
-51,819,269,524,844,250
34.666667
114
0.550552
false
4.375465
false
false
false
xjsender/SublimeApex
salesforce/lib/panel.py
1
2635
import sublime import time class Printer(object): """ Based on printer of Mavensmate """ printers = {} def __init__(self, name): self.name = name self.visible = False @classmethod def get(cls, name, window_id=None): if not window_id: window_id = sublime.active_window(...
mit
6,225,603,825,201,925,000
29.988235
104
0.55467
false
3.873529
false
false
false
CERN/TIGRE
Python/demos/d13_HelicalGeometry.py
1
1854
#%% Demo 13: Helical Geometry tests # # # This demo shows an example of TIGRE working on Helical scan geometries # # -------------------------------------------------------------------------- # -------------------------------------------------------------------------- # This file is part of the TIGRE Toolbox # # Copyri...
bsd-3-clause
6,195,987,530,298,978,000
30.423729
94
0.580906
false
3.408088
false
false
false
hessler/udacity-courses
full_stack_foundations/oauth2/project.py
1
16750
from flask import Flask, render_template, request, redirect,jsonify, url_for, flash, make_response from flask import session as login_session from sqlalchemy import create_engine, asc from sqlalchemy.orm import sessionmaker from database_setup import Base, Restaurant, MenuItem, User from oauth2client.client import f...
mit
-1,152,494,138,517,954,200
39.361446
221
0.671582
false
3.742181
false
false
false
freakboy3742/django
django/db/migrations/executor.py
5
17829
from django.apps.registry import apps as global_apps from django.db import migrations, router from .exceptions import InvalidMigrationPlan from .loader import MigrationLoader from .recorder import MigrationRecorder from .state import ProjectState class MigrationExecutor: """ End-to-end migration execution - ...
bsd-3-clause
-3,054,708,061,266,402,000
46.927419
108
0.592069
false
4.858038
false
false
false
iychoi/syndicate
python/syndicate/util/client.py
1
8001
#!/usr/bin/env python """ Copyright 2015 The Trustees of Princeton University 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 Unle...
apache-2.0
-397,192,300,091,199,500
28.523985
177
0.639795
false
3.70074
true
false
false
sserrot/champion_relationships
venv/Lib/site-packages/zmq/tests/test_context.py
1
12027
# Copyright (C) PyZMQ Developers # Distributed under the terms of the Modified BSD License. import copy import gc import os import sys import time from threading import Thread, Event try: from queue import Queue except ImportError: from Queue import Queue try: from unittest import mock except ImportError: ...
mit
4,540,002,732,955,021,000
29.681122
91
0.559159
false
3.730459
true
false
false
tallstreet/jaikuenginepatch
install/views.py
1
1699
# Copyright 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
1,567,536,841,461,823,500
28.293103
74
0.728664
false
3.93287
false
false
false
chemelnucfin/tensorflow
tensorflow/contrib/tensorrt/python/trt_convert.py
1
1912
# Copyright 2018 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 applica...
apache-2.0
-6,417,453,213,842,576,000
38.020408
79
0.706067
false
3.734375
false
false
false