repo_name stringlengths 5 92 | path stringlengths 4 232 | copies stringclasses 19
values | size stringlengths 4 7 | content stringlengths 721 1.04M | 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 15 997 | alpha_frac float64 0.25 0.97 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
scionrep/scioncc | src/ion/service/test/test_governance.py | 1 | 83576 | #!/usr/bin/env python
__author__ = 'Stephen P. Henrie'
import unittest, os, gevent, platform, simplejson
from mock import Mock, patch
from pyon.util.int_test import IonIntegrationTestCase
from pyon.util.containers import get_ion_ts
from nose.plugins.attrib import attr
from pyon.util.context import LocalContextMixi... | bsd-2-clause | 6,302,384,183,825,388,000 | 51.039851 | 205 | 0.675876 | false |
stephenlienharrell/roster-dns-management | test/dnsrmacl_test.py | 1 | 8124 | #!/usr/bin/python
# Copyright (c) 2009, Purdue University
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# Redistributions of source code must retain the above copyright notice, this
# list ... | bsd-3-clause | -5,292,346,615,663,352,000 | 39.217822 | 80 | 0.64094 | false |
Camiloasc1/AstronomyUNAL | CelestialMechanics/orbits/test/test_ellipse.py | 1 | 4276 | import unittest
from astropy import constants as astroconst
from astropy import units as u
from astropy.time import Time
from CelestialMechanics.kepler import constants
from CelestialMechanics.orbits import ellipse
from CelestialMechanics.orbits.ellipse import delta_t_t0_aeangle
class MyTestCase(unittest.TestCase):... | mit | -1,451,791,043,087,483,000 | 40.115385 | 106 | 0.600094 | false |
erangre/Dioptas | dioptas/model/util/PeakShapes.py | 1 | 1278 | # -*- coding: utf-8 -*-
# Dioptas - GUI program for fast processing of 2D X-ray diffraction data
# Principal author: Clemens Prescher (clemens.prescher@gmail.com)
# Copyright (C) 2014-2019 GSECARS, University of Chicago, USA
# Copyright (C) 2015-2018 Institute for Geology and Mineralogy, University of Cologne, Germany
... | gpl-3.0 | -9,125,827,370,369,577,000 | 43.068966 | 94 | 0.723005 | false |
scaramallion/pynetdicom3 | setup.py | 1 | 1741 | from setuptools import setup, find_packages
import os
import sys
# Version
BASE_DIR = os.path.dirname(os.path.realpath(__file__))
VERSION_FILE = os.path.join(BASE_DIR, 'pynetdicom', '_version.py')
with open(VERSION_FILE) as fp:
exec(fp.read())
with open("README.rst", "r") as fp:
long_description = fp.read()
... | mit | 3,179,822,450,583,220,700 | 33.82 | 77 | 0.628374 | false |
qtproject/qt3d | tools/utils/exporters/blender/qt3d_armature_export.py | 2 | 5606 | #############################################################################
##
## Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB).
## Contact: https://www.qt.io/licensing/
##
## This file is part of the Qt3D module of the Qt Toolkit.
##
## $QT_BEGIN_LICENSE:LGPL$
## Commercial License Usage
## Licensees holdin... | lgpl-3.0 | 1,695,850,950,272,810,000 | 32.568862 | 106 | 0.620407 | false |
aroig/metadata-readers | libs/docmeta/utils.py | 1 | 2250 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
#
# docmeta - A python module to extract metadata from document files
# Copyright 2012 Abdó Roig-Maranges <abdo.roig@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 ... | gpl-3.0 | 8,381,212,299,770,244,000 | 32.073529 | 84 | 0.618497 | false |
jhamman/xray | xarray/backends/netCDF4_.py | 1 | 13873 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import functools
import operator
import numpy as np
from .. import Variable
from ..conventions import pop_to
from ..core import indexing
from ..core.utils import (FrozenOrderedDict, NdimSizeLenMixin,
... | apache-2.0 | -2,989,005,801,748,905,500 | 36.904372 | 79 | 0.579975 | false |
mvtuong/mysite | v1/blog/migrations/0002_auto_20150708_1454.py | 1 | 1092 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('blog', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='blog',
name='file',
... | apache-2.0 | 8,163,413,012,375,880,000 | 27 | 82 | 0.540293 | false |
arnikz/EMF_data_mining | DEA/mzscore.py | 1 | 12015 | #!/usr/bin/env python
#
# This script takes a database (SQLite) obtained from the PIQMIe service and populates
# additional tables/views to facilitate differential protein expression analyses based
# on standardized SILAC ratios.
#
# Note:
# z_score_{raw|norm}_ratio - column with canonical Z-score transformed raw/no... | gpl-3.0 | 7,526,957,426,108,315,000 | 33.426934 | 247 | 0.627549 | false |
mupi/escolamupi | timtec/settings.py | 1 | 18426 | # -*- coding: utf-8 -*-
# Django settings for timtec project.
from django.utils.translation import ugettext_lazy as _
import os
SETTINGS_DIR = os.path.dirname(os.path.realpath(__file__))
PROJECT_ROOT = os.path.dirname(SETTINGS_DIR)
DEBUG = True
TEMPLATE_DEBUG = DEBUG
SITE_ID = 1
SITE_HOME = '/'
SITE_NAME = 'Escola Mu... | agpl-3.0 | -4,608,623,161,978,571,000 | 31.045217 | 127 | 0.622381 | false |
brando56894/Dungeon-Quest | player.py | 1 | 8551 | #!/usr/bin/python2
#
#~~Player Functions~~
from superRandom import superRandint, superChoice
from time import sleep
import actions
import monsters
class CreatePlayer(object):
def __init__(self, name):
self.health = 125
self.xp = 0 #TODO: use gained XP to gain levels
self.potions = 0
... | gpl-3.0 | 426,067,084,616,806,100 | 36.017316 | 105 | 0.535376 | false |
adelina-t/compute-hyperv | hyperv/nova/serialproxy.py | 1 | 3962 | # Copyright 2015 Cloudbase Solutions Srl
# 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 r... | apache-2.0 | -2,187,697,925,085,981,000 | 31.47541 | 78 | 0.572438 | false |
Auzzy/pyinq | pyinq/tests/test_results.py | 1 | 9565 | """
Copyright (c) 2012-2013, Austin Noto-Moniz (metalnut4@netscape.net)
Permission to use, copy, modify, and/or distribute this software for any purpose
with or without fee is hereby granted, provided that the above copyright notice
and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND... | isc | 8,524,622,938,886,892,000 | 30.883333 | 124 | 0.716675 | false |
neogi/machine-learning | clustering_and_retrieval/gaussian_mixture_model/em-gmm.py | 1 | 11332 | # Imports
import sframe
import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import multivariate_normal
import copy
from PIL import Image
from io import BytesIO
import matplotlib.mlab as mlab
import colorsys
def generate_MoG_data(num_data, means, covariances, weights):
data = []
for i in range(... | gpl-3.0 | 2,065,051,852,382,707,500 | 33.867692 | 119 | 0.623544 | false |
xorpaul/check_mk | modules/automation.py | 1 | 45601 | #!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
# +------------------------------------------------------------------+
# | ____ _ _ __ __ _ __ |
# | / ___| |__ ___ ___| | __ | \/ | |/ / |
# | | | | '_ \ / _ \/ __| |/ /... | gpl-2.0 | -6,314,698,494,620,364,000 | 35.774194 | 120 | 0.551162 | false |
nilmtk/nilmtk | nilmtk/dataset_converters/greend/convert_greend.py | 1 | 6684 | from os import listdir, getcwd
from os.path import join, isdir, isfile, dirname, abspath
import pandas as pd
import numpy as np
import datetime
import time
from nilmtk.datastore import Key
from nilmtk.measurement import LEVEL_NAMES
from nilm_metadata import convert_yaml_to_hdf5
import warnings
import numpy as np
from i... | apache-2.0 | 5,599,120,602,864,636,000 | 34.553191 | 111 | 0.565679 | false |
CIGIHub/greyjay | greyjay/content_notes/apps.py | 1 | 1139 | from django.apps import AppConfig
class EndNotesAppConfig(AppConfig):
name = 'greyjay.content_notes'
label = 'content_notes'
verbose_name = "Wagtail end notes"
def ready(self):
from greyjay.articles.models import ArticlePage
from wagtail.wagtailadmin.edit_handlers import (
... | mit | 8,242,842,528,254,381,000 | 28.205128 | 69 | 0.507463 | false |
rew4332/tensorflow | tensorflow/python/ops/array_ops.py | 1 | 94317 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 7,509,335,684,078,603,000 | 32.012601 | 86 | 0.633067 | false |
kubeflow/pipelines | samples/core/parallel_join/parallel_join.py | 1 | 1802 | #!/usr/bin/env python3
# Copyright 2019 The Kubeflow 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 applica... | apache-2.0 | 2,698,934,252,417,545,000 | 30.614035 | 85 | 0.667037 | false |
SynapticNulship/Anibots | sim_py/anibots_breve_pushtest.py | 1 | 4900 | # Anibots (anigraf robots) physical/visual sim
#
# Copyright (c) 2007-2012 Samuel H. Kenyon. <sam@synapticnulship.com>
# http://synapticnulship.com
# This is open source, made available under the MIT License (see the
# accompanying file LICENSE).
#
# This python script connects my anibots C++ program (with the help of... | mit | -8,022,276,696,269,012,000 | 32.108108 | 119 | 0.696531 | false |
CSD-Public/stonix | src/tests/framework/unit_tests/zzzTestFrameworkCommandHelper.py | 1 | 4182 | #!/usr/bin/env python3
###############################################################################
# #
# Copyright 2019. Triad National Security, LLC. All rights reserved. #
# This program was produced under U.S. Government contrac... | gpl-2.0 | 561,659,646,466,533,760 | 42.113402 | 97 | 0.609995 | false |
openstack/networking-odl | networking_odl/journal/journal.py | 1 | 10979 | # Copyright (c) 2015 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | apache-2.0 | 8,686,914,835,769,035,000 | 35.596667 | 79 | 0.637034 | false |
tgbugs/pyontutils | ilxutils/ilxutils/nltklib.py | 1 | 6030 | '''
nltk.download(['wordnet', 'stopwords', 'punkt']) if not already downloaded.
Should add to wordnet if you want more words to compare as reference to.
'''
from nltk import word_tokenize, pos_tag
from nltk.corpus import wordnet as wn
from nltk.corpus import stopwords
from fuzzywuzzy import fuzz, process
stop_words = s... | mit | -8,744,749,470,656,482,000 | 27.443396 | 147 | 0.587231 | false |
Vayel/WAMPLab | transaction/v1/locator.py | 1 | 1589 | from twisted.internet.defer import inlineCallbacks
from autobahn import wamp
from autobahn.twisted.wamp import ApplicationSession
from autobahn.twisted.wamp import ApplicationRunner
class Locator(ApplicationSession):
@inlineCallbacks
def onJoin(self, details):
yield self.register(self)... | gpl-2.0 | -6,945,406,505,201,642,000 | 28.981132 | 80 | 0.563247 | false |
iiitv/algos | breadth_first_traversal/breadth_first_traversal.py | 1 | 2410 | """
Breadth-first-traversal is an algorithm for traversing a tree or
graph data structure. Starting at the tree root (or some arbitrary node of a
graph, sometimes referred to as a 'search key'[1]) and explores the neighbor
nodes at that level first, before moving to the next level.
"""
from collections import deque
... | mit | -3,733,688,494,333,147,000 | 25.195652 | 77 | 0.544813 | false |
Kortemme-Lab/protein_feature_analysis | ProteinFeatureAnalyzer/features/data_loading.py | 1 | 3308 | import os
import io
import Bio.PDB as PDB
from . import topology
from . import secondary_structures
def structure_from_pdb_file(file_path, name=''):
'''Read the structure stored in a PDB file.'''
parser = PDB.PDBParser()
return parser.get_structure(name, file_path)
def structure_from_pdb_string(pdb_string, n... | mit | -2,651,815,429,011,390,500 | 29.62963 | 102 | 0.637848 | false |
jralls/gramps | gramps/plugins/webreport/person.py | 1 | 75620 | # -*- coding: utf-8 -*-
#!/usr/bin/env python
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2007 Johan Gonqvist <johan.gronqvist@gmail.com>
# Copyright (C) 2007-2009 Gary Burton <gary.burton@zen.co.uk>
# Copyright (C) 2007-2009 Stephane Charet... | gpl-2.0 | -1,617,659,728,472,627,700 | 41.24581 | 80 | 0.463608 | false |
faddai/newfies-dialer | newfies/user_profile/views.py | 1 | 11084 | #
# Newfies-Dialer License
# http://www.newfies-dialer.org
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright (C) 2011-2012 Star2Billing S.L.
#
# The Init... | mpl-2.0 | 5,991,948,951,880,823,000 | 37.352941 | 111 | 0.603934 | false |
jiasir/pycs | vulpo/pyami/scriptbase.py | 1 | 1430 | import os
import sys
from vulpo.utils import ShellCommand, get_ts
import vulpo
import vulpo.utils
class ScriptBase(object):
def __init__(self, config_file=None):
self.instance_id = vulpo.config.get('Instance', 'instance-id', 'default')
self.name = self.__class__.__name__
self.ts = get_ts()... | mit | -3,219,314,286,743,809,500 | 31.5 | 110 | 0.565734 | false |
platipy/spyral | examples/collisions.py | 1 | 1514 | try:
import _path
except NameError:
pass
import spyral
SIZE = (640, 480)
BG_COLOR = (0, 0, 0)
class Square(spyral.Sprite):
def __init__(self, scene, direction, color=(255, 0,0)):
spyral.Sprite.__init__(self, scene)
self.image = spyral.Image(size=(16, 16)).fill(color)
self.direction... | lgpl-2.1 | -6,099,856,198,345,127,000 | 30.541667 | 84 | 0.612285 | false |
DOAJ/doaj | portality/formcontext/formcontext.py | 1 | 82183 | import json
import uuid
from datetime import datetime
from flask import render_template, url_for, request
from flask_login import current_user
import portality.formcontext.forms
from portality.crosswalks.journal_form import JournalFormXWalk
from portality.crosswalks.article_form import ArticleFormXWalk
from portality... | apache-2.0 | -3,858,372,472,115,063,000 | 43.59197 | 398 | 0.630581 | false |
mushtaqak/edx-platform | openedx/core/djangoapps/credit/api.py | 1 | 28489 | """
Contains the APIs for course credit requirements.
"""
import logging
import uuid
import datetime
import pytz
from django.db import transaction
from util.date_utils import to_timestamp
from opaque_keys import InvalidKeyError
from opaque_keys.edx.keys import CourseKey
from student.models import User
from .except... | agpl-3.0 | 8,880,496,703,872,569,000 | 35.062025 | 114 | 0.614097 | false |
qacafe/cdrouter.py | cdrouter/jobs.py | 1 | 8582 | #
# Copyright (c) 2017-2020 by QA Cafe.
# All Rights Reserved.
#
"""Module for accessing CDRouter Jobs."""
import collections
from marshmallow import Schema, fields, post_load
from .cdr_datetime import DateTime
class Options(object):
"""Model for CDRouter Job Options.
:param tags: (optional) Tags as string... | mit | -3,121,657,317,393,191,000 | 38.916279 | 178 | 0.622233 | false |
jonashaag/django-autocomplete-light | autocomplete_light/widgets.py | 1 | 6373 | """
ChoiceWidget is intended to work as a replacement for django's Select widget,
and MultipleChoiceWidget for django's SelectMultiple.
Constructing a widget needs an Autocomplete class or registered autocomplete
name.
The choice autocomplete widget renders from autocomplete_light/widget.html
template.
"""
from djan... | mit | 1,981,258,003,177,358,000 | 34.405556 | 79 | 0.630943 | false |
oliviermartin/pyOCD | pyOCD/flash/__init__.py | 1 | 2136 | """
mbed CMSIS-DAP debugger
Copyright (c) 2006-2015 ARM Limited
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 ... | apache-2.0 | 4,962,502,064,367,315,000 | 34.016393 | 73 | 0.698034 | false |
paultcochrane/pyvisi | pyvisi/renderers/vtk/item.py | 1 | 1221 | # Copyright (C) 2004-2008 Paul Cochrane
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distribut... | gpl-2.0 | -3,891,547,595,315,248,000 | 29.525 | 77 | 0.70516 | false |
hearsaycorp/normalize | normalize/property/types.py | 1 | 5422 | #
# This file is a part of the normalize python library
#
# normalize is free software: you can redistribute it and/or modify
# it under the terms of the MIT License.
#
# normalize is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FI... | mit | -1,562,669,226,994,970,400 | 30.16092 | 76 | 0.601254 | false |
kewljedi/octoprint-pushbullet | setup.py | 1 | 1047 | # coding=utf-8
import setuptools
def package_data_dirs(source, sub_folders):
import os
dirs = []
for d in sub_folders:
for dirname, _, files in os.walk(os.path.join(source, d)):
dirname = os.path.relpath(dirname, source)
for f in files:
dirs.append(os.path.join(dirname, f))
return dir... | gpl-3.0 | 8,190,900,412,091,826,000 | 23.952381 | 109 | 0.671442 | false |
mateoqac/unqTip | language/vxgbs/lang/gbs_compiler.py | 1 | 29369 | #
# Copyright (C) 2011, 2012 Pablo Barenbaum <foones@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 3 of the License, or
# (at your option) any later version.
#
# Th... | gpl-3.0 | -6,050,560,207,559,410,000 | 37.899338 | 110 | 0.548367 | false |
altair-viz/altair | altair/utils/core.py | 1 | 20886 | """
Utility routines
"""
from collections.abc import Mapping
from copy import deepcopy
import json
import itertools
import re
import sys
import traceback
import warnings
import jsonschema
import pandas as pd
import numpy as np
from .schemapi import SchemaBase, Undefined
try:
from pandas.api.types import infer_dt... | bsd-3-clause | 6,587,024,043,765,292,000 | 29.269565 | 114 | 0.584123 | false |
seanbell/opensurfaces | server/photos/migrations/0011_auto__del_field_flickruser_displayname__del_field_flickruser_subname__.py | 1 | 29209 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'FlickrUser.displayname'
db.delete_column(u'photos_flick... | mit | 2,888,323,342,558,164,000 | 86.717718 | 209 | 0.561471 | false |
sacharya/nova | nova/api/openstack/compute/schemas/v3/flavor_access_schema.py | 1 | 1776 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2013 NEC Corporation. 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.or... | apache-2.0 | -7,900,809,347,432,931,000 | 31.888889 | 78 | 0.560248 | false |
msg/g2ools | nord/g2/file.py | 1 | 33799 | #!/usr/bin/env python2
#
# Copyright (c) 2006,2007 Matt Gerassimoff
#
# This file is part of g2ools.
#
# g2ools 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 op... | gpl-2.0 | -1,795,341,959,768,795,100 | 32.564052 | 80 | 0.641912 | false |
pdftables/python-pdftables-api | test/test_pdftables_api.py | 1 | 7244 | # Copyright 2016 The Sensible Code Company
#
# 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 t... | bsd-3-clause | -621,245,369,902,256,800 | 37.531915 | 106 | 0.576615 | false |
rossant/spiky | spiky/colors.py | 1 | 2971 | import numpy as np
# from matplotlib.colors import hsv_to_rgb, rgb_to_hsv
__all__ = ['COLORMAP', 'HIGHLIGHT_COLORMAP', 'COLORS', 'COLORS_COUNT', 'generate_colors']
# Color creation routines
# -----------------------
def hue(H):
H = H.reshape((-1, 1))
R = np.abs(H * 6 - 3) - 1;
G = 2 - np.abs(H * 6 - 2);... | bsd-3-clause | -7,645,004,919,115,126,000 | 23.97479 | 89 | 0.499159 | false |
foxmask/django-th | django_th/management/commands/read.py | 1 | 1331 | #!/usr/bin/env python
# coding: utf-8
from __future__ import unicode_literals
from concurrent.futures import ThreadPoolExecutor
# django
from django.conf import settings
from django.core.management.base import BaseCommand
from django.db.models import Q
# trigger happy
from django_th.models import TriggerService
from dj... | bsd-3-clause | 6,266,242,189,755,051,000 | 31.463415 | 93 | 0.6574 | false |
jmesteve/saas3 | openerp/addons_extra/l10n_es_payment_order/wizard/converter.py | 1 | 5200 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (c) 2006 ACYSOS S.L. (http://acysos.com) All Rights Reserved.
# Pedro Tarrafeta <pedro@acysos.com>
# Copyright (c) 2008 Pablo Roc... | agpl-3.0 | -6,711,844,283,154,323,000 | 44.59292 | 214 | 0.542508 | false |
veblush/PyAuParser | sample/tutorial2.py | 1 | 1053 | import os
import sys
import pyauparser
def main():
g = pyauparser.Grammar.load_file("data/operator.egt")
# every production has a lambda handler which evaluates value from childs.
# Because LALR is a bottom-up parser, handler would be called from bottom.
h = pyauparser.ProductionHandler({
... | mit | 3,278,430,495,155,954,700 | 30.90625 | 78 | 0.449193 | false |
mattcaldwell/djangopypi | userpypi/migrations/0001_initial.py | 1 | 10447 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Classifier'
db.create_table('userpypi_classifier', (
('id', self.gf('djang... | bsd-3-clause | -2,172,781,878,352,863,500 | 67.281046 | 139 | 0.577965 | false |
tecan/xchat-rt | plugins/scripts/ss-autoaway.py | 1 | 2072 | #!/usr/bin/env python
#
# screensaverAutoAway.py - X-Chat script to monitor for the DBUS message
# emitted when the screensaver is activated and de-activated and set the user
# away.
#
# To install:
# o Copy this file to your ~/.xchat2/ directory and it will be loaded on startup.
# o To load without restart, run: /p... | gpl-2.0 | 1,878,460,759,486,318,300 | 27.383562 | 82 | 0.615347 | false |
Bajoo/client-pc | bajoo/filesync/task_builder.py | 1 | 5313 | # -*- coding: utf-8 -*-
from ..index.folder_node import FolderNode
from ..index.hints import DeletedHint, DestMoveHint, SourceMoveHint
from ..index.hint_builder import HintBuilder
from .added_local_files_task import AddedLocalFilesTask
from .added_remote_files_task import AddedRemoteFilesTask
from .folder_task import ... | gpl-3.0 | -5,430,126,019,375,362,000 | 41.166667 | 78 | 0.576699 | false |
lord63/wangyi_music_top100 | crawler/database.py | 1 | 1097 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
crawler/database.py
~~~~~~~~~~~~~~~~~~~
provide some convenient ways to get data and communicate with
the redis server
"""
from __future__ import absolute_import
from datetime import datetime
from crawler import config
class Database(object):
... | mit | -4,058,596,468,989,847,000 | 23.377778 | 78 | 0.625342 | false |
maximz/cooperate-without-looking | src/cwl.py | 1 | 24981 | # -*- coding: utf-8 -*-
"""Module cwl.
Produces simulation calculation and figures for the Cooperate With/Without Looking project.
Usage:
python cwl.py {recalculate?}
Examples:
python cwl.py run using pre-calculated saved data
python cwl.py recalculate run with freshly calculated data
@... | mit | -9,027,010,238,727,414,000 | 38.818627 | 332 | 0.616148 | false |
walkr/cryex | cryex/coins/poloniex.py | 1 | 2638 | POLONIEX_REPAIRS = {
"1cr": "1CR",
"aby": "ABY",
"adn": "ADN",
"amp": "AMP",
"arch": "ARCH",
"bbr": "BBR",
"bcn": "BCN",
"bcy": "BCY",
"bela": "BELA",
"bitcny": "BITCNY",
"bits": "BITS",
"bitusd": "BITUSD",
"blk": "BLK",
"block": "BLOCK",
"btcd": "BTCD",
"... | mit | 6,310,330,788,044,527,000 | 18.686567 | 74 | 0.392722 | false |
chrislit/abydos | tests/fingerprint/test_fingerprint_occurrence.py | 1 | 1890 | # Copyright 2018-2020 by Christopher C. Little.
# This file is part of Abydos.
#
# Abydos 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 versio... | gpl-3.0 | 6,633,291,817,443,212,000 | 31.568966 | 77 | 0.692959 | false |
Droriel/python_training | generator/contact.py | 1 | 7547 | # -*- coding: utf-8 -*-
import random
import string
from model.contact import PersonalData, PhoneNumbers, Emails, Www, AdditionalData, Notes, ContactBaseData, \
ContactAllData, BirthDate, AnniversaryDate
import jsonpickle
import os.path
import sys
import getopt
try:
opts, args=getopt.getopt(sys.argv[1:], 'n:f:... | apache-2.0 | -4,843,098,957,106,365,000 | 50.69863 | 119 | 0.481118 | false |
asoliveira/NumShip | source/Navio-back.py | 1 | 56391 | # -*- coding: utf-8 -*-
#
#This file is part of a program called NumShip
#Copyright (C) 2011,2012 Alex Sandro Oliveira
#NumShip 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 | -2,103,145,341,740,217,300 | 33.131995 | 79 | 0.426835 | false |
zombiezen/pymage | pymage/config.py | 1 | 21300 | #!/usr/bin/env python
#
# config.py
# pymage
#
# Copyright (C) 2006-2007 Ross Light
#
# This file is part of pymage.
#
# pymage 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 versi... | gpl-3.0 | -6,821,084,749,787,888,000 | 31.223903 | 80 | 0.601596 | false |
ASMlover/study | cplusplus/wren_cc/test/bench_fib.py | 1 | 1588 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# Copyright (c) 2019 ASMlover. 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... | bsd-2-clause | -9,005,991,868,441,173,000 | 37.731707 | 70 | 0.742443 | false |
CCS-Lab/hBayesDM | Python/hbayesdm/models/_dd_hyperbolic_single.py | 1 | 9923 | from typing import Sequence, Union, Any
from collections import OrderedDict
from numpy import Inf, exp
import pandas as pd
from hbayesdm.base import TaskModel
from hbayesdm.preprocess_funcs import dd_single_preprocess_func
__all__ = ['dd_hyperbolic_single']
class DdHyperbolicSingle(TaskModel):
def __init__(sel... | gpl-3.0 | 7,724,618,514,999,984,000 | 40.518828 | 145 | 0.640331 | false |
kashev/pysc | util/anagram_dict_builder.py | 1 | 1580 | #!/usr/bin/env python3
# pysc
# Kashev Dalmia | @kashev | kashev.dalmia@gmail.com
# anagram_dict_builder.py
""" A script which builds an anagram dictionary from a dictionary. """
# Credit: Jeff Knupp
# https://github.com/jeffknupp/presser/blob/master/make_anagrams.py
import collections
import os
import string
def b... | mit | 3,450,408,199,887,984,000 | 31.244898 | 73 | 0.605063 | false |
dbenoit17/ansible_agnostic_deployer | ansible/inventory/ravello.py | 1 | 7162 | #!/usr/bin/python
'''
Ravello external inventory script
==================================================
Generates inventory that Ansible can understand by making an API request to Ravello.
Modeled after https://raw.githubusercontent.com/jameslabocki/ansible_api/master/python/ansible_tower_cloudforms_inventory.py
R... | gpl-3.0 | 1,995,015,316,470,555,400 | 32.004608 | 134 | 0.586289 | false |
guillaume-havard/testdjango | sitetest/stats/middleware.py | 1 | 1123 | from django.db.models import F
from stats.models import Page
class StatsMiddleware(object):
def process_view(self, request, view_func, view_args, view_kwargs):
""" Incrémente le nombre de page vues à chaque appel de vues """
try:
# Le compteur lié à la page est récupéré et incrémenté
... | mit | -3,092,915,929,755,777,500 | 39.925926 | 92 | 0.631341 | false |
pythonistas-tw/academy | web-api/maomao/web_test.py | 1 | 3005 | import os
import web
import unittest
import tempfile
from lxml import etree
case = [
"/count?op={}&value1=1&value2=1", "/count?op={}&value1=52&value2=7",
"/count?op={}&value1=100.5&value2=33.1", "/count?op={}",
"/count?op={}&value1=1", "/count?op={}&value2=10",
"/count?op={}&value1=&value2=10", "/count?op={}&value1=kk... | gpl-2.0 | 7,145,401,281,587,108,000 | 37.050633 | 142 | 0.570383 | false |
priyom/priyomdb | Schema/Patches/patch_3.py | 1 | 1691 | """
File name: patch_3.py
This file is part of: priyomdb
LICENSE
The contents of this file are subject to the Mozilla Public License
Version 1.1 (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.mozilla.org/MPL/
Software distributed u... | gpl-3.0 | -6,247,857,135,208,938,000 | 34.978723 | 78 | 0.735068 | false |
pedrohml/smartbot | smartbot/joke_behaviour.py | 1 | 2199 | # coding: utf-8
from smartbot import Behaviour
from smartbot import Utils
from smartbot import ExternalAPI
import re
import os
import random
class JokeBehaviour(Behaviour):
def __init__(self, bot):
super(JokeBehaviour, self).__init__(bot)
self.language = self.bot.config.get('main', 'language') if... | mit | 4,034,820,672,840,083,500 | 44.770833 | 126 | 0.622667 | false |
nop33/indico-plugins | importer/indico_importer/controllers.py | 1 | 4381 | # This file is part of Indico.
# Copyright (C) 2002 - 2017 European Organization for Nuclear Research (CERN).
#
# Indico 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 (a... | gpl-3.0 | -1,073,251,264,224,585,700 | 37.769912 | 117 | 0.671764 | false |
mhubig/intelhex | scripts/hex2dump.py | 1 | 3960 | #!/usr/bin/python
# Copyright (c) 2008,2010,2011,2012,2013 Alexander Belchenko
# 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 cop... | bsd-3-clause | -4,853,036,239,676,083,000 | 31.727273 | 92 | 0.603283 | false |
oliver-sanders/cylc | cylc/flow/network/schema.py | 1 | 52672 | # THIS FILE IS PART OF THE CYLC SUITE ENGINE.
# Copyright (C) 2008-2019 NIWA & British Crown (Met Office) & Contributors.
#
# 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 th... | gpl-3.0 | 7,159,439,198,366,642,000 | 30.371054 | 79 | 0.621867 | false |
yuanming-hu/taichi | examples/mgpcg_advanced.py | 1 | 9080 | import math
import time
import numpy as np
import taichi as ti
@ti.data_oriented
class MGPCG:
'''
Grid-based MGPCG solver for the possion equation.
See `examples/stable_fluid.py <https://github.com/taichi-dev/taichi/blob/master/examples/stable_fluid.py>`_ for a usage example.
.. note::
This solver only r... | mit | 2,937,493,401,941,731,300 | 30.527778 | 128 | 0.508921 | false |
Brunel-Visualization/Brunel | python/brunel/brunel_util.py | 1 | 1472 | # Copyright (c) 2015 IBM Corporation and others.
#
# 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 | 7,878,519,849,403,592,000 | 39.888889 | 137 | 0.69769 | false |
scenarios/tensorflow | tensorflow/contrib/distributions/python/ops/bijector.py | 2 | 92884 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -2,422,548,313,249,080,300 | 36.574434 | 145 | 0.632617 | false |
byronrau/tweepyScripts | twitterUserTimeline/twitterUserTimeline.py | 1 | 3599 | #!/usr/bin/python
import tweepy
import sys
import os
import codecs
import unicodecsv as csv
# API and ACCESS KEYS
API_KEY = 'jz3feMK2gN0kaN377FsTXY7uY'
API_SECRET = 'sGfCEayfwORloC9SvHy6BmDjifUsUEIF0EF51SgiYUgs054n7H'
# Don't buffer stdout, so we can tail the log output redirected to a file
sys.stdout = os.fdopen(sys... | mit | 5,696,373,822,382,111,000 | 30.578947 | 311 | 0.639066 | false |
djfroofy/beatlounge | tutor/song5.py | 1 | 2172 | from itertools import cycle
from bl.ugen import W
from bl.arp import ChordPatternArp, OrderedArp, RandomArp, ArpMap
from bl.scheduler import clock
from bl.orchestra.midi import ChordPlayer
from tutor.complib import piano_f
pattern = [3, 3, [3, 1], 1, 2, 1, 2, 1, [3, 2, 1, 0, 4], 0, 1, 2, 3, 4, 3, 2,
[3, ... | mit | 760,528,155,715,385,200 | 36.448276 | 78 | 0.422652 | false |
MathGen/oppgavegenerator | oppgavegen/views/game_views.py | 1 | 8226 | from django.contrib.auth.decorators import login_required
from django.shortcuts import render_to_response, redirect
from django.http import HttpResponseForbidden
from django.template import RequestContext
from oppgavegen.generation_folder.generation import generate_level
from oppgavegen.view_logic.rating import *
from... | bsd-3-clause | -671,454,598,317,702,500 | 44.181319 | 119 | 0.60501 | false |
mtommasi/pygiftparser | setup.py | 1 | 1462 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import os
from setuptools import setup
try:
long_description = open("README.rst").read()
except IOError:
long_description = ""
LOCALEDIR = os.path.join('share', 'locale')
setup(
name="pygiftparser",
version="1.1",
url="https://github.com/mtommasi/pygiftp... | mit | -5,657,474,728,144,140,000 | 33 | 147 | 0.53078 | false |
agartland/utils | custom_legends.py | 1 | 2291 | import matplotlib.pyplot as plt
import numpy as np
__all__ = ['colorLegend',
'symbolLegend']
def colorLegend(colors, labels, alphas=None, edgecolor='black',loc='best', axh=None, **legendKwargs):
"""Custom matplotlib legend with colors and labels etc.
Useful in cases where it is a... | mit | 6,611,612,067,164,619,000 | 34.951613 | 186 | 0.61196 | false |
radez/packstack | packstack/installer/utils/shell.py | 1 | 4512 | # -*- coding: utf-8 -*-
import re
import types
import logging
import subprocess
from ..exceptions import (ExecuteRuntimeError, ScriptRuntimeError,
NetworkError)
from .strings import mask_string
block_fmt = ("\n============= %(title)s ==========\n%(content)s\n"
"======== END OF... | apache-2.0 | -8,818,339,688,155,416,000 | 33.707692 | 77 | 0.526596 | false |
hivesolutions/netius | src/netius/clients/mjpg.py | 1 | 4936 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Hive Netius System
# Copyright (c) 2008-2020 Hive Solutions Lda.
#
# This file is part of Hive Netius System.
#
# Hive Netius System is free software: you can redistribute it and/or modify
# it under the terms of the Apache License as published by the Apache
# Foun... | apache-2.0 | 5,063,929,398,906,030,000 | 32.263889 | 85 | 0.625659 | false |
gameduell/pysupplies | tests/test_params.py | 1 | 3109 | import pytest
from supplies.annotate import delay
from supplies.params import param, Params
__author__ = 'dwae'
class Foo(Params):
@param
def bar(self, val: (1, 42)=23):
return val
@delay
def bla(self):
return ...
class Bar(Foo, Params):
@param
def baz(self, val: str='f00')... | mit | -5,483,111,285,384,543,000 | 15.537234 | 41 | 0.525893 | false |
onyb/cpp | DSATP/LinkedList/test_CH3_S6_Single_Linked_Lists.py | 1 | 2988 | import unittest
from LinkedList.CH3_S6_Single_Linked_Lists import LinkedList
from LinkedList.CH3_S6_Single_Linked_Lists import Node
from LinkedList.CH3_S6_Single_Linked_Lists import ElementNotFoundException
class TestSingleLinkedList(unittest.TestCase):
def test_node(self):
node_a = Node()
node_a... | mit | -401,720,435,719,677,000 | 31.846154 | 85 | 0.594712 | false |
jedie/DragonPy | PyDC/PyDC/wave2bitstream.py | 1 | 23203 | #!/usr/bin/env python2
"""
:copyleft: 2013 by Jens Diemer
:license: GNU GPL v3 or above, see LICENSE for more details.
"""
import array
import functools
import itertools
import logging
import math
import struct
import time
import wave
from PyDC.utils import (
ProcessInfo,
TextLevelMeter,
average,... | gpl-3.0 | 9,016,746,850,299,839,000 | 35.425432 | 238 | 0.545274 | false |
andyliuliming/azure-linux-extensions | VMBackup/main/handle.py | 1 | 27941 | #!/usr/bin/env python
#
# VM Backup extension
#
# Copyright 2014 Microsoft Corporation
#
# 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
#
# U... | apache-2.0 | 1,799,172,088,873,042,700 | 49.344144 | 206 | 0.642318 | false |
michimussato/pypelyne2 | pypelyne2/src/parser/tests/test_parse_outputs.py | 1 | 1455 | import unittest
import pypelyne2.src.parser.parse_outputs as parse_outputs
import pypelyne2.src.modules.output.output as output
class ParseOutputsTester(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.output_objects = parse_outputs.get_outputs()
def test_get_outputs(self):
""" ... | gpl-2.0 | -5,201,670,322,074,896,000 | 36.307692 | 71 | 0.666667 | false |
kinnou02/navitia | source/jormungandr/jormungandr/street_network/tests/streetnetwork_backend_manager_test.py | 1 | 16126 | # Copyright (c) 2001-2016, Canal TP and/or its affiliates. All rights reserved.
#
# This file is part of Navitia,
# the software to build cool stuff with public transport.
#
# Hope you'll enjoy and contribute to this project,
# powered by Canal TP (www.canaltp.fr).
# Help us simplify mobility and open public transp... | agpl-3.0 | -8,971,987,324,433,375,000 | 35.817352 | 103 | 0.622163 | false |
ddico/odoo | addons/fleet/models/fleet_vehicle_cost.py | 1 | 9422 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models, _
from odoo.exceptions import UserError
from dateutil.relativedelta import relativedelta
class FleetVehicleLogContract(models.Model):
_inherit = ['mail.thread', 'mail.activity.... | agpl-3.0 | 1,315,773,969,023,667,500 | 48.335079 | 156 | 0.641159 | false |
bird-house/bird-feeder | birdfeeder/walker.py | 1 | 5030 | import os
from netCDF4 import Dataset as NCDataset
from dateutil import parser as dateparser
from datetime import datetime
from birdfeeder.utils import humanize_filesize
import logging
logger = logging.getLogger(__name__)
SPATIAL_VARIABLES = [
'longitude', 'lon',
'latitude', 'lat',
'altitude', 'alt', 'l... | apache-2.0 | -8,682,199,717,071,598,000 | 28.763314 | 102 | 0.56501 | false |
dvcolgan/ludumdare27 | game/management/commands/generate_map_pngs.py | 1 | 2676 | from django.core.management.base import BaseCommand, CommandError
from game.models import *
from settings import MIN_COL, MAX_COL, MIN_ROW, MAX_ROW, GRID_SIZE
from PIL import Image
from PIL import ImageDraw
def hex_to_rgb(value):
value = value.lstrip('#')
lv = len(value)
if lv == 1:
v = int(value,... | mit | -4,220,150,537,329,599,500 | 36.690141 | 94 | 0.501495 | false |
petr-kalinin/progrobot | tools/import_python3.py | 1 | 9519 | #!/usr/bin/python3
from pymongo import MongoClient
import os
import os.path
import re
import bs4
import itertools
from bs4 import BeautifulSoup
import utils
class ReferenceItem:
def __init__(self):
self.name = ""
self.module = ""
self.usage = ""
self.short = ""
self.full = ... | agpl-3.0 | 1,616,040,906,343,496,200 | 30.916107 | 138 | 0.551887 | false |
arunkgupta/gramps | gramps/gen/filters/rules/person/_haslds.py | 1 | 1723 | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2008 Brian G. Matherly
# Copyright (C) 2008 Jerome Rapinat
# Copyright (C) 2008 Benny Malengier
#
# 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 Fre... | gpl-2.0 | 813,847,480,302,232,000 | 33.46 | 75 | 0.536274 | false |
vitobasso/audio-ml | src/train_raw.py | 1 | 2372 | __author__ = 'victor'
from pybrain.datasets import SupervisedDataSet
from pybrain.supervised.trainers import RPropMinusTrainer
from pybrain import FeedForwardNetwork, FullConnection, IdentityConnection, TanhLayer
from datasource import *
# dataset
timeWidth = 5140 # num of samples to input to the net
mixer = Mix... | gpl-2.0 | -8,458,553,163,728,513,000 | 28.296296 | 118 | 0.670742 | false |
NCAR/mizuRoute | manage_externals/test/test_unit_repository_git.py | 1 | 31259 | #!/usr/bin/env python
"""Unit test driver for checkout_externals
Note: this script assume the path to the checkout_externals.py module is
already in the python path.
"""
# pylint: disable=too-many-lines,protected-access
from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ i... | gpl-3.0 | 9,038,250,738,399,458,000 | 37.73482 | 84 | 0.595572 | false |
brefsdal/sherpa | sherpa/estmethods/__init__.py | 1 | 43921 | #_PYTHON_INSERT_SAO_COPYRIGHT_HERE_(2007)_
#_PYTHON_INSERT_GPL_LICENSE_HERE_
import numpy
_ = numpy.seterr(invalid='ignore')
from sherpa.utils import NoNewAttributesAfterInit, print_fields, Knuth_close, is_iterable, list_to_open_interval, mysgn, quad_coef, apache_muller, bisection, demuller, zeroin, OutOfBoundErr, fun... | gpl-2.0 | 2,263,206,828,706,974,500 | 34.88317 | 219 | 0.526787 | false |
olivierverdier/sfepy | sfepy/postprocess/dataset_manager.py | 1 | 9486 | """
Code to help with managing a TVTK data set in Pythonic ways.
"""
# Author: Prabhu Ramachandran <prabhu@aero.iitb.ac.in>
# Copyright (c) 2008, Enthought, Inc.
# License: BSD Style.
from enthought.traits.api import (HasTraits, Instance, Array, Str,
Property, Dict)
from enthought.tvtk.api im... | bsd-3-clause | -8,936,205,743,073,525,000 | 35.767442 | 81 | 0.519713 | false |
iproduct/course-social-robotics | 11-dnn-keras/venv/Lib/site-packages/matplotlib/sphinxext/mathmpl.py | 1 | 3759 | import hashlib
from pathlib import Path
from docutils import nodes
from docutils.parsers.rst import Directive, directives
import sphinx
import matplotlib as mpl
from matplotlib import cbook
from matplotlib.mathtext import MathTextParser
mathtext_parser = MathTextParser("Bitmap")
# Define LaTeX math node:
class late... | gpl-2.0 | 8,906,122,994,853,540,000 | 28.833333 | 73 | 0.611865 | false |
mitodl/bootcamp-ecommerce | profiles/utils_test.py | 1 | 2363 | """User utils tests"""
import pytest
from profiles.utils import ensure_active_user, is_duplicate_username_error, usernameify
@pytest.mark.parametrize(
"full_name,email,expected_username",
[
[" John Doe ", None, "john-doe"],
["Tabby Tabberson", None, "tabby-tabberson"],
["Àccèntèd Ñame... | bsd-3-clause | -5,640,492,194,927,244,000 | 35.809524 | 118 | 0.660198 | false |
akshayms/eho | eho/server/storage/models.py | 1 | 8401 | # Copyright (c) 2013 Mirantis Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | apache-2.0 | 8,855,471,069,699,424,000 | 34.901709 | 79 | 0.578145 | false |
VJftw/invoke-tools | invoke_tools/lxc/docker.py | 1 | 5987 | """
invoke_tools.lxc.docker
"""
from __future__ import print_function
import os
import json
import getpass
class Docker:
"""
Docker
"""
@staticmethod
def __print_line(line):
"""
"""
try:
line = line.decode('utf-8')
except:
print("Could not d... | mit | 3,646,104,151,735,492,000 | 28.063107 | 176 | 0.496743 | false |
msoula/cosmicbox | board/cosmicbox/cosmicboxfs/lib/psogen.py | 1 | 4151 | #!/usr/bin/python
# Modificated ShoutBox Library
# enables further modifications for the ShoutBox
# Run without to generate htmlfile
# Run the following to enter a new line from command line
# psogen.py input Anonymous default "Text"
import os, re
import messages, broadcast
datafilename = os.environ["SHOU... | gpl-2.0 | -128,107,883,562,125,100 | 28.65 | 158 | 0.611419 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.