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
vmalloc/weber-utils
weber_utils/sorting.py
1
1136
import functools from flask import request from sqlalchemy import desc from ._compat import httplib from .request_utils import error_abort def sort_query(query, allowed_fields=(), default=None): allowed_fields = set(allowed_fields) sort_param = request.args.get("sort", None) if sort_param: sort_...
bsd-3-clause
7,020,786,887,805,872,000
28.128205
97
0.639965
false
3.90378
false
false
false
azumimuo/family-xbmc-addon
plugin.video.elysium/resources/lib/sources/tvhd.py
1
3687
import re import urllib import requests import urlparse import json import xbmc import datetime from BeautifulSoup import BeautifulSoup from resources.lib.modules import control from resources.lib.modules import cleantitle from schism_commons import quality_tag, google_tag, parseDOM, replaceHTMLCodes ,cleantitle_get, ...
gpl-2.0
-965,369,262,741,604,500
37.020619
161
0.570654
false
3.370201
false
false
false
kg-bot/SupyBot
plugins/Nag/plugin.py
1
4578
### # Copyright (c) 2006, Jeremy Kelley # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of conditions...
gpl-3.0
6,914,734,440,674,484,000
35.047244
79
0.619484
false
3.853535
false
false
false
jumoconnect/openjumo
jumodjango/miner/web/feed_items_to_hdfs.py
1
3768
#!/usr/bin/env python from crawler import WebCrawler, log import logging import os import hashlib from miner.text.util import strip_control_characters import MySQLdb from MySQLdb import cursors class FeedItemWebCrawler(WebCrawler): temp_outfile_path = '/tmp/feed_items' outfile_base_path = '/tmp/scraped' ...
mit
1,427,092,386,684,347,400
36.68
206
0.565021
false
3.730693
false
false
false
ivan73/smarthome
plugins/logo/__init__.py
1
25174
#!/usr/bin/env python3 # vim: set encoding=utf-8 tabstop=4 softtabstop=4 shiftwidth=4 expandtab ######################################################################### # Copyright 2013 KNX-User-Forum e.V. http://knx-user-forum.de/ ######################################################################### # ...
gpl-3.0
-7,201,690,151,582,514,000
41.863714
139
0.505942
false
3.440115
false
false
false
bendykst/deluge
setup.py
1
12762
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2007 Andrew Resch <andrewresch@gmail.com> # Copyright (C) 2009 Damien Churchill <damoxc@gmail.com> # # This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with # the additional special exception to link portions of t...
gpl-3.0
-5,498,489,755,896,925,000
35.567335
101
0.553205
false
3.627629
true
false
false
pacoqueen/bbinn
framework/caneloni_di_merda.py
1
5754
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys, os, pclases, mx sys.path.append(os.path.join("..", "formularios")) import utils def buscar_rollos_existencias(fecha): """ Devuelve una lista de rollos en almacén hasta (incluida) la fecha dada. """ sqlfecha = fecha.strftime('%Y-%m-%d') ...
gpl-2.0
-8,511,966,171,161,357,000
49.412281
136
0.645206
false
2.727575
false
false
false
openradar/TINT
tint/data_utils.py
1
2323
""" tint.data_utils =============== Tools for obtaining and handling radar data. """ import tempfile from boto.s3.connection import S3Connection from datetime import datetime, timedelta import pyart def read_nexrad_key(key): """ Returns pyart radar object from nexrad S3 key. """ tmp = tempfile.Nam...
bsd-2-clause
7,325,631,350,564,298,000
24.527473
79
0.571675
false
3.276446
false
false
false
jlgoldman/writetogov
util/fips.py
1
3649
import collections FIPSInfo = collections.namedtuple('FIPSInfo', ['name', 'fips_code', 'state_code']) def get_by_fips_code(fips_code): return INFOS_BY_FIPS_CODE.get(fips_code) def get_by_state_code(state_code): return INFOS_BY_STATE_CODE.get(state_code) def get_by_state_name(state_name): return INFOS_B...
bsd-3-clause
-4,896,238,958,976,974,000
40.465909
82
0.373801
false
3.137575
false
false
false
henriquesouza/toply
TestDisplayer.py
1
2569
import gi gi.require_version('Gtk', '3.0') import threading import time from gi.repository import Gtk, Gdk from gi.repository import GObject as GObject from src.view import LyricsDisplayer GObject.threads_init() insta = LyricsDisplayer.LyricsDisplayer() #w = Gtk.Window() w = insta.lyrics_window() #l = Gtk.Label() #w...
gpl-3.0
-7,356,052,563,472,387,000
25.214286
64
0.473336
false
3.5337
false
false
false
prtx/What-I-learned-in-college
Data_Structures/binary_search_tree.py
1
1159
class BST_Node: #initialize binary search tree def __init__(self, item = None, left = None, right = None): self.item = item self.left = left self.right = right #traversals def preorder(self): print self.item if self.left: self.left.inorder() if self.right: self.right.inorder() def inor...
mit
6,766,363,373,799,752,000
17.109375
60
0.637619
false
2.826829
false
false
false
Fermi-Dirac/mathtests
pyggel/event.py
1
12361
""" pyggle.event This library (PYGGEL) is licensed under the LGPL by Matthew Roe and PYGGEL contributors. The event module contains classes to grab and access events. """ from .include import * from . import view import string import time class Keyboard(object): """A simple class to store keyboard e...
mit
4,333,084,738,324,815,000
41.524648
134
0.561443
false
4.193012
false
false
false
beepscore/fibonacci
logging_util.py
1
1709
# https://docs.python.org/3.6/howto/logging.html#logging-basic-tutorial import logging import sys def get_logger(name): """ Log to stream only. Don't add a handler to log to a file. Let program user decide if they want to pipe stream output to a file e.g. python3 fibonacci.py >> ../fib.log ...
mit
-5,289,996,503,089,969,000
35.361702
109
0.686366
false
3.62845
false
false
false
red-hood/calendarserver
txweb2/auth/basic.py
1
2307
# -*- test-case-name: txweb2.test.test_httpauth -*- ## # Copyright (c) 2006-2009 Twisted Matrix Laboratories. # Copyright (c) 2010-2015 Apple Inc. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"),...
apache-2.0
-5,918,398,083,954,525,000
33.432836
80
0.700043
false
4.428023
false
false
false
jctanner/scrapers
scommerce_com.py
1
4085
#!/usr/bin/env python # http://sccommerce.com/sc-industrial-directory import requests import requests_cache from pprint import pprint from bs4 import BeautifulSoup from lib.csvtools import dict_to_csv def main(): # This page has a search form that must be submitted to get the list of companies. # To post da...
apache-2.0
7,518,756,222,598,132,000
32.760331
109
0.578947
false
3.564572
false
false
false
vvovo/vvo
model/follow.py
1
2334
#!/usr/bin/env python # coding=utf-8 # # Copyright 2014 vvovo.com # Very way to victory. # Let the dream set sail. import time from lib.query import Query class FollowModel(Query): def __init__(self, db): self.db = db self.table_name = "follow" super(FollowModel, self).__init__() def ...
bsd-3-clause
-3,800,454,661,387,713,500
43.037736
121
0.60497
false
3.363112
false
false
false
fyookball/electrum
plugins/ledger/auth2fa.py
1
6760
from PyQt5.QtWidgets import * from electroncash.i18n import _ from electroncash_gui.qt.util import * from electroncash.util import print_error from electroncash.address import Address from electroncash import networks import copy from btchip.btchip import BTChipException helpTxt = [_("Your Ledger Wallet wants to te...
mit
8,752,473,746,946,071,000
42.057325
157
0.623817
false
3.714286
false
false
false
rfguri/vimfiles
bundle/ycm/third_party/ycmd/third_party/JediHTTP/vendor/jedi/jedi/evaluate/recursion.py
1
5177
""" Recursions are the recipe of |jedi| to conquer Python code. However, someone must stop recursions going mad. Some settings are here to make |jedi| stop at the right time. You can read more about them :ref:`here <settings-recursion>`. Next to :mod:`jedi.evaluate.cache` this module also makes |jedi| not thread-safe....
mit
-6,030,699,702,884,882,000
31.765823
80
0.610585
false
4.335846
true
false
false
project-fluxo/fluxo
tests/parallel_issue/runscript.py
1
2214
import os import sys #from helpers import modify_prm # include via file link to ../../../tests/helpers.py jobs ={} #SUCCESSFUL! jobs['master_mhd_para'] ={'exec' :'../../build_master_mhd_para/bin/fluxo', 'param':'parameter_mhd.ini'} #jobs['mortarmaster_ns_para'] ={'exec' :'../../build_mortarmaste...
gpl-3.0
-579,302,027,395,322,400
45.125
94
0.542457
false
2.820382
false
false
false
bergercookie/Pump3000
for_keep/final_code/classes_used.py
1
8083
# Thu May 29 02:59:41 EEST 2014, nickkouk # proper division for python 2.7 from __future__ import division # Usual importing stuff for PySide from PySide.QtGui import * from PySide.QtCore import * # Module imports import sys import os from serial.tools.list_ports import comports # Qt-Designer compiled python code ...
bsd-2-clause
-7,641,942,490,556,766,000
32.539419
81
0.599282
false
4.013406
false
false
false
AuthorizeNet/sample-code-python
CustomerProfiles/get-customer-shipping-address.py
1
2245
import os, sys import imp from authorizenet import apicontractsv1 from authorizenet.apicontrollers import * constants = imp.load_source('modulename', 'constants.py') def get_customer_shipping_address(customerProfileId, customerAddressId): # Give merchant details merchantAuth = apicontractsv1.merchantAuthentic...
mit
4,637,220,795,757,887,000
43.019608
99
0.696214
false
4.463221
false
false
false
Tuyki/TT_RNN
MNISTSeq.py
1
14227
__author__ = "Yinchong Yang" __copyright__ = "Siemens AG, 2018" __licencse__ = "MIT" __version__ = "0.1" """ MIT License Copyright (c) 2018 Siemens AG 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 Softwa...
mit
-1,934,170,291,730,638,800
36.330709
120
0.561204
false
3.240602
true
false
false
pycroscopy/pycroscopy
pycroscopy/processing/svd_utils.py
1
20291
# -*- coding: utf-8 -*- """ USID utilities for performing randomized singular value decomposition and reconstructing results Created on Mon Mar 28 09:45:08 2016 @author: Suhas Somnath, Chris Smith """ from __future__ import division, print_function, absolute_import import time from multiprocessing import cpu_count i...
mit
-3,467,547,624,918,847,000
37.799235
118
0.595338
false
3.663297
false
false
false
xe1gyq/nuupxe
modules/aprstracker.py
1
3741
#!/usr/bin/python import ConfigParser import feedparser import logging import os import pywapi import string import sys import time import unicodedata from core.alive import alive from pygeocoder import Geocoder from core.aprsfi import AprsFi from core.voicesynthetizer import VoiceSynthetizer from core.phonetic impo...
apache-2.0
-8,180,707,672,401,468,000
36.41
103
0.578188
false
3.632039
false
false
false
crunchmail/munch-core
src/munch/apps/campaigns/tools.py
1
3004
import urllib from django.urls import get_resolver from django.urls import NoReverseMatch def resolve_url(request, path=None): """Helper function that reports information on the request's url. Taken from http://code.google.com/p/greatlemers-django-tools \ /source/browse/trunk/gdt_nav/models....
agpl-3.0
-9,172,493,371,128,470,000
39.594595
79
0.650466
false
4.45037
false
false
false
rolandwz/pymisc
monitor/once.py
1
1567
# -*- coding: utf-8 -*- import threading, sys from utils.rwlogging import log from notifier import fetion from notifier import mail from category import prices from category import weather from utils import const def weatherMonitor(): try: #msg = '' #msg = msg + weather.fetchWeather() multimsg = [0, 0] multim...
mit
5,838,400,449,689,274,000
20.763889
52
0.670708
false
2.629195
false
false
false
juliojsb/sarviewer
plotters/matplotlib/swap.py
1
2062
#!/usr/bin/env python2 """ Author :Julio Sanz Website :www.elarraydejota.com Email :juliojosesb@gmail.com Description :Script to create a graph about swap usage Dependencies :Python 2.x, matplotlib Usage :python swap.py License :GPLv3 """ import matplotlib matplotlib.use('Agg') im...
gpl-3.0
-1,830,321,414,085,074,400
26.878378
99
0.586324
false
3.363785
false
false
false
annapowellsmith/openpresc
openprescribing/frontend/management/commands/import_practices.py
1
3793
import csv import glob from django.core.management.base import BaseCommand from frontend.models import Practice, PCT class Command(BaseCommand): args = '' help = 'Imports practice data either from epraccur.csv, or from HSCIC ' help += 'address files, depending on options. ' def add_arguments(self, pa...
mit
-25,044,826,727,730,020
32.566372
76
0.509359
false
3.926501
false
false
false
AlexBryner/SalesforceTools
SalesforceScripts.py
1
12737
# coding: utf-8 import numpy as np import pandas as pd import time from datetime import datetime, timedelta, date from time import sleep, gmtime, strftime from pandas import DataFrame, Series, read_csv from salesforce_bulk_api import SalesforceBulkJob from SalesforceBulkQuery import * from simple_salesforce import * ...
mit
1,804,623,741,723,414,500
41.315615
415
0.560493
false
4.142114
false
false
false
milkpku/BetaElephant
policy_experiment/policy.orign/dataset.py
1
7607
#!/usr/bin/python3 #-*-coding:utf-8-*- #$File: dataset.py #$Date: Sat May 7 10:59:24 2016 #$Author: Like Ma <milkpku[at]gmail[dot]com> import copy import random import numpy as np OUT_TYPE = np.float32 class Dataset(object): def __init__(self, path, _type): if _type == 'train': self.__file...
mit
-7,321,292,994,670,105,000
35.859223
120
0.516133
false
3.029928
false
false
false
neurobin/acme-tiny
acme_tiny.py
1
10110
#!/usr/bin/env python import argparse, subprocess, json, os, sys, base64, binascii, time, hashlib, re, copy, textwrap, logging try: from urllib.request import urlopen # Python 3 except ImportError: from urllib2 import urlopen # Python 2 #DEFAULT_CA = "https://acme-staging.api.letsencrypt.org" DEFAULT_CA = "htt...
mit
-540,957,731,992,042,600
46.023256
152
0.602176
false
3.635383
false
false
false
ardeaf/Reddit-Image-Scraper
redditimagescraper/modules/accessreddit.py
1
2567
import time from datetime import datetime import praw import prawcore.exceptions from . import config # Returns a list of urls posted to the subreddit_name between start_date and end_date. # The list is in the form: [url, date_string], [url, date_string], [url, date_string], ... ] def subs_to_download(subreddit_name...
gpl-3.0
50,929,416,389,398,730
37.313433
119
0.593689
false
4.194444
false
false
false
rg3915/spark
spark/selenium/selenium_event.py
1
1303
import time from random import choice, randint from decouple import config from selenium import webdriver from gen_address import address from gen_random_values import gen_string, gen_date, convert_date HOME = config('HOME') # page = webdriver.Firefox() page = webdriver.Chrome(executable_path=HOME + '/chromedriver/ch...
mit
-9,188,802,131,510,466,000
24.54902
76
0.685342
false
3.044393
false
false
false
PableraShow/Learn-to-program-with-Python-guide
02 - Functions, logic and conditionals/more_operations-numbers_and_strings.py
1
2156
# More Operations # Numbers and Strings # You can convert a string to a number (float or int) and # vice versa using a few simple functions. print "Ex. 1:", int("3") print "Ex. 2:", float("3.4") print "Ex. 3:", str(34) print "Ex. 4:", str(3.4) print # Since the above outputs look exactly the same as...
mit
-7,451,375,012,025,516,000
26.368421
61
0.6359
false
2.878505
false
false
false
saurabh6790/frappe
frappe/website/context.py
1
9236
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe, os, json from frappe.website.doctype.website_settings.website_settings import get_website_settings from frappe.website.router import get_page_context from frappe.m...
mit
5,473,907,450,777,435,000
30.097643
98
0.712971
false
3.215877
false
false
false
odoo-brazil/odoo-brazil-addons
l10n_br_search_zip/models/l10n_br_zip.py
1
5338
# -*- encoding: utf-8 -*- ############################################################################### # # # Copyright (C) 2015 TrustCode - www.trustcode.com.br # # Danimar Ribeiro <danimaribeiro@gmail.co...
agpl-3.0
6,183,450,382,975,461,000
43.115702
79
0.445111
false
3.983582
false
false
false
hbiyik/tribler
src/tribler-core/tribler_core/modules/metadata_store/tests/test_tracker_state.py
1
1420
from ipv8.keyvault.crypto import default_eccrypto from pony.orm import db_session from tribler_core.modules.metadata_store.store import MetadataStore from tribler_core.tests.tools.base_test import TriblerCoreTest from tribler_core.utilities.tracker_utils import MalformedTrackerURLException class TestTrackerState(Tr...
lgpl-3.0
6,903,275,403,575,010,000
36.368421
106
0.711268
false
3.497537
true
false
false
deepmind/grid-cells
utils.py
1
5720
# Copyright 2018 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
-1,189,271,993,842,168,300
29.588235
80
0.617483
false
3.400713
false
false
false
Orange-OpenSource/tinypyki
setup.py
1
1758
# Copyright (C) 2014 Orange # This software is distributed under the terms and conditions of the 'BSD # 3-Clause' license which can be found in the 'LICENSE.txt' file in this package # distribution or at 'http://opensource.org/licenses/BSD-3-Clause'. #!/usr/bin/env python """Setup script for tinypyki.""" from distu...
bsd-3-clause
1,058,190,365,742,090,100
41.878049
80
0.556314
false
4.751351
false
false
false
devilry/devilry-django
devilry/devilry_admin/views/assignment/students/overview.py
1
3478
# -*- coding: utf-8 -*- from django.utils.translation import gettext_lazy from cradmin_legacy import crapp from cradmin_legacy.crinstance import reverse_cradmin_url from cradmin_legacy.viewhelpers.listbuilder.itemframe import DefaultSpacingItemFrame from cradmin_legacy.viewhelpers.listbuilder.lists import RowList fr...
bsd-3-clause
-3,169,107,164,609,173,000
33.435644
97
0.675101
false
3.680423
false
false
false
diegocortassa/TACTIC
src/tactic/ui/widget/swap_display_wdg.py
1
7595
########################################################### # # Copyright (c) 2009, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
epl-1.0
-1,737,304,815,002,849,300
26.518116
93
0.503884
false
3.633971
false
false
false
llvtt/mongo-python-driver
test/test_common.py
1
8501
# Copyright 2011-2014 MongoDB, 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 writin...
apache-2.0
7,601,771,617,396,056,000
37.292793
79
0.560287
false
3.766504
true
false
false
google/material-design-icons
update/venv/lib/python3.9/site-packages/pip/_internal/cli/main.py
2
2483
"""Primary application entrypoint. """ import locale import logging import os import sys from typing import List, Optional from pip._internal.cli.autocompletion import autocomplete from pip._internal.cli.main_parser import parse_command from pip._internal.commands import create_command from pip._internal.exceptions im...
apache-2.0
4,474,457,632,013,949,400
33.971831
75
0.726138
false
3.867601
false
false
false
Rickyfox/SPR
SPR_Crawl/label.py
1
4142
__author__ = 'nick' from pymongo import MongoClient class DocLabeler: """ Class to manually label the instances in the database """ def __init__(self): """ Sole constructor. Creates database connection and auto executes the labeling process :return: """ self....
apache-2.0
6,700,020,532,242,260,000
36.324324
145
0.474167
false
4.73913
false
false
false
ThiefMaster/sqlalchemy
lib/sqlalchemy/orm/persistence.py
1
51586
# orm/persistence.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """private module containing functions used to emit INSERT, UPDATE and DELETE sta...
mit
-1,907,588,162,479,042,600
35.379408
80
0.553852
false
4.557872
false
false
false
Mahdisadjadi/arxivscraper
arxivscraper/arxivscraper.py
1
9520
""" A python program to retreive recrods from ArXiv.org in given categories and specific date range. Author: Mahdi Sadjadi (sadjadi.seyedmahdi[AT]gmail[DOT]com). """ from __future__ import print_function import xml.etree.ElementTree as ET import datetime import time import sys PYTHON3 = sys.version_info[0] == 3 if PYT...
mit
-7,328,700,909,032,694,000
37.08
107
0.545798
false
3.429395
false
false
false
richlanc/KaraKara
website/karakara/auth/__init__.py
1
1672
from externals.lib.social._login import IUserStore from sqlalchemy.orm.exc import NoResultFound from ..model import DBSession, commit from ..model.model_comunity import ComunityUser, SocialToken from ..templates import helpers as h class ComunityUserStore(IUserStore): def get_user_from_token(self, provider_to...
gpl-3.0
-164,246,803,203,293,600
28.333333
78
0.599282
false
3.915691
false
false
false
glomex/gcdt
tests/resources/simple_cloudformation_stack_with_ec2/cloudformation.py
1
3689
#!/usr/bin/env python # Converted from RDS template located at: # https://github.com/cloudtools/troposphere/blob/master/examples/RDS_with_DBParameterGroup.py import os import troposphere from troposphere import Base64, Join, Parameter, Output, Ref, Template, Tags from troposphere.rds import DBInstance, DBParameterGrou...
mit
1,565,926,246,439,095,600
30
134
0.676064
false
3.406279
false
false
false
anjakisek/Mlin
racunalnik_igralec.py
1
1948
import threading from igra import * from minimax import * import time class Racunalnik(): def __init__(self, gui, algoritem): self.gui = gui self.algoritem = algoritem #izbran algoritem, minimax ali alphabeta self.mislec = None #vlakno za razmisljanje self.je_treba_prekiniti = False...
gpl-3.0
-1,400,040,275,411,350,500
33.175439
80
0.609856
false
2.89881
false
false
false
zauonlok/server
server/server/server.py
1
5551
import logging import socket import sys from ..common import Message, monitor from .connection import Connection, ConnectionBroken, ConnectionClosed from .multiplexer import EpollMultiplexer, SelectMultiplexer class Server: def __init__(self, host='', port=0, backlog=socket.SOMAXCONN): if sys.platform.s...
mit
8,462,380,764,776,698,000
41.05303
80
0.537921
false
4.520358
false
false
false
looooo/paraBEM
examples/plots/lifting_line.py
1
1404
from __future__ import division import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import paraBEM from paraBEM.liftingline import LiftingLine from paraBEM.utils import check_path # WingGeometry spw = 2 numpos = 50 z_fac_1 = -0.3 z_fac_2 = -0.7 y = np.sin(np.linspace(0, np.pi/2...
gpl-3.0
-6,012,824,955,244,377,000
25
70
0.648148
false
2.239234
false
false
false
glebb/mopidy-appletv
mopidy_appletv/frontend.py
1
6287
# -*- coding: utf-8 -*- import pykka import socket import select import sys import pybonjour import time from mopidy import core, utils from threading import Thread import netifaces import logging import traceback logger = logging.getLogger(__name__) class AppleTvFrontend(pykka.ThreadingActor, core.CoreListene...
apache-2.0
1,817,403,628,692,839,700
33.933333
117
0.531891
false
4.262373
false
false
false
nclsHart/glances
glances/core/glances_client.py
1
8024
# -*- coding: utf-8 -*- # # This file is part of Glances. # # Copyright (C) 2015 Nicolargo <nicolas@nicolargo.com> # # Glances is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
lgpl-3.0
-640,151,544,294,876,800
31.885246
138
0.574277
false
4.346696
true
false
false
sanjaymeena/ProgrammingProblems
python/CZITest/CZI_Test_Problem1.py
1
2325
# coding: utf-8 # `` # Task 1: Identifying common words between documents # For this task, you need to generate a matrix, where each entry contains the number of unique # common tokens (words) between each pair of documents. The output should include no headers for # rows or columns. The matrix should be symmetric, a...
apache-2.0
-832,424,390,543,315,700
22.25
102
0.673548
false
3.31669
false
false
false
google/trax
trax/tf_numpy/public_symbol_test.py
1
1130
# coding=utf-8 # Copyright 2021 The Trax Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
-1,881,075,086,277,361,400
28.736842
78
0.727434
false
3.575949
true
false
false
ondrokrc/gramps
gramps/gui/views/treemodels/familymodel.py
1
6542
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2007 Donald N. Allingham # Copyright (C) 2010 Nick Hall # # 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 v...
gpl-2.0
-554,885,614,302,928,200
31.547264
79
0.536839
false
4.127445
false
false
false
assuming/infiltrator
infiltrator/spiders/auto_base.py
1
1356
__author__ = 'ohmyxm' # coding: utf-8 import json import codecs def design_sites(filepath='infiltrator/sitesbase/design_sites.json'): fd = codecs.open(filepath, 'r', encoding='utf-8') result = json.loads(fd.read()) fd.close() return result['ui'], result['view'] UI_DESIGN_SITES, VIEW_DESIGN_SITES = ...
gpl-2.0
-1,572,175,403,518,355,500
23.654545
72
0.573009
false
3.476923
false
false
false
02agarwalt/FNGS_website
fngs/fngs/settings.py
1
3882
""" Django settings for fngs project. Generated by 'django-admin startproject' using Django 1.10.3. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ import os #...
apache-2.0
8,036,404,394,141,213,000
26.338028
91
0.691139
false
3.335052
false
false
false
genome-vendor/cython
setup.py
1
12652
from distutils.core import setup, Extension from distutils.sysconfig import get_python_lib import os, os.path import sys try: import platform is_cpython = not hasattr(platform, 'python_implementation') or platform.python_implementation() == 'CPython' except (ImportError, NameError): is_cpython = True # CPy...
apache-2.0
-3,059,837,864,532,475,000
36.993994
119
0.582042
false
4.044757
false
false
false
idosekely/python-lessons
lesson_1/python_types.py
1
1595
__author__ = 'sekely' # this is a comment. we use it for code documentation. ''' this is comment block. everything between those markers, is considered as a string, or block ''' 1 + 1 # these are pure integers, complete numbers. the result is '2' 3 / 1 # division ot integers will produce an integer. in that case,...
mit
-4,671,425,676,567,807,000
22.80597
101
0.6
false
3.28866
false
false
false
IUNO-TDM/CouponGenerator
python-printer/Adafruit_Thermal.py
1
16561
#************************************************************************* # This is a Python library for the Adafruit Thermal Printer. # Pick one up at --> http://www.adafruit.com/products/597 # These printers use TTL serial to communicate, 2 pins are required. # IMPORTANT: On 3.3V systems (e.g. Raspberry Pi), use a 1...
gpl-3.0
-1,079,888,237,636,584,600
27.902269
74
0.671095
false
3.108296
false
false
false
sloshedpuppie/LetsGoRetro
addons/plugin.video.emby-master/resources/lib/userclient.py
1
15585
# -*- coding: utf-8 -*- ################################################################################################## import hashlib import threading import xbmc import xbmcgui import xbmcaddon import xbmcvfs import artwork import utils import clientinfo import downloadutils #################...
gpl-2.0
8,451,069,600,961,892,000
31.305556
153
0.528585
false
4.567702
false
false
false
pytorch/fairseq
fairseq/modules/transformer_sentence_encoder_layer.py
1
4326
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from typing import Callable, Optional import torch import torch.nn as nn from fairseq import utils from fairseq.modules import LayerNorm, Mul...
mit
776,600,997,974,279,800
30.122302
84
0.585298
false
3.745455
false
false
false
TheSimoms/Felleshoelet
spotifyconnector/venv/lib/python3.6/site-packages/pydub/playback.py
1
1790
""" Support for playing AudioSegments. Pyaudio will be used if it's installed, otherwise will fallback to ffplay. Pyaudio is a *much* nicer solution, but is tricky to install. See my notes on installing pyaudio in a virtualenv (on OSX 10.10): https://gist.github.com/jiaaro/9767512210a1d80a8a0d """ import subprocess fr...
gpl-2.0
6,127,885,894,892,512,000
24.211268
81
0.634637
false
3.675565
false
false
false
rlindner81/pyload
module/plugins/accounts/MyfastfileCom.py
1
1806
# -*- coding: utf-8 -*- import time from module.plugins.internal.misc import json from module.plugins.internal.MultiAccount import MultiAccount class MyfastfileCom(MultiAccount): __name__ = "MyfastfileCom" __type__ = "account" __version__ = "0.10" __status__ = "testing" __config__ = [("mh_mode"...
gpl-3.0
5,270,015,722,444,122,000
34.411765
89
0.555371
false
3.70082
false
false
false
chrisjdavie/Cookit
5-a-day-thing/data_out/save_all_as_xls.py
1
1065
''' Extracts the 5-a-day data from the different excel spreadsheets, and saves it all in one big spreadsheet. Created on 14 Nov 2014 @author: chris ''' def main(): base_dir = '/home/chris/Projects/Cookit/family-food-datasets/' import xlwt workbook = xlwt.Workbook() from pickle_this imp...
mit
1,771,758,831,391,238,100
31.30303
180
0.585915
false
3.179104
false
false
false
jiadaizhao/LeetCode
0401-0500/0407-Trapping Rain Water II/0407-Trapping Rain Water II.py
1
1241
import heapq class Solution: def trapRainWater(self, heightMap: List[List[int]]) -> int: m = len(heightMap) if m == 0: return 0 n = len(heightMap[0]) if n == 0: return 0 visited = [[False]*n for _ in range(m)] pq = [] for i in range(m):...
mit
-7,279,575,406,421,195,000
36.606061
81
0.423852
false
3.223377
false
false
false
IceCubeDev/SpaceOrNot
psycopg2/setup.py
1
22843
# setup.py - distutils packaging # # Copyright (C) 2003-2010 Federico Di Gregorio <fog@debian.org> # # psycopg2 is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation, either version 3 of the License, or # (at...
apache-2.0
6,777,831,471,928,350,000
36.143089
81
0.618439
false
3.868417
true
false
false
drajen/resthome
app/smartthings.py
1
5032
# # smartthings.py # # David Janes # IOTDB.org # 2014-01-31 # # Demonstrate how to use the SmartThings API from Python. # # See also: # Example App explanation: # http://build.smartthings.com/blog/tutorial-creating-a-custom-rest-smartapp-endpoint/ # # Example PHP code: # https://www.dropbox.com/s/7m...
bsd-3-clause
-4,383,694,669,888,439,000
25.208333
104
0.562003
false
3.649021
false
false
false
USGSDenverPychron/pychron
pychron/processing/analyses/view/main_view.py
1
16975
# =============================================================================== # Copyright 2013 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,547,102,248,031,160,000
37.231982
115
0.474934
false
4.304006
false
false
false
nicupavel/opp
src/opp.py
1
9757
#!/usr/bin/python import openpanzer as op from oppSql import * from oppRdf import * import util from dbpedia import DbpediaQuery from websearch import GoogleQuery, BingQuery from urllib import quote, unquote from pprint import pprint import time,os, sys, errno reload(sys) sys.setdefaultencoding("utf-8") OFFLINE_JSON...
gpl-2.0
-3,290,526,785,492,938,000
30.172524
159
0.631649
false
3.87644
false
false
false
DTUWindEnergy/Python4WindEnergy
lesson 3/results/ebra.py
1
8402
# -*- coding: utf-8 -*- <nbformat>3.0</nbformat> # <headingcell level=1> # Plotting with Matplotlib # <headingcell level=2> # Prepare for action # <codecell> import numpy as np import scipy as sp import sympy # Pylab combines the pyplot functionality (for plotting) with the numpy # functionality (for mathematics...
apache-2.0
2,918,764,297,881,229,000
24.681957
259
0.701477
false
2.906888
false
false
false
dimagi/django-digest
django_digest/__init__.py
1
6603
from __future__ import absolute_import from __future__ import unicode_literals import logging import random import time from django.http import HttpResponse from django.contrib.auth.signals import user_login_failed import python_digest from django_digest.utils import get_backend, get_setting, DEFAULT_REALM import si...
bsd-3-clause
-4,542,620,577,446,454,300
40.26875
95
0.618204
false
4.416722
false
false
false
brocade/pysdn
samples/sampleopenflow/demos/demo19.py
1
7388
#!/usr/bin/python # Copyright (c) 2015, BROCADE COMMUNICATIONS SYSTEMS, INC # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright n...
bsd-3-clause
323,430,763,542,171,140
35.039024
78
0.577829
false
3.794556
false
false
false
YKonovalov/guesti
guesti/cloud/common.py
1
1089
# This file is part of GuestI. # # GuestI 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. # # SSP is distributed in the hope that it wi...
gpl-3.0
-3,832,762,964,333,289,000
26.923077
76
0.696051
false
3.917266
false
false
false
hyphyphyph/lascaux
instlatte/subsystem.py
1
1214
# -*- coding: utf-8 -*- import weakref from instlatte.logger import logger logger = logger(__name__) class Subsystem(object): manager = None package_dir = None module_name = None name = None config = dict() plugins = list() def __init__(self, manager=None, package_dir=None, modul...
mit
-4,722,398,141,859,267,000
26.590909
89
0.589786
false
3.891026
false
false
false
itsjustshana/project2
main.py
1
1149
"""`main` is the top level module for your Flask application.""" # Import the Flask Framework from flask import Flask from flask import render_template app = Flask(__name__) # Note: We don't need to call run() since our application is embedded within # the App Engine WSGI application server. @app.route('/') def game...
apache-2.0
6,431,372,148,908,431,000
25.113636
76
0.688425
false
3.624606
false
false
false
Gamebasis/3DGamebasisServer
GameData/blender-2.71-windows64/2.71/scripts/modules/rna_info.py
1
22979
# ##### 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-3.0
-4,796,570,875,278,886,000
30.959666
179
0.556378
false
3.708085
false
false
false
markgw/pimlico
src/python/pimlico/old_datatypes/modules/features/term_feature_matrix_builder/execute.py
1
1433
# This file is part of Pimlico # Copyright (C) 2020 Mark Granroth-Wilding # Licensed under the GNU LGPL v3.0 - https://www.gnu.org/licenses/lgpl-3.0.en.html import numpy from scipy.sparse.dok import dok_matrix from pimlico.core.modules.base import BaseModuleExecutor from pimlico.old_datatypes.arrays import ScipySpars...
gpl-3.0
8,663,936,854,158,894,000
45.225806
117
0.697139
false
3.693299
false
false
false
rartino/ENVISIoN
demo/molecular_dynamics.py
1
2653
## ENVISIoN ## ## Copyright (c) 2021 Gabriel Anderberg, Didrik Axén, Adam Engman, ## Kristoffer Gubberud Maras, Joakim Stenborg ## 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....
bsd-2-clause
1,677,479,425,379,267,600
44.724138
98
0.729261
false
3.647868
false
false
false
dangerdak/apuniverse
apuniverse/blog/migrations/0001_initial.py
1
2045
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Post' db.create_table('blog_post', ( ('id', s...
mit
-7,250,862,758,674,891,000
45.5
111
0.581418
false
3.759191
false
false
false
ucbvislab/radiotool
radiotool/composer/timestretchsegment.py
1
1360
from segment import Segment from scipy.signal import resample class TimeStretchSegment(Segment): """Like a :py:class:`radiotool.composer.Segment`, but stretches time to fit a specified duration. """ def __init__(self, track, comp_location, start, orig_duration, new_duration): """Create a time-...
isc
6,768,006,454,232,796,000
42.903226
93
0.679412
false
4.108761
false
false
false
chase-kernan/lsc-seis-gcm
gcm/io/triggers.py
1
3825
from gcm.data import triggers as tr from gcm import utils import numpy as np from os.path import join _ROOT_ATTR_MAP = dict(time='time', time_min='tstart', time_max='tend', freq='frequency', freq_min='fstart', freq_max='fend', amp...
gpl-2.0
5,010,494,714,490,605,000
32.849558
76
0.571242
false
3.787129
false
false
false
dbadb/2016-Stronghold
src/python/robot/commands/portcullisCmds.py
1
5529
from wpilib.command import CommandGroup from wpilib.command import Command # portcullis groups ------------------------------------------------- # A command group requires all of the subsystems that each member requires. k_timeOut = 2 class MoveUp(CommandGroup): def __init__(self, robot, name=None): supe...
mit
-6,429,023,693,558,455,000
29.546961
75
0.643335
false
4.035766
false
false
false
DPaaS-Raksha/raksha
raksha/openstack/common/lockutils.py
1
10139
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 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.apac...
apache-2.0
-4,326,607,360,334,361,000
35.471223
79
0.555775
false
4.648785
false
false
false
RayRuizhiLiao/ITK_4D
Modules/ThirdParty/pygccxml/src/pygccxml/declarations/class_declaration.py
1
26207
# Copyright 2014-2016 Insight Software Consortium. # Copyright 2004-2008 Roman Yakovenko. # Distributed under the Boost Software License, Version 1.0. # See http://www.boost.org/LICENSE_1_0.txt """ defines classes, that describes C++ classes This modules contains definition for next C++ declarations: - c...
apache-2.0
-3,673,771,788,238,061,000
32.665344
79
0.577212
false
4.370018
false
false
false
Saethlin/astrotools
viewfits.py
1
30427
#!/usr/bin/env python """ A lightweight python-based FITS viewer. The controls should be self-explatory. If they are not, press ctrl+h for a stop-gap and submit an issue. Controls ought to be obvious, help me make them. This is a program for looking at images, not for doing analysis. TODO: Doesn't quite display corr...
mit
-4,624,532,612,112,996,000
34.670574
132
0.562658
false
3.690805
true
false
false
montoyjh/pymatgen
pymatgen/io/feff/inputs.py
1
32751
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. import re import warnings from operator import itemgetter from tabulate import tabulate import numpy as np from monty.io import zopen from monty.json import MSONable from pymatgen import Structure, Lattice...
mit
-3,235,196,625,060,623,000
33.804463
101
0.511618
false
4.034865
false
false
false
zzzaaa12/PTT_Notify
ptt_notify.py
1
6855
#!/usr/bin/python # -*- coding: utf-8 -*- import os import sys import time import feedparser import requests import json from datetime import datetime from datetime import timedelta from send_notify import send_notify_mail # files in this project from setting import AUTO_UPDATE_SECS from setting import SEND_EMAIL from...
mit
-7,109,097,292,116,499,000
37.683616
131
0.481087
false
4.218731
false
false
false
gvallarelli/inasafe
safe_qgis/impact_calculator_thread.py
1
6203
""" InaSAFE Disaster risk assessment tool developed by AusAid - **ISImpactCalculatorThread.** The module provides a high level interface for running SAFE scenarios. Contact : ole.moller.nielsen@gmail.com .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU...
gpl-3.0
1,544,441,452,268,091,600
34.445714
79
0.632113
false
4.642964
false
false
false
unaguil/hyperion-ns2
experiments/measures/generic/BroadcastTime.py
1
1941
from GenericMeasure import GenericMeasure from GenericAvgMeasure import GenericAvgMeasure import Units class ReceivedMessages(GenericMeasure): def __init__(self, period, simulationTime, broadcastTable): GenericMeasure.__init__(self, r"DEBUG .*? - Peer .*? received packet .*?(\(.*?\)) .*?([0-9]+\,[0-9]+).*?", peri...
apache-2.0
2,790,905,567,240,034,000
35.622642
149
0.702215
false
3.417254
false
false
false
dmnfarrell/peat
Ghost/calc_dCS.py
1
4214
#!/usr/bin/env python # # This file is part of the pKaTool package # Copyright (C) Jens Erik Nielsen 2008 # All rights reserved # #comment def Nonefix(value): if value: return '%6.3f' %(value) else: return 'NA' def main(options,args): """Calculate the change in chemical shift due to a full ...
mit
-7,281,369,032,164,804,000
42
168
0.56336
false
3.702988
false
false
false
kezabelle/django-testguess
autoguessed/tests/test_urls/returns_templateresponse/test_101110011100.py
1
2776
# -*- coding: utf-8 -*- from __future__ import absolute_import from django.test import TestCase class GuessedTestCase(TestCase): """ Generated: 2015-10-18T13:44:15.980585 is_html5: True is_ajax: False is_authenticated: True has_context_data: True has_template_name: True has_get_params:...
bsd-2-clause
-7,960,611,862,642,440,000
32.445783
78
0.618876
false
4.017366
true
false
false
maljac/odoo-addons
account_invoice_tax_wizard/__openerp__.py
1
1453
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar) # All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Pu...
agpl-3.0
396,771,307,902,526,460
36.25641
78
0.573297
false
4.10452
false
false
false
matthew-brett/bibstuff
bibstuff/bibname.py
1
10649
#! /usr/bin/env python #File: bibname.py """ :mod:`bibstuff.bibname` --- Name Parser and Formatter ===================================================== Parses bibtex-formatted author/editor raw names and provides formatting functions (e.g., via bibstyles/shared.NamesFormatter). :author: Dylan W. Schwilk :contact: ht...
mit
-7,127,011,993,193,930,000
36.762411
111
0.610855
false
3.187369
false
false
false
MSU-CS-Software-Engineering/habitgame
landing_page.py
1
16402
import os.path from datetime import date, timedelta #For Timestamps from tkinter import * from tkinter.ttk import * from tkinter import messagebox #Must be explicitly imported. Used for placeholders. class Hack_Frame(Frame): def __init__(self, parent, ID, hack_type, empty=0): Frame.__init__(self, paren...
mit
-8,813,670,094,191,907,000
38.81068
110
0.460066
false
4.324282
true
false
false
iminrhythm/iirmerl
p2btstmp.py
1
2871
# From http://gbeced.github.io/pyalgotrade/docs/v0.17/html/bitstamp_example.html # Accessed 06/25/16 @ 1046Z from pyalgotrade.bitstamp import barfeed from pyalgotrade.bitstamp import broker from pyalgotrade import strategy from pyalgotrade.technical import ma from pyalgotrade.technical import cross class Strategy(st...
mit
-4,787,254,423,444,769,000
36.285714
106
0.623476
false
3.56646
false
false
false
PlutoniumHeart/ITK
Modules/ThirdParty/pygccxml/src/pygccxml/declarations/cpptypes.py
1
25524
# Copyright 2014-2016 Insight Software Consortium. # Copyright 2004-2008 Roman Yakovenko. # Distributed under the Boost Software License, Version 1.0. # See http://www.boost.org/LICENSE_1_0.txt """ defines classes, that describe C++ types """ from . import algorithms_cache class type_t(object): """base class f...
apache-2.0
1,586,996,218,688,973,800
25.395036
79
0.594852
false
3.564804
false
false
false
Scille/parsec-cloud
parsec/api/data/invite.py
1
6077
# Parsec Cloud (https://parsec.cloud) Copyright (c) AGPLv3 2016-2021 Scille SAS import re from typing import Optional, Tuple, List, Dict, Any from random import randint, shuffle from parsec.crypto import VerifyKey, PublicKey, PrivateKey, SecretKey from parsec.serde import fields, post_load from parsec.api.protocol im...
agpl-3.0
1,034,070,549,819,778,800
37.707006
99
0.677308
false
3.583137
false
false
false
ahye/FYS2140-Resources
examples/animation/func_animate_sin.py
1
1284
#!/usr/bin/env python """ Created on Mon 2 Dec 2013 Eksempelscript som viser hvordan en sinusboelge kan animeres med funksjonsanimasjon. @author Benedicte Emilie Braekken """ from numpy import * from matplotlib.pyplot import * from matplotlib import animation def wave( x, t ): ''' Funksjonen beskriver en sin...
mit
-2,908,362,900,077,196,000
19.709677
70
0.625389
false
2.675
false
false
false