text
stringlengths
0
1.05M
meta
dict
"""Bitccoin ticker module for ppbot. @package ppbot Displays the current bitcoin pricing from several exchanges via bitcoincharts @syntax btc """ import requests from piebot.modules import * class Bitcoin(Module): def __init__(self, *args, **kwargs): """Constructor""" Module.__init__(self, kw...
{ "repo_name": "billyvg/piebot", "path": "piebot/modules/bitcoin.py", "copies": "1", "size": "1393", "license": "mit", "hash": -2757050036123604000, "line_mean": 24.7962962963, "line_max": 79, "alpha_frac": 0.527638191, "autogenerated": false, "ratio": 4.097058823529411, "config_test": false, ...
"""Bitcoind RPC""" import decimal import binascii from bitcoinrpc import authproxy from pycoin.encoding import (is_valid_bitcoin_address, sec_to_public_pair, EncodingError) class InvalidParameter(Exception): pass class BitcoindError(InvalidParameter): pass...
{ "repo_name": "hylje/coldman", "path": "coldman/bitcoind.py", "copies": "1", "size": "4616", "license": "bsd-3-clause", "hash": 1845626080820188200, "line_mean": 31.7375886525, "line_max": 141, "alpha_frac": 0.5901213172, "autogenerated": false, "ratio": 4.293953488372093, "config_test": false,...
"""Bitcoin information service that uses blockchain.com.""" from datetime import timedelta import logging from blockchain import exchangerates, statistics import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ATTR_ATTRIBUTION, CONF_CURRENCY, CONF_DISPLAY_...
{ "repo_name": "postlund/home-assistant", "path": "homeassistant/components/bitcoin/sensor.py", "copies": "1", "size": "6392", "license": "apache-2.0", "hash": -6339135323361192, "line_mean": 35.7356321839, "line_max": 85, "alpha_frac": 0.6081038798, "autogenerated": false, "ratio": 3.593029792017...
"""Bitcoin information service that uses blockchain.info.""" from datetime import timedelta import logging from blockchain import exchangerates, statistics import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ATTR_ATTRIBUTION, CONF_CURRENCY, CONF_DISPLAY...
{ "repo_name": "Teagan42/home-assistant", "path": "homeassistant/components/bitcoin/sensor.py", "copies": "1", "size": "6395", "license": "apache-2.0", "hash": -6991600497351094000, "line_mean": 35.7528735632, "line_max": 85, "alpha_frac": 0.6082877248, "autogenerated": false, "ratio": 3.594716132...
"""Bitcoin information service that uses blockchain.info.""" import logging from datetime import timedelta import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import CONF_DISPLAY_OPTIONS, ATTR_ATTRIBUTION, CONF_CURRENCY import homeassistant.helpers.config_vali...
{ "repo_name": "fbradyirl/home-assistant", "path": "homeassistant/components/bitcoin/sensor.py", "copies": "2", "size": "6444", "license": "apache-2.0", "hash": 2826144000345045000, "line_mean": 35.8228571429, "line_max": 85, "alpha_frac": 0.6087833644, "autogenerated": false, "ratio": 3.604026845...
# /* BitCompression # This sample is provided as-is, without any warranty. # # (c) 2007 ViALUX GmbH. All rights reserved. # */ # # // BlackWhiteSample.cpp : Defines the entry point for the console application. # // # # #include <TCHAR.h> # #include <windows.h> # #include <conio.h> # #include <stdio.h> # #include <stdli...
{ "repo_name": "BaptisteLefebvre/pyalp", "path": "tests/film_model.py", "copies": "1", "size": "16494", "license": "mit", "hash": 3755360090501790000, "line_mean": 27.0988074957, "line_max": 159, "alpha_frac": 0.5708136292, "autogenerated": false, "ratio": 2.310084033613445, "config_test": false...
# Bitfinex # https://bitfinex.readme.io/v2/docs # By Alessio Carrafa <ruzzico@gmail.com> from exchange import Exchange, CURRENCY class Bitfinex(Exchange): name = "Bitfinex" code = "bitfinex" ticker = "https://api.bitfinex.com/v2/ticker/" discovery = "https://api.bitfinex.com/v1/symbols" default...
{ "repo_name": "nilgradisnik/coinprice-indicator", "path": "coin/exchanges/bitfinex.py", "copies": "1", "size": "1572", "license": "mit", "hash": -753166888907653000, "line_mean": 22.4626865672, "line_max": 66, "alpha_frac": 0.4796437659, "autogenerated": false, "ratio": 3.707547169811321, "conf...
# BitFOREX – Providing current and historical foreign exchange rates as published by the European Central Bank, in exchange for bitcoin. # The rates are updated daily around 4PM CET # Rates are quoted against the Euro by default. Quote against a different currency by setting the base parameter in your request. import ...
{ "repo_name": "dukakisxyz/BitForex", "path": "bitforex.py", "copies": "1", "size": "1516", "license": "unlicense", "hash": 6780034555963721000, "line_mean": 26.0178571429, "line_max": 136, "alpha_frac": 0.7083333333, "autogenerated": false, "ratio": 3.265658747300216, "config_test": false, "h...
from AnalyzerEnvironment import * import TraceOperations import Common import StringIO import os from common import Collections displayModeNames = { 0: "ENone", 1: "EGray2", 2: "EGray4", 3: "EGray16", 4: "EGray256", 5: "EColor16", 6: "EColor256", 7: "EColor64K", 8: "EColor16M", 9...
{ "repo_name": "skyostil/tracy", "path": "src/analyzer/tools/bitgdi.py", "copies": "1", "size": "6304", "license": "mit", "hash": -8670208487006810000, "line_mean": 30.3282051282, "line_max": 124, "alpha_frac": 0.6218274112, "autogenerated": false, "ratio": 3.484798231066888, "config_test": fals...
# Bit like in image manipulation program, the screen output # consists of layers. We've got various different layers that # are filled up by the compositor. from OpenGL.GL import * from OpenGL.GL import shaders from ctypes import POINTER, cast, c_char, c_void_p, byref import atlas class ImageLayer(object): def __i...
{ "repo_name": "cheery/textended-edit", "path": "compositor/renderers.py", "copies": "1", "size": "14370", "license": "mit", "hash": -255248965151048200, "line_mean": 32.7323943662, "line_max": 93, "alpha_frac": 0.560125261, "autogenerated": false, "ratio": 3.2681373663861724, "config_test": fal...
# Bit manipulation def intToBit(number): return bin(int(number)).replace("0b", "") # return "{0:b}".format(int(number)) def intToHex(number): return hex(int(number)).replace("0x", "") def bitToInt(bitString): return int(bitString, 2) def hexToInt(hexString): return int(hexString, 16) def getBit(number, index)...
{ "repo_name": "honghaoz/CrackingTheCodingInterview", "path": "Cracking the Coding Interview/Chapter 5_Bit Manipulation/Bit.py", "copies": "1", "size": "1438", "license": "mit", "hash": 4959540779377200000, "line_mean": 22.1935483871, "line_max": 54, "alpha_frac": 0.6363004172, "autogenerated": fals...
# Bit manipulation utilities # # Long Le # University of Illinois # import numpy as np def reverseBits(x): mask = 1 rx = 0 for k in range(16): #print('k = '+str(k)) #print('mask = '+format(mask,'#018b')) #print('mask&x = '+format(mask&x,'#018b')) if mask&x != 0: ...
{ "repo_name": "long0612/randProbs", "path": "bits/bits.py", "copies": "1", "size": "2400", "license": "mit", "hash": -3539752163154602500, "line_mean": 19.6896551724, "line_max": 66, "alpha_frac": 0.445, "autogenerated": false, "ratio": 2.9593094944512948, "config_test": false, "has_no_keywor...
# bitmapbutton.py import button import containers import waxyobject import wx import os import styles def opj(path): """Convert paths to the platform-specific separator""" return apply(os.path.join, tuple(path.split('/'))) def loadbitmap(filename): """Load a bitmap from an image file""" return wx.Ima...
{ "repo_name": "bblais/plasticity", "path": "plasticity/dialogs/waxy/bitmapbutton.py", "copies": "1", "size": "1354", "license": "mit", "hash": 1725358897699950000, "line_mean": 26.6326530612, "line_max": 86, "alpha_frac": 0.5901033973, "autogenerated": false, "ratio": 3.5631578947368423, "confi...
# bitmap.py - define the class bitmap class Bitmap : def __init__(self, nBits, wordSize=16) : self.nBits = nBits self.wordSize = wordSize self.nWords = (nBits+self.wordSize-1)/self.wordSize self.masks = [] # 2**n for n = 1..16 (bit to set or get) self.nSet = 0 # Bits actually set in the...
{ "repo_name": "akhilari7/pa-dude", "path": "bitmap.py", "copies": "2", "size": "1596", "license": "mit", "hash": -2578661143359774000, "line_mean": 30.92, "line_max": 66, "alpha_frac": 0.5921052632, "autogenerated": false, "ratio": 3.192, "config_test": false, "has_no_keywords": false, "few...
# bitmap.py # Ideas for non-allocating classes based around a bitmap. Three classes are # presented: # IntSet: this is a set which is constrained to accept only integers in # a range 0 <= i <= maxval. Provides a minimal set of methods which can readily # be expanded. # SetByte: an even more minimal version of IntSet wh...
{ "repo_name": "peterhinch/micropython-samples", "path": "bitmap/bitmap.py", "copies": "1", "size": "3293", "license": "mit", "hash": 3445349934215732000, "line_mean": 23.0364963504, "line_max": 79, "alpha_frac": 0.5253568175, "autogenerated": false, "ratio": 3.4159751037344397, "config_test": f...
"""Bit masks for integers. Bit masks provide a flexible way of converting between bits and integers. They support arbitrary integer widths, signed values, and any bit ordering. Some use cases may filter, duplicate, or merge bits using special masks. A few standard masks are provided for convenience: INT8_MSB_FIRST ...
{ "repo_name": "mudaltsov/bitstream_iter", "path": "bitstream_iter/bitmasks.py", "copies": "1", "size": "4143", "license": "mit", "hash": -4891479433887395000, "line_mean": 32.144, "line_max": 79, "alpha_frac": 0.698769008, "autogenerated": false, "ratio": 3.53800170794193, "config_test": false,...
# bitoperations are fun, not that efficiency would be significant def encode(number): if number < 0: return None if number == 0: return b'\x00' varint_bytes = [] while number > 0: varint_bytes.append((number & 0x7f) | 0x80) number >>= 7 varint_bytes[-1] &= 0x7f ...
{ "repo_name": "felixbade/minecraft-proxy", "path": "app/client/varint.py", "copies": "1", "size": "1086", "license": "artistic-2.0", "hash": 7566938415655871000, "line_mean": 24.8571428571, "line_max": 75, "alpha_frac": 0.5985267035, "autogenerated": false, "ratio": 3.480769230769231, "config_t...
# Bits are stored in ascending order. # Remember: As bitvector is a mutable type, a __hash__ method is not # appropriate. from array import array from collections import defaultdict from itertools import islice, chain, repeat, izip_longest __all__ = ["bitvector"] class bitvector(object): def __init__(se...
{ "repo_name": "jwodder/bitvector.py", "path": "bitvector.py", "copies": "1", "size": "23394", "license": "mit", "hash": -5709374472541458000, "line_mean": 34.8254211332, "line_max": 86, "alpha_frac": 0.4490895101, "autogenerated": false, "ratio": 3.994877049180328, "config_test": false, "has_...
# bitsets - integer bits representing subsets of totally orderd finite set """Ordered subsets of a predetermined finite domain.""" from . import bases from . import meta from . import series __all__ = ['bitset'] __title__ = 'bitsets' __version__ = '0.8.3.dev0' __author__ = 'Sebastian Bank <sebastian.bank@uni-leipzi...
{ "repo_name": "xflr6/bitsets", "path": "bitsets/__init__.py", "copies": "1", "size": "1937", "license": "mit", "hash": 6032463587997884000, "line_mean": 35.5471698113, "line_max": 84, "alpha_frac": 0.6479091378, "autogenerated": false, "ratio": 3.567219152854512, "config_test": false, "has_no...
"""Ordered subsets of a predetermined finite domain.""" __title__ = 'bitsets' __version__ = '0.7.11.dev0' __author__ = 'Sebastian Bank <sebastian.bank@uni-leipzig.de>' __license__ = 'MIT, see LICENSE' __copyright__ = 'Copyright (c) 2013-2016 Sebastian Bank' from . import meta, bases, series __all__ = ['bitset'] d...
{ "repo_name": "pombredanne/bitsets", "path": "bitsets/__init__.py", "copies": "1", "size": "1914", "license": "mit", "hash": 5014339548698953000, "line_mean": 36.5294117647, "line_max": 84, "alpha_frac": 0.6415882968, "autogenerated": false, "ratio": 3.5977443609022557, "config_test": false, ...
# Bitstamp HTTP API functions # https://www.bitstamp.net/api/ # ============================= import hmac, hashlib, time, urllib2 # API authentication functions # ============================ def nonce_update(nonce): # return greater value between incremented nonce and current timestamp return int(max(int(nonce)+1...
{ "repo_name": "socec/bitstamp-simple", "path": "bstamp/api.py", "copies": "1", "size": "4352", "license": "mit", "hash": 168600360093138800, "line_mean": 26.8974358974, "line_max": 92, "alpha_frac": 0.6693474265, "autogenerated": false, "ratio": 3.2550486163051606, "config_test": false, "has_...
# Bitstamp # https://www.bitstamp.net/api/ # By Nil Gradisnik <nil.gradisnik@gmail.com> from exchange import Exchange, CURRENCY class Bitstamp(Exchange): name = "Bitstamp" code = "bitstamp" ticker = "https://www.bitstamp.net/api/v2/ticker/" discovery = "https://www.bitstamp.net/api/v2/trading-pairs-...
{ "repo_name": "nilgradisnik/coinprice-indicator", "path": "coin/exchanges/bitstamp.py", "copies": "1", "size": "1486", "license": "mit", "hash": -2902754077522308000, "line_mean": 23.7666666667, "line_max": 69, "alpha_frac": 0.5040376851, "autogenerated": false, "ratio": 3.7908163265306123, "co...
# Bits the scalers have in common - inherit from me! import logging import math import os import time from collections import OrderedDict import iotbx.merging_statistics from cctbx.xray import scatterer from cctbx.xray.structure import structure from xia2.Handlers.Citations import Citations from iotbx import mtz fr...
{ "repo_name": "xia2/xia2", "path": "src/xia2/Modules/Scaler/CommonScaler.py", "copies": "1", "size": "61094", "license": "bsd-3-clause", "hash": -9206007184249017000, "line_mean": 35.8036144578, "line_max": 98, "alpha_frac": 0.5277932367, "autogenerated": false, "ratio": 3.8012692882030863, "co...
BitStr DEFINITIONS ::= BEGIN -- F.2.5.1 -- Use a bit string type to model binary data whose format and -- length are unspecified, -- or specified elsewhere, and whose length in bits is not necessarily -- a multiple of eight. -- EXAMPLE G3FacsimilePage ::= BIT STRING -- a sequence of bits conforming to...
{ "repo_name": "palas/otp", "path": "lib/asn1/test/asn1_SUITE_data/BitStr.py", "copies": "97", "size": "1813", "license": "apache-2.0", "hash": -3417482573939526000, "line_mean": 30.375, "line_max": 87, "alpha_frac": 0.7043574186, "autogenerated": false, "ratio": 2.9384116693679094, "config_test...
""" bitstring classes """ __all__ = ['bitstrings'] # big-endian version implemented with list of ints import sys if sys.version_info[0] < 3 : def isint(x) : """Return True iff an integer""" return isinstance(x,(int,long)); lmap = map; else : def isint(x) : """Return True i...
{ "repo_name": "ms0/crypto", "path": "bitstring.py", "copies": "1", "size": "28758", "license": "mit", "hash": 9147107422067948000, "line_mean": 26.6434262948, "line_max": 90, "alpha_frac": 0.4474233257, "autogenerated": false, "ratio": 3.0031328320802007, "config_test": false, "has_no_keyword...
"""Bitteli feature extractor. """ import numpy as np from motif.core import FeatureExtractor from motif.feature_extractors import utils class BitteliFeatures(FeatureExtractor): '''Bitteli feature extractor Attributes ---------- ref_hz : float Reference frequency (Hz) for converting to cents....
{ "repo_name": "rabitt/motif", "path": "motif/feature_extractors/bitteli.py", "copies": "1", "size": "4685", "license": "mit", "hash": -4781582573601753000, "line_mean": 30.2333333333, "line_max": 79, "alpha_frac": 0.552828175, "autogenerated": false, "ratio": 4.2785388127853885, "config_test": ...
# BitTorrent Local Peer Discovery # as implemented by uTorrent et al. import socket import struct from hashutils import bintohex, hextobin class MulticastUDPSocket(socket.socket): def __init__(self, local_port, reuse=False): socket.socket.__init__(self, socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UD...
{ "repo_name": "jonls/lpd-monitor", "path": "lpd.py", "copies": "1", "size": "2417", "license": "mit", "hash": -9196057336316487000, "line_mean": 33.5285714286, "line_max": 94, "alpha_frac": 0.5523376086, "autogenerated": false, "ratio": 3.6510574018126887, "config_test": false, "has_no_keywor...
# Bittrex # https://bittrex.com/Home/Api # By "Sir Paul" <wizzard94@github.com> ''' Response example [{'Bid': 5655.15, 'MarketName': 'USDT-BTC', 'Ask': 5665.0, 'BaseVolume': 19499585.87469274, 'High': 5888.0, 'Low': 5648.0, 'Volume': 3393.61801172, 'OpenBuyOrders': 8505, 'Created': '2015-12-11T06:31:40.633', 'PrevDay':...
{ "repo_name": "nilgradisnik/coinprice-indicator", "path": "coin/exchanges/bittrex.py", "copies": "1", "size": "2138", "license": "mit", "hash": -3971394316892741000, "line_mean": 27.8918918919, "line_max": 312, "alpha_frac": 0.5173058934, "autogenerated": false, "ratio": 3.356357927786499, "con...
## BizSim Project ## By Benjamin Massey ## Written in Python 3.3.0 # Inform the Player of Rules and Theoretical Last Quarter print("You have inherited a business and now must run it. You will decide how much money to put into each category, changing the outcome of how your company will perform. You will determine the ...
{ "repo_name": "BenjaminMassey/BizSimProject", "path": "BizSimProjectWithDefs.py", "copies": "1", "size": "6241", "license": "mit", "hash": -4370711741467493400, "line_mean": 50.1557377049, "line_max": 770, "alpha_frac": 0.6465310046, "autogenerated": false, "ratio": 3.482700892857143, "config_t...
# bjb_task_scheduler # (c) 2014 Barry Bridgens # Fixed input file for now input_file_name = 'input.txt' class Task: def __init__(self, description, duration): self.description = description self.duration = duration def parse_duration(self, dur): pass def dump(self): print(self.description, self.duration)...
{ "repo_name": "barrybridgens/bjb_task_scheduler", "path": "sched.py", "copies": "1", "size": "1096", "license": "mit", "hash": 4380513667908887600, "line_mean": 19.2962962963, "line_max": 61, "alpha_frac": 0.6359489051, "autogenerated": false, "ratio": 2.8994708994708995, "config_test": false, ...
#bjShuffleStart.py #mcvan #16/Sept/14 from random import * import pygame DECKS = 1 playerHand = [] dealerHand = [] dealerScore = 0 playerScore = 0 doReset = False CARDPOINTS = {'AD': 11, 'AH': 11, 'AC': 11, 'AS': 11, 'KD': 10, 'KH': 10, 'KC': 10, 'KS': 10, 'QD': 10, 'QH': 10, 'QC': 10, 'Q...
{ "repo_name": "ProjectToWin/Puzzle-Game", "path": "blackjack.py", "copies": "1", "size": "6085", "license": "unlicense", "hash": 7799279084070221000, "line_mean": 28.5388349515, "line_max": 114, "alpha_frac": 0.514379622, "autogenerated": false, "ratio": 3.0935434672089475, "config_test": false...
"""BK-tree data structure to allow fast querying of "close" matches. For example usage, see README.rst. This code is licensed under a permissive MIT license -- see LICENSE.txt. The pybktree project lives on GitHub here: https://github.com/Jetsetter/pybktree """ from collections import deque from operator...
{ "repo_name": "Jetsetter/pybktree", "path": "pybktree.py", "copies": "1", "size": "5783", "license": "mit", "hash": -80998921881795740, "line_mean": 29.0913978495, "line_max": 89, "alpha_frac": 0.5331143005, "autogenerated": false, "ratio": 4.092710544939845, "config_test": false, "has_no_key...
black=10 milk=10 luxury=10 while True: money = input("자판기에 돈을 넣으세요 : ") if money == "admin": while True: print("관리자 모드입니다.\n1.블랙커피: %d개\n2.밀크커피: %d개\n3.고급커피: %d개 남았습니다." % (black, milk, luxury)) add = input("추가할 커피를 선택하세요(exit를 입력하면 종료됩니다.) : ") if add == "1": ...
{ "repo_name": "imn00133/pythonSeminar17", "path": "exercise/vending_machine/Sehun/09_10_coffee.py", "copies": "1", "size": "2328", "license": "mit", "hash": -6491039774197631000, "line_mean": 37.9591836735, "line_max": 101, "alpha_frac": 0.4198113208, "autogenerated": false, "ratio": 1.9118236472...
"""blackberry.py: Module which contains functionality enabling push notification messages to be sent to the Blackberry Push Service. """ from datetime import datetime, timedelta import base64 import uuid from StringIO import StringIO from twisted.internet.protocol import Protocol from twisted.python import log from tw...
{ "repo_name": "trulabs/pushpy", "path": "pushpy/blackberry.py", "copies": "1", "size": "5803", "license": "bsd-3-clause", "hash": -1623657774821808600, "line_mean": 35.9617834395, "line_max": 80, "alpha_frac": 0.6129588144, "autogenerated": false, "ratio": 4.638689048760991, "config_test": fals...
"""Black body fit to phoenix spectra. Sometimes works, but spectral lines and depressions are a problem. """ import os import matplotlib.pyplot as plt import numpy as np import simulators from astropy import units as u from astropy.analytic_functions import blackbody_lambda from astropy.io import fits from lmfit impo...
{ "repo_name": "jason-neal/companion_simulations", "path": "mingle/models/blackbody_continuum.py", "copies": "1", "size": "4679", "license": "mit", "hash": 6061163841063141000, "line_mean": 35.2015503876, "line_max": 120, "alpha_frac": 0.7002141328, "autogenerated": false, "ratio": 2.8081779915814...
# Black Grayscale Line Following Example # # Making a line following robot requires a lot of effort. This example script # shows how to do the machine vision part of the line following robot. You # can use the output from this script to drive a differential drive robot to # follow a line. This script just generates a s...
{ "repo_name": "kwagyeman/openmv", "path": "scripts/examples/Arduino/Portenta-H7/10-Color-Tracking/black_grayscale_line_following.py", "copies": "2", "size": "3762", "license": "mit", "hash": 1438178501003795700, "line_mean": 43.7857142857, "line_max": 98, "alpha_frac": 0.6868686869, "autogenerated"...
# Black Hat Python page 13 # Replacing Netcat - BHP Net Tool import getopt import socket import subprocess import sys import threading # global variables listen = False command = False # True if server is executing a command shell upload = False execute = "" target = "" upload_destination = "" port = 0 # TODO conv...
{ "repo_name": "benhunter/py-stuff", "path": "bhp/bhpnet.py", "copies": "1", "size": "10396", "license": "mit", "hash": 8983655782341131000, "line_mean": 30.9876923077, "line_max": 109, "alpha_frac": 0.5548287803, "autogenerated": false, "ratio": 4.141832669322709, "config_test": false, "has_n...
# To store high scores and data import shelve # For shuffling import random # To import special module for hand splitting (under construction) # from handsplit import handSplit as handSplit # Create player class class Player: def __init__(self, name, score=0, wallet=100, win=0, loss=0): self.name = name...
{ "repo_name": "jwalters006/blackjack", "path": "blackjack.py", "copies": "1", "size": "14920", "license": "mit", "hash": -1811239933056137500, "line_mean": 35.4792176039, "line_max": 137, "alpha_frac": 0.5315013405, "autogenerated": false, "ratio": 3.764824627807217, "config_test": false, "ha...
#Blackjack by Mike McGowan #It's Monday, June 25, 2007 as of now, but I'm pretty sure I finished this #a week or two ago. I cleaned it up yesterday. import random as r deck = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10]*4 dealer = [] player = [] c = 'y' #Clear works only if you run it from command line def clear(): ...
{ "repo_name": "ActiveState/code", "path": "recipes/Python/522992_Blackjack/recipe-522992.py", "copies": "1", "size": "2502", "license": "mit", "hash": 1967026789528400400, "line_mean": 29.512195122, "line_max": 96, "alpha_frac": 0.5107913669, "autogenerated": false, "ratio": 3.4087193460490464, ...
# Blackjack Game Contoller from bjcard import Deck from bjhand import * from bjview import Reader class BlackjackController: """defines Blackjack game controller class""" def __init__(self, name): """creates player/dealer's empty hand and a deck of cards argument: name -- player' name in string...
{ "repo_name": "imscs21/myuniv", "path": "1학기/programming/basic/파이썬/파이썬 과제/homework/blackjack 3/blackjack/blackjack_with_people_by_1by1.py", "copies": "2", "size": "2606", "license": "apache-2.0", "hash": 7524838876207152000, "line_mean": 32.4102564103, "line_max": 72, "alpha_frac": 0.5092095165, "a...
#Blackjack game class Blackjack(object): global bet,result,playing,deck,player_hand,dealer_hand,chip_pool bet = 0 def __init__(self): self.bet = 0 # First Bet def make_bet(): ''' Ask the player for the bet amount and ''' print ' What amount of chips would you like to bet? (Ente...
{ "repo_name": "RubenDuran/py_learning", "path": "Blackjack.py", "copies": "1", "size": "4840", "license": "mit", "hash": -3338292661044917000, "line_mean": 28.8765432099, "line_max": 94, "alpha_frac": 0.5200413223, "autogenerated": false, "ratio": 4.150943396226415, "config_test": false, "has...
# Blackjack # From 1 to 7 players compete against a dealer import cards, games class BJ_Card(cards.Card): """ A Blackjack Card. """ ACE_VALUE = 1 @property def value(self): if self.is_face_up: v = BJ_Card.RANKS.index(self.rank) + 1 if v > 10: v = 1...
{ "repo_name": "bohdan-shramko/learning-python", "path": "source/chapter09/blackjack.py", "copies": "2", "size": "5223", "license": "mit", "hash": 8257530193886594000, "line_mean": 25.7846153846, "line_max": 86, "alpha_frac": 0.5110089987, "autogenerated": false, "ratio": 3.8546125461254612, "co...
# Blackjack program # Started December 5, 2014 # by Justin Orner and Lance Orner import random # TODO: # Finish win/loss logic # Be able to play multiple games # Handle Ace correctly # Cleanup display # Ability to bet # Splitting hands # Double down def setupDeck (): deck=[] for rank in range(0,13): ...
{ "repo_name": "Rhinoxo/blackjack", "path": "blackjack.py", "copies": "1", "size": "2991", "license": "mit", "hash": 4869597652892735000, "line_mean": 21.8320610687, "line_max": 123, "alpha_frac": 0.5603477098, "autogenerated": false, "ratio": 3.3233333333333333, "config_test": false, "has_no_...
""" blackjack.py Author: Cole Howard A simple implementation of the game of blackjack. The user is tasked with defining the number of decks of 52 cards to be used in the shoe. The game can then be played until the shoe runs out or the user opts out. Dealer always wins ties. Usage ----- Copy the folder Blackjack ...
{ "repo_name": "uglyboxer/Blackjack", "path": "blackjack/bj_main.py", "copies": "1", "size": "7015", "license": "unlicense", "hash": -1070679211498722200, "line_mean": 28.1078838174, "line_max": 79, "alpha_frac": 0.543406985, "autogenerated": false, "ratio": 4.116784037558685, "config_test": fal...
#Blackjack import simplegui import random # load card sprite - 936x384 - source: jfitz.com CARD_SIZE = (72, 96) CARD_CENTER = (36, 48) card_images = simplegui.load_image("http://storage.googleapis.com/codeskulptor-assets/cards_jfitz.png") CARD_BACK_SIZE = (72, 96) CARD_BACK_CENTER = (36, 48) card_back = ...
{ "repo_name": "jmsstudio/practice-python", "path": "blackjack.py", "copies": "1", "size": "6201", "license": "mit", "hash": 7122464349505713000, "line_mean": 25.3171806167, "line_max": 122, "alpha_frac": 0.532010966, "autogenerated": false, "ratio": 3.319593147751606, "config_test": false, "h...
black_list = ["increment_references", "print_warnings"] class MockGPIOMetaClass(type): ''' This class is meant to be a meta class that is purely responsible for incrementing reference counts and logging arguments for the purpose of unit testing since MockGPIO will only ever be used in an environmen...
{ "repo_name": "hackernight/portal", "path": "hardware/mockgpio.py", "copies": "1", "size": "2018", "license": "mit", "hash": 2270681693147516400, "line_mean": 31.5483870968, "line_max": 79, "alpha_frac": 0.6060455897, "autogenerated": false, "ratio": 4.21294363256785, "config_test": false, "h...
"""Blacklist particular articles from doing particular activities""" def publication_email_article_do_not_send_list(): """ Return list of do not send article DOI id """ do_not_send_list = [ "00003", "00005", "00007", "00011", "00012", "00013", "00031", "00036", "00047", "00048", "00049...
{ "repo_name": "gnott/elife-bot", "path": "provider/blacklist.py", "copies": "2", "size": "37362", "license": "mit", "hash": 4999617352113141000, "line_mean": 72.5472440945, "line_max": 97, "alpha_frac": 0.4793372946, "autogenerated": false, "ratio": 2.560795065113091, "config_test": false, "h...
blacklists = None whitelists = None def find_blacklists(thrift): """ Finds all blacklists in a Apache Thrift module. :param thrift: The Apache Thrift module to search. :return: The list of blacklists contained in the Apache Thrift module. """ global blacklists blacklists = {blacklist: ge...
{ "repo_name": "zivia/grove", "path": "grammar/constraint.py", "copies": "1", "size": "3021", "license": "mit", "hash": -7100871489807110000, "line_mean": 32.5666666667, "line_max": 113, "alpha_frac": 0.6368752069, "autogenerated": false, "ratio": 4.3218884120171674, "config_test": false, "has...
"""Black model, of the Forward, not the Spot, price of the underlying asset. Present Value takes the form, PV = Z(0,T) * Black(F,K,T,vol) where Z(O,T) is a zero coupon bond maturing on the same date as the option. 'price' refers to what is called the 'Forward Value' = Present Value / Z(0,T). This removes discounting f...
{ "repo_name": "caseyclements/pennies", "path": "pennies/models/black.py", "copies": "1", "size": "8706", "license": "apache-2.0", "hash": -1524925344440738300, "line_mean": 34.5346938776, "line_max": 88, "alpha_frac": 0.6387548817, "autogenerated": false, "ratio": 3.450653983353151, "config_tes...
# Blackstar game import random class Blackstar: player = 0 crupier = 0 result = "" def __init__(self, crupier=None): self.crupier_ask(crupier) def crupier_ask(self, id_carta): self.crupier += Blackstar.get_carta(id_carta) # TODO Call by UI def player_stop(self, id_carta...
{ "repo_name": "javieriturra/blackstar", "path": "blackstar.py", "copies": "1", "size": "1411", "license": "mit", "hash": -1493441518900168700, "line_mean": 25.1296296296, "line_max": 53, "alpha_frac": 0.5294117647, "autogenerated": false, "ratio": 3.449877750611247, "config_test": false, "has...
#Blade Nelson #Written in August 2019 import cv2 import numpy as np eyeData = "xml/eyes.xml" faceData = "xml/face.xml" DOWNSCALE = 3 #Bools for control add_face_rect = False add_objects = False add_eye_rect = False #OpenCV boiler plate webcam = cv2.VideoCapture(0) cv2.namedWindow("Webcam Facial Tracking") classifier...
{ "repo_name": "powderblock/dank-cv", "path": "webcam.py", "copies": "2", "size": "2840", "license": "mit", "hash": 4384865657292851000, "line_mean": 28.5833333333, "line_max": 107, "alpha_frac": 0.5735915493, "autogenerated": false, "ratio": 3.227272727272727, "config_test": false, "has_no_ke...
"""Blade-related definitions and functions used across the library.""" from enum import Enum from typing import List, Tuple import tensorflow as tf class BladeKind(Enum): """Kind of blade depending on its degree.""" MV = "mv" EVEN = "even" ODD = "odd" SCALAR = "scalar" VECTOR = "ve...
{ "repo_name": "RobinKa/tfga", "path": "tfga/blades.py", "copies": "1", "size": "5692", "license": "mit", "hash": -2149508148755675000, "line_mean": 30.901734104, "line_max": 98, "alpha_frac": 0.6131412509, "autogenerated": false, "ratio": 3.5135802469135804, "config_test": false, "has_no_keyw...
"""B(l)agging meta-estimator, modified to handle imbalanced distributions.""" # Based on bagging.py. # Original Author: Gilles Louppe <g.louppe@gmail.com> # License: BSD 3 clause # # Adaptations by Tom Fawcett <tfawcett@acm.org>, noted as TEF inline. # # NOTE: This is NOT an official file of sklearn. It is based on #...
{ "repo_name": "pavank/DataScience-2017", "path": "PimaIndians-Diabetes/blagging.py", "copies": "1", "size": "35953", "license": "mit", "hash": -163852363247863420, "line_mean": 37.5348338692, "line_max": 82, "alpha_frac": 0.596055962, "autogenerated": false, "ratio": 4.337435155024732, "config_...
blame_phantom_html_template = """ <body id="inline-git-blame"> <style>{css}</style> <div class="phantom-arrow"></div> <div class="phantom"> <span class="message"> <strong>Git Blame</strong> ({user}) {date} {time} | <a href="prev?sha...
{ "repo_name": "psykzz/st3-gitblame", "path": "src/templates.py", "copies": "1", "size": "2557", "license": "mit", "hash": -1464214297797541000, "line_mean": 27.7303370787, "line_max": 109, "alpha_frac": 0.5076261244, "autogenerated": false, "ratio": 3.192259675405743, "config_test": false, "h...
"""Blank row inserter Create a program blankRowInserter.py that takes two integers and a filename string as command line arguments. Let’s call the first integer N and the second integer M. Starting at row N, the program should insert M blank rows into the spreadsheet. """ def main(): import sys import openp...
{ "repo_name": "JoseALermaIII/python-tutorials", "path": "pythontutorials/books/AutomateTheBoringStuff/Ch12/Projects/P2_blankRowInserter.py", "copies": "1", "size": "1214", "license": "mit", "hash": -2067411464216493000, "line_mean": 28.5609756098, "line_max": 124, "alpha_frac": 0.6344884488, "autog...
# blanyal, hiimbex :) ''' The goal of binary ssearch is to divide the search space in half every iteration Binary search also assumes you have a sorted list of integers and goes through every time and determines if the item you are searching for is greater than or less than your mid point and jumps to...
{ "repo_name": "saru95/DSA", "path": "Python/BinarySearch.py", "copies": "1", "size": "1036", "license": "mit", "hash": 101637457956297980, "line_mean": 34.724137931, "line_max": 92, "alpha_frac": 0.6129343629, "autogenerated": false, "ratio": 4.0627450980392155, "config_test": false, "has_no_...
#blast: blastp #database: nr #usage: python Blast_with_Fasta.py fasta_file e_threshold > output_file #output:SEQUENCE ID, SIZE, NUMBER OF HITS: # alignment title(description), alignemnt length, e-value, score, identity, accession import sys from Bio.Blast import NCBIWWW from Bio.Blast import NCBIXML from Bio ...
{ "repo_name": "NProfileAnalysisComputationalTool/npact", "path": "BLAST/Blast_with_Fasta.py", "copies": "2", "size": "1455", "license": "bsd-3-clause", "hash": -5574254256025438000, "line_mean": 32.8372093023, "line_max": 151, "alpha_frac": 0.7072164948, "autogenerated": false, "ratio": 2.7401129...
# blaster.py # # Open up a large number of socket connections with a server and then # just start randomly blasting it with messages. from socket import * import select import random NCONNECTIONS = 300 # Number of connections to make MSGSIZE = 1024 # Message size SERVER = ...
{ "repo_name": "iamaris/xpython", "path": "coroutines/blaster.py", "copies": "1", "size": "1215", "license": "apache-2.0", "hash": 1005235535428361700, "line_mean": 24.8510638298, "line_max": 69, "alpha_frac": 0.6, "autogenerated": false, "ratio": 3.7155963302752295, "config_test": false, "has...
# BLASTN 2.0a19MP-WashU [05-Feb-1998] [Build decunix3.2 01:53:29 05-Feb-1998] # BLASTP 2.0.4 [Feb-24-1998] class Algorithm(object): def __init__(self, name, version, description = ""): self.name = name # 'blastx', 'blastn', etc. self.version = version # '2.1.2' or '2.0a19MP...
{ "repo_name": "bryback/quickseq", "path": "genescript/Bio/Search.py", "copies": "3", "size": "5628", "license": "mit", "hash": 181466323066721860, "line_mean": 35.7843137255, "line_max": 78, "alpha_frac": 0.5442430704, "autogenerated": false, "ratio": 3.782258064516129, "config_test": false, ...
# Blatantly stolen from: # https://djangosnippets.org/snippets/1162/ import types from django.db import models from django.utils import simplejson as json from django.core.serializers.json import DateTimeAwareJSONEncoder from decimal import * class DataDumper: fields = {} def selectObjectFields(self,objectTyp...
{ "repo_name": "Miserlou/django-easy-api", "path": "easy_api/dumper.py", "copies": "1", "size": "2360", "license": "mit", "hash": 7111896605350794000, "line_mean": 34.223880597, "line_max": 85, "alpha_frac": 0.5237288136, "autogenerated": false, "ratio": 4.34622467771639, "config_test": false, ...
"""blather URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-bas...
{ "repo_name": "philmui/blather", "path": "blather/urls.py", "copies": "1", "size": "1284", "license": "mit", "hash": 2007201428182881300, "line_mean": 41.8, "line_max": 81, "alpha_frac": 0.6682242991, "autogenerated": false, "ratio": 3.242424242424242, "config_test": false, "has_no_keywords":...
"""blatter""" setup_info = dict( name="blatter", description="blats out static web sites", version="0.5", author='Jason Kirtland', author_email='jek@discorporate.us', license='MIT License', url='http://discorporate.us/jek/projects/blatter/', packages=['blatter'], scripts = ['scri...
{ "repo_name": "bbinet/blatter", "path": "setup.py", "copies": "1", "size": "1346", "license": "mit", "hash": -430224140064766100, "line_mean": 27.0416666667, "line_max": 62, "alpha_frac": 0.5943536404, "autogenerated": false, "ratio": 4.103658536585366, "config_test": false, "has_no_keywords"...
"""blatter""" setup_info = dict( name="bookmarkdown", description="Write books in Markdown.", version="0.0.1", author='Steve Losh', author_email='steve@stevelosh.com', license='MIT License', url='http://bitbucket.org/sjl/bookmarkdown/', packages=['bookmarkdown'], scripts = ['book...
{ "repo_name": "beni55/bookmarkdown", "path": "setup.py", "copies": "2", "size": "1280", "license": "mit", "hash": -3821635573306833400, "line_mean": 26.8260869565, "line_max": 60, "alpha_frac": 0.59921875, "autogenerated": false, "ratio": 4.280936454849498, "config_test": false, "has_no_keywo...
""" Blazegraph API for use with RDF framework """ import os import datetime import inspect import logging import json import requests import threading import pdb from bs4 import BeautifulSoup from rdfframework.utilities import (list_files, pick, p...
{ "repo_name": "KnowledgeLinks/rdfframework", "path": "rdfframework/connections/blazegraph.py", "copies": "1", "size": "33178", "license": "mit", "hash": -6711725714035445000, "line_mean": 42.4836173001, "line_max": 112, "alpha_frac": 0.5100066309, "autogenerated": false, "ratio": 4.56871385293307...
"""Blaze integration with the Pipeline API. For an overview of the blaze project, see blaze.pydata.org The blaze loader for the Pipeline API is designed to allow us to load data from arbitrary sources as long as we can execute the needed expressions against the data with blaze. Data Format ----------- The blaze Pip...
{ "repo_name": "dmitriz/zipline", "path": "zipline/pipeline/loaders/blaze.py", "copies": "2", "size": "29699", "license": "apache-2.0", "hash": -2435398597085626000, "line_mean": 31.8528761062, "line_max": 79, "alpha_frac": 0.6115357419, "autogenerated": false, "ratio": 4.176487132611447, "confi...
"""bldb URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based ...
{ "repo_name": "theresaanna/bldb", "path": "bldb/bldb_site/urls.py", "copies": "1", "size": "1055", "license": "mit", "hash": -2033297937199429000, "line_mean": 39.5769230769, "line_max": 84, "alpha_frac": 0.6938388626, "autogenerated": false, "ratio": 3.359872611464968, "config_test": false, ...
"""Blebox air_quality tests.""" import logging from unittest.mock import AsyncMock, PropertyMock import blebox_uniapi import pytest from homeassistant.components.air_quality import ATTR_PM_0_1, ATTR_PM_2_5, ATTR_PM_10 from homeassistant.const import ATTR_ICON, STATE_UNKNOWN from homeassistant.helpers import device_re...
{ "repo_name": "kennedyshead/home-assistant", "path": "tests/components/blebox/test_air_quality.py", "copies": "5", "size": "2905", "license": "apache-2.0", "hash": -3022581802218585000, "line_mean": 30.2365591398, "line_max": 86, "alpha_frac": 0.6925989673, "autogenerated": false, "ratio": 3.4832...
"""BleBox climate entities tests.""" import logging from unittest.mock import AsyncMock, PropertyMock import blebox_uniapi import pytest from homeassistant.components.climate.const import ( ATTR_CURRENT_TEMPERATURE, ATTR_HVAC_ACTION, ATTR_HVAC_MODE, ATTR_HVAC_MODES, ATTR_MAX_TEMP, ATTR_MIN_TEM...
{ "repo_name": "kennedyshead/home-assistant", "path": "tests/components/blebox/test_climate.py", "copies": "5", "size": "8100", "license": "apache-2.0", "hash": 4751976604667283000, "line_mean": 30.2741312741, "line_max": 86, "alpha_frac": 0.6771604938, "autogenerated": false, "ratio": 3.409090909...
"""BleBox climate entities tests.""" import logging from unittest.mock import AsyncMock, PropertyMock import blebox_uniapi import pytest from homeassistant.components.climate.const import ( ATTR_CURRENT_TEMPERATURE, ATTR_HVAC_ACTION, ATTR_HVAC_MODE, ATTR_HVAC_MODES, ATTR_MAX_TEMP, ATTR_MIN_TE...
{ "repo_name": "partofthething/home-assistant", "path": "tests/components/blebox/test_climate.py", "copies": "3", "size": "8082", "license": "mit", "hash": -1746570011149321500, "line_mean": 30.2046332046, "line_max": 86, "alpha_frac": 0.6766889384, "autogenerated": false, "ratio": 3.4058154235145...
"""BleBox climate entities tests.""" import logging import blebox_uniapi import pytest from homeassistant.components.climate.const import ( ATTR_CURRENT_TEMPERATURE, ATTR_HVAC_ACTION, ATTR_HVAC_MODE, ATTR_HVAC_MODES, ATTR_MAX_TEMP, ATTR_MIN_TEMP, CURRENT_HVAC_HEAT, CURRENT_HVAC_IDLE, ...
{ "repo_name": "mezz64/home-assistant", "path": "tests/components/blebox/test_climate.py", "copies": "13", "size": "8086", "license": "apache-2.0", "hash": 8997705519826886000, "line_mean": 30.1, "line_max": 86, "alpha_frac": 0.6766015335, "autogenerated": false, "ratio": 3.403198653198653, "con...
"""BleBox cover entities tests.""" import logging from unittest.mock import AsyncMock, PropertyMock import blebox_uniapi import pytest from homeassistant.components.cover import ( ATTR_CURRENT_POSITION, ATTR_POSITION, DEVICE_CLASS_DOOR, DEVICE_CLASS_GATE, DEVICE_CLASS_SHUTTER, STATE_CLOSED, ...
{ "repo_name": "partofthething/home-assistant", "path": "tests/components/blebox/test_cover.py", "copies": "3", "size": "13660", "license": "mit", "hash": 9184416994094663000, "line_mean": 31.2169811321, "line_max": 86, "alpha_frac": 0.6920937042, "autogenerated": false, "ratio": 3.720043572984749...
"""BleBox cover entities tests.""" import logging import blebox_uniapi import pytest from homeassistant.components.cover import ( ATTR_CURRENT_POSITION, ATTR_POSITION, DEVICE_CLASS_DOOR, DEVICE_CLASS_GATE, DEVICE_CLASS_SHUTTER, STATE_CLOSED, STATE_CLOSING, STATE_OPEN, STATE_OPENIN...
{ "repo_name": "soldag/home-assistant", "path": "tests/components/blebox/test_cover.py", "copies": "7", "size": "13664", "license": "apache-2.0", "hash": 2337498969622476000, "line_mean": 31.1505882353, "line_max": 86, "alpha_frac": 0.6920374707, "autogenerated": false, "ratio": 3.718095238095238,...
"""BleBox cover entity.""" from homeassistant.components.cover import ( ATTR_POSITION, STATE_CLOSED, STATE_CLOSING, STATE_OPENING, SUPPORT_CLOSE, SUPPORT_OPEN, SUPPORT_SET_POSITION, SUPPORT_STOP, CoverEntity, ) from . import BleBoxEntity, create_blebox_entities from .const import B...
{ "repo_name": "tchellomello/home-assistant", "path": "homeassistant/components/blebox/cover.py", "copies": "21", "size": "2690", "license": "apache-2.0", "hash": -6748334954973316000, "line_mean": 28.2391304348, "line_max": 77, "alpha_frac": 0.6420074349, "autogenerated": false, "ratio": 3.961708...
"""BleBox devices setup tests.""" import logging import blebox_uniapi from homeassistant.components.blebox.const import DOMAIN from homeassistant.config_entries import ENTRY_STATE_NOT_LOADED, ENTRY_STATE_SETUP_RETRY from .conftest import mock_config, patch_product_identify async def test_setup_failure(hass, caplo...
{ "repo_name": "pschmitt/home-assistant", "path": "tests/components/blebox/test_init.py", "copies": "19", "size": "1765", "license": "apache-2.0", "hash": 7281851980144278000, "line_mean": 28.4166666667, "line_max": 88, "alpha_frac": 0.7246458924, "autogenerated": false, "ratio": 3.454011741682974...
"""BleBox light entities implementation.""" import logging from blebox_uniapi.error import BadOnValueError from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_HS_COLOR, ATTR_WHITE_VALUE, SUPPORT_BRIGHTNESS, SUPPORT_COLOR, SUPPORT_WHITE_VALUE, LightEntity, ) from homeassistan...
{ "repo_name": "partofthething/home-assistant", "path": "homeassistant/components/blebox/light.py", "copies": "19", "size": "2784", "license": "mit", "hash": 5225184070277251000, "line_mean": 26.84, "line_max": 83, "alpha_frac": 0.6206896552, "autogenerated": false, "ratio": 3.80327868852459, "c...
"""BleBox light entities implementation.""" import logging from blebox_uniapi.error import BadOnValueError from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_RGBW_COLOR, COLOR_MODE_BRIGHTNESS, COLOR_MODE_ONOFF, COLOR_MODE_RGBW, LightEntity, ) from homeassistant.util.color impor...
{ "repo_name": "home-assistant/home-assistant", "path": "homeassistant/components/blebox/light.py", "copies": "2", "size": "2511", "license": "apache-2.0", "hash": 5404479651790628000, "line_mean": 26.9, "line_max": 81, "alpha_frac": 0.6212664277, "autogenerated": false, "ratio": 3.753363228699551...
"""Blebox switch tests.""" import logging import blebox_uniapi import pytest from homeassistant.components.switch import DEVICE_CLASS_SWITCH from homeassistant.const import ( ATTR_DEVICE_CLASS, SERVICE_TURN_OFF, SERVICE_TURN_ON, STATE_OFF, STATE_ON, ) from .conftest import ( async_setup_enti...
{ "repo_name": "mKeRix/home-assistant", "path": "tests/components/blebox/test_switch.py", "copies": "6", "size": "12258", "license": "mit", "hash": -1716157424752629800, "line_mean": 30.7564766839, "line_max": 86, "alpha_frac": 0.6785772557, "autogenerated": false, "ratio": 3.393687707641196, "c...
# BLEEDING EDGE DEVELOP SCRIPT - MERGED with master !!!!! # this is my most awesome code sample on the develop branch # its cutting edge - but if you want to see it # you supply ?branch=develop at the end of the documentation url useVirtualArduino = False; xPin = 9; yPin = 6; arduinoPort = "COM5"; cameraIndex...
{ "repo_name": "MyRobotLab/pyrobotlab", "path": "home/GroG/codeSample.py", "copies": "1", "size": "2441", "license": "apache-2.0", "hash": -468311637447801540, "line_mean": 27.2352941176, "line_max": 91, "alpha_frac": 0.7308480131, "autogenerated": false, "ratio": 3.032298136645963, "config_test...
# 2/3 compatibility from __future__ import division from __future__ import print_function from __future__ import absolute_import from future.utils import bytes_to_native_str, native_str_to_bytes from future.builtins import int, bytes from .characteristic import GATTCharacteristic from ..util import BLEUUID, UUIDAcce...
{ "repo_name": "matthewelse/bleep", "path": "bleep/gatt/service.py", "copies": "1", "size": "3196", "license": "apache-2.0", "hash": 2092568431169467000, "line_mean": 35.3181818182, "line_max": 121, "alpha_frac": 0.6711514393, "autogenerated": false, "ratio": 4.25, "config_test": false, "has_n...
# BLE iBeaconScanner based on https://github.com/adamf/BLE/blob/master/ble-scanner.py DEBUG = False # BLE scanner based on https://github.com/adamf/BLE/blob/master/ble-scanner.py # BLE scanner, based on https://code.google.com/p/pybluez/source/browse/trunk/examples/advanced/inquiry-with-rssi.py # https://github.com/pa...
{ "repo_name": "cwi-dis/igor", "path": "helpers/bleServer/bleServer/blescan.py", "copies": "1", "size": "7321", "license": "mit", "hash": -3284477449515683000, "line_mean": 32.5825688073, "line_max": 116, "alpha_frac": 0.6799617539, "autogenerated": false, "ratio": 2.7074704142011834, "config_te...
# BLE iBeaconScanner based on https://github.com/adamf/BLE/blob/master/ble-scanner.py # JCS 06/07/14 DEBUG = False # BLE scanner based on https://github.com/adamf/BLE/blob/master/ble-scanner.py # BLE scanner, based on https://code.google.com/p/pybluez/source/browse/trunk/examples/advanced/inquiry-with-rssi.py # https...
{ "repo_name": "codycharris/splunk_ibeacon", "path": "python/confscan.py", "copies": "1", "size": "6721", "license": "apache-2.0", "hash": 6141369868362061000, "line_mean": 35.1344086022, "line_max": 119, "alpha_frac": 0.6149382532, "autogenerated": false, "ratio": 2.971264367816092, "config_tes...
# BLE iBeaconScanner based on https://github.com/adamf/BLE/blob/master/ble-scanner.py # JCS 06/07/14 DEBUG = False #DEBUG = True # BLE scanner based on https://github.com/adamf/BLE/blob/master/ble-scanner.py # BLE scanner, based on https://code.google.com/p/pybluez/source/browse/trunk/examples/advanced/inquiry-with-rs...
{ "repo_name": "wwwins/RaspberryPi-beacon", "path": "blescan.py", "copies": "1", "size": "8765", "license": "mit", "hash": -2602802732934894600, "line_mean": 33.7817460317, "line_max": 122, "alpha_frac": 0.5673702225, "autogenerated": false, "ratio": 3.280314371257485, "config_test": false, "h...
#Blender 2.65 import bpy import os import struct def wrtf(a, b): file.write(struct.pack(a, b)) main_path = "c:/tmp/" outputfile = os.path.join(main_path, 'model.i3d') file = open(outputfile, 'wb') obj = bpy.context.active_object mesh = obj.data file.write(struct.pack("<i", len(mesh.polygons) * 3)) print(...
{ "repo_name": "mcidclan/i3d-engine", "path": "tools/i3d-export.py", "copies": "1", "size": "1422", "license": "apache-2.0", "hash": -8179942009761452000, "line_mean": 20.5454545455, "line_max": 57, "alpha_frac": 0.5302390999, "autogenerated": false, "ratio": 2.5529622980251347, "config_test": f...
#Blender 2.65 import bpy import os import struct class IVec: id = 0 x = 0.0 y = 0.0 z = 0.0 class OpenglData: id = -1 uv = IVec() v = IVec() def wrtf(a, b): file.write(struct.pack(a, b)) vs = [] vis = [] uvs = [] uvs_unique_values = [] obj = bpy.context.active_object m...
{ "repo_name": "mcidclan/i3d-engine", "path": "tools/i3d-vbo-unaligned-export.py", "copies": "1", "size": "2640", "license": "apache-2.0", "hash": 628201079399815700, "line_mean": 16.6, "line_max": 59, "alpha_frac": 0.5193181818, "autogenerated": false, "ratio": 2.5958702064896757, "config_test"...
# Blender 2.75 Cycles Material Script # # Instruction # ----------------------------------------------------------------------- # # - Export with jmc2obj OBJ File and Textures (Alpha into seperate files!) into one folder # Now you've got the following Folder Structure # # YourFolderName # |- tex (Folder) # ...
{ "repo_name": "SamOatesJams/Ludumdare33", "path": "Tools/j-mc-2-obj/conf/contrib/BLENDER_cycles.py", "copies": "1", "size": "80118", "license": "mit", "hash": 8223876999871968000, "line_mean": 48.2125307125, "line_max": 116, "alpha_frac": 0.5797074315, "autogenerated": false, "ratio": 3.210112989...
#! blender --background --python .\blend_export.py """ Automates the regeneration of various export formats from golden blend files. Note: In environments that do not support shebang execution, Blender may be invoked from the command line with the arguments from the first line of this script (see run_tests.bat). """ ...
{ "repo_name": "godotengine/godot-tests", "path": "tests/blend_export/blend_export.py", "copies": "1", "size": "1649", "license": "mit", "hash": -8660535872516845000, "line_mean": 40.225, "line_max": 121, "alpha_frac": 0.6373559733, "autogenerated": false, "ratio": 3.9075829383886256, "config_te...
#!blender -b blend-file-name -P blend2json.py -- output-file-name # # Render a blend file as json. # # File format reference: # https://svn.blender.org/svnroot/bf-blender/trunk/blender/doc/blender_file_format/ # # The following can change when blender opens the file: # . Addresses - the blend file is a memory dump so t...
{ "repo_name": "adamlatchem/toolchest", "path": "blend2json.py", "copies": "1", "size": "5608", "license": "apache-2.0", "hash": -7400122870840873000, "line_mean": 39.345323741, "line_max": 96, "alpha_frac": 0.6189372325, "autogenerated": false, "ratio": 3.8046132971506106, "config_test": false,...
#Blender export scene or collection of individuals #Note that this file is temporary and will be reformated into another directory #Overview #Gather objects to export in Blender #Solve export paths using object names and project target #Generate file directory trees if necissary #commit too git for version control #Ex...
{ "repo_name": "TheEnvironmentGuy/teg-inhouse", "path": "blenderOBJXMLXport/blenderOBJXMLXport.py", "copies": "1", "size": "12176", "license": "mit", "hash": 8534889205741253000, "line_mean": 29.7474747475, "line_max": 353, "alpha_frac": 0.6140768725, "autogenerated": false, "ratio": 3.89507357645...
# Blender import system clutter import bpy from bpy.types import GPencilFrame import bmesh from mathutils import Vector import math from math import sin, cos import numpy as np import sys from pathlib import Path UTILS_PATH = Path.home() / "Documents/python_workspace/data-science-learning" sys.path.append(str(UTILS_P...
{ "repo_name": "5agado/data-science-learning", "path": "graphics/blender/grease_pencil_tests.py", "copies": "1", "size": "7513", "license": "apache-2.0", "hash": -2070364187546074600, "line_mean": 33.787037037, "line_max": 107, "alpha_frac": 0.5978969786, "autogenerated": false, "ratio": 3.0392394...
# Blender import system clutter import bpy import bmesh from mathutils import Vector import numpy as np import json import sys from pathlib import Path UTILS_PATH = Path.home() / "Documents/python_workspace/data-science-learning" SRC_PATH = UTILS_PATH / "graphics/blender" sys.path.append(str(UTILS_PATH)) sys.path.app...
{ "repo_name": "5agado/data-science-learning", "path": "graphics/blender/sketch_rnn.py", "copies": "1", "size": "3992", "license": "apache-2.0", "hash": -5223796498078307000, "line_mean": 33.4224137931, "line_max": 117, "alpha_frac": 0.6029559118, "autogenerated": false, "ratio": 3.340585774058577...
# Blender import system clutter import bpy import bmesh import numpy as np from typing import List import sys from pathlib import Path UTILS_PATH = Path.home() / "Documents/python_workspace/data-science-learning" sys.path.append(str(UTILS_PATH)) import importlib import ds_utils.blender_utils importlib.reload(ds_util...
{ "repo_name": "5agado/data-science-learning", "path": "graphics/blender/growth_anim.py", "copies": "1", "size": "4546", "license": "apache-2.0", "hash": 3241285096729163300, "line_mean": 31.2482269504, "line_max": 105, "alpha_frac": 0.6328640563, "autogenerated": false, "ratio": 3.467581998474447...
# Blender import system clutter import sys from pathlib import Path from mathutils import Matrix, Vector import bpy UTILS_PATH = Path.home() / "Documents/python_workspace/data-science-learning" SRC_PATH = UTILS_PATH / "cellular automata" sys.path.append(str(SRC_PATH)) sys.path.append(str(UTILS_PATH)) import Automaton...
{ "repo_name": "5agado/data-science-learning", "path": "cellular automata/gol_donut.py", "copies": "1", "size": "5293", "license": "apache-2.0", "hash": -7109005273169597000, "line_mean": 33.8223684211, "line_max": 107, "alpha_frac": 0.6351785377, "autogenerated": false, "ratio": 3.255227552275522...
# Blender import system clutter import sys from pathlib import Path UTILS_PATH = Path.home() / "Documents/python_workspace/data-science-learning" SRC_PATH = UTILS_PATH / "graphics/l_systems" sys.path.append(str(UTILS_PATH)) sys.path.append(str(SRC_PATH)) import LSystem import importlib importlib.reload(LSystem) from ...
{ "repo_name": "5agado/data-science-learning", "path": "graphics/l_systems/l_system_blender.py", "copies": "1", "size": "5601", "license": "apache-2.0", "hash": -1058133289489657600, "line_mean": 37.1020408163, "line_max": 115, "alpha_frac": 0.5381181932, "autogenerated": false, "ratio": 3.4962546...
# Blender import system clutter import sys from pathlib import Path UTILS_PATH = Path.home() / "Documents/python_workspace/data-science-learning" sys.path.append(str(UTILS_PATH)) import bpy import bmesh from math import cos, sin, pi import numpy as np def generate_lightning_effect(obj, container, nb_flashes: int, n...
{ "repo_name": "5agado/data-science-learning", "path": "graphics/cocktail_cloud.py", "copies": "1", "size": "2448", "license": "apache-2.0", "hash": 7687257598545689000, "line_mean": 36.6769230769, "line_max": 113, "alpha_frac": 0.6405228758, "autogenerated": false, "ratio": 3.142490372272144, "...
# Blender Motion Tracking Addon 1.0 # © Simon Reichel 21.05.2016 bl_info = { "name": "Export Motion Tracking Data", "category": "Import-Export", } import bpy, os import numpy as np from bpy.props import BoolProperty as BoolProperty from bpy.props import StringProperty as StringProperty class ExportOperator(b...
{ "repo_name": "BiYonic/Blender-Motion-Export-Addon", "path": "motionExportAddon.py", "copies": "1", "size": "10131", "license": "mit", "hash": 3668156738304720000, "line_mean": 34.5438596491, "line_max": 117, "alpha_frac": 0.5663376111, "autogenerated": false, "ratio": 3.7925870460501683, "conf...
'''Blender Nif Plugin Main Export operators, function called through Export Menu''' # ***** BEGIN LICENSE BLOCK ***** # # Copyright © 2005-2015, NIF File Format Library and Tools contributors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted ...
{ "repo_name": "nightstrike/blender_nif_plugin", "path": "io_scene_nif/operators/nif_export_op.py", "copies": "1", "size": "6469", "license": "bsd-3-clause", "hash": 5577111104865962000, "line_mean": 36.6046511628, "line_max": 124, "alpha_frac": 0.6578540507, "autogenerated": false, "ratio": 4.014...
'''Blender Nif Plugin Main Import operators, function called through Import Menu''' # ***** BEGIN LICENSE BLOCK ***** # # Copyright © 2005-2015, NIF File Format Library and Tools contributors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted ...
{ "repo_name": "nightstrike/blender_nif_plugin", "path": "io_scene_nif/operators/nif_import_op.py", "copies": "1", "size": "6769", "license": "bsd-3-clause", "hash": -7644959017304892000, "line_mean": 37.6742857143, "line_max": 108, "alpha_frac": 0.6696217494, "autogenerated": false, "ratio": 4.29...
'''Blender operators, functions called through menus''' # ***** BEGIN LICENSE BLOCK ***** # # Copyright © 2005-2011, NIF File Format Library and Tools contributors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following ...
{ "repo_name": "amorilia/blender_nif_plugin", "path": "io_scene_nif/operators.py", "copies": "2", "size": "11689", "license": "bsd-3-clause", "hash": -5517205441468678000, "line_mean": 35.6394984326, "line_max": 124, "alpha_frac": 0.639202601, "autogenerated": false, "ratio": 4.162393162393163, ...
'''Blender operators, functions called through menus''' # ***** BEGIN LICENSE BLOCK ***** # # Copyright © 2005-2013, NIF File Format Library and Tools contributors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following ...
{ "repo_name": "nightstrike/blender_nif_plugin", "path": "io_scene_nif/operators/nif_common_op.py", "copies": "1", "size": "3446", "license": "bsd-3-clause", "hash": -1870639814210945300, "line_mean": 37.2777777778, "line_max": 111, "alpha_frac": 0.6734397678, "autogenerated": false, "ratio": 4.57...
"""Blender Plug-in for Nif import and export.""" # ***** BEGIN LICENSE BLOCK ***** # # Copyright © 2005-2011, NIF File Format Library and Tools contributors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following condition...
{ "repo_name": "griest024/PokyrimTools", "path": "blender_nif_plugin-develop/io_scene_nif/__init__.py", "copies": "2", "size": "4426", "license": "mit", "hash": -3382877783233154600, "line_mean": 34.9756097561, "line_max": 81, "alpha_frac": 0.7152542373, "autogenerated": false, "ratio": 3.68136439...