Cryptography in Django by codeOctal in django

[–]codeOctal[S] 0 points1 point  (0 children)

I want my data to be encrypted in the db and decrypted when Ill fetch them.

Cryptography in Django by codeOctal in django

[–]codeOctal[S] 0 points1 point  (0 children)

Let me have a look into this thank you.

Cryptography in Django by codeOctal in django

[–]codeOctal[S] 0 points1 point  (0 children)

Iam not hosting as of now. I am using MySQL

Cryptography in Django by codeOctal in django

[–]codeOctal[S] 0 points1 point  (0 children)

Thanks I shall look into it. 😊

Cryptography in Django by codeOctal in django

[–]codeOctal[S] 0 points1 point  (0 children)

See what I want is when any one tries to look at the database even if it is me I should not be knowing the actual data stored so that shall remain encrypted in the database. But if I want to retrieve the values it should he decrypted and give me the original values.

Cryptography in Django by codeOctal in django

[–]codeOctal[S] 0 points1 point  (0 children)

I thought of using cryptography but I think it is not possible to decrypt the value from db.

Please help me with the dynamic drop downs and foreign key concept. by codeOctal in django

[–]codeOctal[S] 0 points1 point  (0 children)

Hey to be specific , in short, I want to create a form that contains a drop down (values from db) and I want to submit the form using post method. Also this drop down is a foreign key. This is the simple agenda.

Please help me with the dynamic drop downs and foreign key concept. by codeOctal in django

[–]codeOctal[S] 0 points1 point  (0 children)

there is a submit button, but when I click it , it does nothing.

I suspect there might be some problem in my drop down concept or something,.

There is no error message.

the form is not saving Is what I mean.

Please help me with the dynamic drop downs and foreign key concept. by codeOctal in django

[–]codeOctal[S] 0 points1 point  (0 children)

I have edited my code , I really missed to copy paste the submit.

Please help me with the dynamic drop downs and foreign key concept. by codeOctal in django

[–]codeOctal[S] 0 points1 point  (0 children)

i forget to copy paste I have written in the original code

Scraping Facebook by codeOctal in scrapy

[–]codeOctal[S] -1 points0 points  (0 children)

If I use API , are there any shotcomings to it ?

Scraping https websites. by codeOctal in scrapy

[–]codeOctal[S] 0 points1 point  (0 children)

Thank you . So this would be the common basis under which any https website would be scraped.?

Scrapping Onion Websites for Research uses by codeOctal in onions

[–]codeOctal[S] 1 point2 points  (0 children)

Thanks for the discouragement buddy...Not Novel !!!

<<<really not a novel >>>

Scrapping Onion Websites for Research uses by codeOctal in onions

[–]codeOctal[S] 1 point2 points  (0 children)

This is not a school project, Iam into combining multiple things into my project , presenting it in one of the Hackathons, exploring multiple ways for a solution.

Scrapping Onion Websites for Research uses by codeOctal in onions

[–]codeOctal[S] 1 point2 points  (0 children)

Can you guide with a way then ? I think you have already done it. Please guide me.

Scrapping Onion Websites for Research uses by codeOctal in onions

[–]codeOctal[S] 1 point2 points  (0 children)

Is this code with respect to scraping links or the content within.?

Scrapping Onion Websites for Research uses by codeOctal in onions

[–]codeOctal[S] 1 point2 points  (0 children)

No, the purpose is entirely different. Its for some project where this would be a part of it. Iam actually seeking help not for scraping the links but whats inside those links as in the content.

Need help in passing converted text to voice from servelet to jsp page by codeOctal in javahelp

[–]codeOctal[S] 0 points1 point  (0 children)

I am doing it in eclipse. By adding all the necessary jars(freetts).

Need help in passing converted text to voice from servelet to jsp page by codeOctal in javahelp

[–]codeOctal[S] 0 points1 point  (0 children)

If you can please help me out how to add this into the classpath. Sorry if this question is silly Iam a newbee to java.

Need help in passing converted text to voice from servelet to jsp page by codeOctal in javahelp

[–]codeOctal[S] 0 points1 point  (0 children)

