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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bijanfallah/OI_CCLM | src/CCLM_OUTS.py | 1 | 5684 | from __future__ import division
__author__ = 'Bijan'
'''
This is a function to plot CCLM outputs.
'''
from netCDF4 import Dataset as NetCDFFile
import numpy as np
import matplotlib.pyplot as plt
#from matplotlib.backends.backend_pdf import PdfPages
import os
import cartopy.crs as ccrs
import cartopy.feature
def rand_s... | mit | -4,696,903,592,917,575,000 | 36.394737 | 127 | 0.563336 | false | 2.999472 | false | false | false |
flower-pot/xf-indicator | xf_indicator/build_server_builder.py | 1 | 7118 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
### BEGIN LICENSE
# Copyright (C) 2014 Frederic Branczyk fbranczyk@gmail.com
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the ... | mit | -2,026,233,190,997,875,500 | 40.144509 | 104 | 0.652149 | false | 3.646516 | false | false | false |
schnapptack/gskompetenzen | features/gsaudit/migrations/0028_auto__del_field_teachingassignment_default_skill_level__add_field_teac.py | 1 | 16188 | # -*- 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):
# Deleting field 'TeachingAssignment.default_skill_level'
db.delete_column(u'gsaudit_teachingassignment', 'd... | agpl-3.0 | 7,733,039,810,272,228,000 | 74.297674 | 215 | 0.55084 | false | 3.63041 | false | false | false |
badp/ganeti | lib/client/gnt_node.py | 1 | 38700 | #
#
# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Google Inc.
#
# 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... | gpl-2.0 | 3,571,624,868,595,032,600 | 30.617647 | 80 | 0.625943 | false | 3.594316 | false | false | false |
peterayeni/rapidpro-python | temba/tests.py | 1 | 45540 | from __future__ import absolute_import, unicode_literals
import datetime
import json
import pytz
import requests
import six
import unittest
from mock import patch
from . import TembaClient, __version__
from .base import TembaObject, SimpleField, IntegerField, DatetimeField, ObjectListField, TembaException
from .base ... | bsd-3-clause | 3,794,885,374,273,625,600 | 49.154185 | 122 | 0.618863 | false | 3.419432 | true | false | false |
ShipJ/Code | Projects/M2020/pass.py | 1 | 1169 | import sys
import pandas as pd
import numpy as np
from Code.config import get_path
from collections import Counter
pd.set_option('display.width', 500)
def main():
path = get_path() # File path to data store
sessions = pd.DataFrame(pd.read_csv(path+'/PassGroup/sessions.csv'))
names = pd.DataFrame(pd.re... | mit | -6,041,288,081,047,611,000 | 23.375 | 87 | 0.617622 | false | 3.012887 | false | false | false |
nearai/program_synthesis | program_synthesis/karel/scripts/split_indexed.py | 1 | 1949 | import argparse
import os
import struct
import tqdm
from program_synthesis.karel.tools import indexed_file
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--input', required=True)
parser.add_argument('--num-pieces', required=True, type=int)
args = parser.parse_args... | apache-2.0 | -4,594,086,588,723,089,400 | 31.483333 | 71 | 0.573114 | false | 3.642991 | false | false | false |
atiberghien/cmsplugin-schedule | cmsplugin_schedule/migrations/0005_auto__del_field_eventsbyperiodplugin_period_begin__del_field_eventsbyp.py | 1 | 6894 | # -*- 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):
# Deleting field 'EventsByPeriodPlugin.period_begin'
db.delete_column(u'cmsplugin_eventsbyperiodplugin', 'pe... | gpl-3.0 | 402,343,862,641,214,700 | 66.598039 | 187 | 0.586307 | false | 3.761047 | false | false | false |
rmak/splunk-sdk-python | examples/search.py | 1 | 3491 | #!/usr/bin/env python
#
# Copyright 2011 Splunk, 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 ... | apache-2.0 | -2,305,047,391,797,950,000 | 30.45045 | 78 | 0.624463 | false | 3.610134 | false | false | false |
jtladner/Scripts | BEAST_prep/beast_nexus_prep_v3.0.py | 1 | 5220 | #!/usr/bin/env python
from __future__ import division
import optparse, os
from Bio.Seq import Seq
from Bio.Alphabet import generic_dna
#This script uses an aligned fasta file and a tab deliminted file containing CDS coordinates to create a nexus input for BEAST
#In version 2.0, added a flag to throw if you only want... | gpl-3.0 | 383,481,794,927,807,740 | 38.545455 | 252 | 0.627778 | false | 3.182927 | false | false | false |
sburnett/seattle | deploymentscripts/attic/build_stats.py | 1 | 14273 | """
<Program Name>
build_stats.py
<Started>
June 2009
<Author>
n2k8000@u.washington.edu
Konstantin Pik
<Purpose>
The purpose of this file is to generate stats from the files that have been
gathered from various nodes by the deploy_* scripts. This file does very
pretty simple string parsing in order t... | mit | -8,704,940,287,090,203,000 | 30.859375 | 136 | 0.654663 | false | 3.624429 | false | false | false |
ZwEin27/phone-number-matcher | tests/main_tests.py | 1 | 7317 |
import sys
import time
import os
import unittest
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
TEST_DATA_DIR = os.path.join(os.path.dirname(__file__), 'data')
docs_ = os.path.expanduser(os.path.join(TEST_DATA_DIR, 'docs.json'))
text_ = os.path.expanduser(os.path.join(TEST_DATA_DIR, 'test.txt'))
url_... | apache-2.0 | 8,429,959,777,559,727,000 | 40.338983 | 233 | 0.566352 | false | 3.631266 | true | false | false |
thopiekar/Cura | tests/Settings/TestGlobalStack.py | 1 | 26019 | # Copyright (c) 2018 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import pytest #This module contains unit tests.
import unittest.mock #To monkeypatch some mocks in place of dependencies.
import cura.Settings.CuraContainerStack #To get the list of container types.
from cura.Settings.Exce... | lgpl-3.0 | -3,006,943,095,856,363,000 | 53.778947 | 301 | 0.755064 | false | 4.241767 | true | false | false |
jut-io/jut-python-tools | jut/api/data_engine.py | 1 | 14660 | """
data engine API
"""
import json
import random
import requests
import socket
import time
import traceback
from websocket import create_connection
from jut import defaults
from jut.api import deployments
from jut.common import debug, is_debug_enabled
from jut.exceptions import JutException
def get_data_url(depl... | mit | 3,056,315,355,899,694,600 | 30.324786 | 89 | 0.498704 | false | 4.51772 | false | false | false |
kumar303/rockit | vendor-local/boto/emr/connection.py | 1 | 19329 | # Copyright (c) 2010 Spotify AB
# Copyright (c) 2010-2011 Yelp
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, m... | bsd-3-clause | -7,264,042,218,775,478,000 | 38.771605 | 131 | 0.594702 | false | 4.379021 | false | false | false |
BarraQDA/nvivotools | editNodeAttribute.py | 1 | 3889 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2016 Jonathan Schultz
#
# 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 lat... | gpl-3.0 | -6,398,018,418,815,286,000 | 31.408333 | 121 | 0.585498 | false | 3.936235 | false | false | false |
sudrusvp/chat | app.py | 1 | 1717 | #!/usr/bin/env python
import urllib
import json
import os
import os.path
import sys
from flask import Flask
from flask import render_template
from flask import request, url_for, make_response
import logging
import apiai
# Flask app should start in global layout
app = Flask(__name__, static_url_path='/static')
@app.... | apache-2.0 | 2,017,720,415,233,331,700 | 25.015152 | 69 | 0.667443 | false | 2.965458 | false | false | false |
socketubs/sublimall-server | sublimall/donations/migrations/0001_initial.py | 1 | 1363 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [migrations.swappable_dependency(settings.AUTH_USER_MODEL)]
operations = [
migrations.CreateModel(
... | mit | -8,040,842,782,191,297,000 | 32.243902 | 86 | 0.464417 | false | 5.085821 | false | false | false |
shiroyuki/kinoko | kinoko/kinoko/settings.py | 1 | 5988 | # Django settings for kinoko project.
import os
import sys
BASE_PATH = os.path.abspath(os.path.dirname(__file__) + '/..')
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.', # Add '... | mit | -9,222,983,980,000,580,000 | 33.217143 | 127 | 0.690381 | false | 3.710037 | false | false | false |
pywikibot/core-migration-example | pywikibot/site.py | 1 | 150869 | # -*- coding: utf-8 -*-
"""
Objects representing MediaWiki sites (wikis) and families (groups of wikis
on the same topic in different languages).
"""
#
# (C) Pywikipedia bot team, 2008-2012
#
# Distributed under the terms of the MIT license.
#
__version__ = '$Id$'
try:
from hashlib import md5
except ImportError:
... | mit | -5,997,447,871,804,677,000 | 40.838325 | 117 | 0.564258 | false | 4.521774 | false | false | false |
arguman/arguman.org | web/premises/views.py | 1 | 30506 | # -*- coding:utf-8 -*-
import json
from datetime import timedelta
from django.conf import settings
from django.core.serializers.json import DjangoJSONEncoder
from markdown2 import markdown
from django.contrib import messages
from django.core.urlresolvers import reverse
from django.utils import timezone
from django.db... | agpl-3.0 | 8,736,635,572,958,771,000 | 32.665563 | 90 | 0.600079 | false | 3.886468 | false | false | false |
rodrigosurita/GDAd | sdaps/utils.py | 1 | 1333 | # -*- coding: utf8 -*-
# SDAPS - Scripts for data acquisition with paper based surveys
# Copyright(C) 2008, Christoph Simon <post@christoph-simon.eu>
# Copyright(C) 2008, Benjamin Berg <benjamin@sipsolutions.net>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Ge... | gpl-3.0 | -4,309,638,950,553,256,400 | 31.512195 | 71 | 0.71868 | false | 3.863768 | false | false | false |
Twinstar2/Python_Master_scripts | Psi_Phi/calculate_psi_phi.py | 1 | 4343 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import sys
import subprocess
import os
from os.path import isfile
import matplotlib.pyplot as plt
plt.switch_backend('agg')
import numpy as np
from scipy.stats import kendalltau
# sns.set(style="ticks")
import math
import pandas as pd
import seaborn as sns
... | mit | 1,100,631,010,733,866,000 | 31.654135 | 157 | 0.600046 | false | 3.238628 | false | false | false |
lyndsysimon/osf.io | api/base/serializers.py | 1 | 6832 | import collections
import re
from rest_framework import serializers as ser
from website.util.sanitize import strip_html
from api.base.utils import absolute_reverse, waterbutler_url_for
def _rapply(d, func, *args, **kwargs):
"""Apply a function to all values in a dictionary, recursively. Handles lists and dicts c... | apache-2.0 | 244,499,991,288,572,580 | 34.035897 | 133 | 0.601288 | false | 3.904 | false | false | false |
Azurras/Survithon | survive/game/gamecontroller.py | 1 | 2082 | from survive.player.playermodel import Player
from survive.activities.crafting.craftingcontroller import CraftingController
from survive.inventory.inventorycontroller import InventoryController
from survive.activities.hunting.huntingcontroller import HuntingController
from survive.generic.controller import Controller
f... | mit | -7,673,351,377,599,428,000 | 31.53125 | 77 | 0.527858 | false | 4.535948 | false | false | false |
druids/django-pyston | example/dj/apps/app/tests/standard_operations.py | 1 | 15447 | from six.moves.urllib.parse import urlencode
from django.test.utils import override_settings
from germanium.decorators import data_provider
from germanium.tools.trivials import assert_in, assert_equal, assert_true
from germanium.tools.http import (assert_http_bad_request, assert_http_not_found, assert_http_method_not... | bsd-3-clause | -8,890,634,664,390,681,000 | 43.134286 | 116 | 0.608273 | false | 3.281011 | true | false | false |
nottombrown/rl-teacher | human-feedback-api/human_feedback_api/migrations/0004_auto_20170129_0223.py | 1 | 1448 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2017-01-29 02:23
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('human_feedback_api', '0003_auto_20170129_0220'),
]
operations = [
migrations... | mit | 2,315,800,327,739,250,700 | 35.2 | 135 | 0.601519 | false | 4.022222 | false | false | false |
otfbot/otfbot | otfbot/plugins/ircClient/moon.py | 1 | 3353 | # This file is part of OtfBot.
#
# OtfBot 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.
#
# OtfBot is distributed in the hope that it... | gpl-2.0 | 8,527,780,272,614,167,000 | 35.846154 | 80 | 0.509693 | false | 3.912485 | false | false | false |
labase/activnce | main/utils/corrige_institutes_e_papeis_no_registry.py | 1 | 3111 | # -*- coding: utf-8 -*-
"""
################################################
Plataforma ActivUFRJ
################################################
:Author: *Núcleo de Computação Eletrônica (NCE/UFRJ)*
:Contact: carlo@nce.ufrj.br
:Date: $Date: 2009-2010 $
:Status: This is a "work in progress"
:Revision: $Revision: 0.0... | gpl-2.0 | 6,255,362,742,111,321,000 | 27.412844 | 95 | 0.479328 | false | 3.451505 | false | false | false |
JustinTulloss/harmonize.fm | libs.py/mutagen/asf.py | 1 | 20318 | # Copyright 2006-2007 Lukas Lalinsky
# Copyright 2005-2006 Joe Wreschnig
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# $Id: asf.py 4153 2007-08-05 07:07:49Z piman $
"""Read an... | mit | -8,794,734,580,568,491,000 | 31.047319 | 85 | 0.578157 | false | 3.680797 | false | false | false |
rbuffat/pyidf | tests/test_plantequipmentoperationuncontrolled.py | 1 | 1235 | import os
import tempfile
import unittest
import logging
from pyidf import ValidationLevel
import pyidf
from pyidf.idf import IDF
from pyidf.plant import PlantEquipmentOperationUncontrolled
log = logging.getLogger(__name__)
class TestPlantEquipmentOperationUncontrolled(unittest.TestCase):
def setUp(self):
... | apache-2.0 | 7,184,724,862,275,028,000 | 28.428571 | 115 | 0.683401 | false | 3.600583 | false | false | false |
gimli-org/gimli | pygimli/solver/green.py | 1 | 1532 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Greens function for some analytical stuff."""
import numpy as np
def greenDiffusion1D(x, t=0, a=1, dim=1):
r"""Greens function for diffusion operator.
Provides the elementary solution for:
.. math::
g(x,t) = \partial t + a \Delta
To find a ... | apache-2.0 | -1,247,332,916,641,568,800 | 23.31746 | 76 | 0.498042 | false | 2.934866 | false | false | false |
qedsoftware/commcare-hq | corehq/sql_db/connections.py | 1 | 4634 | from contextlib import contextmanager
from django.conf import settings
import sqlalchemy
from sqlalchemy.orm.scoping import scoped_session
from sqlalchemy.orm.session import sessionmaker
from django.core import signals
DEFAULT_ENGINE_ID = 'default'
UCR_ENGINE_ID = 'ucr'
ICDS_UCR_ENGINE_ID = 'icds-ucr'
def create_en... | bsd-3-clause | -508,470,237,920,543,040 | 34.646154 | 115 | 0.653431 | false | 4.174775 | false | false | false |
CivilNet/Gemfield | dockerfiles/py-faster-rcnn/files/gemfield/py-faster-rcnn/caffe-fast-rcnn/scripts/copy_notebook.py | 1 | 1085 | #!/usr/bin/env python
"""
Takes as arguments:
1. the path to a JSON file (such as an IPython notebook).
2. the path to output file
If 'metadata' dict in the JSON file contains 'include_in_docs': true,
then copies the file to output file, appending the 'metadata' property
as YAML front-matter, adding the field 'categor... | gpl-3.0 | -7,744,717,091,411,934,000 | 32.90625 | 87 | 0.635945 | false | 3.522727 | false | false | false |
rsjohnco/rez | src/rez/vendor/schema/schema.py | 1 | 9591 | __version__ = '0.3.0'
class SchemaError(Exception):
"""Error during Schema validation."""
def __init__(self, autos, errors):
self.autos = autos if type(autos) is list else [autos]
self.errors = errors if type(errors) is list else [errors]
Exception.__init__(self, self.code)
@pro... | gpl-3.0 | -4,770,050,827,249,175,000 | 37.211155 | 79 | 0.502659 | false | 4.253215 | false | false | false |
brenns10/smbio | smbio/util/progress.py | 1 | 8085 | """Progress bar utilities."""
from enum import Enum
from io import StringIO
import sys
class TermType(Enum):
"""Enumeration of types of terminals."""
TTY = 1
IPythonTerminal = 2
IPythonGUI = 3
File = 4
Unknown = 0
def _non_ipy_term_type():
"""
The terminal type of a non-IPython term... | mit | -2,844,796,556,707,079,000 | 30.459144 | 79 | 0.601237 | false | 4.349112 | false | false | false |
gem/oq-hazardlib | openquake/hazardlib/scalerel/point.py | 1 | 1899 | # -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (C) 2013-2017 GEM Foundation
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the Licen... | agpl-3.0 | 8,296,482,803,763,715,000 | 37.755102 | 78 | 0.701948 | false | 3.745562 | false | false | false |
chop-dbhi/django-sts | sts/models.py | 1 | 11857 | from django.db import models, transaction, IntegrityError
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
from django.utils import timezone
from .utils import classproperty, get_duration, get_natural_duration
def _get_or_create(klass, **kwargs):
"Mimic lo... | bsd-3-clause | -6,736,453,578,100,385,000 | 30.450928 | 92 | 0.603441 | false | 4.348001 | false | false | false |
BartMassey/blog-escape | filters/urlclean.py | 1 | 1264 | # Copyright (c) 2017 Bart Massey
# This work is available under the "MIT license".
# Please see the file COPYING in this distribution
# for license terms.
# Filter URLs to be root-relative and have consistent file
# naming.
from re_memo import *
# Given the domainname of the Drupal site (to be removed)
# and the pag... | mit | -2,101,150,467,164,044,500 | 37.30303 | 65 | 0.628956 | false | 3.257732 | false | false | false |
LogicalDash/LiSE | LiSE/LiSE/proxy.py | 1 | 89984 | # This file is part of LiSE, a framework for life simulation games.
# Copyright (c) Zachary Spector, public@zacharyspector.com
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, version 3.... | agpl-3.0 | -5,284,153,582,900,367,000 | 30.965897 | 121 | 0.547608 | false | 4.0357 | false | false | false |
theo-l/django | django/db/models/query.py | 2 | 82824 | """
The main QuerySet implementation. This provides the public API for the ORM.
"""
import copy
import operator
import warnings
from collections import namedtuple
from functools import lru_cache
from itertools import chain
import django
from django.conf import settings
from django.core import exceptions
from django.d... | bsd-3-clause | -4,749,551,625,195,919,000 | 40.85144 | 119 | 0.589141 | false | 4.372967 | false | false | false |
analogbyte/saltobserver | scripts/freeze.py | 1 | 3395 | """
To create a new static mockup, some edits must be made:
- in views.py, use the workaround described in index()
- in tempates/contentpage.html, uncomment the bit of js for converting JSON
(search for a capital JSON in a jinja comment)
After the mockup is created, replace all ajax requests to _get_func... | mit | -3,808,915,375,779,027,000 | 30.728972 | 99 | 0.541679 | false | 3.532778 | false | false | false |
sernst/cauldron | cauldron/test/cli/commands/test_cd.py | 1 | 1309 | import os
from unittest.mock import MagicMock
from unittest.mock import patch
from cauldron import environ
from cauldron.test import support
MY_DIRECTORY = environ.paths.clean(os.path.dirname(__file__))
@patch('cauldron.cli.commands.cd.os.chdir')
def test_cd(os_chdir: MagicMock):
"""Should change to the specifi... | mit | 2,113,657,007,634,437,000 | 36.4 | 66 | 0.714286 | false | 3.656425 | true | false | false |
Azure/azure-sdk-for-python | sdk/security/azure-mgmt-security/azure/mgmt/security/operations/_iot_sensors_operations.py | 1 | 20406 | # 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 | -1,738,500,564,134,403,800 | 43.264642 | 155 | 0.632461 | false | 4.001176 | false | false | false |
cupy/cupy | cupyx/scipy/sparse/csgraph/_traversal.py | 1 | 3730 | import cupy
from cupy.linalg import _util
import cupyx.scipy.sparse
try:
from cupy_backends.cuda.libs import cugraph
_cugraph_available = True
except ImportError:
_cugraph_available = False
def connected_components(csgraph, directed=True, connection='weak',
return_labels=True):
... | mit | -7,398,374,579,397,612,000 | 33.859813 | 79 | 0.604558 | false | 3.58999 | false | false | false |
30loops/nova | nova/compute/manager.py | 1 | 79703 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2011 Justin Santa Barbara
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
#... | apache-2.0 | -6,354,116,087,350,371,000 | 43.726712 | 79 | 0.57161 | false | 4.478703 | false | false | false |
bilke/OpenSG-1.8 | SConsLocal/scons-local-0.96.1/SCons/Tool/386asm.py | 1 | 2029 | """SCons.Tool.386asm
Tool specification for the 386ASM assembler for the Phar Lap ETS embedded
operating system.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004 The S... | lgpl-2.1 | 4,455,110,292,907,091,500 | 36.574074 | 123 | 0.743716 | false | 3.764378 | false | false | false |
ZG-Tennis/django-xml | djxml/xmlmodels/fields.py | 1 | 22988 | import re
from lxml import etree, isoschematron
import django.utils.copycompat as copy
from django.core.exceptions import ValidationError
from django.utils.encoding import force_unicode
from .descriptors import ImmutableFieldBase, XPathFieldBase, XsltFieldBase
from .exceptions import XmlSchemaValidationError
from .... | bsd-2-clause | -7,552,808,317,963,905,000 | 32.905605 | 98 | 0.590351 | false | 4.141982 | false | false | false |
jolynch/python-hqsom | hqsom/preproc/audio.py | 1 | 3439 | '''
Module for importing audio and computing spectrograms to be fed to hierarchies
as list-of-lists representations.
Think of this as analogous to what it would take to convert a video into
something that one could feed to a hierarchy, except for sound instead.
This uses only mono WAV files. Convert your mp3 ... | mit | 3,402,537,812,728,781,000 | 31.715686 | 80 | 0.643792 | false | 3.294061 | false | false | false |
zaharazod/zutils | fields.py | 1 | 1025 | from collections import namedtuple
from django.db import models
from django.core.exceptions import ValidationError
from django.utils.six import with_metaclass, string_types
Choice = namedtuple('Choice', ('value', 'display', 'slug', 'handler',))
class ChoiceField(with_metaclass(models.SubfieldBase, models.PositiveSma... | bsd-2-clause | -1,460,721,632,253,291,500 | 33.166667 | 89 | 0.705366 | false | 4.019608 | false | false | false |
MikeMcMahon/echonest | echonest/controllers/ingest.py | 1 | 1240 | """
author: Family
date: 10/20/2014
"""
import json
import urllib2
import time
from echonest import settings
from echonest.models import MatchedTrack
import fp
def process(ingest, retry=0):
json_data = {'track_id': None}
#if settings.REMOTE_ENABLED:
try:
scraped = urllib2.urlopen(settings.REMOTE_... | gpl-2.0 | -8,817,202,402,679,408,000 | 22.865385 | 94 | 0.624194 | false | 3.483146 | false | false | false |
PermutaTriangle/PermStruct | len_4_lists/checking_Kuz_for_rie.py | 1 | 3130 |
L = []
patts = [Permutation([2,1,4,3]), Permutation([3,1,4,2]), Permutation([1,4,3,2]), Permutation([1,3,4,2]), Permutation([1,3,2,4])]
L.append(patts)
patts = [Permutation([2,4,3,1]), Permutation([2,1,4,3]), Permutation([3,1,4,2]), Permutation([4,1,3,2]), Permutation([1,4,3,2]), Permutation([1,3,4,2]), Permutation([... | bsd-3-clause | -4,771,016,905,109,463,000 | 83.594595 | 272 | 0.627476 | false | 2.328869 | false | false | false |
npinto/Oger | Oger/nodes/nonlinear_nodes.py | 1 | 8077 | import Oger
import mdp.utils
from mdp import numx as numx
import numpy
from numpy import dot as dot
from mdp.utils import mult
# TODO: could we turn this in a generic "function" node?
class ThresholdNode(mdp.Node):
"""
Compute a threshold function of the input.
This node returns output_values[0] if x < thr... | gpl-3.0 | -7,748,206,843,932,828,000 | 37.645933 | 142 | 0.619785 | false | 3.41956 | false | false | false |
dj80hd/konsole | app/main/views.py | 1 | 13152 | from flask import render_template, redirect, url_for, abort, flash, request,\
current_app, make_response, send_from_directory
from flask.ext.login import login_required, current_user
from flask.ext.sqlalchemy import get_debug_queries
from . import main
from .forms import EditProfileForm, EditProfileAdminForm, \
... | mit | -4,242,802,051,045,464,000 | 40.88535 | 147 | 0.657162 | false | 3.722615 | false | false | false |
azane/for-learnings-sake | bayes/clustering/parametric/analytic/singlegauss.py | 1 | 4658 | """This file provides a class used for incrementally updating a single gaussian inference problem.
The functionality 'setting apart' this class, is that includes a method that flattens the parameter distributions, while retaining the
predictive distribution. This allows simple moving average calculation without... | mit | 2,028,189,682,993,613,600 | 37.504132 | 143 | 0.574066 | false | 4.125775 | false | false | false |
miracle2k/feedplatform | tests/lib/doers/daemons/test_daemons.py | 1 | 2846 | """Test the general daemon infrastructure, daemon base classes etc.
"""
import sys
import StringIO
from nose.tools import assert_raises
from feedplatform.lib import base_daemon
from feedplatform import addins
from feedplatform import management
class dummy_daemon(base_daemon):
def __init__(self, output, *a, **kw... | bsd-2-clause | 5,264,929,101,823,261,000 | 38 | 76 | 0.639494 | false | 4.071531 | false | false | false |
scotartt/commentarius | decommentariis/decommentariis/models.py | 1 | 7534 | import json
from tastypie.utils.timezone import now
from django.db import models
from django.core.urlresolvers import reverse
from decommentariis.xml_file import TEIDataSource
from decommentariis.signals import *
class TEIEntry(models.Model):
cts_urn = models.CharField(max_length=200, primary_key=True)
creation_dat... | gpl-2.0 | 2,058,485,137,576,497,000 | 30.655462 | 107 | 0.693921 | false | 2.976689 | false | false | false |
phrocker/sharkbite | test/python/TestSecurityOperations.py | 1 | 3290 | from testmodule import *
import sys
class TestWrites(TestRunner):
def __init__(self):
super().__init__()
def mthd(self):
import pysharkbite
securityOps = super().getSecurityOperations()
securityOps.create_user("testUser","password")
## validate that we DON'T see the permissions
assert( Fals... | apache-2.0 | 3,099,395,586,810,927,600 | 26.425 | 109 | 0.70152 | false | 3.286713 | true | false | false |
VincentCATILLON/navitia | source/jormungandr/jormungandr/interfaces/v1/Uri.py | 1 | 22122 | # coding=utf-8
# Copyright (c) 2001-2014, 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 an... | agpl-3.0 | -8,981,418,367,079,203,000 | 40.50469 | 114 | 0.532954 | false | 4.763566 | false | false | false |
quantum13/mlbootcamp5 | qml_workdir/work2.py | 1 | 6868 | import datetime
import numpy as np
import os
import sys
from sklearn.linear_model import Ridge, RidgeClassifier
sys.path.insert(0, os.getcwd())
from hyperopt import hp, fmin, tpe
import qml_workdir.classes.config
from qml.cv import QCV
from qml.models import QXgb, QAvg, QRankedByLineAvg, QNN1, QStackModel
from qml... | mit | -2,699,220,916,847,658,000 | 22.850694 | 133 | 0.438701 | false | 2.607441 | false | false | false |
davidmcnabnz/PhoneBook | phonebookfs/pbcmds.py | 1 | 5066 | #!/usr/bin/env python
#@+leo-ver=4
#@+node:@file pbcmds.py
#@@first
"""
pbcmds.py
classes for client progs to send commands to PhoneBookFS,
and get responses back.
"""
#@+others
#@+node:imports
import sys, os, time, random, socket
from pdb import set_trace as trace
#@-node:imports
#@+node:globals
# magic pathname, ... | agpl-3.0 | -4,741,197,050,285,907,000 | 21.415929 | 85 | 0.576984 | false | 3.339486 | false | false | false |
wisner23/serenata-de-amor | src/translate_datasets.py | 1 | 2694 | import numpy as np
import pandas as pd
import sys
INPUT_FILE_PATH = sys.argv[1]
OUTPUT_FILE_PATH = INPUT_FILE_PATH \
.replace('AnoAtual', 'current-year') \
.replace('AnoAnterior', 'last-year') \
.replace('AnosAnteriores', 'previous-years') \
.replace('.csv', '.xz')
data = pd.read_csv(INPUT_FILE_PATH,
... | mit | 374,333,697,916,007,040 | 34.92 | 78 | 0.640683 | false | 3.158265 | false | false | false |
xtiankisutsa/MARA_Framework | tools/qark/qark/lib/ply/yacc.py | 1 | 135463 | # -----------------------------------------------------------------------------
# ply: yacc.py
#
# Copyright (C) 2001-2015,
# David M. Beazley (Dabeaz LLC)
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions a... | lgpl-3.0 | -35,395,647,975,105,750 | 38.128538 | 119 | 0.467308 | false | 4.792775 | true | false | false |
googleapis/googleapis-gen | google/ads/googleads/v7/googleads-py/tests/unit/gapic/googleads.v7/services/test_group_placement_view_service.py | 1 | 31380 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | 4,119,099,156,846,793,700 | 44.021521 | 226 | 0.685373 | false | 4.135477 | true | false | false |
parenthetical-e/wheelerexp | meta/kmeans_trialtime.py | 1 | 2374 | """
usage: python ./kmeans_trialtime.py name data roifile cond tr window [, filtfile]
"""
import sys, os
import numpy as np
import argparse
# from fmrilearn.analysis import fir
from fmrilearn.load import load_roifile
from sklearn.cluster import KMeans
from wheelerexp.base import Trialtime
from wheelerexp.base import ... | bsd-2-clause | -1,506,889,611,707,003,600 | 28.675 | 81 | 0.497473 | false | 4.172232 | false | false | false |
Alwnikrotikz/freetype-py | freetype/__init__.py | 1 | 74940 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
#
# FreeType high-level python API - Copyright 2011 Nicolas P. Rougier
# Distributed under the terms of the new BSD license.
#
# ---------------------------------------------------------------... | bsd-3-clause | 6,510,251,111,341,891,000 | 38.062565 | 91 | 0.591789 | false | 4.123617 | false | false | false |
EvolutionClip/pyload | module/plugins/hooks/RehostTo.py | 1 | 1443 | # -*- coding: utf-8 -*-
from module.plugins.internal.MultiHook import MultiHook
class RehostTo(MultiHook):
__name__ = "RehostTo"
__type__ = "hook"
__version__ = "0.50"
__config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"),
("pl... | gpl-3.0 | -2,200,713,820,068,012,500 | 48.758621 | 107 | 0.444906 | false | 3.986188 | false | false | false |
johannessarpola/django-pastebin | pastebin/views.py | 1 | 4677 | # Create your views here.
import logging
from django.contrib.auth import authenticate, login
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse
from django.shortcuts import render, redirect
from pastebin.forms.paste_forms import PasteForm
logger = logging.getLogger(__name_... | mit | -2,762,593,739,616,452,000 | 37.336066 | 99 | 0.694248 | false | 3.865289 | false | false | false |
jarederaj/pmpd | pmpd/cli.py | 1 | 2087 | from argparse import SUPPRESS
from .input import Parser
from . import __doc__
def _(text):
"""Normalize whitespace."""
return ' '.join(text.strip().split())
parser = Parser(
description='%s <http://www.pyscape.com/pmpd>' % __doc__.strip(),
epilog='Suggestions and bug reports are greatly appreciated:\n... | bsd-3-clause | -2,955,521,990,371,971,000 | 26.826667 | 79 | 0.538572 | false | 4.478541 | false | false | false |
ursinedeity/alab | alab/utils.py | 1 | 11412 | #!/usr/bin/env python
# Copyright (C) 2015 University of Southern California and
# Nan Hua
#
# Authors: Nan Hua
#
# 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, eith... | gpl-2.0 | -5,935,544,173,133,058,000 | 31.887608 | 147 | 0.559411 | false | 3.350558 | false | false | false |
okfn/datapackage-py | datapackage/resource.py | 1 | 29766 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import io
import os
import six
import json
import warnings
try:
from cchardet import detect
except ImportError:
from chardet import detect
import requests
from co... | mit | -8,815,359,676,853,984,000 | 30.43189 | 113 | 0.558725 | false | 4.851043 | false | false | false |
mgarciafernandez/magnipy | bin/GaussianField.py | 1 | 2841 | import numpy, math, cmath, scipy.interpolate, scipy.integrate, argparse
from ROOT import *
class MatterDensityContrast(object):
"""
Object defining a matter cosmological density contrast.
The field is just defined according to a gaussian random field. Not precise, but fast for testing.
The algorithm is as follows:... | gpl-3.0 | -202,481,985,651,449,800 | 31.655172 | 108 | 0.663147 | false | 2.616022 | false | false | false |
treverhines/ModEst | modest/solvers.py | 2 | 7606 | #!/usr/bin/env python
'''
routines which solve min_m||Gm - d|| with potentially additional
constraints on m.
'''
import numpy as np
import scipy.optimize
import scipy.sparse.linalg
import scipy.linalg
import scipy.sparse
import modest._bvls as _bvls
import logging
try:
import modest.petsc
except ImportError:
print(... | mit | -8,326,180,990,644,533,000 | 30.824268 | 118 | 0.594531 | false | 3.315606 | false | false | false |
chanmodoi/plugin.video.webgiaitri | resources/ngamvn.py | 1 | 3612 | import sys
import urllib
import urlparse
import xbmcgui
import xbmcplugin
import xbmcaddon
import xbmc
import requests
from bs4 import BeautifulSoup
from lib import CMDTools
base_url = sys.argv[0]
web_name="NGAMVN.COM"
web_url = "http://www.ngamvn.com/"
def get_Web_Name():
return web_name
def get_img_thumb_url():... | gpl-2.0 | -3,257,192,534,521,807,400 | 32.146789 | 182 | 0.654485 | false | 2.432323 | false | false | false |
ycroft/STOKES_polar | gui/gui.py | 1 | 1859 | #!/usr/bin/python
# gui.py
import sys
from PyQt4 import QtGui,QtCore
class SigSlot(QtGui.QWidget):
def __init__(self,parent=None):
QtGui.QWidget.__init__(self,parent)
self.setWindowFlags(QtCore.Qt.FramelessWindowHint | QtCore.Qt.WindowStaysOnTopHint)
self.setWindowTitle("signal and slot")
self.setMouseTracki... | mit | -5,957,265,861,854,757,000 | 25.183099 | 85 | 0.708983 | false | 2.936809 | false | false | false |
JonathanHuot/bottlepy-plupload | plupload/plupload.py | 1 | 1158 | import os
def _jsonrpc(value="error", *a, **ka):
base = {"jsonrpc": "2.0", value: None, "id": "id"}
if a or ka:
base[value] = {}.update(*a, **ka)
return base
def save(forms, files, dest):
if "name" in forms:
filename = forms["name"]
elif len(files) > 0:
filename = files.f... | gpl-2.0 | -1,551,803,229,529,320,000 | 26.571429 | 79 | 0.557858 | false | 3.563077 | false | false | false |
pablobesada/tw | process_checker.py | 1 | 1549 | import subprocess
from subprocess import PIPE
import time
import os
def check_processes():
r = subprocess.Popen('ps ax | grep python', shell=True, stdout=PIPE).stdout.read()
print r
r2 = """337 ? Sl 223:46 python twfetch.py --auth
11893 ? S 2:12 python datacollection.py --au... | apache-2.0 | 8,437,614,276,977,142,000 | 28.245283 | 86 | 0.501614 | false | 3.473094 | false | false | false |
woylaski/notebook | graphic/kivy-master/kivy/core/clipboard/clipboard_winctypes.py | 1 | 1357 | '''
Clipboard windows: an implementation of the Clipboard using ctypes.
'''
__all__ = ('ClipboardWindows', )
from kivy.utils import platform
from kivy.core.clipboard import ClipboardBase
if platform != 'win':
raise SystemError('unsupported platform for Windows clipboard')
import ctypes
user32 = ctypes.windll.us... | gpl-3.0 | -4,186,935,336,719,379,000 | 27.87234 | 67 | 0.667649 | false | 3.375622 | false | false | false |
jfarid27/CFP-Simplified | experiments/ising.random.100.py | 1 | 2296 | import random
import os
from math import sqrt
from multiprocessing import Pool
import simulation.Networks as Network
import simulation.Contagion as Contagion
import simulation.System as System
import simulation.MCMC as MCMC
random.seed(int("54e22d", 16))
steps = 1000000
side = 100
spins = side * side
def observable... | gpl-3.0 | -953,254,358,156,688,600 | 32.275362 | 106 | 0.677265 | false | 3.691318 | false | false | false |
alexandrucoman/vbox-nova-driver | nova/tests/unit/virt/vmwareapi/test_read_write_util.py | 1 | 1847 | # Copyright 2013 IBM Corp.
# Copyright 2011 OpenStack Foundation
#
# 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 | 171,611,520,269,657,950 | 40.977273 | 78 | 0.573904 | false | 4.315421 | true | false | false |
brain-research/hyperbolictext | skip_thoughts_dist/train.py | 1 | 6531 | #!/usr/bin/python
#
# Copyright 2017 Google 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 a... | apache-2.0 | -692,107,116,517,386,600 | 34.494565 | 80 | 0.671107 | false | 3.744839 | true | false | false |
mrooney/wxbanker | wxbanker/mint/web.py | 1 | 1314 | # https://launchpad.net/wxbanker
# urllib3.py: Copyright 2007-2010 Mike Rooney <mrooney@ubuntu.com>
#
# This file is part of wxBanker.
#
# wxBanker 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 Foundat... | gpl-3.0 | 5,709,544,608,992,081,000 | 33.578947 | 73 | 0.713851 | false | 3.701408 | false | false | false |
tommarv/Attendance-system | python_script.py | 1 | 1389 | #!/usr/bin/python
import io
import picamera
import datetime
import MySQLdb as mdb
import sys
import serial
from PIL import Image
import os
import time
import subprocess
from cStringIO import StringIO
id_card = []
mylist = []
param1 = "/dev/ttyUSB0"
param2 = "9600"
ard = serial.Serial(param1, param2, timeout=.1)
a=55
st... | apache-2.0 | 5,004,484,836,139,307,000 | 29.195652 | 76 | 0.493161 | false | 3.869081 | false | false | false |
jsm28/medal-boundaries | medalbound/algorithms.py | 1 | 13874 | # Algorithms classes for medalbound package.
# Copyright 2015-2021 Joseph Samuel Myers.
# 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) a... | gpl-3.0 | 6,728,885,083,309,683,000 | 38.982709 | 79 | 0.593773 | false | 4.109597 | true | false | false |
MIT-Model-Open-Data-and-Identity-System/SensibleData-Apps-SensibleExplorer | sensible_explorer/django_sensible/oauth2.py | 1 | 6258 |
import urllib
import urllib2
import json
from datetime import datetime
from django.contrib.auth.decorators import login_required
from django.shortcuts import redirect
from django.views.decorators.csrf import csrf_exempt
from django.contrib.sessions.models import Session
from django.contrib.auth.models import User
from... | mit | -9,196,118,631,024,140,000 | 35.17341 | 178 | 0.652285 | false | 3.822847 | false | false | false |
helixyte/TheLMA | thelma/repositories/rdb/schema/tables/worklistseriesmember.py | 1 | 1269 | """
This file is part of the TheLMA (THe Laboratory Management Application) project.
See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information.
Worklist series member table.
"""
from sqlalchemy import CheckConstraint
from sqlalchemy import Column
from sqlalchemy import ForeignKey
from sqlalchemy impo... | mit | -2,220,488,483,221,185,000 | 37.454545 | 80 | 0.647754 | false | 4.5 | false | false | false |
UITools/saleor | saleor/site/models.py | 1 | 3220 | from django.contrib.sites.models import Site
from django.db import models
from django.utils.translation import pgettext_lazy
from ..core.utils.translations import TranslationProxy
from ..core.weight import WeightUnits
from . import AuthenticationBackends
from .patch_sites import patch_contrib_sites
patch_contrib_site... | bsd-3-clause | -5,034,453,569,397,996,000 | 36.44186 | 79 | 0.686335 | false | 3.926829 | false | false | false |
Armory/spinnaker-aws-policy | src/policy_diff.py | 1 | 2103 | #!/usr/bin/env python3
import sys
import os
from os import listdir
from os.path import isfile, join
import semantic_version
import generate
import re
import logging
logger = logging.getLogger(__name__)
def _get_semantic_version(policy_filename):
logger.debug("getting semantic version from filename is %s:" % polic... | apache-2.0 | -2,501,983,974,382,075,400 | 35.894737 | 96 | 0.676652 | false | 3.534454 | true | false | false |
ICShapy/shapy | web.py | 1 | 3665 | #!/usr/bin/env python2
import os
import sys
import redis
import tornado.httpserver
import tornado.ioloop
import tornado.web
import psycopg2
import momoko
import shapy.editor
import shapy.user
import shapy.assets
import shapy.permissions
import shapy.public
class IndexHandler(tornado.web.StaticFileHandler):
def... | mit | -3,141,320,423,086,238,000 | 30.869565 | 78 | 0.638472 | false | 3.100677 | false | false | false |
josiahcarlson/rom | rom/columns.py | 1 | 36646 |
'''
Rom - the Redis object mapper for Python
Copyright 2013-2016 Josiah Carlson
Released under the LGPL license version 2.1 and version 3 (you can choose
which you'd like to be bound under).
'''
from datetime import datetime, date, time as dtime
from decimal import Decimal as _Decimal
from functools import wraps
fr... | lgpl-2.1 | -5,437,258,729,931,782,000 | 36.204061 | 135 | 0.617011 | false | 4.168107 | false | false | false |
chungy/voltdb-utils | src/snapshot.py | 1 | 3671 | #!/usr/bin/env python2
# Copyright (c) 2011-2012 PM Development, LLC
# Permission to use, copy, modify, and 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" ... | isc | 7,066,425,906,784,296,000 | 30.921739 | 74 | 0.606102 | false | 4.268605 | false | false | false |
Juzley/typingdefense | typingdefense/editor.py | 1 | 14383 | """Level editor module."""
from enum import Enum, unique
import sdl2
import numpy
import itertools
import OpenGL.GL as GL
import typingdefense.vector as vector
import typingdefense.glutils as glutils
import typingdefense.util as util
import typingdefense.enemy as enemy
import typingdefense.text as text
import typingdef... | mit | 8,135,193,022,158,242,000 | 37.872973 | 80 | 0.540569 | false | 3.734874 | false | false | false |
logston/qsic3 | qsic/performers/admin.py | 1 | 1105 | from django.contrib import admin
from image_cropping import ImageCroppingMixin
from .models import Performer
from qsic.core.admin import QsicModelAdmin
class PerformerAdmin(ImageCroppingMixin, QsicModelAdmin):
list_display = ('first_name', 'last_name', 'it_url', 'is_active',)
search_fields = ('first_name', ... | bsd-3-clause | 4,672,788,239,670,484,000 | 33.5625 | 76 | 0.667873 | false | 3.46395 | false | false | false |
sshwsfc/django-xadmin | tests/runtests.py | 5 | 6577 | #!/usr/bin/env python
from __future__ import print_function
import os
import shutil
import sys
import tempfile
import django
from django.apps import AppConfig,apps
from django.utils.encoding import smart_text
TEST_ROOT = os.path.realpath(os.path.dirname(__file__))
RUNTESTS_DIR = os.path.join(TEST_ROOT, 'xtests')
sy... | bsd-3-clause | -7,040,357,197,886,566,000 | 37.017341 | 96 | 0.653489 | false | 3.952524 | true | false | false |
tdyas/pants | src/python/pants/java/executor.py | 1 | 9842 | # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import logging
import os
import subprocess
import sys
from abc import ABC, abstractmethod
from contextlib import contextmanager
from pants.util.collections import ensure_str_list
from pan... | apache-2.0 | -2,227,580,231,156,163,000 | 37.596078 | 101 | 0.624365 | false | 4.431337 | false | false | false |
mdraeger/gmapcatcher | installer/setup.py | 1 | 2864 | # -*- coding: utf-8 -*-
## @package setup
# Setup file used to build the Installers
from distutils.core import setup
from gmapcatcher.mapConst import *
import os
if os.name == "posix":
ico = "images/map.png"
setup(
name = NAME,
description = 'Offline Map Viewer',
version = VERSION,
... | gpl-2.0 | 417,405,760,739,805,950 | 38.232877 | 82 | 0.489874 | false | 3.318656 | false | false | false |
ZhangXiaoyu-Chief/sandwich | api/views/machineroom.py | 1 | 3543 | from api.libs.base import CoreView
from cmdb.models import MachineRoom, DataCenter
from account.models import UserProfile
from django.db.utils import IntegrityError
class MachineRoomView(CoreView):
"""
机房视图类
"""
login_required_action = ["get_list", "post_create", "post_delete", "post_change"]
supe... | apache-2.0 | 2,182,102,773,265,332,000 | 42.097561 | 150 | 0.607982 | false | 3.848584 | false | false | false |
emc-openstack/storops | storops/vnx/resource/disk.py | 1 | 5789 | # coding=utf-8
# Copyright (c) 2015 EMC 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-2.0
#
#... | apache-2.0 | -7,989,729,975,975,277,000 | 30.461957 | 79 | 0.589048 | false | 3.908845 | false | false | false |
whym/scluster | scluster/evaluate.py | 1 | 5834 | #! /usr/bin/env python
import argparse
import re
import math
import codecs
from six.moves import reduce
def uniq(ls):
d = {}
ret = []
for x in ls:
if x not in d:
d[x] = True
ret.append(x)
return ret
# I know numpy has these functions, but I wanted to make this script... | mit | -8,723,627,452,588,997,000 | 31.592179 | 90 | 0.517312 | false | 3.676118 | false | false | false |
sbussmann/Bussmann2015 | Code/dnda.py | 1 | 6549 | """
Shane Bussmann
2014 August 20
Plot dN/dA as a function of angular separation from the center of light. dN =
number of objects between radius 1 and radius 2. dA = area between radius 1
and radius 2.
"""
from astropy.table import Table
from astropy.io import ascii
import matplotlib
import matplotlib.pyplot as ... | mit | -3,463,065,048,076,044,300 | 29.746479 | 89 | 0.704688 | false | 2.693953 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.