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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ArcherSys/ArcherSys | Lib/test/test_json/test_fail.py | 1 | 23768 | <<<<<<< HEAD
<<<<<<< HEAD
from test.test_json import PyTest, CTest
import re
# 2007-10-05
JSONDOCS = [
# http://json.org/JSON_checker/test/fail1.json
'"A JSON payload should be an object or array, not a string."',
# http://json.org/JSON_checker/test/fail2.json
'["Unclosed array"',
# http://json.org... | mit | -6,397,945,448,815,367,000 | 39.421769 | 86 | 0.525118 | false | 3.608867 | true | false | false |
xorthat/NameThatCarAgain | Test/Zahir/test.py | 1 | 2423 | import numpy as np
# Make sure that caffe is on the python path:
caffe_root = '../caffe-master/' # this file is expected to be in {caffe_root}/examples
import sys
sys.path.insert(0, caffe_root + 'python')
import caffe
def findAccuracy(result_file, model, test_listfile, prototxt):
caffe.set_device(0)
... | mit | 7,482,024,598,021,458,000 | 34.164179 | 245 | 0.687577 | false | 2.701226 | true | false | false |
hftools/hftools | hftools/file_formats/slask/lexing.py | 1 | 2586 | # ------------------------------------------------------------
# calclex.py
#
# tokenizer for a simple expression evaluator for
# numbers and +,-,*,/
# ------------------------------------------------------------
import ply.lex as lex
# List of token names. This is always required
tokens = (
'NUMBER',
'NEWLINE... | bsd-3-clause | -7,879,414,676,208,970,000 | 17.604317 | 93 | 0.491493 | false | 2.948689 | false | false | false |
xiangke/pycopia | XML/pycopia/XML/xfce4.py | 1 | 2369 | #!/usr/bin/python2.4
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
#
# $Id$
#
# Copyright (C) 1999-2006 Keith Dart <keith@kdart.com>
#
# This library 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... | lgpl-2.1 | 7,663,964,424,157,234,000 | 25.032967 | 77 | 0.658928 | false | 3.433333 | false | false | false |
jvicentem/madrid_metro_adjacency_list | metro.py | 1 | 4703 | import requests
import logging
import sys
import scrapper_form
import csv
__author__ = "José Vicente"
__copyright__ = "Copyright (c) 2017 José Vicente"
__credits__ = ["José Vicente"]
__license__ = "MIT"
__version__ = "3.2.1"
'''
The purpose of this module is to generate an adjacency list from the metro system servin... | mit | -7,922,160,451,376,525,000 | 33.313869 | 142 | 0.61 | false | 3.640589 | false | false | false |
aurarad/auroracoin | test/functional/p2p_sendheaders.py | 1 | 26705 | #!/usr/bin/env python3
# Copyright (c) 2014-2019 The Bitcoin Core developers
# Copyright (c) 2014-2019 The DigiByte Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test behavior of headers messages to announce bl... | mit | -991,655,696,496,901,900 | 43.067657 | 154 | 0.614042 | false | 3.859104 | true | false | false |
analysiscenter/dataset | batchflow/models/torch/layers/conv.py | 1 | 3755 | """ Convolutional layers. """
#pylint: disable=not-callable
import torch.nn as nn
import torch.nn.functional as F
from ..utils import get_num_channels, get_num_dims, safe_eval, calc_padding
class BaseConv(nn.Module):
""" An universal module for plain and transposed convolutions. """
LAYERS = {}
TRANSPOSE... | apache-2.0 | 4,078,503,089,942,234,000 | 28.566929 | 111 | 0.608256 | false | 3.78147 | false | false | false |
bradallred/gemrb | gemrb/GUIScripts/bg1/GUICG13.py | 1 | 6096 | # GemRB - Infinity Engine Emulator
# Copyright (C) 2003 The GemRB Project
#
# 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 versi... | gpl-2.0 | -2,001,659,373,085,098,500 | 28.592233 | 85 | 0.775262 | false | 2.827458 | false | false | false |
toros-astro/ProperImage | properimage/simtools.py | 1 | 9805 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2017 Bruno S <bruno@oac.unc.edu.ar>
#
# This file is part of ProperImage (https://github.com/toros-astro/ProperImage)
# License: BSD-3-Clause
# Full Text: https://github.com/toros-astro/ProperImage/blob/master/LICENSE.txt
#
"""
simtools module from ProperImag... | bsd-3-clause | 106,836,897,140,460,270 | 26.756374 | 79 | 0.58267 | false | 2.899674 | false | false | false |
ferranti/watchdog | utils/simplegraphs.py | 1 | 1185 | from PIL import Image, ImageDraw
import StringIO
def sparkline(points, point=None, height=15*2, width=40*2, bubble=2*2, linewidth=1.5*2, margin=5*2, scalefactor=5):
margin *= scalefactor
height *= scalefactor
width *= scalefactor
bubble *= scalefactor
im = Image.new("RGBA", (width, height), (0... | agpl-3.0 | 1,984,973,089,390,251,500 | 32.857143 | 115 | 0.620253 | false | 3.319328 | false | false | false |
smeenka/esp32 | lolin32/app/neopixelklok/klok_asyncio.py | 1 | 4708 | # ------------------------------------------------------------
# Developping with MicroPython in an async way
#
# ------------------------------------------------------------
# === application: neopixel klok ===
# ------------------------------------------------------------
print("== module klok_... | gpl-2.0 | -171,072,177,203,853,220 | 25.155556 | 114 | 0.564359 | false | 3.733545 | false | false | false |
owlabs/incubator-airflow | tests/contrib/hooks/test_datadog_hook.py | 1 | 4697 | # -*- coding: utf-8 -*-
#
# 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
#... | apache-2.0 | 9,083,922,506,316,347,000 | 32.077465 | 87 | 0.632957 | false | 3.7576 | true | false | false |
spiceqa/tp-spice | spice/tests/rv_vmshutdown.py | 1 | 2820 | #!/usr/bin/env python
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that ... | gpl-2.0 | 1,475,145,511,090,267,600 | 29.652174 | 77 | 0.664539 | false | 3.498759 | true | false | false |
tpsatish95/SocialTextFilter | old/twokenize.py | 1 | 6258 | # -*- coding: utf-8 -*-
""" tokenizer for tweets! might be appropriate for other social media dialects too.
general philosophy is to throw as little out as possible.
development philosophy: every time you change a rule, do a diff of this
program's output on ~100k tweets. if you iterate through many possible rules
and... | apache-2.0 | 6,253,194,421,776,132,000 | 26.973094 | 105 | 0.605643 | false | 2.706291 | false | false | false |
youcaizhi/mongotoolkit | backup.py | 1 | 1623 | import argparse, sys, functions
def fullBackup(dictionary):
del dictionary['basedir']
del dictionary['increment']
del dictionary['full']
command_line = functions.getCommandLine(dictionary)
functions.dump(command_line, '')
if __name__ == '__main__':
parser = argparse.ArgumentParser(descript... | gpl-3.0 | -4,672,939,396,625,521,000 | 32.122449 | 109 | 0.617375 | false | 3.818824 | false | false | false |
aeklant/scipy | scipy/misc/common.py | 1 | 8877 | """
Functions which are common and require SciPy Base and Level 1 SciPy
(special, linalg)
"""
from numpy import arange, newaxis, hstack, prod, array, frombuffer, load
__all__ = ['central_diff_weights', 'derivative', 'ascent', 'face',
'electrocardiogram']
def central_diff_weights(Np, ndiv=1):
"""
... | bsd-3-clause | -3,996,203,778,957,216,300 | 28.491694 | 93 | 0.581615 | false | 3.3625 | false | false | false |
openqt/algorithms | leetcode/python/lc060-permutation-sequence.py | 1 | 1063 | # coding=utf-8
import unittest
"""60. Permutation Sequence
https://leetcode.com/problems/permutation-sequence/description/
The set `[1,2,3,..., _n_ ]` contains a total of _n_! unique permutations.
By listing and labeling all of the permutations in order, we get the following
sequence for _n_ = 3:
1. `"123"`
2. ... | gpl-3.0 | -8,348,262,669,028,693,000 | 15.951613 | 78 | 0.547507 | false | 3.21148 | false | false | false |
n3wb13/OpenNfrGui-5.0-1 | lib/python/Plugins/Extensions/MediaPortal/additions/sport/nhl.py | 1 | 4013 | # -*- coding: utf-8 -*-
from Plugins.Extensions.MediaPortal.plugin import _
from Plugins.Extensions.MediaPortal.resources.imports import *
class nhlGenreScreen(MPScreen):
def __init__(self, session):
self.plugin_path = mp_globals.pluginPath
self.skin_path = mp_globals.pluginPath + mp_globals.skinsPath
path =... | gpl-2.0 | -2,864,644,187,717,437,000 | 33 | 289 | 0.653952 | false | 2.818693 | false | false | false |
pwndbg/pwndbg | pwndbg/commands/radare2.py | 1 | 2136 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import subprocess
import pwndbg.color.message as message
import pwndbg.commands
import pwndbg.radare2
parser = argparse.ArgumentParser(description='Launches radare2',
epilog="Example: r2 -- -S -AA")
parser.add_argument('--... | mit | 5,252,698,315,261,316,000 | 32.904762 | 96 | 0.625936 | false | 3.589916 | false | false | false |
wj2061/leetcode | leetcode_generate.py | 1 | 19165 | # coding:utf-8
#
# Author: BONFY<foreverbonfy@163.com>
# Github: https://github.com/bonfy
# Repo: https://github.com/bonfy/leetcode
# Usage: Leetcode solution downloader and auto generate readme
#
import requests
import configparser
import os
import json
import time
import datetime
import re
import sys
import html... | mit | 4,197,310,470,493,102,000 | 35.708812 | 149 | 0.562236 | false | 3.789755 | true | false | false |
voltzmann/interfaz_test | grafica.py | 1 | 10838 | """
Programa adquicion datos
"""
import os
import pprint
import random
import sys
import wx
# The recommended way to use wx with mpl is with the WXAgg
# backend.
#
import matplotlib
matplotlib.use('WXAgg')
from matplotlib.figure import Figure
from matplotlib.backends.backend_wxagg import \
FigureC... | gpl-3.0 | -3,832,396,386,815,571,500 | 33.887417 | 131 | 0.577782 | false | 3.268396 | false | false | false |
rhyolight/nupic.son | app/soc/tasks/helper/timekeeper.py | 1 | 1977 | # Copyright 2010 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 applicable law or agreed to in wr... | apache-2.0 | -3,785,768,671,208,194,600 | 30.887097 | 74 | 0.736975 | false | 4.269978 | false | false | false |
bparzella/secsgem | secsgem/secs/variables/u1.py | 1 | 1183 | #####################################################################
# u1.py
#
# (c) Copyright 2021, Benjamin Parzella. All rights reserved.
#
# This library 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 Foundat... | lgpl-2.1 | -5,268,013,573,257,771,000 | 30.131579 | 69 | 0.615385 | false | 4.209964 | false | false | false |
instantshare/instantshare | src/storage/googledrive.py | 1 | 3571 | import logging
import ntpath
import httplib2
from apiclient import discovery
from googleapiclient import errors
from googleapiclient.http import MediaFileUpload
from oauth2client.client import AccessTokenCredentials
from tools.config import config, general
from tools.oauthtool import implicit_flow
from tools.persiste... | gpl-2.0 | -8,768,870,610,764,199,000 | 34.356436 | 109 | 0.659199 | false | 4.007856 | false | false | false |
Paulloz/godot | core/make_binders.py | 6 | 12675 | # -*- coding: ibm850 -*-
template_typed = """
#ifdef TYPED_METHOD_BIND
template<class T $ifret ,class R$ $ifargs ,$ $arg, class P@$>
class MethodBind$argc$$ifret R$$ifconst C$ : public MethodBind {
public:
$ifret R$ $ifnoret void$ (T::*method)($arg, P@$) $ifconst const$;
#ifdef DEBUG_METHODS_ENABLED
virtual Variant... | mit | -5,564,170,554,876,973,000 | 31.5 | 210 | 0.629901 | false | 2.819173 | false | false | false |
hackatbrown/2015.hackatbrown.org | hack-at-brown-2015/messages.py | 1 | 11827 | """
HOW THIS WORKS:
1. Message objects are created via /dashboard/messages. Message objects have a string indicating their audience (e.g. all registered hackers, all checked-in, mailing list people, teammates listed on people's applications)
2. Message.enqueue_tasks() enqueues a bunch of Tas objects in the `messages` q... | mit | -2,603,251,336,293,079,600 | 45.380392 | 344 | 0.705927 | false | 3.098507 | false | false | false |
skulumani/asteroid_dumbbell | integration/radius_factor_function.py | 1 | 1183 |
from point_cloud import wavefront
import numpy as np
from scipy import interpolate
import matplotlib.pyplot as plt
def tan_step(x, a, b, delta):
# out = 1/2 * (np.tanh((x-a)/delta) - np.tanh((x - b)/delta))
out = 1/2 * ( 1- np.tanh((x-a)/delta))
return out
def bspline():
# x = np.arange(0, 2*np.pi+... | gpl-3.0 | 639,865,005,186,558,600 | 25.288889 | 90 | 0.584954 | false | 2.306043 | false | false | false |
espressopp/espressopp | src/interaction/Quartic.py | 1 | 4562 | # Copyright (C) 2012,2013
# Max Planck Institute for Polymer Research
# Copyright (C) 2008,2009,2010,2011
# Max-Planck-Institute for Polymer Research & Fraunhofer SCAI
#
# This file is part of ESPResSo++.
#
# ESPResSo++ is free software: you can redistribute it and/or modify
# it under the terms of the G... | gpl-3.0 | -1,815,396,312,014,631,000 | 35.206349 | 112 | 0.637659 | false | 3.564063 | false | false | false |
kthyng/octant | octant/python-gsw/gsw/gibbs/basic_thermodynamic_t.py | 1 | 61038 | # -*- coding: utf-8 -*-
from __future__ import division
import numpy as np
from library import gibbs
from absolute_salinity_sstar_ct import CT_from_t
from gsw.utilities import match_args_return, strip_mask
from conversions import pt_from_CT, pt_from_t, pt0_from_t
from constants import Kelvin, db2Pascal, P0, SSO, cp0... | bsd-3-clause | 306,867,034,480,073,300 | 29.291811 | 79 | 0.571726 | false | 2.86402 | false | false | false |
tomgarcia/Deep-Red | test.py | 1 | 2121 | #!/usr/bin/python
import numpy as np
from decisiontree import DecisionTree
from card import deal, format_input
def get_test_data(num_training, num_validation, fun):
samples = {"training": [], "validation": []}
num_samples = {"training": num_training,
"validation": num_validation}
for key... | mit | -3,780,153,830,595,975,000 | 29.3 | 68 | 0.560113 | false | 3.228311 | false | false | false |
junf/PySideSamples | Zoom.py | 1 | 3596 | """
Copyright 2013 Jun Funada
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wri... | apache-2.0 | 7,079,930,980,413,575,000 | 30 | 87 | 0.68604 | false | 3.722567 | false | false | false |
shermp/ReadifyFont | helper.py | 1 | 3384 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import os, sys
def iterDic(dic, pythonTwo):
"""
Return a python 2/3 compatible iterable
:param dic:
:param pythonTwo:
:return:
"""
if pythonTwo:
return dic.viewitems()
els... | mit | 5,078,316,521,456,197,000 | 30.933962 | 106 | 0.614362 | false | 3.885189 | false | false | false |
wingechr/imagedecay | conf.py | 1 | 2254 | # coding=utf-8
"""sphinx configuration"""
import os
import sphinx_rtd_theme
version = "0.1"
project = "imagedecay"
description = "Applying various custom image filters iteratively for fun."
author = "Christian Winger"
author_email = "c@wingechr.de"
license = "GPLv3"
language = "en"
copyright = ""
pa... | gpl-3.0 | 3,084,741,288,229,094,000 | 26.531646 | 74 | 0.688554 | false | 2.897172 | false | false | false |
evernote/pootle | pootle/core/forms.py | 1 | 6054 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2013 Evernote Corporation
#
# This file is part of Pootle.
#
# 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 L... | gpl-2.0 | -738,996,002,689,170,200 | 36.37037 | 81 | 0.607367 | false | 4.044088 | false | false | false |
yalewoosoft/shadowsocks | shadowsocks/obfsplugin/http_simple.py | 1 | 13807 | #!/usr/bin/env python
#
# Copyright 2015-2015 breakwa11
#
# 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 | -5,014,397,954,040,280,000 | 38.336182 | 212 | 0.552473 | false | 3.379927 | false | false | false |
agdsn/pycroft | web/blueprints/infrastructure/forms.py | 1 | 1191 | from flask_wtf import FlaskForm as Form
from wtforms.validators import DataRequired, IPAddress
from pycroft.model.net import VLAN
from web.blueprints.facilities.forms import SelectRoomForm
from wtforms_widgets.fields.core import TextField, QuerySelectField, \
QuerySelectMultipleField
from wtforms_widgets.fields.fi... | apache-2.0 | -128,737,687,310,648,380 | 43.111111 | 98 | 0.665827 | false | 4.208481 | false | false | false |
roguefalcon/rpi_docker_images | hackmt_2018_code/crmapi/read_sql.py | 1 | 3017 | #!/usr/bin/python3
# Imported libraries
import sqlite3
# The sql connection & cursor
conn = sqlite3.connect('sql.db')
c = conn.cursor()
# List items============================================
print("==> Activity")
c.execute('''Select todo_id,
note,
status_id,
employee_id,
active,
... | gpl-3.0 | 4,779,295,906,859,186,000 | 13.504808 | 56 | 0.490885 | false | 3.720099 | false | false | false |
Yukarumya/Yukarum-Redfoxes | layout/reftests/fonts/mark-generate.py | 2 | 4762 | #!/usr/bin/python
# vim: set shiftwidth=4 tabstop=8 autoindent expandtab:
# 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/.
# For general fontforge documentation, see:
# ... | mpl-2.0 | -4,600,199,610,419,133,000 | 30.124183 | 80 | 0.648887 | false | 2.912538 | false | false | false |
tanium/pytan | EXAMPLES/PYTAN_API/get_setting_by_name.py | 1 | 4141 | #!/usr/bin/env python
"""
Get a system setting by name
"""
# import the basic python packages we need
import os
import sys
import tempfile
import pprint
import traceback
# disable python from generating a .pyc file
sys.dont_write_bytecode = True
# change me to the path of pytan if this script is not running from EXAM... | mit | -3,789,203,997,348,541,000 | 32.666667 | 198 | 0.702487 | false | 3.26063 | false | false | false |
rinsewester/SchemaViz | edge.py | 1 | 15908 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
"""
Widget to display simulation data of a CSDF graph.
author: Sander Giesselink
"""
from PyQt5.QtWidgets import QGraphicsItem, QInputDialog, QMessageBox
from PyQt5.QtCore import Qt, QRectF, QPointF
from PyQt5.QtGui import QColor, QPen, QBrush, QPainterPath, QF... | mit | 3,467,769,442,675,601,000 | 37.381188 | 140 | 0.571536 | false | 3.607256 | false | false | false |
net-angels/puypuy | lib/record_rate.py | 1 | 1324 | import lib.puylogger
# def init():
# global last_value
# last_value = {}
# return last_value
last_value = {}
class ValueRate(object):
metrics_value_rate = 0
def __init__(self):
self.metrics_value_rate = 0
def record_value_rate(self, mytype, myvalue, timestamp):
if mytype not... | apache-2.0 | 5,403,445,339,603,025,000 | 30.52381 | 101 | 0.535498 | false | 4.012121 | false | false | false |
jean/sentry | src/sentry/web/api.py | 1 | 21691 | from __future__ import absolute_import, print_function
import base64
import logging
import six
import traceback
from django.conf import settings
from django.contrib.auth.models import AnonymousUser
from django.core.cache import cache
from django.core.urlresolvers import reverse
from django.http import HttpResponse, H... | bsd-3-clause | -5,120,671,644,953,126,000 | 37.39115 | 98 | 0.600894 | false | 4.231565 | false | false | false |
amaozhao/blogular | api/serializers/entry.py | 1 | 1192 | # coding: utf-8
'''
Created on 2014年12月31日
@author: amaozhao
'''
from blog.models import Entry
from rest_framework import serializers
from api.serializers.tag import BaseTagSerializer
from rest_auth.serializers import UserDetailsSerializer
class EntrySerializer(serializers.ModelSerializer):
author = UserDetails... | bsd-3-clause | -9,078,655,000,924,354,000 | 26.581395 | 70 | 0.668634 | false | 4.075601 | false | false | false |
thraxil/countryx | countryx/sim/tests/test_views.py | 1 | 4826 | from django.test import TestCase, RequestFactory, Client
from django.urls import reverse
from .factories import UserFactory, RoleFactory, StateFactory
from countryx.sim.models import Section
from countryx.sim.views import (
root, allpaths, allquestions, allvariables, CreateSectionView,
CreateRoleView, StateCre... | gpl-3.0 | -9,025,565,587,491,621,000 | 28.248485 | 66 | 0.57729 | false | 4.142489 | true | false | false |
rmlivesales/Django-Reference | cattle/models.py | 1 | 2347 | from django.db import models
from django.utils import timezone
class Buyer(models.Model):
brand = models.CharField(max_length=30)
address = models.CharField(max_length=200)
class Seller(models.Model):
brand = models.CharField(max_length=30)
address = models.CharField(max_length=200)
class Brand(mode... | gpl-3.0 | -3,398,210,695,937,303,000 | 48.93617 | 109 | 0.739668 | false | 3.466765 | false | false | false |
richardkiss/pycoin | pycoin/cmds/tx.py | 1 | 25381 | #!/usr/bin/env python
from __future__ import print_function
import argparse
import calendar
import codecs
import datetime
import io
import os.path
import re
import sqlite3
import subprocess
import sys
from .dump import dump_tx
from pycoin.coins.exceptions import BadSpendableError
from pycoin.convention import tx_fe... | mit | 3,350,504,102,101,422,000 | 34.547619 | 112 | 0.59907 | false | 3.5763 | false | false | false |
andresmrm/cliptopia | src/cliptopia.py | 1 | 2446 | #!/usr/bin/env python
# coding: utf-8
'''Be happy with your clipboard.
Usage:
./cliptopia.py [options] [copy|paste|daemon|focused]
copy: Copy using Ctrl(+Shift)+c depending on window class.
paset: Paste using Ctrl(+Shift)+v depending on window class.
daemon: Start daemon to monitor clipboard changes.
focused: Re... | agpl-3.0 | 8,241,778,281,169,748,000 | 23.46 | 69 | 0.63982 | false | 3.369146 | false | false | false |
ghxandsky/zstack-utility | zstacklib/zstacklib/utils/shell.py | 1 | 1640 | '''
@author: frank
'''
import subprocess
from zstacklib.utils import log
logcmd = True
logger = log.get_logger(__name__)
class ShellError(Exception):
'''shell error'''
class ShellCmd(object):
'''
classdocs
'''
def __init__(self, cmd, workdir=None, pipe=True):
... | apache-2.0 | 1,885,945,509,552,803,800 | 27.285714 | 166 | 0.559756 | false | 3.895487 | false | false | false |
aacoppa/inglorious-gangsters | app.py | 1 | 4137 | #start building up structure for the web page
from flask import Flask
from flask import session,request,render_template, url_for, redirect
#from Populator import populate_database
#import search
#from Populator import populate_database
from userdb import *
from initcoldb import *
from Populator import populate_database... | mit | -6,497,829,796,588,218,000 | 29.419118 | 86 | 0.618081 | false | 3.716981 | false | false | false |
google-research/google-research | linear_dynamical_systems/clustering.py | 1 | 15279 | # coding=utf-8
# Copyright 2021 The Google Research 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 applicab... | apache-2.0 | 1,473,840,728,740,705,000 | 37.681013 | 80 | 0.652857 | false | 3.628354 | false | false | false |
dseeliger/pmx | pmx/rotamer.py | 1 | 12137 | # pmx Copyright Notice
# ============================
#
# The pmx source code is copyrighted, but you can freely use and
# copy it as long as you don't change or remove any of the copyright
# notices.
#
# ----------------------------------------------------------------------
# pmx is Copyright (C) 2006-2013 by Daniel ... | lgpl-3.0 | 1,261,002,296,431,620,600 | 45.680769 | 148 | 0.449864 | false | 2.553545 | false | false | false |
ninechapter/django_caching | cache/migrations/0001_initial.py | 1 | 1156 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('contenttypes', '0002_remove_content_type_name'),
]
operations = [
migrations.CreateModel(
name='Invalidation',
... | apache-2.0 | 340,623,413,486,434,500 | 36.290323 | 114 | 0.568339 | false | 4.297398 | false | false | false |
mcmontero/tinyAPI | base/data_store/provider.py | 1 | 19599 | # ----- Info ------------------------------------------------------------------
__author__ = 'Michael Montero <mcmontero@gmail.com>'
# ----- Imports ---------------------------------------------------------------
from .exception import ColumnCannotBeNullException
from .exception import DataStoreException
from .excep... | mit | -23,696,616,828,685,736 | 27.569971 | 79 | 0.53467 | false | 4.569597 | false | false | false |
fperez/sympy | sympy/assumptions/ask.py | 1 | 7648 | """Module for querying SymPy objects about assumptions."""
import inspect
import copy
from sympy.core import Symbol, sympify
from sympy.utilities.source import get_class
from sympy.assumptions import global_assumptions
from sympy.assumptions.assume import eliminate_assume
from sympy.logic.boolalg import to_cnf, conjunc... | bsd-3-clause | -8,692,325,604,698,024,000 | 35.593301 | 398 | 0.620816 | false | 3.602449 | false | false | false |
stackforge/tricircle | tricircle/db/migrate_repo/versions/002_resource.py | 1 | 3355 | # Copyright 2015 Huawei Technologies Co., Ltd.
# 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
#
# Unl... | apache-2.0 | -1,186,972,489,606,044,000 | 37.563218 | 78 | 0.62921 | false | 3.752796 | false | false | false |
arongdari/almc | test/brescal_runner.py | 1 | 4144 | import os
import sys
import numpy as np
import pickle
from scipy.io.matlab import loadmat
from almc.bayesian_rescal import PFBayesianRescal
from almc.bayesian_rescal import PFBayesianCompRescal
from almc.bayesian_rescal import PFBayesianLogitRescal
def load_dataset(dataset):
if dataset == 'umls':
mat = lo... | gpl-2.0 | 1,865,116,902,612,433,700 | 39.627451 | 118 | 0.574083 | false | 3.092537 | true | false | false |
Noirello/bonsai | tests/test_ldapclient.py | 1 | 7894 | import sys
import pytest
from conftest import get_config, network_delay
import bonsai
from bonsai import LDAPClient
from bonsai.ldapconnection import LDAPConnection
@pytest.fixture(scope="module")
def url():
""" Get the LDAPURL. """
cfg = get_config()
url = "ldap://%s:%s" % (cfg["SERVER"]["hostip"], cfg... | mit | 5,802,368,599,468,522,000 | 29.596899 | 95 | 0.64112 | false | 3.46532 | true | false | false |
eblade/telegram | telegram/auth/sign.py | 1 | 2168 | from Crypto.Signature import PKCS1_v1_5
from Crypto.Hash import SHA
from Crypto.PublicKey import RSA
def generate_key_pair(username):
private_key = RSA.generate(2048)
public_key = private_key.publickey()
return private_key.exportKey(), public_key.exportKey()
class RSAVerifier(object):
def __init__(se... | mit | 6,223,994,119,686,426,000 | 31.358209 | 93 | 0.601937 | false | 4.153257 | false | false | false |
silkypanda/pynched | getData/windowShopping.py | 1 | 2312 | # #windowShopping will take all of the Amazon HTMLs from a data structure and will retrieve all of the used/new prices
import os
import time
from datetime import date
from credentials import *
from amazon.api import AmazonAPI
from fileControls import loadFromFile, saveToFile
#amazon credentials, from credentials file
... | apache-2.0 | -1,707,059,518,102,609,200 | 34.045455 | 143 | 0.70891 | false | 3.618153 | false | false | false |
AlexMathew/til-yo | app.py | 1 | 1063 | import requests
import os
import urlparse
import psycopg2
def get_posts(cur):
r = requests.get('http://reddit.com/r/todayilearned/hot.json')
content = r.json()
articles = cur.execute("SELECT id FROM REDDIT")
for child in content["data"]["children"]:
if int(child["data"]["ups"]) > 1000 and child["data"]["id"] no... | mit | -1,441,408,466,154,088,400 | 26.282051 | 94 | 0.662277 | false | 3.037143 | false | false | false |
MorellatoAriel/PyGobstones | commons/i18n.py | 1 | 9418 | # -*- coding: utf-8 -*-
'''
Dictionaries containing all translations of the phrases and words used in Pygobstones.
'''
ES = {
'Current working directory:': 'Directorio actual de trabajo: '.decode('utf8'),
'-- New Library': '-- Nueva Biblioteca'.decode('utf8'),
'There are unsaved files, to load a new mod... | gpl-3.0 | 7,327,041,203,245,535,000 | 25.36236 | 121 | 0.639318 | false | 3.178124 | false | false | false |
amon-ra/django-shop-skel | src/web/local_settings.py | 1 | 1183 | from django.utils.translation import ugettext as _
#ADMINS = (
#('amon-ra', 'amon.raj@gmail.com'),
#)
#EMAIL_HOST_USER = '
#EMAIL_USE_TLS = True
#EMAIL_HOST = '172.2.6.7'
#EMAIL_HOST_PASSWORD = 'xxxxxx2'
#EMAIL_PORT = 25
#Activate on debugging
DEBUG = True
TEMPLATE_DEBUG = DEBUG
INTERNAL_IPS = ('10.61.0.1',)
#PUB... | gpl-2.0 | 2,631,350,312,509,743,000 | 24.717391 | 123 | 0.583263 | false | 3.180108 | false | false | false |
opentracing/basictracer-python | basictracer/text_propagator.py | 1 | 3271 | from __future__ import absolute_import
from opentracing import SpanContextCorruptedException
from .context import SpanContext
from .propagator import Propagator
prefix_tracer_state = 'ot-tracer-'
prefix_baggage = 'ot-baggage-'
field_name_trace_id = prefix_tracer_state + 'traceid'
field_name_span_id = prefix_tracer_st... | apache-2.0 | 2,630,101,199,322,202,000 | 32.721649 | 76 | 0.582696 | false | 3.738286 | false | false | false |
bdfoster/blumate | blumate/components/light/wemo.py | 1 | 4127 | """
Support for Belkin WeMo lights.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/light.wemo/
"""
import logging
from datetime import timedelta
import blumate.util as util
import blumate.util.color as color_util
from blumate.components.light import (
... | mit | 8,630,480,185,147,458,000 | 30.030075 | 77 | 0.628059 | false | 3.893396 | false | false | false |
rocian/AdventOfCode2016 | 15/solutions.py | 1 | 4862 | #!/usr/bin/env python3
"""https://adventofcode.com/2016
--- Day 15: Timing is Everything ---
The halls open into an interior plaza containing a large kinetic sculpture. The
sculpture is in a sealed enclosure and seems to involve a set of identical
spherical capsules that are carried to the top and allowed to bounce t... | gpl-3.0 | 7,949,614,568,351,691,000 | 33.48227 | 83 | 0.691896 | false | 3.433616 | false | false | false |
jolyonb/edx-platform | common/lib/xmodule/xmodule/contentstore/mongo.py | 1 | 24773 | """
MongoDB/GridFS-level code for the contentstore.
"""
from __future__ import absolute_import
import json
import os
import gridfs
import pymongo
import six
from bson.son import SON
from fs.osfs import OSFS
from gridfs.errors import NoFile
from mongodb_proxy import autoretry_read
from opaque_keys.edx.keys import Asse... | agpl-3.0 | 748,606,057,670,744,000 | 41.202726 | 122 | 0.570419 | false | 4.339289 | false | false | false |
dimtion/jml | outputFiles/statistics/archives/ourIA/closest.py/0.6/1/player1.py | 1 | 11241 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
####################################################################################################################################################################################################################################
############################################... | mit | -407,242,548,192,539,650 | 63.982659 | 228 | 0.356641 | false | 7.419802 | false | false | false |
wcmitchell/insights-core | insights/client/util.py | 1 | 8247 | # !/usr/bin/python
# Copyright (C) 2015 Red Hat, All rights reserved.
# AUTHORS: Alex Collins <alcollin@redhat.com>
import sys
import json
import subprocess
import collections
from fnmatch import fnmatch as matches
from docker.utils import kwargs_from_env
import docker
import selinux
"""Atomic Utility Module"""
Ret... | apache-2.0 | -876,941,785,119,856,900 | 31.214844 | 87 | 0.528556 | false | 3.848343 | false | false | false |
m3wolf/xanespy | xanespy/xanes_math.py | 1 | 42319 | # -*- coding: utf-8 -*-
#
# Copyright © 2016 Mark Wolf
#
# This file is part of Xanespy.
#
# Xanespy 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 l... | gpl-3.0 | 6,404,669,868,444,726,000 | 37.504095 | 86 | 0.628415 | false | 4.068064 | false | false | false |
wtpayne/hiai | a3_src/h70_internal/da/spec/spec_memo.py | 1 | 2338 | # -*- coding: utf-8 -*-
"""
Unit tests for the da.memo module.
---
type:
python_module
validation_level:
v00_minimum
protection:
k00_public
copyright:
"Copyright 2016 High Integrity Artificial Intelligence Systems"
license:
"Licensed under the Apache License, Version 2.0 (the License);
you ... | apache-2.0 | 6,989,990,342,798,902,000 | 23.610526 | 79 | 0.506843 | false | 4.790984 | true | false | false |
jorvis/biocode | sandbox/jorvis/plot_read_alignment_ratios.py | 1 | 4306 | #!/usr/bin/env python3
"""
./plot_read_alignment_ratios.py -i /usr/local/projects/aplysia/A1_CNS_reorientation.log -o /usr/local/projects/aplysia/A1_CNS_reorientation.png
Count of ratios < 0.05: 47414
Count of ratios > 0.95: 53006
./plot_read_alignment_ratios.py -i /usr/local/projects/aplysia/A3_digestive_reorientat... | mit | -8,446,812,474,628,530,000 | 35.491525 | 165 | 0.630051 | false | 3.127088 | false | false | false |
pedrox/meld | meld/ui/msgarea.py | 1 | 8901 | # This file is part of the Hotwire Shell user interface.
#
# Copyright (C) 2007,2008 Colin Walters <walters@verbum.org>
#
# 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 ... | gpl-2.0 | -2,014,293,923,040,391,000 | 33.366795 | 87 | 0.587013 | false | 3.77161 | false | false | false |
libvirt/libvirt-test-API | libvirttestapi/repos/virconn/connection_getMemoryStats.py | 1 | 3686 | # Copyright (C) 2010-2012 Red Hat, Inc.
# This work is licensed under the GNU GPLv2 or later.
import libvirt
from libvirt import libvirtError
from libvirttestapi.utils import utils
required_params = ()
optional_params = {'uri': None}
NODE_ONLINE = '/sys/devices/system/node/online'
MEMINFO = '/proc/meminfo'
def gets... | gpl-2.0 | -351,507,430,068,734,100 | 36.232323 | 118 | 0.55019 | false | 3.708249 | false | false | false |
ebayohblr2014/eBay-Opportunity-Hack-Blr-2014 | say-trees/tree-finder/TagMe/learn.py | 1 | 3659 | import os
import sys
import cv2
import numpy as np
from sklearn.cluster import MiniBatchKMeans
import math
from cPickle import dump, HIGHEST_PROTOCOL,load
from scipy.cluster.vq import vq,kmeans
import matplotlib.pyplot as plt
from BoW import getImmediateSubdirectories,getWordsInImages,dict2numpy,computeCentroids,comput... | mit | -3,283,408,761,612,160,000 | 36.731959 | 130 | 0.625307 | false | 3.548982 | false | false | false |
nacx/kahuna | kahuna/plugins/vdc.py | 1 | 1855 | #!/usr/bin/env jython
from optparse import OptionParser
from kahuna.abstract import AbsPlugin
from kahuna.utils.prettyprint import pprint_tiers
from kahuna.utils.prettyprint import pprint_vdcs
from org.jclouds.abiquo.predicates.cloud import VirtualDatacenterPredicates
from org.jclouds.abiquo.domain.exception import Ab... | mit | 4,832,155,348,611,421,000 | 35.372549 | 75 | 0.637197 | false | 4.264368 | false | false | false |
yannikbehr/spectroscopy | src/spectroscopy/dataset.py | 1 | 9542 | """
Provide container class for gas chemistry data.
"""
import hashlib
import warnings
import numpy as np
import tables
from tables.exceptions import NoSuchNodeError, NodeError
from spectroscopy.class_factory import ResourceIdentifier
from spectroscopy.plugins import get_registered_plugins
from spectroscopy import da... | gpl-3.0 | 3,533,850,774,921,814,000 | 35.419847 | 79 | 0.531964 | false | 4.403323 | false | false | false |
Jajcus/pyxmpp2 | examples/echobot.py | 1 | 5493 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
An 'echo bot' – simple client that just confirms any presence subscriptions
and echoes incoming messages.
"""
import sys
import logging
from getpass import getpass
import argparse
from pyxmpp2.jid import JID
from pyxmpp2.message import Message
from pyxmpp2.presence impor... | lgpl-2.1 | -819,961,641,155,416,300 | 36.868966 | 80 | 0.584411 | false | 4.375299 | false | false | false |
josephsl/wintenApps | buildVars.py | 1 | 3450 | # -*- coding: UTF-8 -*-
# Build customizations
# Change this file instead of sconstruct or manifest files, whenever possible.
# Since some strings in `addon_info` are translatable,
# we need to include them in the .po files.
# Gettext recognizes only strings given as parameters to the `_` function.
# To avoid initia... | gpl-2.0 | 108,039,697,893,699,420 | 41.592593 | 110 | 0.744348 | false | 3.513238 | false | false | false |
TU-NHM/plutof-taxonomy-module | apps/taxonomy/fields/autocomplete_field.py | 1 | 1341 | from django.core.urlresolvers import reverse, get_script_prefix
import autocomplete_light
from rest_framework.relations import HyperlinkedRelatedField
class AutocompleteHyperlinkedRelatedField(HyperlinkedRelatedField):
"""
Used in hyperlinked autocomplete fields. Converts the 'id' or
full url path of th... | gpl-3.0 | 2,836,480,297,726,007,300 | 39.636364 | 82 | 0.661447 | false | 4.5 | false | false | false |
ant-Korn/math_tournaments | math_tournaments/users/views.py | 1 | 1437 |
from django.views.generic.edit import CreateView, UpdateView
from django.views.generic.detail import DetailView
from django.urls import reverse_lazy
from django.contrib.auth import authenticate, login
from django.contrib.auth.mixins import LoginRequiredMixin
from django import http
from users.models import User
from ... | mit | -96,708,922,652,755,230 | 32.418605 | 75 | 0.718859 | false | 4.070822 | false | false | false |
googleapis/googleapis-gen | google/cloud/talent/v4beta1/talent-v4beta1-py/google/cloud/talent_v4beta1/types/completion_service.py | 1 | 5373 | # -*- 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 | 5,241,277,813,627,597,000 | 31.36747 | 112 | 0.619579 | false | 4.257528 | false | false | false |
epuzanov/ZenPacks.community.CIMMon | ZenPacks/community/CIMMon/modeler/plugins/community/cim/CIMNetworkAdapterMap.py | 1 | 6488 | ################################################################################
#
# This program is part of the CIMMon Zenpack for Zenoss.
# Copyright (C) 2012 Egor Puzanov.
#
# This program can be used under the GNU General Public License version 2
# You can find full information here: http://www.zenoss.com/oss
#
###... | gpl-2.0 | 1,086,710,203,944,018,400 | 38.084337 | 105 | 0.522657 | false | 4.383784 | false | false | false |
imperial-genomics-facility/data-management-python | igf_data/utils/tools/gatk_utils.py | 1 | 10173 | import os,subprocess
from shlex import quote
from igf_data.utils.fileutils import check_file_path,get_temp_dir,remove_dir,copy_local_file
class GATK_tools:
'''
A python class for running gatk tools
:param gatk_exe: Gatk exe path
:param java_param: Java parameter, default '-XX:ParallelGCThreads=1 -Xmx4g'
:... | apache-2.0 | 541,599,793,908,455,500 | 37.244361 | 108 | 0.582227 | false | 3.498281 | false | false | false |
sqliter/mongogui | src/removedoc.py | 1 | 3477 | from PyQt4.QtGui import *
from PyQt4.QtCore import *
from pymongo import MongoClient
import json
class RemoveDocPage(QSplitter):
def __init__(self):
super(RemoveDocPage,self).__init__()
self.dbname='test'
self.collname=''
#self.toolbar=QToolBar()
#self.toolbar.setIconSize(... | mit | 256,563,284,911,726,200 | 31.495327 | 69 | 0.623238 | false | 3.610592 | false | false | false |
TheAlgorithms/Python | project_euler/problem_042/solution42.py | 1 | 1406 | """
The nth term of the sequence of triangle numbers is given by, tn = ½n(n+1); so
the first ten triangle numbers are:
1, 3, 6, 10, 15, 21, 28, 36, 45, 55, ...
By converting each letter in a word to a number corresponding to its
alphabetical position and adding these values we form a word value. For example,
the word... | mit | 4,278,897,251,191,957,000 | 28.893617 | 83 | 0.641993 | false | 3.435208 | false | false | false |
Mariatta/chic_a_cherry_picker | cherry_picker.py | 1 | 2702 | import click
import os
import subprocess
import webbrowser
@click.command()
@click.argument('commit_sha1', 'The commit sha1 to be cherry-picked')
@click.argument('branches', 'The branches to backport to', nargs=-1)
def cherry_pick(commit_sha1, branches):
if not os.path.exists('./pyconfig.h.in'):
os.chdir(... | mit | 5,577,215,526,179,234,000 | 29.359551 | 114 | 0.619911 | false | 3.490956 | false | false | false |
mohamedhagag/community-addons | crm_lead_lost_reason/wizard/lost_reason.py | 1 | 1840 | # -*- coding: utf-8 -*-
#
#
# Author: Romain Deheele
# Copyright 2015 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, ... | agpl-3.0 | 1,023,519,227,994,123,000 | 33.074074 | 77 | 0.645109 | false | 3.702213 | false | false | false |
geggo/pyface | examples/wizard.py | 3 | 3206 | #------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the conditions describe... | bsd-3-clause | -8,219,986,848,320,450,000 | 31.383838 | 79 | 0.503743 | false | 4.887195 | false | false | false |
Harmon758/discord.py | discord/iterators.py | 1 | 26174 | """
The MIT License (MIT)
Copyright (c) 2015-present Rapptz
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merg... | mit | 4,521,142,447,693,224,000 | 33.759628 | 118 | 0.595515 | false | 4.189181 | false | false | false |
s-leroux/RipPy | dump.py | 1 | 4001 | #!/usr/bin/python3
import argparse
import ast
from subprocess import Popen,call,PIPE,STDOUT, CalledProcessError
import shutil
from pipes import quote
from io import StringIO, TextIOWrapper
import sys
import os
LSDVD="lsdvd -Oy {device}"
DDRESCUE="ddrescue -MA {device} --sector-size=2048 --timeout={timeout} {title}.I... | gpl-2.0 | -9,103,824,184,933,638,000 | 27.784173 | 96 | 0.55886 | false | 3.847115 | false | false | false |
nagyistoce/geokey | geokey/contributions/tests/observations/test_manager.py | 1 | 5233 | from django.test import TestCase
from geokey.contributions.models import Observation
from geokey.projects.tests.model_factories import ProjectF, UserF
from geokey.categories.tests.model_factories import (
CategoryFactory, LookupFieldFactory, LookupValueFactory,
TextFieldFactory, MultipleLookupFieldFactory, Mu... | apache-2.0 | 4,417,943,149,894,050,300 | 32.76129 | 78 | 0.573094 | false | 4.257933 | true | false | false |
xerxes2/gpodder | src/gpodder/gtkui/desktop/shownotes.py | 1 | 7411 | # -*- coding: utf-8 -*-
#
# gPodder - A media aggregator and podcast client
# Copyright (c) 2005-2011 Thomas Perl and the gPodder Team
#
# gPodder 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-3.0 | 1,891,218,299,653,149,000 | 37.598958 | 128 | 0.586426 | false | 3.824045 | false | false | false |
davidlu1001/cmdb_vmware_keepassx | list_vms.py | 1 | 5529 | #!/usr/bin/env python
# VMware vSphere Python SDK
# Copyright (c) 2008-2013 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/lic... | gpl-3.0 | -4,120,060,014,283,593,700 | 33.12963 | 99 | 0.615844 | false | 4.11997 | true | false | false |
hagabbar/pycbc_copy | pycbc/waveform/SpinTaylorF2.py | 1 | 18200 | # Copyright (C) 2013 Haris K
# Ported from LALSimulation's LALSimInspiralSpinTaylorF2.c
#
# 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 opt... | gpl-3.0 | 6,743,360,495,537,184,000 | 45.075949 | 705 | 0.541374 | false | 2.669796 | false | false | false |
rmgorman/django-guardian | guardian/templatetags/guardian_tags.py | 1 | 3497 | """
``django-guardian`` template tags. To use in a template just put the following
*load* tag inside a template::
{% load guardian_tags %}
"""
from __future__ import unicode_literals
from django import template
from django.contrib.auth import get_user_model
from django.contrib.auth.models import AnonymousUser, G... | bsd-2-clause | 5,956,016,083,909,170,000 | 33.97 | 100 | 0.615671 | false | 3.924804 | false | false | false |
kadhikari/navitia | source/jormungandr/tests/stif_tests.py | 1 | 7989 | # Copyright (c) 2001-2016, Canal TP and/or its affiliates. All rights reserved.
#
# This file is part of Navitia,
# the software to build cool stuff with public transport.
#
# Hope you'll enjoy and contribute to this project,
# powered by Canal TP (www.canaltp.fr).
# Help us simplify mobility and open public tr... | agpl-3.0 | -3,670,850,590,196,157,400 | 49.245283 | 116 | 0.608336 | false | 3.465944 | true | false | false |
davidkempers/db-migrate | scripts/liquibase.py | 1 | 1428 | import os.path
import utils
from subprocess import Popen, PIPE
import select
import sys
from config import logger
def execute(cmd, dburi, xmlpath, loglevel='info'):
username, password, uri = utils.parse_dburi(dburi)
if not loglevel:
loglevel = 'info'
elif loglevel.lower() in ['erro... | mit | -4,698,871,349,074,445,000 | 28.382979 | 88 | 0.542017 | false | 3.699482 | false | false | false |
code-for-india/cfiweb | server/cfiweb/migrations/0003_auto__add_profile.py | 1 | 6427 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Profile'
db.create_table(u'cfiweb_profile', (
... | apache-2.0 | -7,307,675,107,317,147,000 | 68.869565 | 195 | 0.560137 | false | 3.544953 | false | false | false |
goto-bus-stop/py3status | py3status/__init__.py | 1 | 61002 | from __future__ import print_function
import argparse
import ast
import cProfile
import imp
import locale
import os
import pkgutil
import select
import sys
from collections import OrderedDict
from contextlib import contextmanager
from copy import deepcopy
from datetime import datetime
from json import dumps, loads
fr... | bsd-3-clause | 543,486,770,009,256,770 | 35.993329 | 87 | 0.487869 | false | 4.69174 | true | false | false |
oczkers/psub | psub/providers/napisy24.py | 1 | 6459 | # -*- coding: utf-8 -*-
"""
psub.providers.napisy24
~~~~~~~~~~~~~~~~~~~~~
This module implements the psub napisy24.pl provider methods.
"""
import re
# import requests
from bs4 import BeautifulSoup
# from random import random
from io import BytesIO
from zipfile import ZipFile
from . import BaseProvider
from ..exce... | gpl-3.0 | 2,174,493,150,945,816,600 | 45.804348 | 175 | 0.51076 | false | 3.742178 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.