text stringlengths 0 1.05M | meta dict |
|---|---|
from .drm_service import DRMService
from .fairplay_drm_service import FairPlayDRM
from .widevine_drm_service import WidevineDRM
from .playready_drm_service import PlayReadyDRM
from .primetime_drm_service import PrimeTimeDRM
from .marlin_drm_service import MarlinDRM
from .clearkey_drm_service import ClearKeyDRM
from .ce... | {
"repo_name": "bitmovin/bitmovin-python",
"path": "bitmovin/services/encodings/fmp4_drm_service.py",
"copies": "1",
"size": "1189",
"license": "unlicense",
"hash": -2996648301546406000,
"line_mean": 50.6956521739,
"line_max": 100,
"alpha_frac": 0.7518923465,
"autogenerated": false,
"ratio": 2.844... |
from drole.types import Role as droleRole, Permission as drolePermission
from drole.models import RolePermission
class require(object):
def __init__(self, permission):
self.permission = permission
def __call__(self, f):
def wrapped(handler, *args, **kwargs):
request = getattr(handl... | {
"repo_name": "wheelcms/wheelcms_axle",
"path": "wheelcms_axle/auth.py",
"copies": "1",
"size": "3527",
"license": "bsd-2-clause",
"hash": -989891823722472800,
"line_mean": 29.1452991453,
"line_max": 79,
"alpha_frac": 0.6402041395,
"autogenerated": false,
"ratio": 4.086906141367323,
"config_tes... |
from droneapi import connect
from droneapi.lib import VehicleMode
from droneapi.tools import with_sitl
from pymavlink import mavutil
import time
import sys
import os
from nose.tools import assert_equals
@with_sitl
def test_110(connpath):
v = connect(connpath, await_params=True)
# NOTE these are *very inapprop... | {
"repo_name": "trishhyles/dronekit-python",
"path": "tests/sitl/test_110.py",
"copies": "2",
"size": "2283",
"license": "apache-2.0",
"hash": 4262724246981703700,
"line_mean": 33.5909090909,
"line_max": 105,
"alpha_frac": 0.7047744196,
"autogenerated": false,
"ratio": 3.676328502415459,
"config... |
from droneapi import local_connect
def demo(local_connect):
# This example shows how to use DroneKit-Python to get and set vehicle state, parameter and channel-override information.
# It also demonstrates how to observe vehicle attribute (state) changes.
#
# Usage:
# * mavproxy.py
# * module... | {
"repo_name": "duststorm/dronekit-python",
"path": "droneapi/__main__.py",
"copies": "2",
"size": "3798",
"license": "apache-2.0",
"hash": -697324514822898200,
"line_mean": 34.8301886792,
"line_max": 129,
"alpha_frac": 0.6529752501,
"autogenerated": false,
"ratio": 3.5796418473138547,
"config_t... |
from droneapi.lib import VehicleMode
from pymavlink import mavutil
import time
import sys
import os
from testlib import assert_equals
def test_110(local_connect):
api = local_connect()
v = api.get_vehicles()[0]
# Change the vehicle into STABILIZE mode
v.mode = VehicleMode("STABILIZE")
# NOTE ... | {
"repo_name": "MaxQu/dronekit-python",
"path": "tests/sitl/test_110.py",
"copies": "2",
"size": "1914",
"license": "apache-2.0",
"hash": -4932687112783272000,
"line_mean": 33.1785714286,
"line_max": 105,
"alpha_frac": 0.7037617555,
"autogenerated": false,
"ratio": 3.7529411764705882,
"config_te... |
from droneapi.lib import VehicleMode
from pymavlink import mavutil
import time
import sys
import os
from testlib import assert_equals
def test_115(local_connect):
api = local_connect()
v = api.get_vehicles()[0]
# Dummy callback
def mavlink_callback(*args):
mavlink_callback.count += 1
mavli... | {
"repo_name": "MaxQu/dronekit-python",
"path": "tests/sitl/test_115.py",
"copies": "2",
"size": "1137",
"license": "apache-2.0",
"hash": -483377879493459800,
"line_mean": 24.2666666667,
"line_max": 56,
"alpha_frac": 0.6842568162,
"autogenerated": false,
"ratio": 3.644230769230769,
"config_test"... |
from droneapi.lib import VehicleMode
from pymavlink import mavutil
import time
# First get an instance of the API endpoint
api = local_connect()
# Get the connected vehicle (currently only one vehicle can be returned).
vehicle = api.get_vehicles()[0]
# Get all vehicle attributes (state)
print "\nGet all vehicle attri... | {
"repo_name": "TeamMacLean/Swoop",
"path": "controller/get_state.py",
"copies": "2",
"size": "3938",
"license": "mit",
"hash": 5088043301077947000,
"line_mean": 33.5438596491,
"line_max": 122,
"alpha_frac": 0.7475876079,
"autogenerated": false,
"ratio": 3.535008976660682,
"config_test": false,
... |
from droned.entity import Entity
from droned.models.event import Event
import config
class Scab(Entity):
"""Track Processes that Don't have an AppManager"""
localInstall = property(lambda s: bool(s.server.hostname == config.HOSTNAME))
pid = property(lambda s: s.running and s.process.pid or 0)
inode = p... | {
"repo_name": "OrbitzWorldwide/droned",
"path": "droned/lib/droned/models/scab.py",
"copies": "1",
"size": "2364",
"license": "apache-2.0",
"hash": 108715474606521150,
"line_mean": 40.4736842105,
"line_max": 89,
"alpha_frac": 0.6353637902,
"autogenerated": false,
"ratio": 3.973109243697479,
"co... |
from drone import drone
import datetime
import os
class Fleet():
# [droneObj, port, logfile]
drone_list = []
def __init__(self, com_list):
for string in com_list:
self.drone_list.append([None, string, None])
def request(self, lat, lon): #returns id or -1
"""
Reque... | {
"repo_name": "TheoRiv/amf",
"path": "server/fleet.py",
"copies": "1",
"size": "3120",
"license": "mit",
"hash": -3494150642290532000,
"line_mean": 34.8620689655,
"line_max": 118,
"alpha_frac": 0.5314102564,
"autogenerated": false,
"ratio": 3.347639484978541,
"config_test": false,
"has_no_key... |
from .drone import drone
import libcontext
from libcontext.socketclasses import *
from libcontext.pluginclasses import *
from .event import event as eventclass
import sys
import operator
python2 = (sys.version_info[0] == 2)
modes = ("all", "match", "leader", "match_leader", "head", "match_head", "trigger")
def fun... | {
"repo_name": "agoose77/hivesystem",
"path": "bee/eventhandler.py",
"copies": "1",
"size": "5764",
"license": "bsd-2-clause",
"hash": -1261033499593440000,
"line_mean": 32.3179190751,
"line_max": 108,
"alpha_frac": 0.577203331,
"autogenerated": false,
"ratio": 4.008344923504868,
"config_test": ... |
from drone import plugin
import subprocess
import sys
class DroneTower(object):
def __init__(self):
args = plugin.get_input()
try:
self.cwd = args['workspace']['path']
except KeyError:
self.cwd = None
self.vargs = args['vargs']
def run(self):
i... | {
"repo_name": "msteinert/drone-tower",
"path": "drone_tower/drone_tower.py",
"copies": "1",
"size": "1210",
"license": "apache-2.0",
"hash": 8415081473868019000,
"line_mean": 29.25,
"line_max": 69,
"alpha_frac": 0.5578512397,
"autogenerated": false,
"ratio": 4.046822742474917,
"config_test": fa... |
from dronekit import connect, LocationGlobalRelative
from dronekit.lib import VehicleMode
from pymavlink import mavutil
import time
import ConfigParser
from module.init_position import InitPosition
__author__ = 'francoischevalier'
class EladeVehicle(object):
vehicle = None
master = ''
baudrate = 57600
... | {
"repo_name": "Sojjocola/EladeControlServer",
"path": "module/elade_vehicle.py",
"copies": "1",
"size": "9999",
"license": "mit",
"hash": -5832996766593120000,
"line_mean": 38.3661417323,
"line_max": 117,
"alpha_frac": 0.5570557056,
"autogenerated": false,
"ratio": 4.099630996309963,
"config_te... |
from dronekit import connect
import time
import argparse
import pprint
import rospy
import copy
from gf_beacon.srv import *
import hostapd
import beaconencoder
import findap
class sample_beacon_data:
def __init__(self, connect_string):
print "init"
self.missing_AP = False
try:
... | {
"repo_name": "geofrenzy/utm-mbsb",
"path": "beacon/dkbeacon.py",
"copies": "1",
"size": "5335",
"license": "apache-2.0",
"hash": 66858768967867100,
"line_mean": 41.3412698413,
"line_max": 126,
"alpha_frac": 0.5576382381,
"autogenerated": false,
"ratio": 3.7623413258110014,
"config_test": false... |
from dronekit import connect, VehicleMode, LocationGlobal, LocationGlobalRelative, CommandSequence
from pymavlink import mavutil # Needed for command message definitions
import time
import math
#Set up option parsing to get connection string
import argparse
parser = argparse.ArgumentParser(description='Control Copter... | {
"repo_name": "sassystacks/DASS",
"path": "arducopter_group/simple_takeoff.py",
"copies": "1",
"size": "3884",
"license": "mit",
"hash": -5347773337521145000,
"line_mean": 29.8253968254,
"line_max": 108,
"alpha_frac": 0.6853759011,
"autogenerated": false,
"ratio": 3.606313834726091,
"config_tes... |
from dronekit import connect, VehicleMode, LocationGlobal, LocationGlobalRelative
from pymavlink import mavutil # Needed for command message definitions
from Find_serial_ports import serial_ports
import time
import math
com_names=serial_ports()
for name in com_names:
import argparse
try:
parser = argp... | {
"repo_name": "sassystacks/DASS",
"path": "arducopter_group/Folder_for_each/Shark/TryConnectVehicle.py",
"copies": "1",
"size": "2803",
"license": "mit",
"hash": 2878695140015215600,
"line_mean": 30.1444444444,
"line_max": 108,
"alpha_frac": 0.6646450232,
"autogenerated": false,
"ratio": 3.702774... |
from dronekit import connect, VehicleMode, LocationGlobal, LocationGlobalRelative
from pymavlink import mavutil # Needed for command message definitions
from Find_serial_ports import serial_ports
from Sim_sensor_Down import Sim_engage_target_Down
import time
import math
time_sleep = input("enter time sleep: ")
... | {
"repo_name": "sassystacks/DASS",
"path": "Drone_Flight/Takeoff_genInput_Land.py",
"copies": "1",
"size": "4660",
"license": "mit",
"hash": 8445047228707013000,
"line_mean": 33.572519084,
"line_max": 108,
"alpha_frac": 0.6525751073,
"autogenerated": false,
"ratio": 3.3965014577259476,
"config_t... |
from dronekit import connect, VehicleMode, LocationGlobal, LocationGlobalRelative
from pymavlink import mavutil # Needed for command message definitions
from Find_serial_ports import serial_ports
import logging
import time
import math
logging.basicConfig(filename='Takeoff_log.log', format = '%(levelname)s:%(asc... | {
"repo_name": "sassystacks/DASS",
"path": "Simulation/Takeoff_Land.py",
"copies": "1",
"size": "3218",
"license": "mit",
"hash": -8786732170874223000,
"line_mean": 32.9782608696,
"line_max": 118,
"alpha_frac": 0.6811684276,
"autogenerated": false,
"ratio": 3.7725674091441967,
"config_test": fal... |
from dronekit import connect, VehicleMode, LocationGlobal, LocationGlobalRelative
from pymavlink import mavutil # Needed for command message definitions
import logging
import time
import math
logging.basicConfig(filename='Pitch_log.log', format = '%(levelname)s:%(asctime)s: %(message)s', level=logging.INFO)
i... | {
"repo_name": "sassystacks/DASS",
"path": "Drone_Flight/test_ned_pitch.py",
"copies": "1",
"size": "3723",
"license": "mit",
"hash": 2922098894890574300,
"line_mean": 31.5405405405,
"line_max": 116,
"alpha_frac": 0.6642492613,
"autogenerated": false,
"ratio": 3.479439252336449,
"config_test": f... |
from dronekit import Vehicle
"""
# Classe de configuration, utilise le protocole MavLink
# Voir les parametres configurables : "http://mavlink.org/messages/common#PARAM_SET" et
# "http://python.dronekit.io/guide/copter/guided_mode.html#guided-mode-how-to-send-commands"
"""
class MavConfig:
droneSolo = 0
def __ini... | {
"repo_name": "Escadrone/Solo-Mapper",
"path": "MavlinkConfig.py",
"copies": "1",
"size": "1636",
"license": "apache-2.0",
"hash": -2218753405983761000,
"line_mean": 17.1777777778,
"line_max": 92,
"alpha_frac": 0.6931540342,
"autogenerated": false,
"ratio": 2.7823129251700682,
"config_test": fa... |
from dronekit_sitl import SITL
import dronekit
import time
from dronekit_sitl import version_list
from dronekit_sitl import download
import sys
copter_args = ['-S', '--model', 'quad', '--home=-35.363261,149.165230,584,353']
sitl = SITL()
sitl.launch(copter_args, await_ready=True, use_saved_data=True)
vehicle = dronek... | {
"repo_name": "TheIoTLearningInitiative/CodeLabs",
"path": "Gods/Bitol/DroneSolution/Autopilot/SoftwareInTheLoop/DroneKitSitl/DroneKitSitlAdvanced.py",
"copies": "1",
"size": "1330",
"license": "apache-2.0",
"hash": -2425661067141737500,
"line_mean": 20.8032786885,
"line_max": 79,
"alpha_frac": 0.730... |
from drone_tower import DroneTower, TowerCliError
import io
import os
import sys
import unittest
def skipEnv(*args):
missing = []
for arg in args:
try:
os.environ[arg]
except:
missing.append(arg)
if missing:
return unittest.skip(
"environment var... | {
"repo_name": "msteinert/drone-tower",
"path": "tests/test.py",
"copies": "1",
"size": "2592",
"license": "apache-2.0",
"hash": -6319197777868455000,
"line_mean": 21.5391304348,
"line_max": 68,
"alpha_frac": 0.4552469136,
"autogenerated": false,
"ratio": 3.909502262443439,
"config_test": true,
... |
from drongo import Drongo
import json
import os
from .configure import configure, ASSETS_DIR
from .services import LayerService
app = Drongo()
configure(app)
@app.url('/')
def screen(ctx):
return ctx.modules.jinja2.get_template('screen.html').render(ctx)
@app.url('/remote/')
def remote(ctx):
return ctx.mo... | {
"repo_name": "bpsagar/oversee",
"path": "oversee/app.py",
"copies": "1",
"size": "2688",
"license": "mit",
"hash": 4131092160444751000,
"line_mean": 25.3529411765,
"line_max": 70,
"alpha_frac": 0.6294642857,
"autogenerated": false,
"ratio": 3.343283582089552,
"config_test": false,
"has_no_ke... |
from drongo.utils import dict2
import unittest
class TestDict2(unittest.TestCase):
def test_get_set(self):
d = dict2()
d.a = 100
self.assertEqual(d.a, 100)
d.b.a = 100
self.assertEqual(d.b.a, 100)
def test_conversion(self):
a = {'a': ['b', 10, 20]}
b =... | {
"repo_name": "drongo-framework/drongo",
"path": "tests/test_dict2.py",
"copies": "1",
"size": "1510",
"license": "mit",
"hash": 4207188847971419600,
"line_mean": 25.4912280702,
"line_max": 54,
"alpha_frac": 0.5052980132,
"autogenerated": false,
"ratio": 3.1656184486373165,
"config_test": true,... |
from dropbeat.auth import auth_required
from dropbeat.constants import ErrorCode
from dropbeat.exceptions import (
UserException, TrackException, PlaylistException, DropbeatException)
from dropbeat.models import User, Track, Playlist
from dropbeat.youtube import youtube_search, Youtube
from dropbeat.utils import Fi... | {
"repo_name": "daftshady/dropbeat",
"path": "api/views_v1.py",
"copies": "1",
"size": "7651",
"license": "mit",
"hash": -1312889276529013800,
"line_mean": 31.5574468085,
"line_max": 78,
"alpha_frac": 0.601751405,
"autogenerated": false,
"ratio": 3.958096223486808,
"config_test": false,
"has_n... |
from dropbox.client import DropboxClient
import os
class DropboxSyncClient:
def __init__(self, oauth2_access_token):
self.access_token = oauth2_access_token
self._client = DropboxClient(oauth2_access_token)
def upload_file(self, dropbox_file_path, local_file_path, replace=False):
f = ... | {
"repo_name": "allmyspace/allmyspace-client",
"path": "space_providers/Dropbox/DropboxSyncClient.py",
"copies": "1",
"size": "1750",
"license": "mit",
"hash": -2251284345640677400,
"line_mean": 37.0434782609,
"line_max": 94,
"alpha_frac": 0.6377142857,
"autogenerated": false,
"ratio": 3.623188405... |
from dropbox.client import DropboxOAuth2Flow
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect, HttpResponse
from django.views.generic import View
from .utils import get_dropbox_auth_flow, DROPBOX_CSRF_TOKEN
DROPBOX_ACCESS_TOKEN = 'dropbox_access_token'
class DropboxAuthInit... | {
"repo_name": "qedsoftware/commcare-hq",
"path": "corehq/apps/dropbox/views.py",
"copies": "1",
"size": "1797",
"license": "bsd-3-clause",
"hash": -2434191184868716500,
"line_mean": 40.7906976744,
"line_max": 109,
"alpha_frac": 0.6956037841,
"autogenerated": false,
"ratio": 4.169373549883991,
"... |
from dropbox.client import DropboxOAuth2FlowNoRedirect
from dropbox import client
import dropbox
from docx import Document
from PIL import Image
from watson_developer_cloud import VisualRecognitionV3 as vr
#Authorize dropbox connection
app_key = raw_input("Enter app key: ")
app_secret = raw_input("Enter secre... | {
"repo_name": "jkancher/Image-Analysis",
"path": "analysis.py",
"copies": "1",
"size": "2632",
"license": "apache-2.0",
"hash": -3560147448374042000,
"line_mean": 28.6046511628,
"line_max": 112,
"alpha_frac": 0.6781914894,
"autogenerated": false,
"ratio": 3.1903030303030304,
"config_test": fals... |
from dropbox.dropbox import Dropbox
from dropbox.exceptions import DropboxException
from website.util import api_url_for
from addons.base.serializer import StorageAddonSerializer
class DropboxSerializer(StorageAddonSerializer):
addon_short_name = 'dropbox'
def credentials_are_valid(self, user_settings, clie... | {
"repo_name": "saradbowman/osf.io",
"path": "addons/dropbox/serializer.py",
"copies": "28",
"size": "1429",
"license": "apache-2.0",
"hash": 4133772675750502000,
"line_mean": 34.725,
"line_max": 84,
"alpha_frac": 0.6046186144,
"autogenerated": false,
"ratio": 4.178362573099415,
"config_test": f... |
from dropbox import Dropbox
from dropbox.files import FileMetadata, FolderMetadata
from rq import get_current_job
from rq.job import Job, NoSuchJobError
def human_readable(bytes):
if bytes < 1024:
return "%.0f Bytes" % bytes
elif bytes < 1048576:
return "%.2f KB" % (bytes / 1024)
elif bytes... | {
"repo_name": "kevincon/utilityknife",
"path": "util.py",
"copies": "1",
"size": "2548",
"license": "mit",
"hash": 7611368069238250000,
"line_mean": 37.0298507463,
"line_max": 109,
"alpha_frac": 0.6565934066,
"autogenerated": false,
"ratio": 3.603960396039604,
"config_test": false,
"has_no_ke... |
from dropbox import Dropbox
from dropbox import DropboxOAuth2Flow
from dropbox.oauth import NotApprovedException, ProviderException, CsrfException, BadStateException, BadRequestException
from flask import Flask, render_template, session, redirect, abort, url_for, request, jsonify
from rq import Queue
from secrets impor... | {
"repo_name": "kevincon/utilityknife",
"path": "app.py",
"copies": "1",
"size": "3969",
"license": "mit",
"hash": -5429015852565207000,
"line_mean": 32.075,
"line_max": 126,
"alpha_frac": 0.6807760141,
"autogenerated": false,
"ratio": 3.7764034253092293,
"config_test": false,
"has_no_keywords... |
from dropbox import session, client
from DTL.api import Path, apiUtils, loggingUtils
class Dropbox(object):
__metaclass__ = loggingUtils.LoggingMetaclass
def __init__(self, appKey, appSecret, appAccessType):
apiUtils.synthesize(self, "appKey", appKey)
apiUtils.synthesize(self, "appSecret"... | {
"repo_name": "rocktavious/DevToolsLib",
"path": "DTL/dropbox/core.py",
"copies": "1",
"size": "2593",
"license": "mit",
"hash": -8159286394384657000,
"line_mean": 34.5342465753,
"line_max": 94,
"alpha_frac": 0.6054762823,
"autogenerated": false,
"ratio": 3.7909356725146197,
"config_test": fals... |
from dropbox.rest import ErrorResponse
from dropbox.client import DropboxClient
from website.util import api_url_for
from addons.base.serializer import StorageAddonSerializer
class DropboxSerializer(StorageAddonSerializer):
addon_short_name = 'dropbox'
def credentials_are_valid(self, user_settings, client)... | {
"repo_name": "alexschiller/osf.io",
"path": "addons/dropbox/serializer.py",
"copies": "4",
"size": "1424",
"license": "apache-2.0",
"hash": 1914284156107038000,
"line_mean": 33.7317073171,
"line_max": 90,
"alpha_frac": 0.6025280899,
"autogenerated": false,
"ratio": 4.188235294117647,
"config_t... |
from dropbox.rest import ErrorResponse
from dropbox.client import DropboxClient
from website.util import api_url_for
from website.addons.base.serializer import StorageAddonSerializer
class DropboxSerializer(StorageAddonSerializer):
addon_short_name = 'dropbox'
def credentials_are_valid(self, user_settings,... | {
"repo_name": "amyshi188/osf.io",
"path": "website/addons/dropbox/serializer.py",
"copies": "27",
"size": "1432",
"license": "apache-2.0",
"hash": -8677636346014664000,
"line_mean": 33.9268292683,
"line_max": 90,
"alpha_frac": 0.6040502793,
"autogenerated": false,
"ratio": 4.187134502923977,
"c... |
from dropbox.rest import ErrorResponse
__author__ = 'gipmon'
import paramiko
import json
import os
import time
import zipfile
import shutil
import dropbox
#Loading the configuration file, it has the access_token, user_id and others configs
config_file = open("config/config.json", "r")
config_file = json.load(config_f... | {
"repo_name": "gipmon/python-ssh-mysqldump-dropbox",
"path": "dump_bot.py",
"copies": "1",
"size": "3301",
"license": "apache-2.0",
"hash": -7292808384859349000,
"line_mean": 29.8598130841,
"line_max": 136,
"alpha_frac": 0.6631323841,
"autogenerated": false,
"ratio": 3.3142570281124497,
"config... |
from droptopus import config
from PyQt5.QtCore import QCoreApplication, QSettings
QCoreApplication.setOrganizationName(config.ORG_NAME)
QCoreApplication.setOrganizationDomain(config.ORG_DOMAIN)
QCoreApplication.setApplicationName(config.APP_NAME)
settings = QSettings()
def writeItems(items):
s = settings
s.... | {
"repo_name": "ArtBIT/Droptopus",
"path": "droptopus/settings.py",
"copies": "1",
"size": "1720",
"license": "mit",
"hash": 4877082660655201000,
"line_mean": 22.2432432432,
"line_max": 57,
"alpha_frac": 0.5761627907,
"autogenerated": false,
"ratio": 3.739130434782609,
"config_test": false,
"h... |
from drunken_boat.db.postgresql.projections import DataBaseObject
from drunken_boat.db.postgresql.fields import Field
from drunken_boat.db.postgresql.query import Where
class ModelObject(DataBaseObject):
def __init__(self, projection, **kwargs):
self.projection = projection
self.pk_column = proje... | {
"repo_name": "boblefrag/drunken_boat",
"path": "drunken_boat/db/postgresql/models.py",
"copies": "1",
"size": "3343",
"license": "bsd-3-clause",
"hash": -4410275518605733400,
"line_mean": 34.1894736842,
"line_max": 77,
"alpha_frac": 0.5659587197,
"autogenerated": false,
"ratio": 4.34720416124837... |
from drunken_boat.db.postgresql.query import Where
class Field(object):
virtual = False
def __init__(self, db_name=None, table=None, *args, **kwargs):
self.db_name = db_name
self.table = table
if kwargs.get("virtual"):
self.virtual = kwargs["virtual"]
def hydrate(self... | {
"repo_name": "boblefrag/drunken_boat",
"path": "drunken_boat/db/postgresql/fields.py",
"copies": "1",
"size": "3466",
"license": "bsd-3-clause",
"hash": -207802853660653820,
"line_mean": 27.1788617886,
"line_max": 73,
"alpha_frac": 0.5807847663,
"autogenerated": false,
"ratio": 4.12128418549346,... |
from dryorm import Model
from datetime import datetime
class PsqlSources(Model):
table = "sources"
fields = ['id','path','ctl_field','auto_source','nrows','min','max','instance_id','transform_script'
,'load_script','extract_script','ddl']
def delete(self):
query = """Delete from {} where id = %s""".format(self... | {
"repo_name": "jAlpedrinha/dryorm",
"path": "sample/psql/models.py",
"copies": "1",
"size": "4577",
"license": "bsd-3-clause",
"hash": -8945551350006148000,
"line_mean": 25.0056818182,
"line_max": 136,
"alpha_frac": 0.6569805549,
"autogenerated": false,
"ratio": 2.9078780177890726,
"config_test... |
from dryorm import Model
from datetime import datetime
class SqliteSources(Model):
table = "sources"
fields = ['id','path','ctl_field','auto_source','nrows','min','max','instance_id','transform_script'
,'load_script','extract_script','ddl']
def delete(self):
raise NotImplementedError()
def update_source(se... | {
"repo_name": "jAlpedrinha/dryorm",
"path": "sample/sqlite/models.py",
"copies": "1",
"size": "2713",
"license": "bsd-3-clause",
"hash": 5093527885730737000,
"line_mean": 24.3551401869,
"line_max": 101,
"alpha_frac": 0.6439366015,
"autogenerated": false,
"ratio": 2.929805615550756,
"config_test... |
from dry_rest_permissions.generics import DRYPermissionFiltersBase
from django.db.models import Q
from apps.registration.models import Assignment
from .models import Appearance
from .models import Round
class AppearanceFilterBackend(DRYPermissionFiltersBase):
def filter_list_queryset(self, request, queryset, vi... | {
"repo_name": "dbinetti/barberscore",
"path": "project/apps/adjudication/filterbackends.py",
"copies": "3",
"size": "3981",
"license": "bsd-2-clause",
"hash": 7809511056414292000,
"line_mean": 36.9238095238,
"line_max": 112,
"alpha_frac": 0.5923134891,
"autogenerated": false,
"ratio": 4.549714285... |
from dry_rest_permissions.generics import DRYPermissionsField
from rest_framework import serializers
from account.serializers import UserInfoSerializer
from know_me.journal import models
class EntryCommentSerializer(serializers.HyperlinkedModelSerializer):
"""
Serializer for comments on journal entries.
... | {
"repo_name": "knowmetools/km-api",
"path": "km_api/know_me/journal/serializers.py",
"copies": "1",
"size": "1859",
"license": "apache-2.0",
"hash": 8116222228138425000,
"line_mean": 24.4657534247,
"line_max": 69,
"alpha_frac": 0.6143087682,
"autogenerated": false,
"ratio": 4.46875,
"config_tes... |
from dryscrape.driver.webkit import Driver as DefaultDriver
from itertools import chain
try:
import urlparse
except ImportError:
import urllib
urlparse = urllib.parse
class Session(object):
""" A web scraping session based on a driver instance. Implements the proxy
pattern to pass unresolved method calls to... | {
"repo_name": "niklasb/dryscrape",
"path": "dryscrape/session.py",
"copies": "1",
"size": "1886",
"license": "mit",
"hash": -1639484683934635000,
"line_mean": 33.9259259259,
"line_max": 84,
"alpha_frac": 0.6914103924,
"autogenerated": false,
"ratio": 4.064655172413793,
"config_test": false,
"... |
from dryscrape.driver.webkit import Driver as DefaultDriver
try:
import urlparse
except ImportError:
import urllib
urlparse = urllib.parse
class Session(object):
""" A web scraping session based on a driver instance. Implements the proxy
pattern to pass unresolved method calls to the underlying driver.
If... | {
"repo_name": "trendsetter37/dryscrape",
"path": "dryscrape/session.py",
"copies": "3",
"size": "1679",
"license": "mit",
"hash": -7407851931466681000,
"line_mean": 34.7234042553,
"line_max": 84,
"alpha_frac": 0.6962477665,
"autogenerated": false,
"ratio": 4.135467980295567,
"config_test": fals... |
from ds3 import ds3
import os
import time
client = ds3.createClientFromEnv()
bucketName = "books"
# make sure the bucket that we will be sending objects to exists
client.putBucket(bucketName)
# create your list of objects that will be sent to DS3
# this example assumes that these files exist on the file system
fil... | {
"repo_name": "chanchett/ds3_python_sdk",
"path": "samples/puttingData.py",
"copies": "1",
"size": "2500",
"license": "apache-2.0",
"hash": 4710171250716902000,
"line_mean": 33.7222222222,
"line_max": 100,
"alpha_frac": 0.7176,
"autogenerated": false,
"ratio": 3.7147102526002973,
"config_test":... |
from ..ds9_region_parser import RegionParser, Global
from ..parser_helper import CoordCommand, Shape
from ..region_numbers import SimpleNumber, AngularDistance
def test_regionLine():
test_string_1 = [
"circle(109,253,28.950304) # comment 1",
"polygon(257,290,300.78944,271.78944,300.78944,178.21056... | {
"repo_name": "keflavich/pyregion",
"path": "pyregion/tests/test_ds9_region_parser.py",
"copies": "1",
"size": "1759",
"license": "mit",
"hash": -3907238131288636000,
"line_mean": 24.8676470588,
"line_max": 123,
"alpha_frac": 0.6162592382,
"autogenerated": false,
"ratio": 3.0171526586620927,
"c... |
from dsatur import solve_dsatur
from collections import defaultdict
import random
class ReorderableNode(object):
def __init__(self, orginal_index = -1):
self.original_index = orginal_index
self.edges = set()
def get_degree(self):
return len(self.edges)
class ReorderableGraph(object):
... | {
"repo_name": "chriselion/discreteopt",
"path": "coloring/iter_greedy.py",
"copies": "1",
"size": "2583",
"license": "mit",
"hash": -690525142973518300,
"line_mean": 30.8888888889,
"line_max": 81,
"alpha_frac": 0.6004645761,
"autogenerated": false,
"ratio": 3.519073569482289,
"config_test": fal... |
from dscensor import app, request
from flask import jsonify
base = app.config['API_PATH']
logger = app.logger
panparser = app.panparser
main_panset = app.main_panset
@app.route(base + '/pansets', methods=['GET'])
def all_pansets():
'''Get Pan-Genome Datasets'''
if request.method == 'GET':
return json... | {
"repo_name": "ncgr/DSCensor",
"path": "dscensor/server/api/pangenes.py",
"copies": "1",
"size": "2597",
"license": "mit",
"hash": -4454527910200771000,
"line_mean": 50.94,
"line_max": 118,
"alpha_frac": 0.5252214093,
"autogenerated": false,
"ratio": 4.364705882352941,
"config_test": false,
"... |
from dsert import assert_valid_dict
from unittest import TestCase
class BasicTestCase(TestCase):
def setUp(self):
self.basic_dict = {'foo': 'bar'}
class TestKnownContents(BasicTestCase):
def test_correct_values_should_not_raise_an_error(self):
assert_valid_dict(to_validate=self.basic_dict,... | {
"repo_name": "paxos-bankchain/dsert",
"path": "tests_dsert.py",
"copies": "1",
"size": "5785",
"license": "mit",
"hash": 7953727644906295000,
"line_mean": 32.6337209302,
"line_max": 94,
"alpha_frac": 0.5949870354,
"autogenerated": false,
"ratio": 3.916723087339201,
"config_test": true,
"has_... |
from dset.dataset import SequenceDataset
import urllib
import tarfile
import os
import sys
if sys.version_info[0] >= 3:
from urllib.request import urlretrieve
else:
from urllib import urlretrieve
class HPatches_Dataset(SequenceDataset):
def __init__(self,root_dir = './datasets/', download_flag = False):... | {
"repo_name": "lenck/vlb",
"path": "python/dset/hpatches_dataset.py",
"copies": "1",
"size": "1599",
"license": "bsd-2-clause",
"hash": -7577827444407022000,
"line_mean": 31.6326530612,
"line_max": 116,
"alpha_frac": 0.588492808,
"autogenerated": false,
"ratio": 3.701388888888889,
"config_test"... |
from dsets import DisjointSets
class AgCluster :
def agcluster (self, geomatrix, words):
disjointSet = DisjointSets.disjointSet
for i in range(len(words)):
DisjointSets.setCreate(DisjointSets.mro(), words[i])
while len(disjointSet)>20:
N = len(geomatrix[0])
... | {
"repo_name": "nowismytime/laughing-waffle",
"path": "clusterize.py",
"copies": "1",
"size": "1321",
"license": "epl-1.0",
"hash": 9204371899888182000,
"line_mean": 32.8717948718,
"line_max": 118,
"alpha_frac": 0.4700984103,
"autogenerated": false,
"ratio": 4.064615384615385,
"config_test": fal... |
from ..ds import DJset
from ..sorts import merge_sort
def edge_comp(edge1, edge2):
return edge1.weight < edge2.weight
def kruskal(vertices, weighted_edges, visual = False):
"""
Finds the minimum spanning tree (MST) of a given graph
Args:
vertices: The number of vertices (should be numbered 0 to n - 1 / 1 to n)... | {
"repo_name": "aryrobocode/apothecary",
"path": "apothecary/cs/graphs/kruskal.py",
"copies": "1",
"size": "1366",
"license": "mit",
"hash": 758995599263068400,
"line_mean": 26.8979591837,
"line_max": 100,
"alpha_frac": 0.6786237189,
"autogenerated": false,
"ratio": 2.9063829787234043,
"config_t... |
from ds import *
import Queue
import time
class Solver(object):
def __init__(self):
self.reset()
def reset(self):
self.hostToVms = {}
self.switchToFlows = {}
def solve(self, tree):
raise NotImplementedError
@classmethod
def dist(cls, node1, node2):
'''
... | {
"repo_name": "Happyholic1203/VNF-Deployment",
"path": "lib/solver.py",
"copies": "1",
"size": "9727",
"license": "mit",
"hash": -4090339161254977000,
"line_mean": 31.3156146179,
"line_max": 94,
"alpha_frac": 0.541893698,
"autogenerated": false,
"ratio": 4.092132940681531,
"config_test": false,... |
from dsltools import NestedBlocks
from .. import names, syntax
from ..ndtypes import NoneType
from ..syntax import TypedFn
from ..builder import Builder
def fresh_builder(fn):
blocks = NestedBlocks()
blocks.push(fn.body)
return Builder(type_env = fn.type_env, blocks = blocks)
def build_fn(input_types,
... | {
"repo_name": "pombredanne/parakeet",
"path": "parakeet/builder/build_fn.py",
"copies": "2",
"size": "1980",
"license": "bsd-3-clause",
"hash": 4982939971613969000,
"line_mean": 27.2857142857,
"line_max": 89,
"alpha_frac": 0.6176767677,
"autogenerated": false,
"ratio": 2.9774436090225564,
"conf... |
from dsltools import NestedBlocks
from .. import syntax, names
from ..ndtypes import (make_tuple_type,
Int32, Int64, SliceT, TupleT, ScalarT, StructT, NoneT,
ArrayT, FnT, ClosureT, NoneType)
from ..syntax import (Assign, Return, If,
ArrayView,... | {
"repo_name": "pombredanne/parakeet",
"path": "parakeet/builder/core_builder.py",
"copies": "2",
"size": "9649",
"license": "bsd-3-clause",
"hash": -4545608876222841300,
"line_mean": 28.4207317073,
"line_max": 88,
"alpha_frac": 0.5900093274,
"autogenerated": false,
"ratio": 3.324948311509304,
"... |
from dsltools import Node
from expr import Expr
class Adverb(Expr, Node):
_members = ['fn', 'output', 'type', 'source_info']
def node_init(self):
assert self.fn, "Can't construct adverb %s without a function argument" % self
def functions(self):
yield self.fn
class Accumulative(Exp... | {
"repo_name": "pombredanne/parakeet",
"path": "parakeet/syntax/adverbs.py",
"copies": "2",
"size": "4679",
"license": "bsd-3-clause",
"hash": 4996538881130249000,
"line_mean": 21.6086956522,
"line_max": 96,
"alpha_frac": 0.5723445181,
"autogenerated": false,
"ratio": 3.1938566552901024,
"config... |
from dsltools import Node
from .. ndtypes import Float32, Float64, Int32, Int64
from .. syntax import Var, Range, ConstArray, ConstArrayLike, IndexMap
from collect_vars import collect_var_names
from syntax_visitor import SyntaxVisitor
class AbstractValue(Node):
_members = []
class ConstValue(AbstractValue):
... | {
"repo_name": "pombredanne/parakeet",
"path": "parakeet/analysis/index_elim_analysis.py",
"copies": "2",
"size": "2492",
"license": "bsd-3-clause",
"hash": 2928476354190184400,
"line_mean": 29.4024390244,
"line_max": 95,
"alpha_frac": 0.6320224719,
"autogenerated": false,
"ratio": 3.5448079658605... |
from dsltools import Node
from .. ndtypes import NoneT
class Expr(object):
# _members = ['type', 'source_info']
def __str__(self):
fields = ["%s = %s" % (k,v) for (k,v) in self.__dict__.iteritems()]
return "%s(%s)" % (self.__class__.__name__, ", ".join(fields))
def __repr__(self):
return str(... | {
"repo_name": "pombredanne/parakeet",
"path": "parakeet/syntax/expr.py",
"copies": "2",
"size": "7899",
"license": "bsd-3-clause",
"hash": -6495711978886297000,
"line_mean": 23.684375,
"line_max": 85,
"alpha_frac": 0.5783010508,
"autogenerated": false,
"ratio": 3.3301011804384486,
"config_test"... |
from dsltools import ScopedDict
from .. import prims
from ..ndtypes import NoneT, NoneType, get_rank
from ..syntax import Var, Const, PrimCall, Tuple, Slice, TupleProj, Attribute, Shape
import numpy as np
from ..syntax.helpers import unwrap_constant
from syntax_visitor import SyntaxVisitor
class AbstractV... | {
"repo_name": "pombredanne/parakeet",
"path": "parakeet/analysis/value_range_analysis.py",
"copies": "2",
"size": "11649",
"license": "bsd-3-clause",
"hash": -3326996238620096500,
"line_mean": 26.4117647059,
"line_max": 98,
"alpha_frac": 0.6122413941,
"autogenerated": false,
"ratio": 3.4372971377... |
from dsltools import Traversal
from ..syntax import const
from ..ndtypes import ArrayT, ClosureT, ScalarT, TupleT
from shape import Closure, Scalar, Var, AnyScalar, any_scalar, computable_dim
class ArgConverter(Traversal):
def __init__(self, codegen):
self.codegen = codegen
self.var_counter = 0
self... | {
"repo_name": "pombredanne/parakeet",
"path": "parakeet/shape_inference/shape_codegen.py",
"copies": "2",
"size": "3213",
"license": "bsd-3-clause",
"hash": 7977084595108922000,
"line_mean": 27.1842105263,
"line_max": 78,
"alpha_frac": 0.6560846561,
"autogenerated": false,
"ratio": 3.206586826347... |
from dsltools import Traversal
import types
import numpy as np
def transform_value(x):
"""
Replace arrays with their shapes,
and recursively replace any instances of arrays
in data structures like tuples also with their shapes
"""
if isinstance(x, np.ndarray):
return x.shape
elif isinstance(x, ... | {
"repo_name": "pombredanne/parakeet",
"path": "parakeet/shape_inference/shape_eval.py",
"copies": "2",
"size": "2137",
"license": "bsd-3-clause",
"hash": 6596734294713513000,
"line_mean": 22.7555555556,
"line_max": 66,
"alpha_frac": 0.6457650912,
"autogenerated": false,
"ratio": 3.282642089093702... |
from dspl2.expander import Dspl2JsonLdExpander, Dspl2RdfExpander
from dspl2.rdfutil import SCHEMA
from io import StringIO
import rdflib
import unittest
class DummyGetter(object):
def __init__(self, graph):
self.graph = graph
self.data = {}
def Set(self, filename, data):
self.data[filename] = StringIO... | {
"repo_name": "google/dspl",
"path": "tools/dspl2/dspl2/tests/test_expander.py",
"copies": "1",
"size": "3572",
"license": "bsd-3-clause",
"hash": 8800234267721512000,
"line_mean": 37.8260869565,
"line_max": 107,
"alpha_frac": 0.6105823068,
"autogenerated": false,
"ratio": 3.8491379310344827,
"... |
from dss.config import config
from dss.providers import Providers
from dss.video import Video
from dss.thumbnail import Thumbnail
from dss.web import Server
from dss.tools.show import Show, show_close
from dss.tornado_setup import TornadoManager
from dss.mobile import TCPServer
from dss.web_handlers.mobile_stream impor... | {
"repo_name": "terabit-software/dynamic-stream-server",
"path": "server.py",
"copies": "2",
"size": "2024",
"license": "bsd-3-clause",
"hash": -1094168335175300000,
"line_mean": 22,
"line_max": 74,
"alpha_frac": 0.6329051383,
"autogenerated": false,
"ratio": 3.8260869565217392,
"config_test": f... |
from dstack.agent.handler import BaseHandler
from dstack.progress import Progress
class BaseComputeDriver(BaseHandler):
def _get_handler_category(self, req):
return "compute"
def instance_activate(self, req=None, instanceHostMap=None, **kw):
instance = instanceHostMap.instance
host = ... | {
"repo_name": "ibuildthecloud/dstack",
"path": "code/agent/src/agents/pyagent/dstack/compute/__init__.py",
"copies": "1",
"size": "1619",
"license": "apache-2.0",
"hash": 5158982826477549000,
"line_mean": 34.1956521739,
"line_max": 79,
"alpha_frac": 0.6244595429,
"autogenerated": false,
"ratio": ... |
from dstack.agent.handler import BaseHandler
from dstack.progress import Progress
class BaseStoragePool(BaseHandler):
def __init__(self):
super(BaseStoragePool, self).__init__()
def _get_handler_category(self, req):
return "storage"
def image_activate(self, req=None, imageStoragePoolMap... | {
"repo_name": "ibuildthecloud/dstack",
"path": "code/agent/src/agents/pyagent/dstack/storage/__init__.py",
"copies": "1",
"size": "3398",
"license": "apache-2.0",
"hash": -4487736601014166000,
"line_mean": 36.3406593407,
"line_max": 75,
"alpha_frac": 0.6085932902,
"autogenerated": false,
"ratio":... |
# from dstools.exceptions import RenderError
# from dstools.pipeline import DAG
# from dstools.pipeline.products import File, PostgresRelation
# from dstools.pipeline.tasks import PythonCallable, SQLScript, BashCommand
# from dstools.pipeline.tasks.TaskStatus import TaskStatus
# import pytest
# def test_parallel_exe... | {
"repo_name": "edublancas/python-ds-tools",
"path": "tests/pipeline/test_executor_parallel.py",
"copies": "2",
"size": "1861",
"license": "mit",
"hash": 1321995815137782300,
"line_mean": 24.4931506849,
"line_max": 75,
"alpha_frac": 0.6281569049,
"autogenerated": false,
"ratio": 3.1068447412353923... |
from dstools.util import isiterable
# FIXME: restrict for now TaskGroup treated as a single task to be a source
# node, otherwise handling the upstream logic becomes messy:
# the dag.plot function should see a single edge but in reality there should
# be many going from the upstream dependencies to each one of the tas... | {
"repo_name": "edublancas/dstools",
"path": "src/dstools/pipeline/tasks/TaskGroup.py",
"copies": "2",
"size": "3762",
"license": "mit",
"hash": 8579297856020263000,
"line_mean": 36.2475247525,
"line_max": 85,
"alpha_frac": 0.6267942584,
"autogenerated": false,
"ratio": 3.9767441860465116,
"conf... |
from dstore import MemoryStore, Model, var, mod
from unittest import TestCase
__all__ = [ "BaseTest", "Car", "AllVars" ]
class Car( Model ):
_namespace = "cars.make"
_vars = [
var.RowID,
var.String( "manufacturer", 32, mods = [ mod.NotNull() ] ),
var.String( "make", 32, mods = [ mod.N... | {
"repo_name": "MarkLark/dstore",
"path": "tests/__init__.py",
"copies": "1",
"size": "1435",
"license": "mit",
"hash": 3888849410973275600,
"line_mean": 28.2857142857,
"line_max": 89,
"alpha_frac": 0.5303135889,
"autogenerated": false,
"ratio": 3.368544600938967,
"config_test": false,
"has_no... |
from ds.vortex.core import baseNode
from ds.vortex.core import plug as plugs
class AbsoluteNode(baseNode.BaseNode):
def __init__(self, name):
"""
:param name: str, the name of the node
"""
baseNode.BaseNode.__init__(self, name)
def initialize(self):
baseNode.BaseNode.... | {
"repo_name": "dsparrow27/vortex",
"path": "src/ds/vortex/nodes/math/basic/absolute.py",
"copies": "1",
"size": "1094",
"license": "mit",
"hash": 1500488236337282300,
"line_mean": 27.7894736842,
"line_max": 85,
"alpha_frac": 0.6453382084,
"autogenerated": false,
"ratio": 3.852112676056338,
"con... |
from ds.vortex.core import baseNode
from ds.vortex.core import plug as plugs
class AddToDictNode(baseNode.BaseNode):
def __init__(self, name):
"""
:param name: str, the name of the node
"""
baseNode.BaseNode.__init__(self, name)
def initialize(self):
baseNode.BaseNode.... | {
"repo_name": "dsparrow27/vortex",
"path": "src/ds/vortex/nodes/dict/add.py",
"copies": "1",
"size": "1523",
"license": "mit",
"hash": -3004621282825144000,
"line_mean": 32.8444444444,
"line_max": 85,
"alpha_frac": 0.6520026264,
"autogenerated": false,
"ratio": 3.6610576923076925,
"config_test"... |
from ds.vortex.core import baseNode
from ds.vortex.core import plug as plugs
class ArrayAppend(baseNode.BaseNode):
"""Appends a passed object into a list
plugs:
value1: The list to append to.
value2: The object to append
output: the combined list
"""
def __init__(self, name):
... | {
"repo_name": "dsparrow27/vortex",
"path": "src/ds/vortex/nodes/array/append.py",
"copies": "1",
"size": "1507",
"license": "mit",
"hash": -8753684429095377000,
"line_mean": 31.0638297872,
"line_max": 85,
"alpha_frac": 0.6436629064,
"autogenerated": false,
"ratio": 3.7581047381546133,
"config_t... |
from ds.vortex.core import baseNode
from ds.vortex.core import plug as plugs
class ArrayExtend(baseNode.BaseNode):
"""Appends the contents of a seq to a list
plugs:
value1: the list to append to
value2: the seq to append
"""
def __init__(self, name):
"""
:param name: st... | {
"repo_name": "dsparrow27/vortex",
"path": "src/ds/vortex/nodes/array/extend.py",
"copies": "1",
"size": "1480",
"license": "mit",
"hash": 8569651461296292000,
"line_mean": 30.4893617021,
"line_max": 85,
"alpha_frac": 0.6432432432,
"autogenerated": false,
"ratio": 3.7185929648241207,
"config_te... |
from ds.vortex.core import baseNode
from ds.vortex.core import plug as plugs
class ArrayIndexNode(baseNode.BaseNode):
def __init__(self, name):
"""
:param name: str, the name of the node
"""
baseNode.BaseNode.__init__(self, name)
def initialize(self):
baseNode.BaseNode... | {
"repo_name": "dsparrow27/vortex",
"path": "src/ds/vortex/nodes/array/indexByValue.py",
"copies": "1",
"size": "1408",
"license": "mit",
"hash": 6510069816769499000,
"line_mean": 29.6086956522,
"line_max": 85,
"alpha_frac": 0.6328125,
"autogenerated": false,
"ratio": 3.8575342465753426,
"config... |
from ds.vortex.core import baseNode
from ds.vortex.core import plug as plugs
class BoolNode(baseNode.BaseNode):
def __init__(self, name):
"""
:param name: str, the name of the node
"""
baseNode.BaseNode.__init__(self, name)
def initialize(self):
baseNode.BaseNode.initi... | {
"repo_name": "dsparrow27/vortex",
"path": "src/ds/vortex/nodes/constants/boolean.py",
"copies": "1",
"size": "1087",
"license": "mit",
"hash": -2763912969526119400,
"line_mean": 27.6052631579,
"line_max": 85,
"alpha_frac": 0.6430542778,
"autogenerated": false,
"ratio": 3.8274647887323945,
"con... |
from ds.vortex.core import baseNode
from ds.vortex.core import plug as plugs
class DivideNode(baseNode.BaseNode):
def __init__(self, name):
"""
:param name: str, the name of the node
"""
baseNode.BaseNode.__init__(self, name)
def initialize(self):
baseNode.BaseNode.in... | {
"repo_name": "dsparrow27/vortex",
"path": "src/ds/vortex/nodes/math/basic/divide.py",
"copies": "1",
"size": "1365",
"license": "mit",
"hash": 4093516257825147400,
"line_mean": 30.0227272727,
"line_max": 85,
"alpha_frac": 0.6417582418,
"autogenerated": false,
"ratio": 3.75,
"config_test": fals... |
from ds.vortex.core import baseNode
from ds.vortex.core import plug as plugs
class GetKeyNode(baseNode.BaseNode):
def __init__(self, name):
"""
:param name: str, the name of the node
"""
baseNode.BaseNode.__init__(self, name)
def initialize(self):
baseNode.BaseNode.ini... | {
"repo_name": "dsparrow27/vortex",
"path": "src/ds/vortex/nodes/dict/get.py",
"copies": "1",
"size": "1278",
"license": "mit",
"hash": 5806495766707238000,
"line_mean": 31.7692307692,
"line_max": 85,
"alpha_frac": 0.6455399061,
"autogenerated": false,
"ratio": 3.7151162790697674,
"config_test":... |
from ds.vortex.core import baseNode
from ds.vortex.core import plug as plugs
class GreaterThanNode(baseNode.BaseNode):
def __init__(self, name):
"""
:param name: str, the name of the node
"""
baseNode.BaseNode.__init__(self, name)
def initialize(self):
baseNode.BaseNod... | {
"repo_name": "dsparrow27/vortex",
"path": "src/ds/vortex/nodes/comparison/greaterThan.py",
"copies": "1",
"size": "1292",
"license": "mit",
"hash": -297534675607144600,
"line_mean": 31.3,
"line_max": 85,
"alpha_frac": 0.653250774,
"autogenerated": false,
"ratio": 3.63943661971831,
"config_test... |
from ds.vortex.core import baseNode
from ds.vortex.core import plug as plugs
class GreaterThanOrEqualToNode(baseNode.BaseNode):
def __init__(self, name):
"""
:param name: str, the name of the node
"""
baseNode.BaseNode.__init__(self, name)
def initialize(self):
baseNod... | {
"repo_name": "dsparrow27/vortex",
"path": "src/ds/vortex/nodes/comparison/greaterThanOrEqualTo.py",
"copies": "1",
"size": "1311",
"license": "mit",
"hash": 5131985414889089000,
"line_mean": 31.775,
"line_max": 85,
"alpha_frac": 0.6575133486,
"autogenerated": false,
"ratio": 3.6315789473684212,
... |
from ds.vortex.core import baseNode
from ds.vortex.core import plug as plugs
class IfNode(baseNode.BaseNode):
def __init__(self, name):
"""
:param name: str, the name of the node
"""
baseNode.BaseNode.__init__(self, name)
def initialize(self):
baseNode.BaseNode.initial... | {
"repo_name": "dsparrow27/vortex",
"path": "src/ds/vortex/nodes/comparison/ifCondition.py",
"copies": "1",
"size": "1448",
"license": "mit",
"hash": 129264003215717420,
"line_mean": 32.6744186047,
"line_max": 85,
"alpha_frac": 0.6553867403,
"autogenerated": false,
"ratio": 3.6565656565656566,
"... |
from ds.vortex.core import baseNode
from ds.vortex.core import plug as plugs
class InRangeNode(baseNode.BaseNode):
def __init__(self, name):
"""
:param name: str, the name of the node
"""
baseNode.BaseNode.__init__(self, name)
def initialize(self):
baseNode.BaseNode.in... | {
"repo_name": "dsparrow27/vortex",
"path": "src/ds/vortex/nodes/comparison/inRange.py",
"copies": "1",
"size": "1292",
"license": "mit",
"hash": 7782713243788496000,
"line_mean": 31.3,
"line_max": 85,
"alpha_frac": 0.6524767802,
"autogenerated": false,
"ratio": 3.63943661971831,
"config_test": ... |
from ds.vortex.core import baseNode
from ds.vortex.core import plug as plugs
class IntNode(baseNode.BaseNode):
def __init__(self, name):
"""
:param name: str, the name of the node
"""
baseNode.BaseNode.__init__(self, name)
def initialize(self):
baseNode.BaseNode.initia... | {
"repo_name": "dsparrow27/vortex",
"path": "src/ds/vortex/nodes/constants/integer.py",
"copies": "1",
"size": "1083",
"license": "mit",
"hash": 406346459664002300,
"line_mean": 28.2702702703,
"line_max": 85,
"alpha_frac": 0.6426592798,
"autogenerated": false,
"ratio": 3.813380281690141,
"config... |
from ds.vortex.core import baseNode
from ds.vortex.core import plug as plugs
class InvertNode(baseNode.BaseNode):
def __init__(self, name):
"""
:param name: str, the name of the node
"""
baseNode.BaseNode.__init__(self, name)
def initialize(self):
baseNode.BaseNode.in... | {
"repo_name": "dsparrow27/vortex",
"path": "src/ds/vortex/nodes/math/basic/invert.py",
"copies": "1",
"size": "1090",
"license": "mit",
"hash": -3861547922210897400,
"line_mean": 27.6842105263,
"line_max": 85,
"alpha_frac": 0.6422018349,
"autogenerated": false,
"ratio": 3.8111888111888113,
"con... |
from ds.vortex.core import baseNode
from ds.vortex.core import plug as plugs
class LessThanNode(baseNode.BaseNode):
def __init__(self, name):
"""
:param name: str, the name of the node
"""
baseNode.BaseNode.__init__(self, name)
def initialize(self):
baseNode.BaseNode.i... | {
"repo_name": "dsparrow27/vortex",
"path": "src/ds/vortex/nodes/comparison/lessThan.py",
"copies": "1",
"size": "1286",
"license": "mit",
"hash": 8218588353137670000,
"line_mean": 31.15,
"line_max": 85,
"alpha_frac": 0.6516329705,
"autogenerated": false,
"ratio": 3.6225352112676057,
"config_tes... |
from ds.vortex.core import baseNode
from ds.vortex.core import plug as plugs
class LessThanOrEqualToNode(baseNode.BaseNode):
def __init__(self, name):
"""
:param name: str, the name of the node
"""
baseNode.BaseNode.__init__(self, name)
def initialize(self):
baseNode.B... | {
"repo_name": "dsparrow27/vortex",
"path": "src/ds/vortex/nodes/comparison/lessThanOrEqualTo.py",
"copies": "1",
"size": "1305",
"license": "mit",
"hash": -7076452634288555000,
"line_mean": 31.625,
"line_max": 85,
"alpha_frac": 0.6559386973,
"autogenerated": false,
"ratio": 3.6149584487534625,
... |
from ds.vortex.core import baseNode
from ds.vortex.core import plug as plugs
class ModuloNode(baseNode.BaseNode):
def __init__(self, name):
"""
:param name: str, the name of the node
"""
baseNode.BaseNode.__init__(self, name)
def initialize(self):
baseNode.BaseNode.in... | {
"repo_name": "dsparrow27/vortex",
"path": "src/ds/vortex/nodes/math/basic/modulo.py",
"copies": "1",
"size": "1282",
"license": "mit",
"hash": -8181567076330208000,
"line_mean": 28.8139534884,
"line_max": 85,
"alpha_frac": 0.6497659906,
"autogenerated": false,
"ratio": 3.662857142857143,
"conf... |
from ds.vortex.core import baseNode
from ds.vortex.core import plug as plugs
class MultiplyNode(baseNode.BaseNode):
def __init__(self, name):
"""
:param name: str, the name of the node
"""
baseNode.BaseNode.__init__(self, name)
def initialize(self):
baseNode.BaseNode.... | {
"repo_name": "dsparrow27/vortex",
"path": "src/ds/vortex/nodes/math/basic/multiply.py",
"copies": "1",
"size": "1316",
"license": "mit",
"hash": 3999128144985658000,
"line_mean": 29.6046511628,
"line_max": 85,
"alpha_frac": 0.655775076,
"autogenerated": false,
"ratio": 3.7386363636363638,
"con... |
from ds.vortex.core import baseNode
from ds.vortex.core import plug as plugs
class NotEqualToNode(baseNode.BaseNode):
def __init__(self, name):
"""
:param name: str, the name of the node
"""
baseNode.BaseNode.__init__(self, name)
def initialize(self):
baseNode.BaseNode... | {
"repo_name": "dsparrow27/vortex",
"path": "src/ds/vortex/nodes/comparison/notEqualTo.py",
"copies": "1",
"size": "1291",
"license": "mit",
"hash": 6782071032620498000,
"line_mean": 31.275,
"line_max": 85,
"alpha_frac": 0.652207591,
"autogenerated": false,
"ratio": 3.636619718309859,
"config_te... |
from ds.vortex.core import baseNode
from ds.vortex.core import plug as plugs
class PopIndex(baseNode.BaseNode):
def __init__(self, name):
"""
:param name: str, the name of the node
"""
baseNode.BaseNode.__init__(self, name)
def initialize(self):
baseNode.BaseNode.initi... | {
"repo_name": "dsparrow27/vortex",
"path": "src/ds/vortex/nodes/array/pop.py",
"copies": "1",
"size": "1392",
"license": "mit",
"hash": 4578415205271620600,
"line_mean": 30.6363636364,
"line_max": 85,
"alpha_frac": 0.6300287356,
"autogenerated": false,
"ratio": 3.834710743801653,
"config_test":... |
from ds.vortex.core import baseNode
from ds.vortex.core import plug as plugs
class PowerNode(baseNode.BaseNode):
def __init__(self, name):
"""
:param name: str, the name of the node
"""
baseNode.BaseNode.__init__(self, name)
def initialize(self):
baseNode.BaseNode.ini... | {
"repo_name": "dsparrow27/vortex",
"path": "src/ds/vortex/nodes/math/basic/power.py",
"copies": "1",
"size": "1296",
"license": "mit",
"hash": 6820571107455129000,
"line_mean": 29.1395348837,
"line_max": 85,
"alpha_frac": 0.649691358,
"autogenerated": false,
"ratio": 3.671388101983003,
"config_... |
from ds.vortex.core import baseNode
from ds.vortex.core import plug as plugs
class RemoveDictNode(baseNode.BaseNode):
def __init__(self, name):
"""
:param name: str, the name of the node
"""
baseNode.BaseNode.__init__(self, name)
def initialize(self):
baseNode.BaseNode... | {
"repo_name": "dsparrow27/vortex",
"path": "src/ds/vortex/nodes/dict/remove.py",
"copies": "1",
"size": "1365",
"license": "mit",
"hash": -2325457309757975000,
"line_mean": 30.7441860465,
"line_max": 85,
"alpha_frac": 0.6395604396,
"autogenerated": false,
"ratio": 3.7916666666666665,
"config_te... |
from ds.vortex.core import baseNode
from ds.vortex.core import plug as plugs
class SplitStringNode(baseNode.BaseNode):
def __init__(self, name):
"""
:param name: str, the name of the node
"""
baseNode.BaseNode.__init__(self, name)
def initialize(self):
baseNode.BaseNod... | {
"repo_name": "dsparrow27/vortex",
"path": "src/ds/vortex/nodes/string/split.py",
"copies": "1",
"size": "1449",
"license": "mit",
"hash": -6827391534604628000,
"line_mean": 31.2,
"line_max": 85,
"alpha_frac": 0.6487232574,
"autogenerated": false,
"ratio": 3.9162162162162164,
"config_test": fal... |
from ds.vortex.core import baseNode
from ds.vortex.core import plug as plugs
class StringNode(baseNode.BaseNode):
def __init__(self, name):
"""
:param name: str, the name of the node
"""
baseNode.BaseNode.__init__(self, name)
def initialize(self):
baseNode.BaseNode.ini... | {
"repo_name": "dsparrow27/vortex",
"path": "src/ds/vortex/nodes/string/string.py",
"copies": "1",
"size": "1090",
"license": "mit",
"hash": 8385776491020079000,
"line_mean": 28.4594594595,
"line_max": 85,
"alpha_frac": 0.6431192661,
"autogenerated": false,
"ratio": 3.8652482269503547,
"config_t... |
from ds.vortex.core import baseNode
from ds.vortex.core import plug as plugs
class SubtractNode(baseNode.BaseNode):
def __init__(self, name):
"""
:param name: str, the name of the node
"""
baseNode.BaseNode.__init__(self, name)
def initialize(self):
baseNode.BaseNode.... | {
"repo_name": "dsparrow27/vortex",
"path": "src/ds/vortex/nodes/math/basic/subtract.py",
"copies": "1",
"size": "1306",
"license": "mit",
"hash": 5001872306284432000,
"line_mean": 29.3720930233,
"line_max": 85,
"alpha_frac": 0.6531393568,
"autogenerated": false,
"ratio": 3.785507246376812,
"con... |
from ds.vortex.core import baseNode
from ds.vortex.core import plug as plugs
class DictNode(baseNode.BaseNode):
def __init__(self, name):
"""
:param name: str, the name of the node
"""
baseNode.BaseNode.__init__(self, name)
def initialize(self):
baseNode.Ba... | {
"repo_name": "dsparrow27/vortex",
"path": "src/ds/vortex/nodes/constants/dict.py",
"copies": "1",
"size": "1124",
"license": "mit",
"hash": 2593435217637718500,
"line_mean": 28.3783783784,
"line_max": 85,
"alpha_frac": 0.6209964413,
"autogenerated": false,
"ratio": 3.9717314487632507,
"config_... |
from ds.vortex.core import baseNode
from ds.vortex.core import plug as plugs
class ScalarNode(baseNode.BaseNode):
def __init__(self, name):
"""
:param name: str, the name of the node
"""
baseNode.BaseNode.__init__(self, name)
def initialize(self):
baseNode.... | {
"repo_name": "dsparrow27/vortex",
"path": "src/ds/vortex/nodes/constants/scalar.py",
"copies": "1",
"size": "1121",
"license": "mit",
"hash": 3107254304177609700,
"line_mean": 29.1388888889,
"line_max": 85,
"alpha_frac": 0.6244424621,
"autogenerated": false,
"ratio": 3.9471830985915495,
"confi... |
from ds.vortex.core import baseNode
from ds.vortex.core import plug as plugs
class SumNode(baseNode.BaseNode):
def __init__(self, name):
"""
:param name: str, the name of the node
"""
baseNode.BaseNode.__init__(self, name)
def initialize(self):
baseNode.B... | {
"repo_name": "dsparrow27/vortex",
"path": "src/ds/vortex/nodes/math/basic/sum.py",
"copies": "1",
"size": "1352",
"license": "mit",
"hash": -6718056978070100000,
"line_mean": 30.9756097561,
"line_max": 86,
"alpha_frac": 0.6294378698,
"autogenerated": false,
"ratio": 3.766016713091922,
"config_... |
from .dtab import Dtab, Dentry
from .name_tree import NameTree
from .path import Path
class Buffer(object):
@classmethod
def wrap(cls, buf):
if isinstance(buf, cls):
return buf
else:
return cls(buf)
def __init__(self, buf):
self.buf = buf
self.index = 0
def peek(self):
if sel... | {
"repo_name": "wickman/mux",
"path": "mux/parsers.py",
"copies": "1",
"size": "3698",
"license": "apache-2.0",
"hash": -4326147881424350700,
"line_mean": 17.2167487685,
"line_max": 67,
"alpha_frac": 0.5878853434,
"autogenerated": false,
"ratio": 3.166095890410959,
"config_test": false,
"has_n... |
from dtags import style as s
from .helpers import clean_str
def test_style_tag():
assert clean_str(s.tag("a", tty=False)) == "@a"
assert clean_str(s.tag("b", tty=False)) == "@b"
assert clean_str(s.tag("a", tty=True)) == "@a"
assert clean_str(s.tag("b", tty=True)) == "@b"
def test_style_path(dir1, d... | {
"repo_name": "joowani/dtags",
"path": "tests/test_style.py",
"copies": "1",
"size": "2099",
"license": "mit",
"hash": 5667898088005897000,
"line_mean": 39.3653846154,
"line_max": 81,
"alpha_frac": 0.5907575036,
"autogenerated": false,
"ratio": 2.740208877284595,
"config_test": false,
"has_no... |
from dtcov import dt_log
from dtcov.dt_file_utils import GetFileNameAndBaseFromFile
import traceback
def read_file(filename):
f = open(filename, "r")
s = f.read()
f.close()
return s
def offset_to_line_number(text, offset):
curLine = 1
curOffset = 0
while curOffset < offset:
if cur... | {
"repo_name": "traff/dtcov",
"path": "dtcov/dt_django.py",
"copies": "1",
"size": "2803",
"license": "epl-1.0",
"hash": 4590690857336543700,
"line_mean": 24.9537037037,
"line_max": 168,
"alpha_frac": 0.5586871209,
"autogenerated": false,
"ratio": 3.808423913043478,
"config_test": false,
"has_... |
from dtest import Tester, debug, DEFAULT_DIR
import unittest
import time
import os
import subprocess
import shlex
import pycassa
import glob
import sys
JNA_PATH = '/usr/share/java/jna.jar'
ATTACK_JAR = 'cassandra-attack.jar'
# Use jna.jar in {CASSANDRA_DIR,DEFAULT_DIR}/lib/, since >=2.1 needs correct version
try:
... | {
"repo_name": "pcmanus/cassandra-dtest",
"path": "thrift_hsha_test.py",
"copies": "1",
"size": "4097",
"license": "apache-2.0",
"hash": -4076388753195885000,
"line_mean": 35.5803571429,
"line_max": 170,
"alpha_frac": 0.6070295338,
"autogenerated": false,
"ratio": 3.513722126929674,
"config_test... |
from dtest import Tester, debug, DISABLE_VNODES
from ccmlib.node import Node, NodeError, TimeoutError
from cassandra import ConsistencyLevel, Unavailable, ReadTimeout
from cassandra.query import SimpleStatement
from tools import since, InterruptBootstrap
class NodeUnavailable(Exception):
pass
class TestReplaceA... | {
"repo_name": "tjake/cassandra-dtest",
"path": "replace_address_test.py",
"copies": "1",
"size": "13374",
"license": "apache-2.0",
"hash": -2978396892969403400,
"line_mean": 42.0032154341,
"line_max": 125,
"alpha_frac": 0.6232989382,
"autogenerated": false,
"ratio": 3.8675534991324465,
"config_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.