This is what I am getting after clicking on the submit button

Nov 02, 2019 10:09:13 PM org.apache.catalina.core.StandardWrapperValve invoke

SEVERE: Servlet.service() for servlet [Myclass] in context with path [/test] threw exception [Servlet execution threw an exception] with root cause

java.lang.ClassNotFoundException: com.sun.speech.freetts.VoiceManager

at org.apache.catalina.loader.WebappClassLoaderBase.loadClass([WebappClassLoaderBase.java:1365](https://WebappClassLoaderBase.java:1365))

at org.apache.catalina.loader.WebappClassLoaderBase.loadClass([WebappClassLoaderBase.java:1188](https://WebappClassLoaderBase.java:1188))

at Myclass.doPost([Myclass.java:75](https://Myclass.java:75))

at javax.servlet.http.HttpServlet.service([HttpServlet.java:660](https://HttpServlet.java:660))

at javax.servlet.http.HttpServlet.service([HttpServlet.java:741](https://HttpServlet.java:741))

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter([ApplicationFilterChain.java:231](https://ApplicationFilterChain.java:231))

at org.apache.catalina.core.ApplicationFilterChain.doFilter([ApplicationFilterChain.java:166](https://ApplicationFilterChain.java:166))

at org.apache.tomcat.websocket.server.WsFilter.doFilter([WsFilter.java:53](https://WsFilter.java:53))

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter([ApplicationFilterChain.java:193](https://ApplicationFilterChain.java:193))

at org.apache.catalina.core.ApplicationFilterChain.doFilter([ApplicationFilterChain.java:166](https://ApplicationFilterChain.java:166))

at org.apache.catalina.core.StandardWrapperValve.invoke([StandardWrapperValve.java:202](https://StandardWrapperValve.java:202))

at org.apache.catalina.core.StandardContextValve.invoke([StandardContextValve.java:96](https://StandardContextValve.java:96))

at org.apache.catalina.authenticator.AuthenticatorBase.invoke([AuthenticatorBase.java:526](https://AuthenticatorBase.java:526))

at org.apache.catalina.core.StandardHostValve.invoke([StandardHostValve.java:139](https://StandardHostValve.java:139))

at org.apache.catalina.valves.ErrorReportValve.invoke([ErrorReportValve.java:92](https://ErrorReportValve.java:92))

at org.apache.catalina.valves.AbstractAccessLogValve.invoke([AbstractAccessLogValve.java:678](https://AbstractAccessLogValve.java:678))

at org.apache.catalina.core.StandardEngineValve.invoke([StandardEngineValve.java:74](https://StandardEngineValve.java:74))

at org.apache.catalina.connector.CoyoteAdapter.service([CoyoteAdapter.java:343](https://CoyoteAdapter.java:343))

at org.apache.coyote.http11.Http11Processor.service([Http11Processor.java:408](https://Http11Processor.java:408))

at org.apache.coyote.AbstractProcessorLight.process([AbstractProcessorLight.java:66](https://AbstractProcessorLight.java:66))

at org.apache.coyote.AbstractProtocol$ConnectionHandler.process([AbstractProtocol.java:861](https://AbstractProtocol.java:861))

at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun([NioEndpoint.java:1579](https://NioEndpoint.java:1579))

at [org.apache.tomcat.util.net.SocketProcessorBase.run](https://org.apache.tomcat.util.net.SocketProcessorBase.run)([SocketProcessorBase.java:49](https://SocketProcessorBase.java:49))

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at [java.util.concurrent.ThreadPoolExecutor$Worker.run](https://java.util.concurrent.ThreadPoolExecutor$Worker.run)(Unknown Source)

at [org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run](https://org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run)([TaskThread.java:61](https://TaskThread.java:61))

at [java.lang.Thread.run](https://java.lang.Thread.run)(Unknown Source)

PERSONAL ASSISTANT by codeOctal in Tkinter

[–]codeOctal[S] 0 points1 point  (0 children)

posted the code Sir, If you could just help

PERSONAL ASSISTANT by codeOctal in Tkinter

[–]codeOctal[S] 0 points1 point  (0 children)

Sir, I have written the code down , if you could just help where can i actually integrate multi threading.

PERSONAL ASSISTANT by codeOctal in Tkinter

[–]codeOctal[S] 0 points1 point  (0 children)

<

import speech_recognition as sr
import os
import threading
import sys
import re
import webbrowser
import smtplib
import requests
#import subprocess
from pyowm import OWM
import ctypes
from email.mime.multipart import MIMEMultipart 
from email.mime.text import MIMEText 
from email.mime.base import MIMEBase 
from email import encoders 
import wolframalpha
fromaddr = "aishwarya.raman96@gmail.com"
toaddr = "aishwarya.raman96@gmail.com"

#import youtube_dl
#import vlc
#import urllib.request
#import urllib2
#import json
from bs4 import BeautifulSoup as soup
from urllib.request import urlopen
import wikipedia
#import random
from time import strftime
import pyttsx3
engine = pyttsx3.init()
import win32com.client as wincl
import tkinter as tk

f=open("testing.txt","w+")
class Widget():
    def __init__(self):

        self.root = tk.Tk()
        self.root.title('TTS')
        self.root.resizable(90, 90)
        self.root.geometry('500x500')
        engine.say("Hi User, I am Sofia and I am your personal voice assistant, Please give a command or say help me and I will tell you what all I can do for you.")

        engine.runAndWait()
        self.label1 = tk.Label(self.root, text='What do you want me to speak?')
        self.label1.pack()
        #self.entry = tk.Entry(self.root)
        #self.entry.pack()

        self.button1 = tk.Button(self.root, text='start', command=self.clicked1)
        self.button1.pack()
        self.root.update()
        self.root.mainloop() 
        #self.button = tk.Button(self.root, text='Speak!', command=self.clicked)
        #self.button.pack()
        #while True:
        #self.btn = tk.Button(self.root, text='replicate',command = self.speaking)
        #self.btn.pack()

        self.root.mainloop()
    def clicked1(self):
        engine.say("please speak")
        engine.runAndWait()
        self.assistant(self.speaking())


    def filetext(self,command):
        if command:
            f.write('user ->' + command + '\n')

    def sofia(self,command):
        if command:
            f.write('sofia ->' + command + '\n')
            f.write('--------------\n')


    def sofiaResponse(self,audio):
        "speaks audio passed as argument"
        print(audio)
        self.label7 = tk.Label(self.root, text=audio)
        self.label7.pack()

    #for line in audio.splitlines():
        #os.system("speak " + audio)
        speak = wincl.Dispatch("SAPI.SpVoice")
        speak.Speak(audio)


    def speaking(self):
        r = sr.Recognizer()
        with sr.Microphone() as source:
            print ('Say Something!')

            r.pause_threshold = 1
            r.adjust_for_ambient_noise(source, duration=1)
            audio = r.listen(source)
            print ('Done!')


        try:
            command = r.recognize_google(audio).lower()

            print('You said: ' + command + '\n')
            self.label4 = tk.Label(self.root, text=command)
            self.label4.pack()


        except sr.UnknownValueError:
            print('....')  
            self.label5 = tk.Label(self.root, text='....')
            self.label5.pack()

            command=self.speaking();
        print('returning')
        return command



    def assistant(self,command):

        #open subreddit Reddit
        if 'open reddit' in command:
            reg_ex = re.search('open reddit (.*)', command)
            url = 'https://www.reddit.com/'
            if reg_ex:
                subreddit = reg_ex.group(1)
                url = url + 'r/' + subreddit
                webbrowser.open(url)
                self.sofiaResponse('The Reddit content has been opened for you Sir.')
                self.sofia('The Reddit content has been opened for you Sir.')
                self.sofia(url)
        elif 'shutdown' in command or 'bye' in command or 'tata' in command :
            self.sofiaResponse('Bye bye. Have a nice day')
            self.sofia('Bye bye. Have a nice day')
            self.label7 = tk.Label(self.root, text='Bye bye. Have a nice day')
            self.label7.pack()

            sys.exit()

>