def __init__(self, parent): self.vergence = 0 # Horizontal separation self.vsep = 0 # Vertical separation self.left = self.right = '' # Right and left Images self.height = self.width = 0 # Height and Width self.conf = functions.getConfig(self, 'shutter') if self.conf == 0: # default configuration self.conf = {} self.conf['hardware'] = 'Nvidia3D' # OR eDimensionnal self.conf['rate'] = '60' print "OpenGL extension version - %d.%d\n" % gtk.gdkgl.query_version() display_mode = ( gtk.gdkgl.MODE_RGB | gtk.gdkgl.MODE_DEPTH | gtk.gdkgl.MODE_DOUBLE ) try: glconfig = gtk.gdkgl.Config(mode=display_mode) except gtk.gdkgl.NoMatches: display_mode &= ~gtk.gdkgl.MODE_DOUBLE glconfig = gtk.gdkgl.Config(mode=display_mode) print "is RGBA:", glconfig.is_rgba() print "is double-buffered:", glconfig.is_double_buffered() print "is stereo:", glconfig.is_stereo() print "has alpha:", glconfig.has_alpha() print "has depth buffer:", glconfig.has_depth_buffer() print "has stencil buffer:", glconfig.has_stencil_buffer() print "has accumulation buffer:", glconfig.has_accum_buffer() self.parent = parent # Drawing Area parent.stereo = GlDrawingArea(glconfig, self)
async def isDev(ctx): config = functions.getConfig() if ctx.message.author.guild.id == config["myGuild"]: for role in ctx.message.author.roles: if role.id == config["developer"]: return True return False
def __init__(self, parent): self.vergence = 0 # Horizontal separation self.vsep = 0 # Vertical separation self.left = self.right = '' # Right and left Images self.height = self.width = 0 # Height and Width self.conf = functions.getConfig(self, 'anaglyph') if self.conf == 0: # default configuration self.conf = {} self.conf['type'] = 'red/cyan'
def __init__(self): self.vergence = 0 # Horizontal separation self.vsep = 0 # Vertical separation self.left = self.right = '' self.height = self.width = 0 self.conf = functions.getConfig(self, 'interlaced') if self.conf == 0: # default configuration self.conf = {} self.conf['hardware'] = 'Zalman' self.conf['type'] = 'h1' # adaptable
def __init__(self): self.vergence = 0 # Horizontal separation self.vsep = 0 # Vertical separation self.left = self.right = '' # Right and left Images self.height = self.width = 0 # Height and Width self.conf = functions.getConfig(self, 'dualoutput') if self.conf == 0: # default configuration self.conf = {} self.conf['hardware'] = 'projectors' # OR eDimensionnal self.conf['type'] = 'left/right' # OR top/bottom
async def play(self, ctx, text): authorVoice = ctx.message.author.voice if authorVoice == None: await ctx.send("You are not in a voice channel!") else: channel = authorVoice.channel voice = get(self.client.voice_clients, guild=ctx.guild) if voice and voice.is_connected(): if not voice.channel.id == channel.id: await voice.move_to(channel) else: try: voice = await channel.connect() except: pass if voice.is_playing(): await ctx.send( f"<@{ctx.message.author.id}>, the previous command is not done yet." ) config = functions.getConfig() myGuild = get(self.client.guilds, id=config["myGuild"]) emoji = get(myGuild.emojis, name="redTick") await ctx.message.add_reaction(emoji=emoji) else: guildID = ctx.message.guild.id lang = functions.getLanguage(guildID) polly = functions.getPolly() #if lang in polly: #audio_path = modules.tts_module.polly(text, guildID, polly[lang]) #else: audio_path = modules.tts_module.googleTTS(text, guildID, lang) config = functions.getConfig() myGuild = get(self.client.guilds, id=config["myGuild"]) emoji = get(myGuild.emojis, name="greenTick") await ctx.message.add_reaction(emoji=emoji) voice.play(discord.FFmpegPCMAudio(audio_path)) voice.source = discord.PCMVolumeTransformer(voice.source) voice.source.volume = 0.70
async def on_ready(self): config = functions.getConfig() self.myGuild = get(self.client.guilds, id=config["myGuild"]) self.myLog = get(self.myGuild.channels, id=config["myLog"]) self.devRole = get(self.myGuild.roles, id=config["developer"])
# -*- coding: utf-8 -*- import os import functions import time smtp,port,sendmail, mail, passwd, files, outputdir = functions.getConfig() #Content will be used for the content of the mail (like a logfile) content = [] print sendmail print("#################################") content.append("#################################") print("# Pybackup version : {} #").format(functions.pybackupVersion) content.append("# Pybackup version : "+ functions.pybackupVersion +" #") print("#################################") content.append("#################################") print("This program comes with ABSOLUTELY NO WARRANTY") content.append("This program comes with ABSOLUTELY NO WARRANTY") print("The files : " + ",".join(files) + "will be backuped in :" + outputdir) content.append("The files : " + ",".join(files) + "will be backuped in :" + outputdir) print("Copying files ....\n") content.append("Copying files ....\n") for filess in files: result, err = functions.launchCmd("cp -v " + filess.rstrip() + " " + outputdir.rstrip()) print err print result content.append(err) content.append(result)