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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
puruckertom/ubertool | ubertool/kabam/kabam_functions.py | 1 | 42339 | from __future__ import division #brings in Python 3.0 mixed type calculation rules
from functools import wraps
import logging
import numpy as np
import pandas as pd
import time
from math import exp
class KabamFunctions(object):
"""
Function class for Kabam.
"""
def __init__(self):
"""Class r... | unlicense | -2,566,465,609,833,547,000 | 44.97177 | 134 | 0.625641 | false | 3.258099 | false | false | false |
SunPowered/python-workshop-2015 | code/session3/matplotlib_package.py | 1 | 3980 | # -*- coding: utf-8 -*-
"""
matplotlib_package.py - 3 Data Analysis
The dominant plotting library in Python was constructed to
emulate the standard MATLAB plotting syntax and functionality,
hence the name 'matplotlib'.
There are several ways to interface with matplotlib. One can plot ... | gpl-2.0 | 380,881,805,217,125,600 | 23.875 | 87 | 0.660553 | false | 3.186549 | false | false | false |
mengomarlene/2DImage2Mesh | Image2MeshToolbox.py | 1 | 2763 |
#-----------------------------------------------------
def clearUnwantedNodes(model):
from abaqusConstants import ON
## FOR EACH PART: CLEAR UNWANTED NODES AND DELETE SHELL SECTIONS
for myPart in model.parts.values():
## clean node list (remove nodes not in the zMin plane)
#1/ find zMin...
... | gpl-2.0 | -4,718,912,397,360,695,000 | 49.254545 | 141 | 0.588853 | false | 4.111607 | false | false | false |
biosustain/venom | tests/rpc/test_method.py | 1 | 3948 | from collections import namedtuple
from unittest import SkipTest
from venom import Empty
from venom import Message
from venom.common import Value, BoolValue
from venom.common.types import JSONValue
from venom.converter import Converter
from venom.fields import Int32, String
from venom.rpc import Service, rpc
from veno... | mit | 881,615,685,516,078,600 | 38.878788 | 114 | 0.607903 | false | 3.967839 | true | false | false |
wampixel/sciMS | index/forms.py | 1 | 1025 | from django import forms
class registration(forms.Form):
username = forms.CharField(max_length=100,
widget=forms.TextInput(attrs={'class': 'form-control',
'placeholder' : 'Username'}))
nom = forms.CharField(max_length=100,
... | gpl-3.0 | 5,774,265,578,307,167,000 | 63.125 | 96 | 0.470244 | false | 5.203046 | false | false | false |
Yukarumya/Yukarum-Redfoxes | xpcom/typelib/xpt/tools/xpt.py | 1 | 56333 | #!/usr/bin/env python
# Copyright 2010,2011 Mozilla Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright
# notic... | mpl-2.0 | 720,056,686,050,744,700 | 35.57987 | 164 | 0.575311 | false | 4.090698 | false | false | false |
forairan/gagar | gagar/window.py | 1 | 4373 | from gi.repository import Gtk, Gdk
from agarnet.vec import Vec
class WorldViewer(object):
"""
Draws one world and handles keys/mouse.
Does not poll for events itself.
Calls input_subscriber.on_{key_pressed|mouse_moved}() methods on key/mouse input.
Calls draw_subscriber.on_draw_{background|cells|... | gpl-3.0 | 2,771,065,779,682,986,500 | 36.059322 | 85 | 0.61308 | false | 3.677881 | false | false | false |
jedimatt42/pi-messaging | htdocs/tipi_editor.py | 1 | 3428 | # tipi_editor
#
# TIPI web administration
#
# Corey J. Anderson ElectricLab.com 2017
# et al.
import os
import logging
import uuid
from ti_files import ti_files
from subprocess import call
logger = logging.getLogger(__name__)
basicSuffixes = ('.b99', '.bas', '.xb')
tipi_disk_base = '/home/tipi/tipi_disk'
def load... | gpl-3.0 | -5,738,017,850,617,338,000 | 30.163636 | 85 | 0.573221 | false | 3.357493 | false | false | false |
galaxy-modal/transcriptomics | galaxy-tools/stderr_wrapper.py | 1 | 1676 | #!/usr/bin/python
"""
Wrapper that executes a program with its arguments but reports standard error
messages only if the program exit status was not 0. This is useful to prevent
Galaxy to interpret that there was an error if something was printed on stderr,
e.g. if this was simply a warning.
Example: ./stderr_wrapper.... | gpl-2.0 | -7,320,840,070,516,737,000 | 28.403509 | 81 | 0.601432 | false | 3.897674 | false | false | false |
inkvisit/sarmacoins | contrib/seeds/makeseeds.py | 1 | 3522 | #!/usr/bin/env python
#
# Generate seeds.txt from Pieter's DNS seeder
#
NSEEDS=512
MAX_SEEDS_PER_ASN=2
MIN_BLOCKS = 200000
# These are hosts that have been observed to be behaving strangely (e.g.
# aggressively connecting to every node).
SUSPICIOUS_HOSTS = set([
"127.0.0.1"
])
import re
import sys
import dns.... | mit | -8,680,919,261,118,517,000 | 29.495652 | 186 | 0.572569 | false | 3.070928 | false | false | false |
camptocamp/QGIS | python/plugins/processing/outputs/OutputExtent.py | 1 | 1632 | # -*- coding: utf-8 -*-
"""
***************************************************************************
OutputNumber.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
**************************... | gpl-2.0 | 8,318,590,386,951,244,000 | 36.090909 | 75 | 0.424632 | false | 5.164557 | false | false | false |
ujikit/Raspberry | Pir_Sensor.py | 1 | 1093 | #!/usr/bin/python
import RPi.GPIO as GPIO
import time
import os
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(27,GPIO.OUT)
GPIO_PIR = 7
print "PIR Module Test (CTRL-C to exit)"
# Set pin as input
GPIO.setup(GPIO_PIR,GPIO.IN) # Echo
Current_State = 0
Previous_State = 0
try:
print "Waiting for PI... | gpl-3.0 | -486,704,074,232,634,300 | 21.770833 | 48 | 0.650503 | false | 2.954054 | false | false | false |
canarie/openstack-dashboard | django-openstack/src/django_openstack/nova/views/instances.py | 1 | 9293 | # 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 | 2,217,813,549,633,417,500 | 35.731225 | 79 | 0.633488 | false | 4.174753 | false | false | false |
HXLStandard/hxl-proxy | hxl_proxy/recipes.py | 1 | 5398 | """ Manage a data-transformation recipe
Started April 2019 by David Megginson
License: Public Domain
"""
import flask, hxl_proxy, hxl_proxy.dao, hxl_proxy.filters, logging, werkzeug
class Recipe:
""" Class to hold a HXL Proxy recipe.
The recipe can come either from the request parameters, or from a saved rec... | unlicense | 7,937,438,209,383,225,000 | 32.116564 | 94 | 0.585031 | false | 4.439145 | false | false | false |
prataprc/tayra | tayra/test/stdttl/ref/html5.ttl.py | 1 | 2138 | import imp
from io import StringIO
from pluggdapps.plugin import Plugin, implements
from tayra import BaseTTLPlugin
def __traceback_decorator__( frames ):
from copy import deepcopy
from os.path import basename
def _map2ttl( frame ):
filename = frame.fil... | gpl-3.0 | -2,734,730,127,233,263,000 | 31.393939 | 134 | 0.53508 | false | 3.718261 | false | false | false |
kandluis/document_summaries | summarizer/baselines.py | 1 | 2617 | '''
Main entry point for our text summarization using our baseline algorithm.
The baseline algorithm consists of assigning a weight to each sentence.
We define the weight of the
Copyright, 2015.
Authors:
Luis Perez (luis.perez.live@gmail.com)
Kevin Eskici (keskici@college.harvard.edu)
'''
from . import utils
import... | apache-2.0 | 8,077,415,874,106,459,000 | 28.077778 | 101 | 0.621704 | false | 3.434383 | false | false | false |
arunkgupta/gramps | gramps/gen/filters/rules/person/_iswitness.py | 1 | 2398 | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2002-2006 Donald N. Allingham
#
# 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 you... | gpl-2.0 | 2,207,472,141,097,469,400 | 36.46875 | 75 | 0.51543 | false | 4.805611 | false | false | false |
doriancoins/doriancoin | contrib/devtools/check-rpc-mappings.py | 1 | 5971 | #!/usr/bin/env python3
# Copyright (c) 2017 The Doriancoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Check RPC argument consistency."""
from collections import defaultdict
import os
import re
import sys
#... | mit | 9,194,470,161,719,797,000 | 36.791139 | 157 | 0.570591 | false | 3.874757 | false | false | false |
gjo/python-codekitlang | codekitlang/command.py | 1 | 1629 | # -*- coding: utf-8 -*-
from __future__ import print_function
import argparse
import logging
import sys
from . import compiler
def _(s):
return s
def main():
parser = argparse.ArgumentParser(
prog='pykitlangc',
description=_('CodeKit Language Compiler.'),
)
parser.add_argument('src... | bsd-3-clause | -6,925,022,318,885,198,000 | 30.326923 | 79 | 0.622468 | false | 3.869359 | false | false | false |
brainstorm/bcbio-nextgen | bcbio/ngsalign/star.py | 1 | 7746 | import os
import sys
import shutil
import subprocess
import contextlib
from collections import namedtuple
from bcbio.pipeline import config_utils
from bcbio.distributed.transaction import file_transaction, tx_tmpdir
from bcbio.utils import (safe_makedir, file_exists, is_gzipped)
from bcbio.provenance import do
from bc... | mit | 9,177,149,942,006,414,000 | 40.42246 | 89 | 0.619287 | false | 3.231539 | true | false | false |
pauloacmelo/papelex_winthor | papelex_magento/customer.py | 1 | 3621 | # -*- coding: UTF-8 -*-
'''
magento.customer
Customer API for magento
:license: BSD, see LICENSE for more details
'''
from .api import API
class Customer(API):
"""
Customer API
Example usage::
from magento import Customer as CustomerAPI
with CustomerAPI(url, username, pas... | mit | -3,507,494,974,233,864,700 | 23.972414 | 77 | 0.570008 | false | 4.410475 | false | false | false |
OpenLocalMap/OpenLocalMap | Python Version/xyCoordsLLPGClass.py | 1 | 1326 | # OpenLocalMap OpenSource web mapping for local government
# Copyright (C) <2014> <Ben Calnan>
#
# 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, ... | gpl-3.0 | -4,400,104,537,916,759,000 | 34.837838 | 108 | 0.665913 | false | 3.55496 | false | false | false |
devlights/try-python | trypython/stdlib/dis_/dis01.py | 1 | 2422 | # coding: utf-8
"""
dis モジュールについてのサンプルです。
"""
import dis
from trypython.common.commoncls import SampleBase
from trypython.common.commonfunc import hr
# noinspection SpellCheckingInspection
class Sample(SampleBase):
def exec(self):
##############################################
# dis モジュールは、python... | mit | 6,764,128,687,262,864,000 | 25.540541 | 70 | 0.471487 | false | 2.505102 | false | false | false |
jhseu/tensorflow | tensorflow/compiler/tests/special_math_test.py | 1 | 3535 | # Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -5,683,867,419,198,845,000 | 34.707071 | 80 | 0.655446 | false | 3.412162 | true | false | false |
rahulpsd18/twitter-sentiment-analysis | website/views.py | 1 | 2143 | from django.shortcuts import render
from django.http import HttpResponse
from django.utils.datastructures import MultiValueDictKeyError
import os
import requests
import tweepy
from textblob import TextBlob
### For Logging purposes to console.. disable in production
# import logging
# logger = logging.getLogger(__nam... | mit | -6,747,758,861,474,120,000 | 31.469697 | 138 | 0.669622 | false | 3.380126 | false | false | false |
romain-fontugne/ripeAtlasDetector | dataManipulation/mongoimport.py | 1 | 2772 | import os
import sys
import json
import glob
import pymongo
import datetime
import gzip
# def importMongo(path,collection, db=None):
# if db is None:
# client = pymongo.MongoClient("mongodb-ikebukuro")
# db = client.atlas
# col = db[collection]
# for filename in glob.glob(path):
#... | gpl-2.0 | 6,064,794,230,779,179,000 | 31.611765 | 126 | 0.557359 | false | 3.586028 | false | false | false |
nortikin/sverchok | ui/nodeview_rclick_menu.py | 1 | 12854 | # This file is part of project Sverchok. It's copyrighted by the contributors
# recorded in the version control history of the file, available from
# its original location https://github.com/nortikin/sverchok/commit/master
#
# SPDX-License-Identifier: GPL3
# License-Filename: LICENSE
import bpy
from sverchok.utils.sv... | gpl-3.0 | 4,325,409,515,242,083,300 | 36.805882 | 121 | 0.619885 | false | 3.74643 | false | false | false |
acsone/mozaik | mozaik_account/__openerp__.py | 1 | 1753 | # -*- coding: utf-8 -*-
##############################################################################
#
# This file is part of mozaik_account, an Odoo module.
#
# Copyright (c) 2015 ACSONE SA/NV (<http://acsone.eu>)
#
# mozaik_account is free software:
# you can redistribute it and/or
# modify it u... | agpl-3.0 | 5,313,263,469,645,565,000 | 28.216667 | 78 | 0.547633 | false | 3.794372 | false | false | false |
mozilla/FlightDeck | apps/amo/views.py | 1 | 5070 | import commonware.log
import simplejson
from django.shortcuts import get_object_or_404 # render_to_response,
from django.http import HttpResponse, HttpResponseBadRequest
from amo import tasks
from amo.constants import STATUS_UPLOAD_FAILED, STATUS_UPLOAD_SCHEDULED
from amo.helpers import get_addon_details as _get_add... | bsd-3-clause | -3,445,110,804,472,861,000 | 39.56 | 136 | 0.657791 | false | 3.912037 | false | false | false |
nicholas-moreles/blaspy | blaspy/config.py | 1 | 1951 | """
Copyright (c) 2014-2015-2015, The University of Texas at Austin.
All rights reserved.
This file is part of BLASpy and is available under the 3-Clause
BSD License, which can be found in the LICENSE file at the top-level
directory or at http://opensource.org/licenses/BSD-3-Clause
"""
from .err... | bsd-3-clause | -4,852,845,395,253,406,000 | 34.490909 | 96 | 0.627883 | false | 3.358003 | false | false | false |
manub686/atomix | r1cmplr/lpinput.py | 1 | 19222 | #!/usr/bin/env python
'''
Atomix project, lpinput.py, (TODO: summary)
Copyright (c) 2015 Stanford University
Released under the Apache License v2.0. See the LICENSE file for details.
Author(s): Manu Bansal
'''
import numpy as np
import sys
def main():
inpfile = sys.argv[1]
(inp, out) = lpinput(inpfile)
print in... | apache-2.0 | 297,183,618,561,606,400 | 32.487805 | 242 | 0.546769 | false | 2.052536 | false | false | false |
NicolasBonet/cloud | videosapp/views.py | 1 | 8807 | from django.views.decorators.csrf import csrf_exempt
from django.http import HttpResponseRedirect, HttpResponse
from django.shortcuts import get_object_or_404, render_to_response, render
from django.core.urlresolvers import reverse
from django.template import RequestContext
from django.contrib.auth.forms import UserCre... | agpl-3.0 | 8,715,289,717,513,734,000 | 38.316964 | 277 | 0.660384 | false | 3.437549 | false | false | false |
pythonindia/wye | tests/functional/test_edit_profile.py | 1 | 6792 |
import pytest
from .. import base
from .. import factories as f
from .. utils import create_user_verify_login
pytestmark = pytest.mark.django_db
def create_user_type(slug='tutor'):
tutor_type = f.create_usertype(slug=slug, display_name=slug)
return tutor_type
def test_signup_college_poc_flow(base_url, bro... | mit | -2,212,431,880,996,849,200 | 36.944134 | 75 | 0.686543 | false | 3.38247 | false | false | false |
shawnhermans/cyborg-identity-manager | cyborg_identity/migrations/0003_auto_20150628_2144.py | 1 | 1089 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('cyborg_identity', '0002_iscontactemailaddress_iscontactphonenumber_phonenumber'),
]
operations = [
migrations.RemoveField(
... | mit | -3,159,675,205,751,116,000 | 24.928571 | 91 | 0.55831 | false | 4.556485 | false | false | false |
HaroldMills/Vesper | scripts/detector_eval/manual/analyze_classification_edits.py | 1 | 5201 | """
Script that analyzes the classification edits of an archive.
The analysis focuses on changes user "dleick" made to classifications
created by user "cvoss", in order to inform decisions about how to most
efficiently direct classification effort.
"""
from collections import defaultdict
import sqlite3
# Set up Dja... | mit | -7,949,347,712,655,548,000 | 26.962366 | 78 | 0.585849 | false | 3.824265 | false | false | false |
aaltay/beam | sdks/python/apache_beam/typehints/typecheck.py | 1 | 12441 | #
# 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 us... | apache-2.0 | -7,856,147,975,945,957,000 | 35.06087 | 113 | 0.685958 | false | 3.857674 | false | false | false |
vbwagner/ctypescrypto | tests/testpkey.py | 1 | 9134 | from ctypescrypto.pkey import PKey
from ctypescrypto import pyver
import unittest,re
from base64 import b64decode, b16decode
from subprocess import Popen,PIPE,CalledProcessError
def pem2der(s):
start=s.find('-----\n')
finish=s.rfind('\n-----END')
data=s[start+6:finish]
return b64decode(data)
def runop... | mit | -7,343,754,033,386,160,000 | 43.125604 | 92 | 0.737464 | false | 2.072142 | true | false | false |
x522758754/XlsTools | xlsDelCol.py | 1 | 3807 | #!/user/bin/env python
# coding:utf-8
import sys
import os
import codecs
import pandas as pd
reload(sys)
sys.setdefaultencoding('utf-8')
#删除的列 从0开始
DELCOL = 1
_DictFileCoding = dict()
def GetAllTxt(srcPath, dstPath):
#print path
srcfiles = []
dstfiles = []
for root, dirs, files in os.walk(srcPath):
for f in f... | mit | 5,793,836,253,580,370,000 | 25.134752 | 74 | 0.652917 | false | 2.578726 | false | false | false |
kleisauke/pyvips | pyvips/tests/test_gvalue.py | 1 | 3235 | # vim: set fileencoding=utf-8 :
import unittest
import pyvips
from .helpers import PyvipsTester, JPEG_FILE
class TestGValue(PyvipsTester):
def test_bool(self):
gv = pyvips.GValue()
gv.set_type(pyvips.GValue.gbool_type)
gv.set(True)
value = gv.get()
self.assertEqual(value, ... | mit | 4,357,290,625,036,344,300 | 29.233645 | 76 | 0.57898 | false | 3.023364 | true | false | false |
TNosredna/CouchPotatoServer | couchpotato/core/plugins/suggestion/main.py | 1 | 3422 | from couchpotato import get_session
from couchpotato.api import addApiView
from couchpotato.core.event import fireEvent
from couchpotato.core.helpers.encoding import ss
from couchpotato.core.helpers.variable import splitString, md5
from couchpotato.core.plugins.base import Plugin
from couchpotato.core.settings.model im... | gpl-3.0 | 2,790,638,608,713,622,000 | 36.604396 | 113 | 0.611631 | false | 4.035377 | false | false | false |
FRED-2/Fred2-Apps | src/Distance2SelfBinding.py | 2 | 3775 | # This code is part of the Fred2 distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
from tempfile import NamedTemporaryFile
__author__ = 'mohr,schubert'
import os
import subprocess
import logging
import itertools
import pandas
from Fred2... | bsd-3-clause | 6,947,356,897,559,048,000 | 36.009804 | 125 | 0.63894 | false | 3.801611 | false | false | false |
xe1gyq/nuupxe | core/GoogleTTS.py | 1 | 5682 | #!/usr/bin/python
import commands
import sys
import argparse
import re
import urllib, urllib2
import time
from collections import namedtuple
def split_text(input_text, max_length=100):
"""
Try to split between sentences to avoid interruptions mid-sentence.
Failing that, split between words.
See split... | apache-2.0 | 6,340,551,672,910,915,000 | 37.917808 | 91 | 0.567054 | false | 4.078966 | false | false | false |
c17r/TagTrain | src/tagtrain/tagtrain/tt_unblacklist.py | 1 | 1281 | from tagtrain import data
from tagtrain.tagtrain import TagTrainResponse, C_MEMBER, C_GROUP
class UnBlacklist(TagTrainResponse):
TYPE = TagTrainResponse.TYPE_COMMENTORMESSAGE
CMD_REGEX = f'unblacklist {C_MEMBER} {C_GROUP}?'
HELP_TEXT = ("`u/{botname} unblacklist <member-name> [<group-name>]` - "
... | mit | 5,373,507,038,095,940,000 | 40.322581 | 100 | 0.63388 | false | 3.823881 | false | false | false |
anetasie/sherpa | sherpa/astro/datastack/plot_backend/plot_matplotlib.py | 4 | 2185 | #
# Copyright (C) 2010, 2014, 2015 Smithsonian Astrophysical Observatory
#
#
# 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 late... | gpl-3.0 | 2,775,161,598,395,627,500 | 23.829545 | 74 | 0.684668 | false | 3.901786 | false | false | false |
PetrGlad/hessianpy | hessian/server.py | 1 | 3978 | #
# Hessian protocol implementation
# This file contains simple RPC server code.
#
# Protocol specification can be found here:
# http://www.caucho.com/resin-3.0/protocols/hessian-1.0-spec.xtp
#
# Copyright 2006-2007 Petr Gladkikh (batyi at users sourceforge net)
#
# Licensed under the Apache License, Version 2.0 (the... | apache-2.0 | 235,882,162,371,547,040 | 29.6 | 93 | 0.590749 | false | 4.245464 | false | false | false |
rguillebert/CythonCTypesBackend | Cython/Compiler/MemoryView.py | 1 | 33248 | from Errors import CompileError, error
import ExprNodes
from ExprNodes import IntNode, NameNode, AttributeNode
import Options
from Code import UtilityCode, TempitaUtilityCode
from UtilityCode import CythonUtilityCode
import Buffer
import PyrexTypes
import ModuleNode
START_ERR = "Start must not be given."
STOP_ERR = "A... | apache-2.0 | 9,080,627,596,111,706,000 | 34.598501 | 108 | 0.573749 | false | 3.617845 | false | false | false |
lmazuel/azure-sdk-for-python | azure-mgmt-network/azure/mgmt/network/v2017_03_01/models/topology_association.py | 1 | 1586 | # 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 ... | mit | -3,703,639,473,381,361,700 | 38.65 | 78 | 0.612863 | false | 4.405556 | false | false | false |
heuer/cablemap | cablemap.core/tests/test_reader_classified_by.py | 1 | 39464 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2011 - 2015 -- Lars Heuer <heuer[at]semagia.com>
# All rights reserved.
#
# License: BSD, see LICENSE.txt for more details.
#
"""\
Tests classificationist parsing.
:author: Lars Heuer (heuer[at]semagia.com)
:organization: Semagia - <http://www.semagia.com/>
:license: ... | bsd-3-clause | 7,676,235,879,460,244,000 | 36.018762 | 210 | 0.634053 | false | 2.249957 | false | false | false |
sunsong/obfsproxy | obfsproxy/transports/b64.py | 1 | 2455 | #!/usr/bin/python
# -*- coding: utf-8 -*-
""" This module contains an implementation of the 'b64' transport. """
from obfsproxy.transports.base import BaseTransport
import base64
import obfsproxy.common.log as logging
log = logging.get_obfslogger()
def _get_b64_chunks_from_str(string):
"""
Given a 'string... | bsd-3-clause | 6,540,606,080,512,612,000 | 25.978022 | 82 | 0.606517 | false | 4.004894 | false | false | false |
ianunruh/hvac | hvac/api/system_backend/audit.py | 1 | 3598 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Support for "Audit"-related System Backend Methods."""
from hvac.api.system_backend.system_backend_mixin import SystemBackendMixin
class Audit(SystemBackendMixin):
def list_enabled_audit_devices(self):
"""List enabled audit devices.
It does not li... | apache-2.0 | 181,234,886,285,527,170 | 34.27451 | 115 | 0.611451 | false | 4.345411 | false | false | false |
Melrok/energistream-py | tests/verify.py | 1 | 1840 | #would like to use difflib here eventually
hashLine = ('#' * 80) + '\n'
class Verify(object):
def str_equal(self, expected, actual, errMessage=None):
if self == expected:
return
if expected is None:
raise AssertionError("{0} expected is None".format(errMessage))
i... | mit | 895,279,386,831,197,200 | 33.716981 | 126 | 0.573913 | false | 4.191344 | false | false | false |
tschalch/pyTray | src/lib/reportlab/graphics/widgetbase.py | 1 | 17565 | #Copyright ReportLab Europe Ltd. 2000-2004
#see license.txt for license details
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/graphics/widgetbase.py
__version__=''' $Id: widgetbase.py,v 1.1 2006/05/26 19:19:38 thomas Exp $ '''
import string
from reportlab.graphics impor... | bsd-3-clause | -6,657,977,910,297,390,000 | 33.846939 | 111 | 0.561856 | false | 4.165283 | false | false | false |
parksjin01/ctf | 2016/Plaid/butterfly.py | 1 | 1767 | #!/usr/bin/env python2
from pwn import *
#r = remote('butterfly.pwning.xxx', 9999)
r = process('./butterfly')
loop_val = '0x20041c6'
# Start the loop
r.sendline(loop_val)
# Generate the payload
start_addr = 0x40084a
shell_addr = 0x400914
shellcode = '4831f648c7c03b0000004831d248c7c7140940000f05'
text = '4531f6... | mit | -8,768,587,543,166,460,000 | 30.553571 | 79 | 0.633843 | false | 2.621662 | false | false | false |
taedori81/shoop | shoop/admin/utils/picotable.py | 1 | 13367 | # -*- coding: utf-8 -*-
# This file is part of Shoop.
#
# Copyright (c) 2012-2015, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import unicode_literals
import json
import six
from django... | agpl-3.0 | 7,626,388,386,203,150,000 | 33.992147 | 119 | 0.597292 | false | 3.998504 | true | false | false |
ActiveState/code | recipes/Python/252132_generic_jythtaglib/recipe-252132.py | 1 | 3673 | ## store this into classes/jython/get.java
package jython;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
import org.python.util.PythonInterpreter;
import org.python.core.*;
public class get extends TagSupport{
public PythonInterpreter interp;
public String cmd;
protected PageContext page... | mit | -4,884,085,414,985,294,000 | 25.615942 | 139 | 0.643616 | false | 3.673 | false | false | false |
cbuben/cloud-init | tests/unittests/test_handler/test_handler_yum_add_repo.py | 1 | 2372 | from cloudinit import util
from cloudinit.config import cc_yum_add_repo
from .. import helpers
import logging
from StringIO import StringIO
import configobj
LOG = logging.getLogger(__name__)
class TestConfig(helpers.FilesystemMockingTestCase):
def setUp(self):
super(TestConfig, self).setUp()
... | gpl-3.0 | -351,846,011,476,720,400 | 34.402985 | 80 | 0.510118 | false | 3.907743 | true | false | false |
Curious72/sympy | sympy/core/expr.py | 1 | 113033 | from __future__ import print_function, division
from .sympify import sympify, _sympify, SympifyError
from .basic import Basic, Atom
from .singleton import S
from .evalf import EvalfMixin, pure_complex
from .decorators import _sympifyit, call_highest_priority
from .cache import cacheit
from .compatibility import reduce... | bsd-3-clause | -4,040,034,916,984,503,000 | 33.72596 | 109 | 0.514558 | false | 4.006842 | false | false | false |
modoboa/modoboa | modoboa/relaydomains/migrations/0008_auto_20171123_1653.py | 1 | 1588 | # Generated by Django 1.10.7 on 2017-11-23 15:53
from django.db import migrations
def move_relaydomain_to_transport(apps, schema_editor):
"""Transform relaydomains to transports."""
RelayDomain = apps.get_model("relaydomains", "RelayDomain")
RecipientAccess = apps.get_model("relaydomains", "RecipientAcces... | isc | -2,182,599,120,591,932,700 | 32.083333 | 78 | 0.611461 | false | 3.950249 | false | false | false |
Akash334/bot | app.py | 1 | 2474 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import urllib
import json
import os
import re
from flask import Flask
from flask import request
from flask import make_response
from random import randint
# Flask app should start in global layout
app = Flask(__name__)
@app.route('/webhook', methods=['POST'])
def webhook()... | apache-2.0 | -7,652,880,332,143,322,000 | 22.121495 | 83 | 0.494745 | false | 3.709145 | false | false | false |
nschloe/quadpy | src/quadpy/cn/_stroud_1957.py | 1 | 1501 | import numpy as np
from sympy import Rational as frac
from sympy import cos, pi, sin, sqrt
from ..helpers import article, untangle
from ._helpers import CnScheme, _s
_source = article(
authors=["A.H. Stroud"],
title="Remarks on the Disposition of Points in Numerical Integration Formulas",
journal="Mathema... | mit | -844,945,079,170,114,800 | 26.796296 | 83 | 0.545636 | false | 2.784787 | false | false | false |
logicaloperate/Project-Apollo | cogs/downloader.py | 1 | 6114 | import discord
from discord.ext import commands
from .utils.dataIO import fileIO
from .utils import checks
from .utils.chat_formatting import box
from __main__ import send_cmd_help, set_cog
import os
from subprocess import call, Popen
from distutils.dir_util import copy_tree
import shutil
import asyncio
class Download... | gpl-3.0 | 4,744,360,861,402,750,000 | 40.598639 | 153 | 0.570985 | false | 3.592244 | false | false | false |
arizvisa/syringe | template/protocol/mp.py | 1 | 13773 | import ptypes
from ptypes import *
ptypes.setbyteorder(ptypes.config.byteorder.bigendian)
### definitions
class bit0(ptype.definition): cache = {}
class bit1(ptype.definition): cache = {}
class bit2container(ptype.definition): cache = {}
class bit2msgtype(ptype.definition): cache = {}
class bit3arraymap(ptype.definit... | bsd-2-clause | -6,107,569,118,676,119,000 | 30.808314 | 193 | 0.618819 | false | 2.872966 | false | false | false |
lbjay/cds-invenio | modules/websubmit/lib/functions/Send_Request_For_Refereeing_Process.py | 1 | 4816 | ## This file is part of CDS Invenio.
## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 CERN.
##
## CDS Invenio 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 (... | gpl-2.0 | 4,204,461,003,099,882,000 | 44.433962 | 165 | 0.630606 | false | 3.505095 | false | false | false |
theonlydude/RandomMetroidSolver | rom/ips.py | 1 | 10520 | import itertools
from utils.utils import range_union
# adapted from ips-util for python 3.2 (https://pypi.org/project/ips-util/)
class IPS_Patch(object):
def __init__(self, patchDict=None):
self.records = []
self.truncate_length = None
self.max_size = 0
if patchDict is not None:
... | gpl-3.0 | 8,996,946,439,968,728,000 | 42.114754 | 164 | 0.552471 | false | 4.182903 | false | false | false |
facebook/fbthrift | thrift/lib/py/transport/TSocketTest.py | 1 | 5829 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# 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 | 3,627,083,272,699,399,700 | 38.924658 | 82 | 0.614857 | false | 4.251641 | true | false | false |
hanoverhr/CAF | db/phpm/doc/conf.py | 1 | 9670 | # -*- coding: utf-8 -*-
#
# phpMyAdmin documentation build configuration file, created by
# sphinx-quickstart on Wed Sep 26 14:04:48 2012.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# ... | gpl-2.0 | -7,684,980,086,626,668,000 | 30.809211 | 82 | 0.709824 | false | 3.704981 | true | false | false |
ptone/django-duo-auth | duo_auth/backends.py | 1 | 1061 | import datetime
from django.contrib.auth.backends import ModelBackend
from django.contrib.auth.models import User
from duo_auth.models import VerificationDetails
class auth_backend(ModelBackend):
supports_object_permissions = False
supports_anonymous_user = False
supports_inactive_user = False
def a... | mit | -7,481,110,555,969,955,000 | 30.205882 | 75 | 0.66918 | false | 4.866972 | false | false | false |
jeremiah-c-leary/vhdl-style-guide | vsg/rules/single_space_between_tokens.py | 1 | 1864 |
from vsg import parser
from vsg import rule
from vsg import violation
from vsg.rules import utils as rules_utils
from vsg.vhdlFile import utils
class single_space_between_tokens(rule.Rule):
'''
Checks for a single space between two tokens.
Parameters
----------
name : string
The group... | gpl-3.0 | 8,277,113,610,826,553,000 | 30.59322 | 110 | 0.637876 | false | 3.550476 | false | false | false |
yunojuno/elasticsearch-django | elasticsearch_django/admin.py | 1 | 3501 | import logging
import simplejson as json # simplejson supports Decimal serialization
from django.contrib import admin
from django.template.defaultfilters import truncatechars, truncatewords
from django.utils.safestring import mark_safe
from .models import SearchQuery
logger = logging.getLogger(__name__)
def pprin... | mit | -1,682,509,719,301,585,000 | 32.028302 | 88 | 0.619823 | false | 4.094737 | false | false | false |
kubaszostak/gdal-dragndrop | osgeo/apps/Python27/Lib/platform.py | 1 | 53234 | #!/usr/bin/env python
""" This module tries to retrieve as much platform-identifying data as
possible. It makes this information available via function APIs.
If called from the command line, it prints the platform
information concatenated as single string to stdout. The output
format is useable... | mit | -3,123,977,640,802,781,000 | 30.921459 | 82 | 0.56988 | false | 4.079859 | false | false | false |
wavefrontHQ/python-client | wavefront_api_client/api/monitored_service_api.py | 1 | 22234 | # coding: utf-8
"""
Wavefront REST API
<p>The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.</p><p>When you make REST API calls outside the Wavefront REST ... | apache-2.0 | 2,556,072,987,155,370,000 | 40.097967 | 443 | 0.588153 | false | 4.24556 | false | false | false |
RichieStacker/bingame | bingame_forms.py | 1 | 9548 | # Number-to-binary game
# Copyright (C) 2013 Jonathan Humphreys
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# Thi... | gpl-2.0 | -3,188,199,944,839,545,000 | 45.57561 | 159 | 0.700566 | false | 3.357243 | false | false | false |
ApptuitAI/xcollector | collectors/0/mountstats.py | 1 | 11150 | #!/usr/bin/env python
# This file is part of tcollector.
# Copyright (C) 2013 The tcollector Authors.
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, o... | lgpl-3.0 | -7,301,741,734,256,473,000 | 57.376963 | 168 | 0.688969 | false | 3.017591 | false | false | false |
CogStack/cogstack | test/examples/examples_common.py | 1 | 13905 | #!/usr/bin/python
import unittest
import os
import logging
import subprocess
import time
import yaml
from connectors import *
class TestSingleExample(unittest.TestCase):
"""
A common base class for the examples test cases
"""
def __init__(self,
example_path,
sub_cas... | apache-2.0 | 2,910,151,856,740,945,400 | 40.88253 | 127 | 0.611363 | false | 3.916901 | true | false | false |
rlindner81/pyload | module/plugins/crypter/FreakhareComFolder.py | 1 | 1784 | # -*- coding: utf-8 -*-
import re
from module.plugins.internal.SimpleCrypter import SimpleCrypter
class FreakhareComFolder(SimpleCrypter):
__name__ = "FreakhareComFolder"
__type__ = "crypter"
__version__ = "0.08"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?freakshare\.com/folder/.+'... | gpl-3.0 | 5,220,101,632,335,312,000 | 41.47619 | 95 | 0.453475 | false | 3.693582 | false | false | false |
beppec56/core | solenv/gdb/libreoffice/writerfilter.py | 5 | 2749 | # -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
... | gpl-3.0 | 8,452,466,231,903,170,000 | 30.238636 | 91 | 0.666788 | false | 3.740136 | false | false | false |
Pulgama/supriya | supriya/commands/SynthDefLoadDirectoryRequest.py | 1 | 1591 | import pathlib
import supriya.osc
from supriya.commands.Request import Request
from supriya.commands.RequestBundle import RequestBundle
from supriya.enums import RequestId
class SynthDefLoadDirectoryRequest(Request):
"""
A /d_loadDir request.
"""
### CLASS VARIABLES ###
__slots__ = ("_callback"... | mit | 4,937,795,839,363,454,000 | 25.966102 | 74 | 0.607165 | false | 4.154047 | false | false | false |
openstack/trove | trove/common/strategies/cluster/experimental/galera_common/api.py | 1 | 8545 | # Copyright [2015] Hewlett-Packard Development Company, L.P.
# Copyright 2016 Tesora 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
#
# Unle... | apache-2.0 | 6,938,992,577,265,040,000 | 38.37788 | 79 | 0.604447 | false | 4.589151 | true | false | false |
chenyoufu/writeups | jarvisoj/basic_cake.py | 1 | 1448 | s = '''
nit yqmg mqrqn bxw mtjtm nq rqni fiklvbxu mqrqnl xwg dvmnzxu lqjnyxmt xatwnl, rzn nit uxnntm xmt zlzxuuk mtjtmmtg nq xl rqnl. nitmt vl wq bqwltwlzl qw yivbi exbivwtl pzxuvjk xl mqrqnl rzn nitmt vl atwtmxu xamttetwn xeqwa tsftmnl, xwg nit fzruvb, nixn mqrqnl ntwg nq gq lqet qm xuu qj nit jquuqyvwa: xbbtfn tutbnm... | gpl-3.0 | -6,093,663,068,113,639,000 | 29.166667 | 823 | 0.608425 | false | 1.964722 | false | false | false |
swprojects/Serial-Sequence-Creator | dialogs/setvoltage.py | 1 | 5066 | """
Description:
Requirements: pySerial, wxPython Phoenix
glossary and of other descriptions:
DMM - digital multimeter
PSU - power supply
SBC - single board computer
INS - general instrument commands
GEN - general sequence instructions
"""
import logging
import sys
import time
import wx
import theme
import base
... | mit | -3,217,298,695,919,984,600 | 30.867925 | 89 | 0.530004 | false | 3.453306 | false | false | false |
NunoEdgarGub1/nupic | nupic/simple_server.py | 1 | 3599 | #! /usr/bin/env python
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2015, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions... | gpl-3.0 | 307,131,252,297,311,600 | 23.82069 | 72 | 0.639066 | false | 4.012263 | false | false | false |
ARudiuk/mne-python | mne/io/array/tests/test_array.py | 3 | 3552 | from __future__ import print_function
# Author: Eric Larson <larson.eric.d@gmail.com>
#
# License: BSD (3-clause)
import os.path as op
import warnings
import matplotlib
from numpy.testing import assert_array_almost_equal, assert_allclose
from nose.tools import assert_equal, assert_raises, assert_true
from mne import... | bsd-3-clause | -862,542,634,687,912,300 | 32.509434 | 79 | 0.630349 | false | 2.977368 | true | false | false |
Qwaz/solved-hacking-problem | Codegate/2015 Quals/bookstore/bookstore.py | 1 | 1395 | from pwn import *
def talk(send, until, no_newline=False):
if until:
str = r.recvuntil(until)
print str + send
if no_newline:
r.send(send)
else:
r.sendline(send)
else:
str = r.recv()
print str + send
if no_newline:
r.send(send)
else:
r.sendline(send)
r = remote('localhost', 8020)
# Logi... | gpl-2.0 | -2,153,698,298,135,402,800 | 16.658228 | 40 | 0.564158 | false | 2.434555 | false | false | false |
SRabbelier/Melange | app/soc/views/models/notification.py | 1 | 9142 | #!/usr/bin/env python2.5
#
# Copyright 2008 the Melange 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 applic... | apache-2.0 | -9,177,998,094,437,962,000 | 30.415808 | 80 | 0.618355 | false | 3.955863 | false | false | false |
vaizguy/cryptikchaos | src/cryptikchaos/core/gui/service.py | 1 | 5439 | '''
Created on Oct 8, 2013
This file is part of CryptikChaos.
CryptikChaos 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.
CryptikChaos is... | gpl-3.0 | 6,267,618,879,123,569,000 | 28.085561 | 77 | 0.627689 | false | 3.806158 | false | false | false |
silenius/amnesia | amnesia/modules/folder/orders.py | 1 | 1754 | # -*- coding: utf-8 -*-
from amnesia.modules.content import Content
from amnesia.modules.content_type import ContentType
from amnesia.modules.event import Event
from amnesia.modules.account import Account
#from amnesia.modules.country import Country
from amnesia.order import EntityOrder
from amnesia.order import Path
... | bsd-2-clause | -7,095,688,458,044,918,000 | 41.780488 | 80 | 0.54618 | false | 4.088578 | false | false | false |
theneurasthenicrat/whale4 | polls/urls.py | 1 | 2490 | # -*- coding: utf-8 -*-
from django.conf.urls import url
from django.views.generic import TemplateView
from polls import views
uuid4="[a-f0-9]{8}-?[a-f0-9]{4}-?4[a-f0-9]{3}-?[89ab][a-f0-9]{3}-?[a-f0-9]{12}"
urlpatterns = [
url(r'^$', views.home, name='home'),
url(r'^redirectPage/$', views.redirect_page, name='... | gpl-3.0 | -2,989,620,190,023,986,000 | 64.526316 | 104 | 0.627711 | false | 3.104738 | false | true | false |
oyamad/QuantEcon.py | quantecon/dle.py | 1 | 14017 | """
Provides a class called DLE to convert and solve dynamic linear economics
(as set out in Hansen & Sargent (2013)) as LQ problems.
"""
import numpy as np
from .lqcontrol import LQ
from .matrix_eqn import solve_discrete_lyapunov
from .rank_nullspace import nullspace
class DLE(object):
r"""
This class is fo... | bsd-3-clause | 668,505,785,645,585,400 | 41.475758 | 105 | 0.552615 | false | 2.883563 | false | false | false |
TheMuffinMan5930/NarutoBattle | attacking_system.py | 1 | 1259 | import gspread
import "https://github.com/TheMuffinMan5930/NarutoBattle/blob/master/Chat.py"
Jitsu_Player = sh.worksheet(Player_Name + "- Jitsus")
i = 1
while True:
exec("Jit" + i + " = worksheet.acell(" + i.string.ascii_uppercase.index(i - 1).value + "2)")
i += 1
confirmation_of_jitsus = input("Is it correct that ... | mit | -8,263,799,134,107,539,000 | 37.030303 | 159 | 0.661355 | false | 2.52008 | false | false | false |
chimkentec/KodiMODo_rep | script.module.xbmcup/lib/xbmcup/bsoup4/builder/_htmlparser.py | 1 | 8347 | """Use the HTMLParser library to parse HTML files that aren't too bad."""
__all__ = [
'HTMLParserTreeBuilder',
]
from HTMLParser import (
HTMLParser,
HTMLParseError,
)
import sys
import warnings
# Starting in Python 3.2, the HTMLParser constructor takes a 'strict'
# argument, which we'd like to s... | gpl-3.0 | -4,245,565,650,335,776,300 | 33.209016 | 318 | 0.567988 | false | 3.952178 | false | false | false |
nyodas/enjoliver | app/objs3.py | 1 | 2316 | """
Interface with S3 to store / fetch backups
"""
import os
import time
import boto3
import logger
from configs import EnjoliverConfig
class S3Operator(object):
log = logger.get_logger(__file__)
def __init__(self, bucket_name):
ec = EnjoliverConfig(importer=__file__)
aws_id = ec.aws_id
... | mit | 7,340,518,615,331,652,000 | 33.058824 | 96 | 0.584629 | false | 3.487952 | false | false | false |
PmagPy/PmagPy | programs/histplot.py | 1 | 1769 | #!/usr/bin/env python
from pmagpy import pmag
from pmagpy import pmagplotlib
from matplotlib import pyplot as plt
import sys
import os
import numpy as np
import matplotlib
if matplotlib.get_backend() != "TKAgg":
matplotlib.use("TKAgg")
from pmagpy import ipmag
def main():
"""
NAME
histplot.py
... | bsd-3-clause | 3,270,431,581,391,425,500 | 23.232877 | 74 | 0.58225 | false | 3.509921 | false | false | false |
pdamodaran/yellowbrick | yellowbrick/utils/helpers.py | 1 | 6103 | # yellowbrick.utils.helpers
# Helper functions and generic utilities for use in Yellowbrick code.
#
# Author: Benjamin Bengfort <bbengfort@districtdatalabs.com>
# Created: Fri May 19 10:39:30 2017 -0700
#
# Copyright (C) 2017 District Data Labs
# For license information, see LICENSE.txt
#
# ID: helpers.py [79cd8cf] ... | apache-2.0 | 4,644,387,337,907,354,000 | 28.626214 | 101 | 0.574144 | false | 4.235253 | false | false | false |
edusegzy/pychemqt | lib/mEoS/C2.py | 1 | 34267 | #!/usr/bin/python
# -*- coding: utf-8 -*-
from lib.meos import MEoS
from lib import unidades
class C2(MEoS):
"""Multiparameter equation of state for ethane"""
name = "ethane"
CASNumber = "74-84-0"
formula = "CH3CH3"
synonym = "R-170"
rhoc = unidades.Density(206.18)
Tc = unidades.Temperatu... | gpl-3.0 | -2,264,954,759,358,182,100 | 55.345395 | 181 | 0.480326 | false | 2.13034 | false | false | false |
lgouger/iTerm2 | api/library/python/iterm2/iterm2/tab.py | 1 | 10947 | """Provides a class that represents an iTerm2 tab."""
import enum
import iterm2.api_pb2
import iterm2.app
import iterm2.capabilities
import iterm2.rpc
import iterm2.session
import iterm2
import json
import typing
class NavigationDirection(enum.Enum):
"""Cardinal directions."""
LEFT = "left"
RIGHT = "right... | gpl-2.0 | -8,314,729,409,645,964,000 | 38.377698 | 294 | 0.636065 | false | 4.006955 | false | false | false |
OpenTTD-Ladder/ladder-web | ladder/frontpage/models.py | 1 | 1035 | from django.conf import settings
from django.db import models
from django.utils import timezone
from translations.models import Translatable, Translation
try:
from ckeditor.fields import RichTextField
except ImportError:
RichTextField = models.TextField
class News(Translatable):
author = models.F... | gpl-2.0 | -3,211,320,791,145,666,600 | 32.419355 | 97 | 0.674396 | false | 4.348739 | false | false | false |
ntamas/yard | yard/scripts/plot.py | 1 | 9037 | """Standalone command-line application that plots ROC, precision-recall
and accumulation curves."""
import sys
from itertools import cycle
from yard.data import BinaryClassifierData
from yard.curve import CurveFactory
from yard.scripts import CommandLineAppForClassifierData
from yard.utils import parse_size
__autho... | mit | -2,838,634,514,883,085,300 | 31.507194 | 85 | 0.531592 | false | 4.168358 | false | false | false |
vegitron/python2brainfuck | t/py2b/if_statements.py | 1 | 4029 | import unittest
from p2bf.builder import BFBuild
from p2bf.emitter import Emitter
import StringIO
from util.run_bf import run
class TestIfStatements(unittest.TestCase):
def test_if_true(self):
emit_output = StringIO.StringIO()
run_output = StringIO.StringIO()
emitter = Emitter(stdout=emit_... | apache-2.0 | -2,884,884,697,422,707,000 | 40.96875 | 58 | 0.590966 | false | 3.518777 | true | false | false |
kingsdigitallab/kdl-django | ddhldap/settings.py | 1 | 1609 | # -----------------------------------------------------------------------------
# http://pythonhosted.org/django-auth-ldap/
# -----------------------------------------------------------------------------
from django_auth_ldap.config import LDAPSearch, PosixGroupType
import ldap
LDAP_BASE_DC = 'dc=dighum,dc=kcl,dc=ac... | mit | 6,093,891,807,804,528,000 | 28.254545 | 79 | 0.632691 | false | 3.19246 | false | false | false |
jperla/webify | webify/templates/helpers/xml.py | 1 | 1061 |
__no_content = object()
def node(element_name, content=__no_content, attributes={}):
attrs_string = _attrs_string(attributes)
if content == __no_content:
return node_block(element_name, attributes)
else:
return node_inline(element_name, content, attributes)
def _attrs_string(attributes):
... | mit | -1,484,670,680,213,760,300 | 33.225806 | 87 | 0.613572 | false | 3.234756 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.