repo_name stringlengths 5 92 | path stringlengths 4 221 | copies stringclasses 19
values | size stringlengths 4 6 | content stringlengths 766 896k | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 32 997 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 13.6 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Azure/azure-sdk-for-python | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/models/_models_py3.py | 1 | 122965 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | mit | 8,577,119,578,000,281,000 | 44.593252 | 710 | 0.653023 | false | 3.577996 | false | false | false |
DLR-SC/tigl | bindings/java/make_tigl_java.py | 1 | 2467 | # -*-# coding: utf-8 -*-
"""
Created on Wed May 01 11:44:49 2013
@author: Martin Siggel <martin.siggel@dlr.de>
"""
from __future__ import print_function
import sys, os
from datetime import date
tiglpath = os.path.dirname(os.path.realpath(__file__)) + '/../..'
sys.path.append(tiglpath + '/bindings')
import bindings_... | apache-2.0 | 3,887,434,982,440,820,000 | 28.023529 | 95 | 0.675719 | false | 3.370219 | false | false | false |
gnovak/overheard | overheard/fetch.py | 1 | 16979 | #########
# Notes #
#########
#
# Archive.org won't accept wget user agent string---it can be anything else
#
# When fetching source files from arxiv.org:
# 0408420 gives most recent
# 0408420vN gives version N
# 0408420vN if N > number of versions gives most recent version
# (the behavior is same for old and new... | mit | 6,797,017,471,657,627,000 | 38.12212 | 98 | 0.649214 | false | 3.596484 | false | false | false |
nextgis/nextgisweb_compulink | nextgisweb_compulink/compulink_video_producer/default_video_page.py | 1 | 3503 | from __future__ import print_function
from time import sleep
from datetime import datetime
UNITS = ('Minutes', 'Hours', 'Days', 'Months')
PHOTO = ('false', 'true')
class DefaultVideoPage:
_base_url = '/compulink/player/recording_video?resource_id={res_id}&units={units}&count_units={count_units}&photo={photo}'
... | gpl-2.0 | -3,272,793,355,578,168,000 | 31.738318 | 143 | 0.601484 | false | 3.742521 | false | false | false |
nushio3/UFCORIN | script/suntomorrow-AE/train_predictor.py | 1 | 4659 | #!/usr/bin/env python
"""Chainer example: autoencoder of a solar image.
"""
# c.f.
# http://nonbiri-tereka.hatenablog.com/entry/2015/06/21/220506
# http://qiita.com/kenmatsu4/items/99d4a54d5a57405ecaf8
import argparse
import numpy as np
import operator
import re
import six
import subprocess
import random
import cha... | mit | -2,319,461,076,983,837,700 | 27.937888 | 76 | 0.636403 | false | 2.825349 | false | false | false |
frascoweb/easywebassets | easywebassets/assets.py | 1 | 1303 | from webassets import Environment, six
from webassets.env import RegisterError
from .package import Package
class Assets(object):
def __init__(self, env=None, **kwargs):
if env:
self.env = env
else:
self.env = Environment(**kwargs)
self.packages = {}
def regist... | mit | -8,230,702,585,525,816,000 | 30.047619 | 83 | 0.539524 | false | 4.343333 | false | false | false |
pvtodorov/indra | indra/tools/reading/readers.py | 1 | 29900 | """Objects for interacting with bulk nlp reading tools."""
from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
import sys
import shutil
import re
import tempfile
import glob
import json
import logging
import subprocess
import zlib
from os import path, mkdir, environ,... | bsd-2-clause | -9,117,507,397,536,953,000 | 36.704918 | 84 | 0.53097 | false | 4.255622 | false | false | false |
luotao1/Paddle | python/paddle/fluid/tests/unittests/mkldnn/test_reduce_mkldnn_op.py | 1 | 7454 | # Copyright (c) 2021 PaddlePaddle 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 app... | apache-2.0 | 7,532,327,643,227,592,000 | 37.42268 | 87 | 0.629729 | false | 3.193659 | true | false | false |
google/compare-codecs | lib/libavc.py | 1 | 2828 | # Copyright 2015 Google.
#
# 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, softw... | apache-2.0 | 6,120,185,066,405,847,000 | 36.706667 | 80 | 0.644625 | false | 3.801075 | false | false | false |
codelv/enaml-native | src/enamlnative/android/android_card_view.py | 1 | 2026 | """
Copyright (c) 2017, Jairus Martin.
Distributed under the terms of the MIT License.
The full license is in the file LICENSE, distributed with this software.
Created on June 7, 2017
@author: jrm
"""
from atom.api import Typed, set_default
from enamlnative.widgets.card_view import ProxyCardView
from .android_fra... | mit | 1,165,668,592,682,198,000 | 31.15873 | 79 | 0.572557 | false | 4.347639 | false | false | false |
bretthandrews/marvin | python/marvin/tests/utils/test_dap.py | 1 | 1889 | #!/usr/bin/env python3
# encoding: utf-8
#
# test_dap.py
#
# Created by José Sánchez-Gallego on 19 Sep 2016.
from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
import unittest
from marvin import config
from marvin.tests import MarvinTest
from marvin.utils.da... | bsd-3-clause | 6,837,162,416,948,016,000 | 32.105263 | 88 | 0.695284 | false | 3.494444 | true | false | false |
epicvrvs/craw_module | script/bncs.py | 1 | 2263 | import nil.string, nil.thread, utility, craw, packets, time, configuration, threading
class bncs_packet_handler_class:
def __init__(self):
self.lock = threading.Lock()
self.whois_name_queue = []
self.whois_handler_queue = []
self.account_map = {}
self.entering_game = False
self.has_thread = False
def ... | gpl-3.0 | 1,690,256,831,581,942,000 | 29.186667 | 94 | 0.660186 | false | 2.897567 | false | false | false |
quattor/aquilon | lib/aquilon/worker/commands/update_room.py | 1 | 1367 | # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-
# ex: set expandtab softtabstop=4 shiftwidth=4:
#
# Copyright (C) 2008,2009,2010,2011,2012,2013,2016,2018 Contributor
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obt... | apache-2.0 | 2,823,669,900,772,170,000 | 38.085714 | 76 | 0.716898 | false | 3.883523 | false | false | false |
Open-Power-System-Data/conventional_power_plants | download_and_process_DE_functions.py | 1 | 14757 | # -*- coding: utf-8 -*-
import urllib.parse
import urllib.request
import posixpath
import datetime
import os
import logging
import filecmp
import difflib
import json
import sqlite3
import hashlib
import yaml
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
#from bokeh.io import output_notebook
# ... | mit | -2,219,552,584,659,425,300 | 36.812821 | 187 | 0.636604 | false | 3.71461 | true | false | false |
mbreese/tabql | tabql/__init__.py | 1 | 4777 | # Copyright (c) 2014, Marcus Breese
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and the... | bsd-3-clause | 3,301,811,955,980,845,600 | 35.465649 | 157 | 0.589491 | false | 4.246222 | false | false | false |
nortorious-flame89/Movie_Website | entertainment_center.py | 1 | 2595 | import media
import fresh_tomatoes
# Instances from the base class 'Movie' __init__ function
# Google URL shortner was used to make the URLs more manageable
# and follow PEP8 Style Guide
iron_giant = media.Movie("The Iron Giant",
"Boy befriends a giant robot during the Cold War",
... | mit | 5,438,155,041,154,323,000 | 41.540984 | 106 | 0.532563 | false | 3.43254 | false | false | false |
HybridF5/jacket | jacket/compute/conf/conductor.py | 1 | 1915 | # Copyright (c) 2010 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,136,491,807,294,262,000 | 29.887097 | 78 | 0.69295 | false | 3.948454 | false | false | false |
orlenko/sfpirg | sfpirgapp/migrations/0002_auto__add_field_testimonial_user.py | 1 | 12798 | # -*- coding: 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 field 'Testimonial.user'
db.add_column(u'sfpirgapp_testimonial', 'user',
self... | bsd-2-clause | 6,183,903,364,456,007,000 | 78.496894 | 187 | 0.54696 | false | 3.601013 | true | false | false |
dustin/py-backpack | cgi/wapsupport.py | 1 | 1430 | #!/usr/bin/env /usr/local/bin/python
"""
WML support.
Copyright (c) 2005 Dustin Sallings <dustin@spy.net>
"""
import sys
import cgi
import ConfigParser
import backpack
CONFIG_FILE="/usr/local/etc/backpack.conf"
# Get the config loaded
conf=ConfigParser.ConfigParser()
conf.read(CONFIG_FILE)
HEADER="""<?xml versio... | mit | 2,400,140,651,592,449,000 | 23.237288 | 76 | 0.611189 | false | 2.930328 | true | false | false |
tuanvu216/udacity-course | intro_to_machine_learning/lesson/lesson_4_choose_your_own_algorithm/your_algorithm.py | 1 | 2628 | #!/usr/bin/python
import matplotlib.pyplot as plt
from prep_terrain_data import makeTerrainData
from class_vis import prettyPicture
from time import time
features_train, labels_train, features_test, labels_test = makeTerrainData()
### the training data (features_train, labels_train) have both "fast" and "slow" point... | mit | -667,427,817,523,286,500 | 30.285714 | 99 | 0.711187 | false | 3.236453 | true | false | false |
geertj/rhevsh | setup.py | 1 | 1294 | #
# This file is part of rhevsh. rhevsh is free software that is made
# available under the MIT license. Consult the file "LICENSE" that is
# distributed together with this file for the exact licensing terms.
#
# rhevsh is copyright (c) 2011 by the rhevsh authors. See the file
# "AUTHORS" for a complete overview.
impo... | mit | 6,211,877,290,003,639,000 | 30.560976 | 74 | 0.634467 | false | 3.545205 | false | false | false |
icereval/osf-sync | osfoffline/sync/local.py | 1 | 6234 | import logging
from pathlib import Path
import threading
from watchdog.observers import Observer
from sqlalchemy.orm.exc import NoResultFound
from osfoffline import utils
from osfoffline.utils.authentication import get_current_user
from osfoffline.exceptions import NodeNotFound
from osfoffline.sync.ext.watchdog impor... | lgpl-3.0 | 613,275,511,589,267,700 | 42.594406 | 108 | 0.620789 | false | 4.484892 | false | false | false |
gspilio/nova | setup.py | 1 | 2927 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compli... | apache-2.0 | 7,221,491,232,337,402,000 | 38.026667 | 78 | 0.604715 | false | 4.199426 | false | false | false |
anenbergb/Footage-Manipulation | postprocessing/visualize.py | 1 | 3850 | import Image, ImageDraw
import itertools
import random
import pdb
import os
defaultwidth = 1
colors = ["#FF00FF",
"#FF0000",
"#FF8000",
"#FFD100",
"#008000",
"#0080FF",
"#0000FF",
"#000080",
"#800080"]
color_label_map = {'Pedestrian':colo... | mit | -6,719,373,337,939,552,000 | 28.615385 | 119 | 0.543896 | false | 3.705486 | false | false | false |
brenthuisman/phd_tools | maskfileto4d.py | 1 | 1057 | #!/usr/bin/env python
import sys,image
from subprocess import call
if len(sys.argv) < 2:
print "Specify a maskfile."
sys.exit()
maskfile = sys.argv[-1]
spacing = 2
size = 399
maskimagefile = sys.argv[-1][:-4]+'.mhd'
spacingstr = str(spacing)
sizeinvox = str(size/spacing)
call(["rtkdrawgeometricphantom","--phantom... | lgpl-3.0 | -4,783,733,606,612,285,000 | 39.692308 | 167 | 0.71807 | false | 2.91989 | false | false | false |
aspiers/ly2video | ly2video/utils.py | 1 | 2831 | #!/usr/bin/env python3
# coding=utf-8
# ly2video - generate performances video from LilyPond source files
# Copyright (C) 2012 Jiri "FireTight" Szabo
# Copyright (C) 2012 Adam Spiers
# Copyright (C) 2014 Emmanuel Leguy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the... | gpl-3.0 | -5,907,988,846,029,149,000 | 22.991525 | 80 | 0.668668 | false | 3.547619 | false | false | false |
Azure/azure-sdk-for-python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_03_01/operations/_vpn_link_connections_operations.py | 1 | 6070 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | mit | 5,005,576,459,868,780,000 | 47.174603 | 236 | 0.646458 | false | 4.540015 | true | false | false |
amozie/amozie | studzie/keras_gym/mountain_car_v0.py | 1 | 2577 | import numpy as np
import matplotlib.pyplot as plt
import gym
import time
import copy
from keras.models import Sequential, Model
from keras.layers import Dense, Activation, Flatten, Lambda, Input, Reshape, concatenate, Merge
from keras.optimizers import Adam, RMSprop
from keras.callbacks import History
from keras imp... | apache-2.0 | 1,136,327,064,526,148,100 | 28.295455 | 112 | 0.698487 | false | 3.104819 | false | false | false |
BigPoppaG/CourseMe | db_data.py | 1 | 14472 | #!flask/bin/python
from courseme import db
from courseme.models import Module, User, ROLE_USER, ROLE_ADMIN, Objective, Institution, Question, Subject, Topic
from datetime import datetime
maths = Subject(
name = "Mathematics"
)
biology = Subject(
name = "Biology"
)
misc = Subject(
name = "Misc... | mit | 2,412,441,968,369,456,000 | 29.087318 | 323 | 0.603234 | false | 3.451467 | false | false | false |
eshijia/magnum | magnum/db/sqlalchemy/api.py | 1 | 39042 | # Copyright 2013 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | apache-2.0 | 5,895,803,285,767,630,000 | 36.978599 | 79 | 0.596102 | false | 4.088168 | false | false | false |
twitter/zktraffic | zktraffic/network/sniffer.py | 1 | 4062 | # ==================================================================================================
# Copyright 2015 Twitter, Inc.
# --------------------------------------------------------------------------------------------------
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use thi... | apache-2.0 | 3,702,111,362,593,863,000 | 30.007634 | 100 | 0.612752 | false | 3.702826 | false | false | false |
astrikov-d/dartcms | dartcms/apps/shop/models.py | 1 | 2156 | # coding: utf-8
from dartcms.utils.loading import is_model_registered
from django.db.models.signals import post_save, pre_delete, pre_save
from .abstract_models import *
from .signals import *
__all__ = []
if not is_model_registered('shop', 'ProductCatalog'):
class ProductCatalog(AbstractProductCatalog):
... | mit | -5,669,258,377,814,378,000 | 25.292683 | 68 | 0.699907 | false | 3.870736 | false | false | false |
er432/TASSELpy | TASSELpy/utils/helper.py | 1 | 7197 | import re
import javabridge
## Dictionary holding the symbols for primatives in javabridge signatures
primative_dict = {'boolean':'Z','byte':'B','char':'C','short':'S',
'int':'I','long':'J','float':'F','double':'D',
'void':'V'}
## Constructs the signature needed by javabridge for a... | bsd-3-clause | -37,858,812,142,794,400 | 40.362069 | 98 | 0.545227 | false | 3.996113 | false | false | false |
plamut/superdesk-core | superdesk/errors.py | 1 | 18386 | # -*- coding: utf-8; -*-
#
# This file is part of Superdesk.
#
# Copyright 2013, 2014 Sourcefabric z.u. and contributors.
#
# For the full copyright and license information, please see the
# AUTHORS and LICENSE files distributed with this source code, or
# at https://www.sourcefabric.org/superdesk/license
import logg... | agpl-3.0 | 6,312,404,106,729,446,000 | 32.489982 | 120 | 0.665724 | false | 4.24227 | false | false | false |
anntzer/scikit-learn | sklearn/linear_model/_least_angle.py | 3 | 71554 | """
Least Angle Regression algorithm. See the documentation on the
Generalized Linear Model for a complete discussion.
"""
# Author: Fabian Pedregosa <fabian.pedregosa@inria.fr>
# Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Gael Varoquaux
#
# License: BSD 3 clause
from math import log
import sys... | bsd-3-clause | 3,500,082,720,243,523,600 | 36.502096 | 79 | 0.588451 | false | 3.966848 | false | false | false |
mlperf/inference_results_v0.5 | closed/Google/code/ssd-large/tpu-ssd-large/home/kbuilder/mlperf-inference/google3/third_party/mlperf/inference/ssd/offline/accuracy_coco.py | 1 | 3987 | """Tool to calculate accuracy for loadgen accuracy output found in mlperf_log_accuracy.json We assume that loadgen's query index is in the same order as the images in coco's annotations/instances_val2017.json."""
from __future__ import division
from __future__ import print_function
from __future__ import unicode_liter... | apache-2.0 | -307,164,166,966,539,650 | 30.393701 | 212 | 0.635315 | false | 3.308714 | false | false | false |
Chedi/django-iban-field | django_iban/specification.py | 1 | 7562 | from collections import namedtuple
from django_iban.utils import clean_iban
IBANPartSpecification = namedtuple('IBANPartSpecification', ["length", "data_type"])
class IBANSpecification(object):
MASK_DATATYPE_MAP = {
'a':'a',
'n':'9',
'c':'w',
}
REGEX_DATATYPE_MAP = {
'a'... | gpl-3.0 | 7,448,661,612,872,638,000 | 49.751678 | 86 | 0.495239 | false | 2.831149 | false | false | false |
jeffersonfparil/GTWAS_POOL_RADseq_SIM | BACKUP_SCRIPTS_20170930/assignPheno.py | 1 | 4355 | #!/usr/bin/env python
import os, subprocess, sys, math
import numpy as np
import matplotlib.pyplot as plt
work_DIR = sys.argv[1]
genoFile = sys.argv[2]
nQTL = int(sys.argv[3])
heritability = float(sys.argv[4])
model = int(sys.argv[5])
os.chdir(work_DIR)
if model == 1:
################################################... | gpl-3.0 | 717,945,124,301,054,200 | 40.09434 | 132 | 0.660161 | false | 2.446629 | false | false | false |
iamhssingh/django-userprofile | drf_user/__init__.py | 1 | 2784 | """Django REST Framework - User! User App for Django with API Views"""
__title__ = "User - Django REST Framework"
__version__ = "0.0.8"
__author__ = "101Loop"
__license__ = "GPLv3"
default_app_config = "drf_user.apps.DRFUserConfig"
user_settings = {
"DEFAULT_ACTIVE_STATE": False,
"OTP": {
"LENGTH": 5... | gpl-3.0 | -6,464,121,690,914,684,000 | 33.37037 | 88 | 0.529454 | false | 4.2118 | false | false | false |
EIREXE/Olddulous | alembic/versions/6ffd5dd5efab_switch_ksp_version_to_game_version.py | 1 | 1201 | """switch ksp_version to game_version
Revision ID: 6ffd5dd5efab
Revises: 4e0500347ce7
Create Date: 2016-04-08 22:58:14.178434
"""
# revision identifiers, used by Alembic.
revision = '6ffd5dd5efab'
down_revision = '4e0500347ce7'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_column('modve... | mit | 2,003,685,324,859,270,000 | 41.892857 | 243 | 0.745212 | false | 3.228495 | false | false | false |
batmancn/MyLife | works/WebOVS/backend/app.py | 1 | 13251 | #!/usr/bin/env python
import os
import pam
import web
import ovsdb
import ofctrl
import simplejson as json
urls = (
'/', 'Index',
'/login', 'Login',
'/logout', 'Logout',
'/availableports', 'SwitchPorts',
'/swconf', 'SwitchConf',
'/switchinfo', 'SwitchInfo',
'/helptext', 'HelpText',
# All B... | gpl-3.0 | -1,458,616,825,737,984,500 | 26.434783 | 106 | 0.534148 | false | 3.376911 | false | false | false |
TEAM-HRA/hra_suite | HRAGUI/src/hra_gui/qt/widgets/list_widget_widget.py | 1 | 1567 | '''
Created on 21 kwi 2013
@author: jurek
'''
from hra_core.special import ImportErrorMessage
try:
from PyQt4.QtGui import * # @UnusedWildImport
from PyQt4.QtCore import * # @UnusedWildImport
from hra_core.misc import Params
from hra_core.collections_utils import nvl
from hra_gui.qt.utils.signals... | lgpl-3.0 | -4,704,762,434,656,400,000 | 35.44186 | 77 | 0.637524 | false | 3.937186 | false | false | false |
pjuu/pjuu | pjuu/auth/views.py | 1 | 14803 | # -*- coding: utf8 -*-
"""Flask endpoints provide the URL endpoints for the auth system.
:license: AGPL v3, see LICENSE for more details
:copyright: 2014-2021 Joe Doherty
"""
# 3rd party imports
from flask import (
current_app as app, flash, redirect, render_template, request, url_for,
session, jsonify, Blu... | agpl-3.0 | -3,284,603,166,870,039,600 | 35.550617 | 79 | 0.577383 | false | 4.204203 | false | false | false |
google/TensorNetwork | tensornetwork/block_sparse/caching.py | 1 | 2665 | # Copyright 2019 The TensorNetwork Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | apache-2.0 | -2,057,196,932,858,687,500 | 29.284091 | 78 | 0.72045 | false | 3.68603 | false | false | false |
suyashbire1/pyhton_scripts_mom6 | plot_twapv_budget_complete.py | 1 | 18150 | import sys
import readParams_moreoptions as rdp1
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
from mom_plot1 import m6plot, xdegtokm
import numpy as np
from netCDF4 import MFDataset as mfdset, Dataset as dset
import time
from plot_twamomx_budget_complete_direct_newest import extr... | gpl-3.0 | -3,115,476,061,697,227,300 | 46.889182 | 192 | 0.520441 | false | 2.570457 | false | false | false |
osks/gearman-dashboard | gearmandashboard/models.py | 1 | 1059 | import gearman
gearman_hostports = [('gearman01', 4730), ('gearman02', 4730)]
gearman_connections = {}
for hostport in gearman_hostports:
gearman_connections[hostport] = gearman.GearmanAdminClient([hostport])
def get_info_from_gearman():
server_infos = []
for hostport in gearman_hostports:
server... | mit | 1,503,034,650,286,523,600 | 33.16129 | 74 | 0.561851 | false | 3.715789 | false | false | false |
gbenson/i8c | src/i8c/compiler/commands.py | 1 | 1574 | # -*- coding: utf-8 -*-
# Copyright (C) 2016 Red Hat, Inc.
# This file is part of the Infinity Note Compiler.
#
# The Infinity Note Compiler 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
... | lgpl-2.1 | -8,448,123,867,574,675,000 | 33.217391 | 74 | 0.70521 | false | 3.569161 | false | false | false |
ccubed/Yakei | ConfParser.py | 1 | 3478 | # Parse Yakei Config Files
import os
class ConfMissingError(Exception):
def __init__(self):
self.value = "Yakei.conf not found"
def __str__(self):
return repr(self.value)
class ConfBadlyFormed(Exception):
def __init__(self, value):
self.value = value
def __str__(sel... | mit | -8,791,185,630,320,041,000 | 43.168831 | 145 | 0.515239 | false | 4.552356 | false | false | false |
dude56987/TVD | tvd.py | 1 | 7141 | #! /usr/bin/python
########################################################################
# Backend to dynamicly create and destroy virtual machines
# Copyright (C) 2015 Carl J Smith
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as pub... | gpl-3.0 | -6,031,507,660,459,854,000 | 42.018072 | 146 | 0.633525 | false | 3.572286 | false | false | false |
scpZone13/ProjectDIOMEDES | bot/NanoTrasenBot.py | 1 | 70001 | # -*- coding: utf-8 -*-
# This script is shared under the
# Creative Commons Attribution-ShareAlike 3.0 license (CC BY-SA 3.0)
# Added clause to Attribution:
# - You may not remove or hide the '<Bot_name> who created you?' functionality
# and you may not modify the name given in the response.
#CREDITS
# Author: Skibi... | agpl-3.0 | 7,691,879,388,208,059,000 | 43.726518 | 283 | 0.486878 | false | 4.040231 | false | false | false |
xh4x0r3r/xh4x0r3r_blog | xh4x0r3r_blog/articles/views.py | 1 | 3504 | from django.shortcuts import render
from xh4x0r3r_blog.utils import db, build_args
import re
MAX_POST_PREVIEW = 10
#=================== index =====================
def index (request, year=None, month=None) :
page = 1
pages = 0
query = ''
title = "All Articles"
articles = db.get_articles()
q... | gpl-3.0 | -8,890,105,144,331,939,000 | 31.146789 | 91 | 0.506279 | false | 3.67681 | false | false | false |
geodynamics/citcoms | visual/Mayavi2/citcoms_display/plugins/HDF5UGrid.py | 1 | 9376 | #
# Script to generate VTKUnstructuredGrid objects from CitcomS hdf files
#
# author: Martin Weier
# Copyright (C) 2006 California Institue of Technology
#
# 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
# t... | gpl-2.0 | 5,070,815,270,683,033,000 | 35.768627 | 107 | 0.52901 | false | 3.628483 | false | false | false |
hwang3419/awu | awu/awu/settings.py | 1 | 4783 | """
Django settings for awu project.
Generated by 'django-admin startproject' using Django 1.8.5.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build paths in... | mit | -8,222,593,545,976,650,000 | 32.921986 | 171 | 0.658164 | false | 3.504029 | false | false | false |
germandiagogomez/meson | mesonbuild/mesonlib.py | 1 | 10591 | # Copyright 2012-2015 The Meson development team
# 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 agree... | apache-2.0 | 8,285,344,205,178,610,000 | 31.191489 | 152 | 0.575961 | false | 3.574418 | false | false | false |
Royce/GammaJS | support/APIgen/generate.py | 1 | 4851 | ########################
###
### IMPORTS
###
########################
########################
### BUILTIN
########################
from datetime import date
import codecs
import shutil
import time
import sys
import re
import os
########################
### LOCAL
###################... | mit | -6,461,517,144,902,101,000 | 27.875 | 100 | 0.472686 | false | 4.470968 | false | false | false |
brianr747/sfc_gui | sfc_gui/install_examples.py | 1 | 2146 | # coding=utf-8
"""
install_examples.py
Dialogs that installs scripts to a desired directory. Simple front end to
sfc_models.examples.install_example_scripts
Migrated to sfc_models.examples
License/Disclaimer
------------------
Copyright 2017 Brian Romanchuk
Licensed under the Apache License, Version 2.0 (the "Lic... | apache-2.0 | 6,469,923,128,646,511,000 | 30.101449 | 161 | 0.72973 | false | 4.199609 | false | false | false |
CreditEaseDBA/Themis | rule_analysis/libs/text/sql_text.py | 1 | 4090 | # -*- coding: utf-8 -*-
import sqlparse
class SqlText(object):
def __init__(self, mongo_client, start_date,
stop_date, schema, hostname, db_client=None):
self.db_client = db_client
self.mongo_client = mongo_client
self.start_date = start_date
self.stop_date = stop... | apache-2.0 | -1,347,671,995,002,225,200 | 32.180328 | 79 | 0.465662 | false | 3.666667 | false | false | false |
roderickmackenzie/gpvdm | gpvdm_gui/gui/dump_select.py | 1 | 9125 | #
# General-purpose Photovoltaic Device Model - a drift diffusion base/Shockley-Read-Hall
# model for 1st, 2nd and 3rd generation solar cells.
# Copyright (C) 2012-2017 Roderick C. I. MacKenzie r.c.i.mackenzie at googlemail.com
#
# https://www.gpvdm.com
# Room B86 Coates, University Park, Nottingham, NG7 2RD... | gpl-2.0 | 6,935,567,816,194,428,000 | 23.076517 | 198 | 0.673315 | false | 2.797364 | false | false | false |
rfoxfa/python-utils | utils/plotting.py | 1 | 1798 | """
Plotting functions.
"""
from __future__ import absolute_import
import matplotlib.pyplot as plt
import numpy as np
def hhist(items, title=None, axislabel=None, color=None, height=None, width=None, reverse=False):
"""
Plots a horizontal histogram of values and frequencies.
Arguments:
items (it... | gpl-2.0 | -2,366,417,125,346,160,000 | 36.458333 | 100 | 0.624583 | false | 4.123853 | false | false | false |
declarativitydotnet/p2 | doc/chord.generator.py | 1 | 1284 | #!/usr/bin/python
## This file is distributed under the terms in the attached LICENSE file.
## If you do not find this file, copies can be found by writing to:
## Intel Research Berkeley, 2150 Shattuck Avenue, Suite 1300,
## Berkeley, CA, 94704. Attention: Intel License Inquiry.
## Or
## UC Berkeley EECS Computer Sci... | bsd-3-clause | -8,504,691,728,586,956,000 | 26.913043 | 73 | 0.573988 | false | 2.885393 | false | false | false |
lrnt/aerial | mivb.py | 1 | 7528 | import inspect, asyncio, sys, json
from aiohttp import web
from utils import get_etree
from asyncio_redis import Connection
from collections import Iterable
API_BASE_URL = 'http://m.mivb.be/api/'
API_DEFAULT_PARAMS = {'lang': 'nl'}
API_LINES_URL = API_BASE_URL + 'getlinesnew.php'
API_ROUTE_URL = API_BASE_URL + 'getiti... | mit | -2,791,483,782,329,642,000 | 28.992032 | 80 | 0.545829 | false | 3.817444 | false | false | false |
zenn1989/scoria-interlude | L2Jscoria-Game/data/scripts/quests/640_TheZeroHour/__init__.py | 1 | 3023 | # Made by Kerberos v1.0 on 2009/05/08
# this script is part of the Official L2J Datapack Project.
# Visit http://www.l2jdp.com/forum for more details.
import sys
from com.l2scoria import Config
from com.l2scoria.gameserver.model.quest import State
from com.l2scoria.gameserver.model.quest import QuestState
from com.l2s... | gpl-3.0 | 6,227,081,143,170,916,000 | 29.24 | 157 | 0.582865 | false | 3.072154 | false | false | false |
swordfeng/pyjs | nodeaio/nodeaio.py | 1 | 1710 | #!/usr/bin/python3
import asyncio
import threading
loop = asyncio.get_event_loop()
class LoopThread(threading.Thread):
def __init__(self):
super(LoopThread, self).__init__()
self.finalizing = False
def run(self):
asyncio.set_event_loop(loop)
loop.run_forever()
pending = a... | mit | 5,335,262,165,422,186,000 | 29.535714 | 67 | 0.592398 | false | 4.071429 | false | false | false |
smoser/granite | granite/virt/lxc/hostops.py | 1 | 2587 | # Copyright (c) 2014 Canonical Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | apache-2.0 | -6,146,650,257,715,685,000 | 32.166667 | 78 | 0.583301 | false | 3.849702 | false | false | false |
leppa/home-assistant | homeassistant/helpers/condition.py | 1 | 15835 | """Offer reusable conditions."""
import asyncio
from datetime import datetime, timedelta
import functools as ft
import logging
import sys
from typing import Callable, Container, Optional, Union, cast
from homeassistant.components import zone as zone_cmp
from homeassistant.components.device_automation import (
asyn... | apache-2.0 | -1,179,085,761,861,840,000 | 28.821092 | 88 | 0.645406 | false | 3.969667 | true | false | false |
Rotendahl/DormitoryLife | DormitoryDollars/DormitoryDollars/settings.py | 1 | 3717 | """
Django settings for DormitoryDollars project.
Generated by 'django-admin startproject' using Django 1.10.4.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
... | gpl-3.0 | -2,950,938,890,999,165,400 | 25.934783 | 91 | 0.699489 | false | 3.372958 | false | false | false |
vasekhodina/blivet_gv_visualization | actionsProcessor.py | 1 | 2727 | import emoji
import pallete
import node
import gvInput
class ActionsProcessor():
""" Class containing neccessary methods for putting actions scheduled by blivet into graph"""
def __init__(self, actions_list, node_list, edge_list, path_to_pallete):
self.actions = actions_list
self.node_list = no... | gpl-2.0 | -2,745,088,409,339,983,400 | 47.696429 | 140 | 0.623396 | false | 3.923741 | false | false | false |
mduggan/toumeika | shikin/pdf/tmpdir.py | 1 | 3164 | """
A backport of the Python 3.2 TemporaryDirectory object.
From:
https://stackoverflow.com/questions/19296146/tempfile-temporarydirectory-context-manager-in-python-2-7
"""
from __future__ import print_function
import warnings as _warnings
import os as _os
import sys as _sys
from tempfile import mkdtemp
class Res... | bsd-2-clause | -8,551,097,888,931,761,000 | 30.64 | 102 | 0.578698 | false | 4.425175 | false | false | false |
tailhook/aio-hs2 | thrift/TTornado.py | 1 | 5558 | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | 938,367,796,010,596,400 | 35.565789 | 80 | 0.638719 | false | 4.239512 | false | false | false |
iksaif/lugdulov | python/cyclocity.py | 1 | 11439 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
cyclocity.py
Copyright (C) 2010 Patrick Installé <PatrickInstalle@P-Installe.be>
Copyright (C) 2010-2011 Corentin Chary <corentincj@iksaif.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public ... | gpl-2.0 | -1,974,099,777,166,409,200 | 29.96748 | 104 | 0.465914 | false | 3.490226 | false | false | false |
suutari-ai/shoop | shuup_tests/browser/front/test_search_view.py | 3 | 5711 | # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
import os
import pytest
from django.core.urlresolvers import rev... | agpl-3.0 | 7,045,612,738,670,257,000 | 38.116438 | 114 | 0.667484 | false | 3.203029 | true | false | false |
geminy/aidear | oss/qt/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/chromium/third_party/skia/infra/bots/assets/win_toolchain/create.py | 2 | 4349 | #!/usr/bin/env python
#
# Copyright 2016 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Download an updated VS toolchain"""
import argparse
import common
import json
import os
import shlex
import shutil
import subprocess
import sys
import utils... | gpl-3.0 | 1,715,652,742,450,703,400 | 32.976563 | 80 | 0.650954 | false | 3.490369 | false | false | false |
jpirko/lnst | lnst/Common/LoggingHandler.py | 1 | 2216 | """
Custom logging handlers we use.
LogBuffer
Handler used solely for temporarily storing messages so that they can be
retrieved later.
Copyright 2012 Red Hat, Inc.
Licensed under the GNU General Public License, version 2 as
published by the Free Software Foundation; see COPYING for details.
"""
__author__ = """
oli... | gpl-2.0 | 2,165,201,360,103,899,000 | 24.471264 | 78 | 0.607852 | false | 3.880911 | false | false | false |
junhe1026/blog-related-codes | PythonTipChallenge/gcd_lcm_reverse.py | 1 | 1197 | # -*- coding: utf-8 -*-
"""
我们经常遇到的问题是给你两个数,要你求最大公约数和最小公倍数。
今天我们反其道而行之,给你两个数a和b,计算出它们分别是哪两个数的最大公约数和最小公倍数。
输出这两个数,小的在前,大的在后,以空格隔开。若有多组解,输出它们之和最小的那组。
注:所给数据都有解,不用考虑无解的情况。
a = gcd(x,y)
b = lcm(x,y) = x*y/gcd(x,y) = x*y/a
-> x*y = a*b
"""
import math
def find_x_y(a,b):
product = a*b
match_num = []
for i in ... | mit | 7,017,591,944,112,823,000 | 17.829787 | 50 | 0.517514 | false | 1.644981 | false | false | false |
radamizell/WallApp | location/views.py | 1 | 2728 | from django.shortcuts import render, get_object_or_404,redirect
from django.views import View, generic
from django.http import HttpResponse, HttpResponseRedirect
from django.contrib import messages
from django.contrib.auth import authenticate, login
from django.contrib.auth.decorators import login_required
from star_ra... | mit | 881,329,425,679,484,500 | 20.650794 | 94 | 0.732038 | false | 3.232227 | false | false | false |
VictorLowther/swift | swift/obj/auditor.py | 1 | 10106 | # Copyright (c) 2010-2012 OpenStack, LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | apache-2.0 | -6,427,883,266,433,169,000 | 42.93913 | 79 | 0.517613 | false | 4.163988 | false | false | false |
centaurialpha/pireal | pireal/core/interpreter/exceptions.py | 1 | 2326 | # -*- coding: utf-8 -*-
#
# Copyright 2015-2017 - Gabriel Acosta <acostadariogabriel@gmail.com>
#
# This file is part of Pireal.
#
# Pireal is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of t... | gpl-3.0 | 8,379,900,348,257,351,000 | 33.58209 | 79 | 0.672421 | false | 3.719101 | false | false | false |
ghetzel/webfriend | webfriend/rpc/network.py | 1 | 5261 | from __future__ import absolute_import
from webfriend.rpc import Base
from datetime import datetime
from base64 import b64decode
class Cookie(object):
def __init__(self, rpc, definition):
self._rpc = rpc
self._definition = definition
self.name = definition['name']
... | bsd-2-clause | -5,181,091,513,582,721,000 | 28.55618 | 99 | 0.578787 | false | 4.14252 | false | false | false |
SmartDataAnalytics/LC-QuAD | utils/natural_language_utilities.py | 1 | 7104 | """
@TODO: major rewrite here!
"""
import re
import html
import string
import os.path
import inflect
import warnings
import validators
from urllib.parse import urlparse
# SOME MACROS
STOPWORDLIST = 'resources/stopwords.txt'
KNOWN_SHORTHANDS = ['dbo', 'dbp', 'rdf', 'rdfs', 'dbr', 'foaf', 'geo', 'res', 'dct']
DBP_SHORT... | gpl-3.0 | -3,210,064,065,391,750,700 | 27.190476 | 118 | 0.574324 | false | 3.595142 | false | false | false |
zozo123/buildbot | master/buildbot/data/root.py | 1 | 1704 | # This file is part of Buildbot. Buildbot is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... | gpl-3.0 | 673,381,087,221,038,600 | 28.894737 | 79 | 0.714202 | false | 4.076555 | false | false | false |
WebCampZg/conference-web | workshops/models.py | 1 | 2590 | from django.contrib.staticfiles.templatetags.staticfiles import static
from django.db import models
from django.db.models.deletion import PROTECT
from django_extensions.db.fields import AutoSlugField
class Workshop(models.Model):
event = models.ForeignKey('events.Event', on_delete=PROTECT, related_name='workshops... | bsd-3-clause | 810,368,390,674,918,300 | 37.656716 | 91 | 0.688031 | false | 3.894737 | false | false | false |
MattDevo/edk2 | BaseTools/Source/Python/CommonDataClass/CommonClass.py | 1 | 4241 | ## @file
# This file is used to define common items of class object
#
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. ... | bsd-2-clause | 895,875,367,268,498,000 | 41.721649 | 143 | 0.620844 | false | 3.844968 | false | false | false |
juliancantillo/royal-films | royalfilms/cinemas/migrations/0011_auto_20160311_0105.py | 1 | 1251 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2016-03-11 06:05
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('cinemas', '0010_cinema_city'),
]
operations = [
... | mit | 1,754,208,661,855,668,500 | 30.275 | 133 | 0.590727 | false | 4.035484 | false | false | false |
boegel/easybuild-framework | test/framework/include.py | 1 | 12673 | # #
# Copyright 2013-2020 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (... | gpl-2.0 | 2,562,027,152,621,121 | 46.287313 | 120 | 0.657145 | false | 3.473958 | true | false | false |
marcharper/stationary | stationary/utils/math_helpers.py | 1 | 5555 | import numpy
from numpy import log
try:
from scipy.misc import logsumexp
except ImportError:
from numpy import logaddexp
logsumexp = logaddexp.reduce
def slice_dictionary(d, N, slice_index=0, slice_value=0):
"""
Take a three dimensional slice from a four dimensional
dictionary.
"""
s... | mit | -3,417,794,059,619,520,500 | 20.614786 | 80 | 0.514131 | false | 3.334334 | false | false | false |
nbstrauli/influenza_vaccination_project | scripts/pipeline/get_gene_usage_time_progression.py | 1 | 14047 | #!/usr/bin/python
#$ -S /usr/bin/python
#$ -e error
#$ -cwd
#$ -r y
#$ -j y
#$ -l mem_free=2G
#$ -l arch=linux-x64
#$ -l netapp=1G,scratch=180G
#$ -l h_rt=336:00:00
import sys
import os
import itertools
def make_dic_of_all_gene_names(gene_name_input_filepaths, evalue_input_filepaths, evalue_cutoff, drop_allele_info):... | cc0-1.0 | -8,732,614,653,426,692,000 | 50.643382 | 750 | 0.635865 | false | 3.209276 | false | false | false |
google/python-spanner-orm | spanner_orm/metadata.py | 1 | 4669 | # python3
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# python3
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"... | apache-2.0 | 2,871,411,075,835,277,300 | 38.235294 | 80 | 0.701649 | false | 4.028473 | false | false | false |
del680202/MachineLearning-memo | src/tensorflow/autocoder.py | 1 | 6809 | # View more python learning tutorial on my Youtube and Youku channel!!!
# My tutorial website: https://morvanzhou.github.io/tutorials/
from __future__ import division, print_function, absolute_import
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
# Import MNIST data
from tensorflow.examp... | apache-2.0 | -2,241,710,524,108,010,000 | 36.005435 | 93 | 0.622705 | false | 3.184752 | true | false | false |
Donkyhotay/MoonPy | zope/server/http/httptask.py | 1 | 7688 | ##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# T... | gpl-3.0 | 1,702,733,660,290,183,000 | 31.714894 | 79 | 0.561655 | false | 4.178261 | false | false | false |
bunyk/pyrrd | monitor_sources.py | 1 | 1431 | from decimal import Decimal
import requests
from tabulate import tabulate
import json
def yahoo_finance_query(**params):
''' Return the text of the request to the Yahoo finance API
s - ids of entities we wnant to receive. Every stock, index or currency has their own ID.
If you want to get values of mo... | mit | 8,548,422,122,788,347,000 | 32.27907 | 93 | 0.606569 | false | 3.568579 | false | false | false |
HansGR/ggPlayer | ggplayer/ggPlayer.py | 1 | 12818 | ## Copyright 2013 Hans Rinderknecht
## This file is part of ggPlayer.
## ggPlayer is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
... | gpl-3.0 | 9,143,978,955,762,802,000 | 35.414773 | 103 | 0.62342 | false | 3.76557 | false | false | false |
veprbl/root | tutorials/pyroot/hsimple.py | 1 | 2699 | ## \file
## \ingroup tutorial_pyroot
## \notebook -js
## This program creates :
## - a one dimensional histogram
## - a two dimensional histogram
## - a profile histogram
## - a memory-resident ntuple
##
## These objects are filled with some random numbers and saved on a file.
##
## \macro_image
## \macro... | lgpl-2.1 | -3,326,936,367,549,896,000 | 26.540816 | 80 | 0.674324 | false | 2.965934 | false | false | false |
941design/ptTools | ptTools/misc/attributes.py | 1 | 2701 | #!/usr/bin/env python3
"""Module providing the AttributesMixIn class."""
class AttributesMixIn(object):
"""Mix-in, providing an attributes collection of variable type.
Collection type may be list, set or dict. Getters and setters are
polymorphic.
To return a node's inherited attributes, access
... | gpl-3.0 | -5,291,276,212,073,134,000 | 34.539474 | 73 | 0.593854 | false | 4.80605 | false | false | false |
Eric89GXL/scikit-learn | doc/sphinxext/gen_rst.py | 1 | 39133 | """
Example generation for the scikit learn
Generate the rst files for the examples by iterating over the python
example files.
Files that generate images should start with 'plot'
"""
from time import time
import os
import re
import shutil
import traceback
import glob
import sys
from StringIO import StringIO
import ... | bsd-3-clause | -8,002,446,403,779,385,000 | 35.33519 | 160 | 0.523727 | false | 4.094267 | false | false | false |
binji/naclports | build_tools/naclports.py | 1 | 23393 | #!/usr/bin/env python
# Copyright (c) 2013 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Tool for manipulating naclports packages in python.
This tool can be used to for working with naclports packages.
It can al... | bsd-3-clause | -9,160,051,275,839,171,000 | 29.499348 | 80 | 0.624418 | false | 3.545468 | false | false | false |
BillGuard/cabot | cabot/rest_urls.py | 1 | 3991 | from django.db import models as model_fields
from django.conf.urls import url, include
from django.contrib.auth import models as django_models
from polymorphic import PolymorphicModel
from cabot.cabotapp import models
from rest_framework import routers, serializers, viewsets, mixins
import logging
logger = logging.get... | mit | 5,411,351,808,016,618,000 | 23.635802 | 84 | 0.609121 | false | 3.641423 | false | false | false |
CymaticLabs/Unity3D.Amqp | lib/rabbitmq-dotnet-client-rabbitmq_v3_4_4/docs/pyle2-fcfcf7e/sublanguages/include.py | 1 | 1284 | import Core
import re
info = {
"friendly_name": "Include Page",
"example_spacing": " PageTitle",
"example_template": "",
"summary": "Transcludes the contents of another page into the current page.",
"details": """
<p>If the included page has section (sub-)headings, they will be
included as... | mit | -4,046,064,245,910,437,400 | 26.913043 | 81 | 0.625389 | false | 3.732558 | false | false | false |
headstrongsolutions/Jarvis_Screen | gettime.py | 1 | 1266 | from datetime import datetime
def convert_daynum_to_friendly(day_num):
friendly_string = ""
lastdigit = int(str(day_num[-1]))
if lastdigit == 1 and day_num != 11:
friendly_string = "st"
if lastdigit == 2 and day_num != 12:
friendly_string = "nd"
if lastdigit == 3 and day... | mit | 8,256,574,304,943,224,000 | 25.957447 | 78 | 0.597946 | false | 3.035971 | false | false | false |
maferelo/saleor | saleor/discount/migrations/0002_voucher.py | 2 | 3498 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-02-04 17:07
from __future__ import unicode_literals
import datetime
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("product", ... | bsd-3-clause | 39,567,817,853,150,090 | 33.294118 | 86 | 0.368782 | false | 5.715686 | false | false | false |
Dturati/projetoUFMT | estagio/estagio/base/urls.py | 1 | 2567 | from django.conf.urls import url,include
from estagio.base.views import home,\
contatos,\
lista_em_arvore,\
download,\
view_compacta_pesquisa_selecionada,\
baixar_pesquisa,\
exemplo,\
view_compacta_toda_pesquisa,\
exemplo_assinc,\
get_resultado,\
define_sessao,\
requisicao_en... | mit | 4,855,286,763,664,258,000 | 49.333333 | 138 | 0.698091 | false | 2.763186 | false | true | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.