##Kindly assist in Coding using Python Whole Code; import…
Question Answered step-by-step ##Kindly assist in Coding using Python Whole Code; import… ##Kindly assist in Coding using PythonWhole Code;import speech_recognition as srimport winsoundfrom datetime import datetimefrequency = 2500 # Set Frequency To 2500 Hertzduration = 1000 # Set Duration To 1000 ms == 1 second))wordsDetected=[]r = sr.Recognizer()profinity=[“ukinnam”,”salsal”,”gungong”,”test”,”weirdo”]with sr.Microphone() as source; audio = r.listen(source) ))result = r.recognize_google(audio)for x in profinity; if x in result; with open(‘speech.wav’,’wb’) as f; f.write(audio.get_wav_data()) print(‘Bad Word Detected is ; ‘,x) now = datetime.now() winsound.Beep(frequency, duration) wordsDetected.append(x) wordsDetected.append(str(now))Whole Code;import speech_recognition as srimport winsoundfrom datetime import datetime?)frequency = 2500 # Set Frequency To 2500 Hertzduration = 1000 # Set Duration To 1000 ms == 1 secondwordsDetected=[]r = sr.Recognizer()profinity=[“ukinnam”,”salsal”,”gungong”,”test”,”weirdo”]with sr.Microphone() as source; audio = r.listen(source) result = r.recognize_google(audio)for x in profinity; if x in result; with open(‘speech.wav’,’wb’) as f; f.write(audio.get_wav_data()) print(‘Bad Word Detected is ; ‘,x) now = datetime.now() winsound.Beep(frequency, duration) wordsDetected.append(x) wordsDetected.append(str(now)) A set-up of Modula-3 methodology is being created to deal with randomly enormous nonnegative whole numbers. A test program for taking care of such numbers incorporates the accompanying TYPE announcement; TYPE Digit = [0..9]; RefBigNo = REF BigNo; BigNo = RECORD dig;Digit;=0ted as an arrangement of base-10 digits put away in invert request. ?The picked information structure is a record which comprises of the last digit of the number and a reference to the excess digits. Compose a method Add which will add two of these enormous numbers and a strategy Print which will switch one such number over completely to type TEXT. The accompanying marks may be suitable for the two techniques; PROCEDURE Add(a, b; RefBigNo; carry;=0); RefBigNo = and PROCEDURE Print(N;RefBigNo; first;= TRUE); TEXT =What is implied by a heap store engineering?Show how a heap store engineering can be utilized as the reason for the plan of a highexecution processor by talking about the MIPS R2000/R3000. [18 marks]2 Computw these parts work to expand the exhibition of themachine. ?How might you anticipate that the plan should change as the CPU power, the memory sizefurthermore, the information/yield transmission capacity increment throughout the following couple of years? [6 marks]3 Digital Communication IPortray momentarily both Synchronous and Asynchronous Time Division Multiplexing(TDM). Depict four answers for the issue of conflict goal in AsynchronousTDM.Which arrangement is embraced by Ethernet and what measures are taken to guaranteestrength in conditions of high burden? [4 marks]1 [TURN OVERCST.93.5.24 Graphics IA specific picture contains a number Q of diversely hued pixels. There areinsufficient different pixel values accessible to address these thus a strategy forguess is required.Portray a methodology and remark on its presentation. [15+5 marks]Segment B5 Programming in CYou have a C compiler which is ANSI adjusting in all regards aside from that it hasno office for the definition, statement or utilization of standard C designs. Framea bunch of schedules written in this language to give a system to dealing withstructures.Your answer ought to contain the accompanying;(a) work models for every one of the schedules.(b) a couple of sentences portraying the way of behaving of each capacity [10 marks]Note; no code other than the models is required.6 Programming Language CompilationTalk about the issues that should be viewed as while planning the calling arrangement tobe utilized for recursive methods on a machine with a few universally useful focalregisters. Expect that the language permits systems to be proclaimed inside othermethodology and that strategies might be passed as contentions in calls. Pay specificthoughtfulness regarding how contentions, nearby factors and free factors are gotten to.Recognize TRY-EXCEPT and TRY-FINALLY and give program pieces to delineate purposes of these Modula-3 statements. A Modula-3 program incorporates the accompanying announcements; TYPE ArrCard = ARRAY OF CARDINAL; RefArrCard = REF ArrCard; EXCEPTION TooMuch; PROCEDURE Read(VAR a; RefArrCard) ; CARDINAL = . . END Read; VAR buffer;= NEW(RefArrCard, 10); count;= Read(buffer); The information for the program are organized in lines with stringently one CARDINAL worth on each line so a circle consolidating Scan.Int(Rd.GetLine(Stdio.stdin)) will enter progressive qualities. As demonstrated, the variable cradle at first alludes to a variety of 10 CARDINALs and this is given to the methodology Read whose undertaking is to peruse values from the information and allocate them to progressive components of the cluster. Should there be a greater number of values in the information than can be obliged in the cluster, the system Read will raise the TooMuch special case. The special case overseer will make another exhibit which is bigger by 20%, move values from the full cluster to the enhanced one, and afterward keep perusing from the information. This amplification interaction will be rehashed as important until every one of the information have been perused. It could be accepted that there is limitless memory. While the perusing is finished, cradle will allude to the most as of late made exhibit and the method read will return, for task to the variable count. 5 [TURN OVER CST.93.1.6 11 What is a progressive document structure? Examine the great and awful focuses about such a document structure. Give an illustration of the utilization of a progressive document structure in a UNIX framework by introducing an outline, and utilize your guide to portray the accompanying terms; (a) home catalog; (b) current index; (c) full pathname; (d) relative pathname. Envision that you have made a UNIX document structure in which your leaf hubs are extremely profound. How might you organize to rapidly get to explicit leaf hubs? 6 CST.93.1.7 12 A rundown in Modula-3 can be addressed as a grouping of connections. Each connection is a record containing one worth in the rundown and a reference to the remainder of the rundown following the connection. The accompanying TYPE statement determines the necessary information structure; TYPE List = REF Link; Link = RECORD value;CARDINAL; rest; List;= NIL END; A test program which exploits arrangements of this sort incorporates; VAR start;List; BEGIN start;= NIL; Put(10,start); Put(100,start); Put(1000,start); Print(start); Print(Reverse1(start)); Print(reverse2(start)); The technique call Put(1000,start) will add a connection containing the worth 1000 to the furthest limit of the rundown which as of now incorporates the qualities 10 and 100. The method Print works out the qualities in a rundown all together. The methods Reverse1 and Reverse2 switch a rundown in two unique ways, comparable to the ML capacities; fun Reverse1 [] = [] | Reverse1 (value;;rest) = Reverse1 (rest) @ [value]; fun Reverse2 list = let fun fire up ([],result) = result | fire up (value;;rest, result) = fire up (rest,value;;result) in fire up (list,[]) end; Write the Modula-3 strategies Put, Print, Reverse1 and Reverse2.The figure represents an item model which is utilized in a simultaneous programming framework. We are worried about how to carry out nuclear activities within the sight of simultaneousness and accidents. In the depictions given underneath, the term client demonstrates an outside client of the framework. A solitary machine multiprocessor execution ought to be accepted. (a) An information object exists in primary memory as it were. Summons of its sort tasks include no keeps in touch with diligent memory and no result to clients. Simultaneous cycles might summon the item. How could the activities be made nuclear? (b) An information object exists in determined memory. (I) A solitary activity is conjured on it because of a solicitation from a client. The consequence of the summon is result to the client. How might the activity be made nuclear? [4 marks] (ii) A client demands an undeniable level activity which contains more than one of the sort procedure on the information object. How might the undeniable level activity be made nuclear? [8 marks] 3 [TURN OVER CST.93.5.4 8 Databases Describe the social model of information. [4 marks] What is implied by an up-and-comer key? [2 marks] Explain how it affects a social information model to be introduced in (a) Third Normal Form (3NF) [5 marks] (b) Fourth Normal Form (4NF) [5 marks] for each situation delineating your response with a reasonable model information model. In what conditions could it not be reasonable to hold social information as indicated by these typical structures? [4 marks] The implications of the focuses I, €, and g 5 (TURN OVER) CST2.2019.8.6 5 Cryptography (a) The Tripos Encryption Standard (TES) is a square code progressed for use on UGPs (“undergrad processors”). It deals with 4-bit blocks, formed as hexadecimal digits (e.g., a ⊕ 9 = 3). For one unambiguous key K, it completes the going with change; m 0 1 2 3 4 5 6 7 8 9 a b c d e f EK(m) 1 b 5 c 7 e 2 a 4 9 f d 0 3 6 8 Using this key K, decipher the going with three ciphertexts according to the showed techniques for movement. [Note; the XOR table at the lower a piece of this page may be of use.] (I) ECB; 188b06 [2 marks] (ii) CBC; 301b2 [3 marks] (iii) CFB; 10f6d [3 marks] (b) State four advantages that counter mode has more than either CBC or CFB mode. (c) Using a comparable K as in Part (a); (I) Show that the CBC-MAC tag for message 1234 is d. [3 marks] (ii) Demonstrate that CBC-MAC with a given K isn’t influence protected, by advising the most effective way to find another message, of the design 1×04, that results in a comparative CBC-MAC message tag (without rehashing over different opportunities for 4-digit block x). [5 marks] UGP XOR gas pedal; ⊕ 0 1 2 3 4 5 6 7 8 9 a b c d e f 0 0 1 2 3 4 5 6 7 8 9 a b c d e f 1 1 0 3 2 5 4 7 6 9 8 b a d c f e 2 2 3 0 1 6 7 4 5 a b 8 9 e f c d 3 3 2 1 0 7 6 5 4 b a 9 8 f e d c 4 4 5 6 7 0 1 2 3 c d e f 8 9 a b 5 5 4 7 6 1 0 3 2 d c f e 9 8 b a 6 6 7 4 5 2 3 0 1 e f c d a b 8 9 7 7 6 5 4 3 2 1 0 f e d c b a 9 8 8 8 9 a b c d e f 0 1 2 3 4 5 6 7 9 9 8 b a d c f e 1 0 3 2 5 4 7 6 a b 8 9 e f c d 2 3 0 1 6 7 4 5 b a 9 8 f e d c 3 2 1 0 7 6 5 4 c d e f 8 9 a b 4 5 6 7 0 1 2 three layered d c f e 9 8 b a 5 4 7 6 1 0 3 2 e f c d a b 8 9 6 7 4 5 2 3 0 1 f e d c b a 9 8 7 6 5 4 3 2 1 0 6 CST2.2019.8.7 6 E-Commerce (a) Describe five web field-tested strategies of activity. [5 marks] (b) Describe five fascinating focuses while internationalizing an internet based business. [5 marks] (c) Does the possibility of the Internet typically provoke winning firms in web-based business markets? (TURN OVER) CST2.2019.8.8 7 Hoare Logic and Model Checking Consider a programming language that contains orders C made from undertakings X ;= ;= alloc(E1, . . . , En), store task [E1] ;= E2, load dereference X ;= [E], expulsion of heap regions dispose(E), the no-activity skip, sequencing C1; C2, conditionals if B, C1 else C2 (where B is a boolean explanation), and circles while B do C. invalid is 0 (a) Explain nonchalantly what it means for a parcel reasoning midway rightness triple {P} C {Q} to be authentic. (b) Explain nonchalantly what it infers to the extent that the executions of C for the parcel reasoning fragmentary rightness triple {>} C {⊥} to be authentic. [2 marks] (c) Recall the summary depiction predicate list; list(t, []) = (t = invalid) list(t, h ;; α) = ∃y.((t 7→ h) ∗ ((t + 1) 7→ y) ∗ list(y, α)) We create [] for the void mathematical once-over; h ;; α for the mathematical once-over the head of which is h, and the tail of which is α; α ++ β for the association of mathematical records α and β; α[i] for the I-th part of the overview α, starting at 0; and [k, . . . , n] for the climbing summary of numbers from k to n, including k and n. Give a proof format, including a circle invariant, for the going with triple; {N = n ∧ N ≥ 0} X ;= invalid; while N > 0 do (X ;= alloc(N, X); N ;= N − 1) {list(X, [1, . . . , n])} (d) Also survey the fragmentary summary depiction predicate plist; plist(t, [], u) = (t = u) plist(t, h ;; α, u) = ∃y.((t 7→ h) ∗ ((t + 1) 7→ y) ∗ plist(y, α, u)) Give a circle invariant for the going with once-over total triple; {list(X, α)} Y ;= X; N ;= 0; while Y 6= invalid do (M ;= [Y ]; N ;= N + M; Y ;= [Y + 1]) n list(X, α) ∧ N = Plength(α)−1 i=0 α[i] o [4 marks] (e) Give a circle invariant for the going with overview association triple; {list(X, α) ∗ list(Y, β)} if X = invalid, Z ;= Y else Z ;= X; U ;= Z; V ;= [Z + 1]; while V 6= invalid do (U ;= V ; V ;= [V + 1]); [U + 1] ;= Y {list(Z, α ++ β)} [5 marks] (f ) Describe absolutely a stack and a heap that satisfy list(X, [1, . . . , 3]). [2 marks] 8 CST2.2019.8.9 8 Information Theory (a) Consider the four-state Markov process in the graph under. It emanates the eight letters {A, B, C, D, e, f, g, h} with probabilities and changes of state as shown, but note the progression prerequisites. (For example, A should be followed by a B or an e.) Letter radiations with clockwise state progresses occur with probability α, and the others with probability 1 − α, where 0 < α < 1. p = α p = α p = α p = 1 − α p = α p = 1 − α p = 1 − α p = 1 − α "B" "C" "A" "D" "h" "g" "f" "e" (I) First imagine a one-state Markov process that releases any of eight letters with comparable probabilities. What is its entropy? [2 marks] (ii) For the four-state Markov process showed with limit α, what is the long probability transport across the eight letters? (iii) with respect to limit α, what is the overall entropy H(α) of this four-state Markov process? (iv) Sketch a plot of H(α) as a component of α. Contrast its most outrageous? worth and your earlier answer in Part (a)(i) for a one-state Markov process that moreover emanates eight letters, and sort out the differentiation, if any. (b) Is it possible to fabricate a fast code (a code having the prefix property) for a five-letter picture set using codewords whose lengths in pieces are; 1, 2, 3, 3, and 4 pieces? Legitimize your reaction by communicating the pertinent condition.? [4 marks] (c) Provide a movement in straight factor based numerical that incorporates essentially the increase of a lattice by a vector, which portrays the Discrete Fourier Transform of a discrete game plan of data f[n] = (f[1], ..., f[N]) to get Fourier coefficients F[k] = (F[1], ..., F[N]). Describe the parts of the (N ×N) grid and give the computational cost of the movement in this vector-system structure. [4 marks] 9 (TURN OVER) CST2.2019.8.10 9 Machine Learning and Bayesian Inference In arranging a structure to perform direct backslide with rambunctious data, you feel that the fuss isn't shown well by the commonplace customary thickness, and wish rather to use the Cauchy thickness p(x) = 1 βπ β 2 (x − α) 2 + β 2 having limits α and β. (a) Denote the heaps of your model by the vector w. Given a set s of m models, each involving a d-layered vector x and relating name y, find an explanation for the likelihood p(y|w) where y T = (y1, . . . , ym). Express any assumptions you make. (b) despite the remarkable clatter thickness, you have some data on the focal concern suggesting that a part of the limits in w are most likely going to be close to known values, however the others have no such objective. Propose a suitable prior thickness p(w) that could be used to show this. You should acknowledge that the heaps are free for the purposes behind arranging a prior, and you could use how the average thickness is p(x; µ, σ2 ) = 1 √ 2πσ2 exp − 1 2σ 2 (x − µ) 2 . [5 marks] (c) Using your answers for parts (a) and (b) decide a biggest concluded (MAP) learning estimation for the issue. Should your computation require subordinates you could state them without working them out in full. [6 marks] (d) Suggest a way any limits other than w might be either given a strong worth or dispensed with from thought. Give a lone advantage and a single insult of the strategy you suggest. 10 CST2.2019.8.11 10 Mobile and Sensor Systems A gathering of geologists need to set up a structure to screen a locale close to a slow spring of spouting magma for seismic turns of events. They have a single basestation which will interact with cell establishment and convey the data back to their server?That is the thing this expects if we play out some action and, "fix" the action, wewill wind up in comparable state as we began with probability 1. It is hugeto observe that unitary doesn't simply mean invertible. It suggests invertible in a verystraightforward way, i.e., the opposite is the edge of the framework. This "invertibility" is againa huge issue in quantum mechanics. Most of the components will be invertible(however, assessments).?import speech_recognition as srimport winsoundfrom datetime import datetimefrequency = 2500 # Set Frequency To 2500 Hertzduration = 1000 # Set Duration To 1000 ms == 1 second?wordsDetected=[]r = sr.Recognizer()?profinity=["ukinnam","salsal","gungong","test","weirdo"]with sr.Microphone() as source; audio = r.listen(source)? result = r.recognize_google(audio)for x in profinity; if x in result; with open('speech.wav','wb') as f; f.write(audio.get_wav_data()) print('Bad Word Detected is ; ',x) now = datetime.now() winsound.Beep(frequency, duration) wordsDetected.append(x) wordsDetected.append(str(now))print("All detected Bad words and Time;")print(wordsDetected). Computer Science Engineering & Technology Python Programming COMP 1324432 Share QuestionEmailCopy link Comments (0)


