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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
zseder/hunmisc | hunmisc/corpustools/20ng_to_conll.py | 1 | 4033 | """
Copyright 2011-13 Attila Zseder
Email: zseder@gmail.com
This file is part of hunmisc project
url: https://github.com/zseder/hunmisc
hunmisc is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
versi... | gpl-3.0 | 898,430,724,181,993,000 | 36.691589 | 100 | 0.634763 | false | 3.516129 | false | false | false |
OneDrive/onedrive-sdk-python | src/python2/request/item_copy.py | 1 | 3729 | # -*- coding: utf-8 -*-
'''
# Copyright (c) 2015 Microsoft Corporation
#
# 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 us... | mit | -2,817,140,909,154,993,000 | 36.29 | 164 | 0.679807 | false | 4.361404 | false | false | false |
thehackercat/aha-memo | serverApp/common/aha.py | 1 | 13263 | # -*- coding:utf-8 -*-
__author__ = 'LexusLee'
import time
import json
import tornado
import tornado.gen
from tornado.web import HTTPError
from tornado.escape import json_decode
from foundation.log import logger
from foundation import const
from serverAppConfig import DEVICE_TYPE
from serverAppConfig import TOKEN_... | gpl-3.0 | 1,503,458,384,952,282,600 | 30.134771 | 122 | 0.565492 | false | 2.960277 | false | false | false |
par2/lamana | lamana/models/fixtures/fixture_model_class.py | 1 | 10351 | #------------------------------------------------------------------------------
'''Class-style Model
This fixture is used to test the importing of models, handled by the
`theories.handshake()` module. As of 0.4.11, models can:
- be located in the `lamana.models` folder
- module and classes can have any pythonic name... | bsd-3-clause | 8,944,103,067,520,001,000 | 39.120155 | 103 | 0.526906 | false | 3.524345 | false | false | false |
mglidden/git-analysis | analysis/word_frequencies.py | 1 | 1325 | import fix_paths
import common
import config
from load_samples import load_samples_from_file
from models.commit import Commit
from collections import Counter
import json
import string
def get_words_from_message(commit_message):
#TODO: clean up this method
cleaned_message = str(commit_message.encode('ascii', 'ign... | mit | -2,114,682,968,862,255,400 | 32.974359 | 155 | 0.723019 | false | 3.450521 | false | false | false |
chebee7i/dit | dit/algorithms/optutil.py | 1 | 8288 | """
Various utilities that can be helpful for optimization problems.
"""
from __future__ import division, print_function
from collections import defaultdict
import itertools
import numpy as np
import dit
from .frankwolfe import frank_wolfe
def as_full_rank(A, b):
"""
From a linear system Ax = b, return Bx... | bsd-3-clause | 3,453,613,929,888,165,000 | 25.14511 | 79 | 0.552847 | false | 3.781022 | false | false | false |
monetaproject/moneta | qa/rpc-tests/util.py | 1 | 5291 | # Copyright (c) 2014 The Bitcoin Core developers
# Copyright (c) 2014-2015 The Moneta developers
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Helpful routines for regression testing
#
# Add python-bitcoinrpc to module s... | mit | -734,973,261,075,377,800 | 33.581699 | 94 | 0.600832 | false | 3.499339 | false | false | false |
wright-group/WrightData | 2015-12 Czech/workup.py | 1 | 3041 | '''
First Created 2016/05/05 by Blaise Thompson
Last Edited 2016/08/08 by Blaise Thompson
Contributors: Blaise Thompson, Kyle Czech
'''
### import ####################################################################
import os
import sys
import importlib
import collections
import WrightTools as wt
### define ##... | cc0-1.0 | 7,105,389,251,518,506,000 | 28.813725 | 104 | 0.610654 | false | 3.695018 | false | false | false |
lacion/forge | forge/forge.py | 1 | 5804 | #!/usr/bin/env python
"""
forge.forge
~~~~~
:copyright: (c) 2010-2013 by Luis Morales
:license: BSD, see LICENSE for more details.
"""
#heavely based on diamond https://github.com/BrightcoveOS/Diamond
import os
import sys
import argparse
import logging
import traceback
import inspect
from util import load_class_fro... | bsd-3-clause | -454,126,331,821,404,100 | 30.372973 | 118 | 0.52929 | false | 4.506211 | false | false | false |
edgedb/edgedb | edb/testbase/protocol/render_utils.py | 1 | 1595 | #
# This source file is part of the EdgeDB open source project.
#
# Copyright 2020-present MagicStack Inc. and the EdgeDB 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... | apache-2.0 | -8,708,220,317,205,776 | 25.147541 | 74 | 0.641379 | false | 3.815789 | false | false | false |
AnhellO/DAS_Sistemas | Ene-Jun-2019/juanalmaguer/Extraordinario/Ejercicio 4.py | 1 | 1725 |
import peewee
import sqlite3
file = 'countries.db'
db = peewee.SqliteDatabase(file)
class Pais(peewee.Model):
nombre = peewee.TextField()
lenguajes = peewee.TextField()
continente = peewee.TextField()
capital = peewee.TextField()
zona = peewee.TextField()
class Meta:
database = db
... | mit | 7,194,455,465,097,568,000 | 24.323529 | 95 | 0.632772 | false | 3.056838 | false | false | false |
TuftsBCB/Walker | run_walker.py | 1 | 2820 | """
Main script for running tissue-specific graph walk experiments, to convergence.
"""
import sys
import argparse
from walker import Walker
def generate_seed_list(seed_file):
""" Read seed file into a list. """
seed_list = []
try:
fp = open(seed_file, "r")
except IOError:
sys.exit("E... | mit | -6,129,807,627,736,509,000 | 33.390244 | 81 | 0.588652 | false | 3.852459 | false | false | false |
brunoabud/ic | ic/queue.py | 1 | 4887 | # coding: utf-8
# Copyright (C) 2016 Bruno Abude Cardoso
#
# Imagem Cinemática 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.
#
# Imag... | gpl-3.0 | 6,604,661,603,224,259,000 | 32.689655 | 80 | 0.561515 | false | 4.518964 | false | false | false |
WPI-ARC/constrained_path_generator | scripts/demo.py | 1 | 2723 | #!/usr/bin/python
import math
import rospy
import random
from sensor_msgs.msg import *
from geometry_msgs.msg import *
from constrained_path_generator.msg import *
from constrained_path_generator.srv import *
def make_pose((px, py, pz), (rx, ry, rz, rw)):
new_pose = Pose()
new_pose.position.x = px
new_po... | bsd-2-clause | -177,377,274,693,844,160 | 28.608696 | 147 | 0.658832 | false | 2.921674 | false | false | false |
roderickmackenzie/gpvdm | gpvdm_gui/gui/license_key.py | 1 | 2732 | #
# General-purpose Photovoltaic Device Model - a drift diffusion base/Shockley-Read-Hall
# model for 1st, 2nd and 3rd generation solar cells.
# Copyright (C) 2012-2017 Roderick C. I. MacKenzie r.c.i.mackenzie at googlemail.com
#
# https://www.gpvdm.com
# Room B86 Coates, University Park, Nottingham, NG7 2RD... | gpl-2.0 | -5,252,635,026,861,043,000 | 25.524272 | 118 | 0.732064 | false | 3.151096 | false | false | false |
lneuhaus/pyrpl | pyrpl/widgets/module_widgets/pid_widget.py | 1 | 1109 | """
A widget for pid modules.
"""
from .base_module_widget import ModuleWidget
from qtpy import QtCore, QtWidgets
class PidWidget(ModuleWidget):
"""
Widget for a single PID.
"""
def init_gui(self):
self.init_main_layout(orientation="vertical")
#self.main_layout = QtWidgets.QVBoxLayou... | gpl-3.0 | 1,500,945,310,355,024,100 | 31.617647 | 67 | 0.64202 | false | 3.746622 | false | false | false |
mozillazg/bild.me-cli | setup.py | 1 | 1880 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from codecs import open
import sys
import os
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import bild
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
requirements = [
'requ... | mit | 1,008,756,644,684,967,000 | 25.478873 | 79 | 0.598936 | false | 3.686275 | false | false | false |
kamailio/kamcli | kamcli/commands/cmd_shv.py | 1 | 1435 | import click
from kamcli.cli import pass_context
from kamcli.iorpc import command_ctl
@click.group(
"shv",
help="Manage $shv(name) variables",
short_help="Manage $shv(name) variables",
)
@pass_context
def cli(ctx):
pass
@cli.command("get", short_help="Get the value for $shv(name)")
@click.argument("... | gpl-2.0 | -3,036,620,697,451,798,500 | 22.916667 | 65 | 0.609059 | false | 3.027426 | false | false | false |
piotroxp/scibibscan | scib/lib/python3.5/site-packages/astropy/io/fits/hdu/nonstandard.py | 1 | 4066 | # Licensed under a 3-clause BSD style license - see PYFITS.rst
import gzip
import io
from ..file import _File
from .base import NonstandardExtHDU
from .hdulist import HDUList
from ..header import Header, _pad_length
from ..util import fileobj_name
from ....extern.six import string_types
from ....utils import lazypro... | mit | 3,870,601,165,106,004,500 | 31.528 | 79 | 0.591982 | false | 4.029732 | false | false | false |
sh-ft/mudwyrm_users | mudwyrm_users/admin/achaea/scripts/brain/combat.py | 1 | 8663 | from mudwyrm_users.admin.achaea import ScriptState
from mudwyrm_users.admin.achaea.action import Action, Outcome, EventOutcome
from mudwyrm_users.admin.achaea.trigger import Trigger, Alias, OnEvent, TriggerPack
from mudwyrm_users.admin.achaea.common import not_, traverse_scripts, AttrDict, partition_action
from mudwyrm... | mit | -8,037,533,459,721,834,000 | 31.430769 | 103 | 0.594482 | false | 3.370817 | false | false | false |
GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/windows_benchmarks/diskspd_benchmark.py | 1 | 1623 | # Copyright 2018 PerfKitBenchmarker 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 appli... | apache-2.0 | -5,473,095,602,450,988,000 | 25.177419 | 74 | 0.736907 | false | 3.663657 | true | false | false |
garnertb/fire-risk | fire_risk/backends/__init__.py | 1 | 2548 | import psycopg2
from .queries import ALL_RESIDENTIAL_FIRES
from psycopg2.extras import DictCursor
class Backend(object):
"""
Backend mixin that should be used to implement APIs to read data.
"""
def connect(self):
"""
Connect to the backend.
"""
raise NotImplementedEr... | mit | -6,737,203,091,711,348,000 | 24.737374 | 110 | 0.588305 | false | 4.177049 | false | false | false |
gardir/Devilry_sort | sort_deliveries.py | 1 | 18439 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import sys
import subprocess
import time
import shutil
import glob
from rettescript import print_failed
class Devilry_Sort:
def __init__(self,
rootDir,
execute=True,
delete=False,
log=False,
... | gpl-2.0 | 3,814,187,668,424,409,600 | 39.169935 | 238 | 0.507485 | false | 4.13965 | false | false | false |
gurnec/HashCheck | UnitTests/get-sha-test-vectors.py | 1 | 3573 | #!/usr/bin/python3
#
# SHA test vector downloader & builder
# Copyright (C) 2016 Christopher Gurnee. All rights reserved.
#
# Please refer to readme.md for information about this source code.
# Please refer to license.txt for details about distribution and modification.
#
# Downloads/builds SHA1-3 test vectors... | bsd-3-clause | -4,253,490,971,588,409,000 | 46.283784 | 123 | 0.617128 | false | 3.965594 | true | false | false |
NINAnor/QGIS | python/plugins/processing/gui/AlgorithmDialogBase.py | 1 | 6211 | # -*- coding: utf-8 -*-
"""
***************************************************************************
AlgorithmDialogBase.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
*******************... | gpl-2.0 | -3,842,399,775,241,946,000 | 34.090395 | 117 | 0.566736 | false | 4.292329 | false | false | false |
nathanielvarona/airflow | airflow/providers/apache/sqoop/hooks/sqoop.py | 1 | 15515 | #
# 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... | apache-2.0 | 389,434,711,630,519,940 | 36.652913 | 110 | 0.597499 | false | 4.073792 | false | false | false |
andywalz/PyFileMaker | setup.py | 1 | 1145 | #!/usr/bin/env python
from setuptools import setup
from PyFileMaker import __version__
setup(
name='PyFileMaker',
version=__version__,
description='Python Object Wrapper for FileMaker Server XML Interface',
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
... | bsd-3-clause | -9,189,683,703,606,496,000 | 37.166667 | 80 | 0.655022 | false | 3.934708 | false | false | false |
jpvanhal/cloudsizzle | cloudsizzle/scrapers/oodi/items.py | 1 | 1589 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2009-2010 CloudSizzle Team
#
# 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,
#... | mit | 7,193,697,621,543,712,000 | 30.156863 | 67 | 0.730648 | false | 4.063939 | false | false | false |
Jigsaw-Code/net-analysis | netanalysis/traffic/data/api_repository.py | 1 | 3175 | #!/usr/bin/python
#
# Copyright 2019 Jigsaw Operations 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 applicabl... | apache-2.0 | -1,836,266,151,497,937,000 | 36.352941 | 90 | 0.647874 | false | 3.953923 | false | false | false |
openstate/yournextrepresentative | candidates/diffs.py | 1 | 8701 | # The functions in this file are to help produce human readable diffs
# between our JSON representation of candidates.
import re
from django.conf import settings
from django.utils.translation import ugettext as _
import jsonpatch
import jsonpointer
def get_descriptive_value(election, attribute, value, leaf):
... | agpl-3.0 | -1,124,514,147,237,027,800 | 42.288557 | 124 | 0.54488 | false | 4.378963 | false | false | false |
iwm911/plaso | plaso/classifier/scanner.py | 1 | 24473 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2013 The Plaso Project Authors.
# Please see the AUTHORS file for details on individual 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 L... | apache-2.0 | -7,426,356,127,187,481,000 | 31.576565 | 80 | 0.651707 | false | 3.871657 | false | false | false |
dims/neutron | neutron/common/config.py | 1 | 13000 | # Copyright 2011 VMware, Inc.
# 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 ... | apache-2.0 | -2,916,700,827,220,835,000 | 46.619048 | 79 | 0.585846 | false | 4.506066 | false | false | false |
nginxinc/kubernetes-ingress | tests/suite/grpc/helloworld_pb2.py | 1 | 3911 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: helloworld.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _re... | apache-2.0 | -1,847,906,107,374,825,000 | 28.19403 | 369 | 0.722833 | false | 3.156578 | false | true | false |
ercanezin/ce888labs | lab8/imdb.py | 1 | 2192 |
from __future__ import print_function
import numpy as np
np.random.seed(1337) # for reproducibility
from keras.preprocessing import sequence
from keras.models import Model
from keras.layers import Dense, Activation, Embedding, GlobalMaxPooling1D,Convolution1D, Input,LSTM,merge
from keras.datasets import imdb
max_fe... | gpl-3.0 | 8,493,642,314,764,031,000 | 24.206897 | 110 | 0.69115 | false | 3.100424 | true | false | false |
zergov/flashcards | flashcards/sets.py | 1 | 3877 | """
flashcards.sets
~~~~~~~~~~~~~~~~~~~
Contain the StudySet object and logic related to it.
"""
from collections import OrderedDict
from flashcards import cards
from flashcards.cards import StudyCard
TITLE_KEY = 'title'
DESC_KEY = 'description'
CARDS_KEY = 'cards'
def create_from_dict(data):
"""
Construct... | mit | -994,116,634,628,581,500 | 25.923611 | 77 | 0.594532 | false | 4.21413 | false | false | false |
googleapis/googleapis-gen | google/ads/googleads/v6/googleads-py/google/ads/googleads/v6/resources/types/search_term_view.py | 1 | 2213 | # -*- 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 | -114,439,431,116,269,020 | 29.736111 | 109 | 0.658834 | false | 4.023636 | false | false | false |
lpryszcz/REDiscover | taxid2sra.py | 1 | 13105 | #!/usr/bin/env python
desc="""Fetch all entries from SRA for given taxid.
Save the biggest run per each SAMPLE (SRS) from given date. Paired first, if any.
Note, it run fastq-dump in background. Make sure you have enough free cores;)
DEPENDENCIES:
Biopython
"""
epilog="""Author:
l.p.pryszcz+git@gmail.com
Barcelona,... | gpl-2.0 | 5,824,388,399,453,832,000 | 42.111842 | 268 | 0.583441 | false | 3.286108 | false | false | false |
eeshangarg/zulip | zerver/views/realm_icon.py | 1 | 2428 | from django.conf import settings
from django.http import HttpRequest, HttpResponse
from django.shortcuts import redirect
from django.utils.translation import gettext as _
from zerver.decorator import require_realm_admin
from zerver.lib.actions import do_change_icon_source
from zerver.lib.realm_icon import realm_icon_u... | apache-2.0 | -8,473,574,400,917,262,000 | 37.539683 | 91 | 0.714168 | false | 3.723926 | false | false | false |
huiyiqun/check_mk | cmk/regex.py | 1 | 2740 | #!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
# +------------------------------------------------------------------+
# | ____ _ _ __ __ _ __ |
# | / ___| |__ ___ ___| | __ | \/ | |/ / |
# | | | | '_ \ / _ \/ __| |/ /... | gpl-2.0 | -2,221,331,912,281,145,600 | 36.027027 | 89 | 0.531752 | false | 3.697706 | false | false | false |
SublimeHaskell/SublimeHaskell | hsdev/backend.py | 1 | 36770 | """
The `hsdev` backend.
"""
from functools import reduce
import io
import json
import os
import os.path
import pprint
import re
import subprocess
import threading
import sublime
import SublimeHaskell.hsdev.callback as HsCallback
import SublimeHaskell.hsdev.client as HsDevClient
import SublimeHaskell.hsdev.result_pa... | mit | -7,706,911,259,607,050,000 | 49.438957 | 204 | 0.571716 | false | 3.794634 | false | false | false |
afsungur/MemWord | framefinish.py | 1 | 2063 | import wx
from griddict import GridDictionary
import Global
class FrameFinish(wx.Frame):
def __init__(self, parent, true_count, false_count, falses):
FRAME_SIZE_WIDTH = 800
FRAME_SIZE_HEIGHT = 300
FRAME_POS_X = 200
FRAME_POS_Y = 200
wx.Frame.__init__(self, parent, -1,
... | gpl-3.0 | -5,161,963,566,746,056,000 | 33.383333 | 80 | 0.56762 | false | 3.393092 | false | false | false |
davidcdba/oBid | oBid/oBid/settings.py | 1 | 6054 | #encoding: utf-8
#Para que no de porculo los acentos y Ñ
# Django settings for oBid project.
## EXPLICACION ## IMPORTAMOS LA LIBRERIA 'os' del sistema y establecemos como PATH del proyecto la carpeta en la que se encuentra
import os
PROJECT_PATH=os.path.dirname(os.path.realpath(__file__))
DEBUG = True
TEMPLATE_DEBUG ... | gpl-2.0 | 8,352,776,375,811,243,000 | 35.896341 | 129 | 0.691786 | false | 3.386122 | false | false | false |
yarikoptic/NiPy-OLD | examples/interfaces/process_fiac.py | 1 | 6055 | ''' Single subject analysis script for SPM / FIAC '''
import sys
from os.path import join as pjoin
from glob import glob
import numpy as np
from nipy.interfaces.spm import spm_info, make_job, scans_for_fnames, \
run_jobdef, fnames_presuffix, fname_presuffix, fltcols
def get_data(data_path, subj_id):
data_def... | bsd-3-clause | -6,172,351,069,423,954,000 | 29.124378 | 82 | 0.471181 | false | 3.196938 | false | false | false |
xesscorp/skidl | skidl/bus.py | 1 | 16133 | # -*- coding: utf-8 -*-
# MIT license
#
# Copyright (C) 2018 by XESS Corp.
#
# 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... | mit | -8,701,624,065,980,637,000 | 34.613687 | 111 | 0.556065 | false | 4.329844 | false | false | false |
MicheleTobias/CurvilinearAnisotropy | Code/WillametteFiles_Centerline.py | 1 | 1734 | # import the modules I'm gonna need
import glob, string, csv, os
# input the files to use
inputdirectory = 'C:\Users\Michele\Documents\Research\CurvilinearAnisotropy\WillametteRiver\willamette_elevations\willamette\centerline_elevation\\'
outputfile1 = 'C:\Users\Michele\Documents\Research\CurvilinearAnisotropy\Willame... | gpl-2.0 | 6,246,451,483,380,688,000 | 30.527273 | 168 | 0.686275 | false | 3.1875 | false | false | false |
garbas/mozilla-releng-services | lib/cli_common/cli_common/log.py | 1 | 5277 | # 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/.
from __future__ import absolute_import
import os
import structlog
import logbook
import structlog.exceptions
CHANNELS... | mpl-2.0 | -6,548,193,065,109,681,000 | 28.480447 | 126 | 0.617396 | false | 3.837818 | false | false | false |
zfrenchee/pandas | pandas/core/api.py | 1 | 3146 |
# pylint: disable=W0614,W0401,W0611
# flake8: noqa
import numpy as np
from pandas.core.algorithms import factorize, unique, value_counts
from pandas.core.dtypes.missing import isna, isnull, notna, notnull
from pandas.core.categorical import Categorical
from pandas.core.groupby import Grouper
from pandas.io.formats.f... | bsd-3-clause | 2,358,515,945,609,053,000 | 37.839506 | 76 | 0.679275 | false | 4.048906 | false | false | false |
siddhantgoel/tornado-sqlalchemy | tests/test_session_mixin.py | 1 | 1642 | from unittest.mock import Mock
from tornado_sqlalchemy import MissingDatabaseSettingError, SessionMixin
from ._common import BaseTestCase, User, db
class SessionMixinTestCase(BaseTestCase):
def test_mixin_ok(self):
class GoodHandler(SessionMixin):
def __init__(h_self):
h_self... | mit | -7,001,430,187,323,076,000 | 27.807018 | 72 | 0.545676 | false | 4.486339 | true | false | false |
detrout/pykolab | pykolab/cli/telemetry/cmd_examine_session.py | 1 | 4119 |
# -*- coding: utf-8 -*-
# Copyright 2010-2012 Kolab Systems AG (http://www.kolabsys.com)
#
# Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software... | gpl-3.0 | 592,902,317,208,415,900 | 28.212766 | 112 | 0.554989 | false | 4.290625 | false | false | false |
gltn/stdm | stdm/ui/view_str.py | 1 | 44716 | """
/***************************************************************************
Name : View STR Relationships
Description : Main Window for searching and browsing the social tenure
relationship of the participating entities.
Date : 24/May/2014
copyr... | gpl-2.0 | -8,273,558,001,482,112,000 | 32.030441 | 120 | 0.562371 | false | 4.507661 | true | false | false |
multikatt/beets | beetsplug/permissions.py | 1 | 3116 | from __future__ import (division, absolute_import, print_function,
unicode_literals)
"""Fixes file permissions after the file gets written on import. Put something
like the following in your config.yaml to configure:
permissions:
file: 644
dir: 755
"""
import os
fro... | mit | 8,238,867,990,123,123,000 | 29.851485 | 78 | 0.626765 | false | 4.171352 | true | false | false |
gonadarian/kagen | kagen/khan.py | 1 | 1955 | import os
import csv
import json
import pymongo
from kagen import utils
from kagen.utils import config
from datetime import datetime
logger = utils.get_logger("khan")
def work():
khan = utils.get_conn_khan()
db = utils.get_conn_mongo()
dtf = "%Y-%m-%dT%H:%M:%SZ"
doc = utils.get_response_json(khan, ... | mit | 5,795,363,018,765,925,000 | 31.583333 | 91 | 0.640409 | false | 3.528881 | false | false | false |
irvined1982/olweb-clients | bin/bkill.py | 1 | 3674 | #!/usr/bin/env python
# Copyright 2014 David Irvine
#
# This file is part of olwclients
#
# olwclients 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... | gpl-2.0 | 4,289,308,900,084,577,300 | 42.223529 | 119 | 0.619488 | false | 3.963323 | false | false | false |
panosl/helios | helios/orders/forms.py | 1 | 1114 | from django import forms
from helios.shipping.models import ShippingMethodRegions
class ShippingChoiceField(forms.ModelChoiceField):
def label_from_instance(self, obj):
return u'%s, %s - %s' % (obj.method.name, obj.method.shipper, obj.cost)
# todo this needs to be handled either here
# or in the checkou... | bsd-3-clause | 1,921,637,111,047,108,400 | 34.935484 | 128 | 0.670557 | false | 3.776271 | false | false | false |
buaawp/pums | mock/migrations/0001_initial.py | 1 | 3879 | # -*- 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.Create... | mit | 6,251,896,528,812,043,000 | 42.58427 | 114 | 0.564836 | false | 4.453502 | false | false | false |
cossatot/culpable | culpable/magnitudes.py | 1 | 22751 | import numpy as np
from .stats import Pdf, pdf_from_samples, multiply_pdfs, divide_pdfs
"""
Scaling relationships and related equations for earthquake magnitude
calculations.
"""
"""
Normalized slip distribution from Biasi and Weldon, 2006
"""
Dn_x = np.array(
[ 0. , 0.03852144, 0.07704287, 0.11556431... | mit | 3,321,407,271,756,784,000 | 33.628615 | 79 | 0.551976 | false | 2.902283 | false | false | false |
huwiki/featured-feeds | rsslib.py | 1 | 4281 | #!/usr/bin/python
# -*- coding: iso-8859-2 -*-
import sys, os
import re, string
import time, datetime, calendar, locale
import urllib
import cPickle
import xml.sax.saxutils
locale.setlocale(locale.LC_TIME, 'en_GB')
currenttimestamp = time.strftime(u'%a, %d %b %Y %H:%M:%S +0000', time.gmtime())
locale.setlocale(locale... | mit | -2,498,234,806,636,101,000 | 25.103659 | 107 | 0.640972 | false | 2.772668 | false | false | false |
mgedmin/objgraph | objgraph.py | 1 | 43531 | """
Tools for drawing Python object reference graphs with graphviz.
You can find documentation online at https://mg.pov.lt/objgraph/
Copyright (c) 2008-2017 Marius Gedminas <marius@pov.lt> and contributors
Released under the MIT licence.
"""
# Permission is hereby granted, free of charge, to any person obtaining a
#... | mit | 6,699,779,760,792,617,000 | 33.575854 | 79 | 0.588202 | false | 3.878731 | false | false | false |
acg/lwpb | python/pbsplit.py | 1 | 1605 | #!/usr/bin/env python
'''
pbsplit - split a protobuf stream into multiple files
'''
import sys
import getopt
import lwpb
import lwpb.stream
import lwpb.codec
def shift(L): e = L[0] ; del L[0:1] ; return e
def main():
typename = ""
skip = 0
count = -1
splitsize = 1000 # in number of records
pb2file = ... | apache-2.0 | 1,052,393,894,243,850,500 | 16.637363 | 69 | 0.576947 | false | 3.336798 | false | false | false |
bitmovin/bitmovin-python | examples/encoding/create_progressive_webm_encoding_with_vp9_and_opus_codecs.py | 1 | 4978 | import datetime
from bitmovin import Bitmovin, Encoding, HTTPSInput, S3Output, \
StreamInput, SelectionMode, Stream, EncodingOutput, ACLEntry, ACLPermission, \
MuxingStream, CloudRegion, ProgressiveWebMMuxing, VP9CodecConfiguration, OpusCodecConfiguration, VP9Quality
from bitmovin.errors import BitmovinError
... | unlicense | -3,270,803,099,738,486,000 | 48.78 | 119 | 0.57955 | false | 4.211506 | true | false | false |
f3at/feat | src/feat/models/value.py | 1 | 25453 | # F3AT - Flumotion Asynchronous Autonomous Agent Toolkit
# Copyright (C) 2010,2011 Flumotion Services, S.A.
# All rights reserved.
# 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... | gpl-2.0 | 6,844,360,681,269,452,000 | 26.606291 | 78 | 0.591011 | false | 4.179475 | false | false | false |
beiko-lab/gengis | bin/Lib/site-packages/numpy/ma/mrecords.py | 1 | 28557 | """:mod:`numpy.ma..mrecords`
Defines the equivalent of :class:`numpy.recarrays` for masked arrays,
where fields can be accessed as attributes.
Note that :class:`numpy.ma.MaskedArray` already supports structured datatypes
and the masking of individual fields.
:author: Pierre Gerard-Marchant
"""
#!!!: * We sho... | gpl-3.0 | -4,077,217,941,820,372,500 | 37.226648 | 91 | 0.536366 | false | 4.228787 | false | false | false |
schleichdi2/OPENNFR-6.1-CORE | opennfr-openembedded-core/meta/lib/oeqa/utils/qemurunner.py | 1 | 24225 | # Copyright (C) 2013 Intel Corporation
#
# Released under the MIT license (see COPYING.MIT)
# This module provides a class for starting qemu images using runqemu.
# It's used by testimage.bbclass.
import subprocess
import os
import sys
import time
import signal
import re
import socket
import select
import errno
impor... | gpl-2.0 | 2,719,740,783,573,503,000 | 39.107616 | 159 | 0.533375 | false | 4.175284 | false | false | false |
Orpheus11/nile | nile/common/lockutils.py | 1 | 3733 | import threading
import weakref
import contextlib
import logging
import fasteners
import os
LOG = logging.getLogger(__name__)
class Semaphores(object):
def __init__(self):
self._semaphores = weakref.WeakValueDictionary()
self._lock = threading.Lock()
def get(self, name):
with self._loc... | apache-2.0 | -4,795,306,328,737,834,000 | 33.247706 | 78 | 0.646397 | false | 4.013978 | false | false | false |
Fokko/incubator-airflow | tests/test_utils/mock_operators.py | 1 | 1355 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | 3,725,370,474,415,175,700 | 31.261905 | 65 | 0.723985 | false | 4.143731 | false | false | false |
Greymerk/python-rpg | src/world/terrain/chunkmanager.py | 1 | 1344 | from random import choice
from mapcache import MapCache
from chunk import Chunk
class ChunkManager:
def __init__(self, world):
self.world = world
self.chunkCache = []
self.mapCache = MapCache(self, self.world.seed)
self.maxCacheSize = 64
def getChunk(self, x, y):
chunkX = int(x) >> 4
chunkY = int(y) ... | gpl-3.0 | -1,728,710,524,475,288,800 | 19.676923 | 94 | 0.65253 | false | 2.688 | false | false | false |
WaveBlocks/WaveBlocks | src/WaveBlocks/MatrixPotential1S.py | 1 | 13237 | """The WaveBlocks Project
This file contains code for the representation of potentials for a single component.
These potential are of course scalar ones.
@author: R. Bourquin
@copyright: Copyright (C) 2010, 2011 R. Bourquin
@license: Modified BSD License
"""
import sympy
import numpy
from MatrixPotential import Mat... | bsd-3-clause | -6,184,886,920,704,668,000 | 40.495298 | 136 | 0.652187 | false | 4.079199 | false | false | false |
tobijk/ecromedos | lib/net/ecromedos/ecmlprocessor.py | 1 | 4602 | # -*- coding: utf-8 -*-
#
# Desc: This file is part of the ecromedos Document Preparation System
# Author: Tobias Koch <tobias@tobijk.de>
# License: MIT
# URL: http://www.ecromedos.net
#
import os, sys
import lxml.etree as etree
from net.ecromedos.error import ECMDSError, ECMDSPluginError
from net.ecromedos.co... | mit | 7,828,527,572,711,646,000 | 27.407407 | 76 | 0.58279 | false | 4.225895 | true | false | false |
danielquinn/spirithunter | src/spirits/api/resources.py | 1 | 8242 | import json
import random
from math import sin, cos
from django.conf import settings
from django.core.exceptions import ValidationError
from django.shortcuts import get_object_or_404
from tastypie import fields
from tastypie import http
from tastypie.authentication import MultiAuthentication, Authentication, BasicAu... | agpl-3.0 | -7,481,127,565,425,262,000 | 26.565217 | 115 | 0.579592 | false | 4.050123 | false | false | false |
linuxrocks123/MailTask | mt_attache.py | 1 | 3151 | #! /usr/bin/env python
# MailTask Alpha: The Email Manager
# Copyright (C) 2015 Patrick Simmons
# 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 ... | gpl-3.0 | -9,170,419,339,616,157,000 | 35.218391 | 149 | 0.699778 | false | 3.56448 | false | false | false |
unapiedra/BBChop | tests/dumbdag.py | 1 | 3423 | # Copyright 2008 Ealdwulf Wuffinga
# This file is part of BBChop.
#
# BBChop 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 | -1,333,789,492,420,188,700 | 29.5625 | 112 | 0.674847 | false | 3.704545 | false | false | false |
jleete97/python-graphics | games/turns/reversi/reversi.py | 1 | 3731 | import random
import sys
import time
from reversiboard import *
from games.turns.reversi.reversimoves import *
# Window parameters
WINDOW_WIDTH = 800
WINDOW_HEIGHT = 700
# Colors
DARK_GREEN = (0, 128, 0)
DARK_GREY = (128, 128, 128)
LIGHT_RED = (255, 192, 192)
GREEN = (0, 255, 0)
WHITE = (255, 255, 255)
BLACK = (0, ... | mit | -7,343,959,332,232,993,000 | 26.233577 | 79 | 0.5197 | false | 3.977612 | false | false | false |
googleads/google-ads-python | google/ads/googleads/v8/errors/types/keyword_plan_error.py | 1 | 1758 | # -*- 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 | 8,135,299,712,212,321,000 | 32.169811 | 76 | 0.677474 | false | 3.724576 | false | false | false |
TribeMedia/synapse | synapse/handlers/e2e_keys.py | 2 | 12592 | # -*- coding: utf-8 -*-
# Copyright 2016 OpenMarket Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | apache-2.0 | 1,883,954,235,118,884,400 | 37.98452 | 87 | 0.542011 | false | 4.343567 | false | false | false |
hoomanlogic/hoomancmd | hoomancmd/matchsuggestion.py | 1 | 17803 | ### score matched, proximity, missing, or nomatch to find the best fit command ###
# todo: Improve suggestion engine
# >> plns
# Did you mean 'logs'? : 97 : journal:90
# used by all versions
proximity_mapping = {
'q': ['a', 's', 'w', '2', '1', '`'],
'w': ['q', 'a', 's', 'd', 'e', '3', '2', '1'],
'e': ['w',... | apache-2.0 | -2,147,103,867,725,780,500 | 35.935685 | 119 | 0.559569 | false | 3.726036 | false | false | false |
pernici/sympy | sympy/series/tests/test_order.py | 1 | 6982 | from sympy import Symbol, Rational, Order, C, exp, ln, log, O, var, nan, pi, S
from sympy.utilities.pytest import XFAIL, raises
from sympy.abc import w, x, y, z
def test_caching_bug():
#needs to be a first test, so that all caches are clean
#cache it
e = O(w)
#and test that this won't raise an exceptio... | bsd-3-clause | -6,458,170,842,665,350,000 | 32.567308 | 78 | 0.563879 | false | 2.496246 | true | false | false |
nadgowdas/cargo | cli/cargo.py | 1 | 2456 | #!/usr/bin/env python
#Copyright IBM Corporation 2015.
#LICENSE: Apache License 2.0 http://opensource.org/licenses/Apache-2.0
import os
import optparse
import logging
from voyage import *
def main():
usage = "usage: python %prog -f <config_file> {--list | --migrate --source <source> --container <container> --tar... | apache-2.0 | 8,801,125,674,314,020,000 | 35.117647 | 150 | 0.661645 | false | 3.732523 | false | false | false |
Ilphrin/TuxleTriad | Menu.py | 1 | 16142 | # coding: utf-8
import pygame
import os
import sys
import gettext
from functions import *
from color import *
from pygame.locals import *
from game import Application
from Sound import Sound
from Text import Text
from Buttons import Button
from listOfCards import *
from Card import Card
pygame.init()
class Menu(pyga... | mit | 1,228,710,710,715,892,200 | 36.714953 | 78 | 0.477016 | false | 4.137913 | false | false | false |
mattilyra/gensim | docs/src/conf.py | 1 | 7457 | # -*- coding: utf-8 -*-
#
# gensim documentation build configuration file, created by
# sphinx-quickstart on Wed Mar 17 13:42:21 2010.
#
# 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.
#
# All ... | lgpl-2.1 | -371,278,304,731,654,850 | 32.868182 | 114 | 0.707153 | false | 3.577052 | true | false | false |
matham/cutils | cutils/knspace.py | 1 | 15278 | '''Provides namespace functionality for Kivy objects. It allows kivy objects
to be named and then accessed using the namespace.
:class:`KNSpace` instances are the namespaces that store the named objects.
Classes need to inherit from :class:`KNSpaceBehavior` so that the class, when
named, will be stored in the namespac... | mit | 1,435,365,778,809,909,800 | 35.63789 | 101 | 0.623969 | false | 4.024763 | false | false | false |
nikdoof/django-eveigb | test_project/settings.py | 1 | 5384 | # Django settings for test_project project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 't... | bsd-3-clause | 2,804,299,625,662,578,700 | 33.292994 | 127 | 0.685921 | false | 3.715666 | false | false | false |
prashrock/Python | leetCode/largest_number/create_largest_number_from_array.py | 1 | 1340 | # Use a custom sort comparator to sort the integers
# Converted the sorted integer array into a string
def cmp_to_key(mycmp):
'Convert a cmp= function into a key= function'
class K:
def __init__(self, obj, *args):
self.obj = obj
def __lt__(self, other):
return mycmp(self.... | gpl-2.0 | 4,418,024,888,891,023,400 | 31.682927 | 73 | 0.581343 | false | 3.252427 | false | false | false |
emulbreh/lymph | lymph/core/events.py | 1 | 3099 | import re
import logging
from lymph.core.interfaces import Component
from lymph.core import trace
logger = logging.getLogger(__name__)
class Event(object):
def __init__(self, evt_type, body, source=None, headers=None, event_id=None):
self.event_id = event_id
self.evt_type = evt_type
sel... | apache-2.0 | 1,420,763,787,660,582,100 | 26.918919 | 114 | 0.571475 | false | 3.878598 | false | false | false |
mesocentrefc/Janua-SMS | janua/actions/sms_usage.py | 1 | 2426 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
#
# Copyright (c) 2016 Cédric Clerget - HPC Center of Franche-Comté University
#
# This file is part of Janua-SMS
#
# http://github.com/mesocentrefc/Janua-SMS
#
# This program is free software: you can redistribute it and/or modify
# it under th... | gpl-2.0 | 3,349,284,974,751,728,000 | 25.347826 | 76 | 0.60066 | false | 3.805338 | false | false | false |
nathanbjenx/cairis | cairis/controllers/TemplateGoalController.py | 1 | 3319 | # 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... | apache-2.0 | 2,627,098,913,465,853,000 | 32.525253 | 78 | 0.726424 | false | 3.631291 | false | false | false |
andyr0id/PyGFNN | examples/gfnn/example1F.py | 1 | 1657 | #!/usr/bin/env python
__author__ = 'Andrew J. Lambert, andy@andyroid.co.uk'
"""
example1P
A one layer network with fixed internal connections
"""
from pygfnn.tools.plotting.gfnn import *
import pygfnn.tools.shortcuts as gfnn
import numpy as np
import timeit
import matplotlib.pyplot as plt
import scipy.io as sio
if... | gpl-2.0 | 3,656,434,342,488,919,600 | 29.685185 | 129 | 0.608328 | false | 2.780201 | false | false | false |
liberiun/cynin-intranet | src/ubify.viewlets/ubify/viewlets/browser/typetitle.py | 1 | 3657 | ###############################################################################
#cyn.in is an open source Collaborative Knowledge Management Appliance that
#enables teams to seamlessly work together on files, documents and content in
#a secure central environment.
#
#cyn.in v2 an open source appliance is distributed un... | gpl-3.0 | 1,373,551,312,006,338,000 | 50.507042 | 152 | 0.710965 | false | 3.857595 | false | false | false |
rosenbrockc/fortpy | fortpy/stats/bp.py | 1 | 5243 | """Methods for testing a code library against Fortran best practices to
help uncover subtle bugs that took a while for us to track down. See
especially http://www.cs.rpi.edu/~szymansk/OOF90/bugs.html"""
def _exec_check_pointers(executable):
"""Checks the specified executable for the pointer condition that not
... | mit | -214,200,888,926,042,880 | 42.330579 | 100 | 0.60576 | false | 4.262602 | false | false | false |
mitoNGS/MToolBox | aux/filter_HF.py | 1 | 2956 | #!/usr/bin/env python
import fileinput
import sys, os
def usage():
print '''
This script is compatible with MToolBox versions < 1.2 only
This script filters the MToolBox vcf file based on Heteroplasmy threshold
Usage:
filter_HF.py <sample_name> <vcf_file> <HF_threshold[float]> <DP_threshold[float]> <out_type[vc... | gpl-3.0 | -3,761,606,398,086,951,400 | 33.776471 | 356 | 0.60115 | false | 2.436933 | false | false | false |
fogleman/DCPU-16 | app/assembler.py | 1 | 16148 | import ply.lex as lex
import ply.yacc as yacc
# Constants
SIZE = 0x10000
# Lookups
BASIC_OPCODES = {
'SET': 0x01,
'ADD': 0x02,
'SUB': 0x03,
'MUL': 0x04,
'MLI': 0x05,
'DIV': 0x06,
'DVI': 0x07,
'MOD': 0x08,
'MDI': 0x09,
'AND': 0x0a,
'BOR': 0x0b,
'XOR': 0x0c,
'SHR': 0x... | mit | 4,979,945,226,758,335,000 | 24.631746 | 78 | 0.560503 | false | 2.906407 | false | false | false |
bnkr/selenit | selenibench/scripts.py | 1 | 3871 | from __future__ import print_function
import sys, argparse, selenium, contextlib, os, json, traceback
from datetime import datetime as DateTime
from datetime import timedelta as TimeDelta
from selenium.webdriver import Remote as WebDriverRemote
from selenium.webdriver.support.ui import WebDriverWait
class Selenibench... | mit | -2,705,399,600,824,886,300 | 32.08547 | 86 | 0.547145 | false | 4.720732 | false | false | false |
tobykurien/MakerDroid | assetsrc/public.mp3/fabmetheus_utilities/vector3index.py | 1 | 13371 | """
Vector3 is a three dimensional vector class.
Below are examples of Vector3 use.
>>> from vector3 import Vector3
>>> origin = Vector3()
>>> origin
0.0, 0.0, 0.0
>>> pythagoras = Vector3( 3, 4, 0 )
>>> pythagoras
3.0, 4.0, 0.0
>>> pythagoras.magnitude()
5.0
>>> pythagoras.magnitudeSquared()
25
>>> triplePythagoras ... | gpl-3.0 | -3,217,481,328,199,761,400 | 26.289796 | 157 | 0.614315 | false | 2.898548 | false | false | false |
IQSS/geoconnect | gc_apps/classification/layer_link_helper.py | 1 | 5041 | """
Used for development to create WorldMap-related links from a layer name
"""
from __future__ import print_function
import logging
import re
import requests
from django.conf import settings
LOGGER = logging.getLogger(__name__)
GEONODE_PREFIX = 'geonode:'
class LayerLink(object):
"""Holds name, link, descriptio... | apache-2.0 | 4,475,897,529,455,973,400 | 29.551515 | 76 | 0.575878 | false | 3.647612 | false | false | false |
MetricsGrimoire/sortinghat | tests/test_cmd_log.py | 1 | 8958 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2014-2017 Bitergia
#
# 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 la... | gpl-3.0 | 3,161,797,829,543,985,000 | 35.263158 | 110 | 0.631126 | false | 3.508421 | true | false | false |
nijx/hypertable | src/py/ThriftClient/client_test.py | 1 | 4079 | import sys
import time
from hypertable.thriftclient import *
from hyperthrift.gen.ttypes import *
try:
client = ThriftClient("localhost", 38080)
print "HQL examples"
try:
namespace = client.namespace_open("bad")
except:
print "Caught exception when tyring to open 'bad' namespace"
namespace = client... | gpl-3.0 | -526,401,585,103,323,140 | 32.162602 | 156 | 0.679333 | false | 3.214342 | true | false | false |
earlbellinger/asteroseismology | grid/calibrate.py | 1 | 3590 | #### Calibrate a solar model
#### Author: Earl Bellinger ( bellinger@mps.mpg.de )
#### Stellar Ages & Galactic Evolution Group
#### Max-Planck-Institut fur Sonnensystemforschung
#### Department of Astronomy, Yale University
import numpy as np
import pandas as pd
from scipy import optimize
from os import ... | gpl-2.0 | -8,822,781,440,106,951,000 | 26.72 | 88 | 0.51532 | false | 2.849206 | false | false | false |
huajiahen/hotspot | backend/Busy/models.py | 1 | 1154 | # -*- coding:utf-8 -*-
from django.db.models import *
class Event(Model):
content = CharField(u'内容',max_length = 200)
starttime = IntegerField(u'开始时间')
endtime = IntegerField(u'结束时间')
#longitude = DecimalField(u'经度',max_digits = 18,decimal_places = 14)
#latitude = DecimalField(u'纬度',max_digits... | mit | -7,604,758,913,650,735,000 | 38.407407 | 72 | 0.662594 | false | 2.867925 | false | false | false |
cmaclell/py_plan | py_plan/problems/blocksworld.py | 1 | 3681 | from operator import ne
from py_search.utils import compare_searches
from py_search.uninformed import depth_first_search
from py_search.uninformed import breadth_first_search
from py_search.uninformed import iterative_deepening_search
from py_plan.total_order import StateSpacePlanningProblem
from py_plan.base import ... | mit | 1,218,365,807,427,348,500 | 33.401869 | 68 | 0.32627 | false | 4.099109 | false | false | false |
citrix-openstack-build/horizon | horizon/tables/base.py | 1 | 53167 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Nebula, 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
#
# ... | apache-2.0 | 670,515,343,822,811,100 | 37.779723 | 79 | 0.584479 | false | 4.554309 | false | false | false |
jromang/retina-old | distinclude/spyderlib/interpreter.py | 1 | 11927 | # -*- coding: utf-8 -*-
#
# Copyright © 2009-2010 Pierre Raybaut
# Licensed under the terms of the MIT License
# (see spyderlib/__init__.py for details)
"""Shell Interpreter"""
import sys
import atexit
import threading
import ctypes
import os
import re
import os.path as osp
import pydoc
from subproces... | gpl-3.0 | 547,717,842,301,860,860 | 35.26875 | 80 | 0.545035 | false | 4.353414 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.