Found 9 repositories(showing 9)
mischasigtermans
Claude Code plugin channeling Taylor Otwell's Laravel philosophy.
noahjonesx
Markov Text Generation Problem Description The Infinite Monkey Theorem1 (IFT) says that if a monkey hits keys at random on a typewriter it will almost surely, given an infinite amount of time, produce a chosen text (like the Declaration of Independence, Hamlet, or a script for ... Planet of the Apes). The probability of this actually happening is, of course, very small but the IFT claims that it is still possible. Some people have tested this hypotheis in software and, after billions and billions of simulated years, one virtual monkey was able to type out a sequence of 19 letters that can be found in Shakespeare’s The Two Gentlemen of Verona. (See the April 9, 2007 edition of The New Yorker if you’re interested; but, hypothesis testing with real monkeys2 is far more entertaining.) The IFT might lead to some interesting conversations with Rust Cohle, but the practical applications are few. It does, however, bring up the idea of automated text generation, and there the ideas and applications are not only interesting but also important. Claude Shannon essentially founded the field of information theory with the publication of his landmark paper A Mathematical Theory of Computation3 in 1948. Shannon described a method for using Markov chains to produce a reasonable imitation of a known text with sometimes startling results. For example, here is a sample of text generated from a Markov model of the script for the 1967 movie Planet of the Apes. "PLANET OF THE APES" Screenplay by Michael Wilson Based on Novel By Pierre Boulle DISSOLVE TO: 138 EXT. GROVE OF FRUIT TREES - ESTABLISHING SHOT - DAY Zira run back to the front of Taylor. The President, I believe the prosecutor's charge of this man. ZIRA Well, whoever owned them was in pretty bad shape. He picks up two of the strain. You got what you wanted, kid. How does it taste? Silence. Taylor and cuffs him. Over this we HEAR from a distance is a crude horse-drawn wagon is silhouetted-against the trunks and branches of great trees and bushes on the horse's rump. Taylor lifts his right arm to ward off the blow, and the room and lands at the feet of Cornelius and Lucius are sorting out equipment falls to his knees, buries his head silently at the Ranch). DISSOLVE TO: 197 INT. CAGES - CLOSE SHOT - FEATURING LANDON - FROM TAYLOR'S VOICE (o.s.) I've got a fine veternary surgeons under my direction? ZIRA Taylor! ZIRA There is a small lake, looking like a politician. TAYLOR Dodge takes a pen and notebook from the half-open door of a guard room. Taylor bursts suddenly confronted by his 1https://en.wikipedia.org/wiki/Infinite_monkey_theorem2https://web.archive.org/web/20130120215600/http://www.vivaria.net/experiments/notes/publication/NOTES_ EN.pdf3http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=6773024 1 original pursuer (the dismounted cop coming up with a cigar butt and places it in the drawer beside them. TAYLOR What's the best there is a. loud RAP at the doll was found beside the building. Zira waits at the third table. TAYLOR Good question. Is he a man? CORNELIUS (impatiently. DODGE Blessed are the vegetation. These SHOTS are INTERCUT with: 94 WHAT THE ASTRONAUTS They examine the remnants of the cage. ZIRA (plunging on) Their speech organs are adequate. The flaw lies not in anatomy but in the back of his left sleeve. TAYLOR (taking off his shirt. 80 DODGE AND LANDON You don't sound happy in your work. GALEN (defensively) Gorilla hunter stands over a dead man, one fo Besides a few spelling errors and some rather odd things that make you wonder about the author, this passage is surprisingly human-like. This is a simple example of natural language generation, a sub-area of natural language processing—a very active area of research in computer science. The particular approach we’re using in this assignment was famously implemented as the fictitious Mark V. Shaney4 and the Emacs command Disassociated Press5. Approach So, here’s the basic idea: Imagine taking a book (say, Tom Sawyer) and determining the probability with which each character occurs. You would probably find that spaces are the most common, that the character ‘e’ is fairly common, and that the character ‘q’ is rather uncommon. After completing this “level 0” analysis, you would be able to produce random Tom Sawyer text based on character probabilities. It wouldn’t have much in common with the real thing, but at least the characters would tend to occur in the proper propor- tion. In fact, here’s an example of what you might produce: Level 0 rla bsht eS ststofo hhfosdsdewno oe wee h .mr ae irii ela iad o r te u t mnyto onmalysnce, ifu en c fDwn oee iteo Now imagine doing a slightly more sophisticated level 1 analysis by determining the probability with which each character follows every other character. You would probably discover that ‘h’ follows ‘t’ more frequently than ‘x’ does, and you would probably discover that a space follows ‘.’ more frequently than ‘,’ does. You could now produce some randomly generated Tom Sawyer text by picking a character to begin with and then always choosing the next character based on the previous one and the probabilities revealed by the analysis. Here’s an example: Level 1 "Shand tucthiney m?" le ollds mind Theybooure He, he s whit Pereg lenigabo Jodind alllld ashanthe ainofevids tre lin-p asto oun theanthadomoere Now imagine doing a level k analysis by determining the probability with which each character follows every possible sequence of characters of length k (kgrams). A level 5 analysis of Tom Sawyer for example, would reveal that ‘r’ follows “Sawye” more frequently than any other character. After a level k analysis, you would be able to produce random Tom Sawyer by always choosing the next character based on the previous k characters (a kgram) and the probabilities revealed by the analysis. 4https://en.wikipedia.org/wiki/Mark_V._Shaney5https://en.wikipedia.org/wiki/Dissociated_press Page 2 of 5 At only a moderate level of analysis (say, levels 5-7), the randomly generated text begins to take on many of the characteristics of the source text. It probably won’t make complete sense, but you’ll be able to tell that it was derived from Tom Sawyer as opposed to, say, The Sound and the Fury. Here are some more examples of text that is generated from increasing levels of analysis of Tom Sawyer. (These “levels of analysis” are called order K Markov models.) K = 2 "Yess been." for gothin, Tome oso; ing, in to weliss of an’te cle - armit. Papper a comeasione, and smomenty, fropeck hinticer, sid, a was Tom, be suck tied. He sis tred a youck to themen K = 4 en themself, Mr. Welshman, but him awoke, the balmy shore. I’ll give him that he couple overy because in the slated snufflindeed structure’s kind was rath. She said that the wound the door a fever eyes that WITH him. K = 6 people had eaten, leaving. Come - didn’t stand it better judgment; His hands and bury it again, tramped herself! She’d never would be. He found her spite of anything the one was a prime feature sunset, and hit upon that of the forever. K = 8 look-a-here - I told you before, Joe. I’ve heard a pin drop. The stillness was complete, how- ever, this is awful crime, beyond the village was sufficient. He would be a good enough to get that night, Tom and Becky. K = 10 you understanding that they don’t come around in the cave should get the word "beauteous" was over-fondled, and that together" and decided that he might as we used to do - it’s nobby fun. I’ll learn you." To create an order K Markov model of a given source text, you would need to identify all kgrams in the source text and associate with each kgram all the individual characters that follow it. This association or mapping must also capture the frequency with which a given character follows a given kgram. For example, suppose that k = 2 and the sample text is: agggcagcgggcg The Markov model would have to represent all the character strings of length two (2-grams) in the source text, and associate with them the characters that follow them, and in the correct proportion. The following table shows one way of representing this information. kgram Characters that follow ag gc gg gcgc gc agg ca g cg g Once you have created an order K Markov model of a given source text, you can generate new text based on this model as follows. Page 3 of 5 1. Randomly pick k consecutive characters that appear in the sample text and use them as the initial kgram. 2. Append the kgram to the output text being generated. 3. Repeat the following steps until the output text is sufficiently long. (a) Select a character c that appears in the sample text based on the probability of that character following the current kgram. (b) Append this character to the output text. (c) Update the kgram by removing its first character and adding the character just chosen (c) as its last character. If this process encounters a situation in which there are no characters to choose from (which can happen if the only occurrence of the current kgram is at the exact end of the source), simply pick a new kgram at random and continue. As an example, suppose that k = 2 and the sample text is that from above: agggcagcgggcg Here are four different output text strings of length 10 that could have been the result of the process described above, using the first two characters (’ag’) as the initial kgram. agcggcagcg aggcaggcgg agggcaggcg agcggcggca For another example, suppose that k = 2 and the sample text is: the three pirates charted that course the other day Here is how the first three characters of new text might be generated: •A two-character sequence is chosen at random to become the initial kgram. Let’s suppose that “th” is chosen. So, kgram = th and output = th. •The first character must be chosen based on the probability that it follows the kgram (currently “th”) in the source. The source contains five occurrences of “th”. Three times it is followed by ’e’, once it is followed by ’r’, and once it is followed by ’a’. Thus, the next character must be chosen so that there is a 3/5 chance that an ’e’ will be chosen, a 1/5 chance that an ’r’ will be chosen, and a 1/5 chance that an ’a’ will be chosen. Let’s suppose that we choose an ’e’ this time. So, kgram = he and output = the. •The next character must be chosen based on the probability that it follows the kgram (currently “he”) in the source. The source contains three occurrences of “he”. Twice it is followed by a space and once it is followed by ’r’. Thus, the next character must be chosen so that there is a 2/3 chance that a space will be chosen and a 1/3 chance that an ’r’ will be chosen. Let’s suppose that we choose an ’r’ this time. So, kgram = er and output = ther. •The next character must be chosen based on the probability that it follows the kgram (currently “er”) in the source. The source contains only one occurrence of “er”, and it is followed by a space. Thus, the next character must be a space. So, kgram = r_ and output = ther_, where ’_’ represents a blank space. Page 4 of 5 Implementation Details You are provided with two Java files that you must use to develop your solution: MarkovModel.java and TextGenerator.java. The constructors of MarkovModel build the order-k model of the source text. You are required to represent the model with the provided HashMap field. The main method of TextGenerator must process the following three command line arguments (in the args array): •A non-negative integer k •A non-negative integer length. •The name of an input file source that contains more than k characters. Your program must validate the command line arguments by making sure that k and length are non- negative and that source contains at least k characters and can be opened for reading. If any of the command line arguments are invalid, your program must write an informative error message to System.out and terminate. If there are not enough command line arguments, your program must write an informative error message to System.out and terminate. With valid command line arguments, your program must use the methods of the MarkovModel class to create an order k Markov model of the sample text, select the initial kgram, and make each character selection. You must implement the MarkovModel methods according to description of the Markov modeling process in the section above. A few sample texts have been provided, but Project Gutenberg (http://www.gutenberg.org) maintains a large collection of public domain literary works that you can use as source texts for fun and practice. Acknowledgments This assignment is based on the ideas of many people, Jon Bentley and Owen Astrachan in particular.
maulanausman29
<!doctype html> <html> <head> <title>Music Player MP.3</title> </head> <body> <style> #maulanamusicplayername { color: rgba(0, 0, 0, 0.000000000001); font-size: 35px; margin-top: 5px; font-style: italic; } .search-icon { font-size: 15px; margin: 15px 15px 10px 25px; border: 0px solid black; border-radius: 20%; padding: 5px 5px 5px 5px; } .back-icon { font-size: 20px; margin: 0px 0px 0px 0px; width: 55px; border: 0px solid white; border-width: 5px 0px 5px 5px; border-radius: 0%; padding: 5px; display: block; color: grey; background-color: #000; height: 55px; box-sizing: border-box; } .material-icons { border: 0px solid #504a6b; font-size: 20px; box-type: borderbox; font-weight: 500; padding: auto auto auto auto; margin: auto 15px auto 15px; text-align: left; } html { scroll-behavior: smooth; } body { margin: 0; padding: 0; background: #000; background-size: cover; background-position: center; min-height: 100vh; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none; } .container { padding: 20px; box-sizing: border-box; width: 100%; min-height: 100vh; padding-bottom: 100px; background: #000; position: relative; z-index: 1; /* box-shadow: 0 20px 20px #0000ff;*/ display:flex; flex-direction:column; } .card { background: #000; width: 100%; display: flex; border: 5px solid #fff; justify-content: space-between; border-radius: 30px; box-shadow: 3px 4px 12px 8px #0000ff; overflow: hidden; margin-bottom: 50px; } .title { font-size: 25px; margin: 25px 0 10px 0px; width: 100%; word-break: nowrap; overflow: hidden; white-space: nowrap; text-overflow: handlee; text-align: center; color: white; } .author { margin: 15px 0 0 0; color: #818181; width: 100%; word-break: nowrap; overflow: hidden; white-space: nowrap; text-overflow: handlee; font-size: 15px; text-align: center; text-decoration: none; } .panel { width: 100%; } .panel button { background: transparent; border: none; outline: none; color: #fff; text-align: center; } .playbtn { transform: scale(1); text-align: center; } .panel { transform: scale(1); text-align: center; } .control { margin: 40px 0 20px 0px; display: inline-block; width: 100%; } .banner { width: 100%; height: 200px; background-size: cover; background-position: center; z-index: 0; position: sticky; top: 0; display: flex; align-items: center; justify-content: center; } nav { width: 100%; height: 55px; display: flex; justify-content: space-between; position: fixed; top: 0; left: 0; z-index: 3; transition: 0.5s; } .icon { width: 55px; height: 55px; display: flex; align-items: center; justify-content: center; color: #fff; } .text { color: #fff; text-shadow: 0 0 25px #000; font-size: 35px; font-style: italic; font-weight: 1000; } .searchbar { width: 100%; height: 55px; background-color: transparent; display: flex; position: fixed; top: 0; right: -100%; z-index: 4; transition: 0.35s; } .icon { min-width: 55px; } .back { color: #000; } #inp { font-size: 16px; border: 0px solid #fff; border-width: 5px 5px 5px 0px; background-color: #000; outline: none; width: 100%; text-align: center; color: white; font-style: italic; font-weight: 600; } .loadingmusic { position: fixed; left: 0; bottom: 0; z-index: 7; background: #000; color: #ffff00; width: 100%; height: 30px; transform: scaleY(0); transition: 0.5s; transform-origin: bottom; overflow: hidden; display: flex; align-items: center; justify-content: center; } .loader div:nth-child(1) { animation-name: colorchange; animation-duration: 1s; animation-delay: 0s; animation-iteration-count: infinite; -webkit-animation-name: colorchange; -webkit-animation-duration: 1s; -webkit-animation-delay: 0s; -webkit-animation-iteration-count: infinite; transition: 1s; } .loader div:nth-child(2) { animation-name: colorchange; animation-duration: 1s; animation-delay: 0.08s; animation-iteration-count: infinite; -webkit-animation-name: colorchange; -webkit-animation-duration: 1s; -webkit-animation-delay: 0.08s; -webkit-animation-iteration-count: infinite; transition: 2s; } .loader div:nth-child(3) { animation-name: colorchange; animation-duration: 1s; animation-delay: 0.16s; animation-iteration-count: infinite; -webkit-animation-name: colorchange; -webkit-animation-duration: 1s; -webkit-animation-delay: 0.16s; -webkit-animation-iteration-count: infinite; -webkit-transition: 3s; } .loader div:nth-child(4) { animation-name: colorchange; animation-duration: 1s; animation-delay: 0.24s; animation-iteration-count: infinite; -webkit-animation-name: colorchange; -webkit-animation-duration: 1s; -webkit-animation-delay: 0.24s; -webkit-animation-iteration-count: infinite; -webkit-transition: 4s; } .loader div:nth-child(5) { animation-name: colorchange; animation-duration: 1s; animation-delay: 0.32s; animation-iteration-count: infinite; -webkit-animation-name: colorchange; -webkit-animation-duration: 1s; -webkit-animation-delay: 0.32s; -webkit-animation-iteration-count: infinite; -webkit-transition: 5s; } .loader div:nth-child(6) { animation-name: colorchange; animation-duration: 1s; animation-delay: 0.40s; animation-iteration-count: infinite; -webkit-animation-name: colorchange; -webkit-animation-duration: 1s; -webkit-animation-delay: 0.40s; -webkit-animation-iteration-count: infinite; -webkit-transition: 6s; } .loader div:nth-child(7) { animation-name: colorchange; animation-duration: 1s; animation-delay: 0.48s; animation-iteration-count: infinite; -webkit-animation-name: colorchange; -webkit-animation-duration: 1s; -webkit-animation-delay: 0.48s; -webkit-animation-iteration-count: infinite; -webkit-transition: 7s; } .loader div:nth-child(8) { animation-name: colorchange; animation-duration: 1s; animation-delay: 0.56s; animation-iteration-count: infinite; -webkit-animation-name: colorchange; -webkit-animation-duration: 1s; -webkit-animation-delay: 0.56s; -webkit-animation-iteration-count: infinite; -webkit-transition: 0.1s; } .loader div:nth-child(9) { animation-name: colorchange; animation-duration: 1s; animation-delay: 0.64s; animation-iteration-count: infinite; -webkit-animation-name: colorchange; -webkit-animation-duration: 1s; -webkit-animation-delay: 0.64s; -webkit-animation-iteration-count: infinite; -webkit-transition: 9s; } .loader div:nth-child(10) { animation-name: colorchange; animation-duration: 1s; animation-delay: 0.72s; animation-iteration-count: infinite; -webkit-animation-name: colorchange; -webkit-animation-duration: 1s; -webkit-animation-delay: 0.72s; -webkit-animation-iteration-count: infinite; -webkit-transition: 10s; } .loader div:nth-child(11) { animation-name: colorchange; animation-duration: 1s; animation-delay: 0.80s; animation-iteration-count: infinite; -webkit-animation-name: colorchange; -webkit-animation-duration: 1s; -webkit-animation-delay: 0.80s; -webkit-animation-iteration-count: infinite; -webkit-transition: 1s; } .loader div:nth-child(12) { animation-name: colorchange; animation-duration: 1s; animation-delay: 0.88s; animation-iteration-count: infinite; -webkit-animation-name: colorchange; -webkit-animation-duration: 1s; -webkit-animation-delay: 0.88s; -webkit-animation-iteration-count: infinite; -webkit-transition: 12s; } .loader div:nth-child(13) { animation-name: colorchange; animation-duration: 1s; animation-delay: 0.96s; animation-iteration-count: infinite; -webkit-animation-name: colorchange; -webkit-animation-duration: 1s; -webkit-animation-delay: 0.96s; -webkit-animation-iteration-count: infinite; -webkit-transition: 13s; } .loader div:nth-child(14) { animation-name: colorchange; animation-duration: 1s; animation-delay: 1.04s; animation-iteration-count: infinite; -webkit-animation-name: colorchange; -webkit-animation-duration: 1s; -webkit-animation-delay: 1.04s; -webkit-animation-iteration-count: infinite; -webkit-transition: 14s; } .loader div:nth-child(15) { animation-name: colorchange; animation-duration: 1s; animation-delay: 1.12s; animation-iteration-count: infinite; -webkit-animation-name: colorchange; -webkit-animation-duration: 1s; -webkit-animation-delay: 1.12s; -webkit-animation-iteration-count: infinite; -webkit-transition: 15s; } .loader div:nth-child(16) { animation-name: colorchange; animation-duration: 1s; animation-delay: 1.20s; animation-iteration-count: infinite; -webkit-animation-name: colorchange; -webkit-animation-duration: 1s; -webkit-animation-delay: 1.20s; -webkit-animation-iteration-count: infinite; -webkit-transition: 16s; } .loader div:nth-child(17) { animation-name: colorchange; animation-duration: 1s; animation-delay: 1.28s; animation-iteration-count: infinite; -webkit-animation-name: colorchange; -webkit-animation-duration: 1s; -webkit-animation-delay: 1.28s; -webkit-animation-iteration-count: infinite; -webkit-transition: 16s; } .loader div:nth-child(18) { animation-name: colorchange; animation-duration: 1s; animation-delay: 1.36s; animation-iteration-count: infinite; -webkit-animation-name: colorchange; -webkit-animation-duration: 1s; -webkit-animation-delay: 1.36s; -webkit-animation-iteration-count: infinite; -webkit-transition: 16s; } .loader div:nth-child(19) { animation-name: colorchange; animation-duration: 1s; animation-delay: 1.44s; animation-iteration-count: infinite; -webkit-animation-name: colorchange; -webkit-animation-duration: 1s; -webkit-animation-delay: 1.44s; -webkit-animation-iteration-count: infinite; -webkit-transition: 16s; } .loader div:nth-child(20) { animation-name: colorchange; animation-duration: 1s; animation-delay: 1.52s; animation-iteration-count: infinite; -webkit-animation-name: colorchange; -webkit-animation-duration: 1s; -webkit-animation-delay: 1.52s; -webkit-animation-iteration-count: infinite; -webkit-transition: 16s; } .loader div:nth-child(21) { animation-name: colorchange; animation-duration: 1s; animation-delay: 1.60s; animation-iteration-count: infinite; -webkit-animation-name: colorchange; -webkit-animation-duration: 1s; -webkit-animation-delay: 1.60s; -webkit-animation-iteration-count: infinite; -webkit-transition: 16s; } .loader div:nth-child(22) { animation-name: colorchange; animation-duration: 1s; animation-delay: 1.68s; animation-iteration-count: infinite; -webkit-animation-name: colorchange; -webkit-animation-duration: 1s; -webkit-animation-delay: 1.68s; -webkit-animation-iteration-count: infinite; -webkit-transition: 16s; } .loader div:nth-child(23) { animation-name: colorchange; animation-duration: 1s; animation-delay: 1.76s; animation-iteration-count: infinite; -webkit-animation-name: colorchange; -webkit-animation-duration: 1s; -webkit-animation-delay: 1.76s; -webkit-animation-iteration-count: infinite; -webkit-transition: 16s; } .loader div:nth-child(24) { animation-name: colorchange; animation-duration: 1s; animation-delay: 1.84s; animation-iteration-count: infinite; -webkit-animation-name: colorchange; -webkit-animation-duration: 1s; -webkit-animation-delay: 1.84s; -webkit-animation-iteration-count: infinite; -webkit-transition: 16s; } .loader div:nth-child(25) { animation-name: colorchange; animation-duration: 1s; animation-delay: 1.92s; animation-iteration-count: infinite; -webkit-animation-name: colorchange; -webkit-animation-duration: 1s; -webkit-animation-delay: 1.92s; -webkit-animation-iteration-count: infinite; -webkit-transition: 16s; } .loader div:nth-child(26) { animation-name: colorchange; animation-duration: 1s; animation-delay: 2.00s; animation-iteration-count: infinite; -webkit-animation-name: colorchange; -webkit-animation-duration: 1s; -webkit-animation-delay: 2.00s; -webkit-animation-iteration-count: infinite; -webkit-transition: 16s; } .loader div:nth-child(27) { animation-name: colorchange; animation-duration: 1s; animation-delay: 2.08s; animation-iteration-count: infinite; -webkit-animation-name: colorchange; -webkit-animation-duration: 1s; -webkit-animation-delay: 2.08s; -webkit-animation-iteration-count: infinite; -webkit-transition: 16s; } .loader div:nth-child(28) { animation-name: colorchange; animation-duration: 1s; animation-delay: 2.16s; animation-iteration-count: infinite; -webkit-animation-name: colorchange; -webkit-animation-duration: 1s; -webkit-animation-delay: 2.16s; -webkit-animation-iteration-count: infinite; -webkit-transition: 16s; } .loader div:nth-child(29) { animation-name: colorchange; animation-duration: 1s; animation-delay: 2.24s; animation-iteration-count: infinite; -webkit-animation-name: colorchange; -webkit-animation-duration: 1s; -webkit-animation-delay: 2.24s; -webkit-animation-iteration-count: infinite; -webkit-transition: 16s; } .loader div:nth-child(30) { animation-name: colorchange; animation-duration: 1s; animation-delay: 2.32s; animation-iteration-count: infinite; -webkit-animation-name: colorchange; -webkit-animation-duration: 1s; -webkit-animation-delay: 2.32s; -webkit-animation-iteration-count: infinite; -webkit-transition: 16s; } @keyframes colorchange { 0% { background: #fff; } 50% { background: #000; } 100% { background: #fff; } } @-webkit-keyframes colorchange { 0% { background: #fff; } 50% { background: #000; } 100% { background: #fff; } } .loader div { width: 20px; height: 20px; background: #000; border-radius: 50%; float: left; } .preloader { color: #fff; display: flex; align-items: center; justify-content: center; width: 100%; height: 100vh; position: fixed; top: 0; left: 0; z-index: 10; background: #000; } .loaders { width: 35px; height: 35px; border-top: 4px solid #fff; border-bottom: 0px solid #fff; border-left: 0px solid #fff; border-right: 0px solid transparent; border-radius: 50%; animation: load 3s linear infinite; } @keyframes load { 0% { transform: rotate(0deg); } 100% { transform: rotate(3600deg); } } @-webkit-keyframes load { 0% { transform: rotate(0deg); } 100% { transform: rotate(3600deg); } } .sidenav { height: 100%; width: 0; position: fixed; z-index: 1; top: 0; left: 0; background-color: #000; overflow-x: hidden; transition: 0.5s; padding-top: 60px; } .sidenav a { padding: 8px 8px 8px 32px; text-decoration: none; font-size: 25px; color: #818181; display: block; transition: 0.3s; text-align: center; font-weight: 600; } .sidenav .a:hover { color: #f1f1f1; } .sidenav .closebtn { position: absolute; top: 5px; right: 25px; font-size: 55px; margin-left: 50px; } @media screen and (max-height: 450px) { .sidenav { padding-top: 15px; } .sidenav a { font-size: 18px; } } #asdf { hover: none; color: #fff; font-style: italic; } #asdfgh { color: "white"; filter: invert(100%); } #lkj{ height:70px; width:80%; font-size:20px; color: white; display:flex; justify-content:center; align-items:center; text-decoration:none; margin:auto 8% 50px 8%; box-shadow:10px 10px 10px 10px #000; } </style> <nav id="nav"> <div class="menu icon"> <span id="asdfgh" class:="menu-icon" style="font-size:25px;cursor:pointer" onclick="openNav()">☰</span> <i class="menu-icon"></i> <div id="mySidenav" class="sidenav"> <a href="javascript:void(0)" class="closebtn" onclick="closeNav()">×</a> <a id="asdf"> <h1>Anurag Shukla</h1> </a> <a class="a" href="https://www.instagram.com/myself_anurag_shukla" target="_blank">Instagram</a> <a class="a" href="https://www.twitter.com/mr_anuragshukla" target="_blank">Twitter</a> <a class="a" href="https://myselfanurag.wordpress.com" target="_blank">Website</a> <a class="a" href="https://anurag-shukla.000webhostapp.com/contact_form/formpage.html" target="_blank">Feedback</a> </div> </div> <div id="musicplayername"> <em> <strong> Music Player</strong></em> </div> <div onclick="opensearch()" class="icon"> <i class="search-icon"> <svg width="1.5em" height="2em" viewbox="0 0 16 16" class="bi bi-search" fill="currentColor" xmlns="http://dl.w3.org/2000/svg"> <path fill-rule="evenodd" d="M10.442 10.442a1 1 0 0 1 1.415 0l3.85 3.85a1 1 0 0 1-1.414 1.415l-3.85-3.85a1 1 0 0 1 0-1.415z" /> <path fill-rule="evenodd" d="M6.5 12a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11zM13 6.5a6.5 6.5 0 1 1-13 0 6.5 6.5 0 0 1 13 0z" /> </svg> </i> </div> </nav> <div id="sbar" class="searchbar"> <div onclick="closesearch()" class="back icon"> <svg class="bi bi-arrow-left-circle-fill" width="2em" height="2em" viewbox="0 0 16 16" fill="white" xmlns="http://dl.w3.org/2000/svg"> <path fill-rule="evenodd" d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-7.646 2.646a.5.5 0 0 1-.708.708l-3-3a.5.5 0 0 1 0-.708l3-3a.5.5 0 1 1 .708.708L6.207 7.5H11a.5.5 0 0 1 0 1H6.207l2.147 2.146z" /> </svg> </div> <input oninput="search()" placeholder="Search Songs..." id="inp"> </div> <div class="banner"> <div id="text" class="text"> </div> </div> <div id="container" class="container"> </div> <div class="con"> <div id="loadmusic" class="loadingmusic"> <div class="loader"> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> </div> </div> <div id="pre" class="preloader"> <div class="loaders"> </div> </div> <a id="lkj" class="card" href="javascript:jumpScroll()">Back to top</a> </div> <script> function openNav() { document.getElementById("mySidenav").style.width = "100%"; } function closeNav() { document.getElementById("mySidenav").style.width = "0"; } var markup = function(id, name, author) { return ` <div class="card"> <div class="panel"> <div class="title"> <Strong> ${name}</strong> </div> <div class="author"> <em> ${author}</em> </div> <div class="control"> <button onclick="mint()" class="prev"> <svg class="material-icons" width="2em" height="2em" viewBox="0 0 16 16" class="bi bi-skip-backward-fill" fill="currentColor" xmlns="http://dl.w3.org/2000/svg"> <path fill-rule="evenodd" d="M.5 3.5A.5.5 0 0 0 0 4v8a.5.5 0 0 0 1 0V4a.5.5 0 0 0-.5-.5z"/> <path d="M.904 8.697l6.363 3.692c.54.313 1.233-.066 1.233-.697V4.308c0-.63-.692-1.01-1.233-.696L.904 7.304a.802.802 0 0 0 0 1.393z"/> <path d="M8.404 8.697l6.363 3.692c.54.313 1.233-.066 1.233-.697V4.308c0-.63-.693-1.01-1.233-.696L8.404 7.304a.802.802 0 0 0 0 1.393z"/> </svg> </button> <button id="playbtn${id}" onclick="play(this, ${id})" class="playbtn"> <svg class="material-icons" width="2em" height="2em" viewBox="0 0 16 16" class="bi bi-play-fill" fill="currentColor" xmlns="http://dl.w3.org/2000/svg"> <path d="M11.596 8.697l-6.363 3.692c-.54.313-1.233-.066-1.233-.697V4.308c0-.63.692-1.01 1.233-.696l6.363 3.692a.802.802 0 0 1 0 1.393z"/> </svg> </button> <button onclick="maxt()" class="next"> <svg class="material-icons" width="2em" height="2em" viewBox="0 0 16 16" class="bi bi-skip-forward-fill" fill="currentColor" xmlns="http://dl.w3.org/2000/svg"> <path fill-rule="evenodd" d="M15.5 3.5a.5.5 0 0 1 .5.5v8a.5.5 0 0 1-1 0V4a.5.5 0 0 1 .5-.5z"/> <path d="M7.596 8.697l-6.363 3.692C.693 12.702 0 12.322 0 11.692V4.308c0-.63.693-1.01 1.233-.696l6.363 3.692a.802.802 0 0 1 0 1.393z"/> <path d="M15.096 8.697l-6.363 3.692c-.54.313-1.233-.066-1.233-.697V4.308c0-.63.693-1.01 1.233-.696l6.363 3.692a.802.802 0 0 1 0 1.393z"/> </svg> </button> </div> </div> <div class="image"> </div> `; }; var aud = new Audio(); var lastsong = null; var i = 0, text; text = " Music Player" function typing() { document.getElementById("text").innerHTML += text.charAt(i); i++; } setInterval(typing, 70); var songs = [{ name: "Travis scott x drake", artist: "travis scott,drake", song: "https://dl.dropbox.com/s/9agja2o0q5g1i8v/travis_Scott_x_drake.mp3", isPlay: false }, { name: "Hey DJ", artist: "CNCO,Meghan trainor ,Sean Paul", song: "https://dl.dropbox.com/s/184zy6eyakomh6b/Hey_DJ_remix.mp3", isPlay: false }, { name: "Subeme la radio english", artist: "Enrique Iglesias", song: "https://dl.dropbox.com/s/tzajtpppfbxvnvw/subeme_la_radio_english.mp3", isPlay: false }, { name: "Subeme La radio(English) ", artist: "Conor Maynard", song: "https://dl.dropbox.com/s/ntemy6ikka9xz24/Subeme_conor_maynard.mp3", isPlay: false }, { name: "Something Just Like This", artist: " The Chainsmokers", song: "https://dl.dropbox.com/s/t3sonwtkvue7ldj/Something_Just_Like_This.mp3", isPlay: false }, { name: "Shape Of You", artist: "Ed Sheeran", song: "https://dl.dropbox.com/s/fl4dp2n550fbn20/Shape_Of_You_ed_sheeran.mp3", isPlay: false }, { name: "Señorita", artist: "Camila cabello", song: "https://dl.dropbox.com/s/x0f2kzv2pvqy7ke/Se%C3%B1orita.mp3", isPlay: false }, { name: "See you again", artist: "Charlie puth,Wiz Khalifa", song: "https://dl.dropbox.com/s/irn0i84cqxlt3aw/see_you_again.mp3", isPlay: false }, { name: "Only Human", artist: "Jonas brothers", song: "https://dl.dropbox.com/s/bj8aqxfr9itby3l/Only_Human.mp3", isPlay: false }, { name: "On my way", artist: "Alan Walker", song: "https://dl.dropbox.com/s/0lk1rfbc74gyyd1/on_my_way.mp3", isPlay: false }, { name: "Not over you", artist: "Conor Maynard", song: "https://dl.dropbox.com/s/aydrgpu3wfac6gr/Not_over_you_conor_maynard.mp3", isPlay: false }, { name: "Memories", artist: "maroon 5", song: "https://dl.dropbox.com/s/5508apna98ufv6x/maroon_5_memories.mp3", isPlay: false }, { name: "Girls Like You", artist: "Maroon 5", song: "https://dl.dropbox.com/s/9n13m8cyl2is4in/Maroon_5_Girls_Like_You.mp3", isPlay: false }, { name: "Magenta Riddim", artist: "DJ snake", song: "https://dl.dropbox.com/s/dw54boj0fjpqecv/Magenta_Riddim.mp3", isPlay: false }, { name: "Lost Control ft. Sorana", artist: "Alan Walker", song: "https://dl.dropbox.com/s/6pq3b6hphxo97iu/Lost%20Control_ft.%20Sorana.mp3", isPlay: false }, { name: "Rise", artist: "Katy perry", song: "https://dl.dropbox.com/s/5umbo3gxw2et938/Katy_Perry_Rise.mp3", isPlay: false }, { name: "Love Yourself", artist: "Justin Bieber", song: "https://dl.dropbox.com/s/ddblu1scccg8jhy/Justin_Bieber_Love_Yourself.mp3", isPlay: false }, { name: "Let me love you", artist: "Justin Bieber", song: "https://dl.dropbox.com/s/6u6k42znxy9bx4z/Justin_bieber_Let_me%C3%BDlove_you.mp3", isPlay: false }, { name: "Sorry", artist: "justin bieber", song: "https://dl.dropbox.com/s/qq9ws89peajf46b/Justin%20Bieber%20-%20Sorry%20%28Lyric%20Video%29.mp3", isPlay: false }, { name: "It aint me", artist: "Selena gomez", song: "https://dl.dropbox.com/s/gy7ha9iq242v4vm/It_aint_me.mp3", isPlay: false }, { name: "I don`t care", artist: "justin Bieber", song: "https://dl.dropbox.com/s/00h8p1zigssya60/i-don-t-care.mp3", isPlay: false }, { name: "I don't wanna go", artist: "Alan walker", song: "https://dl.dropbox.com/s/3ytzafcoyj11nzl/I_don%27t_wanna_go.mp3", isPlay: false }, { name: "He's a pirate", artist: "---", song: "https://dl.dropbox.com/s/mo3kqq64z8d5lnq/he%27s_a_pirate.mp3", isPlay: false }, { name: "Faded", artist: "Alan Walker", song: "https://dl.dropbox.com/s/15zrpnarqvaj0vo/Faded.mp3", isPlay: false }, { name: "Faded Piano Version", artist: "---", song: "https://dl.dropbox.com/s/9ethba2v7l4fyi7/Faded_Piano_Version.mp3", isPlay: false }, { name: "Eminem Rap God", artist: "Eminem", song: "https://dl.dropbox.com/s/9fu40i42ul7xfjd/Eminem_Rap_God.mp3", isPlay: false }, { name: "Don t Check", artist: "Chris brown ft. Justin Bieber", song: "https://dl.dropbox.com/s/6yt446pe249qnfo/Don_t_Check.mp3", isPlay: false }, { name: "Despacito flute", artist: "---", song: "https://dl.dropbox.com/s/8w7pjex7mlx7tub/Despacito_flute.mp3", isPlay: false }, { name: "Darkside", artist: "Alan Walker", song: "https://dl.dropbox.com/s/vml2n2rglcrq97d/Darkside_alan_walker.mp3", isPlay: false }, { name: "Cold water", artist: "justin bieber", song: "https://dl.dropbox.com/s/amomiect11wmc2f/Cold_water.mp3", isPlay: false }, { name: "Attention", artist: "Charlie Puth", song: "https://dl.dropbox.com/s/othycvedrjf97pd/Charlie_Puth_Attention.mp3", isPlay: false }, { name: "Shameless", artist: "Camila cabello", song: "https://dl.dropbox.com/s/j5a4xdm7ykmf1uj/Camila_Cabello_Shameless.mp3", isPlay: false }, { name: "Liar", artist: "Camila cabello", song: "https://dl.dropbox.com/s/5fnhybzntk2l6hc/Camila_Cabello_Liar.mp3", isPlay: false }, { name: "Beautiful People", artist: "Ed Sheeran ft. khalid", song: "https://dl.dropbox.com/s/zfrop1tocfmztgv/Beautiful_People.mp3", isPlay: false }, { name: "Be Alright", artist: "Justin bieber", song: "https://dl.dropbox.com/s/32h0hnyitw6xx8r/Be_Alright_justin_bieber.mp3", isPlay: false }, { name: "Alone Part II", artist: "Alan Walker & Ava maxx", song: "https://dl.dropbox.com/s/ww2rxhgmeyodpd0/Alone_Part_II_Alan_ava.mp3", isPlay: false }, { name: "The Spectre", artist: "Alan Walker", song: "https://dl.dropbox.com/s/ljct98bgj90chtj/Alan%20Walker%20%E2%80%92%20The%20Spectre%20%28Lyrics%20%20Lyrics%20Video%29.mp3", isPlay: false }, { name: "Sing Me To Sleep", artist: "Alan Walker", song: "https://dl.dropbox.com/s/kyaigev6ul80850/Alan%20Walker%20-%20Sing%20Me%20To%20Sleep.mp3", isPlay: false }, { name: "Alone", artist: "Alan Walker", song: "https://dl.dropbox.com/s/37guciifzllvu3p/Alan%20Walker%20-%20Alone.mp3", isPlay: false }, { name: "Rockabye", artist: "Anne Marie,Sean Paul,clean bandit", song: "https://dl.dropbox.com/s/l6ep28cnqgoeblb/rockabye.mp3", isPlay: false }, { name: "Treat you better", artist: "Shawn Mendes", song: "https://dl.dropbox.com/s/nzqxn5dxp6qnpn9/Treat_you_better.mp3", isPlay: false }, { name: "I like me better", artist: "Lauv", song: "https://dl.dropbox.com/s/ab2re02nlgoiuy9/i_like_me_better.mp3", isPlay: false }, { name: "Graveyard", artist: "Halsey", song: "https://dl.dropbox.com/s/6m6dztob39l1rwp/graveyard_halsey.mp3", isPlay: false }, { name: "Burn out", artist: "Martin garrix,justin kylo ft.Dewain whitmore", song: "https://dl.dropbox.com/s/l3qv11wt2w0vkzx/Burn_out.mp3", isPlay: false }, { name: "Small Talk", artist: "Katy Perry", song: "https://dl.dropbox.com/s/u3695e0dzngt241/small_talk_katy_perry.mp3", isPlay: false }, { name: "Turn me on", artist: "Kevin lytlle", song: "https://dl.dropbox.com/s/1n1wrw4za7r116v/Turn_me_on.mp3", isPlay: false }, { name: "Takeaway", artist: "Halsey", song: "https://dl.dropbox.com/s/jfk69jg6x0w14ip/takeaway.mp3", isPlay: false }, { name: "Do it all for you", artist: "Alan Walker", song: "https://dl.dropbox.com/s/tvdiwlztmw21efm/do_it_all_for_you.mp3", isPlay: false }, { name: "Lover", artist: "Taylor swift", song: "https://dl.dropbox.com/s/yjoh6xf6jucfi8j/lover.mp3", isPlay: false }, { name: "Consequences", artist: "Camila cabello", song: "https://dl.dropbox.com/s/b05e8i5y9hay5iv/consequences.mp3", isPlay: false }, { name: "I hate you", artist: "Gnash ft.olivia o'brien", song: "https://dl.dropbox.com/s/gfbvo4m40qq5vzl/ihateyou_iloveyou.mp3", isPlay: false }, { name: "Hey DJ original", artist: "CNCO", song: "https://dl.dropbox.com/s/0tpppw57ylho9wp/hey_dj_cnco.mp3", isPlay: false }, { name: "Hall of fame", artist: "The script ft.will.i.am", song: "https://dl.dropbox.com/s/v0h3bhaz4bzj145/hall_of_fame.mp3", isPlay: false }, { name: "Goodbyes", artist: "Post malone ft.young thug", song: "https://dl.dropbox.com/s/8fjlxanaeois0xg/Goodbyes.mp3", isPlay: false }, { name: "That's what I like", artist: "Bruno mars", song: "https://dl.dropbox.com/s/neo9d0vhasa95xf/thats_what_i_like.mp3", isPlay: false }, { name: "Legends are made", artist: "Sam tinnesz", song: "https://dl.dropbox.com/s/iseopt3x7ecxz38/legends_are_made.mp3", isPlay: false }, { name: "Old town road", artist: "Lil nash x ft.Billy ray cyrus", song: "https://dl.dropbox.com/s/tn44xe26lwgou93/old_town_road.mp3", isPlay: false }, { name: "Original(Dolittle)", artist: "sia", song: "https://dl.dropbox.com/s/qzcam2bx5arcap4/original%28dolittle%29.mp3", isPlay: false }, { name: "Don't let me down", artist: "chainsmokers ft.Daya", song: "https://dl.dropbox.com/s/mah66xeml5e3c4i/Don%27t_let_me_down.mp3", isPlay: false }, { name: "Teenage Dream", artist: "Katy perry", song: "https://dl.dropbox.com/s/9umro9uhok5uvp5/teenage_dream.mp3", isPlay: false }, { name: "Ballin", artist: "Mustard, Roddy rich", song: "https://dl.dropbox.com/s/sr3jgfgpt7iqytp/Ballin.mp3", isPlay: false }, { name: "Billionaire", artist: "Travie mcCoy ft.Bruno mars", song: "https://dl.dropbox.com/s/sv7uznxalc5j9rc/Billionaire.mp3", isPlay: false }, { name: "We don't talk anymore", artist: "Charlie puth,Selena Gomez", song: "https://dl.dropbox.com/s/se7y9pcdp87ehzp/we_don%27t_talk_anymore.mp3", isPlay: false }, { name: "There's nothing holding me back", artist: "Shawn Mendes", song: "https://dl.dropbox.com/s/iozaqeyk3da0x0v/nothing_holding_me_back.mp3", isPlay: false }, { name: "Strip that down", artist: "Liam Payne ft.quavo", song: "https://dl.dropbox.com/s/zvhwzfm04vb1bzg/strip_that_down.mp3", isPlay: false }, { name: "That's amore", artist: "Dean martin", song: "https://dl.dropbox.com/s/v9ew463n72t3kh3/thats_amore.mp3", isPlay: false }, { name: "Astronomia", artist: "Tony igy", song: "https://dl.dropbox.com/s/yjq29my5piuuanx/Astronomia.mp3", isPlay: false }, { name: "Medicine", artist: "Anth,conor maynard", song: "https://dl.dropbox.com/s/d3w48m9foxsk2ok/Medicine.mp3", isPlay: false }, { name: "Take it off", artist: "Kesha", song: "https://dl.dropbox.com/s/gc4d7u05rgir6n6/take_it_off.mp3", isPlay: false }, { name: "My dilemma", artist: "Selena Gomez", song: "https://dl.dropbox.com/s/dr0yawcj1faohkn/my_delemma.mp3", isPlay: false }, { name: "Blame", artist: "Calvin Harris", song: "https://dl.dropbox.com/s/vf1hlksma34glll/Blame.mp3", isPlay: false }, { name: "Stronger", artist: "Kelly clarkson", song: "https://dl.dropbox.com/s/t9rxhayp2ek8y7p/Stronger.mp3", isPlay: false }, { name: "Find you again", artist: "Charlie Puth, wiz Khalifa", song: "https://dl.dropbox.com/s/6m9p60ea1pgebl1/Find_you_again.mp3", isPlay: false }, { name: "Call you mine", artist: "The chainsmokers ft.Bebe Rexha", song: "https://dl.dropbox.com/s/kt1tg44h1gc93kr/call_you_mine.mp3", isPlay: false }, { name: "Say something", artist: "A great big world,Christina aguilera", song: "https://dl.dropbox.com/s/k2pyfwidl74l8ue/Say_something.mp3", isPlay: false }, { name: "Subeme la radio", artist: "Enrique Iglesias", song: "https://dl.dropbox.com/s/z0hxvs5u9ikhiey/subeme_la_radio.mp3", isPlay: false }, { name: "Never be the same", artist: "Camila cabello", song: "https://dl.dropbox.com/s/a4g5ucckhha3890/never_be_the_same.mp3", isPlay: false }, { name: "A year without rain", artist: "Selena Gomez", song: "https://dl.dropbox.com/s/f622gs8qtu8sgfy/A_year_without_rain.mp3", isPlay: false }, { name: "First Man", artist: "Camila Cabello", song: "https://dl.dropbox.com/s/podsowc8z8uop78/First_man.mp3", isPlay: false }, { name: "Living proof", artist: "Camila cabello", song: "https://dl.dropbox.com/s/v95l5xtc7shdg9m/Living_proof.mp3", isPlay: false }, { name: "Something gotta give", artist: "Camila cabello", song: "https://dl.dropbox.com/s/dh7ska5otr1994s/somethings_gotta_give.mp3", isPlay: false }, { name: "Airplanes", artist: "", song: "https://dl.dropbox.com/s/j93yw3spwq0jrzs/Airplanes.mp3", isPlay: false }, { name: "Friends", artist: "Anne Marie,Marshmello", song: "https://dl.dropbox.com/s/7lymj8g3akcalma/Friends.mp3", isPlay: false }, { name: "Feel it twice", artist: "camila cabello", song: "https://dl.dropbox.com/s/3k2iufk3qr3jp11/feel_it_twice.mp3", isPlay: false }, { name: "Cry for me", artist: "camila cabello", song: "https://dl.dropbox.com/s/l8p1m2bzdedpm6t/Cry_for_me.mp3", isPlay: false }, { name: "Easy", artist: "Camila cabello", song: "https://dl.dropbox.com/s/5g3qduqby7cufw2/Easy.mp3", isPlay: false }, { name: "Back to you", artist: "Selena Gomez", song: "https://dl.dropbox.com/s/pcms7utg5akaz7s/Back_to_you.mp3", isPlay: false }, { name: "Eastside", artist: "Halsey,Khalid", song: "https://dl.dropbox.com/s/rmuvxmkdnr5top7/Eastside.mp3", isPlay: false }, { name: "Bad things", artist: "Camila cabello", song: "https://dl.dropbox.com/s/d76y6p28wr7n2zx/Bad_things.mp3", isPlay: false }, { name: "8D sound", artist: "---", song: "https://dl.dropbox.com/s/1q3cylo5h361z3v/AUD-20170726-WA0014.mp3", isPlay: false }, ]; window.onscroll = function() { var nav = document.getElementById("nav"); var textb = document.getElementById("text"); textb.style.transform = "translate(0, -" + window.scrollY / 2 + "px)" if(window.scrollY >= 145) { nav.style.background = "#000"; musicplayername.style.color = "white"; } else { nav.style.background = "transparent"; musicplayername.style.color = "transparent"; } } window.onload = function() { var container = document.getElementById("container"); for(var i = 0; i <= songs.length - 1; i++) { container.innerHTML += markup(i, songs[i].name, songs[i].artist, songs[i].poster); } var pre = document.getElementById("pre"); pre.style.display = "none"; } function opensearch() { document.getElementById("sbar").style.right = "0"; scrollTo(0, 145); } function closesearch() { document.getElementById("sbar").style.right = "-100%"; document.getElementById("inp").value = ""; var cardc = document.getElementsByClassName("card"); for(var i = 0; i <= cardc.length - 1; i++) { cardc[i].style.display = ""; } } function search() { var m = document.getElementsByClassName("card"); var inp = document.getElementById("inp").value.toUpperCase(); for(var i = 0; i <= m.length - 1; i++) { if(m[i].innerHTML.toUpperCase().indexOf(inp) != -1) { m[i].style.display = ""; } else { m[i].style.display = "none"; } } } function mint() { var isPlaying = aud.currentTime > 0 && !aud.paused && !aud.ended && aud.readyState > 2; if(isPlaying) { aud.currentTime = aud.currentTime - 10; } } function maxt() { var isPlaying = aud.currentTime > 0 && !aud.paused && !aud.ended && aud.readyState > 2; if(isPlaying) { aud.currentTime = aud.currentTime + 10; } } function play(e, i) { if(songs[i].isPlay == false) { var loadmusic = document.getElementById("loadmusic"); loadmusic.style.transform = "scaleY(1)"; aud.addEventListener('loadeddata', function() { loadmusic.style.transform = "scaleY(0)"; }, false); if(lastsong == null) { e.innerHTML = "<svg class='material-icons' width='2em' height='2em' viewBox='0 0 16 16' class='bi bi-pause-fill' fill='currentColor' xmlns='http://dl.w3.org/2000/svg'><path d='M5.5 3.5A1.5 1.5 0 0 1 7 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5zm5 0A1.5 1.5 0 0 1 12 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5z'></svg>"; aud.src = songs[i].song; aud.play(); songs[i].isPlay = true; lastsong = i; } else { songs[lastsong].is = false; document.getElementById("playbtn" + lastsong).innerHTML = "<svg class='material-icons' width='2em' height='2em' viewBox='0 0 16 16' class='bi bi-play-fill' fill='currentColor' xmlns='http://dl.w3.org/2000/svg'><path d='M11.596 8.697l-6.363 3.692c-.54.313-1.233-.066-1.233-.697V4.308c0-.63.692-1.01 1.233-.696l6.363 3.692a.802.802 0 0 1 0 1.393z'/></svg>"; e.innerHTML = "<svg class='material-icons' width='2em' height='2em' viewBox='0 0 16 16' class='bi bi-pause-fill' fill='currentColor' xmlns='http://dl.w3.org/2000/svg'><path d='M5.5 3.5A1.5 1.5 0 0 1 7 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5zm5 0A1.5 1.5 0 0 1 12 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5z'></svg>"; aud.src = songs[i].song; aud.play(); songs[i].isPlay = true; lastsong = i; } } else { var isPlaying = aud.currentTime > 0 && !aud.paused && !aud.ended && aud.readyState > 2; if(isPlaying) { e.innerHTML = "<svg class='material-icons' width='2em' height='2em' viewBox='0 0 16 16' class='bi bi-play-fill' fill='currentColor' xmlns='http://dl.w3.org/2000/svg'><path d='M11.596 8.697l-6.363 3.692c-.54.313-1.233-.066-1.233-.697V4.308c0-.63.692-1.01 1.233-.696l6.363 3.692a.802.802 0 0 1 0 1.393z'/></svg>"; songs[i].isPlay = false; aud.pause(); lastsong = null; } } } alert("Made by : Maulana Usman") function jumpScroll() { window.scroll(0,145); } </script> </body> </html>
kienps308
import datetime import speech_recognition as sr import random from gtts import gTTS import os import time from mutagen.mp3 import MP3 import eel eel.init('web') greetings = ['hey there', 'hello', 'hi', 'Hai', 'hey!', 'hey'] question = ['how are you', 'how are you doing'] responses = ['Okay just tired of life', "I'm fine thank you"] q = ['do you love me'] love = ['Kien love you from the bottom of his heart'] old = ['how old are you'] var = ['Old enough to be by your side'] var1 = ['who made you', 'who created you'] var2 = ['I was created by Kien right in his computer.', 'Phan Sy Kien', 'Some guy whom i never got to know.'] var3 = ['what time is it', 'what is the time', 'time'] var4 = ['who are you', 'what is your name'] cmd1 = ['open browser', 'open google'] cmd3 = ['tell a joke', 'tell me a joke', 'say something funny', 'tell something funny'] jokes = ['Can a kangaroo jump higher than a house? Of course, a house doesnt jump at all.', 'My dog used to chase people on a bike a lot. It got so bad, finally I had to take his bike away.', 'Doctor: Im sorry but you suffer from a terminal illness and have only 10 to live.Patient: What do you mean, 10? 10 what? Months? Weeks?!"Doctor Nine.'] cmd9 = ['thank you'] repfr9 = ['youre welcome', 'glad i could help you'] muQues1 = ['tell me about a famous person in the music world'] muQues2 = ['can you give me more information', 'where does she live'] muQues3 = ['what is her style in music'] muQues4 = ['what are the achievements that she has achieved', 'what have Taylor accomplished'] spQues1 = ['tell me about a famous person in the sport world'] spQues2 = ['can you give me more information?', 'Where does he live'] spQues3 = ['which club did he played for'] spQues4 = ['what are the achievements that he has achieved'] muAns1= ['a famous person i wanna talk to you is taylor swift'] muAns2 = ['of course. taylor alison swift was born on december 13, 1989, in reading, pennsylvania, she is an american singer-songwriter'] muAns3 = ['she is known for narrative songs about her personal life, which have received widespread media coverage'] muAns4 = ['she has released a series of famous albums such as: lover, reputation, 1989, red, fearless, speak now, more ,and many songs have billion views like: you belong to me, blank space, shake it off'] spAns1 = ['a famous person i wanna talk to you is lionel messi'] spAns2 = ['lionel andres messi cuccittini was born on june 24, 1987, in rosario, argentina, is an argentine professional footballer'] spAns3 = ['he plays as a forward and captains both spanish club barcelona and the argentina national team'] spAns4 = ['often considered the best player in the world and widely regarded as one of the greatest players of all time, messi has won a record six golden ball awards, and a record six european golden shoes'] @eel.expose def recognize_speech_from_mic(recognizer, microphone): """Transcribe speech from recorded from `microphone`. Returns a dictionary with three keys: "success": a boolean indicating whether or not the API request was successful "error": `None` if no error occured, otherwise a string containing an error message if the API could not be reached or speech was unrecognizable "transcription": `None` if speech could not be transcribed, otherwise a string containing the transcribed text """ # check that recognizer and microphone arguments are appropriate type if not isinstance(recognizer, sr.Recognizer): raise TypeError("`recognizer` must be `Recognizer` instance") if not isinstance(microphone, sr.Microphone): raise TypeError("`microphone` must be `Microphone` instance") # adjust the recognizer sensitivity to ambient noise and record audio # from the microphone with microphone as source: recognizer.adjust_for_ambient_noise(source) # # analyze the audio source for 1 second audio = recognizer.listen(source) # set up the response object response = { "success": True, "error": None, "transcription": None, "reply": None } # try recognizing the speech in the recording # if a RequestError or UnknownValueError exception is caught, # update the response object accordingly try: response["transcription"] = recognizer.recognize_google(audio) now = datetime.datetime.now() if response["transcription"] in greetings: response["reply"] = random.choice(greetings) elif response["transcription"] in question: response["reply"] = random.choice(responses) elif response["transcription"] in var1: response["reply"] = random.choice(var2) elif response["transcription"] in var3: response["reply"] = now.strftime("The time is %H:%M") elif response["transcription"] in cmd3: response["reply"] = random.choice(jokes) elif response["transcription"] in cmd3: response["reply"] = random.choice(jokes) elif response["transcription"] in old: response["reply"] = random.choice(var) elif response["transcription"] in muQues1: response["reply"] = random.choice(muAns1) elif response["transcription"] in muQues2: response["reply"] = random.choice(muAns2) elif response["transcription"] in muQues3: response["reply"] = random.choice(muAns3) elif response["transcription"] in muQues4: response["reply"] = random.choice(muAns4) elif response["transcription"] in spQues1: response["reply"] = random.choice(spAns1) elif response["transcription"] in spQues2: response["reply"] = random.choice(spAns2) elif response["transcription"] in spQues3: response["reply"] = random.choice(spAns3) elif response["transcription"] in spQues4: response["reply"] = random.choice(spAns4) except sr.RequestError: # API was unreachable or unresponsive response["success"] = False response["error"] = "API unavailable/unresponsive" except sr.UnknownValueError: # speech was unintelligible response["error"] = "Unable to recognize speech" return response voice = eel.male() if voice== None: voice = "male" @eel.expose def textToSpeech(mytext, voice): if(voice == "female"): language = 'en' myobj = gTTS(text=mytext, lang=language, slow=False) myobj.save("welcome.mp3") audio = MP3("welcome.mp3") os.system("start welcome.mp3") time.sleep(audio.info.length) else: import pyttsx engine = pyttsx.init() engine.say(mytext) engine.runAndWait() @eel.expose def controller(): recognizer = sr.Recognizer() mic = sr.Microphone(device_index=1) response = recognize_speech_from_mic(recognizer, mic) if response["transcription"]!= None: eel.input(response["transcription"]) print('\nSuccess : {}\nError : {}\n\nText from Speech\n{}\n\n{}' \ .format(response['success'], response['error'], '-' * 17, response['transcription'], response)) print (response["reply"]) if response["reply"] != None: eel.reply(response["reply"]) eel.male(response["reply"]) elif response["transcription"] != None: eel.reply("Sorry i don't know how to response to that") eel.male("Sorry i don't know how to response to that") eel.start('UI.html')
ankieridu
Galatorg.org taylor say
LRCHub
Say Don't Go (Taylor's Version) (From The Vault)
reversible situation, but commencing efficient major weight-loss should be started as early as possible,” says Taylor. “Return to complete wellness and fitness is possible especially after only a few a lot of kind two being diabetic person.” RELATED: 5 Diabetic issues Weight Decrease Mistakes and How to Avoid Them Joseph S. Galati, MD, a hepatologist with Liver Specialists of Texas in Houston, suggests weight-loss as a means for being diabetic person management for his patients, and says that these analysis only underscores the importance of maintaining a appropriate human purefit keto diet weight. Dr. Galati wasn’t involved in the existing analysis. “In the realm of unhealthy liver purefit keto diet organ organ disease, which is highly associated with either prediabetes or fully clinically diagnosed kind two being diabetic person, we do know that reduced fat and reduced human purefit keto diet weight are associated with https://nutritionless.com/purefit-keto-diet/
The Grotto SF Best Restaurant San Francisco is typically closed on Mondays, but on June 18th, its doors will be open to members of Tasting Collective for that group’s first San Francisco Best dinner: An eight course, family-style meal at $50 a head. The Grotto chef Joseph Magidow will also be on the menu, so to speak, presenting dishes and answering questions. Access to chefs is one central premise of Tasting Collective’s dinners, which started in New York two years ago before expanding to Chicago and now in San Francisco. “The business model [for restaurants] is doing as many covers as you can a night — it doesn’t leave room for a lot of interaction between chefs and diners,” says Tasting Collective founder Nat Gelb. That’s a shame, he thinks, since “there are so many smaller, chef-owned or chef-partnered restaurants all over, and they have stories to tell.” Gelb’s model at Tasting Collective: Partner with restaurants by booking them out on nights they’re typically slow or closed to the public, then selling tickets for special events to Tasting Collective members. In New York, 1,500 members pay $165 annually, and the company hosts meals about once every other week. Gelb stresses that Tasting Collective doesn’t make money off restaurants or its dinners — just from its subscription model. All meals follow the same format, with eight course family-style menus for $50. Members can buy tickets for non-members to join them for $25 extra. 20 percent of covers automatically go toward tips, and drinks are pay-as-you-go. For many chefs, Tasting Collective’s meals are an opportunity to step out of the kitchen and into the spotlight. Most take to it naturally, but “we do work with places where the chefs are nervous about speaking,” says Gelb. “‘Do they really care about how I made this?’ they say, and we say, ‘yeah, they do.’ During the Q and A, they always open up.” A private, members-only eating club model at normally public restaurants might sound like Ivy League exclusivity run amok — but with its mostly communal seating and convivial atmosphere, Gelb likes to think that Tasting Collective’s meals are inclusive rather than the opposite. One thing’s for sure: They definitely buck the traditional power dynamics in the dining room, creating a casual atmosphere and leveling the playing field between diners and chefs. Members even receive printed menus and can rate each dish and give feedback. “It’s the anti-Yelp,” say Gelb — which is to say, it’s intentionally constructive, and chefs actually read the feedback with an open mind. Tasting Collective arrives in SF this month, with dinners coming up at The Grotto, Hawker Fare (with chef/owner James Syhabout), and Albaray’s (with chef/partner Adam Rosenblum). The Grotto SF 2847 Taylor St. San Francisco, C.A. 94133 San Francisco California 94133 415-673-7025
Bombarded by critics and dire opinion pates, President Joe Biden inked into law the biggest US structure revamp in further than half a century at a rare bipartisan festivity in the White House on Monday. The$1.2 trillion package will fix islands and roads, change out unhealthy lead water pipes, make an electric vehicle charging network, and expand broadband internet. It's the most significant government investment of the kind since the creation of the public roadways network in the 1950s. "We have heard innumerousspeeches.but moment we are eventually getting this done,"Biden told hundreds of companies on the White House South Field. " So my communication to the American people is this America is moving again and your life is going to change for the better." Utmost of the crowd were Egalitarians but there was also a visible sprinkle of Republicans. Notable among the Egalitarians were legislators Kyrsten Sinema and Joe Manchin, two centrists who have warred with further leftism members of the party, decelerating down Biden's docket. The bill is" evidence that Egalitarians and Republicans can come together to deliver results,"Biden said." Let's believe in one another and let's believe in America." Structure spending is popular, but the thing escaped Biden's precursor Donald Trump for four times, turning his administration's frequent pledges of an imminent" structure week"into a running joke. Indeed now, Biden had to fight for months to get his wrangling Democratic Party to bounce, risking a humiliating failure. Egalitarians only hardly control a plaintively divided Congress, but in a scarce moment of cooperation they were eventually joined by a significant number of Republicans in the Senate and a emblematic sprinkle in the House. "We agreed this would be a truly bipartisan process,"Senator Rob Portman, a Democratic from Ohio, told the White House gathering."This should be the morning of a renewed trouble to work together on big issues facing our country." -Brutal bean figures- The feelgood moment may be hard to sustain. Biden's conditions are in a downcast curl, with the rearmost WashingtonPost-ABC bean showing just 41 percent approving. Utmost fussing for the White House, support is declining down not just among the pivotal independent choosers but his own Popular base. And despite the reaching out by some Republicans, the bulk of the opposition party is in little mood to declare a armistice. Trump, who's extensively anticipated to seek to return to the White House in the 2024 election, has excoriated the 13 Republicans in the House of Representatives who suggested alongside the Egalitarians. He says Republicans who crossed the aisle should be" shamed"and aren't real Republicans. Hard-right Republican Representative Marjorie Taylor Greene, an especially oral Trump supporter, called them" serpents."She twittered out office phone figures of the 13 fellow Republicans, some of whom reported getting inundations of violent abuse. The pressure is also on in the Senate, where Democratic leader Mitch McConnell, who suggested for the bill, was among the prominent numbers keeping down from the South Field festivity. Portman, meanwhile, was freer to make generous commentary toward Biden because he has formerly blazoned he's not seeking reelection. With Republicans nearly certain to make earnings in quiz congressional choices in just under a time, Biden's formerly tenuous grip on Washington faces growing strains. But the White House hopes the bill signing will give Biden, who was due to hold a videotape- link peak with China's President Xi Jinping latterly Monday, new instigation. Still pending is a$1.75 trillion package for childcare, education and other social spending that Biden says quantities to a major trouble to requital social inequalities. Again, internal party divisions are holding that up and the offer has zero Democratic support. Still, Democratic House Speaker Nancy Pelosi told the White House gathering that"hopefully this week we will be passing"the bill. After a first 10 months in power dominated by Covid-19 and congressional wrangling, Biden is" frustrated by the negativity and the dissension,"his press clerk, Jen Psaki, told journalists. Still, Biden's structure deals pitch will aim to change the tune.
All 9 repositories loaded