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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
jcfr/girder | tests/test_plugins/test_plugin/server.py | 1 | 1795 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright Kitware 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 ... | apache-2.0 | 4,997,767,409,729,860,000 | 30.491228 | 79 | 0.630641 | false | 4.098174 | false | false | false |
mkobos/tree_crawler | concurrent_tree_crawler/tree_accessor.py | 1 | 3966 | import logging
import threading
from concurrent_tree_crawler.abstract_tree_accessor import \
AbstractTreeAccessor, NodeAction
from concurrent_tree_crawler.abstract_node import NodeState
class TreeAccessor(AbstractTreeAccessor):
"""
An interface for the tree made of L{AbstractNode}s.
Access to sensitive methods i... | mit | -5,910,058,468,039,156,000 | 30.736 | 76 | 0.688603 | false | 3.305 | false | false | false |
danakj/chromium | services/shell/public/tools/manifest/manifest_collator.py | 1 | 2806 | #!/usr/bin/env python
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
""" A collator for Service Manifests """
import argparse
import json
import os
import shutil
import sys
import urlparse
eater_relativ... | bsd-3-clause | 4,538,789,842,080,426,000 | 25.980769 | 76 | 0.650036 | false | 3.721485 | false | false | false |
skevy/django | django/db/models/fields/related.py | 1 | 54908 | from django.conf import settings
from django.db import connection, router, transaction
from django.db.backends import util
from django.db.models import signals, get_model
from django.db.models.fields import (AutoField, Field, IntegerField,
PositiveIntegerField, PositiveSmallIntegerField, FieldDoesNotExist)
from dja... | bsd-3-clause | -3,232,830,973,483,323,000 | 45.889838 | 222 | 0.602153 | false | 4.154661 | false | false | false |
noironetworks/heat | heat/engine/resources/openstack/designate/zone.py | 1 | 5889 | #
# 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
# ... | apache-2.0 | 857,568,286,610,432,500 | 31.716667 | 78 | 0.587366 | false | 4.239741 | false | false | false |
selboo/starl-mangle | webvirtmgr/webvirtmgr/server.py | 1 | 30677 | # Utility functions used for guest installation
#
import libvirt
from libvirt import VIR_DOMAIN_XML_SECURE
from network.IPy import IP
import re
import time
import libxml2
from datetime import datetime
import string
def get_xml_path(xml, path=None, func=None):
"""
Return the content from the passed xml xpath,... | apache-2.0 | -4,393,413,968,680,874,500 | 29.800201 | 148 | 0.478991 | false | 3.969591 | false | false | false |
mitodl/open-discussions | open_discussions/authentication.py | 1 | 2405 | """Custom authentication for DRF"""
import logging
from django.contrib.auth import get_user_model
import jwt
from rest_framework.authentication import BaseAuthentication
from rest_framework_jwt.authentication import JSONWebTokenAuthentication
User = get_user_model()
HEADER_PREFIX = "Token "
HEADER_PREFIX_LENGTH = l... | bsd-3-clause | -7,893,392,934,490,459,000 | 30.233766 | 90 | 0.656133 | false | 4.625 | false | false | false |
UnitedThruAction/Data | Tools/StandardizeAddress.py | 1 | 4188 | """Standardize a list of addresses using the USPS API.
Multi-threaded, since the API response time is slow.
Get an API key at https://registration.shippingapis.com.
"""
from __future__ import print_function
import threading
import sys
import pandas as pd
from tqdm import tqdm
from collections import deque
from pyusp... | apache-2.0 | 227,579,348,872,957,340 | 32.504 | 92 | 0.546323 | false | 3.706195 | false | false | false |
pombredanne/pytype | pytype/pyc/opcodes_test.py | 1 | 52430 | from pytype.pyc import opcodes
import unittest
class Python2Test(unittest.TestCase):
"""Test bytecodes.dis for Python 2 opcodes."""
PYTHON_VERSION = (2, 7, 6)
def dis(self, data):
return opcodes.dis(data, self.PYTHON_VERSION)
def test_stop_code(self):
self.assertEquals(self.dis('\x00')[0].name, 'ST... | apache-2.0 | -2,192,197,559,645,915,400 | 35.034364 | 79 | 0.625424 | false | 2.74776 | true | false | false |
ikargis/horizon_fod | openstack_dashboard/api/glance.py | 1 | 3362 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# no... | apache-2.0 | 2,677,192,707,964,886,500 | 29.844037 | 78 | 0.649018 | false | 3.941383 | false | false | false |
alex/changes | changes/api/project_test_history.py | 1 | 2669 | from __future__ import absolute_import, division, unicode_literals
from flask.ext.restful import reqparse
from sqlalchemy.orm import contains_eager, joinedload
from changes.api.base import APIView
from changes.constants import Status
from changes.models import Project, TestCase, Job, Source
class ProjectTestHistory... | apache-2.0 | 2,706,287,891,616,317,400 | 37.128571 | 86 | 0.606969 | false | 3.90776 | true | false | false |
masfaraud/volmdlr | scripts/distance/tore_tore.py | 1 | 4675 | # -*- coding: utf-8 -*-
"""
Created on Tue Jun 2 14:15:50 2020
@author: Mack Pro
"""
import numpy as npy
import volmdlr as volmdlr
import volmdlr.primitives3D as primitives3D
import volmdlr.primitives2D as primitives2D
import matplotlib.pyplot as plt
import random
import math
rmin, rmax = 100, 1000
posmin, posmax =... | gpl-3.0 | 296,104,524,173,989,760 | 45.75 | 239 | 0.73861 | false | 2.446363 | false | false | false |
thinkobscure/PantheROV | topside/SDL/endian.py | 1 | 1027 | #!/usr/bin/env python
'''Functions for converting to native byte order
'''
__docformat__ = 'restructuredtext'
__version__ = '$Id: $'
import sys
import SDL.constants
def SDL_Swap16(x):
return (x << 8 & 0xff00) | \
(x >> 8 & 0x00ff)
def SDL_Swap32(x):
return (x << 24 & 0xff000000) | \
... | gpl-3.0 | -3,626,432,104,365,442,600 | 21.326087 | 49 | 0.584226 | false | 2.821429 | false | false | false |
gmariotti/lassim | source/core/lassim_context.py | 1 | 4587 | from logging import Logger
from typing import Dict, Type, Callable, List, Optional
import psutil
from core.base_solution import BaseSolution
from core.core_system import CoreSystem
from core.utilities.type_aliases import Vector
__author__ = "Guido Pio Mariotti"
__copyright__ = "Copyright (C) 2016 Guido Pio Mariotti"... | gpl-3.0 | 5,525,869,121,874,791,000 | 30.417808 | 80 | 0.615871 | false | 4.117594 | false | false | false |
jingriver/stocktracker | pytoolkit/randombitmap/bitmap.py | 1 | 1072 | from PIL import Image
import random
size = (640, 640)
black = (0,0,0)
white = (255,255,255)
def draw(size):
im = Image.new("RGB", size)
ll = []
for i in range(size[0]):
for j in range(size[1]):
if random.random()>0.5:
ll.append(white)
else:
... | mit | 6,033,678,608,516,749,000 | 20.375 | 91 | 0.476679 | false | 3.08046 | false | false | false |
CollabQ/CollabQ | .google_appengine/google/appengine/api/images/images_stub.py | 1 | 15868 | #!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | apache-2.0 | -8,046,123,606,114,034,000 | 33.051502 | 79 | 0.664104 | false | 3.970971 | false | false | false |
chappers/sklearn-recipes | streaming_take2/dpp_classifier_dpp_only.py | 1 | 13063 | import sklearn
from sklearn.datasets import make_regression, make_classification
from sklearn.linear_model import SGDRegressor, SGDClassifier
from sklearn.preprocessing import MinMaxScaler
from sklearn.metrics.pairwise import euclidean_distances
import pandas as pd
import numpy as np
from scipy import stats
from sci... | mit | 1,082,041,100,579,539,800 | 35.8 | 136 | 0.569318 | false | 3.21274 | true | false | false |
ym2050/pythonpractice | CF_SVD++_K-means/refine/utils.py | 1 | 4130 | from __future__ import (absolute_import, division,
print_function, unicode_literals)
# 下一个新版本的特性导入到当前版本,可以在当前版本中使用一些新版本的特性,必须放在文档开头
'''
工具类与工具方法
'''
# from builtins import *
# 引入内建模块,该模块中有一些常用函数;而该模块在Python启动后、且没有执行程序员所写的任何代码前,
# Python会首先加载该内建函数到内存,如str(),min(),max()等常用函数,不是必要
import t... | gpl-3.0 | -5,676,998,464,668,595,000 | 25.495798 | 96 | 0.564792 | false | 2.265928 | false | false | false |
eeshangarg/zulip | zerver/lib/email_notifications.py | 1 | 28170 | # See https://zulip.readthedocs.io/en/latest/subsystems/notifications.html
import re
from collections import defaultdict
from datetime import timedelta
from email.headerregistry import Address
from typing import Any, Dict, Iterable, List, Optional, Tuple
import html2text
import lxml.html
import pytz
from bs4 import B... | apache-2.0 | -4,329,368,778,265,539,600 | 39.416069 | 123 | 0.625204 | false | 3.867912 | false | false | false |
Guiiix/ip150_interfacer | classes/Interfacer.py | 1 | 5394 | from classes.Parser import Parser
from classes.Paracrypt import Paracrypt
from threading import Thread
import urllib2
import time
import random
class Interfacer:
def __init__(self, ip, port, username, password, verbose_level, zones_identifier,
area_identifier, ses_identifier, status_identifier, states_identifier, ... | gpl-3.0 | 2,701,808,814,002,473,000 | 25.975 | 117 | 0.673526 | false | 3.04918 | false | false | false |
koomik/CouchPotatoServer | couchpotato/core/media/_base/providers/torrent/torrentday.py | 1 | 3584 | from couchpotato.core.helpers.variable import tryInt
from couchpotato.core.logger import CPLog
from couchpotato.core.media._base.providers.torrent.base import TorrentProvider
log = CPLog(__name__)
class Base(TorrentProvider):
urls = {
'test': 'http://www.td.af/',
'login': 'http://www.td.af/torre... | gpl-3.0 | -641,086,129,201,212,200 | 30.716814 | 99 | 0.429129 | false | 4.281959 | false | false | false |
bitmovin/bitmovin-python | bitmovin/resources/models/encodings/muxings/information/progressive_ts_information.py | 1 | 4987 | from bitmovin.resources import Resource
from bitmovin.resources.models.encodings.muxings.information import ByteRange
from bitmovin.errors import InvalidTypeError
from bitmovin.utils.serialization import Serializable
from .muxing_information_video_track import MuxingInformationVideoTrack
from .muxing_information_audio... | unlicense | -5,852,554,402,090,742,000 | 39.544715 | 116 | 0.594947 | false | 4.533636 | false | false | false |
bosichong/17python.com | thread/threadlock.py | 1 | 2692 | #codeing=utf-8
# @Time : 2017-10.04
# @Author : J.sky
# @Mail : bosichong@qq.com
# @Site : www.17python.com
# @Title : Python多线程编程(2)多线程锁 threading.Lock
# @Url : http://www.17python.com/blog/33
# @Details : Python多线程编程(2)多线程锁 threading.Lock
# @Other : OS X 10.11.6
# Python 3.6.1
# ... | apache-2.0 | 8,619,549,271,112,287,000 | 21.21519 | 96 | 0.607184 | false | 1.603291 | false | false | false |
gaetano-guerriero/eyeD3-debian | src/eyed3/utils/console.py | 1 | 18555 | # -*- coding: utf-8 -*-
from __future__ import print_function
import os
import struct
import sys
import time
from . import formatSize, formatTime
from .. import LOCAL_ENCODING, compat
from .log import log
try:
import fcntl
import termios
import signal
_CAN_RESIZE_TERMINAL = True
except ImportError:
... | gpl-3.0 | 7,526,668,568,266,435,000 | 31.031088 | 80 | 0.463496 | false | 4.296039 | false | false | false |
NicoSantangelo/sublime-gulp | base_command.py | 1 | 5042 | import sublime
import sublime_plugin
import os.path
is_sublime_text_3 = int(sublime.version()) >= 3000
if is_sublime_text_3:
from .settings import Settings
from .status_bar import StatusBar
from .insert_in_output_view import insert_in_output_view
from .timeout import set_timeout, defer_sync
else:
... | mit | 4,268,979,282,055,752,000 | 36.626866 | 154 | 0.639825 | false | 3.48686 | false | false | false |
loonycyborg/scons-plusplus | python_modules/Tool/lex.py | 1 | 4870 | """SCons.Tool.lex
Tool-specific initialization for lex.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001 - 2019 The SCons Foundation
#
# Permission is hereby granted, free of charge, to... | gpl-3.0 | 1,416,306,155,329,501,000 | 33.539007 | 114 | 0.674127 | false | 3.631618 | false | false | false |
ryansb/tremendous | tremendous/colors.py | 1 | 12059 | from functools import partial
from tremendous.api import (
apply_color,
apply_256,
apply_256_bg,
apply_256_hl,
)
from tremendous.bindings import lib as __lib
from tremendous.bindings import ffi
colors_16 = dict(
bold=__lib.BOLD,
italic=__lib.ITALIC,
under=__lib.UNDER,
under2=__lib.UNDE... | mit | 2,573,298,628,492,698,000 | 37.404459 | 74 | 0.43992 | false | 2.683953 | false | false | false |
kuba/letsencrypt | acme/acme/messages.py | 1 | 13660 | """ACME protocol messages."""
import collections
from acme import challenges
from acme import errors
from acme import fields
from acme import jose
from acme import util
class Error(jose.JSONObjectWithFields, errors.Error):
"""ACME error.
https://tools.ietf.org/html/draft-ietf-appsawg-http-problem-00
:i... | apache-2.0 | 6,495,732,572,067,539,000 | 30.693735 | 82 | 0.651171 | false | 3.918531 | false | false | false |
Marzona/rig-remote | test/test_queuecomms.py | 1 | 2132 | #!/usr/bin/env python
# import modules
import pytest
from rig_remote.queue_comms import QueueComms
from rig_remote.constants import QUEUE_MAX_SIZE
from Queue import Queue, Empty, Full
def test_queued_for_parent1():
qc=QueueComms()
qc.parent_queue.put("2")
qc.parent_queue.get()
assert(qc.queued_for_par... | mit | -5,075,182,294,116,822,000 | 24.082353 | 47 | 0.643996 | false | 2.81638 | true | false | false |
willblev/RNA_TwiZe | rna_twize.py | 1 | 12512 | import Tkinter
import tkFileDialog
import tkMessageBox
from Tkinter import *
import os
import sys
from math import factorial
class Unbuffered(object):
"""Attempts to create an unbuffered STDOUT"""
def __init__(self, stream):
self.stream = stream
def write(self, data):
self.stream.write(data)
self.stream.fl... | gpl-3.0 | -2,537,356,710,290,258,400 | 39.7557 | 352 | 0.706682 | false | 3.113987 | false | false | false |
nriley/NewsBlur | apps/rss_feeds/icon_importer.py | 2 | 13539 | import urllib2
import lxml.html
import numpy
import scipy
import scipy.misc
import scipy.cluster
import urlparse
import struct
import operator
import gzip
import datetime
import requests
import httplib
from PIL import BmpImagePlugin, PngImagePlugin, Image
from socket import error as SocketError
from boto.s3.key import ... | mit | -3,460,954,564,688,705,500 | 35.395161 | 128 | 0.532609 | false | 4.00918 | false | false | false |
johnnoone/aiovault | tests/test_ldap.py | 1 | 1590 | from aiovault import Vault
from conftest import async_test
import pytest
@async_test
def test_ldap(dev_server):
client = Vault(dev_server.addr, token=dev_server.root_token)
backend = yield from client.auth.enable('ldap')
configured = yield from backend.configure(url='ldap://ldap.forumsys.com',
... | bsd-3-clause | 9,064,265,453,553,204,000 | 32.829787 | 78 | 0.579245 | false | 4.195251 | true | false | false |
DataDog/integrations-core | tokumx/datadog_checks/tokumx/vendor/pymongo/write_concern.py | 1 | 4561 | # Copyright 2014-2015 MongoDB, 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 agreed to in writin... | bsd-3-clause | 2,093,304,799,596,190,200 | 40.463636 | 82 | 0.623328 | false | 4.502468 | false | false | false |
HHSIDEAlab/hhs_ansible | lib/mark_deployment.py | 1 | 1988 | import argparse
import json
import sys
import urllib.request
from argparse import RawTextHelpFormatter
DESCRIPTION = """
Mark a new deployment in New Relic
Example:
python ./lib/mark_deployment.py \\
--api_key API_KEY_GOES_HERE \\
--app_id APP_ID_GOES_HERE \\
--version VERSION_STRING_GO... | gpl-2.0 | 9,018,319,330,410,440,000 | 24.818182 | 83 | 0.607646 | false | 3.708955 | false | false | false |
wking/pygrader | pygrader/model/assignment.py | 1 | 1233 | # Copyright (C) 2012 W. Trevor King <wking@tremily.us>
#
# This file is part of pygrader.
#
# pygrader 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 | -1,820,910,119,033,053,400 | 36.363636 | 79 | 0.6691 | false | 3.853125 | false | false | false |
avastjohn/maventy_new | growthcalc/growthcalc.py | 1 | 22700 | '''
Created on Sep 18, 2011
@author: mike
'''
import logging
import healthdb.util
import math
from xml.dom import minidom
import time
from datetime import datetime
from google.appengine.ext import db
from google.appengine.api import datastore_errors
import urllib2
import urllib
from xml.parsers.expat import ExpatE... | bsd-3-clause | 5,793,959,453,705,045,000 | 36.959866 | 202 | 0.662643 | false | 3.470948 | true | false | false |
I-sektionen/i-portalen | wsgi/iportalen_django/exchange_portal/models.py | 1 | 6767 | __author__ = 'Magnus Forzelius & Jesper Lehtonen'
from django.db import models
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext_lazy as _
from django.utils import timezone
from utils.validators import liu_id_validator
from tags.models import Tag
import os
import datetime
class... | mit | 4,308,718,308,841,344,500 | 30.976077 | 142 | 0.634595 | false | 3.233188 | false | false | false |
citrix-openstack-build/neutron | neutron/plugins/ml2/rpc.py | 1 | 9476 | # Copyright (c) 2013 OpenStack Foundation
# 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 ... | apache-2.0 | -6,509,788,417,810,741,000 | 42.269406 | 79 | 0.550232 | false | 4.370849 | false | false | false |
eXma/meet-and-eat-registration-system | src/cfg/__init__.py | 1 | 2351 | import os
from contextlib import contextmanager
import yaml
import locale
from datetime import datetime
__author__ = 'jan'
def parse_cfg_date(cfg_date):
return datetime.strptime(cfg_date, "%Y-%m-%d %H:%M")
@contextmanager
def _fix_locale(prefix):
oldloc = locale.getlocale(locale.LC_TIME)
if not oldloc... | bsd-3-clause | -6,858,246,530,555,979,000 | 23.237113 | 91 | 0.560613 | false | 3.905316 | true | false | false |
DarthMaulware/EquationGroupLeaks | Leak #4 - Don't Forget Your Base/EQGRP-Auction-File/Linux/bin/fg.py | 1 | 23049 | #!/usr/local/bin/python
# VER=2.0.0.2
# 09 FEB 2012
"""
fg UTILITIES
requires:
+ winscp for win32
+ pexpect 2.3 on linux
"""
import re, sys, time, os, getpass, string, traceback
from os import popen
from optparse import OptionParser
from subprocess import *
try:
import pexpect
except:
pass
class fg:
def __i... | unlicense | 1,231,811,236,877,711,400 | 35.412322 | 372 | 0.613302 | false | 2.978292 | false | false | false |
lioupayphone/gdeploy | gdeployfeatures/volume/volume.py | 1 | 12197 | """
Add functions corresponding to each of the actions in the json file.
The function should be named as follows <feature name>_<action_name>
"""
from gdeploylib import defaults, Helpers, Global, YamlWriter
import os, re
from os.path import basename
from collections import defaultdict
helpers = Helpers()
writers = Yam... | gpl-2.0 | -1,763,972,171,218,459,100 | 37.720635 | 81 | 0.618185 | false | 3.645248 | false | false | false |
LCBRU/reporter | reporter/uol_redcap_reports/limb/demographics_data_quality.py | 1 | 2538 | #!/usr/bin/env python3
import re
from reporter.connections import RedcapInstance
from reporter.emailing import (
RECIPIENT_LIMB_ADMIN as RECIPIENT_ADMIN,
RECIPIENT_LIMB_MANAGER as RECIPIENT_MANAGER,
)
from reporter.application_abstract_reports.redcap.data_quality import (
RedcapFieldMatchesRegular... | mit | 9,036,729,170,423,756,000 | 30.538462 | 81 | 0.6316 | false | 3.776786 | false | false | false |
kyleellefsen/Glams | Glams/glams/glamsTemplate.py | 1 | 3083 | # encoding: utf-8
def glamsTemplate(article, username=None, resources='', rightbar=''):
'''Wraps an article string in the html template'''
if username:
userLogin="""<a href="/home">""" + username +"""</a>"""
else:
userLogin="""<a href="/home/login/">Login</a>"""
webpage="""<!DOCTYPE HTM... | mit | -3,873,556,045,646,859,300 | 54.035714 | 214 | 0.49416 | false | 4.002597 | false | false | false |
knarfeh/HiaBlog | app/main/signals.py | 1 | 1539 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
from flask import request, current_app
from blinker import Namespace
from . import models, ext
from app.hia.config import HiaBlogSettings
hiablog_signals = Namespace()
post_visited = hiablog_signals.signal('post-visited')
post_published = hiablog_signals.signal('post-pu... | gpl-2.0 | -2,330,866,395,023,611,400 | 28.596154 | 73 | 0.693957 | false | 3.442953 | false | false | false |
timy/dm_spec | pkg/pymod_data.py | 1 | 11796 | import numpy as np
def readDirIndex(fileName):
import json
fileDir = open(fileName)
idxDir = json.load(fileDir)['order']
fileDir.close()
order = ['1', '3', '5']
idxStart = [0, 6, 44]
return order, idxDir, idxStart
def calcAmplitude(fileNameFunc, nt, nCoo, iDir):
s = np.zeros(nt)
fo... | mit | 5,346,539,297,204,704,000 | 35.63354 | 86 | 0.508562 | false | 2.939447 | false | false | false |
oscurart/BlenderAddons | old/oscurart_resize_resolution.py | 1 | 1753 | # Compensa el tamanio de imagen al modificar el lente de la camara.
bl_info = {
"name": "Resize Render Resolution",
"author": "Oscurart",
"version": (1, 0),
"blender": (2, 66, 0),
"location": "Search > Resize Resolution by Camera Angle",
"description": "Resize render dimension by camera angle.... | gpl-2.0 | 4,949,207,930,317,479,000 | 27.274194 | 104 | 0.661723 | false | 3.246296 | false | false | false |
BjornFJohansson/molbio-test-generator | exam_generator.py | 1 | 3576 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
make_only_first_exam = False
encrypt_exam = True
import time
import string
import re
#import py7zlib
import subprocess
import os
import shelve
import shutil
from bio_info_questions import *
from exam_settings import *
import ParseStudentList
mecs, names = Par... | bsd-2-clause | 3,588,146,955,561,264,000 | 31.509091 | 133 | 0.598993 | false | 3.425287 | false | false | false |
eads/deck-blueprint | blueprint.py | 1 | 5367 | # -*- coding: utf-8 -*-
import codecs
import getpass
import json
import os
import requests
import shutil
from clint.textui import colored, puts
from cssmin import cssmin
from flask import g, Blueprint
from jinja2 import Markup
from slimit import minify
from smartypants import smartypants
from tarbell.hooks import regi... | mit | 422,399,089,869,528,400 | 27.854839 | 124 | 0.617477 | false | 3.616577 | false | false | false |
inTagger/UpdateDDNS | DNSPod/DNSPodAPI.py | 1 | 3202 | __author__ = 'Alexander Logger'
from string import Template
import requests
import json
import logging
base_url = 'https://www.dnspod.com/api'
get_records_url_tpl = Template(base_url + '/records/$domain')
modify_record_url_tpl = Template(base_url + '/records/$domain/$record_id')
get_auth_token_url_tpl = Template(base... | mit | -6,272,639,740,326,752,000 | 36.682353 | 108 | 0.590881 | false | 3.862485 | false | false | false |
jtucker1972/XBMC-TVTime | resources/lib/Overlay.py | 1 | 68585 | # Copyright (C) 2011 James A. Tucker
#
#
# This file is part of TV Time.
#
# TV Time 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 | 426,476,372,236,932,100 | 43.739074 | 240 | 0.563534 | false | 4.424553 | false | false | false |
maxpinto/Ptz | bootcamp/auth/forms.py | 1 | 3750 | from django import forms
from django.core.exceptions import ValidationError
from django.contrib.auth.models import User
from bootcamp.settings import ALLOWED_SIGNUP_DOMAINS
def Validardominio(value):
if '*' not in ALLOWED_SIGNUP_DOMAINS:
try:
dominio = value[value.index("@"):]
if do... | mit | 6,717,397,107,873,970,000 | 51.097222 | 180 | 0.652267 | false | 3.571429 | false | false | false |
ryankynor/Hello-friend | hellofriend.py | 1 | 1070 | """
hellofriend.py
Author: Ryan Kynor
Credit:
http://stackoverflow.com/questions/19664840/typeerror-cant-convert-float-object-to-str-implicitly
Milo
Assignment:
Write and submit an interactive Python program that asks for the user's name and age,
then prints how much older Python is than the user (based on a simple ... | mit | -7,764,921,810,251,109,000 | 33.548387 | 97 | 0.729907 | false | 3.222892 | false | false | false |
tompecina/legal | legal/hjp/urls.py | 1 | 1385 | # -*- coding: utf-8 -*-
#
# hjp/urls.py
#
# Copyright (C) 2011-19 Tomáš Pecina <tomas@pecina.cz>
#
# This file is part of legal.pecina.cz, a web-based toolbox for lawyers.
#
# This application is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published b... | gpl-3.0 | -6,588,313,614,671,599,000 | 33.525 | 72 | 0.692976 | false | 3.596354 | false | false | false |
dsalazarr/pfc_ii | pfc/pfc/applications/models.py | 1 | 2347 | from __future__ import unicode_literals
from django.db import models
from django.conf import settings
from oauth2_provider.models import Application as ApplicationModel, AccessToken as AccessTokenModel
from pfc.users.models import Company, User
class ApplicationConfig(models.Model):
id = models.AutoField(primar... | gpl-3.0 | -8,329,098,107,580,959,000 | 27.621951 | 99 | 0.683852 | false | 4.074653 | false | false | false |
larlequin/CleanMyBib | CleanMyBib/CleanMyBib_Qt.py | 1 | 12400 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import sys, os
import platform
import re
import csv
from PyQt4 import QtGui
from PyQt4 import QtCore
from CleanMyBib import CleanFileBib
from pybtex.database.input import bibtex
__version__ = "4.0.0"
# Allow to read the picture files in pyinstaller
datadir = ".img"
if not h... | gpl-3.0 | 7,906,700,085,643,785,000 | 37.509317 | 95 | 0.575081 | false | 3.831891 | false | false | false |
KhronosGroup/COLLADA-CTS | Core/Gui/Dialog/FOpenDialog.py | 1 | 6196 | # Copyright (c) 2012 The Khronos Group Inc.
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and /or associated documentation files (the "Materials "), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publis... | mit | -3,829,923,993,941,251,600 | 40.864865 | 466 | 0.598612 | false | 3.824691 | true | false | false |
deepmind/distrax | distrax/_src/bijectors/tfp_compatible_bijector.py | 1 | 7577 | # Copyright 2021 DeepMind Technologies Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | apache-2.0 | 1,191,359,019,594,068,500 | 41.567416 | 80 | 0.674145 | false | 3.712396 | false | false | false |
uwosh/uwosh.dropcard | uwosh/dropcard/__init__.py | 1 | 2069 | """Main product initializer
"""
from zope.i18nmessageid import MessageFactory
from uwosh.dropcard import config
from Products.Archetypes import atapi
from Products.CMFCore import utils
# Define a message factory for when this product is internationalised.
# This will be imported with the special name "_" in most mod... | gpl-2.0 | -6,773,124,266,639,195,000 | 40.38 | 78 | 0.727888 | false | 4.222449 | true | false | false |
edf-hpc/hpcstats | HPCStats/Model/Cluster.py | 1 | 6981 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011-2015 EDF SA
# Contact:
# CCN - HPC <dsp-cspit-ccn-hpc@edf.fr>
# 1, Avenue du General de Gaulle
# 92140 Clamart
#
# Authors: CCN - HPC <dsp-cspit-ccn-hpc@edf.fr>
#
# This file is part of HPCStats.
#
# HPCStats is free software: you can re... | gpl-2.0 | -7,844,108,807,252,249,000 | 32.085308 | 79 | 0.545481 | false | 4.230909 | false | false | false |
airanmehr/bio | Scripts/Plasmodium/Data.py | 1 | 7725 | '''
Copyleft Oct 10, 2015 Arya Iranmehr, PhD Student, Bafna's Lab, UC San Diego, Email: airanmehr@gmail.com
'''
import numpy as np
import pandas as pd
import os,sys;home=os.path.expanduser('~') +'/'
class Data:
@staticmethod
def read(param):
"""
data is sorted first by Chrom and then POS i... | mit | 6,538,085,675,037,243,000 | 41.445055 | 401 | 0.574369 | false | 3.234925 | false | false | false |
franklinsales/udacity-data-analyst-nanodegree | project3/class-works/data-wrangling/data-extract-fundamentals/set_problem_2013_ERCOT_Hourly_Load_Data_corrected.py | 1 | 3217 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Wed Mar 15 18:05:20 2017
@author: franklin
"""
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Wed Mar 15 13:30:33 2017
@author: franklin
"""
'''
Find the time and value of max load for each of the regions
COAST, EAST, FAR_WEST, NORTH, NORT... | mit | 2,643,257,169,679,058,000 | 27.723214 | 80 | 0.539322 | false | 3.477838 | false | false | false |
Azure/azure-sdk-for-python | sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protected_items_crr_operations.py | 1 | 6308 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | mit | 1,538,860,436,925,158,100 | 48.28125 | 191 | 0.64331 | false | 4.557803 | true | false | false |
fyookball/electrum | plugins/shuffle_deprecated/crypto.py | 1 | 3181 | import ecdsa
from ecdsa.util import number_to_string, string_to_number
from electroncash.bitcoin import (generator_secp256k1, point_to_ser, EC_KEY,
Hash, InvalidPassword)
class CryptoError(Exception):
''' base class of a subset of the possible exceptions raised in this class
... | mit | 2,820,235,096,471,262,700 | 39.782051 | 140 | 0.647281 | false | 3.83253 | false | false | false |
goett/TRPS | Tools/CrystalCalculator/slownessZnSe.py | 1 | 2953 | import math
import numpy as np
import continuum as dyn
from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt
from matplotlib import cm
#plt.rcParams['image.cmap'] = 'viridis';
numt = 161;
nump = 321;
t = np.linspace(0,math.pi,numt)
p = np.linspace(0,math.pi*2.0,nump)
print(t)
print(p)
pm,tm = np... | mit | 339,710,894,652,596,600 | 29.132653 | 85 | 0.655943 | false | 1.960823 | false | false | false |
Nikolas1814/HackTues | webServer/all/views.py | 1 | 2898 | from django.shortcuts import render
from django.views.decorators.csrf import csrf_exempt
from django.template.loader import get_template
from django.template import Context
from django.http import StreamingHttpResponse
from django.http import HttpResponseRedirect
import datetime
from django.db.models import Q
import o... | mit | -6,916,202,942,270,189,000 | 45.015873 | 149 | 0.730504 | false | 3.433649 | false | false | false |
olatoft/reverse-hangman | Main.py | 1 | 2693 | import Words
def get_word_length():
word_length = 0
while word_length == 0:
try:
word_length = int(input('Kor mange bokstavar er det i ordet?\n'))
except:
print('Du må skrive inn eit tal. Prøv igjen.\n')
return word_length
def get_if_letter_in_word(letter):
an... | gpl-3.0 | 4,939,119,348,872,317,000 | 32.123457 | 83 | 0.513231 | false | 3.435339 | false | false | false |
CeON/avroknife | avroknife/test/command_line_runner.py | 1 | 8137 | # Copyright 2013-2015 University of Warsaw
#
# 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 agree... | apache-2.0 | 9,083,836,292,020,347,000 | 38.5 | 85 | 0.598501 | false | 4.181398 | false | false | false |
bostonlink/pamalt | pamalt/transforms/log_queries.py | 1 | 5494 | #!/usr/bin/env python
# Copyright (C) 2012 pamalt Developer.
# This file is part of pamalt - https://github.com/bostonlink/pamalt
# See the file 'LICENSE' for copying permission.
# PaloAlto Log query Maltego transforms module
# Author: David Bressler (@bostonlink)
import urllib, urllib2
import time, sys
import xml.et... | gpl-3.0 | -3,957,049,368,385,212,400 | 34.681818 | 89 | 0.568074 | false | 3.699663 | false | false | false |
Bouke/django-user-sessions | user_sessions/management/commands/migratesessions.py | 1 | 2472 | # -*- coding: UTF-8 -*-
import importlib
import logging
from django.contrib.auth import get_user_model
from django.core.management.base import BaseCommand
from user_sessions.models import Session as UserSession
logger = logging.getLogger(__name__)
def get_model_class(full_model_name):
try:
old_model_pa... | mit | -1,303,204,494,783,075,600 | 38.870968 | 97 | 0.619741 | false | 4.262069 | false | false | false |
rjungbeck/rasterizer | servicebase.py | 1 | 3168 | import argparse
import json
import multiprocessing
import os
import logging
import win32api
import win32service
import win32serviceutil
cmdline_style="pywin32"
logger=logging.getLogger("servicebase")
class ServiceBase(win32serviceutil.ServiceFramework):
_svc_name_ = "RsjService"
_svc_display_name_... | agpl-3.0 | 4,275,224,004,615,823,400 | 27.886792 | 130 | 0.703598 | false | 3.373802 | false | false | false |
cdegroc/scikit-learn | examples/covariance/plot_outlier_detection.py | 2 | 3882 | """
==========================================
Outlier detection with several methods.
==========================================
This example illustrates two ways of performing :ref:`outlier_detection`
when the amount of contamination is known:
- based on a robust estimator of covariance, which is assuming that the
... | bsd-3-clause | -2,521,126,800,319,898,000 | 37.82 | 79 | 0.62983 | false | 3.500451 | false | false | false |
bgewehr/RPiMower | sens_groundCam.py | 1 | 1775 | #!/usr/bin/python
__author__ = 'mp911de'
import time
import os,sys
import picamera
import picamera.array
import time
import numpy as np
import lib_mqtt as MQTT
from math import sqrt, atan2, degrees
DEBUG = False
def get_colour_name(rgb):
rgb = rgb / 255
alpha = (2 * rgb[0] - rgb[1] - rgb [2])/2
beta =... | gpl-2.0 | 3,489,056,492,993,856,500 | 26.307692 | 137 | 0.522817 | false | 3.557114 | false | false | false |
pcampese/codewars | next_bigger3.py | 1 | 1877 | # https://www.codewars.com/kata/next-bigger-number-with-the-same-digits/train/python
def next_bigger(n):
import itertools
# Print the arguments
print('n = {}'.format(n))
# Define default result as -1
result = -1
# Convert the number to a list of digits
numbers = [int(d) for d in str(n)]
print('numbers = {}'... | gpl-3.0 | -2,691,056,460,727,516,700 | 25.083333 | 84 | 0.67821 | false | 2.960568 | false | false | false |
pytroll/pytroll-schedule | trollsched/spherical.py | 1 | 11055 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2013, 2014, 2015, 2018 Martin Raspaud
# Author(s):
# Martin Raspaud <martin.raspaud@smhi.se>
# 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 Softwa... | gpl-3.0 | 8,368,029,202,223,411,000 | 28.717742 | 81 | 0.520669 | false | 3.540999 | false | false | false |
valexandersaulys/airbnb_kaggle_contest | venv/lib/python3.4/site-packages/keras/preprocessing/image.py | 1 | 7684 | from __future__ import absolute_import
import numpy as np
import re
from scipy import ndimage
from scipy import linalg
from os import listdir
from os.path import isfile, join
import random, math
from six.moves import range
'''
Fairly basic set of tools for realtime data augmentation on image data.
Can easily... | gpl-2.0 | 4,823,282,614,734,855,000 | 30.235772 | 120 | 0.560776 | false | 3.362801 | false | false | false |
crosenth/csvpandas | csvpandas/subcommands/sample.py | 1 | 2063 | # This file is part of csvpandas
#
# csvpandas 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.
#
# csvpandas is distribu... | gpl-3.0 | -6,485,512,836,406,878,000 | 27.260274 | 73 | 0.636452 | false | 3.82037 | false | false | false |
arpitprogressive/arpittest | pursuite/settings/staging.py | 1 | 2573 | # -*- coding: utf-8 -*-
"""
Setting for production env
:copyright: (c) 2013 by Openlabs Technologies & Consulting (P) Limited
:license: see LICENSE for more details.
"""
#Flake8: noqa
from common import *
STATIC_ROOT = '/opt/pursuite/www/static'
MEDIA_ROOT = '/opt/pursuite/www/media'
ALLOWED_HOSTS = ['pur... | bsd-3-clause | -8,043,136,736,176,889,000 | 28.238636 | 74 | 0.643218 | false | 3.041371 | false | false | false |
wkarmistead/InvestmentAnalysisDashboard | pyBackend/businessLayer/ValueScoreObject.py | 1 | 1740 | '''
Created on Apr 5, 2014
@author: Walker Armistead
'''
class ValueScoreObject(object):
_intrinsicValueToSharePrice = 0
_pe_ratio = 0
_peg = 0
_currentPrice = 0
_debtToEquityRatio = 0
_currentAssets = 0
_currentLiabilities = 0
_dividendYield = 0
_earningsGrowth = 0
d... | gpl-2.0 | -3,799,703,472,309,803,000 | 20.493827 | 47 | 0.597126 | false | 3.832599 | false | false | false |
Frodox/buildbot | master/buildbot/test/unit/test_steps_shell.py | 1 | 41551 | # This file is part of Buildbot. Buildbot 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, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... | gpl-2.0 | 6,412,873,024,448,098,000 | 38.952885 | 147 | 0.550047 | false | 4.401589 | true | false | false |
dequis/qtile | docs/conf.py | 1 | 9459 | # -*- coding: utf-8 -*-
#
# Qtile documentation build configuration file, created by
# sphinx-quickstart on Sat Feb 11 15:20:21 2012.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All c... | mit | 5,405,494,409,025,351,000 | 29.61165 | 86 | 0.693625 | false | 3.621363 | true | false | false |
bolkedebruin/airflow | airflow/providers/amazon/aws/operators/datasync.py | 1 | 16833 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | 2,900,169,435,753,842,000 | 42.608808 | 104 | 0.641775 | false | 4.166584 | false | false | false |
mivanov/editkit | editkit/ckeditor/tests/tests.py | 1 | 6356 | # coding=utf-8
import os
from django.test import TestCase
from django.db import models
from django.core import exceptions
from ckeditor.models import XHTMLField
from ckeditor.models import XMLField
from ckeditor.models import HTML5Field
from ckeditor.models import HTML5FragmentField
from ckeditor.widgets import CKEd... | gpl-2.0 | 8,648,883,103,976,645,000 | 35.045455 | 79 | 0.54918 | false | 3.654378 | true | false | false |
uannight/reposan | plugin.video.tvalacarta/channels/vuittv.py | 1 | 7934 | # -*- coding: utf-8 -*-
#------------------------------------------------------------
# tvalacarta - XBMC Plugin
# Canal para 8TV
# http://blog.tvalacarta.info/plugin-xbmc/tvalacarta/
#------------------------------------------------------------
import re
import sys
import os
import traceback
import urllib2
from core ... | gpl-2.0 | 5,244,642,386,767,732,000 | 45.274854 | 238 | 0.573739 | false | 3.653278 | false | false | false |
almc/nao_basic | scripts/greedy_rrt.py | 1 | 8935 | #!/usr/bin/env python
import numpy as np
import sys, random, math, pygame
from pygame.locals import *
from math import sqrt,cos,sin,atan2
# constants
DIM, DIM_X, DIM_Y = 2, 640, 480 # range 0 to 640, and 0 to 480
WINSIZE = [DIM_X, DIM_Y] # could be any range for each var
# parameters
NUMNODES = 2000
D... | gpl-2.0 | -7,462,432,645,537,458,000 | 33.498069 | 97 | 0.566536 | false | 3.044293 | false | false | false |
prateeksan/python-design-patterns | behavioural/chain_of_responsibility.py | 1 | 3358 | """ The Chain of Responsibility Pattern
Notes:
The Chain of Responsibility pattern allows the client programmer to dynamically
create a recursive chain of objects - each of which tries to fulfill a
'responsibility' (usually represented by a method call). If an object in the
chain is unable to fulfill it, the request ... | mit | -5,352,763,461,890,104,000 | 36.741573 | 80 | 0.662001 | false | 4.234552 | false | false | false |
ewiger/runstat | python/runstat.py | 1 | 3779 | '''
Implementation of running variance/standard deviation.
The MIT License (MIT)
Copyright (c) 2015 Yauhen Yakimovich <eugeny.yakimovitch@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Softw... | mit | -5,212,956,734,936,615,000 | 27.413534 | 78 | 0.604922 | false | 3.899897 | false | false | false |
Rezzie/Batcher | generators/g_cycle.py | 1 | 2394 | #!/usr/bin/env python
# Copyright (c) 2011, The University of York
# All rights reserved.
# Author(s):
# James Arnold <jarnie@gmail.com>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of sourc... | bsd-3-clause | 8,469,629,835,516,487,000 | 39.576271 | 80 | 0.702172 | false | 4.508475 | false | false | false |
mekkablue/Glyphs-Scripts | Color Fonts/Merge Suffixed Glyphs into Color Layers.py | 1 | 10746 | #MenuTitle: Merge Suffixed Glyphs into Color Layers
# -*- coding: utf-8 -*-
from __future__ import division, print_function, unicode_literals
__doc__="""
Takes the master layer of suffixed glyphs (e.g., x.shadow, x.body, x.front) and turns them in a specified order into CPAL Color layers of the unsuffixed glyph (e.g., ... | apache-2.0 | -2,315,050,609,437,465,600 | 44.227848 | 273 | 0.727654 | false | 3.366206 | false | false | false |
april1452/craigslove | generate_post.py | 1 | 3348 | import string
import sys
import argparse
import csv
import random
# import scipy
# import scipy.stats
# from scipy.stats import rv_discrete
from collections import defaultdict
# locations = ['chicago', 'dallas', 'denver', 'jacksonville', 'lasvegas', 'losangeles', 'miami', 'minneapolis', 'newyork', 'oklahomacity', 'pro... | mit | -8,948,929,042,323,856,000 | 32.828283 | 188 | 0.512843 | false | 4.174564 | false | false | false |
NoahPeeters/pymathexpressions | mathexpressions/lib.py | 1 | 2465 | __author__ = 'Noah Peeters'
import math
const = {
'pi': [math.pi, '\pi'],
'e': [math.e, 'e']
}
float_chars = [str(x) for x in range(10)]
float_chars.append('.')
operators = ['+', '-', '*', '/', '^', '%', '=']
operators_priorities = [0, 0, 1, 1, 2, 1, 0]
operators_latex = ['%s+%s', '%s-%s', '%s*%s', '\\frac{... | mit | 4,933,296,013,770,592,000 | 21.017857 | 96 | 0.481136 | false | 2.927553 | false | false | false |
boreq/botnet | botnet/modules/builtin/meta.py | 1 | 2191 | from ...signals import _request_list_commands, _list_commands
from .. import BaseResponder
from ..lib import parse_command
class Meta(BaseResponder):
"""Displays basic info about this bot."""
ignore_help = False
ibip_repo = 'https://github.com/boreq/botnet'
def __init__(self, config):
super(... | mit | -4,800,175,909,826,175,000 | 29.859155 | 80 | 0.581013 | false | 3.891652 | false | false | false |
harikishen/addons-server | src/olympia/addons/tasks.py | 1 | 14975 | import hashlib
import os
from django.conf import settings
from django.core.files.storage import default_storage as storage
from django.db import transaction
from elasticsearch_dsl import Search
from PIL import Image
import olympia.core.logger
from olympia import amo
from olympia.addons.models import (
Addon, att... | bsd-3-clause | 1,826,447,814,899,760,000 | 34.070258 | 79 | 0.585576 | false | 3.665851 | false | false | false |
kevinrigney/PlaylistDatabase | youtube_search.py | 1 | 4208 | #!/usr/bin/env python3
import httplib2
import os
import sys
from apiclient.discovery import build
from apiclient.errors import HttpError
from oauth2client.client import flow_from_clientsecrets
from oauth2client.file import Storage
from oauth2client.tools import argparser, run_flow
class YoutubeSearcher():
# The ... | mit | 6,983,723,532,908,328,000 | 34.361345 | 86 | 0.694867 | false | 3.700967 | false | false | false |
south-coast-science/scs_dev | src/scs_dev/control_receiver.py | 1 | 7257 | #!/usr/bin/env python3
"""
Created on 17 Apr 2017
@author: Bruno Beloff (bruno.beloff@southcoastscience.com)
DESCRIPTION
The function of the control_receiver utility is execute commands received over a messaging topic. In addition to
enabling secure remote management, the utility provides a secure challenge-response... | mit | 8,452,370,803,216,645,000 | 32.911215 | 119 | 0.592945 | false | 3.926948 | false | false | false |
afraser/CellProfiler-Analyst | cpa/dirichletintegrate.py | 1 | 6480 | from numpy import *
from scipy.integrate import quadrature, romberg, fixed_quad
from scipy.special import gammaln, betaln, digamma, polygamma, betainc, gamma
import pdb
from hypergeom import hyper3F2regularizedZ1, hyper3F2Z1, hyper3F2aZ1
def dirichlet_integrate(alpha):
normalizer = exp(sum(gammaln(alpha)) - gamma... | gpl-2.0 | -7,962,094,248,256,210,000 | 39.754717 | 146 | 0.572685 | false | 3.14258 | false | false | false |
leathersole/midi-accordion-fancy | src/main/player.py | 1 | 1967 | #!/bin/env python
import pygame.midi
import soundvalue
class Player:
def __init__(self):
instrument = 22
port = 2
self.button2sound = {'a':(60,61), 's':(62,63), 'd':(64,65) }
self.buttons = self.button2sound.keys()
self.volume = 127
pygame.midi.init()
... | gpl-3.0 | 1,122,424,234,700,175,700 | 21.352273 | 82 | 0.605999 | false | 3.030817 | false | false | false |
tristan-c/massive-octo-tribble | massive/views.py | 1 | 3540 | import uuid
import os
from flask_restful import Resource, reqparse
from flask_login import login_required
from flask import redirect, send_file, g, url_for
from massive import api, app
from massive.models import *
from massive.utils import *
from io import BytesIO
class Resource(Resource):
method_decorators = [... | bsd-2-clause | 8,048,658,675,714,831,000 | 24.467626 | 80 | 0.554237 | false | 3.623337 | false | false | false |
branden/dcos | packages/dcos-net/extra/dcos-net-setup.py | 1 | 1380 | #!/opt/mesosphere/bin/python
"""
The script allows to add network interfaces and ip addresses multiple times
ip command returns 2 as exit code if interface or ipaddr already exists [1]
dcos-net-setup.py checks output of ip command and returns success exit code [2]
[1] ExecStartPre=-/usr/bin/ip link add name type dumm... | apache-2.0 | -2,490,736,207,287,210,000 | 34.384615 | 93 | 0.65 | false | 3.538462 | false | false | false |
itsMichael/uair-pro | app/launcher.py | 1 | 19189 | #! /usr/bin/env python2
# -*- coding: utf-8 -*-
import os
import sys
import random
import socket
import subprocess
import signal
import hashlib
import subprocess
from functions import lt
from langs import langs
from loaders import load_config, save_config
ROOT_PATH=os.path.dirname(__file__)
ICON_PATH=os.path.join(R... | gpl-3.0 | 3,870,659,540,756,294,000 | 31.196309 | 99 | 0.597738 | false | 3.507403 | true | false | false |
Maescool/libk8000 | setup.py | 1 | 1727 | #!/usr/bin/env python
#
# k8000 install script
#
# See COPYING for info about the license (GNU GPL)
# Check AUTHORS to see who wrote this software.
from distutils.core import setup
from distutils.extension import Extension
import sys, glob, re, os
# Check for Python < 2.2
if sys.version < '2.2':
sys.exit('Error: ... | gpl-2.0 | 6,887,290,133,431,512,000 | 33.54 | 95 | 0.643312 | false | 3.467871 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.