repo_name stringlengths 8 92 | path stringlengths 5 221 | copies stringclasses 10
values | size stringlengths 4 6 | content stringlengths 974 828k | license stringclasses 15
values | hash int64 -9,212,977,344,346,658,000 9,220,224,517B | line_mean float64 8.67 91.6 | line_max int64 15 966 | alpha_frac float64 0.29 0.86 | autogenerated bool 1
class | nl_text stringlengths 0 164k | nl_size int64 0 164k | nl_language stringclasses 17
values | nl_language_score float64 0.04 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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 | This test is used to make sure the ION endpoint code is properly setting the
!/usr/bin/env python Start container and servicesInstantiate a process to represent the testGet info on the ION System ActorGet function pointer to send function make new send to patch on that duplicates sendOnly duplicate the message send fr... | 12,737 | en | 0.927941 |
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 | Regression test for dnsrmacl
Make sure you are running this against a database that can be destroyed.
DO NOT EVER RUN THIS TEST AGAINST A PRODUCTION DATABASE.
!/usr/bin/python Copyright (c) 2009, Purdue University All rights reserved. Redistribution and use in source and binary forms, with or without modification, ... | 1,678 | en | 0.887852 |
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 | 4.14 4.15 5.5 module 1 year module 1 year 5.6 5.7 r. < 0 inlined ellipse.delta_t_t0_aeangle() 1 year (of the minor planet) module 1 year (of the minor planet) print(Time(t0_calculated, format='jd', scale='utc').isot) | 216 | en | 0.263069 |
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 | 1 dimensional gaussian:
gaussian(x, amplitude, center, sigma)
-*- 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 G... | 1,025 | en | 0.85092 |
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 | Version"Development Status :: 4 - Beta", | 40 | en | 0.572044 |
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 | Qt3D Exporter
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 holding valid commercial Qt licenses may use this file in accordance with the commercial licens... | 1,902 | en | 0.824212 |
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 | Conversion error
!/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 publish... | 813 | en | 0.843897 |
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 | Store for reading and writing data via the Python-NetCDF4 library.
This store supports NetCDF3, NetCDF4 and OpenDAP datasets.
This lookup table maps from dtype.byteorder to a readable endian string used by netCDF4. use object dtype because that's the only way in numpy to represent variable length strings; it also pr... | 2,018 | en | 0.796944 |
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 | -*- coding: utf-8 -*- | 21 | en | 0.767281 |
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 | !/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/normalized ... | 1,504 | en | 0.729564 |
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 | -*- coding: utf-8 -*- Django settings for timtec project. Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. Or path to database file if using sqlite3. The following settings are not used with sqlite3: Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP. Set to empty string for d... | 4,484 | en | 0.641648 |
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 | !/usr/bin/python2~~Player Functions~~TODO: use gained XP to gain levelsnot neededTODO: add more weaponsdoesn't show correct weapons after a new weapon is foundeven if weapon is in inventory, method itself works perfectly. | 221 | en | 0.884289 |
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 | 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 required by applicabl... | 609 | en | 0.867022 |
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 | 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 THE... | 834 | en | 0.835555 |
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 | Imports Use np.random.choice and weights to pick a cluster id greater than or equal to 0 and less than num_clusters. Use np.random.multivariate_normal to create data from this cluster Compute (x-mu)^T * Sigma^{-1} * (x-mu) Compute loglikelihood contribution for this data point and this cluster Increment loglikelihood ... | 2,600 | en | 0.738768 |
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 | !/usr/bin/python -*- encoding: utf-8; py-indent-offset: 4 -*- +------------------------------------------------------------------+ | ____ _ _ __ __ _ __ | | / ___| |__ ___ ___| | __ | \/ | |/ / | | | | | '_ \ / _ \/ __| |/ / | |\/| |... | 7,359 | en | 0.838188 |
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 | Return a list of dataframes from a GREEND CSV file
GREEND files can be interpreted as multiple CSV blocks concatenated into
a single file per date. Since the columns of the individual blocks can
vary in a single file, they need to be read separately.
There are some issues we need to handle in the converter:
- the he... | 1,689 | en | 0.809723 |
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 | 0 | en | 0.110449 | |
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 | Shape function for array_ops.batch_matrix_diag_part.
Shape function for array_ops.batch_matrix_diag.
Shape function for array_ops.batch_matrix_set_diag.
Shape function for the BatchToSpace op.
The output shape is determined by the following inputs/ attributes:
* input: A rank-4 tensor with shape
[B*block_size*... | 42,732 | en | 0.716032 |
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 | A three-step pipeline with first two running in parallel.
!/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/license... | 639 | en | 0.856881 |
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 | 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 SWIG) to the Br... | 1,644 | en | 0.445784 |
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 | Perform tests on different parts of the functionality for framework CommandHelper
:param unittest: TestCase: unittest TestCase class inheritance object reference
@author: ekkehard
@change: Breen Malmberg - 04/11/2018 - removed assertion tests -
you can't test for exception assertions in code that is wrappe... | 2,499 | en | 0.892335 |
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 | Thread worker for the OpenDaylight Journal Database.
Enrich the port with additional information needed by ODL
Allows to stop the sync thread.
Args:
timeout (float): Time in seconds to wait for joining or None for
no timeout.
Copyright (c) 2015 OpenStack Foundation All Rights Reserved. Li... | 2,324 | en | 0.896889 |
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 | Convert between a Penn Treebank tag to a simplified Wordnet tag
compute the sentence similarity using Wordnet
nltk.download(['wordnet', 'stopwords', 'punkt']) if not already downloaded.
Should add to wordnet if you want more words to compare as reference to.
wn_tag is None if no definition is found try: most probab... | 976 | en | 0.762467 |
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 | Try to mark the current position and to go to the next one. Fail if
the current position is not markable or if the next position does not
exist.
Always done | 160 | en | 0.900152 |
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 | Performs a breadth-first traversal on a graph
Args:
graph (list of list of int): Adjacency matrix representation of graph
source (int): Index of source vertex to begin search from
Returns:
list of dicts describing each vertex in the searched graph
-> [{distance: _, predecessor: _ }]
Breadth-first-... | 584 | en | 0.895277 |
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 | Find secondary structures of a protein.
Arguements:
- protein_dict - a dictionary to store informations of a protein
Load data from structures in the input path.
The input data should be stored in .pml files of superposed homologous
superfamilies from the CATH database.
Load data from a .pml file of superposed
homol... | 711 | en | 0.800112 |
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 | This class is responsible for displaying information about the 'Person'
database objects. It displays this information under the 'Individuals'
tab. It is told by the 'add_instances' call which 'Person's to display,
and remembers the list of persons. A single call to 'display_pages'
displays both the Individual List (In... | 11,993 | en | 0.744864 |
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 | Notification icon style
Notification Status (e.g. seen/unseen) need to be change.
It is a common function for admin and customer UI
**Attributes**:
* ``pk`` - primary key of notice record
**Logic Description**:
* Selected Notification's status need to be changed.
Changed status can be seen or unseen.
... | 1,668 | en | 0.78441 |
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 | 0 | en | 0.110449 | |
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 | Collision test the director is the manager for your scenes This will run your game. It will not return. | 103 | en | 0.931498 |
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 | Associate Editors Application Review form. This is to be used in a context where an associate editor (fewest rights)
needs to access an application for review. This editor cannot change the editorial group or the assigned editor.
They also cannot change the owner of the application. They cannot set an application to "A... | 12,656 | en | 0.925703 |
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 | Returns the credit providers and eligibility durations.
The eligibility_duration is the max of the credit duration of
all the credit providers of given course.
Args:
credit_course(CreditCourse): The CreditCourse object
Returns:
Tuple of eligibility_duration and credit providers of given course
Get the ids of... | 13,738 | en | 0.746611 |
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 | Model for CDRouter Jobs.
:param id: (optional) Job ID as an int.
:param status: (optional) Bool `True` if user is an administrator.
:param options: (optional) :class:`jobs.Options <jobs.Options>` object
:param package_id: (optional) Package ID as an int.
:param package_name: (optional) Package name as string.
:param c... | 3,284 | en | 0.680754 |
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 | Widget that provides an autocomplete for zero to one choice.
Widget that provides an autocomplete for zero to n choices.
Widget that just adds an autocomplete to fill a text input
Base widget for autocompletes.
Mainly handles passing arguments from Python to HTML data-* attributes,
via widget_js_attributes and autoco... | 737 | en | 0.670181 |
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 | 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 law or agre... | 584 | en | 0.8526 |
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 | This is the base class for items within a scene
Initialisation of Item class
This is base class for items within a scene
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 Fo... | 882 | en | 0.878726 |
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 | ``normalize.property.types`` provides an assortment of pre-generated
types
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;... | 607 | en | 0.872982 |
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 | coding=utf-8 | 12 | en | 0.61419 |
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 | Base exception for Gobstones compiler errors.
Compiler of Gobstones programs.
Represents a unique label in the program.
Compile a potentially polymorphic function call.
Add a VM instruction for calling the builtin 'next' function,
which operates on any iterable value.
Compile a short-circuiting conjunction.
Compile an ... | 4,980 | en | 0.640605 |
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 | Infer the dtype of the value.
This is a compatibility function for pandas infer_dtype,
with skipna=False regardless of the pandas version.
Infer typed keyword arguments for args and kwargs
Parameters
----------
args : tuple
List of function args
kwargs : dict
Dict of function kwargs
channels : module
The ... | 7,198 | en | 0.475819 |
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 | -*- coding: utf-8 -*- Deleting field 'FlickrUser.displayname' Deleting field 'FlickrUser.subname' Adding field 'FlickrUser.display_name' Adding field 'FlickrUser.sub_name' Adding field 'FlickrUser.displayname' Adding field 'FlickrUser.subname' Deleting field 'FlickrUser.display_name' Deleting field 'FlickrUser.sub_name... | 321 | en | 0.402135 |
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 | 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.org/licenses/LICENSE... | 757 | en | 0.836121 |
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 | CableList Section subclass
CtrlAssignments Section subclass
CurrentNote Section subclass
Description class for patch/performance description.
G2Error - exception for throwing an unrecoverable error.
GlobalKnobAssignments Section subclasss
KnobAssignments Section subclass
Labels Section subclass
ModuleList Section subcl... | 4,201 | en | 0.753435 |
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 | 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 to in writing, soft... | 562 | en | 0.865758 |
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 | from matplotlib.colors import hsv_to_rgb, rgb_to_hsv Color creation routines ----------------------- H = H[((i==15) |(i==17) | (i==18) | (i==19))] change V for half of the colors change S for half of the colors Global variables with all colors -------------------------------- generate a list of RGB values for each colo... | 741 | en | 0.48659 |
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 | get all the triggers that need to be handled
!/usr/bin/env python coding: utf-8 django trigger happy create logger | 115 | en | 0.667737 |
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 | Discards non-numeric chars
Converts special characters such as those with accents to their ASCII equivalents
-*- 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> Copyrigh... | 1,423 | en | 0.788033 |
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 | every production has a lambda handler which evaluates value from childs. Because LALR is a bottom-up parser, handler would be called from bottom. | 145 | en | 0.968777 |
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 | encoding: utf-8 Adding model 'Classifier' Adding model 'Project' Adding M2M table for field classifiers on 'Project' Adding model 'Release' Adding unique constraint on 'Release', fields ['project', 'version', 'platform', 'distribution', 'pyversion'] Deleting model 'Classifier' Deleting model 'Project' Removing M2M tabl... | 493 | en | 0.465337 |
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 | Called when screensaver stops or starts
state is either:
- True: Screensaver activated
- False: Screensaver deactivated
!/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 t... | 773 | en | 0.806005 |
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 | Create sync task by acquiring node and release node when task is done.
A task is created from the node, depending of the node's type and its
state (new or existing node, type of hints).
When the task has been executed, it can release the reserved node(s).
A task can reserve several nodes, by example when there is a "... | 1,734 | en | 0.904861 |
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 | crawler/database.py
~~~~~~~~~~~~~~~~~~~
provide some convenient ways to get data and communicate with
the redis server
!/usr/bin/env python -*- coding: utf-8 -*- | 163 | en | 0.580882 |
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 | -*- coding: utf-8 -*- GENERAL system imports save as PDFs Choose whether to recalculate or to used saved data Interactive mode Game theory methodsP1 and P2 prefer a cooperative interaction to no interactionP1 gets short-term gains from defectionP2 2 doesn't want to interact with 1 if he expects 1 to defect in either ga... | 2,717 | en | 0.721332 |
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 | Add *_BTC pair Add *_USD pair | 29 | ru | 0.156765 |
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 | Test Cisłak & Grabowski's occurrence fingerprint functions.
abydos.fingerprint.Occurrence
Test abydos.fingerprint.Occurrence.
abydos.tests.fingerprint.test_fingerprint_occurrence.
This module contains unit tests for abydos.fingerprint.Occurrence
Copyright 2018-2020 by Christopher C. Little. This file is part of Aby... | 961 | en | 0.808128 |
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 | -*- coding: utf-8 -*- + "'"*3 + string.punctuation | 72 | en | 0.660208 |
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 | 0 | en | 0.110449 | |
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 | A ``ConfigParser`` that is case-sensitive.
Warning emitted when odd game site constructs are used.
Retrieves the attributes of a DOM node as a dictionary.
If ``include_ns`` is ``True``, then . If ``ascii`` is ``True``, then
:Parameters:
elem : DOM node
The element to extract attributes from
:Keywords:
... | 9,736 | en | 0.645183 |
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 | !/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 notice, this li... | 1,335 | en | 0.875237 |
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 | Delay Discounting Task - Hyperbolic Model
Individual Bayesian Modeling of the Delay Discounting Task
using Hyperbolic Model [Mazur1987]_ with the following parameters:
"k" (discounting rate), "beta" (inverse temperature).
.. [Mazur1987] Mazur, J. E. (1987). An adjustment procedure for studying delayed reinforceme... | 7,204 | en | 0.760809 |
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 | main function.
A script which builds an anagram dictionary from a dictionary.
!/usr/bin/env python3 pysc Kashev Dalmia | @kashev | kashev.dalmia@gmail.com anagram_dict_builder.py Credit: Jeff Knupp https://github.com/jeffknupp/presser/blob/master/make_anagrams.py Check to see if the word contains only letters in the... | 456 | en | 0.738014 |
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 | !/usr/bin/pythonread user credentials from .ravello_login file in user HOMEDIR Inventory grouped by instance IDs, tags, security groups, regions, and availability zones Index of hostname (address) to instance ID Read CLI arguments If --apps is set then run get_apps_allif self.args.apps is True: self.get_apps_all() If ... | 665 | en | 0.695458 |
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 | Affiche le nombre de fois que la page a été vue
Incrémente le nombre de page vues à chaque appel de vues
Le compteur lié à la page est récupéré et incrémenté Un nouveau compteur à 1 par défaut est créé Ici l'objet F permet de faire des requette directement en base de donnée (plus rapide) Attention normalement nous ... | 383 | fr | 0.997898 |
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 | 0 | en | 0.110449 | |
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 | 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 under... | 874 | en | 0.844482 |
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 | coding: utf-8 | 13 | en | 0.832876 |
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 | Return the end_dt of the latest timetable entry inside the block or the block start_dt if it is empty
Get the end_dt of the latest timetable entry or the event start_dt if no entry exist on that date
Base class for the importer operations
This file is part of Indico. Copyright (C) 2002 - 2017 European Organization fo... | 937 | en | 0.882873 |
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 | !/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 copyright notice, this ... | 1,579 | en | 0.887894 |
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 | A task/family runtime setting as a key, value pair.
An integer or date-time cyclepoint.
A glob for integer or date-time cyclepoints.
The wildcard character (`*`) can be used to perform globbing.
For example `2000*` might match `2000-01-01T00:00Z`.
A job submission from an active task.
A glob search for an active task ... | 5,332 | en | 0.812703 |
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 | 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 runs on CPU and CUDA backends since it requires the
``pointer`` SNode.
:parameter dim: Dimensional... | 1,629 | en | 0.49289 |
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 | 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 to in writing, so... | 768 | en | 0.887591 |
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 | Bijector which computes `Y = g(X; shift, scale) = matmul(scale, X) + shift` where `scale = c * I + diag(D1) + tril(L) + V @ diag(D2) @ V.T`.
Write `A @ X` for `matmul(A, X)`. In TF parlance, the `scale` term is
logically equivalent to:
```python
scale = (
scale_identity_multiplier * tf.diag(tf.ones(d)) +
tf.diag(... | 42,319 | en | 0.720122 |
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 | !/usr/bin/python API and ACCESS KEYS Don't buffer stdout, so we can tail the log output redirected to a file Max Tweets Filename List of users read from users.txtopen users.txt file and gets the list of users Just exit if any error | 231 | en | 0.761261 |
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 | 0 | en | 0.110449 | |
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 | Returns a render of answers.html
Gets a template for a given level
Both lists get updated in chapter_progress In case we want to do something special if the set is a requirement type setif request.method == 'POST':if check_for_level_skip(request.user, Chapter.objects.get(pk=chapter_id), level_id): return render_to... | 374 | en | 0.590888 |
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 | !/usr/bin/python3 -*- coding: utf-8 -*- | 39 | en | 0.37652 |
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 | Custom matplotlib legend with colors and labels etc.
Useful in cases where it is awkward to include labels on the appropriate plot() objects.
Parameters specify the characteristics of each line in the legend.
Parameters
----------
colors : list of valid matplotlib colors
labels : list of strings
alphas : list of alpha... | 934 | en | 0.470422 |
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 | Runs shell command cmd. If can_fail is set to False
ExecuteRuntimeError is raised if command returned non-zero return
code. Otherwise
-*- coding: utf-8 -*- pylint: disable=E1101 | 179 | en | 0.685311 |
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 | !/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 Foundation, either version 2.0 of ... | 1,543 | en | 0.896558 |
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 | 0 | en | 0.110449 | |
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 | Insert at beginning Insert at end Insert at position Delete from beginning Delete last node Delete node Delete a non-existent node Delete value Delete position Clear linked list | 177 | en | 0.952112 |
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 | Example output:
394Hz ( 28 Samples) exist: 1
613Hz ( 18 Samples) exist: 1
788Hz ( 14 Samples) exist: 1
919Hz ( 12 Samples) exist: 329 *********
1002Hz ( 11 Samples) exist: 1704 **********************************************
1103Hz ( 10 Samples) exist: 1256 ******************************... | 4,541 | en | 0.471762 |
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 | !/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 Unless required by applica... | 1,375 | en | 0.743423 |
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 | Test checks if the output object has this method
Test checks if the output object has this method
Test checks if the output object has this method
Test checks if the outputs are output objects
Test checks if the output object has this method
Test checks if the output object has this method
Test checks if the outp... | 345 | en | 0.766442 |
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 | Test that streetnetwork backends are created from db when conditions are met
Test that streetnetwork backends with wrong parameters aren't created
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 yo... | 1,819 | en | 0.8983 |
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 | return a dict with as value for each contract an integer
if contract is in an open state and is overdue, return 0
if contract is in a closed state, return -1
otherwise return the number of days before the contract expires
-*- coding: utf-8 -*- Part of Odoo. See LICENSE file for full copyright and licensing details. T... | 620 | en | 0.959442 |
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 | loop over global attributes must format dates in Solr format, if possible disregard this attribute loop over dimensions loop over variable attributes skip dimension variables loop over files in this directory only parse .nc files | 229 | en | 0.440201 |
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 | http://effbot.org/imagingbook/imagedraw.htm | 43 | en | 0.451942 |
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 | !/usr/bin/python3+ "full: " + self.full + "\n\n"+ "fullest: " + self.fullest + "\n\n"print("Testing string `" + text + "`")print("found module", module)print("Tag: `", tag, "`")if currentName: print(currentName, tag.name, "`"+refs[currentName].full+"`", "\n\n")print("insert: ", ref.to_dict())print("index: ", doc)pro... | 651 | en | 0.464918 |
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 | Rule that checks for a person with a LDS event
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 Li... | 1,402 | en | 0.65914 |
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 | dataset num of samples to input to the net training layers connections net.addConnection(FullConnection(net['h1'], net['h3'])) net.addConnection(FullConnection(net['h1'], net['out'])) net.addConnection(FullConnection(net['h2'], net['out'])) print 'saving net...' err = trainer.train() train an extra time just to get th... | 371 | en | 0.494509 |
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 | Test the create_remote_name method on the GitRepository class
Test whether the GitRepository _check_sync_logic functionality is
correct.
Note: there are a lot of combinations of state:
- external description - tag, branch
- working copy
- doesn't exist (not checked out)
- exists, no git info - incorrect pro... | 7,723 | en | 0.694043 |
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 | _PYTHON_INSERT_SAO_COPYRIGHT_HERE_(2007)__PYTHON_INSERT_GPL_LICENSE_HERE_ For every method listed here, we have the same goal: derive confidence limits for thawed parameters. Thawed parameters are allowed to vary during a fit; when a model has been fit to data, then the current parameter values are presumably the bes... | 8,490 | en | 0.754471 |
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 | Activate (or deactivate) a particular array.
Given the nature of the data (scalars, vectors etc.) and the
type of data (cell or points) it activates the array given by
its name.
Parameters:
-----------
data_type: one of 'scalars', 'vectors', 'tensors'
category: one of 'cell', 'point'.
name: string of array name to a... | 2,574 | en | 0.736292 |
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 | Define LaTeX math node: This uses mathtext to render the expression LaTeX to HTML translation stuff: Add visit/depart methods to HTML-Translator: Add visit/depart methods to LaTeX-Translator: | 191 | en | 0.706607 |
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 | Test that ensure_active_user activates
is_duplicate_username_error should return True if the exception text provided indicates a duplicate username error
usernameify should turn a user's name into a username, or use the email if necessary
usernameify should raise an exception if the full name and email both fail to pro... | 423 | en | 0.585005 |
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 | 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 writing, software dist... | 635 | en | 0.847753 |
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 | Docker
invoke_tools.lxc.docker
user='root' if CI else 'app' | 97 | fa | 0.063803 |
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 | !/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"-------------- Generates Shoutbox-HTML-Frame ... Imports: cont... | 1,056 | en | 0.521878 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.