<commit_before>#!/usr/local/bin/python
# -*- coding: utf-8 -*-


#
# RFID Read
#



import os,sys
import time
import json
import rfidiot
import RPi.GPIO as GPIO
from colorama import init
init(strip=not sys.stdout.isatty()) # strip colors if stdout is redirected
from termcolor import cprint 
from pyfiglet import figlet_format
from RFIDapi import *
from screensavers import *
from pygame import mixer

import config

readerprofile = [0,3]  #action items are only the ones listed in the readerprofile
state = 0 
screensaverstate = 0
barSignal = 1

readerid = config.settings['readerID']
################################################################################    
def premiumVipHell(data):
    while barSignal:
        playAudio(str(data['visitortype']), readerid)
        GPIO.output(4,1)
    GPIO.outpout(4,0)
################################################################################  
def stopHell():
    barSignal=0
#GPIO Config RPi#
GPIO.setmode(GPIO.BCM)
GPIO.setup(21, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) #input for button, connected to 3.3V so pull down resistor
GPIO.setup(4, GPIO.OUT) #output for relay
GPIO.add_event_detect(21, GPIO.FALLING, callback=stopHell, bouncetime=300)
mixer.init()
# Card reader Functions
def open_reader():
	""" Attempts to open the card reader """
	try:
		card = rfidiot.card
		return card
	except:
		print "Couldn't open reader!"
		sys.exit()
		return None
<commit_msg>changes<commit_after>#!/usr/local/bin/python
# -*- coding: utf-8 -*-


#
# RFID Read
#



import os,sys
import time
import json
import rfidiot
import RPi.GPIO as GPIO
from colorama import init
init(strip=not sys.stdout.isatty()) # strip colors if stdout is redirected
from termcolor import cprint 
from pyfiglet import figlet_format
from RFIDapi import *
from screensavers import *
from pygame import mixer

import config

readerprofile = [0,3]  #action items are only the ones listed in the readerprofile
state = 0 
screensaverstate = 0
barSignal = 1

readerid = config.settings['readerID']
################################################################################    
def premiumVipHell(data):
    while barSignal:
        playAudio(str(data['visitortype']), readerid)
        GPIO.output(4,1)
    GPIO.outpout(4,0)
################################################################################  
def stopHell():
    barSignal=0
#GPIO Config RPi#
GPIO.setmode(GPIO.BCM)
GPIO.setup(21, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) #input for button, connected to 3.3V so pull down resistor
GPIO.setup(4, GPIO.OUT) #output for relay
GPIO.add_event_detect(21, GPIO.FALLING, callback=stopHell, bouncetime=300)
mixer.init()
mixer.pre_init(44100, 16, 2, 4096) #frequency, size, channels, buffersize
# Card reader Functions
def open_reader():
	""" Attempts to open the card reader """
	try:
		card = rfidiot.card
		return card
	except:
		print "Couldn't open reader!"
		sys.exit()
		return None

{'fraction_non_alphanumeric': 0.2010981468771448, 'fraction_numerical': 0.018531228551818806, 'mean_word_length': 5.0227272727272725, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1260505', 'n_tokens_mistral': 956, 'n_tokens_neox': 891, 'n_words': 270}