text stringlengths 0 1.05M | meta dict |
|---|---|
import numpy as np
import time
from lflib.imageio import save_image
# ----------------------------------------------------------------------------------------
# SIRT ITERATIVE SOLVER
# ----------------------------------------------------------------------------------------
def sirt_recon... | {
"repo_name": "sophie63/FlyLFM",
"path": "stanford_lfanalyze_v0.4/lflib/solvers/sirt.py",
"copies": "1",
"size": "5082",
"license": "bsd-2-clause",
"hash": 2835382907160281000,
"line_mean": 37.2105263158,
"line_max": 111,
"alpha_frac": 0.5830381739,
"autogenerated": false,
"ratio": 3.571328179901... |
import numpy as np
import time
from lflib.lightfield import LightField
from scipy.sparse.linalg.interface import LinearOperator
#------------------------------------------------------------------------------------
# LINEAR OPERATORS FOR LIGHT FIELD RECONSTRUCTION
#------------------------------------... | {
"repo_name": "sophie63/FlyLFM",
"path": "stanford_lfanalyze_v0.4/lflib/linear_operators.py",
"copies": "1",
"size": "10084",
"license": "bsd-2-clause",
"hash": 4172189292361381000,
"line_mean": 40.3278688525,
"line_max": 101,
"alpha_frac": 0.5277667592,
"autogenerated": false,
"ratio": 3.3850285... |
import numpy as np
import time
from scipy.sparse.linalg.interface import LinearOperator
from lflib.lightfield import LightField
from lflib.imageio import save_image
from lflib.linear_operators import AugmentedLightFieldOperator
# ------------------------------- LSQR SOLVER ----------------------------------
def ls... | {
"repo_name": "sophie63/FlyLFM",
"path": "stanford_lfanalyze_v0.4/lflib/solvers/lsqr.py",
"copies": "1",
"size": "1075",
"license": "bsd-2-clause",
"hash": 3229363618454433300,
"line_mean": 28.8611111111,
"line_max": 94,
"alpha_frac": 0.5869767442,
"autogenerated": false,
"ratio": 3.9090909090909... |
# 5 - 9 Early Morning #
# 9 - 11 Late Morning #
# 11 - 14 Mid Day #
# 14 - 17 Afternoon #
# 17 - 20 Late Evening #
# 20 - 22 Night #
# 22 - 5 Late Night #
#########################################
wallpaper_image = "~/Pictures/Wallpapers/"
if current_hour < 5:
wallpaper_image = wallpaper_image + ... | {
"repo_name": "ExcaliburZero/gnome-wallpaper-changer",
"path": "wallpaper_changer.py",
"copies": "1",
"size": "2737",
"license": "mit",
"hash": -42971039449076850,
"line_mean": 39.25,
"line_max": 95,
"alpha_frac": 0.6960175374,
"autogenerated": false,
"ratio": 3.350061199510404,
"config_test": ... |
"""A script which visually draws a Cantor set."""
import turtle
import time
def rec_draw(l, r, x, xd, t, pen):
"""Recursively draw each section of the Cantor set, until the set
number of rows has been met."""
if x < t:
# Draw the first full line, is redundant after first recursion
pen.up()
pen.goto(l, (-(x -... | {
"repo_name": "ExcaliburZero/cantor-set",
"path": "cantorset.py",
"copies": "1",
"size": "2582",
"license": "mit",
"hash": -6545348756832496000,
"line_mean": 31.6835443038,
"line_max": 79,
"alpha_frac": 0.6940356313,
"autogenerated": false,
"ratio": 3.215442092154421,
"config_test": false,
"h... |
# BEGIN LICENSE ###
# Use of the triage tools and related source code is subject to the terms
# of the license below.
#
# ------------------------------------------------------------------------
# Copyright (C) 2011 Carnegie Mellon University. All Rights Reserved.
# Portions Copyright 2013 BlackBerry Ltd. All Rights Re... | {
"repo_name": "bnagy/francis",
"path": "exploitaben/lib/analyzers/x86_lldb.py",
"copies": "1",
"size": "35800",
"license": "bsd-3-clause",
"hash": -8762338239839192000,
"line_mean": 37.370846731,
"line_max": 121,
"alpha_frac": 0.5829888268,
"autogenerated": false,
"ratio": 3.9893024292400265,
"... |
'''
Contains a list of rules used to classify the state of a GDB Inferior.
Rules are defined by category (ex: "EXPLOITABLE") and are roughly ordered
from "most exploitable" to "least exploitable".
'''
rules = [
('EXPLOITABLE', [
dict(match_function="isUseAfterFree",
desc="Use of previously freed heap buffer",
... | {
"repo_name": "jfoote/vulture",
"path": "vlib/analyzers/exploitability/lib/rules.py",
"copies": "1",
"size": "10827",
"license": "mit",
"hash": 7713973767987389000,
"line_mean": 45.8701298701,
"line_max": 236,
"alpha_frac": 0.7214371479,
"autogenerated": false,
"ratio": 4.21120186697783,
"confi... |
# -- begin menu --
#
# {{{ menu [folder] }}} creates a navigation menu, in the form of an unordered
# list, for the pages in directory [folder].
#
# It titles them by their [title] attribute. So for a Markdown file, writing
# title: [my title]
# at the beginning of the file, and putting the file in directory ... | {
"repo_name": "qema/nanosite",
"path": "packages/menu/macros.py",
"copies": "1",
"size": "1071",
"license": "mit",
"hash": 3914786696387768300,
"line_mean": 32.46875,
"line_max": 78,
"alpha_frac": 0.5060690943,
"autogenerated": false,
"ratio": 3.488599348534202,
"config_test": false,
"has_no_... |
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# cop... | {
"repo_name": "largerussiangames/ogre",
"path": "Tools/Blender2.5Export/main_exporter_panel.py",
"copies": "6",
"size": "8203",
"license": "mit",
"hash": -4093335469411032000,
"line_mean": 36.4566210046,
"line_max": 100,
"alpha_frac": 0.7297330245,
"autogenerated": false,
"ratio": 3.4122296173044... |
"""
This code is open source under the MIT license.
Its purpose is to increase the workflow of creating Minecraft
related renders and animations, by automating certain tasks.
Developed and tested for blender 2.72 up to the indicated blender version below
The addon must be installed as a ZIP folder, not an individual... | {
"repo_name": "peca3d/MCprep",
"path": "MCprep_addon/__init__.py",
"copies": "1",
"size": "81593",
"license": "mit",
"hash": -488184746875367360,
"line_mean": 35.0393109541,
"line_max": 177,
"alpha_frac": 0.6647016288,
"autogenerated": false,
"ratio": 3.048496170371754,
"config_test": false,
... |
import bpy
from ..rfb_utils import texture_utils
from ..rman_bl_nodes import __BL_NODES_MAP__
converted_nodes = {}
report = None
__CURRENT_MATERIAL__ = None
def convert_cycles_node(nt, node, location=None):
node_type = node.bl_idname
if node.name in converted_nodes:
return nt.nodes[converted_node... | {
"repo_name": "adminradio/RenderManForBlender",
"path": "rman_cycles_convert/cycles_convert.py",
"copies": "2",
"size": "32470",
"license": "mit",
"hash": -4364591972171278000,
"line_mean": 42.5254691689,
"line_max": 112,
"alpha_frac": 0.6314444102,
"autogenerated": false,
"ratio": 3.247,
"conf... |
import bpy
import bgl
import blf
import time
from .rfb_utils.prefs_utils import get_pref
from .rfb_utils import string_utils
from .rfb_logger import rfb_log
from .rfb_utils.envconfig_utils import envconfig
bl_info = {
"name": "RenderMan For Blender",
"author": "Pixar",
"version": (24, 0, 0),
"blender":... | {
"repo_name": "adminradio/RenderManForBlender",
"path": "__init__.py",
"copies": "2",
"size": "9658",
"license": "mit",
"hash": -1223580978221341400,
"line_mean": 37.1739130435,
"line_max": 102,
"alpha_frac": 0.6175191551,
"autogenerated": false,
"ratio": 3.853950518754988,
"config_test": false... |
from bpy.props import *
from bpy.types import PropertyGroup
from ..rfb_logger import rfb_log
import bpy.utils
import os
class RendermanPresetMetaData(PropertyGroup):
key: StringProperty(name="Key", default='')
value: StringProperty(name="Value", default='')
class RendermanPreset(PropertyGroup):
'''This ... | {
"repo_name": "adminradio/RenderManForBlender",
"path": "rman_presets/properties.py",
"copies": "2",
"size": "3948",
"license": "mit",
"hash": -870024489254774400,
"line_mean": 36.9615384615,
"line_max": 107,
"alpha_frac": 0.7023809524,
"autogenerated": false,
"ratio": 4.182203389830509,
"confi... |
from ..rfb_utils import filepath_utils
from ..rfb_utils.envconfig_utils import envconfig
from ..rfb_utils import object_utils
from ..rfb_utils.shadergraph_utils import is_renderman_nodetree
from ..rfb_logger import rfb_log
import os
import bpy
from bpy.props import StringProperty, EnumProperty, BoolProperty, Collectio... | {
"repo_name": "prman-pixar/RenderManForBlender",
"path": "rman_presets/operators.py",
"copies": "2",
"size": "24203",
"license": "mit",
"hash": -3001543162268152000,
"line_mean": 36.699376947,
"line_max": 130,
"alpha_frac": 0.6254596538,
"autogenerated": false,
"ratio": 3.767003891050584,
"conf... |
from ..rfb_utils.prefs_utils import get_pref, get_addon_prefs
from ..rfb_logger import rfb_log
from ..rman_config import __RFB_CONFIG_DICT__ as rfb_config
# for panel icon
from .. import rfb_icons
from . import icons as rpb_icons
import bpy
from .properties import RendermanPreset, RendermanPresetCategory
from bpy.pr... | {
"repo_name": "prman-pixar/RenderManForBlender",
"path": "rman_presets/ui.py",
"copies": "2",
"size": "20405",
"license": "mit",
"hash": 6117255080859317000,
"line_mean": 41.6882845188,
"line_max": 162,
"alpha_frac": 0.6019603038,
"autogenerated": false,
"ratio": 3.7543698252069917,
"config_tes... |
from rman_utils.rman_assets import core as ra
from rman_utils.rman_assets import lib as ral
from rman_utils.rman_assets.core import RmanAsset
from rman_utils.rman_assets.common.definitions import TrMode, TrStorage, TrSpace, TrType
from rman_utils.filepath import FilePath
import os
import os.path
import re
import sys
... | {
"repo_name": "prman-pixar/RenderManForBlender",
"path": "rman_presets/rmanAssetsBlender.py",
"copies": "2",
"size": "58331",
"license": "mit",
"hash": -3804303362238129700,
"line_mean": 39.0907216495,
"line_max": 137,
"alpha_frac": 0.5269067906,
"autogenerated": false,
"ratio": 4.071687840290381... |
import os
import bpy
import bpy.utils.previews
renderman_icon_collections = {}
renderman_icons_loaded = False
def load_icons():
global renderman_icon_collections
global renderman_icons_loaded
if renderman_icons_loaded:
return renderman_icon_collections["main"]
custom_icons = bpy.utils.prev... | {
"repo_name": "prman-pixar/RenderManForBlender",
"path": "rfb_icons/__init__.py",
"copies": "2",
"size": "3403",
"license": "mit",
"hash": 7837642107837938000,
"line_mean": 32.362745098,
"line_max": 79,
"alpha_frac": 0.6832206876,
"autogenerated": false,
"ratio": 3.454822335025381,
"config_test... |
import os
import os.path
import sys
class FilePath(str):
"""A class based on unicode to handle filepaths on various OS platforms.
Extends:
unicode
"""
def __new__(cls, path):
"""Create new unicode file path in POSIX format. Windows paths will be
converted to forward slashes.... | {
"repo_name": "prman-pixar/RenderManForBlender",
"path": "rfb_utils/filepath.py",
"copies": "2",
"size": "4575",
"license": "mit",
"hash": 2255965169074824400,
"line_mean": 31.2183098592,
"line_max": 82,
"alpha_frac": 0.5812021858,
"autogenerated": false,
"ratio": 4.472140762463343,
"config_tes... |
'''
Babx add-on
Help you to use FBX batch export for use in game engine.
'''
bl_info = {
"name": "Babx",
"description": "FBX Batch export helper.",
"author": "Pleum",
"version": (1, 0),
"blender": (2, 77, 0),
"location": "Tools > Export Tab",
"warning": "Beta",
"wiki_url": "https://git... | {
"repo_name": "pleum/Babx",
"path": "io_scene_babx/__init__.py",
"copies": "1",
"size": "4266",
"license": "mit",
"hash": -7185575001555884000,
"line_mean": 30.6,
"line_max": 136,
"alpha_frac": 0.6242381622,
"autogenerated": false,
"ratio": 3.748681898066784,
"config_test": false,
"has_no_key... |
bl_info = {
"name": "Seam Cutter",
"author": "Victor Yurievich Dorofeyev - @vinvirinvi",
"version": (1, 0, 0),
"blender": (2, 78, 0),
"location": "Mesh > Seam Cutter",
"description": "Cuts a mesh into separate meshes created from chunks of linked polygons, like areas defined by seams.",
"w... | {
"repo_name": "vinvirinvi/seam_cutter",
"path": "seam_cutter.py",
"copies": "1",
"size": "5412",
"license": "mit",
"hash": -3610306405448817000,
"line_mean": 31.2142857143,
"line_max": 123,
"alpha_frac": 0.6731337768,
"autogenerated": false,
"ratio": 3.534944480731548,
"config_test": false,
"... |
# BEGIN MODEL_V5
import abc
class AutoStorage: # <1>
__counter = 0
def __init__(self):
cls = self.__class__
prefix = cls.__name__
index = cls.__counter
self.storage_name = '_{}#{}'.format(prefix, index)
cls.__counter += 1
def __get__(self, instance, owner):
... | {
"repo_name": "trenton3983/Fluent_Python",
"path": "20-descriptor/bulkfood/model_v5.py",
"copies": "8",
"size": "1361",
"license": "mit",
"hash": -7113888209780525000,
"line_mean": 24.2037037037,
"line_max": 62,
"alpha_frac": 0.5686994857,
"autogenerated": false,
"ratio": 3.8338028169014087,
"c... |
''' Beginner Python - Homework #1
+ Notes to Don:
+ a) Found 'break' online.
+ b) Left my test handling in the code (try/except and "print" statements)
+ c) Have not figured out how to strip commas out of money without stealing code
'''
print '''
================================================================... | {
"repo_name": "palazzoloc/pynet_testx",
"path": "Homework_Week1.py",
"copies": "1",
"size": "3018",
"license": "apache-2.0",
"hash": -9076096116837683000,
"line_mean": 32.6896551724,
"line_max": 129,
"alpha_frac": 0.6232604374,
"autogenerated": false,
"ratio": 3.3533333333333335,
"config_test":... |
# Beginner’s guide to Web Scraping in Python (using BeautifulSoup)
# Analytics Vidhya
# https://www.analyticsvidhya.com/blog/2015/10/beginner-guide-web-scraping-beautiful-soup-python/
# adjusted for Python 3
# Import libraries
import urllib # to query a website
from bs4 import BeautifulSoup # to parse the data retur... | {
"repo_name": "sovicak/AnonymniAnalytici",
"path": "2017_03_07_WebScraping/Tutorials/WikipediaScrapingTutorial.py",
"copies": "1",
"size": "2130",
"license": "mit",
"hash": 4864336805354062000,
"line_mean": 21.8817204301,
"line_max": 97,
"alpha_frac": 0.6738721805,
"autogenerated": false,
"ratio"... |
import hashlib
import os
import json
import base64
#import sys
import threading
import time
SERVER = "http://142.1.242.148:8000"
# class EJLoop(threading.Thread):
# def __init__(self, view):
# self.view = view
# threading.Thread.__init__(self)
# def run(self):
# while True:
# ... | {
"repo_name": "mystor/Elephant-Jaguar",
"path": "subl/ej.py",
"copies": "1",
"size": "10242",
"license": "apache-2.0",
"hash": 2490845862156408300,
"line_mean": 34.8111888112,
"line_max": 137,
"alpha_frac": 0.527631322,
"autogenerated": false,
"ratio": 3.939230769230769,
"config_test": false,
... |
### BEGIN OF PREVIOUS RANDOM WALK EXAMPLE
# we need to generate random numbers
import random
# and we need to plot stuff.
import matplotlib.pyplot as plt
import matplotlib as mpl
mpl.use('Agg')
# define a function that takes one step in a random direction
# we assume 4 possible directions: N,E,S,W.
def random_step(x... | {
"repo_name": "djgroen/student-resources",
"path": "programming/python/python-examples/repls/Random-Price-Graph/main.py",
"copies": "1",
"size": "2107",
"license": "bsd-3-clause",
"hash": 6375503621666029000,
"line_mean": 24.3855421687,
"line_max": 109,
"alpha_frac": 0.6298054105,
"autogenerated": ... |
# Begin: Python 2/3 compatibility header small
# Get Python 3 functionality:
from __future__ import\
absolute_import, print_function, division, unicode_literals
from future.utils import raise_with_traceback, raise_from
# catch exception with: except Exception as e
from builtins import range, map, zip, filter
from i... | {
"repo_name": "pikinder/nn-patterns",
"path": "examples/all_methods.py",
"copies": "1",
"size": "6964",
"license": "mit",
"hash": 4372076447936471600,
"line_mean": 38.3446327684,
"line_max": 102,
"alpha_frac": 0.496840896,
"autogenerated": false,
"ratio": 3.772481040086674,
"config_test": false... |
# BEGIN-SCRIPT-BLOCK
#
# Script-Filter:
# $vendor eq "Cisco" and $model like /ASA/
#
# END-SCRIPT-BLOCK
from infoblox_netmri.easy import NetMRIEasy
# This values will be provided by NetMRI before execution
defaults = {
"api_url": api_url,
"http_username": http_username,
"http_password": http_password,... | {
"repo_name": "infobloxopen/netmri-toolkit",
"path": "Python/NetMRI_GUI_Python/ASA - Remove and Add snmp-server host.py",
"copies": "1",
"size": "2227",
"license": "mit",
"hash": -7829250323258064000,
"line_mean": 39.5090909091,
"line_max": 118,
"alpha_frac": 0.6901661428,
"autogenerated": false,
... |
# BEGIN-SCRIPT-BLOCK
#
# Script-Filter:
# $vendor eq "Cisco" and $type eq “Firewall”
#
# END-SCRIPT-BLOCK
from infoblox_netmri.easy import NetMRIEasy
import re
# This values will be provided by NetMRI before execution
defaults = {
"api_url": api_url,
"http_username": http_username,
"http_password": ht... | {
"repo_name": "infobloxopen/netmri-toolkit",
"path": "Python/NetMRI_GUI_Python/Script 4 - Update Custom Field.py",
"copies": "1",
"size": "2011",
"license": "mit",
"hash": -5557093467843250000,
"line_mean": 30.359375,
"line_max": 99,
"alpha_frac": 0.6467364225,
"autogenerated": false,
"ratio": 3.... |
# BEGIN-SCRIPT-BLOCK
#
# Script-Filter:
# true
#
# END-SCRIPT-BLOCK
from infoblox_netmri.easy import NetMRIEasy
import re
# This values will be provided by NetMRI before execution
defaults = {
"api_url": api_url,
"http_username": http_username,
"http_password": http_password,
"job_id": job_id,
... | {
"repo_name": "infobloxopen/netmri-toolkit",
"path": "Python/NetMRI_GUI_Python/Update Custom Field with Device Group.py",
"copies": "1",
"size": "1636",
"license": "mit",
"hash": 5300820188022186000,
"line_mean": 26.2666666667,
"line_max": 78,
"alpha_frac": 0.5996332518,
"autogenerated": false,
"... |
# BEGIN-SCRIPT-BLOCK
#
# Script-Filter:
# true
#
# Script-Variables:
# $cliuser string
# $clipwd password
# $deviceIP string
#
# END-SCRIPT-BLOCK
#The goal of this script is to force the configuration of SNMP. This resolves the issue of network devices with cli
# access which do not have SNMP configure... | {
"repo_name": "infobloxopen/netmri-toolkit",
"path": "Python/Force SNMP config of cli only device.py",
"copies": "1",
"size": "2251",
"license": "mit",
"hash": -7489566631092068000,
"line_mean": 29.4189189189,
"line_max": 117,
"alpha_frac": 0.7094624611,
"autogenerated": false,
"ratio": 3.8152542... |
# BEGIN-SCRIPT-BLOCK
#
# Script-Filter:
# true
#
# Script-Variables:
# $cliuser string
# $clipwd password
#
# END-SCRIPT-BLOCK
from infoblox_netmri.easy import NetMRIEasy
import paramiko
import time
import requests
#
# This will not error when you are not verifing Certs for https
#
requests.packages.urllib3... | {
"repo_name": "infobloxopen/netmri-toolkit",
"path": "Python/Upload Config.py",
"copies": "1",
"size": "2581",
"license": "mit",
"hash": -2905421054641244700,
"line_mean": 33.8783783784,
"line_max": 109,
"alpha_frac": 0.6939170864,
"autogenerated": false,
"ratio": 3.60979020979021,
"config_test... |
# BEGIN-SCRIPT-BLOCK
#
# Script-Filter:
# true
#
# Script-Variables:
# $gmuser string "Grid Master Username"
# $gmpassword password "Grid Master Password"
# $gmipaddress string "192.168.1.2"
#
# END-SCRIPT-BLOCK
import requests
import json, re
# This will not error when you are not verifing Certs for h... | {
"repo_name": "infobloxopen/netmri-toolkit",
"path": "Python/NetMRI_GUI_Python/Script 5 - Getting Data from NIOS.py",
"copies": "1",
"size": "1602",
"license": "mit",
"hash": 2134211235720704000,
"line_mean": 29.2264150943,
"line_max": 104,
"alpha_frac": 0.6610486891,
"autogenerated": false,
"rat... |
"""Begin static code."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import pprint
import sys
import warnings
from tanium_soul import parsers
from tanium_soul import version
__version__ = version.__version__
__ti... | {
"repo_name": "tanium/tanium_soul_py",
"path": "build_tmpls/statics.py",
"copies": "1",
"size": "19087",
"license": "mit",
"hash": -8414747978149758000,
"line_mean": 31.6273504274,
"line_max": 97,
"alpha_frac": 0.5412584482,
"autogenerated": false,
"ratio": 3.71921278254092,
"config_test": fals... |
# begin the table
f = open('theanswer.txt','w')
print("<table>", file=f)
# column headers
# print("<th>", file=f)
# print("<td>Last Name</td>", file=f)
# print("<td>First Name</td>", file=f)
# print("<td>Year</td>", file=f)
# print("<td>Graduation Year</td>", file=f)
# print("<td>Position</td>", file=f)
#... | {
"repo_name": "thushanp/thushanp.github.io",
"path": "crushy.py",
"copies": "1",
"size": "1591",
"license": "mit",
"hash": -6779155454668345000,
"line_mean": 26.9636363636,
"line_max": 45,
"alpha_frac": 0.5298554368,
"autogenerated": false,
"ratio": 2.656093489148581,
"config_test": false,
"h... |
###### BEGIN VECTOR NON-PRIMITIVES ######
# All following functions are defined in terms of the primitives and are
# representation agnostic. It is generally assumed that all arguments for
# these functions are passed in some common supported representation so that
# the primitives can act on them unless otherwise not... | {
"repo_name": "Zomega/ReverseEngineeringTools",
"path": "retools/vector.py",
"copies": "1",
"size": "4552",
"license": "mit",
"hash": 8577226382597335000,
"line_mean": 36.3114754098,
"line_max": 150,
"alpha_frac": 0.6797012302,
"autogenerated": false,
"ratio": 3.1263736263736264,
"config_test":... |
## begin vimMotion.py ##
# http://mail.python.org/pipermail/python-list/1999-July/007281.html
# http://mail.python.org/pipermail/python-list/1999-July/007827.html
# C. Laurence Gonsalves clgonsal at kami.com
import vim
import string
import re
'''
Num 8, Num 9, Num 2, Num 3
:map <esc>Ox :pyfile /home/kwadrat/bin/vimMo... | {
"repo_name": "kwadrat/ipij_vim",
"path": "vimMotion.py",
"copies": "1",
"size": "3286",
"license": "isc",
"hash": 6873010464224812000,
"line_mean": 31.86,
"line_max": 85,
"alpha_frac": 0.6360316494,
"autogenerated": false,
"ratio": 3.405181347150259,
"config_test": false,
"has_no_keywords": ... |
beg = """
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>ER LifeSaver</title>
... | {
"repo_name": "diciwi2016/er-lifesaver",
"path": "hospitalnow.py",
"copies": "1",
"size": "6975",
"license": "mit",
"hash": 7717230993602715000,
"line_mean": 31.1428571429,
"line_max": 214,
"alpha_frac": 0.4868817204,
"autogenerated": false,
"ratio": 3.522727272727273,
"config_test": false,
"... |
"""Behavioral tests for the GuiceData implementation."""
from nose.tools import raises
from snakeguice.decorators import GuiceData
def describe_initializing_GuiceData_from_a_class():
def describe_without_instance_attached():
class Dummy(object): pass
data = GuiceData.from_class(Dummy)
... | {
"repo_name": "dstanek/snake-guice.orig",
"path": "specs/GuiceData_spec.py",
"copies": "2",
"size": "2766",
"license": "mit",
"hash": 7961447740950020000,
"line_mean": 29.3956043956,
"line_max": 69,
"alpha_frac": 0.6431670282,
"autogenerated": false,
"ratio": 3.4748743718592965,
"config_test": ... |
"""Behaviors support (a.k.a windowless controls)."""
import ctypes
import sciter.capi.scdef
from sciter.capi.scbehavior import *
from sciter.capi.scdom import SCDOM_RESULT, HELEMENT
_api = sciter.SciterAPI()
class EventHandler:
"""DOM event handler which can be attached to any DOM element."""
ALL_EVENTS ... | {
"repo_name": "pravic/pysciter",
"path": "sciter/event.py",
"copies": "1",
"size": "9838",
"license": "mit",
"hash": 6326201276222585000,
"line_mean": 39.8215767635,
"line_max": 163,
"alpha_frac": 0.6029680829,
"autogenerated": false,
"ratio": 4.229578675838349,
"config_test": false,
"has_no_... |
"""Behavioural Clock generators for myhdl.
"""
__author__ = 'Uri Nix'
__all__ = ['ClockGen', 'ClockDivide']
### Module Globals ###########################################################
### MyHDL
from myhdl import always, instance, delay, now
### Building Block Units ###############################################... | {
"repo_name": "unixie/myhdl_arch",
"path": "myhdl_arch/clocks/_clockgen.py",
"copies": "1",
"size": "2069",
"license": "mit",
"hash": 3590448183444830000,
"line_mean": 21.4891304348,
"line_max": 78,
"alpha_frac": 0.4596423393,
"autogenerated": false,
"ratio": 4.283643892339544,
"config_test": f... |
"""Behavioural Cloning (BC).
Trains policy by applying supervised learning to a fixed dataset of (observation,
action) pairs generated by some expert demonstrator.
"""
import contextlib
from typing import Any, Callable, Dict, Iterable, Mapping, Optional, Tuple, Type, Union
import gym
import numpy as np
import torch ... | {
"repo_name": "HumanCompatibleAI/imitation",
"path": "src/imitation/algorithms/bc.py",
"copies": "1",
"size": "13008",
"license": "mit",
"hash": 8963071142934646000,
"line_mean": 36.3793103448,
"line_max": 88,
"alpha_frac": 0.5800276753,
"autogenerated": false,
"ratio": 4.15591054313099,
"confi... |
"""Behavioural FIFOs for myhdl.
"""
__author__ = 'Uri Nix'
__all__ = ['DCFifo', 'SCFifo']
### Module Globals ###########################################################
from Queue import Queue
from myhdl import always, instances
### Building Block Units #####################################################
class ... | {
"repo_name": "unixie/myhdl_arch",
"path": "myhdl_arch/fifos/_fifos.py",
"copies": "1",
"size": "3571",
"license": "mit",
"hash": -3289070962829533000,
"line_mean": 27.1181102362,
"line_max": 78,
"alpha_frac": 0.4945393447,
"autogenerated": false,
"ratio": 3.7197916666666666,
"config_test": fal... |
import numpy as np
from sympy.ntheory import legendre_symbol
chip_rate = 1023000
code_length = 10230
b1cd_params = {
1: (2678,699), 2: (4802,694), 3: (958,7318), 4: (859,2127),
5: (3843,715), 6: (2232,6682), 7: (124,7850), 8: (4352,5495),
9: (1816,1162), 10: (1126,7682), 11: (1860,6792), ... | {
"repo_name": "pmonta/GNSS-DSP-tools",
"path": "gnsstools/beidou/b1cd.py",
"copies": "1",
"size": "2609",
"license": "mit",
"hash": 5946102069570714000,
"line_mean": 27.6703296703,
"line_max": 73,
"alpha_frac": 0.5553852051,
"autogenerated": false,
"ratio": 2.0591949486977112,
"config_test": fa... |
import numpy as np
from sympy.ntheory import legendre_symbol
chip_rate = 1023000
code_length = 10230
b1cp_params = {
1: (796,7575), 2: (156,2369), 3: (4198,5688), 4: (3941,539),
5: (1374,2270), 6: (1338,7306), 7: (1833,6457), 8: (2521,6254),
9: (3175,5644), 10: (168,7119), 11: (2715... | {
"repo_name": "pmonta/GNSS-DSP-tools",
"path": "gnsstools/beidou/b1cp.py",
"copies": "1",
"size": "4483",
"license": "mit",
"hash": 2411606461096446500,
"line_mean": 31.9632352941,
"line_max": 75,
"alpha_frac": 0.544278385,
"autogenerated": false,
"ratio": 2.0783495595734816,
"config_test": fal... |
import numpy as np
chip_rate = 2046000
code_length = 2046
secondary_code = np.array([0,0,0,0,0,1,0,0,1,1,0,1,0,1,0,0,1,1,1,0])
secondary_code = 1.0 - 2.0*secondary_code
b1i_g2_taps = {
1: (1,3), 2: (1,4), 3: (1,5), 4: (1,6),
5: (1,8), 6: (1,9), 7: (1,10), 8: (1,11),
9: (2,7), 10: (3,4), ... | {
"repo_name": "pmonta/GNSS-DSP-tools",
"path": "gnsstools/beidou/b1i.py",
"copies": "1",
"size": "2447",
"license": "mit",
"hash": 1859414753497549800,
"line_mean": 25.311827957,
"line_max": 68,
"alpha_frac": 0.4936657131,
"autogenerated": false,
"ratio": 1.768063583815029,
"config_test": false... |
import numpy as np
chip_rate = 10230000
code_length = 10230
secondary_code = np.array([0,0,0,1,0])
secondary_code = 1.0 - 2.0*secondary_code
b2ad_g2_initial = {
1: "1000000100101", 2: "1000000110100", 3: "1000010101101", 4: "1000101001111",
5: "1000101010101", 6: "1000110101110", 7: "1000111101110",... | {
"repo_name": "pmonta/GNSS-DSP-tools",
"path": "gnsstools/beidou/b2ad.py",
"copies": "1",
"size": "3126",
"license": "mit",
"hash": 7843995946664737000,
"line_mean": 28.4905660377,
"line_max": 88,
"alpha_frac": 0.6113243762,
"autogenerated": false,
"ratio": 2.19831223628692,
"config_test": fals... |
import numpy as np
from sympy.ntheory import legendre_symbol
chip_rate = 10230000
code_length = 10230
b2ap_g2_initial = {
1: "1000000100101", 2: "1000000110100", 3: "1000010101101", 4: "1000101001111",
5: "1000101010101", 6: "1000110101110", 7: "1000111101110", 8: "1000111111011",
9: "1001100101... | {
"repo_name": "pmonta/GNSS-DSP-tools",
"path": "gnsstools/beidou/b2ap.py",
"copies": "1",
"size": "4785",
"license": "mit",
"hash": -6294696496870394000,
"line_mean": 31.1140939597,
"line_max": 88,
"alpha_frac": 0.5765935214,
"autogenerated": false,
"ratio": 2.167119565217391,
"config_test": fa... |
import numpy as np
from .b2bi_strings import *
chip_rate = 10230000
code_length = 10230
b64 = {
'A':0, 'B':1, 'C':2, 'D':3, 'E':4, 'F':5, 'G':6, 'H':7,
'I':8, 'J':9, 'K':10, 'L':11, 'M':12, 'N':13, 'O':14, 'P':15,
'Q':16, 'R':17, 'S':18, 'T':19, 'U':20, 'V':21, 'W':22, 'X':23,
'Y':24, 'Z':25, 'a':26, 'b':27... | {
"repo_name": "pmonta/GNSS-DSP-tools",
"path": "gnsstools/beidou/b2bi.py",
"copies": "1",
"size": "1654",
"license": "mit",
"hash": -6313219279625627000,
"line_mean": 22.2957746479,
"line_max": 65,
"alpha_frac": 0.5211608222,
"autogenerated": false,
"ratio": 2.029447852760736,
"config_test": fa... |
import numpy as np
from .b2bq_strings import *
chip_rate = 10230000
code_length = 10230
b64 = {
'A':0, 'B':1, 'C':2, 'D':3, 'E':4, 'F':5, 'G':6, 'H':7,
'I':8, 'J':9, 'K':10, 'L':11, 'M':12, 'N':13, 'O':14, 'P':15,
'Q':16, 'R':17, 'S':18, 'T':19, 'U':20, 'V':21, 'W':22, 'X':23,
'Y':24, 'Z':25, 'a':26, 'b':27... | {
"repo_name": "pmonta/GNSS-DSP-tools",
"path": "gnsstools/beidou/b2bq.py",
"copies": "1",
"size": "1654",
"license": "mit",
"hash": -1200907482307828000,
"line_mean": 22.2957746479,
"line_max": 65,
"alpha_frac": 0.5211608222,
"autogenerated": false,
"ratio": 2.029447852760736,
"config_test": fa... |
import numpy as np
chip_rate = 10230000
code_length = 10230
secondary_code = np.array([0,0,0,0,0,1,0,0,1,1,0,1,0,1,0,0,1,1,1,0])
secondary_code = 1.0 - 2.0*secondary_code
b3i_g2_initial = {
1: "1010111111111", 2: "1111000101011", 3: "1011110001010", 4: "1111111111011",
5: "1100100011111", 6: "10010011... | {
"repo_name": "pmonta/GNSS-DSP-tools",
"path": "gnsstools/beidou/b3i.py",
"copies": "1",
"size": "2945",
"license": "mit",
"hash": 4764942303666242000,
"line_mean": 29.6770833333,
"line_max": 88,
"alpha_frac": 0.6190152801,
"autogenerated": false,
"ratio": 2.1654411764705883,
"config_test": fal... |
# beijing_2016
import csv
import matplotlib.dates
from datetime import datetime
from matplotlib import pyplot as plt
def date_to_list(data_index):
""" save date to a list """
results = []
for row in data:
results.append(datetime.strptime(row[data_index], '%Y-%m-%d'))
return results
def data_t... | {
"repo_name": "littleocub/python_practice",
"path": "bj_tmp_matplotlib/beijing_2016.py",
"copies": "1",
"size": "1722",
"license": "mit",
"hash": -1493020655398940700,
"line_mean": 26.3492063492,
"line_max": 93,
"alpha_frac": 0.6347270616,
"autogenerated": false,
"ratio": 2.9285714285714284,
"c... |
# being a bit too dynamic
from __future__ import annotations
from math import ceil
from typing import (
TYPE_CHECKING,
Iterable,
Sequence,
)
import warnings
import matplotlib.table
import matplotlib.ticker as ticker
import numpy as np
from pandas._typing import FrameOrSeriesUnion
from pandas.core.dtypes... | {
"repo_name": "datapythonista/pandas",
"path": "pandas/plotting/_matplotlib/tools.py",
"copies": "2",
"size": "14986",
"license": "bsd-3-clause",
"hash": 991881254194901100,
"line_mean": 30.1559251559,
"line_max": 88,
"alpha_frac": 0.5920859469,
"autogenerated": false,
"ratio": 3.8249106687085246... |
# being a bit too dynamic
from __future__ import annotations
from math import ceil
from typing import TYPE_CHECKING, Iterable, List, Sequence, Tuple, Union
import warnings
import matplotlib.table
import matplotlib.ticker as ticker
import numpy as np
from pandas._typing import FrameOrSeriesUnion
from pandas.core.dty... | {
"repo_name": "gfyoung/pandas",
"path": "pandas/plotting/_matplotlib/tools.py",
"copies": "1",
"size": "14347",
"license": "bsd-3-clause",
"hash": -958099726687491600,
"line_mean": 30.6013215859,
"line_max": 88,
"alpha_frac": 0.5916916429,
"autogenerated": false,
"ratio": 3.839175809472839,
"co... |
# being a bit too dynamic
from math import ceil
from typing import TYPE_CHECKING, Iterable, List, Sequence, Tuple, Union
import warnings
import matplotlib.table
import matplotlib.ticker as ticker
import numpy as np
from pandas._typing import FrameOrSeries
from pandas.core.dtypes.common import is_list_like
from panda... | {
"repo_name": "rs2/pandas",
"path": "pandas/plotting/_matplotlib/tools.py",
"copies": "1",
"size": "12918",
"license": "bsd-3-clause",
"hash": 6146271094254632000,
"line_mean": 31.2144638404,
"line_max": 88,
"alpha_frac": 0.5860814368,
"autogenerated": false,
"ratio": 3.815121086828116,
"config... |
# being a bit too dynamic
from math import ceil
import warnings
import matplotlib.table
import matplotlib.ticker as ticker
import numpy as np
from pandas.core.dtypes.common import is_list_like
from pandas.core.dtypes.generic import ABCDataFrame, ABCIndexClass, ABCSeries
from pandas.plotting._matplotlib import compat... | {
"repo_name": "TomAugspurger/pandas",
"path": "pandas/plotting/_matplotlib/tools.py",
"copies": "1",
"size": "12238",
"license": "bsd-3-clause",
"hash": -6393391533476123000,
"line_mean": 31.3756613757,
"line_max": 88,
"alpha_frac": 0.5826932505,
"autogenerated": false,
"ratio": 3.823180256169947... |
# being a bit too dynamic
import warnings
import matplotlib.cm as cm
import matplotlib.colors
import numpy as np
from pandas.core.dtypes.common import is_list_like
import pandas.core.common as com
def get_standard_colors(
num_colors: int, colormap=None, color_type: str = "default", color=None
):
import mat... | {
"repo_name": "rs2/pandas",
"path": "pandas/plotting/_matplotlib/style.py",
"copies": "1",
"size": "3464",
"license": "bsd-3-clause",
"hash": 8275492527213660000,
"line_mean": 35.0833333333,
"line_max": 85,
"alpha_frac": 0.5840069284,
"autogenerated": false,
"ratio": 4.287128712871287,
"config_... |
# being a bit too dynamic
# pylint: disable=E1101
from __future__ import division
import operator
from distutils.version import LooseVersion
def _mpl_version(version, op):
def inner():
try:
import matplotlib as mpl
except ImportError:
return False
return (op(LooseV... | {
"repo_name": "cython-testbed/pandas",
"path": "pandas/plotting/_compat.py",
"copies": "1",
"size": "1052",
"license": "bsd-3-clause",
"hash": 206085240602396000,
"line_mean": 31.875,
"line_max": 76,
"alpha_frac": 0.6131178707,
"autogenerated": false,
"ratio": 2.486997635933806,
"config_test": ... |
# being a bit too dynamic
# pylint: disable=E1101
from __future__ import division
from collections import namedtuple
from distutils.version import LooseVersion
import re
import warnings
import numpy as np
import pandas.compat as compat
from pandas.compat import lrange, map, range, string_types, zip
from pandas.error... | {
"repo_name": "GuessWhoSamFoo/pandas",
"path": "pandas/plotting/_core.py",
"copies": "1",
"size": "128312",
"license": "bsd-3-clause",
"hash": 5498095133715415000,
"line_mean": 34.6224319822,
"line_max": 84,
"alpha_frac": 0.5440255003,
"autogenerated": false,
"ratio": 3.9899250598588263,
"confi... |
# being a bit too dynamic
# pylint: disable=E1101
from __future__ import division
from contextlib import contextmanager
import warnings
import numpy as np
import pandas.compat as compat
from pandas.compat import lmap, lrange
from pandas.core.dtypes.common import is_list_like
def _get_standard_colors(num_colors=No... | {
"repo_name": "MJuddBooth/pandas",
"path": "pandas/plotting/_style.py",
"copies": "2",
"size": "5763",
"license": "bsd-3-clause",
"hash": -8082804396124187000,
"line_mean": 33.3035714286,
"line_max": 79,
"alpha_frac": 0.5792122159,
"autogenerated": false,
"ratio": 4.389185072353389,
"config_tes... |
# being a bit too dynamic
# pylint: disable=E1101
from __future__ import division
from distutils.version import LooseVersion
def _mpl_le_1_2_1():
try:
import matplotlib as mpl
return (LooseVersion(mpl.__version__) <= LooseVersion('1.2.1') and
str(mpl.__version__)[0] != '0')
ex... | {
"repo_name": "zfrenchee/pandas",
"path": "pandas/plotting/_compat.py",
"copies": "1",
"size": "1890",
"license": "bsd-3-clause",
"hash": -6133507236971033000,
"line_mean": 23.8684210526,
"line_max": 78,
"alpha_frac": 0.5793650794,
"autogenerated": false,
"ratio": 4.012738853503185,
"config_tes... |
# being a bit too dynamic
# pylint: disable=E1101
from __future__ import division
from math import ceil
import warnings
import numpy as np
from pandas.compat import range
from pandas.core.dtypes.common import is_list_like
from pandas.core.dtypes.generic import ABCDataFrame, ABCIndexClass, ABCSeries
def format_dat... | {
"repo_name": "GuessWhoSamFoo/pandas",
"path": "pandas/plotting/_tools.py",
"copies": "2",
"size": "12812",
"license": "bsd-3-clause",
"hash": 5150207025161559000,
"line_mean": 32.5392670157,
"line_max": 79,
"alpha_frac": 0.580471433,
"autogenerated": false,
"ratio": 3.9360983102918587,
"config... |
# being a bit too dynamic
# pylint: disable=E1101
from __future__ import division
import numpy as np
from pandas.compat import lmap, lrange, range, zip
from pandas.util._decorators import deprecate_kwarg
from pandas.core.dtypes.missing import notna
from pandas.io.formats.printing import pprint_thing
from pandas.plo... | {
"repo_name": "MJuddBooth/pandas",
"path": "pandas/plotting/_misc.py",
"copies": "1",
"size": "20941",
"license": "bsd-3-clause",
"hash": 2041485662035472000,
"line_mean": 31.6692667707,
"line_max": 79,
"alpha_frac": 0.572847524,
"autogenerated": false,
"ratio": 3.5686775732788,
"config_test": ... |
# being a bit too dynamic
# pylint: disable=E1101
from __future__ import division
import numpy as np
from pandas.util._decorators import deprecate_kwarg
from pandas.core.dtypes.missing import notna
from pandas.compat import range, lrange, lmap, zip
from pandas.io.formats.printing import pprint_thing
from pandas.plo... | {
"repo_name": "ryfeus/lambda-packs",
"path": "Tensorflow_Pandas_Numpy/source3.6/pandas/plotting/_misc.py",
"copies": "2",
"size": "21130",
"license": "mit",
"hash": 5801071568409090000,
"line_mean": 31.7596899225,
"line_max": 79,
"alpha_frac": 0.5735920492,
"autogenerated": false,
"ratio": 3.5825... |
# being a bit too dynamic
# pylint: disable=E1101
from __future__ import division
import numpy as np
from pandas.util._decorators import deprecate_kwarg
from pandas.core.dtypes.missing import notnull
from pandas.compat import range, lrange, lmap, zip
from pandas.io.formats.printing import pprint_thing
from pandas.p... | {
"repo_name": "mbayon/TFG-MachineLearning",
"path": "venv/lib/python3.6/site-packages/pandas/plotting/_misc.py",
"copies": "7",
"size": "18199",
"license": "mit",
"hash": -2785424486026395600,
"line_mean": 30.7609075044,
"line_max": 79,
"alpha_frac": 0.5760756085,
"autogenerated": false,
"ratio":... |
# being a bit too dynamic
# pylint: disable=E1101
from __future__ import division
import warnings
from contextlib import contextmanager
import re
import numpy as np
from pandas.core.dtypes.common import is_list_like
from pandas.compat import lrange, lmap
import pandas.compat as compat
from pandas.plotting._compat im... | {
"repo_name": "zfrenchee/pandas",
"path": "pandas/plotting/_style.py",
"copies": "1",
"size": "6514",
"license": "bsd-3-clause",
"hash": -509447220377546800,
"line_mean": 34.5956284153,
"line_max": 79,
"alpha_frac": 0.5673933067,
"autogenerated": false,
"ratio": 4.360107095046854,
"config_test"... |
# being a bit too dynamic
# pylint: disable=E1101
from __future__ import division
import warnings
from contextlib import contextmanager
import numpy as np
from pandas.core.dtypes.common import is_list_like
from pandas.compat import lrange, lmap
import pandas.compat as compat
def _get_standard_colors(num_colors=Non... | {
"repo_name": "amolkahat/pandas",
"path": "pandas/plotting/_style.py",
"copies": "1",
"size": "5923",
"license": "bsd-3-clause",
"hash": 2366893417240508000,
"line_mean": 33.4360465116,
"line_max": 79,
"alpha_frac": 0.5726827621,
"autogenerated": false,
"ratio": 4.390659747961453,
"config_test"... |
# being a bit too dynamic
# pylint: disable=E1101
from __future__ import division
import warnings
from math import ceil
import numpy as np
from pandas.core.dtypes.common import is_list_like
from pandas.core.dtypes.generic import ABCSeries, ABCIndexClass, ABCDataFrame
from pandas.compat import range
def format_date... | {
"repo_name": "kdebrab/pandas",
"path": "pandas/plotting/_tools.py",
"copies": "5",
"size": "12814",
"license": "bsd-3-clause",
"hash": 7118529720612217000,
"line_mean": 32.6325459318,
"line_max": 79,
"alpha_frac": 0.5803808335,
"autogenerated": false,
"ratio": 3.934295363831747,
"config_test":... |
# being a bit too dynamic
# pylint: disable=E1101
from __future__ import division
import warnings
import re
from collections import namedtuple
from distutils.version import LooseVersion
import numpy as np
from pandas.util._decorators import cache_readonly, Appender
from pandas.compat import range, lrange, map, zip, ... | {
"repo_name": "dsm054/pandas",
"path": "pandas/plotting/_core.py",
"copies": "1",
"size": "128361",
"license": "bsd-3-clause",
"hash": -511073490180370050,
"line_mean": 34.5373754153,
"line_max": 84,
"alpha_frac": 0.5434127188,
"autogenerated": false,
"ratio": 3.9938083385189795,
"config_test":... |
# being a bit too dynamic
# pylint: disable=E1101
from __future__ import division
import warnings
import re
from math import ceil
from collections import namedtuple
from contextlib import contextmanager
from distutils.version import LooseVersion
import numpy as np
from pandas.types.common import (is_list_like,
... | {
"repo_name": "victor-prado/broker-manager",
"path": "environment/lib/python3.5/site-packages/pandas/tools/plotting.py",
"copies": "7",
"size": "134565",
"license": "mit",
"hash": -5132772071847270000,
"line_mean": 32.5741017964,
"line_max": 84,
"alpha_frac": 0.5500390146,
"autogenerated": false,
... |
# being a bit too dynamic
# pylint: disable=E1101
import datetime
import warnings
import re
from math import ceil
from collections import namedtuple
from contextlib import contextmanager
from distutils.version import LooseVersion
import numpy as np
from pandas.util.decorators import cache_readonly, deprecate_kwarg
fr... | {
"repo_name": "sunzhxjs/JobGIS",
"path": "lib/python2.7/site-packages/pandas/tools/plotting.py",
"copies": "9",
"size": "132091",
"license": "mit",
"hash": -4627104065289842000,
"line_mean": 32.8261203585,
"line_max": 101,
"alpha_frac": 0.5546706437,
"autogenerated": false,
"ratio": 3.84398917440... |
def redrawAll():
canvas.data.disableTimerFired = False
if (canvas.data.isGameOver):
cx = canvas.data.canvasWidth/2
cy = canvas.data.canvasHeight/2 - 50
canvas.create_text(cx, cy, text="Game Over!", font=("Helvetica", 32, "bold"), fill="white")
elif (canvas.data.isPaused):
c... | {
"repo_name": "torablien/PythonFun",
"path": "Bejeweled/Bejeweled .py",
"copies": "1",
"size": "22937",
"license": "mit",
"hash": -3507420368740536000,
"line_mean": 43.798828125,
"line_max": 326,
"alpha_frac": 0.6215285347,
"autogenerated": false,
"ratio": 3.375570272259014,
"config_test": fals... |
"""Belgium-specific Form helpers."""
from django.forms.fields import RegexField, Select
from django.utils.translation import ugettext_lazy as _
from localflavor.deprecation import DeprecatedPhoneNumberFormFieldMixin
from .be_provinces import PROVINCE_CHOICES
from .be_regions import REGION_CHOICES
class BEPostalCod... | {
"repo_name": "thor/django-localflavor",
"path": "localflavor/be/forms.py",
"copies": "2",
"size": "3574",
"license": "bsd-3-clause",
"hash": 2399463870175633400,
"line_mean": 40.5581395349,
"line_max": 90,
"alpha_frac": 0.5626748741,
"autogenerated": false,
"ratio": 3.6959669079627715,
"config... |
# Bellfort Sequence Parser
## Modules
import numpy as np
import pandas as pd
import tkinter as tk
from tkinter import ttk
import tkinter.font as tkf
from tkinter import messagebox
from tkinter import filedialog
import threading
import time
import os
import shutil
## Helper Functions
### Reverse Complement
def rever... | {
"repo_name": "YangChuan80/BellfortSequenceParser",
"path": "Source/BellfortSequenceParser.py",
"copies": "1",
"size": "35081",
"license": "bsd-3-clause",
"hash": -4387071162468834000,
"line_mean": 34.082,
"line_max": 154,
"alpha_frac": 0.5759813004,
"autogenerated": false,
"ratio": 3.56768026034... |
"""Bellman-Error Basis Function Representation."""
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
#from rlpy.Tools import
from builtins import super
from builtins import int
from future import standard_library
standar... | {
"repo_name": "rlpy/rlpy",
"path": "rlpy/Representations/BEBF.py",
"copies": "1",
"size": "6674",
"license": "bsd-3-clause",
"hash": -1417851576219209700,
"line_mean": 41.5095541401,
"line_max": 174,
"alpha_frac": 0.6493856758,
"autogenerated": false,
"ratio": 4.127396413110699,
"config_test": ... |
"""Bellman-Error Basis Function Representation."""
#from rlpy.Tools import
import numpy as np
from .Representation import Representation
from rlpy.Tools import svm
__copyright__ = "Copyright 2013, RLPy http://acl.mit.edu/RLPy"
__credits__ = ["Alborz Geramifard", "Robert H. Klein", "Christoph Dann",
"Wi... | {
"repo_name": "BerkeleyAutomation/rlpy",
"path": "rlpy/Representations/BEBF.py",
"copies": "4",
"size": "6376",
"license": "bsd-3-clause",
"hash": 1231398675616435200,
"line_mean": 42.0810810811,
"line_max": 174,
"alpha_frac": 0.6420953576,
"autogenerated": false,
"ratio": 4.108247422680412,
"c... |
# Bellman-Ford algorithm
#
# Long Le <longle1@illinois.edu>
# University of Illinois
#
import numpy as np
def bellman_ford(aMap,start,goal):
M,N = np.shape(aMap)
# dict/map, for storing results
dist = {}
prev = {}
# Step 1: initialization
for m in range(M):
for n in range(N):
... | {
"repo_name": "long0612/randProbs",
"path": "shortestPath/bellman_ford.py",
"copies": "1",
"size": "1925",
"license": "mit",
"hash": -3916563902799147000,
"line_mean": 23.3670886076,
"line_max": 83,
"alpha_frac": 0.5044155844,
"autogenerated": false,
"ratio": 3.0701754385964914,
"config_test": ... |
# Bellman Ford implementation
# Complexity : O(VE) using adjacency list
INT_MAX = 2 ** (32) - 1
def bellman_ford_shortest_path(graph, source_vertex):
# Create the distance array and parent array
distance = [INT_MAX] * len(graph)
parent = [-1] * len(graph)
# set the distance of source vertex from itsel... | {
"repo_name": "bkpathak/HackerRank-Problems",
"path": "python/graphs/bellman_ford.py",
"copies": "2",
"size": "1110",
"license": "mit",
"hash": 8062544396407940000,
"line_mean": 26.75,
"line_max": 67,
"alpha_frac": 0.5540540541,
"autogenerated": false,
"ratio": 3.144475920679887,
"config_test":... |
Belmont = {
'kb': '''
Algebra(Madison)
Graphing(Madison)
Integrals(Madison)
Lists(Madison)
Java(Madison)
Recursion(Madison)
History(Madison)
Algebra(Jacob)
Graphing(Jacob)
Integrals(Jacob)
Zplane(Jacob)
Algebra(Hooper)
Graphing(Hooper)
Integrals(Hooper)
Lists(Hooper)
Java(Hooper)
Recursion(Hooper)
History(Hooper)... | {
"repo_name": "WmHHooper/aima-python",
"path": "submissions/Everett/myLogic.py",
"copies": "1",
"size": "1062",
"license": "mit",
"hash": 651099375795275600,
"line_mean": 15.59375,
"line_max": 76,
"alpha_frac": 0.6299435028,
"autogenerated": false,
"ratio": 2.094674556213018,
"config_test": fal... |
# Below are some sample queries used to explore the BAMS data.
# September 29, 2013
# these queries are separated by ######## and can be copy and pasted into the terminal after running
# SPARQL_BAMS_Store_Persist_Example.py (regularly) &&
# SPARQL_BAMS_Store_Query_Example.py (in python interactive mode)
###########... | {
"repo_name": "rsoscia/BAMS-to-NeuroLex",
"path": "src/BAMS_Data_Queries.py",
"copies": "1",
"size": "20369",
"license": "mit",
"hash": -7688788119723052000,
"line_mean": 31.1277602524,
"line_max": 132,
"alpha_frac": 0.5979674996,
"autogenerated": false,
"ratio": 2.9840316437152064,
"config_tes... |
"""Below code is generic boilerplate and normally should not be changed.
To avoid setup script boilerplate, create "setup.py" file with the minimal contents as given
in SETUP_TEMPLATE below, and modify it according to the specifics of your package.
See the implementation of setup_boilerplate.Package for default metad... | {
"repo_name": "mbdevpl/version-query",
"path": "setup_boilerplate.py",
"copies": "1",
"size": "13257",
"license": "apache-2.0",
"hash": -507948835243859800,
"line_mean": 38.6916167665,
"line_max": 100,
"alpha_frac": 0.6357396093,
"autogenerated": false,
"ratio": 3.9763047390521895,
"config_test... |
"""Command-line parsing library
This module is an optparse-inspired command-line parsing library that:
- handles both optional and positional arguments
- produces highly informative usage messages
- supports parsers that dispatch to sub-parsers
The following is a simple usage example that sums integers ... | {
"repo_name": "piotroxp/scibibscan",
"path": "scib/lib/python3.5/site-packages/astropy/utils/compat/_argparse/__init__.py",
"copies": "1",
"size": "87833",
"license": "mit",
"hash": -7604456310442435000,
"line_mean": 36.1701227253,
"line_max": 80,
"alpha_frac": 0.5590723304,
"autogenerated": false,... |
# below imports enables python 2 and 3 compatible codes
# requires python-future, install by `pip install future`
from __future__ import (absolute_import, division,
print_function, unicode_literals)
from builtins import *
import numpy as np
from scipy import interpolate
from scipy import signal... | {
"repo_name": "shelper/pypeline",
"path": "pypeline/impl/misc/sig_proc.py",
"copies": "2",
"size": "2332",
"license": "isc",
"hash": -6233015141833505000,
"line_mean": 31.8450704225,
"line_max": 105,
"alpha_frac": 0.6659519726,
"autogenerated": false,
"ratio": 3.695721077654517,
"config_test": ... |
# Below is a faithful reproduction of the weight breakdown models from Raymer.
# Note that this is NOT a GP compatible model and should not be viewed as such.
from gpkit import VectorVariable, Variable, Model, units
import numpy as np
from gpkit.tools import te_secant as secant
from gpkit.tools import te_tangent as ta... | {
"repo_name": "convexengineering/gplibrary",
"path": "gpkitmodels/misc/Raymer Weights/Raymer_Exact.py",
"copies": "1",
"size": "12728",
"license": "mit",
"hash": -9210151345261517000,
"line_mean": 91.231884058,
"line_max": 201,
"alpha_frac": 0.4391891892,
"autogenerated": false,
"ratio": 3.333682... |
# Below is a Weights breakdown for the Blended wing body. This method is GP Compatible!
from builtins import range
from gpkit import VectorVariable, Variable, Model, units
import numpy as np
from gpkit.tools import te_exp_minus1
import gpkit
gpkit.disable_units()
import matplotlib.pyplot as plt
def secant(x, nterm):... | {
"repo_name": "convexengineering/gplibrary",
"path": "gpkitmodels/misc/Raymer Weights/Blended Wing-Body/Raymer_Weights_Model.py",
"copies": "1",
"size": "19517",
"license": "mit",
"hash": -4158938480274787000,
"line_mean": 51.1844919786,
"line_max": 194,
"alpha_frac": 0.4301890659,
"autogenerated":... |
# # below is Okceg v0.1
#
# def is_num(jerry):
# try:
# int(jerry)
# except:
# try:
# float(jerry)
# except:
# return False
# else:
# return True
# else:
# return True
#
# print('\nInteractive Okceg Shell!\npowered by python\n')
#
#... | {
"repo_name": "ccc-cgj/Okceg",
"path": "interactive_shell.py",
"copies": "1",
"size": "1858",
"license": "mit",
"hash": 3190079875878248000,
"line_mean": 21.3855421687,
"line_max": 89,
"alpha_frac": 0.4607104413,
"autogenerated": false,
"ratio": 2.9305993690851735,
"config_test": false,
"has_... |
# Below is old code I wanted to keep for reference
'''
while 1:
l,data = inp.read()
if l:
for i in range(len(data)/2):
curWindow.append(audioop.getsample(data, 2, i))
if (len(curWindow)+len(midTermBuffer)>midTermBufferSize):
samplesToCopyToMidBuffer = midTermBufferSize - len(midTermBu... | {
"repo_name": "DynaLite/DynaLite_1.0",
"path": "Sources/SpeechProcessing/pyAudioAnalysis/backup.py",
"copies": "1",
"size": "1273",
"license": "mit",
"hash": 6409867788650931000,
"line_mean": 34.3888888889,
"line_max": 85,
"alpha_frac": 0.6512175962,
"autogenerated": false,
"ratio": 3.22278481012... |
# Below is the interface for Iterator, which is already defined for you.
#
# class Iterator:
# def __init__(self, nums):
# """
# Initializes an iterator object to the beginning of a list.
# :type nums: List[int]
# """
#
# def hasNext(self):
# """
# Returns true if... | {
"repo_name": "shenfei/oj_codes",
"path": "leetcode/python/n284_Peeking_Iterator.py",
"copies": "1",
"size": "1616",
"license": "mit",
"hash": -4581646800471041000,
"line_mean": 25.064516129,
"line_max": 81,
"alpha_frac": 0.5266089109,
"autogenerated": false,
"ratio": 4.08080808080808,
"config_... |
# Below is the interface for Iterator, which is already defined for you.
#
class Iterator:
def __init__(self, nums):
"""
Initialize your data structure here.
:type iterator: Iterator
"""
self.iterator = iter(nums)
try:
self.peeked = next(self.iterator)
... | {
"repo_name": "l33tdaima/l33tdaima",
"path": "p284m/peeking_iterator.py",
"copies": "1",
"size": "1791",
"license": "mit",
"hash": -5067490557896280000,
"line_mean": 24.5857142857,
"line_max": 81,
"alpha_frac": 0.5561139028,
"autogenerated": false,
"ratio": 4.294964028776978,
"config_test": fal... |
# Below is the interface for Iterator, which is already defined for you.
#
# class Iterator(object):
# def __init__(self, nums):
# """
# Initializes an iterator object to the beginning of a list.
# :type nums: List[int]
# """
#
# def hasNext(self):
# """
# Returns... | {
"repo_name": "haonancool/OnlineJudge",
"path": "leetcode/python/peeking_iterator.py",
"copies": "1",
"size": "2114",
"license": "apache-2.0",
"hash": -6215861882602993000,
"line_mean": 25.425,
"line_max": 81,
"alpha_frac": 0.5066225166,
"autogenerated": false,
"ratio": 3.8647166361974405,
"con... |
# Below is the interface for Iterator, which is already defined for you.
#
# class Iterator(object):
# def __init__(self, nums):
# """
# Initializes an iterator object to the beginning of a list.
# :type nums: List[int]
# """
#
# def hasNext(self):
# """
# ... | {
"repo_name": "rahul-ramadas/leetcode",
"path": "peeking-iterator/Solution.54938601.py",
"copies": "1",
"size": "1844",
"license": "mit",
"hash": -4702145778969689000,
"line_mean": 25.1470588235,
"line_max": 81,
"alpha_frac": 0.5173535792,
"autogenerated": false,
"ratio": 4.026200873362446,
"co... |
# Below is the interface for Iterator, which is already defined for you.
#
# class Iterator(object):
# def __init__(self, nums):
# """
# Initializes an iterator object to the beginning of a list.
# :type nums: List[int]
# """
#
# def hasNext(self):
# """
# Returns... | {
"repo_name": "tedye/leetcode",
"path": "tools/leetcode.284.Peeking Iterator/leetcode.284.Peeking Iterator.submission0.py",
"copies": "1",
"size": "1832",
"license": "mit",
"hash": 8972868178804260000,
"line_mean": 26.7727272727,
"line_max": 86,
"alpha_frac": 0.5420305677,
"autogenerated": false,
... |
# below is User config
WINDOW_TITLE = "Plants vs. Zombies"
TRACK_TYPE = (32, )
ROW_GROUPS = ((1, ), (2, ), (3, ), (4, ), (5, ), (6, ), )
REFRESH_TIME = 1
REPLACE_X_WITH_COLUMN = True
SHOW_STATISTIC = False
STATISTIC_ROW_GROUPS = ROW_GROUPS
STATISTIC_TRACK_TYPE = (3, 8, 12, 14, 15, 17, 23, 32, )
# above is User config
... | {
"repo_name": "SLAPaper/PVZ-Red-Eye-Monitor",
"path": "red_eye_monitor.py",
"copies": "1",
"size": "8896",
"license": "mit",
"hash": 1374382142180835800,
"line_mean": 48.5367231638,
"line_max": 762,
"alpha_frac": 0.5293111314,
"autogenerated": false,
"ratio": 2.9363697253851306,
"config_test": ... |
"""
<plugin key="Roku" name="Roku (like Kodi)" author="wyn" version="1.0.0">
<params>
<param field="Address" label="IP Address" width="200px" required="true" default="127.0.0.1"/>
<param field="Port" label="Port" width="40px" required="true" default="8060"/>
<param field="Mode6" label="Debug... | {
"repo_name": "wynbennett/domoticz_roku",
"path": "plugin.py",
"copies": "1",
"size": "5767",
"license": "bsd-3-clause",
"hash": 2970799212703308000,
"line_mean": 31.9542857143,
"line_max": 143,
"alpha_frac": 0.5781168719,
"autogenerated": false,
"ratio": 3.5315370483772197,
"config_test": true... |
import os
import sys
import zlib
import StringIO
import base64
import time
import numpy as np
import glob
import json
import pickle
import shutil
import resource
import mahotas
import tifffile as tiff
from datetime import datetime
from paths import Paths
def enum(**enums):
return type('Enum', (), enums)
class U... | {
"repo_name": "fegonda/icon_demo",
"path": "code/common/utility.py",
"copies": "1",
"size": "13623",
"license": "mit",
"hash": -2473045076408458000,
"line_mean": 32.8039702233,
"line_max": 130,
"alpha_frac": 0.5251413051,
"autogenerated": false,
"ratio": 3.8789863325740317,
"config_test": false... |
# Be more Python 3
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import sys
import os
from ansible.errors import AnsibleError, AnsibleParserError
from ansible.plugins.lookup import LookupBase
try:
from __main__ import display
except ImportError:
from ansible.utils.di... | {
"repo_name": "nrser/qb",
"path": "plugins/lookup/version_lookups.py",
"copies": "1",
"size": "1495",
"license": "mit",
"hash": -3309885959544608300,
"line_mean": 27.2075471698,
"line_max": 78,
"alpha_frac": 0.5371237458,
"autogenerated": false,
"ratio": 4.397058823529412,
"config_test": false,... |
"""Bench distance array
Brute force (n * m) vs cellgrid method
"""
import itertools
import numpy as np
from cellgrid import CellGrid
from cellgrid.cgmath import inter_distance_array_withpbc
from cellgrid import capped_distance_array
from cgtimer import Timer
PREC = np.float32
def cg_method(a, b, box, d_max):
... | {
"repo_name": "MDAnalysis/cellgrid",
"path": "benchmarks/bench_da.py",
"copies": "2",
"size": "1233",
"license": "mit",
"hash": -5046379002737761000,
"line_mean": 24.6875,
"line_max": 69,
"alpha_frac": 0.6374695864,
"autogenerated": false,
"ratio": 2.7461024498886415,
"config_test": false,
"h... |
import os
import logging
import subprocess
import benchexec.result as result
import benchexec.util as util
class BaseTool(object):
"""
This class serves both as a template for tool-info implementations,
and as an abstract super class for them.
For writing a new tool info, inherit from this class and ... | {
"repo_name": "IljaZakharov/benchexec",
"path": "benchexec/tools/template.py",
"copies": "2",
"size": "10582",
"license": "apache-2.0",
"hash": -4866287883642520000,
"line_mean": 48.4485981308,
"line_max": 122,
"alpha_frac": 0.6726516727,
"autogenerated": false,
"ratio": 4.878745965882896,
"con... |
"""
This module allows to retrieve information about the current system.
"""
# prepare for Python 3
from __future__ import absolute_import, division, print_function, unicode_literals
# THIS MODULE HAS TO WORK WITH PYTHON 2.7!
import glob
import logging
import os
import platform
import sys
from benchexec import uti... | {
"repo_name": "IljaZakharov/benchexec",
"path": "benchexec/systeminfo.py",
"copies": "2",
"size": "7843",
"license": "apache-2.0",
"hash": -4274036021734618600,
"line_mean": 38.0199004975,
"line_max": 117,
"alpha_frac": 0.5831952059,
"autogenerated": false,
"ratio": 4.009713701431493,
"config_t... |
"""
This module contains functions for computing assignments of resources to runs.
"""
# prepare for Python 3
from __future__ import absolute_import, division, print_function, unicode_literals
import collections
import itertools
import logging
import math
import os
import sys
from benchexec import cgroups
from benc... | {
"repo_name": "martin-neuhaeusser/benchexec",
"path": "benchexec/resources.py",
"copies": "2",
"size": "17750",
"license": "apache-2.0",
"hash": 4063185110146321400,
"line_mean": 53.2813455657,
"line_max": 273,
"alpha_frac": 0.6785915493,
"autogenerated": false,
"ratio": 3.970029076269291,
"con... |
"""
This module contains some useful functions for Strings, Files and Lists.
"""
# prepare for Python 3
from __future__ import absolute_import, division, print_function, unicode_literals
from decimal import Decimal
import glob
import io
import json
import logging
import os
import re
from urllib.parse import quote as... | {
"repo_name": "martin-neuhaeusser/benchexec",
"path": "benchexec/tablegenerator/util.py",
"copies": "2",
"size": "10023",
"license": "apache-2.0",
"hash": -3905139045070117400,
"line_mean": 31.862295082,
"line_max": 138,
"alpha_frac": 0.6492068243,
"autogenerated": false,
"ratio": 3.8954527788573... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.