中文:这个软件运行后能悬浮在所有软件之上,可以自动控制安卓系统下安装的微信,对指定微信发的每个语音进行录制后转发到指定的微信群,全程自动化,减少人工成本,当然这个软件是我很多年前(约2016年)自己开发的,现在的安卓系统和微信早就更新了不知道多少版了,所以现在应该是不能控制的,不过原理是类似的,改改应该也还可以用,这个软件在稳定性方面使用了自驱式的原理,可以说是现代人工智能的起源之一。软件原理:软件采用自驱式推进软件往前运行,通过不断截取屏幕图片,跟预置的需要识别的界面数据和需要点击的按钮图片数据进行比对(这个比对包括对图形的二值化,异化,比对等等),然后进行相关操作。多年后的今天,我发现这种自动化操作居然发展出了一个行业:RPA机器人。所以这个软件我觉得你可以看成是一个RPA机器人,这个机器人运行在安卓下对窗体应用进行自动化操作。这个软件是我很多年前自己开发的,现在把源代码公开出来,由于暂时没有时间,所以直接公开,未做代码调整和优化,希望对技术传播有所助益。本代码公开纯属技术交流,没有收取任何费用,软件分为两部分:安卓RPA机器人,控制后端,机器人使用android studio开发,后端:java+sqlserver,以webservice提供服务。 After running, this software can be suspended on all the software. It can automatically control the wechat installed under the Android system, record and forward each voice sent by the designated wechat group to the designated wechat group, and the whole process is automated to reduce labor costs. Of course, this software was developed by myself many years ago (about 2016). Now the Android system and wechat have been updated for a long time. I don't know how many versions, so it should be uncontrollable now, However, the principle is similar, and the modification should also be used. This software uses the self driving principle in terms of stability, which can be said to be one of the origins of modern artificial intelligence. Software principle: the software uses self driving to push the software forward. By constantly intercepting screen images, it compares with the preset interface data that needs to be identified and the button image data that needs to be clicked (this comparison includes binarization, alienation, comparison, etc. of graphics), and then carries out relevant operations. Today, many years later, I found that this kind of automation has developed an industry: RPA robot. So I think you can think of this software as an RPA robot, which runs under Android to automate window applications. This software was developed by myself many years ago, and now the source code is published. Because I don't have time for the time being, it is directly published without code adjustment and optimization. I hope it will be helpful to the spread of technology. This code is disclosed purely for technical exchange without any charge. The software is divided into two parts: Android RPA robot, which controls the back-end. The robot is developed using Android studio, and the back-end: java+sqlserver, which provides services with WebService.
Recently updatedActive repository
JavaNo license
⑂ 7 forks◯ 0 issuesUpdated 11 days ago
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.
/** * Write a description of class AdventureGame here. * * @author (your name) * @version (a version number or a date) */ import java.util.Scanner; public class AdventureGame { public static void main(String[] args) { System.out.print('\u000C'); Scanner name_scanner = new Scanner(System.in); Scanner actual_thing = new Scanner(System.in); String userName; String playAgain = "yes"; int choice; int choice2; while (playAgain.equals("yes") || playAgain.equals("Yes")) { System.out.print('\u000C'); System.out.println("Welcome, adventurer. Please tell me your name."); userName = name_scanner.next(); System.out.println("Ah, " + userName + ". What a powerful name. It must strike fear into the hearts of your enemies. Now, let's begin your adventure."); System.out.println("~~~"); System.out.println("You are locked in prison for a crime you didn't commit. You've been waiting for months for the perfect opportunity to escape, and it has finally come."); System.out.println("You weren't just sitting around for those 6 months, though."); System.out.println("You were observing the behavior of the guards, so you know where they will be and when."); System.out.println("You noticed a guard forgot to lock the door to the courtyard. Now, you can attempt an escape by running out."); System.out.println("Your best friend is right next to your cell, though."); System.out.println("You know a guard will come by in 3 minutes. Do you escape alone or risk saving your friend?"); System.out.println("Please enter '1' for the former and '2' for the latter."); choice = actual_thing.nextInt(); if (choice == 1) { System.out.println("You decide that it isn't worth the risk, and you run off alone."); System.out.println("You run out into the courtyard and see the electric fence blocking your way."); System.out.println("Suddenly, you hear the alarm. " + userName + " HAS ESCAPED. FIND HIM."); System.out.println("To hide, enter 1. To jump the elecric fence, press 2."); choice2 = actual_thing.nextInt(); if (choice2 == 1) { System.out.println("You look around for a place to hide. You quickly decide the best nearby place is the garden."); System.out.println("You jump into one of the bushes just as the guards burst out into the courtyard."); System.out.println("You hear one of the guards say, 'I'll check the workout area. You two search the garden and warehouse."); System.out.println("The two guards go into the warehouse first. To run to find a better hiding spot, enter 1. To stay put, enter 2."); choice2 = actual_thing.nextInt(); if (choice2 == 1) { System.out.println("The two guards hear your footsteps as you rush out of the bushes."); System.out.println("'There's " + userName + "!' shouts one of the guards."); System.out.println("The guard shoots you with his tazor."); System.out.println("You are knocked unconscious and brought back inside the prison to server solitary confinement for life. Play again?"); playAgain = actual_thing.next(); } else if (choice2 == 2) { System.out.println("The guards come out of the warehouse. They walk over to the bushes. One of the guards checks the plants, while the other looks at the bushes."); System.out.println("The guard shakes the bush next to you. You hold your breath as he walks over to the one you're hiding in."); System.out.println("Luckily for you, he doesn't look thoroughly. The two guards leave, and you climb out of the bush."); System.out.println("You aren't sure where to go now. To attempt to steal a guard's uniform, enter 1. To climb the electric fence, enter 2."); choice2 = actual_thing.nextInt(); if (choice2 == 1) { System.out.println("You look around, and see a guard all alone."); System.out.println("To fight them and try to steal their uniform, press 1. To look for another way to get a uniform, enter 2."); choice2 = actual_thing.nextInt(); if (choice2 == 1) { System.out.println("You run up to the guard. Before he can realize what is going on, you punch him in the face and knock him out."); System.out.println("You steal his uniform, and re-enter the prison."); System.out.println("To walk right out the front door, enter 1. To assume the identity of the guard whose uniform you stole, enter 2."); choice2 = actual_thing.nextInt(); if (choice2 == 1) { System.out.println("You go to the front of the prison, and walk right out. Sadly for you, you get tazed the instant you step through the door."); System.out.println("The last thing you hear before everything fades to black is, 'NO LEAVING BEFORE YOUR SHIFT IS OVER.'"); System.out.println("You are dead. Play again?"); playAgain = actual_thing.next(); } else if (choice2 == 2) { System.out.println("You impersonate the guard. In a stroke of luck, the guard was also named " + userName + "."); System.out.println("You work at that prison under the identity of the guard for the next 50 years, before finally retiring at age 80."); System.out.println("You win."); System.out.println("Play again?"); playAgain = actual_thing.next(); } else { System.out.println("God smites you for not picking a valid option. You are dead. Play again?"); playAgain = actual_thing.next(); } } else if (choice2 == 2) { System.out.println("You look around for a while, but you waste too much time. The guards spot you and tackle you."); System.out.println("You are recaptured and brought back into the prison. Play again?"); playAgain = actual_thing.next(); } else { System.out.println("God smites you for not picking a valid option. You are dead. Play again?"); playAgain = actual_thing.next(); } } else if (choice2 == 2) { System.out.println("ZAPPPPPPPPPPPPPPPPPPPPPP..."); System.out.println("You are dead. Play again?"); playAgain = actual_thing.next(); } } } else if (choice2 == 2) { System.out.println("ZZZZAPPPPPP!"); System.out.println("You are dead. Play again?"); playAgain = actual_thing.next(); } else { System.out.println("God smites you for not picking a valid option. You are dead. Play again?"); playAgain = actual_thing.next(); } } else if (choice == 2) { System.out.println("You spend a few minutes lockpicking your friend's cell. You open it, and he comes out."); System.out.println("Hey " + userName + ". Let's get out of here."); System.out.println("You and your friend run to the courtyard door, but before you can get out, you hear a voice from a few feet behind you."); System.out.println("'HEY, YOU TWO! STOP!' shouts the guard."); System.out.println("To fight, enter 1. To run, enter 2."); choice2 = actual_thing.nextInt(); if (choice2 == 1) { System.out.println("You punch the guard in the face, and you knock him out cold. This triggers a lockdown, and the courtyard door locks."); System.out.println("You realize that you need to find another way out. To hide in the janitor's closet, enter 1. To go to the visitor's office, go to 2."); choice2 = actual_thing.nextInt(); if (choice2 == 1) { System.out.println("You and your friend try to hide in the janitor's closet. The closet is tiny, though, so you both can't fit in."); System.out.println("A guard discovers you and your friend, and brings you back to your cell."); System.out.println("Do you want to play again?"); playAgain = actual_thing.next(); } else if (choice2 == 2) { System.out.println("You go to the visitor's office. Luckily, no one is in there. Your friend climbs over the glass to the other side."); System.out.println("Before you can climb over, a guard comes in and asks who you are and what you are doing."); System.out.println("To tell him that you are a visitor and your friend is a prisoner, enter 1. To tell him you are both visitors, enter 2."); choice2 = actual_thing.nextInt(); if (choice2 == 1) { System.out.println("The guard believes you, but takes your friend back to their cell. You walk out of the prison alone."); System.out.println("To escape, enter 1. To go back for your friend, enter 2."); choice2 = actual_thing.nextInt(); if (choice2 == 2) { System.out.println("You go back into the prison. The guards watch as you unlock your friends cell."); System.out.println("'Why aren't you arresting me?' you ask one of them. He responds, 'This will make us a lot of money.'"); System.out.println("'What do you mean?'"); System.out.println("'A prison escape with action, friendship, betrayal, and restitution. Someone will make a movie out of this, and we'll be rich!'"); System.out.println("While the guard was talking, you walked out of the prison with your friend. He monolouged about the escape for the next 30 minutes."); System.out.println("But, he was right. 10 years after your 'escape', you and your friend made a movie about it. The prison became rich, and pardoned your crimes."); System.out.println("This is the best ending. Play again?"); playAgain = actual_thing.next(); } else if (choice2 == 1) { System.out.println("You are a winner. You found the bad ending. Your friend never forgives you, but you eventually forget about him."); System.out.println("You are a free man, but he rots in prison for the rest of his life. Play again?"); playAgain = actual_thing.next(); } else { System.out.println("God smites you for not picking a valid option. You are dead. Play again?"); playAgain = actual_thing.next(); } } else if (choice2 == 2) { System.out.println("The guard doesn't believe you, and calls for backup. You are put to death for assaulting an officer and attempting to escape."); System.out.println("You are dead. Play again?"); playAgain = actual_thing.next(); } } } else if (choice2 == 2) { System.out.println("ZZZZAPPPPPP! The guard tazors you and your friend."); System.out.println("You are dead. Play again?"); playAgain = actual_thing.next(); } else { System.out.println("God smites you for not picking a valid option. You are dead. Play again?"); playAgain = actual_thing.next(); } } else { System.out.println("God smites you for not picking a valid option. You are dead. Play again?"); playAgain = actual_thing.next(); } } } }
My very first Java project ever made public after two years. :)
Active repository
JavaNo license
⑂ 1 forks◯ 0 issuesUpdated Mar 31, 2022
This is a Java Compiler built for my College Compiler course and for my thesis in 1997 two years after Java 1.0 was released.
Active repository
C++No license
⑂ 1 forks◯ 0 issuesUpdated Aug 10, 2020
The travel industry has experienced a very fast development of top-notch nature in the course of the most recent twenty years. This has basically been because of the coming of a fringeless' reality and expanded data spread about lofty situations all through the world. The expanding number of vacationers worldwide has fed the monetary and social effect extraordinarily. Be that as it may, the absence of data, correspondence, direction, arranging, and security issues has kept the travelers to skip visiting anyplace in Bangladesh and outside the nation. Along these lines, it has turned into an incredible part in Bangladesh to put with a business thought in a manner by helping voyagers by telling them about the spots, touring plans, costings, and, security. Android is the most used mobile operating system in the world right now, so design a system for android based to solve the problems faced by travelers is the best choice. Prohelika is an online travel management system application which is android based. This proposed system aimed to offer user so that they can have related information for a perfect trip, update about tour events from the group, also can have a view of cost estimation depending on the number of tourists, notification for upcoming trips. A user can have the direction to reach the destination like google play with the approximate budget to reach the place. Therefore this application is a trustworthy, secure and free of cost medium for an easy, comfortable and enjoyable travel experience. To solve the problems faced by travelers, inspire tourism by providing information, and enhancing people’s interest in traveling this android application Prohelika should create a positive outlook and gladly accepted by travelers. The project is divided into two module admin and user. We use Java, XML, Android Studio and Firebase database for the front end and back end design. After finishing the implementation, the proposed system can meet the objectives and it is obvious that the tourists and the travelers will be helped by this system.
Active repository
No license
⑂ 0 forks◯ 0 issuesUpdated Jan 2, 2025