repo_name stringlengths 6 61 | path stringlengths 4 230 | copies stringlengths 1 3 | size stringlengths 4 6 | text stringlengths 1.01k 850k | license stringclasses 15
values | hash int64 -9,220,477,234,079,998,000 9,219,060,020B | line_mean float64 11.6 96.6 | line_max int64 32 939 | alpha_frac float64 0.26 0.9 | autogenerated bool 1
class | ratio float64 1.62 6.1 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
elssar/calibre | src/calibre/gui2/actions/embed.py | 8 | 5073 | #!/usr/bin/env python2
# vim:fileencoding=utf-8
from __future__ import (unicode_literals, division, absolute_import,
print_function)
__license__ = 'GPL v3'
__copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'
from functools import partial
from PyQt5.Qt import QTimer, QProgressDialog,... | gpl-3.0 | -8,363,610,454,218,823,000 | 38.944882 | 132 | 0.579342 | false | 3.743911 | false | false | false |
dstndstn/astrometry.net | util/imageutils.py | 2 | 1447 | # This file is part of the Astrometry.net suite.
# Licensed under a 3-clause BSD style license - see LICENSE
from __future__ import print_function
import numpy
def write_pnm_to(img, f, maxval=255):
if len(img.shape) == 1:
raise RuntimeError('write_pnm: img is one-dimensional: must be 2 or 3.')
elif len... | bsd-3-clause | -5,043,115,592,459,789,000 | 31.155556 | 88 | 0.594333 | false | 3.215556 | false | false | false |
wilmandx/ipos | ventas/viewsPedido.py | 1 | 8065 | from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from gestion.models import ValorTipo,Producto
from django.contrib.auth.models import User
from django.http import HttpResponse
import json
from ventas.models import VentaMaestro,VentaDetalle,PagoVentaMaestro
from django.utils.... | lgpl-3.0 | -7,989,542,337,020,959,000 | 36 | 133 | 0.7416 | false | 2.711836 | false | false | false |
ThePletch/ansible | lib/ansible/modules/identity/ipa/ipa_user.py | 28 | 12043 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
... | gpl-3.0 | 9,129,725,585,159,846,000 | 33.806358 | 119 | 0.631321 | false | 3.834129 | false | false | false |
google-research/falken | service/generated_flatbuffers/tflite/SignatureDef.py | 1 | 7508 | # Copyright 2021 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 agreed to in writing, ... | apache-2.0 | -6,426,101,599,357,591,000 | 37.306122 | 153 | 0.644513 | false | 3.822811 | false | false | false |
MonamAgarwal/final | GTG/plugins/task_reaper/reaper.py | 3 | 7205 | # -*- coding: utf-8 -*-
# Copyright (c) 2009 - Luca Invernizzi <invernizzi.l@gmail.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
# Foundation, either version 3 of the License, or (at your option) any... | gpl-3.0 | 5,194,328,026,330,886,000 | 37.945946 | 79 | 0.596253 | false | 4.016165 | false | false | false |
hermanschaaf/mafan | mafan/pinyin.py | 2 | 1861 | # -*- coding: utf-8 -*-
import re
import codecs
PinyinToneMark = {
0: u"aoeiuv\u00fc",
1: u"\u0101\u014d\u0113\u012b\u016b\u01d6\u01d6",
2: u"\u00e1\u00f3\u00e9\u00ed\u00fa\u01d8\u01d8",
3: u"\u01ce\u01d2\u011b\u01d0\u01d4\u01da\u01da",
4: u"\u00e0\u00f2\u00e8\u00ec\u00f9\u01dc\u01dc",
}
def dec... | mit | -181,050,468,988,118,600 | 31.051724 | 117 | 0.384077 | false | 3.062603 | false | false | false |
DongjunLee/kino-bot | kino/bot/worker.py | 1 | 8029 | # -*- coding: utf-8 -*-
import threading
from hbconfig import Config
from ..background import schedule
from ..functions import FunctionRunner
from ..nlp.ner import NamedEntitiyRecognizer
from ..notifier.scheduler import Scheduler
from ..slack.resource import MsgResource
from ..slack.slackbot import SlackerAdapte... | mit | -6,698,951,712,818,450,000 | 29.490494 | 87 | 0.501684 | false | 4.013514 | false | false | false |
yugangw-msft/azure-cli | src/azure-cli-core/azure/cli/core/azclierror.py | 2 | 8635 | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | mit | -2,844,716,572,592,482,300 | 30.981481 | 119 | 0.691951 | false | 4.53043 | false | false | false |
Yuliang-Zou/Automatic_Group_Photography_Enhancement | lib/networks/caffenet.py | 1 | 1795 | import tensorflow as tf
from networks.network import Network
class caffenet(Network):
def __init__(self, trainable=True):
self.inputs = []
self.data = tf.placeholder(tf.float32, shape=[None, None, None, 3])
self.rois = tf.placeholder(tf.float32, shape=[None, 5])
self.keep_prob = tf.... | mit | -8,519,936,757,939,628,000 | 39.795455 | 86 | 0.518663 | false | 3.032095 | false | false | false |
thenetcircle/dino | test/api/test_api_join.py | 1 | 9160 | #!/usr/bin/env python
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | apache-2.0 | 8,859,849,382,184,028,000 | 39.892857 | 103 | 0.628821 | false | 3.645046 | true | false | false |
erigones/esdc-ce | api/exceptions.py | 1 | 9305 | """
Some parts are copied from rest_framework.exceptions, which is licensed under the BSD license:
*******************************************************************************
Copyright (c) 2011-2016, Tom Christie
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, ... | apache-2.0 | -4,071,679,858,600,380,000 | 30.975945 | 94 | 0.700913 | false | 4.244982 | false | false | false |
AmitMY/pose-format | pose_format/tensorflow/representation/point_line_distance.py | 1 | 1115 | import tensorflow as tf
from .distance import DistanceRepresentation
class PointLineDistanceRepresentation:
def __init__(self):
self.distance = DistanceRepresentation()
def __call__(self, p1s: tf.Tensor, p2s: tf.Tensor, p3s: tf.Tensor) -> tf.Tensor:
"""
Distance between the point p1s... | mit | -6,572,269,213,718,925,000 | 33.84375 | 84 | 0.593722 | false | 3.204023 | false | false | false |
stefantkeller/VECSELsetup | exp/eval/reflectivity.py | 1 | 3069 | #! /usr/bin/python2.7
# -*- coding: utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt
import errorvalues as ev # github.com/stefantkeller/errorvalues
from VECSELsetup.eval.varycolor import varycolor
from VECSELsetup.eval.gen_functions import extract, lut_from_calibfolder, lut_interp_from_calibfolder
def... | mit | 8,243,186,852,352,914,000 | 29.69 | 170 | 0.580319 | false | 2.9173 | false | false | false |
ColumBrennan/data-dumper | app.py | 1 | 1987 | #!/usr/bin/python3
from email import encoders
from email.mime.base import MIMEBase
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
import psycopg2
import xlsxwriter
import os
import sys
import smtplib
#usage python3 colum.py filename toaddress
SQL_Code = open(str(sys.a... | gpl-3.0 | -8,380,741,031,090,985,000 | 25.219178 | 91 | 0.625566 | false | 3.437716 | false | false | false |
kovidgoyal/kitty | kitty/fonts/core_text.py | 1 | 4126 | #!/usr/bin/env python3
# vim:fileencoding=utf-8
# License: GPL v3 Copyright: 2017, Kovid Goyal <kovid at kovidgoyal.net>
import re
from typing import Dict, Generator, Iterable, List, Optional, Tuple
from kitty.fast_data_types import coretext_all_fonts
from kitty.fonts import FontFeature
from kitty.options.types impor... | gpl-3.0 | 1,779,891,089,951,357,400 | 35.513274 | 121 | 0.606398 | false | 3.381967 | false | false | false |
pymir3/pymir3 | scripts/ismir2016/resultados/results.py | 1 | 3424 | import os
import glob
import sys
import numpy as np
import matplotlib.pyplot as plt
if __name__ == "__main__":
dirs = [ name for name in os.listdir(".") if os.path.isdir(os.path.join(".", name)) ]
files = []
for d in sorted(dirs):
if d == "graphs":
continue
p = "." + "/" + ... | mit | 5,321,663,387,969,981,000 | 36.626374 | 141 | 0.350175 | false | 4.190942 | false | false | false |
WaveBlocks/WaveBlocksND | WaveBlocksND/TimeManager.py | 1 | 9570 | """The WaveBlocks Project
Provides several computation routines for
handling time and timesteps.
@author: R. Bourquin
@copyright: Copyright (C) 2010, 2011, 2012, 2013, 2015, 2016 R. Bourquin
@license: Modified BSD License
"""
from scipy import floor
__all__ = ["TimeManager"]
class TimeManager(object):
r"""Thi... | bsd-3-clause | 5,725,022,761,244,994,000 | 30.584158 | 109 | 0.560606 | false | 4.212148 | false | false | false |
Jumpscale/jumpscale6_core | lib/JumpScale/baselib/admin2/Node.py | 1 | 9598 | from JumpScale import j
import JumpScale.baselib.remote
import sys
# import importlib
import imp
try:
import ujson as json
except:
import json
import JumpScale.baselib.redis
import copy
import time
import JumpScale.baselib.webdis
from fabric.api import hide
import time
redis=j.clients.redis.getRedisClient("1... | bsd-2-clause | 7,284,220,591,263,518,000 | 35.218868 | 126 | 0.542196 | false | 3.738995 | false | false | false |
mapado/redis_stats | redis_stats/stats.py | 1 | 2601 | from pprint import pprint
import numpy
import random
import redis
import argparse
from sklearn import cluster
from sklearn import metrics
from sklearn.feature_extraction import DictVectorizer
from sklearn.metrics.pairwise import pairwise_distances
def vectorize_key(key):
return dict(enumerate(key.split(':')))
de... | gpl-3.0 | 4,981,092,865,338,342,000 | 23.537736 | 79 | 0.658977 | false | 3.259398 | false | false | false |
vesellov/bitdust.devel | transport/udp/udp_interface.py | 1 | 14024 | #!/usr/bin/python
# udp_interface.py
#
#
# Copyright (C) 2008-2018 Veselin Penev, https://bitdust.io
#
# This file (udp_interface.py) is part of BitDust Software.
#
# BitDust 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 ... | agpl-3.0 | 6,750,364,517,932,360,000 | 32.550239 | 125 | 0.559612 | false | 4.135653 | false | false | false |
FabienPean/sofa | applications/plugins/Compliant/examples/angular.py | 11 | 2563 | import Sofa
import numpy as np
import math
from SofaPython import Quaternion as quat
# use numpy vectors directly (watch out, string conversion might be
# lossy)
np.set_string_function( lambda x: ' '.join( map(str, x)),
repr=False )
def createScene(node):
node.createObject('RequiredPlug... | lgpl-2.1 | -4,607,735,357,707,048,000 | 24.63 | 85 | 0.452595 | false | 3.924962 | false | false | false |
adamallo/beast-mcmc | doc/tutorial/EBSP/scripts/popGraphFromCSV.py | 10 | 4725 | #!/usr/bin/env python
import sys, os.path, math, fnmatch
from glob import glob
import optparse
from popGraphUtil import plotFromCSV, plotFromAll
parser = optparse.OptionParser(" [options] csv-file chart-file")
parser.add_option("", "--xlim", dest="xlim", help="cut off X-axis at this point", default =... | lgpl-2.1 | -7,970,616,197,288,205,000 | 30.8125 | 103 | 0.622646 | false | 3.421434 | false | false | false |
h3llrais3r/Auto-Subliminal | autosubliminal/util/queue.py | 1 | 1725 | # coding=utf-8
import logging
import threading
from functools import wraps
import autosubliminal
log = logging.getLogger(__name__)
_lock = threading.Lock()
def get_wanted_queue_lock():
with _lock:
if autosubliminal.WANTEDQUEUELOCK:
log.debug('Cannot get wanted queue lock, skipping')
... | gpl-3.0 | -1,657,668,799,455,229,700 | 26.822581 | 119 | 0.627246 | false | 4.097387 | false | false | false |
h2non/riprova | riprova/strategies/exponential.py | 1 | 6545 | # -*- coding: utf-8 -*-
import time
import random
from ..backoff import Backoff
from ..constants import INT_ERROR, POS_ERROR
class ExponentialBackOff(Backoff):
"""
ExponentialBackOff is a backoff implementation that increases the backoff
period for each retry attempt using a randomization function that gr... | mit | 4,855,955,368,983,859,000 | 35.769663 | 92 | 0.592819 | false | 4.360426 | false | false | false |
google/pyringe | pyringe/inferior.py | 1 | 23180 | #! /usr/bin/env python
#
# Copyright 2014 Google 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 requ... | apache-2.0 | 8,857,134,920,190,602,000 | 35.389325 | 103 | 0.666437 | false | 3.995863 | false | false | false |
ganboing/malwarecookbook | 11/9/scd.py | 2 | 2780 | import immlib
import getopt, string
import immutils
import os
def usage(imm):
imm.Log("Usage: !scd -f FILETOCHECK")
def checkop(op):
instr = op.getDisasm()
junk = ["IN", "OUT", "LES", "FSUBR", "DAA",
"BOUND", "???", "AAM", "STD", "FIDIVR",
"FCMOVNE", "FADD", "LAHF", "SAHF", "CMC",
... | gpl-3.0 | 4,710,341,407,774,441,000 | 27.96875 | 60 | 0.524101 | false | 3.402693 | false | false | false |
rajadg/Python | PySamples/py_database/sqlalchemy/basic/simple.py | 1 | 1280 | '''
Created on 04-Feb-2014
@author: dgraja
'''
from sqlalchemy import create_engine
from sqlalchemy import Table
from sqlalchemy import Integer
from sqlalchemy import String
from sqlalchemy import MetaData
from sqlalchemy import Column
from sqlalchemy.exc import OperationalError
from sqlalchemy.ext.declarative import ... | gpl-3.0 | -8,218,855,231,176,817,000 | 23.150943 | 76 | 0.710156 | false | 3.575419 | false | false | false |
thorwhalen/ut | dacc/parallel_timeseries_dacc.py | 1 | 6444 | __author__ = 'thor'
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import re
from ut.pplot.to import simple_plotly
class ParallelTimeSeriesDacc(object):
def __init__(self, data_source, date_var, index_var, ts_vars_name='vars', **kwargs):
if isinstance(data_source, pd.DataFrame):... | mit | 1,677,486,331,001,283,800 | 39.024845 | 105 | 0.543762 | false | 3.530959 | false | false | false |
djpetti/stoplight | daemon/stoplightd.py | 1 | 1311 | #!/usr/bin/python3
from multiprocessing import Queue
from queue import Empty
import logging
import time
from manager import Manager
import server
""" Main file for the stoplight daemon. """
def init_logging(logfile):
""" Initializes logging.
Args:
logfile: File that stuff will be logged to. """
root ... | mit | -3,865,540,455,653,864,400 | 19.484375 | 58 | 0.678108 | false | 3.745714 | false | false | false |
FEniCS/dolfin | test/unit/python/ale/test_harmonic_smoothing.py | 1 | 3215 | #!/usr/bin/env py.test
"""Unit test for HarmonicSmoothing and ALE"""
# Copyright (C) 2013 Jan Blechta
#
# This file is part of DOLFIN.
#
# DOLFIN 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... | lgpl-3.0 | 3,355,733,854,089,536,000 | 32.842105 | 77 | 0.676516 | false | 3.616423 | true | false | false |
matrix-org/synapse | synapse/util/caches/deferred_cache.py | 1 | 12494 | # Copyright 2015, 2016 OpenMarket Ltd
# Copyright 2018 New Vector Ltd
# Copyright 2020 The Matrix.org Foundation C.I.C.
#
# 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.apac... | apache-2.0 | 1,217,865,865,054,612,000 | 36.746224 | 88 | 0.621098 | false | 4.390021 | false | false | false |
asgard-lab/neutron | neutron/tests/functional/agent/linux/test_async_process.py | 7 | 2816 | # Copyright 2013 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | apache-2.0 | -1,164,682,003,072,662,000 | 35.102564 | 79 | 0.60831 | false | 4.093023 | true | false | false |
wpjesus/codematch | ietf/cookies/views.py | 1 | 2180 | # Copyright The IETF Trust 2010, All Rights Reserved
from django.shortcuts import render_to_response as render
from django.template import RequestContext
from django.conf import settings
import debug # pyflakes:ignore
def preferences(request, **kwargs):
preferences = request.COOKIES.co... | bsd-3-clause | 1,406,171,809,870,712,300 | 39.37037 | 101 | 0.630275 | false | 4.029575 | false | false | false |
Fernerkundung/sentinelsat | sentinelsat/scripts/cli.py | 1 | 8629 | import logging
import math
import os
import click
import geojson as gj
import requests.utils
from sentinelsat import __version__ as sentinelsat_version
from sentinelsat.sentinel import SentinelAPI, geojson_to_wkt, read_geojson, placename_to_wkt
from sentinelsat.exceptions import InvalidKeyError
logger = logging.getL... | gpl-3.0 | -1,093,820,202,210,152,200 | 29.708185 | 101 | 0.603894 | false | 3.701845 | false | false | false |
ajar98/todoist_bot | clock.py | 1 | 1716 | from apscheduler.schedulers.blocking import BlockingScheduler
import os
from pymongo import MongoClient
from client import TodoistClient
from todoist_app import send_tasks, send_FB_text
from todoist_app import MONGO_DB_TOKENS_ENDPOINT, MONGO_DB_TOKENS_PORT
from todoist_app import MONGO_DB_TOKENS_DATABASE
from apschedul... | mit | -3,641,494,452,882,261,000 | 24.235294 | 70 | 0.618881 | false | 3.666667 | false | false | false |
kronenthaler/mod-pbxproj | pbxproj/pbxsections/PBXFileReference.py | 1 | 2059 | import os
from pbxproj import PBXGenericObject
class PBXFileReference(PBXGenericObject):
@classmethod
def create(cls, path, tree='SOURCE_ROOT'):
return cls().parse({
'_id': cls._generate_id(),
'isa': cls.__name__,
'path': path,
'name': os.path.split(path... | mit | -5,999,931,503,130,478,000 | 35.122807 | 100 | 0.582807 | false | 4.307531 | false | false | false |
klahnakoski/cloc | cloc/util/queries/query.py | 1 | 11834 | # encoding: utf-8
#
#
# 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/.
#
# Author: Kyle Lahnakoski (kyle@lahnakoski.com)
#
from __future__ import unicode_literals
from __... | mpl-2.0 | -8,638,696,560,898,394,000 | 32.908309 | 103 | 0.534477 | false | 4.119039 | false | false | false |
mrzhenya/plex-plugins | localmetadata/LocalMetadata.bundle/Contents/Code/__init__.py | 1 | 9059 | # -*- coding: utf-8 -*-
#
# Metadata plugin for Plex Media Server, which updates media's metadata
# using information stored in local info files.
#
# Copyright (C) 2015 Yevgeny Nyden
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as pub... | apache-2.0 | -1,625,302,080,118,431,000 | 27.850318 | 108 | 0.644663 | false | 3.898021 | false | false | false |
haxwithaxe/qutebrowser | tests/helpers/fixtures.py | 1 | 8558 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2016 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser 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 S... | gpl-3.0 | -1,967,434,556,169,450,800 | 28.818815 | 79 | 0.682753 | false | 3.960204 | true | false | false |
imatge-upc/unsupervised-2017-cvprw | mfb_cross_val.py | 1 | 6221 | import os
os.environ['TF_CPP_MIN_LOG_LEVEL']='1'
from os import listdir
import sys
import time
import argparse
import tools.ops
import numpy as np
import tensorflow as tf
import scipy.misc as sm
from models.mfb_net_cross import *
from tools.utilities import *
from tools.ops import *
parser = argparse.ArgumentParse... | mit | 8,641,592,910,704,234,000 | 31.920635 | 106 | 0.665649 | false | 2.802252 | false | false | false |
raspberrywhite/raspberrywhite | servant/settings.py | 1 | 4748 | """
Django settings for servant project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
im... | bsd-3-clause | 515,083,188,460,384,800 | 28.308642 | 92 | 0.724094 | false | 3.279006 | false | false | false |
rado0x54/project-euler | python/problem0067.py | 1 | 1818 | #!/usr/bin/env python3
"""Project Euler - Problem 67 Module"""
import os
def problem67(triangle_fileloc):
"""Problem 67 - Maximum path sum II"""
# We model tree node with dict:
# node = { 'value':123, 'left': {}, 'right': {}, 'depth':1}
root = {}
cur_depth = [root]
d = 0
d_nodelist = [... | mit | -7,513,407,627,659,273,000 | 24.605634 | 68 | 0.471397 | false | 3.740741 | false | false | false |
heromod/migrid | user-projects/miginterface/examples/mpi/mpi_example1.py | 1 | 1613 | #!/usr/bin/python
"""
An example script for running an MPI grid job using the mig interface module.
"""
import miginterface as mig
import time, sys
def main():
"""
Run an mpi job on a grid resource. To run in local mode please install mpi.
"""
# mig.debug_mode_on() # uncomment to enable debug print... | gpl-2.0 | -6,414,359,659,538,479,000 | 34.065217 | 119 | 0.652201 | false | 3.552863 | false | false | false |
wonder-sk/QGIS | python/plugins/processing/algs/lidar/lastools/lasindexPro.py | 5 | 3045 | # -*- coding: utf-8 -*-
"""
***************************************************************************
lasindexPro.py
---------------------
Date : October 2014 and May 2016
Copyright : (C) 2014 by Martin Isenburg
Email : martin near rapidlasso point com
**... | gpl-2.0 | 9,047,205,549,346,316,000 | 43.130435 | 108 | 0.568473 | false | 4.393939 | false | false | false |
HideoYukutake/juniperberry | juniperberry/srx.py | 1 | 8852 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
SRXをエミュレーションするモジュール
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Juniper SRXのpolicy追加をテストするための
モジュールです。
:copyright:
:license:
"""
import re
from collections.abc import Sequence
from ipaddress import IPv4Network, IPv4Address
SourceAddress = "source_address"
DestinationAddres... | gpl-3.0 | -6,839,169,550,185,305,000 | 26.857605 | 81 | 0.567031 | false | 3.499187 | false | false | false |
nuoya/1001albums | var/parse.py | 1 | 1119 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import glob
import json
PWD = os.path.dirname(__file__)
DATA_DIR = os.path.join(PWD, 'data')
def parse_doc(doc_path):
id = os.path.splitext(os.path.basename(doc_path))[0]
data = json.load(open(doc_path, 'r'))
assert data['type'] == 'album'
asser... | mit | -8,690,449,330,588,709,000 | 25.642857 | 74 | 0.553172 | false | 3.243478 | false | false | false |
fdslight/fdslight | pywind/lib/rdb.py | 1 | 2361 | #!/usr/bin/env python3
"""关系型数据库"""
class sql_helper(object):
# 表前缀
__data_list = None
__prefix = ""
def __init__(self, prefix):
self.__data_list = []
self.__prefix = prefix
def select(self, seq):
self.__data_list.append(
"SELECT %s" % ",".join(seq)
)
... | bsd-2-clause | -8,281,248,635,768,071,000 | 21.762376 | 72 | 0.479339 | false | 3.478064 | false | false | false |
timqian/sms-tools | lectures/5-Sinusoidal-model/plots-code/sineModel-anal-synth.py | 24 | 1483 | import numpy as np
import matplotlib.pyplot as plt
from scipy.signal import hamming, triang, blackmanharris
import sys, os, functools, time
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../../software/models/'))
import sineModel as SM
import utilFunctions as UF
(fs, x) = UF.wavread(os.p... | agpl-3.0 | 1,905,779,458,073,882,600 | 28.66 | 110 | 0.678355 | false | 2.376603 | false | true | false |
SpheMakh/Fidelity | image_stats/stats.py | 1 | 6205 | #!/usr/bin/env python
import numpy
import pyfits
import pylab
import os
import sys
from astLib.astWCS import WCS
import Tigger
from scipy.optimize import curve_fit
import argparse
#image = sys.argv[1]
#catalog = sys.argv[2]
def reshape_data(image,zoom=1):
""" Reshape FITS data to (stokes,freq,npix_ra,npix_dec)... | gpl-2.0 | 8,433,366,804,513,779,000 | 31.830688 | 145 | 0.584851 | false | 3.107161 | false | false | false |
mhvk/astropy | astropy/visualization/wcsaxes/wcsapi.py | 8 | 13534 | # Functions/classes for WCSAxes related to APE14 WCSes
import numpy as np
from astropy.coordinates import SkyCoord, ICRS, BaseCoordinateFrame
from astropy import units as u
from astropy.wcs import WCS
from astropy.wcs.utils import local_partial_pixel_derivatives
from astropy.wcs.wcsapi import SlicedLowLevelWCS
from ... | bsd-3-clause | 5,650,657,522,926,521,000 | 35.38172 | 134 | 0.573445 | false | 3.698825 | false | false | false |
jhomble/electron435 | python_causal_compiler/compiler/Imitation_Compiler.py | 1 | 33067 | ## Imitation Compiler
#
# @filename Imitation_Compiler.py
# @author Ben Mariano
# @date 5/9/2017
# Library Imports
import operator
import functools
import string
import random
# Local Imports
import Token
from Lexer import *
import Parser
from NodeVisitor import NodeVisitor
## Imitation Compiler
#
# @brief Compi... | mit | -1,267,524,005,528,027,600 | 30.979691 | 122 | 0.642 | false | 3.140862 | false | false | false |
ManrajGrover/Crick-Info-API | index.py | 1 | 3789 | from flask import Flask
from flask import jsonify
from bs4 import BeautifulSoup
import urllib
import re
import json
import unicodedata
app = Flask(__name__)
def remove_brackets(text):
ret = re.sub('\[.+?\]', '', text)
ret = re.sub('\(.+?\)','', ret)
return ret
@app.route('/api/')
@app.route('/api/<cricket... | mit | -2,481,600,017,361,157,000 | 43.576471 | 111 | 0.430193 | false | 4.832908 | false | false | false |
implus/UnbalancedDataset | unbalanced_dataset/under_sampling.py | 2 | 22485 | from __future__ import print_function
from __future__ import division
import numpy as np
from numpy import logical_not, ones
from numpy.random import seed, randint
from numpy import concatenate
from random import sample
from collections import Counter
from .unbalanced_dataset import UnbalancedDataset
class UnderSampl... | mit | -5,274,854,654,081,673,000 | 33.860465 | 104 | 0.541739 | false | 4.187931 | false | false | false |
has2k1/plotnine | plotnine/geoms/geom_hline.py | 1 | 1838 | from warnings import warn
import pandas as pd
from ..utils import make_iterable, order_as_mapping_data
from ..exceptions import PlotnineWarning
from ..doctools import document
from ..mapping import aes
from .geom import geom
from .geom_segment import geom_segment
@document
class geom_hline(geom):
"""
Horizo... | gpl-2.0 | 5,360,484,072,840,172,000 | 30.689655 | 74 | 0.572905 | false | 3.978355 | false | false | false |
Iotic-Labs/py-application-examples | thing_runner/follow_feed/follow_basic_catchall.py | 1 | 2735 | # -*- coding: utf-8 -*-
# Copyright (c) 2017 Iotic Labs Ltd. All rights reserved.
from __future__ import unicode_literals, print_function
import logging
logging.basicConfig(format='%(asctime)s %(levelname)s [%(name)s] {%(threadName)s} %(message)s', level=logging.WARNING)
logger = logging.getLogger(__name__)
logger.se... | apache-2.0 | -6,573,477,423,837,014,000 | 34.986842 | 118 | 0.631444 | false | 3.929598 | false | false | false |
simgunz/anki | pylib/anki/dbproxy.py | 1 | 3505 | # Copyright: Ankitects Pty Ltd and contributors
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
from __future__ import annotations
import re
from re import Match
from typing import Any, Dict, Iterable, List, Optional, Sequence, Tuple, Union
import anki
# DBValue is actually Union[str,... | agpl-3.0 | -6,108,757,242,505,558,000 | 27.266129 | 88 | 0.57632 | false | 3.536831 | false | false | false |
dcondrey/scrapy-spiders | dist/spiders/mandy.py | 1 | 1951 | #!/usr/bin/python
# -*- coding: utf-8 -*-
from scrapy.spider import Spider
from scrapy.selector import Selector
from scrapy.http import Request
from my_settings import name_file, keyword, test_mode, difference_days
from datetime import datetime, timedelta
import re
print "Run spider Mandy"
added_email ... | mit | 2,870,028,385,990,378,000 | 35.557692 | 106 | 0.583291 | false | 3.301184 | false | false | false |
MOA-2011/enigma2-plugin-extensions-openwebif | plugin/controllers/views/ajax/event.py | 1 | 11606 | #!/usr/bin/env python
##################################################
## DEPENDENCIES
import sys
import os
import os.path
try:
import builtins as builtin
except ImportError:
import __builtin__ as builtin
from os.path import getmtime, exists
import time
import types
from Cheetah.Version import MinCompatib... | gpl-2.0 | 8,901,558,350,633,718,000 | 47.560669 | 242 | 0.59745 | false | 3.032663 | false | false | false |
blaisb/cfdemUtilities | VANS/unsteady/unsteadyAutomateL2ErrorVANS.py | 2 | 2480 | # This programs calculates the L2 error for a given velocity file
#
# Usage : python L2ErrorUCouette.py Velocity file
#
# Author : Bruno Blais
# Last modified : December 3rd
#Python imports
import os
import math
import numpy
import matplotlib.pyplot as plt
import sys
from mpl_toolkits.mplot3d import Axes3D
from matpl... | lgpl-3.0 | 7,374,829,722,601,325,000 | 28.176471 | 105 | 0.60121 | false | 2.339623 | false | false | false |
demisto/content | Packs/QuestKace/Integrations/QuestKace/QuestKace.py | 1 | 36041 | from typing import Dict, Optional, Tuple, Callable, Any, Union
import demistomock as demisto
from CommonServerPython import *
from CommonServerUserPython import *
import json
import requests
import dateparser
# Disable insecure warnings
requests.packages.urllib3.disable_warnings()
# key = field of a ticket , val = ... | mit | -6,252,844,452,430,832,000 | 38.34607 | 122 | 0.575289 | false | 3.997006 | false | false | false |
loriab/pylibefp | devtools/scripts/conda_env.py | 1 | 1118 | import argparse
import os
import shutil
import subprocess as sp
# Args
parser = argparse.ArgumentParser(description='Creates a conda environment from file for a given Python version.')
parser.add_argument('-n', '--name', type=str, nargs=1, help='The name of the created Python environment')
parser.add_argument('-p', '-... | bsd-3-clause | 4,626,609,567,384,536,000 | 35.064516 | 113 | 0.698569 | false | 3.307692 | false | false | false |
opennode/waldur-mastermind | src/waldur_openstack/openstack/log.py | 1 | 5164 | from waldur_core.logging.loggers import EventLogger, event_logger
class TenantQuotaLogger(EventLogger):
quota = 'quotas.Quota'
tenant = 'openstack.Tenant'
limit = float
old_limit = float
class Meta:
event_types = ('openstack_tenant_quota_limit_updated',)
event_groups = {
... | mit | -4,542,801,052,760,656,000 | 26.036649 | 79 | 0.594888 | false | 4.339496 | false | false | false |
opi9a/data_accelerator | plot_functions.py | 1 | 11155 |
import pandas as pd
import numpy as np
from matplotlib import pyplot as plt
from matplotlib import rcParams
import matplotlib.ticker as ticker
import projection_funcs as pf
import policy_tools as pt
import inspect
from copy import deepcopy
def bigplot(scens, res_df, shapes_df, name=None, _debug=False):
'''Makes ... | apache-2.0 | -6,667,129,267,280,047,000 | 34.629393 | 135 | 0.590351 | false | 3.237805 | false | false | false |
FedericoCeratto/firelet | tests/test_webapp.py | 1 | 15390 | # Firelet - Distributed firewall management.
# Copyright (C) 2010 Federico Ceratto
#
# 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 | 9,068,727,494,244,704,000 | 27.186813 | 245 | 0.60052 | false | 3.297622 | true | false | false |
boundary/meter-plugin-ticker | bootstrap.py | 2 | 2058 | #!/usr/bin/env python
import os
import shutil
import sys
import subprocess
import tarfile
import urllib
class Bootstrap:
def __init__(self,
version="12.0.4",
base='http://pypi.python.org/packages/source/v/virtualenv',
python="python2",
env="pyenv",
... | apache-2.0 | 6,730,018,688,644,087,000 | 24.725 | 88 | 0.620991 | false | 3.648936 | false | false | false |
parallel-fs-utils/multi-thread-posix | parallel-untar.py | 1 | 7771 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# parallel-untar.py - unpack tarball subdirectories in parallel
#
# copyright (c) 2015 Ben England, Red Hat, under Apache license
# see http://www.apache.org/licenses/LICENSE-2.0 for license details
import os
import errno
import tarfile
# we use multiprocessing module to... | agpl-3.0 | 1,703,652,004,032,822,500 | 34.004505 | 79 | 0.542015 | false | 4.032693 | false | false | false |
DeathSea/DBSConcepts_FP | tran.py | 1 | 6301 | # -*- coding: utf-8 -*-
# transle bilibili's av json file into database
import json
import mysql.connector
import ntpath
import urllib2,time
from tt import GetVideoInfo
config = {
'user': 'root',
'password': '',
'host': 'localhost',
'database': 'dbfp',
'raise_on_warnings': True,
}
#con = mysql.connector.conne... | gpl-2.0 | 330,896,073,926,808,060 | 35.847953 | 594 | 0.575147 | false | 2.819239 | false | false | false |
goddardl/gaffer | python/GafferUI/GraphBookmarksUI.py | 1 | 5255 | ##########################################################################
#
# Copyright (c) 2015, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistrib... | bsd-3-clause | 2,393,390,104,610,386,400 | 32.477707 | 84 | 0.653663 | false | 3.930441 | false | false | false |
saullocastro/pyNastran | pyNastran/bdf/dev_vectorized/cards/loads/ploadx1.py | 3 | 3998 | from six.moves import zip
from numpy import arange, zeros, unique
from pyNastran.bdf.field_writer_8 import print_card_8
from pyNastran.bdf.field_writer_16 import print_card_16
from pyNastran.bdf.bdf_interface.assign_type import (integer,
double, double_or_blank)
class PLOADX1(object):
type = 'PLOADX1'
d... | lgpl-3.0 | -1,486,337,236,081,626,000 | 32.041322 | 92 | 0.494747 | false | 3.359664 | false | false | false |
Skufler/pybot | main.py | 1 | 1445 | import telebot
from telebot import types
import timetable as table
import weather
token = 'your_token'
bot = telebot.TeleBot(token)
@bot.message_handler(commands=['functions'])
def functions_handler(message):
bot.send_message(message.chat.id, '1 - Распсание \n'
... | gpl-3.0 | 1,582,778,984,586,428,000 | 28.636364 | 91 | 0.626855 | false | 3.056689 | false | false | false |
LynnHo/AttGAN-Tensorflow | scripts/align.py | 1 | 5555 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
from functools import partial
from multiprocessing import Pool
import os
import re
import cropper
import numpy as np
import tqdm
# ============================================================... | mit | 4,514,313,698,126,492,000 | 44.162602 | 197 | 0.534833 | false | 3.649803 | false | false | false |
sciCloud/OLiMS | lims/content/instrumentvalidation.py | 2 | 3985 | from dependencies.dependency import ClassSecurityInfo
from dependencies.dependency import schemata
from dependencies.dependency import HoldingReference
from dependencies import atapi
from dependencies.dependency import *
from dependencies.dependency import getToolByName
from lims import bikaMessageFactory as _
from lim... | agpl-3.0 | 8,217,211,415,575,605,000 | 30.626984 | 89 | 0.590966 | false | 4.633721 | false | false | false |
petergtz/vcf-compare | run-tests.py | 1 | 3276 | #!/usr/bin/python
# Copyright 2013 Peter Goetz
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as published by
# the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT A... | gpl-2.0 | -6,323,314,131,631,169,000 | 34.608696 | 106 | 0.607448 | false | 3.668533 | true | false | false |
srio/dabam | code/simple_physicaloptics.py | 1 | 6563 | """
simple_physicaloptics
performs optics calculations using physical optics
inputs: reads the heights profiles from tmpHeights.dat
file produced by dabam.py with detrending, e.g.:
python3 dabam.py 4
output: some plots
"""
__author__ = "Manuel Sanchez del Rio"
__contact__ = "srio@... | gpl-2.0 | 2,001,439,813,981,640,000 | 27.663755 | 125 | 0.608411 | false | 3.017471 | false | false | false |
sigshen/django-request-profiler | request_profiler/south_migrations/0002_auto__del_field_ruleset_include_anonymous__add_field_ruleset_user_filt.py | 1 | 6113 | # -*- 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):
# Deleting field 'RuleSet.include_anonymous'
db.delete_column(u'request_p... | mit | -7,246,257,717,392,930,000 | 65.456522 | 195 | 0.562081 | false | 3.68475 | false | false | false |
gnome-keysign/gnome-keysign | keysign/export_uids.py | 1 | 1193 | #!/usr/bin/env python3
import logging
from pathlib import Path
import os
import sys
if __name__ == "__main__" and __package__ is None:
logging.getLogger().error("You seem to be trying to execute " +
"this script directly which is discouraged. " +
"Try p... | gpl-3.0 | -2,191,016,393,435,988,000 | 27.404762 | 88 | 0.583403 | false | 3.379603 | false | false | false |
alkamid/wiktionary | odczasownikowe.py | 1 | 4587 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import pywikibot
from pywikibot import Category
from pywikibot import pagegenerators
import re
from klasa import *
from main import *
def addOdczas(title):
re_tabelkaAttr = re.compile(r'\|\s*?(z|)robienie\s*?=(.*?)(?=}}|\n)')
word = Haslo(title)
log = ''
if w... | mit | -2,250,928,310,257,693,000 | 56.2 | 302 | 0.478802 | false | 3.151515 | false | false | false |
njankowski/dftools | formats/gob.py | 1 | 5035 | """
Star Wars: Dark Forces
GOB Container Functions
"""
import string
import struct
GOB_HEADER_SIZE = 8
GOB_CATALOG_OFFSET_SIZE = 4
GOB_CATALOG_ENTRY_SIZE = 21
GOB_MAX_SIZE = 2 ** 31 - 1
class GOBException(Exception):
pass
def is_valid_entry_name(filename):
"""Return whether a name is valid as an entry na... | isc | -9,218,901,716,966,650,000 | 30.46875 | 119 | 0.590864 | false | 3.550776 | false | false | false |
vladimarius/pyap | pyap/source_CA/data.py | 1 | 21646 | # -*- coding: utf-8 -*-
"""
pyap.source_US.data
~~~~~~~~~~~~~~~~~~~~
This module provides regular expression definitions required for
detecting Canada addresses.
The module is expected to always contain 'full_address' variable containing
all address parsing definitions.
:copyright: (c) 2... | mit | -7,975,615,341,591,156,000 | 36.672474 | 102 | 0.32672 | false | 2.714537 | false | false | false |
CumulusNetworks/netshow-linux-lib | netshow/linux/show_neighbors.py | 2 | 2316 | # pylint: disable=E0611
""" Module for printout out linux device neighbors
"""
from netshow.linux.netjson_encoder import NetEncoder
from netshow.linux import print_iface
import netshowlib.linux.cache as linux_cache
from collections import OrderedDict
import json
from tabulate import tabulate
from netshow.linux.common i... | gpl-2.0 | 7,353,999,060,615,984,000 | 36.354839 | 90 | 0.542314 | false | 4.203267 | false | false | false |
mrpindo/openshift-estore | tokoku/myauth/views.py | 1 | 4205 | # Create your views here.
from django.shortcuts import get_object_or_404, render_to_response, get_list_or_404
from django.template import RequestContext
from django.views.generic import TemplateView
from myauth.urls import *
"""
Workaround for migrating direct_to_template function to DirectTemplateView
"""
from djang... | gpl-2.0 | 3,941,015,068,366,415,400 | 34.041667 | 99 | 0.678954 | false | 4.118511 | false | false | false |
metrasynth/solar-flares | sf/synth/sunsynth.py | 1 | 1406 | import logging
import rv.api
import sunvox
class SunSynth(object):
def __init__(self, filename, slot):
"""
:type slot: sunvox.Slot
"""
logging.debug('filename=%r', filename)
self.filename = filename
synth = rv.api.read_sunvox_file(filename)
self.project = ... | mit | -5,847,323,777,921,378,000 | 29.565217 | 70 | 0.507112 | false | 3.769437 | false | false | false |
shultzd/Euler | problem_31.py | 1 | 1613 | # In England the currency is made up of pound, £, and pence, p, and there are eight coins in general circulation:
#
# 1p, 2p, 5p, 10p, 20p, 50p, £1 (100p) and £2 (200p).
#
# It is possible to make £2 in the following way:
#
# 1×£1 + 1×50p + 2×20p + 1×5p + 1×2p + 3×1p
#
# How many different ways can £2 be made... | cc0-1.0 | -1,476,017,489,725,330,000 | 26.603448 | 113 | 0.484697 | false | 3.208417 | false | false | false |
PuZZleDucK/pixelated-platform | test/features/page_objects/base_page_object.py | 2 | 4109 | #
# Copyright (c) 2015 ThoughtWorks, Inc.
#
# Pixelated 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, or
# (at your option) any later version.
#
# Pixelated is distrib... | agpl-3.0 | 2,943,140,441,133,139,500 | 46.229885 | 100 | 0.710879 | false | 3.665477 | false | false | false |
ChandraCXC/sherpa-samp | sherpa_samp/session.py | 1 | 14840 | #!/usr/bin/env python
#
# Copyright (C) 2011, 2015 Smithsonian Astrophysical Observatory
#
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your ... | gpl-2.0 | -1,138,305,260,855,621,000 | 42.014493 | 113 | 0.51752 | false | 4.393132 | true | false | false |
cyberark-bizdev/ansible | lib/ansible/modules/network/fortimanager/fmgr_script.py | 44 | 8309 | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible 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.
#
# Ansible is distribut... | gpl-3.0 | -4,774,850,824,318,835,000 | 29.435897 | 120 | 0.636779 | false | 3.91934 | false | false | false |
yephper/django | django/bin/boot/boot/settings.py | 1 | 3304 | """
Django settings for boot project.
Generated by 'django-admin startproject' using Django 1.10.
For more information on this file, see
https://docs.djangoproject.com/en/dev/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/dev/ref/settings/
"""
import os
# Bui... | bsd-3-clause | -5,766,888,668,676,380,000 | 24.612403 | 91 | 0.674637 | false | 3.579632 | false | false | false |
hsavolai/vmlab | src/kiwi/ui/delegates.py | 3 | 7563 | #
# Kiwi: a Framework and Enhanced Widgets for Python
#
# Copyright (C) 2002, 2003 Async Open Source
#
# 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 Foundation; either
# version 2.1 of the License,... | gpl-3.0 | 7,819,308,312,624,857,000 | 37.784615 | 79 | 0.625942 | false | 4.187708 | false | false | false |
AA33/demo-project | travel_log/travel_log/urls.py | 1 | 1318 | __author__ = 'abhishekanurag'
from django.conf.urls import patterns, url
from django.views.generic.base import TemplateView
from travel_log import views
urlpatterns = patterns('',
# /travel_log
url(r'^$', views.index, name='index'),
# /travel_log/u... | gpl-3.0 | 863,316,377,841,898,600 | 46.071429 | 92 | 0.460546 | false | 4.055385 | false | false | false |
engineIngmar/SCAPPi | APLog.py | 1 | 4257 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
"""APLog.py
logging script, taking snapshots of the system
dependencies:
sensor and actuator modules
"""
from sensors import DHT22, D18B20, HCSR04, LFM, BH1750
from dbControl import dbLog
import sqlite3 as lite
import datetime
from datetime import timedelta
import time
impo... | mit | 7,222,331,452,860,314,000 | 38.794393 | 196 | 0.548273 | false | 3.695313 | false | false | false |
shosca/django-rest-witchcraft | docs/conf.py | 1 | 5460 | #!/usr/bin/env python3
#
# Django REST Witchcraft documentation build configuration file, created by
# sphinx-quickstart on Sat Jun 10 09:20:17 2017.
#
# 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
# autogenerat... | mit | -7,051,495,529,688,536,000 | 31.694611 | 110 | 0.681319 | false | 3.84778 | true | false | false |
CalebBell/fluids | fluids/optional/pychebfun.py | 1 | 26906 | # -*- coding: utf-8 -*-
"""
Chebfun module
==============
Vendorized version from:
https://github.com/pychebfun/pychebfun/blob/master/pychebfun
The rational for not including this library as a strict dependency is that
it has not been released.
.. moduleauthor :: Chris Swierczewski <cswiercz@gmail.com>
.. moduleautho... | mit | 1,684,557,532,057,880,000 | 33.449424 | 755 | 0.549249 | false | 3.946025 | false | false | false |
CoolCloud/ansible | lib/ansible/executor/task_executor.py | 19 | 23445 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible 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) an... | gpl-3.0 | 6,273,686,950,557,298,000 | 41.93956 | 169 | 0.585882 | false | 4.571066 | false | false | false |
foursquare/pants | src/python/pants/pantsd/service/pailgun_service.py | 1 | 2742 | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
import logging
import select
from contextlib import contextmanager
from pants.pantsd.pai... | apache-2.0 | -304,092,088,776,224,960 | 32.851852 | 100 | 0.688913 | false | 3.883853 | false | false | false |
abbec/pantry | pantry/v1/targets.py | 1 | 2434 | import flask
import jsonschema
import pantry.common.pantry_error as perror
import pantry.v1.backend as backend
targets_blueprint = flask.Blueprint("targets", __name__)
@targets_blueprint.route('/targets/', methods=['GET'])
def list_targets():
return flask.jsonify(
{"targets": backend.get_targets(flask.r... | bsd-2-clause | -5,981,000,948,568,151,000 | 24.621053 | 73 | 0.54355 | false | 4.070234 | false | false | false |
danfairs/kral | kral/services/reddit.py | 1 | 2511 | # -*- coding: utf-8 -*-
from eventlet.greenthread import sleep
from eventlet.green import urllib2
import simplejson as json
from collections import defaultdict
import urllib
from kral.utils import fetch_json
def stream(queries, queue, settings, kral_start_time):
api_url = "http://www.reddit.com/search.json?"
... | agpl-3.0 | -5,095,552,625,823,184,000 | 32.932432 | 76 | 0.414178 | false | 5.001992 | false | false | false |
jianhuashao/WebDownloadJobsManage | server/db_insert_jobs_settings.py | 1 | 3335 | from pymongo import MongoClient
from datetime import datetime
mongodb_url = 'mongodb://192.168.0.30:27017/'
mongodb_url = 'mongodb://127.0.0.1:27017/'
client = MongoClient(mongodb_url)
db = client['web_jobs_server']
db = client['test_web_jobs_server']
print "** DB Collections: ", db.collection_names()
collection = db... | apache-2.0 | -3,532,616,626,173,047,000 | 45.985915 | 127 | 0.692354 | false | 2.969724 | false | false | false |
sciunto/inforevealer | src/gui.py | 1 | 30322 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import gobject
import gtk
import action,pastebin
import gettext,os
gettext.textdomain('inforevealer')
_ = gettext.gettext
__version__="0.5.1"
pixbuf=None
for icon_file in ['/usr/share/icons/hicolor/scalable/apps/inforevealer.svg','icons/inforevealer.svg']:
if os.path.... | gpl-2.0 | -8,560,852,772,869,041,000 | 35.40096 | 103 | 0.731416 | false | 3.525404 | false | false | false |
deka108/meas_deka | meas/development_settings.py | 1 | 7367 |
"""
# Name: meas/settings.py
# Description:
# Created by: Phuc Le-Sanh
# Date Created: Oct 10 2016
# Last Modified: Nov 23 2016
# Modified by: Phuc Le-Sanh
"""
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = 'g(yej*3clhw8mh1lge2jd*f7h0uam9exedd$ya50n-... | apache-2.0 | 2,176,164,673,449,346,000 | 25.692029 | 77 | 0.542826 | false | 3.677983 | true | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.