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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
YuxuanLing/trunk | trunk/code/study/python/Fluent-Python-example-code/17-futures/countries/flags2_common.py | 1 | 5430 | """Utilities for second set of flag examples.
"""
import os
import time
import sys
import string
import argparse
from collections import namedtuple
from enum import Enum
Result = namedtuple('Result', 'status data')
HTTPStatus = Enum('Status', 'ok not_found error')
POP20_CC = ('CN IN US ID BR PK NG ... | gpl-3.0 | 4,697,844,028,749,351,000 | 34.442953 | 75 | 0.573849 | false | 3.480769 | false | false | false |
blackshirt/simpletrain | models.py | 1 | 1532 | '''
Database Models
Models defined here
===================
1. User
2. Employee
3. Workplace
4. Training
5. Letter
6. LearningAssignment
'''
import os
from datetime import date, datetime
from pony.orm import Database, sql_debug
from pony.orm import Required, Optional, Set
__all__ = ['db', 'User', 'Employee', 'Wor... | mit | -565,255,332,013,163,500 | 17.238095 | 71 | 0.673629 | false | 3.359649 | false | false | false |
belatrix/BackendAllStars | activities/urls.py | 1 | 1168 | from .views import send_message_all, send_message_to, send_message_location, send_message_event
from .views import get_activities, get_messages, get_messages_from, get_messages_from_all, get_notifications
from django.conf.urls import url
urlpatterns = [
url(r'^send/message/all/$', send_message_all, name='send_mes... | apache-2.0 | 4,920,638,106,448,543,000 | 72 | 111 | 0.696062 | false | 3.208791 | false | true | false |
jktubs/ctSESAM-python-memorizing | Crypter.py | 1 | 1892 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
"""
Encryption and decryption module.
"""
from Crypto.Cipher import AES
from hashlib import pbkdf2_hmac
class Crypter:
"""
Encrypt and decrypt with AES in CBC mode with PKCS7 padding. The constructor calculates the key from the given
password and salt with PBKDF... | gpl-3.0 | -7,594,151,041,902,287,000 | 28.5625 | 114 | 0.609937 | false | 3.680934 | false | false | false |
stormi/tsunami | src/secondaires/familier/fiche.py | 1 | 5370 | # -*-coding:Utf-8 -*
# Copyright (c) 2014 LE GOFF Vincent
# 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
# lis... | bsd-3-clause | -3,066,334,919,988,521,500 | 35.868966 | 79 | 0.674336 | false | 3.507874 | false | false | false |
fernandog/Medusa | lib/tmdbsimple/tv.py | 1 | 18419 | # -*- coding: utf-8 -*-
"""
tmdbsimple.tv
~~~~~~~~~~~~~
This module implements the TV, TV Seasons, TV Episodes, and Networks
functionality of tmdbsimple.
Created by Celia Oakley on 2013-10-31.
:copyright: (c) 2013-2018 by Celia Oakley
:license: GPLv3, see LICENSE for more details
"""
from .base import TMDB
class T... | gpl-3.0 | -6,584,255,332,790,810,000 | 28.708065 | 80 | 0.569846 | false | 4.263657 | false | false | false |
oskgeek/liftpass | config.py | 1 | 2493 | import sys
import os
# ------------------------------------------------------------------------------
# User Authentication - Liftpass is a single user application (for now)
# ------------------------------------------------------------------------------
UserKey = b'd759214482924d10ac159b794e9424e7'
UserSecret = b'4bf... | apache-2.0 | -6,309,304,441,272,448,000 | 37.953125 | 80 | 0.349779 | false | 5.455142 | false | false | false |
Paulloz/godot | glsl_builders.py | 3 | 7347 | """Functions used to generate source files during build time
All such functions are invoked in a subprocess on Windows to prevent build flakiness.
"""
from platform_methods import subprocess_main
class RDHeaderStruct:
def __init__(self):
self.vertex_lines = []
self.fragment_lines = []
se... | mit | -8,014,658,679,955,484,000 | 31.653333 | 116 | 0.559412 | false | 3.452538 | false | false | false |
lionaneesh/sugarlabs-calculate | toolbars.py | 1 | 14126 | # -*- coding: utf-8 -*-
# toolbars.py, see CalcActivity.py for info
import pygtk
pygtk.require('2.0')
import gtk
from mathlib import MathLib
from sugar.graphics.palette import Palette
from sugar.graphics.menuitem import MenuItem
from sugar.graphics.toolbutton import ToolButton
from sugar.graphics.toggletoolbutton imp... | gpl-2.0 | -3,756,317,717,864,053,000 | 35.677922 | 84 | 0.569436 | false | 3.579468 | false | false | false |
babelsberg/babelsberg-r | tests/constraints/test_midpoint.py | 1 | 1511 | import py
from ..base import BaseTopazTest
E = 0.00000000000001
class TestConstraintVariableObject(BaseTopazTest):
def execute(self, space, code, *libs):
return [space.execute("""
require "%s"
%s
""" % (lib, code)) for lib in libs]
def test_midpoint(s... | bsd-3-clause | -4,466,466,756,293,176,000 | 21.552239 | 65 | 0.433488 | false | 3.270563 | false | false | false |
LawrenceK/fs_monitor | fs_monitor.py | 1 | 5649 | #!/usr/bin/python
# (C)opyright L.P.Klyne 2013
sw_topleft = 13
sw_topright = 7
sw_bottomleft = 12
sw_bottomright = 11
led_topleft = 22
led_topright = 18
led_bottomleft = 15
led_bottomright = 16
import logging
import os
import os.path
import time
import subprocess
import RPi.GPIO as GPIO
_log = logging.getLogger()
log... | bsd-3-clause | -5,335,742,982,079,361,000 | 26.691176 | 86 | 0.582404 | false | 3.489191 | true | false | false |
Undo1/Torch | script.py | 1 | 1147 | from BeautifulSoup import BeautifulSoup
import mysql.connector
import config #Where we keep our passwords and stuff
import tldextract
import itertools
cnx = mysql.connector.connect(user=config.MySQLUsername(), password=config.MySQLPassword(), host=config.MySQLHost(), database=config.MySQLDatabase())
cursor = cnx.curso... | mit | -2,881,982,992,902,040,000 | 27 | 149 | 0.72973 | false | 3.305476 | false | false | false |
mistercrunch/panoramix | superset/databases/api.py | 1 | 34612 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | -2,846,362,746,387,505,000 | 33.405567 | 88 | 0.53649 | false | 4.681093 | true | false | false |
jonathf/chaospy | chaospy/distributions/collection/wald.py | 1 | 2480 | """Wald distribution."""
import numpy
from scipy import special
import chaospy
from ..baseclass import SimpleDistribution, ShiftScaleDistribution
class wald(SimpleDistribution):
"""Wald distribution."""
def __init__(self, mu):
super(wald, self).__init__(dict(mu=mu))
def _pdf(self, x, mu):
... | mit | -2,990,161,795,545,608,000 | 26.865169 | 83 | 0.522177 | false | 3.246073 | false | false | false |
crchemist/scioncc | src/ion/util/preload.py | 1 | 24501 | #!/usr/bin/env python
"""Utility to bulk load resources into the system, e.g. for initial preload"""
__author__ = 'Michael Meisinger'
import yaml
import re
import os
from pyon.core import MSG_HEADER_ACTOR, MSG_HEADER_ROLES, MSG_HEADER_VALID
from pyon.core.bootstrap import get_service_registry
from pyon.core.governa... | bsd-2-clause | -1,043,299,870,787,946,800 | 44.288355 | 135 | 0.572303 | false | 3.927701 | false | false | false |
stormi/tsunami | outils/gestionnaire_module/commande.py | 1 | 3556 | # -*-coding:Utf-8 -*
# Copyright (c) 2011 DAVY Guillaume
# 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
# li... | bsd-3-clause | 6,856,015,116,057,477,000 | 31.605505 | 79 | 0.664603 | false | 3.611789 | false | false | false |
catapult-project/catapult | common/py_vulcanize/third_party/rjsmin/bench/write.py | 3 | 10657 | #!/usr/bin/env python
# -*- coding: ascii -*-
r"""
=========================
Write benchmark results
=========================
Write benchmark results.
:Copyright:
Copyright 2014 - 2015
Andr\xe9 Malo or his licensors, as applicable
:License:
Licensed under the Apache License, Version 2.0 (the "License");
you ... | bsd-3-clause | -5,912,417,761,413,347,000 | 29.800578 | 77 | 0.449282 | false | 4.22394 | false | false | false |
bndl/bndl | bndl/net/watchdog.py | 1 | 7044 | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under th... | apache-2.0 | -6,064,973,426,037,575,000 | 32.542857 | 109 | 0.59753 | false | 4.055268 | false | false | false |
shibanis1/spark-tk | python/sparktk/frame/ops/drop_rows.py | 1 | 1541 | from sparktk.frame.row import Row
def drop_rows(self, predicate):
"""
Erase any row in the current frame which qualifies.
Parameters
----------
:param predicate: (UDF) Function which evaluates a row to a boolean; rows that answer True are dropped from
the frame.
Examples... | apache-2.0 | 887,973,931,321,488,600 | 33.244444 | 111 | 0.447761 | false | 3.617371 | false | false | false |
qix/tooler | tooler/command.py | 1 | 1233 | import io
from typing import Dict, Optional
from .exceptions import CommandHelpException
from .parser import DefaultParser
class Command:
def __init__(self):
pass
def run(self, selector, argv):
raise Exception("not implemented")
class DecoratorCommand(Command):
def __init__(self, fn, doc=None, parse... | mit | -8,756,057,895,321,486,000 | 24.6875 | 93 | 0.632603 | false | 3.865204 | false | false | false |
felixmatt/shyft | shyft/repository/service/yaml_geo_location_repository.py | 1 | 1391 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import yaml
from .ssa_geo_ts_repository import GeoLocationRepository
from os import path
class YamlGeoLocationError(Exception):
pass
class YamlGeoLocationRepository(GeoLocationRepository):
"""
Provide a yaml-based key-location map for gis-i... | lgpl-3.0 | -733,572,491,415,712,300 | 27.979167 | 85 | 0.608196 | false | 3.566667 | false | false | false |
botify-labs/simpleflow | swf/querysets/history.py | 1 | 2268 | from swf.models import History
from swf.querysets.base import BaseQuerySet
class HistoryQuerySet(BaseQuerySet):
"""WorkflowExecution history queryset"""
def __init__(self, domain, *args, **kwargs):
super(HistoryQuerySet, self).__init__(*args, **kwargs)
self.domain = domain
def get(self, ... | mit | -425,559,705,143,165,500 | 36.180328 | 95 | 0.592152 | false | 4.536 | false | false | false |
ic-hep/DIRAC | Core/Utilities/ClassAd/ClassAdLight.py | 1 | 8864 | ########################################################################
# $HeadURL$
########################################################################
""" ClassAd Class - a light purely Python representation of the
Condor ClassAd library.
"""
__RCSID__ = "$Id$"
class ClassAd:
def __init__( self, jdl ):... | gpl-3.0 | -481,757,788,879,941,700 | 26.027439 | 95 | 0.525496 | false | 3.863993 | false | false | false |
google-research/robel | robel/scripts/check_mujoco_deps.py | 1 | 1290 | # Copyright 2019 The ROBEL 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 agreed to in wr... | apache-2.0 | -2,726,141,442,768,360,400 | 29 | 74 | 0.723256 | false | 3.696275 | false | false | false |
shgo/baixa_camara | obter_inteiro_teor.py | 1 | 7140 | #!/usr/bin/python3
#-*- encoding: utf-8 -*-
#Copyright (C) 2016 Saullo Oliveira
#
#This program is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation, either version 3 of the License, or
#(at your option) any later ve... | gpl-3.0 | -8,356,535,699,134,562,000 | 41.795181 | 103 | 0.562922 | false | 3.555556 | false | false | false |
StartTheShift/thunderdome | thunderdome/properties.py | 1 | 13707 | # Copyright (c) 2012-2013 SHIFT.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, publish, dist... | mit | -7,597,682,304,716,384,000 | 28.540948 | 115 | 0.607208 | false | 4.372249 | false | false | false |
tps12/freezing-shame | freezing/shame/tests/views/test_cart.py | 1 | 5789 | from django.test import TestCase
class CartTest(TestCase):
from django.test.client import Client
Client = staticmethod(Client)
from shame.models import Store
Store = staticmethod(Store)
from shame.models import Product
Product = staticmethod(Product)
from xml.etree import ElementTree
... | gpl-3.0 | 6,249,128,531,331,405,000 | 29.308901 | 80 | 0.564346 | false | 3.849069 | true | false | false |
isaacyeaton/global-dyn-non-equil-gliding | Code/script_airfoil_snake.py | 1 | 18626 | # -*- coding: utf-8 -*-
"""
Created on Thu Aug 14 14:16:45 2014
%reset -f
%clear
%pylab
%load_ext autoreload
%autoreload 2
@author: isaac
"""
from __future__ import division
import numpy as np
import matplotlib.pyplot as plt
from scipy.interpolate import UnivariateSpline
from scipy.io import loadmat
# setup better... | mit | -5,088,139,220,984,201,000 | 26.925037 | 80 | 0.633953 | false | 2.352065 | false | false | false |
brain-tec/partner-contact | partner_multi_relation_tabs/tests/test_tab.py | 1 | 1766 | # Copyright 2018 Therp BV <https://therp.nl>.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from . import common
from ..tablib import Tab
class TestTab(common.TestCommon):
def test_create_page(self):
self.assertTrue(bool(self.tab_board))
tab_obj = Tab(self.tab_board)
... | agpl-3.0 | 360,778,801,671,219,900 | 44.282051 | 78 | 0.660815 | false | 3.933185 | false | false | false |
bb111189/CryptoKnocker | CryptoKnocker/CryptoKnocker/settings.py | 1 | 2239 | """
Django settings for CryptoKnocker project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, .... | mit | 2,499,307,004,532,393,000 | 23.075269 | 71 | 0.714605 | false | 3.175887 | false | false | false |
peragro/peragro-at | src/damn_at/metadatastore.py | 1 | 2111 | """
The MetaDataStore handler.
"""
from __future__ import absolute_import
import os
from damn_at.utilities import is_existing_file, pretty_print_file_description
from damn_at.bld import hash_to_dir
from damn_at.serialization import SerializeThriftMsg, DeserializeThriftMsg
from damn_at import FileDescription
from io i... | bsd-3-clause | 1,144,821,180,542,708,000 | 30.984848 | 106 | 0.636191 | false | 3.703509 | false | false | false |
moyaproject/moya | moya/settings.py | 1 | 10368 | from __future__ import unicode_literals
from __future__ import print_function
from __future__ import absolute_import
from .containers import OrderedDict
from . import iniparse
from .compat import text_type, string_types, PY2, implements_to_string, implements_bool
from . import errors
from .tools import textual_list
f... | mit | -4,349,579,899,935,977,000 | 29.404692 | 92 | 0.53559 | false | 4.442159 | false | false | false |
Macainian/BaseDjangoProject | website/management/commands/create_admin_account_migration.py | 1 | 1751 | import os
from django.core.management.base import BaseCommand
from website.settings import BASE_DIR
class Command(BaseCommand):
def handle(self, *args, **options):
migrations_folder = os.path.join(BASE_DIR, "website", "migrations")
admin_account_migration_text = self.get_admin_account_migration_... | mit | -4,347,252,034,574,000,600 | 32.692308 | 112 | 0.682467 | false | 3.908482 | false | false | false |
rpdillon/wikid | wikid/__init__.py | 1 | 3539 | #!/usr/bin/env python
# wikid, Copyright (c) 2010, R. P. Dillon <rpdillon@etherplex.org>
# This file is part of wikid.
#
# wikid 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... | gpl-3.0 | -6,462,069,072,412,644,000 | 31.768519 | 99 | 0.658378 | false | 3.780983 | false | false | false |
jjdmol/LOFAR | CEP/Pipeline/framework/lofarpipe/support/xmllogging.py | 1 | 5594 | """
xml based logging constructs and helpers functions
"""
import xml.dom.minidom as _xml
def add_child(head, name):
"""
Create a node with name. And append it to the node list of the supplied
node. (This function allows duplicate head names as specified by xml)
return the create node.
... | gpl-3.0 | -4,474,977,738,795,691,000 | 35.046358 | 78 | 0.63157 | false | 4.346542 | false | false | false |
markstoehr/structured_gaussian_mixtures | lstm_gaussian_mixtures/test_negative_loglikelihood.py | 1 | 2280 | %autoindent
import numpy
import theano
from theano import tensor
def numpy_floatX(data):
return numpy.asarray(data, dtype=theano.config.floatX)
num_timesteps = 10
num_sequences = 3
num_dim = 2
num_components = 3
x_n = (numpy.arange(num_timesteps * num_sequences * num_dim,
dtype=th... | apache-2.0 | -6,745,985,951,908,591,000 | 29.4 | 71 | 0.571053 | false | 2.976501 | false | false | false |
tensorflow/graphics | tensorflow_graphics/nn/layer/pointnet.py | 1 | 8675 | # Copyright 2020 The TensorFlow 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | apache-2.0 | -210,864,469,539,070,560 | 34.264228 | 81 | 0.69487 | false | 3.680526 | false | false | false |
cfelton/minnesota | mn/cores/fifo/_fifo_sync.py | 1 | 3380 |
# Copyright (c) 2014 Christopher L. Felton
#
# This program 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 your option) any later version.
#
# This program is... | gpl-3.0 | 8,068,396,567,377,177,000 | 28.4 | 78 | 0.557692 | false | 3.51717 | false | false | false |
njantrania/osf.io | scripts/refresh_box_tokens.py | 1 | 1487 | #!/usr/bin/env python
# encoding: utf-8
import sys
import logging
import datetime
from modularodm import Q
from dateutil.relativedelta import relativedelta
from scripts import utils as scripts_utils
from website.app import init_app
from website.oauth.models import ExternalAccount
from website.addons.base.exceptions ... | apache-2.0 | 3,008,566,150,502,636,000 | 26.537037 | 69 | 0.63618 | false | 3.803069 | false | false | false |
denversc/cligen | cligen/target_python.py | 1 | 1177 | # Copyright 2015 Denver Coneybeare <denver@sleepydragon.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 3 of the License, or
# (at your option) any later version.
#
# This ... | gpl-3.0 | -7,476,964,423,816,049,000 | 31.694444 | 71 | 0.68819 | false | 4.144366 | false | false | false |
chimkentec/KodiMODo_rep | plugin.video.torrenter/resources/scrapers/net.py | 1 | 9741 | # -*- coding: utf-8 -*-
import os
import time
import re
import urllib
import urllib2
import cookielib
import base64
import mimetools
import itertools
import xbmc
import xbmcgui
import xbmcvfs
RE = {
'content-disposition': re.compile('attachment;\sfilename="*([^"\s]+)"|\s')
}
# ################################
#... | gpl-3.0 | 6,977,368,259,031,119,000 | 31.79798 | 119 | 0.539267 | false | 4.072324 | false | false | false |
inveniosoftware-contrib/json-merger | json_merger/conflict.py | 1 | 4958 | # -*- coding: utf-8 -*-
#
# This file is part of Inspirehep.
# Copyright (C) 2016 CERN.
#
# Inspirehep 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... | gpl-2.0 | -1,570,750,061,068,503,300 | 33.430556 | 79 | 0.635942 | false | 4.097521 | false | false | false |
theworldbright/mainsite | aspc/courses/models.py | 1 | 9654 | from django.db import models
from django.conf import settings
from datetime import date, datetime, timedelta
import json
from django.core.serializers.json import DjangoJSONEncoder
CAMPUSES = (
(1, u'PO'), (2, u'SC'), (3, u'CMC'), (4, u'HM'), (5, u'PZ'), (6, u'CGU'), (7, u'CU'), (8, u'KS'), (-1, u'?'))
CAMPUSES_FUL... | mit | -5,253,931,363,524,595,000 | 33.355872 | 120 | 0.610317 | false | 3.554492 | false | false | false |
3324fr/spinalcordtoolbox | dev/control_points/make_centerline.py | 1 | 3765 | # Main fonction return the centerline of the mifti image fname as a nifti binary file
# Centerline is generated using sct_nurbs with nbControl = size/div
from sct_nurbs_v2 import *
import nibabel
import splines_approximation_v2 as spline_app
from scipy import ndimage
import numpy
import commands
import linear_fitting... | mit | 7,278,184,712,280,968,000 | 31.188034 | 114 | 0.592297 | false | 2.973934 | false | false | false |
ceibal-tatu/sugar-toolkit-gtk3 | src/sugar3/graphics/window.py | 1 | 10947 | # Copyright (C) 2007, Red Hat, Inc.
# Copyright (C) 2009, Aleksey Lim, Sayamindu Dasgupta
#
# This library 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 2 of the License, or (at your ... | lgpl-2.1 | -8,212,694,695,301,188,000 | 32.787037 | 77 | 0.603636 | false | 3.803683 | false | false | false |
YuepengGuo/backtrader | docs/observers-and-statistics/observers-default.py | 1 | 1323 | #!/usr/bin/env python
# -*- coding: utf-8; py-indent-offset:4 -*-
###############################################################################
#
# Copyright (C) 2015 Daniel Rodriguez
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as pub... | gpl-3.0 | -4,085,089,415,937,773,000 | 36.8 | 79 | 0.628118 | false | 4.021277 | false | false | false |
mic4ael/indico | indico/util/suggestions.py | 1 | 5843 | # This file is part of Indico.
# Copyright (C) 2002 - 2020 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from __future__ import division, print_function, unicode_literals
from collections import defaultdict
fro... | mit | 1,942,233,109,239,338,800 | 45.007874 | 114 | 0.655827 | false | 3.638232 | false | false | false |
coreequip/xbmc-addon-service-watchedlist | service.py | 1 | 62979 | """
This file contains the class of the addon
Settings for this addon:
w_movies
'true', 'false': save watched state of movies
w_episodes
'true', 'false': save watched state of movies
autostart
delay
delay after startup in minutes: '0', '5', '10', ...
starttype
'0' = No autostart
'1' = One Execution... | gpl-3.0 | -5,481,094,405,210,845,000 | 53.060086 | 337 | 0.529812 | false | 4.291292 | false | false | false |
wadobo/timebank | tinymce/views.py | 1 | 4408 | # Copyright (c) 2008 Joost Cassee
# Licensed under the terms of the MIT License (see LICENSE.txt)
import json
import logging
from django.core import urlresolvers
from django.http import HttpResponse
from django.shortcuts import render_to_response
from django.template import RequestContext, loader
from django.utils.tra... | agpl-3.0 | 2,562,349,873,354,733,000 | 33.170543 | 79 | 0.667877 | false | 3.890556 | false | false | false |
markokr/sysca | tests/helpers.py | 1 | 1213 |
import binascii
import os.path
from sysca import api as sysca
_FDIR = os.path.join(os.path.dirname(__file__), "files")
def demo_fn(basename):
return os.path.join(_FDIR, basename)
def demo_data(basename, mode="rb"):
if "b" in mode:
with open(demo_fn(basename), mode) as f:
return f.read... | isc | -8,735,806,898,496,008,000 | 25.955556 | 88 | 0.619126 | false | 2.750567 | false | false | false |
onitake/Uranium | examples/definition_viewer/main.py | 1 | 2450 | # Copyright (c) 2016 Ultimaker B.V.
# Uranium is released under the terms of the AGPLv3 or higher.
import sys
import os.path
import signal
import traceback
from PyQt5.QtCore import QObject, QUrl, pyqtSlot, pyqtProperty, pyqtSignal
from PyQt5.QtQml import QQmlApplicationEngine, qmlRegisterType
from PyQt5.QtWidgets imp... | agpl-3.0 | 3,755,217,824,218,569,000 | 30.410256 | 96 | 0.677959 | false | 3.712121 | false | false | false |
yeon3683/handpose | util/handdetector.py | 1 | 18839 | """Provides a basic hand detector in depth images.
HandDetector provides interface for detecting hands in depth image, by using the center of mass.
Copyright 2015 Markus Oberweger, ICG,
Graz University of Technology <oberweger@icg.tugraz.at>
This file is part of DeepPrior.
DeepPrior is free software: you can redistribu... | gpl-3.0 | 4,676,184,767,098,701,000 | 39.86551 | 136 | 0.524019 | false | 3.330799 | false | false | false |
ytsarev/rally | rally/deploy/serverprovider/providers/existing.py | 1 | 2084 | # Copyright 2013: Mirantis Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | apache-2.0 | -183,121,135,223,786,270 | 32.612903 | 78 | 0.545106 | false | 4.58022 | false | false | false |
odicraig/kodi2odi | addons/plugin.video.teevee/default.py | 1 | 19931 | from __future__ import unicode_literals
from resources.lib.modules.addon import Addon
import sys,os,re
import urlparse,urllib
import xbmc, xbmcgui, xbmcplugin, xbmcaddon
from resources.lib.modules import control,client,teevee2,metadata,cache
from resources.lib.modules.log_utils import log
meta_enabled = contro... | gpl-3.0 | 4,522,614,937,469,297,000 | 37.315582 | 212 | 0.558928 | false | 3.661767 | false | false | false |
timj/scons | src/engine/SCons/Tool/rpm.py | 1 | 4470 | """SCons.Tool.rpm
Tool-specific initialization for rpm.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
The rpm tool calls the rpmbuild command. The first and only argument should a
tar.gz consisting of the sourc... | mit | 5,327,432,468,304,638,000 | 32.863636 | 92 | 0.650783 | false | 3.914186 | false | false | false |
svieira/Flask-HipPocket | flask_hippocket/tasks.py | 1 | 3301 | # -*- coding: utf-8 -*-
"""
flask.ext.hippocket.tasks
~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2013 by Sean Vieira.
:license: MIT, see LICENSE for more details.
"""
from flask import Blueprint, Markup, request, render_template
from itertools import chain
from os import path
from pkgutil import walk_p... | mit | -5,610,174,353,615,824,000 | 37.383721 | 105 | 0.604059 | false | 4.354881 | false | false | false |
mscherer/rpmlint | InitScriptCheck.py | 1 | 11946 | # -*- coding: utf-8 -*-
#############################################################################
# Project : Mandriva Linux
# Module : rpmlint
# File : InitScriptCheck.py
# Author : Frederic Lepied
# Created On : Fri Aug 25 09:26:37 2000
# Purpose : check init scri... | gpl-2.0 | -7,705,326,315,198,297,000 | 40.915789 | 90 | 0.536665 | false | 4.215243 | true | false | false |
RENCI/xDCIShare | hs_metrics/views.py | 1 | 5571 | from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from django.views.generic import TemplateView
from django.contrib.auth.models import User
from mezzanine.generic.models import Rating, ThreadedComment
from theme.models import UserProfile # fixme switch to par... | bsd-3-clause | -434,498,257,057,787,260 | 49.189189 | 134 | 0.675821 | false | 4.051636 | false | false | false |
willemarcel/pontocerto | pontocerto/core/views.py | 1 | 1215 | from rest_framework.generics import ListAPIView
from django.core.urlresolvers import reverse
from django.contrib.gis.geos import Point
from django.forms import Form, CharField, FloatField
from django.http import HttpResponseRedirect
from django.views.generic.edit import FormView
from .models import Ponto
from .serial... | agpl-3.0 | -8,883,890,015,690,834,000 | 28.634146 | 61 | 0.655144 | false | 3.983607 | false | false | false |
fernandog/Medusa | medusa/server/web/home/post_process.py | 1 | 1966 | # coding=utf-8
from __future__ import unicode_literals
from medusa import process_tv
from medusa.helper.encoding import ss
from medusa.server.web.core import PageTemplate
from medusa.server.web.home.handler import Home
from six import string_types
from tornroutes import route
@route('/home/postprocess(/?.*)')
cla... | gpl-3.0 | -5,933,431,452,205,526,000 | 34.107143 | 121 | 0.606307 | false | 3.870079 | false | false | false |
CalthorpeAnalytics/urbanfootprint | footprint/main/management/commands/clear_future_built_forms.py | 1 | 1703 |
# UrbanFootprint v1.5
# Copyright (C) 2017 Calthorpe Analytics
#
# This file is part of UrbanFootprint version 1.5
#
# UrbanFootprint is distributed under the terms of the GNU General
# Public License version 3, as published by the Free Software Foundation. This
# code is distributed WITHOUT ANY WARRANTY, without impl... | gpl-3.0 | -1,502,007,972,385,661,000 | 39.547619 | 114 | 0.711685 | false | 4.064439 | false | false | false |
frostasm/qt-creator | tests/system/suite_editors/tst_rename_macros/test.py | 1 | 7824 | #############################################################################
##
## Copyright (C) 2015 The Qt Company Ltd.
## Contact: http://www.qt.io/licensing
##
## This file is part of Qt Creator.
##
## Commercial License Usage
## Licensees holding valid commercial Qt licenses may use this file in
## accordance wit... | gpl-3.0 | -6,147,371,400,253,073,000 | 44.488372 | 95 | 0.617587 | false | 4.356347 | true | false | false |
viapath/zippy | zippy/zippylib/interval.py | 1 | 4651 | #!/usr/bin/env python
__doc__=="""Interval Lists"""
__author__ = "David Brawand"
__license__ = "MIT"
__version__ = "2.3.4"
__maintainer__ = "David Brawand"
__email__ = "dbrawand@nhs.net"
__status__ = "Production"
import sys
from math import ceil
class Interval(object):
def __init__(self,chrom,chromStart,chromEnd... | mit | -7,593,002,557,638,501,000 | 38.752137 | 123 | 0.609546 | false | 3.665091 | false | false | false |
EmreAtes/spack | var/spack/repos/builtin/packages/intltool/package.py | 1 | 2529 | ##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgpl-2.1 | 8,018,918,679,636,101,000 | 40.459016 | 93 | 0.652432 | false | 3.933126 | false | false | false |
wavky/ManHourCalendar | mhcalendar/job.py | 1 | 1583 | #!/usr/bin/env python3
# @Time : 17-9-2 01:53
# @Author : Wavky Huang
# @Contact : master@wavky.com
# @File : job.py
"""
Process information of the job.
"""
class Job:
def __init__(self, required_manhour=0, daily_work_hours=0, hourly_pay=0, max_daily_overhours=0):
"""
Define your job's con... | mit | -7,290,178,517,325,429,000 | 37.609756 | 113 | 0.60897 | false | 3.456332 | false | false | false |
exaile/exaile | xl/metadata/mka.py | 1 | 2816 | # Matroska tagger for Exaile
# Copyright (C) 2010 Johannes Sasongko <sasongko@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 published by
# the Free Software Foundation; either version 2, or (at your option)
# any later vers... | gpl-2.0 | 762,459,540,885,645,600 | 36.052632 | 81 | 0.622869 | false | 3.868132 | false | false | false |
pjdelport/django-cities | cities/conf.py | 1 | 12698 | # -*- coding: utf-8 -*-
from importlib import import_module
from collections import defaultdict
from django.conf import settings as django_settings
from django.core.exceptions import ImproperlyConfigured
from django.utils.translation import ugettext_lazy as _
__all__ = [
'city_types', 'district_types',
'impor... | mit | -4,502,327,756,119,079,400 | 33.479452 | 141 | 0.487167 | false | 2.798532 | false | false | false |
kamekoopa/git-lab | git_lab/apis/mergerequest/repositories.py | 1 | 2549 | # -*- coding: utf-8 -*-
from git_lab.apis.mergerequest.models import MergeRequest, Note
class MergeRequestRepository(object):
def __init__(self, client=None, project=None):
u"""
@param client : GitLabクライアント
@type client : gitlab.Gitlab
"""
from git_lab.utils import get_cl... | apache-2.0 | -8,188,333,652,436,813,000 | 24.150538 | 86 | 0.545105 | false | 3.262204 | false | false | false |
qateam123/eq | app/utilities/schema.py | 1 | 1339 | import logging
from app import cache
from app.parser.v0_0_1.schema_parser import SchemaParser
from app.schema_loader.schema_loader import load_schema
logger = logging.getLogger(__name__)
def get_schema(metadata):
"""
Get the schema for the current user
:return: (json, schema) # Tuple of json and schema ... | mit | 4,259,916,970,787,906,000 | 30.880952 | 104 | 0.68708 | false | 3.719444 | false | false | false |
Smashman/UKNetrunnerRankings | app/tournament/models.py | 1 | 1715 | import datetime
from app import db
class Tournament(db.Model):
id = db.Column(db.Integer, primary_key=True)
upload_user_id = db.Column(db.Integer, db.ForeignKey('user.id'))
uploaded = db.Column(db.DateTime, default=datetime.datetime.utcnow)
date = db.Column(db.Date)
type = db.Column(db.Enum('sc', ... | gpl-2.0 | -491,337,908,336,923,500 | 38 | 83 | 0.683965 | false | 3.304432 | false | false | false |
michael-lazar/praw3 | setup.py | 1 | 2609 | """praw setup.py"""
import re
from codecs import open
from os import path
from setuptools import setup
PACKAGE_NAME = 'praw'
HERE = path.abspath(path.dirname(__file__))
with open(path.join(HERE, 'README.rst'), encoding='utf-8') as fp:
README = fp.read()
with open(path.join(HERE, PACKAGE_NAME, '__init__.py'),
... | gpl-3.0 | -5,172,743,039,084,221,000 | 37.940299 | 77 | 0.579149 | false | 3.876672 | false | false | false |
sadjadasghari/deeplab4a2d | loss_from_log.py | 1 | 5089 | #!/usr/bin/env python
# Martin Kersner, 2016/03/11
from __future__ import print_function
import sys
import re
import numpy as np
import matplotlib.pyplot as plt
from utils import strstr
def main():
output_data, log_files = process_arguments(sys.argv)
train_iteration = []
train_loss = []
train_accuracy... | gpl-3.0 | 5,591,932,198,186,486,000 | 31.208861 | 90 | 0.63706 | false | 3.339239 | false | false | false |
ebuendia/ProyectoPython | src/xml-parser.py | 1 | 2674 | import re
from device import Device
from group import Group
from capability import Capability
def startDevices(line):
return re.match(r"<devices",line.strip()) != None
def beginDevice(line):
return re.match(r"<device",line.strip()) != None
def endDevice(line):
return re.match(r"</device>", line.strip()) != None
... | unlicense | -1,180,188,492,776,922,400 | 21.470588 | 69 | 0.666791 | false | 3.052511 | false | false | false |
google-research/disentanglement_lib | disentanglement_lib/evaluation/metrics/factor_vae.py | 1 | 8683 | # coding=utf-8
# Copyright 2018 The DisentanglementLib Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Un... | apache-2.0 | -9,107,700,491,507,206,000 | 42.415 | 80 | 0.657031 | false | 4.412093 | false | false | false |
uclouvain/OSIS-Louvain | base/tests/business/education_groups/test_delete.py | 1 | 8462 | ##############################################################################
#
# OSIS stands for Open Student Information System. It's an application
# designed to manage the core business of higher education institutions,
# such as universities, faculties, institutes and professional schools.
# The core ... | agpl-3.0 | 1,811,763,372,489,224,200 | 47.348571 | 120 | 0.699326 | false | 3.897282 | true | false | false |
dipapaspyros/bdo_platform | aggregator/migrations/0015_auto_20180915_2057.py | 2 | 1556 | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-09-15 17:57
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependenc... | mit | 1,340,202,843,143,090,000 | 32.826087 | 114 | 0.587404 | false | 4.445714 | false | false | false |
eirannejad/pyRevit | extensions/pyRevitTools.extension/pyRevit.tab/Modify.panel/edit3.stack/Groups.pulldown/Show Nested Group Structure.pushbutton/script.py | 1 | 2660 | # -*- coding: utf-8 -*-
"""List the nested group structure around the selected group or element."""
from pyrevit import revit, DB
from pyrevit import script
output = script.get_output()
selection = revit.get_selection()
class GroupNode:
def __init__(self, group_element, par=None):
self.group = group_el... | gpl-3.0 | 4,766,360,654,464,250,000 | 27.728261 | 78 | 0.595535 | false | 3.722535 | false | false | false |
imito/odin | odin/ml/scoring.py | 1 | 10299 | from __future__ import print_function, division, absolute_import
import numpy as np
from scipy.linalg import eigh, cholesky, inv, svd, solve
import tensorflow as tf
from sklearn.svm import SVC
from sklearn.discriminant_analysis import LinearDiscriminantAnalysis
from odin.backend import length_norm, calc_white_mat
fr... | mit | -2,396,844,634,403,191,000 | 27.216438 | 83 | 0.592873 | false | 3.52223 | false | false | false |
yephper/django | django/contrib/auth/views.py | 1 | 12821 | import functools
import warnings
from django.conf import settings
# Avoid shadowing the login() and logout() views below.
from django.contrib.auth import (
REDIRECT_FIELD_NAME, get_user_model, login as auth_login,
logout as auth_logout, update_session_auth_hash,
)
from django.contrib.auth.decorators i... | bsd-3-clause | -5,530,483,616,621,971,000 | 35.488304 | 97 | 0.625614 | false | 4.210509 | false | false | false |
rascul/botwot | plugins/urltitle.py | 1 | 1618 | """ Url Title Plugin (botwot plugins.urltitle) """
# Copyright 2014 Ray Schulz <https://rascul.io>
#
# 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-... | apache-2.0 | -6,002,606,328,788,732,000 | 27.892857 | 80 | 0.687268 | false | 3.472103 | false | false | false |
pgroudas/pants | src/python/pants/backend/jvm/tasks/jvm_compile/jvm_compile.py | 1 | 16630 | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import itertools
imp... | apache-2.0 | 7,279,666,870,760,293,000 | 43.945946 | 110 | 0.676729 | false | 4.300491 | false | false | false |
azumimuo/family-xbmc-addon | plugin.video.showboxarize/resources/lib/sources_de/1kino.py | 1 | 4950 | # -*- coding: utf-8 -*-
"""
Flixnet Add-on
Copyright (C) 2016 Viper2k4
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) an... | gpl-2.0 | -1,739,964,767,721,680,600 | 37.679688 | 179 | 0.552525 | false | 3.568854 | false | false | false |
BlackVegetable/starcraft-oracle | sc2reader-master/sc2reader/constants.py | 1 | 3068 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals, division
# These are found in Repack-MPQ/fileset.{locale}#Mods#Core.SC2Mod#{locale}.SC2Data/LocalizedData/Editor/EditorCategoryStrings.txt
# EDSTR_CATEGORY_Race
# EDSTR_PLAYERPROPS_RACE
# The ??? means that I don't know w... | mit | 1,542,272,283,265,632,300 | 17.359756 | 129 | 0.50714 | false | 2.615986 | false | false | false |
kundajelab/simdna | simdna/simdnautil/pwm.py | 1 | 5397 | from __future__ import absolute_import, division, print_function
import numpy as np
from simdna.simdnautil.util import DEFAULT_LETTER_TO_INDEX
from simdna.simdnautil import util
import math
class PWM(object):
"""
Object representing a position weight matrix;
allows sampling from the PWM either randomly or... | mit | -9,102,593,418,064,766,000 | 33.158228 | 82 | 0.621642 | false | 3.971302 | false | false | false |
MichalBusta/FASText | tools/icdarUtils.py | 1 | 41513 | '''
Created on Jan 7, 2015
@author: busta
'''
import os
import numpy as np
import cv2
import matplotlib.pyplot as plt
import matplotlib.lines as mlines
import utils
from ft import FASTex
import pylab
import pandas
def draw_missed_letters(input_dir='/datagrid/personal/TextSpotter/FastTextEval/ICDAR-Train', color =... | gpl-2.0 | 3,569,044,324,166,943,000 | 38.57388 | 294 | 0.526004 | false | 3.405217 | false | false | false |
elzaggo/pydoop | examples/pseudo_terasort/pteragen.py | 1 | 3734 | # BEGIN_COPYRIGHT
#
# Copyright 2009-2018 CRS4.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | apache-2.0 | -846,706,939,941,173,600 | 29.606557 | 77 | 0.631494 | false | 3.506103 | false | false | false |
timothycrosley/hug | hug/interface.py | 1 | 40948 | """hug/interface.py
Defines the various interface hug provides to expose routes to functions
Copyright (C) 2016 Timothy Edmund Crosley
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 re... | mit | 2,164,024,948,178,600,700 | 39.623016 | 120 | 0.582275 | false | 4.577753 | false | false | false |
jmbowman/media_library | settings.py | 1 | 3402 | # Django settings for app project.
import os
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# On Unix systems, a value of None will cause Django to use the same
# timezone... | mit | -8,985,655,191,693,617,000 | 29.927273 | 88 | 0.727513 | false | 3.650215 | false | false | false |
micha-shepher/oervoer-wizard | oervoer-django/oervoer/src/oervoer/settings.py | 1 | 2765 | """
Django settings for oervoer project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
bojan: 06 21543084
"""
# Build paths inside the project like this: os.path.joi... | gpl-3.0 | -1,681,099,818,332,427,000 | 26.376238 | 77 | 0.739241 | false | 3.264463 | false | false | false |
jamescallmebrent/dagny | src/dagny/renderer.py | 1 | 9212 | # -*- coding: utf-8 -*-
from functools import wraps
import odict
from dagny import conneg
class Skip(Exception):
"""
Move on to the next renderer backend.
This exception can be raised by a renderer backend to instruct the
`Renderer` to ignore the current backend and move on to the next-be... | unlicense | 6,525,417,132,887,821,000 | 29.006515 | 80 | 0.530504 | false | 4.709611 | false | false | false |
gaapt/deepdive | src/test/resources/spouse/udf/ext_has_spouse.py | 1 | 1973 | #! /usr/bin/env python
import csv
import os
import sys
from collections import defaultdict
BASE_DIR = os.path.dirname(os.path.realpath(__file__))
# Load the spouse dictionary for distant supervision
spouses = defaultdict(lambda: None)
with open (BASE_DIR + "/../data/spouses.csv") as csvfile:
reader = csv.reader(cs... | apache-2.0 | -6,167,275,737,590,914,000 | 28.014706 | 76 | 0.642169 | false | 2.802557 | false | false | false |
google-research-datasets/natural-questions | eval_utils.py | 1 | 10966 | # coding=utf-8
# Copyright 2018 The Google AI Language Team 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 ... | apache-2.0 | 4,003,235,773,756,111,400 | 34.035144 | 80 | 0.648915 | false | 3.546572 | false | false | false |
Azure/azure-sdk-for-python | setup.py | 1 | 2261 | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#---------------------------------------------------------------... | mit | -1,612,231,462,446,572,300 | 35.435484 | 106 | 0.648074 | false | 3.513219 | false | false | false |
defeo/cypari2 | autogen/doc.py | 1 | 10642 | # -*- coding: utf-8 -*-
"""
Handle PARI documentation
"""
from __future__ import unicode_literals
import re
import subprocess
leading_ws = re.compile("^( +)", re.MULTILINE)
trailing_ws = re.compile("( +)$", re.MULTILINE)
double_space = re.compile(" +")
end_space = re.compile(r"(@\[end[a-z]*\])([A-Za-z])")
end_pare... | gpl-2.0 | -2,136,652,580,817,424,100 | 30.178886 | 101 | 0.554552 | false | 3.123384 | false | false | false |
jalanb/dotsite | pysyte/cli/streams.py | 1 | 1979 | """Module to handle streams of text from cli arguments"""
import os
import sys
import contextlib
from itertools import chain
from six import StringIO
from pysyte import iteration
from pysyte.cli import arguments
from pysyte.oss.platforms import get_clipboard_data
def parse_args():
"""Parse out command line argu... | mit | 2,554,933,082,323,681,300 | 23.7375 | 73 | 0.632643 | false | 3.699065 | false | false | false |
aio-libs/aiomysql | aiomysql/sa/connection.py | 1 | 14895 | # ported from:
# https://github.com/aio-libs/aiopg/blob/master/aiopg/sa/connection.py
import weakref
from sqlalchemy.sql import ClauseElement
from sqlalchemy.sql.dml import UpdateBase
from sqlalchemy.sql.ddl import DDLElement
from . import exc
from .result import create_result_proxy
from .transaction import (RootTran... | mit | 8,164,875,323,287,730,000 | 34.047059 | 79 | 0.567237 | false | 4.754229 | false | false | false |
sebleier/django-alpaca | tests/project/settings.py | 1 | 4735 | # Django settings for project project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'... | bsd-3-clause | 9,094,194,376,573,882,000 | 33.311594 | 122 | 0.682999 | false | 3.707909 | false | false | false |
mekery/pdfdig | build/scripts-2.7/pdftotext.py | 1 | 2534 | #!/usr/bin/python
'''
@summary: Text's command line script.
Convert pdf to text based on pdftotext.
@author: Micle Bu <mekery@gmail.com>
@copyright: Copyright © 2012 Micle Bu
@license: BSD New
@version: pdftotext.py 2012-03-29 Micle Bu
'''
import sys
import string
from pdfdig.pdftext import Text
def ma... | bsd-3-clause | -4,973,638,659,855,998,000 | 33.256757 | 103 | 0.485793 | false | 3.584158 | false | false | false |
zozo123/buildbot | master/buildbot/steps/shellsequence.py | 1 | 4370 | # This file is part of Buildbot. Buildbot 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, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... | gpl-3.0 | -9,173,960,222,634,424,000 | 39.091743 | 97 | 0.613272 | false | 4.441057 | true | false | false |
openstack/senlin | senlin/objects/requests/actions.py | 1 | 3059 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed unde... | apache-2.0 | -84,909,250,368,545,440 | 30.864583 | 78 | 0.691402 | false | 3.967575 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.