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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
gaursagar/cclib | src/cclib/bridge/cclib2pyquante.py | 1 | 1092 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2017, the cclib development team
#
# This file is part of cclib (http://cclib.github.io) and is distributed under
# the terms of the BSD 3-Clause License.
"""Bridge for using cclib data in PyQuante (http://pyquante.sourceforge.net)."""
from __future__ import print_fu... | bsd-3-clause | 6,025,143,119,796,706,000 | 26 | 80 | 0.605311 | false | 3.183673 | false | false | false |
charlyoleg/Cnc25D | cnc25d/gearbar.py | 1 | 18085 | # gearbar.py
# generates gearbar and simulates gear.
# created by charlyoleg on 2013/09/26
#
# (C) Copyright 2013 charlyoleg
#
# This file is part of the Cnc25D Python package.
#
# Cnc25D is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# th... | gpl-3.0 | -7,602,001,885,677,611,000 | 47.226667 | 257 | 0.612331 | false | 3.224857 | true | false | false |
codasus/django-blogages | blogages/apps/blogages_core/views.py | 1 | 4123 | from django.core.urlresolvers import reverse
from django.shortcuts import get_object_or_404, render_to_response
from django.utils.functional import memoize
from django.views.decorators.csrf import csrf_exempt
from django.views.generic import TemplateView, ListView as BaseListView
from bootstrap.views import (ListView,... | mit | -6,779,982,531,179,955,000 | 20.252577 | 73 | 0.615571 | false | 4.09841 | false | false | false |
Akagi201/learning-python | grpc/helloworld/helloworld_pb2.py | 1 | 7591 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: helloworld.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.p... | mit | -6,584,075,133,206,770,000 | 36.579208 | 330 | 0.75168 | false | 3.470965 | false | false | false |
ericblau/ipf-xsede | ipf/glue2/sge.py | 1 | 26848 |
###############################################################################
# Copyright 2011-2014 The University of Texas at Austin #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #... | apache-2.0 | 903,594,117,533,543,200 | 37.190612 | 119 | 0.507561 | false | 4.420151 | false | false | false |
HyperloopTeam/FullOpenMDAO | lib/python2.7/site-packages/openmdao.util-0.13.0-py2.7.egg/openmdao/util/publickey.py | 1 | 18058 | """
Support for generation, use, and storage of public/private key pairs.
The :func:`pk_encrypt`, :func:`pk_decrypt`, :func:`pk_sign`, and
:func:`pk_verify` functions provide a thin interface over
:class:`Crypto.PublicKey.RSA` methods for easier use and to work around some
issues found with some keys read from ssh ``id... | gpl-2.0 | -3,420,703,646,388,508,700 | 32.627561 | 85 | 0.553605 | false | 4.198558 | false | false | false |
tkzeng/molecular-design-toolkit | moldesign/molecules/bonds.py | 1 | 3249 | # Copyright 2016 Autodesk 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 | -4,082,709,779,512,366,600 | 32.163265 | 100 | 0.597722 | false | 3.773519 | false | false | false |
niklasf/syzygy-tables.info | syzygy_tables_info/model.py | 1 | 3448 | # This file is part of the syzygy-tables.info tablebase probing website.
# Copyright (C) 2015-2020 Niklas Fiekas <niklas.fiekas@backscattering.de>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Fo... | agpl-3.0 | -7,992,721,278,212,646,000 | 23.985507 | 77 | 0.640371 | false | 3.793179 | false | false | false |
undertherain/vsmlib | vsmlib/corpus/corpus.py | 1 | 2196 | import numpy as np
import fnmatch
import os
import re
from vsmlib.misc.data import detect_archive_format_and_open
import logging
logger = logging.getLogger(__name__)
_default_tokenizer_patter = r"[\w\-']+|[.,!?…]"
class LineTokenizer:
def __init__(self, re_pattern=_default_tokenizer_patter):
self.re_to... | apache-2.0 | -2,976,931,912,692,841,500 | 27.467532 | 100 | 0.599909 | false | 3.747009 | false | false | false |
stjj89/iop | idapython/reentrant_int_scanner.py | 1 | 4386 | # Copyright (c) <2013-2014>, <Samuel J. Tan (samueltan@gmail.com)>
# 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
# no... | bsd-3-clause | 7,073,669,339,903,740,000 | 39.62037 | 81 | 0.680575 | false | 3.729592 | false | false | false |
twilsonco/CPGobbler | kf.py | 1 | 12472 | #!/usr/bin/env python
# kf.py - Implementation of a Python interface to read and write KF files.
# This is an implementation that uses the KF utilities to do the actual work,
# so you need a working ADF installation.
#
# Copyright (C) 2006-2008 by Scientific Computing and Modelling NV.
# For support, c... | gpl-3.0 | -7,293,515,207,852,422,000 | 29.947891 | 130 | 0.563262 | false | 3.683402 | true | false | false |
cbclab/MDT | mdt/lib/components.py | 1 | 14160 | import logging
from importlib.machinery import SourceFileLoader
import inspect
import os
from collections import defaultdict
from contextlib import contextmanager
import mdt
import mot
from mdt.configuration import get_config_dir
from mdt.model_building.signal_noise_models import SignalNoiseModel
from mot.library_funct... | lgpl-3.0 | -8,575,096,950,904,545,000 | 35.875 | 120 | 0.652825 | false | 4.335579 | false | false | false |
smallyear/linuxLearn | salt/salt/modules/bigip.py | 1 | 69568 | # -*- coding: utf-8 -*-
'''
An execution module which can manipulate an f5 bigip via iControl REST
:maturity: develop
:platform: f5_bigip_11.6
'''
# Import python libs
from __future__ import absolute_import
import json
import logging as logger
# Import third party libs
try:
import requests
i... | apache-2.0 | -8,488,454,476,757,734,000 | 30.606997 | 171 | 0.599868 | false | 4.111525 | false | false | false |
adamwg/volsched | sched/widgets.py | 1 | 3356 | from django.conf import settings
from django import newforms as forms
from datetime import datetime, time, date
from time import strptime
# DATETIMEWIDGET
calbtn = u"""
<script type="text/javascript">
Calendar.setup({
inputField : "%s",
ifFormat : "%s",
button ... | mit | 6,869,950,413,701,784,000 | 31.89899 | 78 | 0.52354 | false | 3.990488 | false | false | false |
openai/baselines | baselines/common/mpi_running_mean_std.py | 1 | 3706 | try:
from mpi4py import MPI
except ImportError:
MPI = None
import tensorflow as tf, baselines.common.tf_util as U, numpy as np
class RunningMeanStd(object):
# https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Parallel_algorithm
def __init__(self, epsilon=1e-2, shape=()):
self.... | mit | 398,189,376,616,498,800 | 32.089286 | 126 | 0.585267 | false | 2.981496 | false | false | false |
edt-devel/rss2maildir | rss2maildir.py | 1 | 12421 | #!/usr/bin/env python3
"""This script downloads rss feeds and stores them in a maildir"""
# Copyright(C) 2015 Edgar Thier
#
# 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 t... | gpl-3.0 | 4,040,953,493,592,904,700 | 28.644391 | 109 | 0.555108 | false | 3.930696 | true | false | false |
ucsd-ccbb/jupyter-genomics | src/microbiome/test/test_exec_bowtie.py | 1 | 19830 | """ Module to test exec_bowtie member methods.
This module contains unit tests for exec_bowtie.py.
"""
import os
import unittest
import shutil
from src import exec_bowtie
__author__ = "YiDing Fang"
__maintainer__ = "YiDing Fang"
__email__ = "yif017@eng.ucsd.edu"
__status__ = "prototype"
# input file contents. F... | mit | 7,927,828,480,292,370,000 | 43.561798 | 150 | 0.61059 | false | 3.629209 | true | false | false |
EmanueleCannizzaro/scons | test/scons-time/time/which.py | 1 | 2703 | #!/usr/bin/env python
#
# Copyright (c) 2001 - 2016 The SCons Foundation
#
# 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 us... | mit | 2,549,145,243,392,067,600 | 29.033333 | 103 | 0.702923 | false | 3.328818 | true | false | false |
abrt/faf | src/pyfaf/actions/cleanup_unassigned.py | 1 | 3252 | # Copyright (C) 2016 ABRT Team
# Copyright (C) 2016 Red Hat, Inc.
#
# This file is part of faf.
#
# faf 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) ... | gpl-3.0 | 9,110,247,321,125,495,000 | 49.8125 | 115 | 0.622386 | false | 4.014815 | false | false | false |
rfgil/MusicBooker | Music.py | 1 | 8811 | # coding=utf-8
import math
import i18n
_ = i18n.language.gettext
CHORUS_INDENTIFIER = '{CHORUS}'
ORDER_INDENTIFIER = '{ORDER}'
COMMENT_INDENTIFIER = '//'
class Music():
chorus = ''
chorus_chords = ''
verse = []
verse_chords = []
has_chorus = False
verses_before_chorus = 0
start_with_... | mit | 4,465,159,835,561,525,000 | 31.393382 | 140 | 0.515379 | false | 3.854331 | false | false | false |
aethaniel/project_generator | project_generator/settings.py | 1 | 2243 | # Copyright 2014 0xc0170
#
# 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, soft... | apache-2.0 | 5,895,296,711,283,450,000 | 32.477612 | 83 | 0.60856 | false | 3.725914 | false | false | false |
teleological/camxes-py | transformers/raw.py | 1 | 1215 |
# pylint: disable=I0011, C0111, too-few-public-methods, no-self-use
from collections import OrderedDict
from parsimonious.nodes import NodeVisitor
KEY_ORDER = {
"name" : 1,
"type" : 2,
"description" : 3,
"text" : 4,
"pos" : 5,
"chi... | mit | 4,783,790,687,242,463,000 | 23.795918 | 74 | 0.618107 | false | 3.681818 | false | false | false |
kingmotley/SickRage | sickbeard/providers/__init__.py | 1 | 3649 | # coding=utf-8
# Author: Nic Wolfe <nic@wolfeden.ca>
#
# URL: https://sickrage.github.io
#
# This file is part of SickRage.
#
# SickRage is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the ... | gpl-3.0 | 8,506,098,761,667,267,000 | 38.663043 | 158 | 0.701836 | false | 3.366236 | false | false | false |
gantsign/ansible-role-java | molecule/java-max-lts/tests/test_role.py | 1 | 1422 | import pytest
import re
def test_java(host):
cmd = host.run('. /etc/profile && java -version')
assert cmd.rc == 0
m = re.search('(?:java|openjdk) version "([0-9]+)', cmd.stderr)
assert m is not None
java_version = m.group(1)
assert '11' == java_version
def test_javac(host):
cmd = host.ru... | mit | -5,728,289,684,498,019,000 | 26.882353 | 78 | 0.587904 | false | 3.125275 | true | false | false |
debsankha/bedtime-programming | ls222/visual-lv.py | 1 | 3375 | from math import *
import thread
import random
import time
import visual
cat_catch_rate=5*10**-4 #parameter
cat_efficiency=0.8 #parameter
a=0.2 #will ge... | gpl-3.0 | -2,549,225,903,359,082,500 | 22.767606 | 93 | 0.589926 | false | 2.743902 | false | false | false |
ScaDS/ORC-Schlange | ORCSchlange/command/db.py | 1 | 3559 | """The db commands."""
import sys
from ORCSchlange.command import BaseCommand, really
def check_date(d):
"""Check if a string is a valide date of the form "YYYY-MM-DD".
:param d: The date string that is checked.
:return: True if it is a not valid date string.
"""
if len(d) != 10:
retu... | apache-2.0 | 6,756,867,353,874,134,000 | 34.949495 | 110 | 0.549593 | false | 3.822771 | false | false | false |
egabancho/invenio | invenio/legacy/refextract/linker.py | 1 | 3721 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2014 CERN.
##
## Invenio 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 | -1,354,909,630,057,597,700 | 31.929204 | 83 | 0.6853 | false | 3.588235 | true | false | false |
JamesMura/sentry | src/sentry/models/dsymfile.py | 1 | 18884 | """
sentry.models.dsymfile
~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2016 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
import os
import shutil
import hashlib
import six
import tempfile
from requests.exceptions import Reque... | bsd-3-clause | -7,839,869,893,866,971,000 | 31.115646 | 81 | 0.522665 | false | 4.151242 | false | false | false |
bitcraft/PyTMX | pytmx/__init__.py | 1 | 1082 | # -*- coding: utf-8 -*-
"""
Copyright (C) 2012-2017, Leif Theden <leif.theden@gmail.com>
This file is part of pytmx.
pytmx 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, ... | lgpl-3.0 | -2,368,980,745,109,895,000 | 30.823529 | 70 | 0.738447 | false | 3.559211 | false | false | false |
jeffdasilva/stattrack | db/player/strings.py | 1 | 4472 | import unittest
class PlayerStrings(object):
Name = 'name'
Position = 'position'
Team = 'team'
FantasyOwner = 'owner'
Link = 'link'
Stats = 'stats'
GamesPlayed = 'GamesPlayed'
ProjectedPrefix = 'Projected'
def __init__(self, prefix=None):
if prefix is None:
se... | gpl-2.0 | -5,347,471,142,852,814,000 | 27.851613 | 78 | 0.646914 | false | 3.761144 | false | false | false |
sterlingbaldwin/acme_workbench | workbench-backend/workbench/urls.py | 1 | 1920 | """workbench URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-... | bsd-2-clause | 5,277,792,416,190,892,000 | 52.333333 | 126 | 0.697917 | false | 3.33913 | false | false | false |
zepto/musio | musio/mp4v2/_mp4v2_wrapper.py | 1 | 10422 | #!/usr/bin/env python
# vim: sw=4:ts=4:sts=4:fdm=indent:fdl=0:
# -*- coding: UTF8 -*-
#
# mp4v2 object oriented wrapper module.
# Copyright (C) 2010 Josiah Gordon <josiahg@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publi... | gpl-3.0 | -7,562,934,594,480,114,000 | 25.055 | 86 | 0.549799 | false | 3.766534 | true | false | false |
danlrobertson/servo | components/script/dom/bindings/codegen/CodegenRust.py | 1 | 301911 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
# Common codegen classes.
from collections import defaultdict
from itertools import groupby
import operator
import os... | mpl-2.0 | -5,493,334,693,082,271,000 | 39.089098 | 120 | 0.572016 | false | 4.191578 | false | false | false |
smartjump/backend | src/get_bus_data.py | 1 | 1725 | #!/usr/bin/env python3
#****************************************************************************#
# Project: Smart Jump #
# Author: Alfonso Bilbao Velez <alfon.linux@gmail.com> #
# Developed: Hackatinho Mobilidade Sostible ... | agpl-3.0 | -5,277,078,975,249,307,000 | 32.173077 | 96 | 0.537391 | false | 3.165138 | false | false | false |
thnkloud9/Tandem | server/scripts/clean_orphaned_objects.py | 1 | 1406 | from pymongo import MongoClient
from bson.objectid import ObjectId
client = MongoClient('localhost', 27017)
db = client['tandem']
audios = db['audio']
users = db['users']
files = db['fs.files']
chunks = db['fs.chunks']
practice_sets = db['practice_sets']
practice_sessions = db['practice_sessions']
# remove practice... | gpl-2.0 | -5,276,407,539,512,718,000 | 36 | 85 | 0.672119 | false | 3.316038 | false | false | false |
dwsilk/qgis-geosaurus-plugin | geosaurus/functions/processing/offsetcurve.py | 1 | 3600 | # -*- coding: utf-8 -*-
import re
from ...core import database as db
from ..enums import (
ReturnType, SpatialFunctionGroup, SpatialType)
from ..template import AbstractSpatialFunction
class OffsetCurve(AbstractSpatialFunction):
"""
ST_OffsetCurve
"""
def __init__(self, distance=0, quad_segs=8,... | bsd-3-clause | 2,769,592,511,752,946,700 | 26.692308 | 84 | 0.570556 | false | 3.85439 | false | false | false |
irblsensitivity/irblsensitivity | scripts/translation/firstry.py | 1 | 18562 | #-*- coding: utf-8 -*-
'''
Created on 2017. 11. 06
Updated on 2017. 11. 06
'''
from __future__ import print_function
import os
import cgi
import re
import time
import codecs
import sys
import subprocess
import math
import dateutil.parser
from datetime import datetime
from commons import Subjects
from x... | apache-2.0 | -5,727,787,458,004,348,000 | 30.300885 | 113 | 0.602521 | false | 2.889487 | false | false | false |
koddas/python-backend | src/test.py | 1 | 1313 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from unicorns import storage
from unicorns.Unicorn import Unicorn
storage.setup()
unicorns = storage.fetch_unicorns()
for unicorn in unicorns:
print(str(unicorn.id) + ': ' + unicorn.name)
print("")
unicorn = storage.fetch_unicorn(3)
print(str(unicorn.id) + ': ' + u... | mit | 5,953,038,980,278,517,000 | 28.044444 | 87 | 0.727621 | false | 2.577909 | false | false | false |
huggingface/pytorch-transformers | src/transformers/utils/versions.py | 1 | 4611 | # Copyright 2020 The HuggingFace Team. 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 applicabl... | apache-2.0 | 5,593,534,099,608,531,000 | 35.595238 | 139 | 0.641076 | false | 3.901015 | false | false | false |
wheever/AFProxy | PageFilter.py | 1 | 1740 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import re
import logging
from Exceptions import *
from ListFile import parse_line_to_regex, ListFiles
from colorama import init, Fore, Back, Style
init(autoreset=True)
logger = logging.getLogger('__main__')
# Class method action() will be passed with the http request o... | mit | 2,177,060,904,539,524,900 | 26.619048 | 106 | 0.568966 | false | 3.501006 | false | false | false |
Spicyharambe/spni.github.io | opponents/make_images.py | 1 | 6566 | import os
import os.path
import sys
import time
import PIL.Image
setup_string_33 = "33***bc185.500.0.0.1_ga0*0*0*0*0*0*0*0*0#/]ua1.0.0.0_ub_uc7.0.30_ud7.0"
setup_string_36 = "36***bc185.500.0.0.1_ga0*0*0*0*0*0*0*0*0#/]a00_b00_c00_d00_w00_x00_y00_z00_ua1.0.0.0_ub_u0_v0_uc7.0.30_ud7.0"
#create error if not exist (not ... | mit | -2,295,183,526,946,184,700 | 33.197917 | 143 | 0.699665 | false | 3.039815 | false | false | false |
aeklant/scipy | scipy/special/_logsumexp.py | 1 | 7948 | import numpy as np
from scipy._lib._util import _asarray_validated
__all__ = ["logsumexp", "softmax", "log_softmax"]
def logsumexp(a, axis=None, b=None, keepdims=False, return_sign=False):
"""Compute the log of the sum of exponentials of input elements.
Parameters
----------
a : array_like
I... | bsd-3-clause | 563,463,092,393,215,360 | 27.284698 | 94 | 0.569703 | false | 3.272128 | false | false | false |
dongweiming/flask_reveal | social/backends/twilio.py | 1 | 1310 | """
Twilio support
"""
from re import sub
from social.p3 import urlencode
from social.backends.base import BaseAuth
class TwilioAuth(BaseAuth):
name = 'twilio'
ID_KEY = 'AccountSid'
def get_user_details(self, response):
"""Return twilio details, Twilio only provides AccountSID as
paramet... | bsd-3-clause | -2,718,034,480,383,495,700 | 33.473684 | 72 | 0.608397 | false | 3.910448 | false | false | false |
ziir/gandi.cli | gandi/cli/tests/fixtures/_hosting.py | 1 | 49432 | try:
# python3
from xmlrpc.client import DateTime
except ImportError:
# python2
from xmlrpclib import DateTime
def image_list(options):
ret = [{'author_id': 248842,
'datacenter_id': 3,
'date_created': DateTime('20130902T15:04:18'),
'date_updated': DateTime('201... | gpl-3.0 | 7,552,381,204,867,538,000 | 37.770196 | 79 | 0.418615 | false | 3.518292 | false | false | false |
bdang2012/taiga-back-casting | taiga/base/utils/signals.py | 1 | 1646 | # Copyright (C) 2014-2015 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014-2015 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014-2015 David Barragán <bameda@dbarragan.com>
# Copyright (C) 2014-2015 Anler Hernández <hello@anler.me>
# This program is free software: you can redistribute it and/or modify
# it under ... | agpl-3.0 | -3,682,081,195,025,817,000 | 40.075 | 100 | 0.718198 | false | 3.865882 | false | false | false |
uwosh/UWOshCommitteeOnCommittees | content/College.py | 1 | 3093 | # -*- coding: utf-8 -*-
#
# File: College.py
#
# Copyright (c) 2007 by []
# Generator: ArchGenXML Version 1.5.2
# http://plone.org/products/archgenxml
#
# GNU General Public License (GPL)
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public L... | gpl-2.0 | -2,778,841,790,504,699,400 | 28.740385 | 110 | 0.703201 | false | 3.626026 | false | false | false |
codeforamerica/epa_python | setup.py | 1 | 6118 | #!/usr/bin/env python
"""
Author: Zach Williams, <zach AT codeforamerica DOT org>
Copyright (c) 2011, Code for America. 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 mu... | bsd-3-clause | 2,698,151,976,244,429,000 | 31.716578 | 98 | 0.649886 | false | 3.764923 | false | false | false |
progrium/growl | external_dependencies/simple-mailer.py | 1 | 2584 | #!/usr/bin/env python
# Usage: simple-mailer [--[no-]tls] username[:password]@server[:port] from to subject
import optparse
parser = optparse.OptionParser(usage='%prog [options] username[:password]@server[:port] from to subject', description='Sends an email message, reading the password (unless specified on the comma... | bsd-3-clause | -2,278,448,834,802,627,600 | 40.677419 | 478 | 0.7113 | false | 3.190123 | false | false | false |
ABoothInTheWild/baseball-research | NBA/NBA_17/nba2017SeasonResults.py | 1 | 2218 | # -*- coding: utf-8 -*-
"""
Created on Fri Sep 07 14:28:16 2018
@author: Alexander
"""
# -*- coding: utf-8 -*-
"""
Created on Fri Jul 27 15:01:09 2018
@author: abooth
"""
from xmlstats import xmlstats
import numpy as np
import pandas as pd
access_token = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX... | gpl-3.0 | -4,958,257,404,184,953,000 | 32.65625 | 113 | 0.70514 | false | 3.159544 | false | false | false |
googleapis/python-aiplatform | google/cloud/aiplatform_v1/services/job_service/transports/grpc_asyncio.py | 1 | 39034 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | -1,837,601,772,241,525,000 | 43.256236 | 113 | 0.63624 | false | 4.446292 | false | false | false |
tylertian/Openstack | openstack F/glance/glance/api/common.py | 1 | 2790 | # Copyright 2012 OpenStack LLC.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | apache-2.0 | 1,705,684,498,955,211,800 | 33.875 | 78 | 0.613978 | false | 4.214502 | false | false | false |
apir8181/DLINE | Applications/GE/example/python_script/most_popular_flickr.py | 1 | 1164 |
import sys
from collections import defaultdict
if __name__ == "__main__":
in_path = sys.argv[1]
out_path = sys.argv[2]
group_count = defaultdict(int)
with open(in_path) as in_file:
for line in in_file:
args = line.strip().split()
for arg in args[1:]:
gro... | mit | -2,886,187,570,378,482,000 | 32.257143 | 68 | 0.499141 | false | 3.592593 | false | false | false |
latticelabs/Mitty | setup.py | 1 | 2920 | from setuptools import setup, find_packages
__version__ = eval(open('mitty/version.py').read().split('=')[1])
setup(
name='mitty',
version=__version__,
description='Simulator for genomic data',
author='Seven Bridges Genomics',
author_email='kaushik.ghose@sbgenomics.com',
packages=find_packages(... | gpl-2.0 | -1,249,022,728,122,169,000 | 51.160714 | 105 | 0.533562 | false | 3.882979 | false | false | false |
lleobox/PYtypecho | app/modules.py | 1 | 5106 | # coding: utf-8
import uuid
from datetime import datetime
from flask.ext.login import UserMixin
from werkzeug.security import generate_password_hash, check_password_hash
from . import db, login_manager
def create_only_slug(form):
if form.slug.data == "":
slug = str(datetime.now())[0:10] + "-" + str(uuid... | apache-2.0 | 7,477,388,708,105,220,000 | 28.892216 | 137 | 0.615585 | false | 3.545455 | false | false | false |
fsinfuhh/Bitpoll | bitpoll/settings.py | 1 | 9609 | """
Django settings for bitpoll project.
Generated by 'django-admin startproject' using Django 1.9.
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
# B... | gpl-3.0 | 7,390,395,290,817,735,000 | 26.141243 | 93 | 0.603351 | false | 3.461095 | false | false | false |
F5Networks/f5-common-python | devtools/code_generator.py | 1 | 1330 | from __future__ import absolute_import
# Copyright 2016 F5 Networks 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 ... | apache-2.0 | 3,411,760,480,840,071,700 | 34.945946 | 74 | 0.737594 | false | 3.527851 | false | false | false |
timlau/dnf-utils | plugins/sample.py | 1 | 3103 | # dnf-utils - add-on tools for DNF
# Copyright (C) 2014 Tim Lauridsen < timlau<AT>fedoraproject<DOT>org >
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the... | gpl-2.0 | 6,766,809,085,759,247,000 | 35.940476 | 73 | 0.636159 | false | 4.02987 | false | false | false |
VanyaDNDZ/django-sybase-backend | sqlsybase_server/pyodbc/compiler.py | 1 | 10019 | from django.db.models.sql import compiler
from datetime import datetime
import re
from django.db.models.base import Model
REV_ODIR = {
'ASC': 'DESC',
'DESC': 'ASC'
}
SQL_SERVER_8_LIMIT_QUERY = \
"""SELECT *
FROM (
SELECT TOP %(limit)s *
FROM (
%(orig_sql)s
ORDER BY %(ord)s
) AS %(table)s
ORDER... | unlicense | 1,650,626,285,960,713,000 | 37.095057 | 172 | 0.55285 | false | 3.994817 | false | false | false |
justinfinkle/pydiffexp | scripts/osmo_yeast_prep.py | 1 | 2736 | import sys
import warnings
import numpy as np
import pandas as pd
def parse_title(title, split_str=" "):
"""
Parse the title of GSE13100 into usable metadata. Should work with pandas apply()
Args:
title:
split_str:
Returns:
"""
split = title.split(split_str)
meta = []
... | gpl-3.0 | -7,102,382,116,669,640,000 | 34.532468 | 104 | 0.63633 | false | 3.098528 | false | false | false |
eagleamon/home-assistant | homeassistant/components/ffmpeg.py | 1 | 6820 | """
Component that will help set the ffmpeg component.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/ffmpeg/
"""
import asyncio
import logging
import os
import voluptuous as vol
from homeassistant.core import callback
from homeassistant.const import ... | apache-2.0 | -6,938,346,921,221,818,000 | 28.396552 | 78 | 0.626979 | false | 3.937644 | true | false | false |
Crescent-Saturn/Hello_Python | Week8/Bubble_shoot_final.py | 1 | 3541 | # Basic infrastructure for Bubble Shooter
import simplegui
import random
import math
# Global constants
WIDTH = 800
HEIGHT = 600
FIRING_POSITION = [WIDTH // 2, HEIGHT]
FIRING_LINE_LENGTH = 60
FIRING_ANGLE_VEL_INC = 0.02
BUBBLE_RADIUS = 20
COLOR_LIST = ["Red", "Green", "Blue", "White"]
# global variables
firing_angle... | gpl-3.0 | -5,557,904,276,409,397,000 | 27.788618 | 117 | 0.621293 | false | 3.052586 | false | false | false |
matthewwardrop/formulaic | benchmarks/plot.py | 1 | 1418 | import os
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
data = pd.read_csv(os.path.join(os.path.dirname(__file__), 'benchmarks.csv')).sort_values('mean')
def grouped_barplot(df, cat, subcat, val, err, subcats=None, **kwargs):
# based on https://stackoverflow.com/a/42033734
categori... | mit | 310,556,839,665,758,600 | 34.45 | 112 | 0.647391 | false | 2.972746 | false | false | false |
LordHighfixxer/lrdhifxr-cogs | apitoolsoz/apitoolsoz.py | 1 | 5904 | import discord
from discord.ext import commands
from .utils import checks
import aiohttp
import json
import logging
import time
import os
log = logging.getLogger('red.apitoolsoz')
class ApitoolsOz:
"""Steam and SteamSpy related commands"""
def __init__(self, bot):
self.bot = bot
... | gpl-3.0 | 4,074,175,973,187,433,500 | 34.45679 | 163 | 0.498984 | false | 4.184266 | false | false | false |
Foxboron/Frank | app/jobs/__init__.py | 1 | 1066 | #!/usr/bin/env python
from abc import ABCMeta, abstractmethod
from pkgutil import iter_modules
from os.path import dirname, basename
# import_module wasn't added until 2.7
try:
from importlib import import_module
except ImportError:
def import_module(name):
__import__(name)
class AbstractJob(object)... | mit | -2,380,783,889,886,251,500 | 25.65 | 76 | 0.587242 | false | 4.068702 | false | false | false |
Nixonite/Movie-Spoiler-Twitter-Bot | fetchSpoilers.py | 1 | 1933 | import urllib2
from BeautifulSoup import BeautifulSoup
import sqlite3
import time
spoilerSite = 'http://www.spollywood.com/' #maybe move to main.py
def sqlStart():
return sqlite3.connect('moviespoilerbot.db')
def sqlConnection(sqlconn):
return sqlconn.cursor()
def sqlClose(conn):
conn.close()
def weirdTextFix(... | gpl-2.0 | 2,039,677,642,579,010,600 | 25.493151 | 117 | 0.70357 | false | 2.964724 | false | false | false |
robocomp/robocomp-robolab | components/hardware/imu/pyimu/src/genericworker.py | 1 | 2828 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2019 by YOUR NAME HERE
#
# This file is part of RoboComp
#
# RoboComp 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... | gpl-3.0 | -5,540,194,475,145,899,000 | 26.456311 | 106 | 0.705092 | false | 2.915464 | false | false | false |
bdfoster/blumate | blumate/components/sensor/thinkingcleaner.py | 1 | 3570 | """Support for ThinkingCleaner."""
import logging
from datetime import timedelta
import blumate.util as util
from blumate.helpers.entity import Entity
_LOGGER = logging.getLogger(__name__)
REQUIREMENTS = ['https://github.com/TheRealLink/pythinkingcleaner'
'/archive/v0.0.2.zip'
'#pythi... | mit | -6,172,542,781,340,338,000 | 30.315789 | 73 | 0.614846 | false | 3.5 | false | false | false |
sharad/calibre | setup/installer/osx/app/sign.py | 1 | 2568 | #!/usr/bin/env python
# vim:fileencoding=utf-8
from __future__ import (unicode_literals, division, absolute_import,
print_function)
__license__ = 'GPL v3'
__copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'
import subprocess, os, sys, plistlib
from contextlib import contextmanager
fr... | gpl-3.0 | 202,522,008,358,210,180 | 31.1 | 92 | 0.617601 | false | 3.721739 | false | false | false |
Scille/parsec-cloud | parsec/api/protocol/types.py | 1 | 4779 | # Parsec Cloud (https://parsec.cloud) Copyright (c) AGPLv3 2016-2021 Scille SAS
import re
from unicodedata import normalize
from typing import Union, TypeVar, Type, NoReturn
from uuid import uuid4
from collections import namedtuple
from email.utils import parseaddr
from parsec.serde import fields
UserIDTypeVar = Ty... | agpl-3.0 | 5,741,280,552,053,785,000 | 30.440789 | 79 | 0.607868 | false | 3.547884 | false | false | false |
mmcdermo/RedLeader | redleader/exceptions.py | 1 | 1824 | # MIT License
# Copyright (c) 2016 Morgan McDermott & John Carlyle
# 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, cop... | apache-2.0 | -9,212,705,269,930,236,000 | 40.454545 | 138 | 0.754386 | false | 4.405797 | false | false | false |
oblalex/django-xlivesettings | xlivesettings/functions.py | 1 | 7450 | import logging
from django.utils.translation import ugettext
from django.utils.translation import ugettext_lazy as _
from xlivesettings import values
from xlivesettings.models import SettingNotSet
from xlivesettings.utils import is_string_like
log = logging.getLogger(__name__)
_NOTSET = object()
class Configuratio... | bsd-3-clause | -7,796,610,178,119,834,000 | 28.44664 | 94 | 0.575302 | false | 4.328879 | true | false | false |
fizyk/matchbox | src/matchbox/matchbox.py | 1 | 3244 | # Copyright (C) 2015 by Clearcode <http://clearcode.cc>
# and associates (see AUTHORS).
# This file is part of matchbox.
# matchbox 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 ... | lgpl-3.0 | 135,989,758,095,153,440 | 36.287356 | 93 | 0.501233 | false | 4.462173 | false | false | false |
jmarsik/mopidy | mopidy/core/actor.py | 1 | 9428 | from __future__ import absolute_import, unicode_literals
import collections
import itertools
import logging
import pykka
from mopidy import audio, backend, mixer, service
from mopidy.audio import PlaybackState
from mopidy.core.service import ServiceController
from mopidy.core.history import HistoryController
from mo... | apache-2.0 | -3,009,527,159,658,844,000 | 35.972549 | 98 | 0.630887 | false | 3.934891 | false | false | false |
mmechelke/bayesian_xfel | bxfel/core/structure_factor.py | 1 | 18608 |
import numpy as np
import scipy
import re
import os
import hashlib
import csb
from csb.bio.io.wwpdb import StructureParser
def chunks(l, n):
""" Yield successive n-sized chunks from l.
"""
for i in xrange(0, len(l), n):
yield l[i:i+n]
class ScatteringFactor(object):
"""
Cacluates the ... | mit | 4,043,407,030,186,804,000 | 28.029641 | 106 | 0.520475 | false | 3.093085 | false | false | false |
getsentry/zeus | zeus/factories/build.py | 1 | 3176 | import factory
from datetime import timedelta
from faker import Factory
from random import randint
from zeus import models
from zeus.config import db
from zeus.constants import Result, Status
from zeus.utils import timezone
from .base import ModelFactory
from .repository import RepositoryFactory
from .types import G... | apache-2.0 | -1,452,420,653,057,511,000 | 31.742268 | 85 | 0.63539 | false | 4.140808 | false | false | false |
danakj/chromium | content/test/gpu/gpu_tests/gpu_rasterization.py | 1 | 3218 | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from gpu_tests import cloud_storage_test_base
from gpu_tests import gpu_rasterization_expectations
import page_sets
from telemetry.page import page_test
fro... | bsd-3-clause | 5,711,954,946,880,890,000 | 35.157303 | 80 | 0.695774 | false | 4.047799 | true | false | false |
lsk112233/Clone-test-repo | events/models.py | 1 | 9946 | import datetime
from dateutil.rrule import rrule, YEARLY, MONTHLY, WEEKLY, DAILY
from operator import itemgetter
from django.conf import settings
from django.core.urlresolvers import reverse
from django.db import models
from django.db.models import Q
from django.template.defaultfilters import date
from django.utils im... | apache-2.0 | -1,564,836,294,303,243,800 | 31.187702 | 134 | 0.647798 | false | 3.806353 | false | false | false |
IljaGrebel/OpenWrt-SDK-imx6_HummingBoard | staging_dir/host/lib/scons-2.3.5/SCons/cpp.py | 1 | 19694 | #
# Copyright (c) 2001 - 2015 The SCons Foundation
#
# 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... | gpl-2.0 | -1,709,806,225,151,013,400 | 32.379661 | 97 | 0.598456 | false | 3.94986 | false | false | false |
NeuroRoboticTech/Jetduino | Software/Python/grove_single_axis_analog_gyro.py | 1 | 2819 | #!/usr/bin/env python
#
# Jetduino Example for using the Grove Single Axis Analog Gyro (http://www.seeedstudio.com/wiki/Grove_-_Single_Axis_Analog_Gyro)
#
# The Jetduino connects the Jetson and Grove sensors. You can learn more about the Jetduino here: http://www.NeuroRoboticTech.com/Projects/Jetduino
#
# Have a ques... | mit | 6,218,976,323,082,316,000 | 31.77907 | 149 | 0.730046 | false | 3.609475 | false | false | false |
zestedesavoir/Python-ZMarkdown | setup.py | 1 | 2587 | #!/usr/bin/env python
from __future__ import with_statement
import os
from distutils.core import setup
import imp
def get_version():
" Get version & version_info without importing markdown.__init__ "
path = os.path.join(os.path.dirname(__file__), 'zmarkdown')
fp, pathname, desc = imp.find_module('__versi... | bsd-3-clause | -7,031,540,164,228,774,000 | 37.044118 | 93 | 0.579822 | false | 4.112878 | false | false | false |
StamusNetworks/scirius | rules/migrations/0031_auto_20150103_1138.py | 1 | 1083 | # -*- coding: utf-8 -*-
from django.db import models, migrations
import datetime
class Migration(migrations.Migration):
dependencies = [
('rules', '0030_auto_20150103_1136'),
]
operations = [
migrations.AlterField(
model_name='category',
name='created_date',
... | gpl-3.0 | 7,653,383,847,302,902,000 | 31.818182 | 142 | 0.595568 | false | 4.041045 | false | false | false |
hactar-is/frink | frink/base.py | 1 | 1800 | # -*- coding: utf-8 -*-
"""
frink.base
~~~~~~~~~~~~~
BaseModel class
"""
import datetime
from schematics.models import Model
from schematics.types.base import (
StringType, BooleanType, DateTimeType, IntType, UUIDType
)
from schematics.exceptions import ValidationError
# Frink
from .orm import Insta... | mit | -1,695,356,816,623,985,200 | 31.727273 | 90 | 0.597778 | false | 3.87931 | false | false | false |
franek/weboob | modules/cappedtv/backend.py | 1 | 2351 | # -*- coding: utf-8 -*-
# Copyright(C) 2012 Lord
#
# This module is free software. It comes without any warranty, to
# the extent permitted by applicable law. You can redistribute it
# and/or modify it under the terms of the Do What The Fuck You Want
# To Public License, Version 2, as published by Sam Hocevar. See
# h... | agpl-3.0 | -5,019,618,507,937,956,000 | 34.621212 | 101 | 0.659719 | false | 3.816558 | false | false | false |
patricklam/signup-sheet | signup/views.py | 1 | 5682 | import re
from django.shortcuts import render
from signup.models import Slot, Signup, GroupMembership
def has_group(user):
return GroupMembership.objects.filter(watid=user).exists()
def find_group(user):
return GroupMembership.objects.filter(watid=user).first().group_id if has_group(user) else 'None'
def is_... | mit | -3,686,669,189,200,034,000 | 41.721805 | 129 | 0.574622 | false | 3.646983 | false | false | false |
tkw1536/DataAnalytics | DataAnalytics/grouping.py | 1 | 1709 | import numpy as np
def group_indexes_by(data, group):
"""
groups the indexes of an array.
data: Array of which the indexes should be sorted
group: Array of functions that should return if an item belongs to a group.
"""
# create an array of groups
groups = [[] for g in group]
... | mit | -8,865,919,819,708,766,000 | 23.070423 | 95 | 0.583382 | false | 4.199017 | false | false | false |
EssaAlshammri/django-by-example | online-shop/myshop/payment/signals.py | 1 | 1219 | from io import BytesIO
import weasyprint
from django.conf import settings
from django.core.mail import EmailMessage
from django.shortcuts import get_object_or_404
from django.template.loader import render_to_string
from paypal.standard.ipn.signals import valid_ipn_received
from paypal.standard.models import ST_PP_COMP... | mit | 4,838,753,074,364,305,000 | 39.633333 | 88 | 0.706317 | false | 3.59587 | false | false | false |
MichaelReiter/ProgrammingPractice | DFS.py | 1 | 1656 | #!/usr/bin/env python
def dfs_iter(graph, start, path=[]):
"""
Iterative version of depth first search.
Arguments:
graph - a dictionary of lists that is your graph and who you're connected to.
start - the node you wish to start at
path - a list of already visited nodes for a path
Returns:
path ... | mit | -5,849,177,401,395,299,000 | 25.725806 | 81 | 0.61715 | false | 3.471698 | false | false | false |
ActiveState/code | recipes/Python/577083_POSIX_context_manager_temporarily_silence_or/recipe-577083.py | 1 | 3124 | #! /usr/bin/env python
"""
silence.py
Peter Waller
March 2010
"""
from __future__ import with_statement
from contextlib import contextmanager, nested
from threading import Thread
from tempfile import mkdtemp
from os.path import join as pjoin
from os import (dup, fdopen, open as osopen, O_NONBLOCK, O_RDONLY, remove,... | mit | -9,177,454,605,131,362,000 | 25.252101 | 78 | 0.598271 | false | 3.732378 | false | false | false |
BobBuildTool/bob | test/test_input_recipe.py | 1 | 9169 |
from unittest import TestCase
from unittest.mock import MagicMock
import os
from bob.errors import ParseError
from bob.input import Recipe
from bob.languages import ScriptLanguage
from bob.stringparser import Env
class TestDependencies(TestCase):
def cmpEntry(self, entry, name, env={}, fwd=False, use=["result",... | gpl-3.0 | -2,027,022,670,915,200,000 | 29.062295 | 90 | 0.474316 | false | 3.850903 | true | false | false |
kurgm/gwv | gwv/validators/kosekitoki.py | 1 | 1899 | from gwv.dump import Dump
import gwv.filters as filters
from gwv.kagedata import KageData
from gwv.validators import Validator
from gwv.validators import ErrorCodes
error_codes = ErrorCodes(
NOT_ALIAS="0", # エイリアスでない(し、koseki-xxxxx0がtoki-00xxxxx0のエイリアスというわけでもない)
NOT_ALIAS_OF_KOSEKI="1", # koseki-xxxxx0のエイリア... | mit | 2,397,193,465,353,561,000 | 33.06 | 77 | 0.592484 | false | 2.64031 | false | false | false |
michealjroberts/stepjockey-data-retrieval | main.py | 1 | 1217 | #!/usr/bin/env python 2.7.12
#=======================================================================================================================================================#
#title :methods.py
#description :This collects KPI data from all relevant API sources
#author :Michael Roberts
#d... | gpl-3.0 | 390,090,244,518,207,100 | 40.965517 | 153 | 0.499589 | false | 4.111486 | false | false | false |
fbradyirl/home-assistant | tests/components/smartthings/test_init.py | 1 | 17594 | """Tests for the SmartThings component init module."""
from uuid import uuid4
from aiohttp import ClientConnectionError, ClientResponseError
from asynctest import Mock, patch
from pysmartthings import InstalledAppStatus, OAuthToken
import pytest
from homeassistant.components import cloud, smartthings
from homeassista... | apache-2.0 | 4,719,389,510,120,571,000 | 35.201646 | 88 | 0.697226 | false | 3.742608 | true | false | false |
mikejs/python-votesmart | votesmart.py | 1 | 25110 | """ Python library for interacting with Project Vote Smart API.
Project Vote Smart's API (http://www.votesmart.org/services_api.php)
provides rich biographical data, including data on votes, committee
assignments, and much more.
"""
__author__ = "James Turk (jturk@sunlightfoundation.com)"
__version__ = "0... | bsd-3-clause | -8,397,178,923,152,984,000 | 38.984076 | 94 | 0.601075 | false | 3.90878 | false | false | false |
HoboSci/OBIS-Capelin | Loop_on_date_python_script.py | 1 | 16260 | import os
import platform
import subprocess
import datetime as dt
import time
import calendar
import sys
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# General Parameters - Tools - Proxy Network - Output Directory
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Path declarati... | mit | 6,298,542,049,286,388,000 | 41.015504 | 616 | 0.59016 | false | 2.518978 | false | false | false |
mkelcb/knet | knet/com/io/knet_IO.py | 1 | 22995 | # -*- coding: utf-8 -*-
#MIT License
#Copyright (c) 2017 Marton Kelemen
#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, c... | mit | -4,028,411,820,195,555,300 | 34.108397 | 178 | 0.556382 | false | 3.529547 | false | false | false |
sanger-pathogens/iva | iva/assembly.py | 1 | 29056 | # Copyright (c) 2014-2016 Genome Research Ltd.
#
# This file is part of IVA.
#
# IVA 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.
# ... | gpl-3.0 | -2,167,010,293,797,757,200 | 43.428135 | 473 | 0.570794 | false | 3.434109 | false | false | false |
kennethreitz/tablib | src/tablib/formats/_html.py | 1 | 1613 | """ Tablib - HTML export support.
"""
import codecs
from io import BytesIO
from MarkupPy import markup
class HTMLFormat:
BOOK_ENDINGS = 'h3'
title = 'html'
extensions = ('html', )
@classmethod
def export_set(cls, dataset):
"""HTML representation of a Dataset."""
stream = Bytes... | mit | 5,353,768,156,754,748,000 | 25.016129 | 92 | 0.578425 | false | 3.934146 | false | false | false |
xiaowing/pgmail_crawler | PgmailCrawler.py | 1 | 16174 | '''
@author: xiaowing
@license: MIT License
'''
import io, sys, shutil, getopt, time, random, queue, urllib.parse, pdb, threading
sys.stdout = io.TextIOWrapper(sys.stdout.buffer,encoding='utf8') # Change the default encode of stdout.
import requests
import psycopg2
from datetime import date, datet... | mit | -3,226,150,583,771,768,000 | 36.781775 | 166 | 0.530856 | false | 3.870752 | false | false | false |
greggparrish/musicscout | musicscout/utils.py | 1 | 4665 | from bs4 import BeautifulSoup
import os
import re
import requests
from mutagen import File
from mutagen.id3 import ID3NoHeaderError
from mutagen.easyid3 import EasyID3
from .config import Config
cf = Config().conf_vars()
MEDIA_SITES = ['youtu', 'soundcloud']
USER_AGENT = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/... | unlicense | -603,348,131,785,572,500 | 33.813433 | 120 | 0.485316 | false | 3.946701 | false | false | false |
acdh-oeaw/totetiroler | places/views.py | 1 | 4026 | import requests
import json
from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from django.shortcuts import render, redirect, get_object_or_404
from django.views import generic
from django.views.generic.edit import DeleteView
from django.core.urlresolvers impo... | mit | 5,340,029,317,578,690,000 | 32 | 98 | 0.654744 | false | 3.920156 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.