155 skills found · Page 4 of 6
margo / SandboxThis repository shall be utilized by the Margo development team to house content associated with the programs deliverables.
jackdp / ShellExecConsole application that allows you to run programs (as a current user or administrator), open documents in associated applications, view web pages in your default browser, and more.
w32zhong / BTreeimplementationCSC 541 Assignment 4 B-Trees Introduction The goals of this assignment are two-fold: To introduce you to searching data on disk using B-trees. To investigate how changing the order of a B-tree affects its performance. Index File During this assignment you will create, search, and manage a binary index file of integer key values. The values stored in the file will be specified by the user. You will structure the file as a B-tree. Program Execution Your program will be named assn_4 and it will run from the command line. Two command line arguments will be specified: the name of the index file, and a B-tree order. assn_4 index-file order For example, executing your program as follows assn_4 index.bin 4 would open an index file called index.bin that holds integer keys stored in an order-4 B-tree. You can assume order will always be ≥ 3. For convenience, we refer to the index file as index.bin throughout the remainder of the assignment. Note. If you are asked open an existing index file, you can assume the B-tree order specified on the command line matches the order that was used when the index file was first created. B-Tree Nodes Your program is allowed to hold individual B-tree nodes in memory—but not the entire tree—at any given time. Your B-tree node should have a structure and usage similar to the following. #include <stdlib.h> int order = 4; /* B-tree order */ typedef struct { /* B-tree node */ int n; /* Number of keys in node */ int *key; /* Node's keys */ long *child; /* Node's child subtree offsets */ } btree_node; btree_node node; /* Single B-tree node */ node.n = 0; node.key = (int *) calloc( order - 1, sizeof( int ) ); node.child = (long *) calloc( order, sizeof( long ) ); Note. Be careful when you're reading and writing data structures with dynamically allocated memory. For example, trying to write node like this fwrite( &node, sizeof( btree_node ), 1, fp ); will write node's key count, the pointer value for its key array, and the pointer value for its child offset array, but it will not write the contents of the key and child offset arrays. The arrays' contents and not pointers to their contents need to be written explicitly instead. fwrite( &node.n, sizeof( int ), 1, fp ); fwrite( node.key, sizeof( int ), order - 1, fp ); fwrite( node.child, sizeof( long ), order, fp ); Reading node structures from disk would use a similar strategy. Root Node Offset In order to manage any tree, you need to locate its root node. Initially the root node will be stored near the front of index.bin. If the root node splits, however, a new root will be appended to the end of index.bin. The root node's offset will be maintained persistently by storing it at the front of index.bin when the file is closed, and reading it when the file is opened. #include <stdio.h> FILE *fp; /* Input file stream */ long root; /* Offset of B-tree root node */ fp = fopen( "index.bin", "r+b" ); /* If file doesn't exist, set root offset to unknown and create * file, otherwise read the root offset at the front of the file */ if ( fp == NULL ) { root = -1; fp = fopen( "index.bin", "w+b" ); fwrite( &root, sizeof( long ), 1, fp ); } else { fread( &root, sizeof( long ), 1, fp ); } User Interface The user will communicate with your program through a set of commands typed at the keyboard. Your program must support four simple commands: add k Add a new integer key with value k to index.bin. find k Find an entry with a key value of k in index.bin, if it exists. print Print the contents and the structure of the B-tree on-screen. end Update the root node's offset at the front of the index.bin, and close the index file, and end the program. Add Use a standard B-tree algorithm to add a new key k to the index file. Search the B-tree for the leaf node L responsible for k. If k is stored in L's key list, print Entry with key=k already exists on-screen and stop, since duplicate keys are not allowed. Create a new key list K that contains L's keys, plus k, sorted in ascending order. If L's key list is not full, replace it with K, update L's child offsets, write L back to disk, and stop. Otherwise, split K about its median key value km into left and right key lists KL = (k0, ... , km-1) and KR = (km+1, ... , kn-1). Use ceiling to calculate m = ⌈(n-1)/2⌉. For example, if n = 3, m = 1. If n = 4, m = 2. Save KL and its associated child offsets in L, then write L back to disk. Save KR and its associated child offsets in a new node R, then append R to the end of the index file. Promote km , L's offset, and R's offset and insert them in L's parent node. If the parent's key list is full, recursively split its list and promote the median to its parent. If a promotion is made to a root node with a full key list, split and create a new root node holding km and offsets to L and R. Find To find key value k in the index file, search the root node for k. If k is found, the search succeeds. Otherwise, determine the child subtree S that is responsible for k, then recursively search S. If k is found during the recursive search, print Entry with key=k exists on-screen. If at any point in the recursion S does not exist, print Entry with key=k does not exist on-screen. Print This command prints the contents of the B-tree on-screen, level by level. Begin by considering a single B-tree node. To print the contents of the node on-screen, print its key values separated by commas. int i; /* Loop counter */ btree_node node; /* Node to print */ long off; /* Node's offset */ for( i = 0; i < node.n - 1; i++ ) { printf( "%d,", node.key[ i ] ); } printf( "%d", node.key[ node.n - 1 ] ); To print the entire tree, start by printing the root node. Next, print the root node's children on a new line, separating each child node's output by a space character. Then, print their children on a new line, and so on until all the nodes in the tree are printed. This approach prints the nodes on each level of the B-tree left-to-right on a common line. For example, inserting the integers 1 through 13 inclusive into an order-4 B-tree would produce the following output. 1: 9 2: 3,6 12 3: 1,2 4,5 7,8 10,11 13 To support trees with more than 9 levels, we leave space for two characters to print the level at the beginning of each line, that is, using printf( "%2d: ", lvl )" or something similar. Hint. To process nodes left-to-right level-by-level, do not use recursion. Instead, create a queue containing the root node's offset. Remove the offset at the front of the queue (initially the root's offset) and read the corresponding node from disk. Append the node's non-empty subtree offsets to the end of the queue, then print the node's key values. Continue until the queue is empty. End This command ends the program by writing the root node's offset to the front of index.bin, then closing the index file. Programming Environment All programs must be written in C, and compiled to run on the remote.eos.ncsu.edu Linux server. Any ssh client can be used to access your Unity account and AFS storage space on this machine. Your assignment will be run automatically, and the output it produces will be compared to known, correct output using diff. Because of this, your output must conform to the print command's description. If it doesn't, diff will report your output as incorrect, and it will be marked accordingly. Supplemental Material In order to help you test your program, we provide example input and output files. input-01.txt, an input file of commands applied to an initially empty index file saved as an order-4 B-tree, and input-02.txt, an input file of commands applied to the index file produced by input-01.txt. The output files show what your program should print after each input file is processed. output-01.txt, the output your program should produce after it processes input-01.txt. output-02.txt, the output your program should produce after it processes input-02.txt. To test your program, you would issue the following commands: % rm index.bin % assn_4 index.bin 4 < input-01.txt > my-output-01.txt % assn_4 index.bin 4 < input-02.txt > my-output-02.txt You can use diff to compare output from your program to our output files. If your program is running properly and your output is formatted correctly, your program should produce output identical to what is in these files. Please remember, the files we're providing here are meant to serve as examples only. Apart from holding valid commands, you cannot make any assumptions about the size or the content of the input files we will use to test your program. Test Files The following files were used to test your program. Order 3 Test Case. input-03.txt output-03-first.txt Order 4 Test Case. input-04.txt output-04-first.txt Order 10 Test Case. input-10-01.txt, input-10-02.txt output-10-01.txt, output-10-02.txt Order 20 Test Case. input-20.txt output-20-first.txt Your program was run on all test cases using order-3, order-4, and order-20 B-trees. % rm index.bin % assn_4 index.bin 3 < input-03.txt > my-output-03.txt % rm index.bin % assn_4 index.bin 4 < input-04.txt > my-output-04.txt % rm index.bin % assn_4 index.bin 20 < input-20.txt > my-output-20.txt Your program was also run twice using an order-10 B-tree, to test its ability to re-use an existing index file. % rm index.bin % assn_4 index.bin 10 < input-10-01.txt > my-output-10-01.txt % assn_4 index.bin 10 < input-10-02.txt > my-output-10-02.txt Hand-In Requirements Use Moodle (the online assignment submission software) to submit the following files: assn_4, a Linux executable of your finished assignment, and all associated source code files (these can be called anything you want). There are four important requirements that your assignment must satisfy. Your executable file must be named exactly as shown above. The program will be run and marked electronically using a script file, so using a different name means the executable will not be found, and subsequently will not be marked. Your program must be compiled to run on remote.eos.ncsu.edu. If we cannot run your program, we will not be able to mark it, and we will be forced to assign you a grade of 0. Your program must produce output that exactly matches the format described in the print command section of this assignment. If it doesn't, it will not pass our automatic comparison to known, correct output. You must submit your source code with your executable prior to the submission deadline. If you do not submit your source code, we cannot MOSS it to check for code similarity. Because of this, any assignment that does not include source code will be assigned a grade of 0. Updated 20-Dec-14
FakeTuxedo / Whats That SmellA simple packet sniffer for analyzing local traffic and associating applications with IP addresses via Netify. Based on this: https://coderbag.com/programming-c/building-a-network-sniffer-in-net
lilygrace454 / Mcafee.com ActivateThe Best Antivirus and Total Protection for Mac! What's the Best Malware Protection? Malware, Spyware, and Adware Protection Antivirus programming is basic for each PC. Without it, you hazard losing your own data, your records, and even the money from your financial balance. We've tried in excess of 40 utilities to enable you to pick the best antivirus security for your PCs. Malware, Spyware, and Adware Protection Summer is practically here, and we're all anticipating a stunning get-away, be it at the shoreline, in the mountains, or even on a journey. Malware coders get-aways, as well. Theirs is an occupation, similar to some other, from numerous points of view. In any case, that doesn't mean you'll be sheltered from infections, ransomware, bots, and other malware this late spring. The malware office director timetables get-aways, much the same as any office supervisor, to ensure someone's at work, making new assaults on your gadgets and your information. Before you head out, check your antivirus membership to ensure it won't take its very own get-away soon. In case you're not ensured at this point, put introducing an antivirus on your agenda. We've tried and McAfee com activate antivirus instruments so you can pick one and unwind with no stresses. We call it antivirus, yet in truth it's far-fetched you'll get hit with a real PC infection. Malware nowadays is tied in with profiting, and there's no simple method to take advantage of spreading an infection. Ransomware and information taking Trojans are considerably more typical, as are bots that let the bot-herder lease your PC for loathsome purposes. Current antivirus utilities handle Trojans, rootkits, spyware, adware, ransomware, and that's only the tip of the iceberg. PCMag has explored in excess of 40 distinctive business antivirus utilities, and that is not notwithstanding checking the many free antivirus devices. Out of that broad field we've named fourEditors' Choice items. mcafee activate product key antivirus utilities demonstrated powerful enough to procure an astounding four-star rating nearby their progressively conventional partners. VoodooSoft VoodooShield puts together its security with respect to stifling every obscure program while the PC is in a powerless state, for example, when it's associated with the web, and furthermore acts to identify known malware. The Kure resets the PC to a known safe state on each reboot, consequently wiping out any malware. On the off chance that you have malware, one of the ten items in the graph above should deal with the issue. You may see that one item in the outline earned simply 3.5 stars. The diagram had space for one more, and of the seven 3.5-star items, the labs just focus on F-Secure and G Data. F-Secure has the additional fillip of costing the equivalent for three licenses as most items charge for only one, so it advanced into the diagram. The blurbs at the base of this article incorporate each business antivirus that earned 3.5 stars or better. www.mcafee.com/activate offer insurance past the antivirus incorporated with Windows 10; the best free antivirus utilities additionally offer more. In any case, Microsoft Windows Defender Security Center is looking somewhat better recently, with some awesome scores from free testing labs. In our grasp on tests, it demonstrated a checked improvement since our past audit, enough to at long last bring it up to three stars. Tune in to the Labs We take the outcomes announced by free antivirus testing labs in all respects truly. The basic reality that a specific merchant's item appears in the outcomes is a demonstration of positive support, of sorts. It implies the lab considered the item huge, and the merchant felt the expense of testing was advantageous. Obviously, getting great scores in the tests is additionally significant. We pursue four labs that normally discharge nitty gritty reports: SE Labs, AV-Test Institute, MRG-Effitas, and AV-Comparatives. We likewise note whether sellers have contracted with ICSA Labs and West Coast labs for affirmation. We Test Malware, Spyware, and Adware Defenses We additionally subject each item to our very own hands-on trial of malware assurance, to a limited extent to get an inclination for how the item functions. Contingent upon how altogether the item averts malware establishment, it can acquire up to 10 for malware assurance. Our malware assurance test fundamentally utilizes a similar arrangement of tests for quite a long time. To check an item's treatment of fresh out of the box new malware, we test every item utilizing 100 amazingly new malware-facilitating URLs provided by MRG-Effitas, taking note of what level of them it blocked. Items get equivalent kudos for anticipating all entrance to the vindictive URL and for clearing out the malware during download. A few items win completely outstanding evaluations from the autonomous labs, yet don't toll too in our grasp on tests. In such cases, we concede to the labs, as they carry altogether more prominent assets to their testing. Need to know more? You can dive in for a point by point portrayal of how we test security programming. Multilayered Malware Protection Antivirus items separate themselves by going past the fundamentals of on-request examining and ongoing malware insurance. Some rate URLs that you visit or that appear in indexed lists, utilizing a red-yellow-green shading coding framework. Some effectively square procedures on your framework from associating with known malware-facilitating URLs or with false (phishing) pages. Programming has imperfections, and here and there those blemishes influence your mcafee security. Judicious clients keep Windows and all projects fixed, fixing those imperfections at the earliest opportunity. The defenselessness output offered by some antivirus items can check that every vital patches are available, and even apply any that are absent. Spyware comes in numerous structures, from concealed projects that log your each keystroke to Trojans that take on the appearance of legitimate projects while mining your own information. Any antivirus should deal with spyware, alongside every other sort of malware, yet some incorporate specific segments gave to spyware insurance. You expect an antivirus to recognize and dispose of terrible projects, and to disregard great projects. Shouldn't something be said about questions, programs it can't distinguish as positive or negative? Conduct based discovery can, in principle, secure you against malware that is so new scientists have never experienced it. In any case, this isn't generally an unmixed gift. It's normal for social discovery frameworks to hail numerous harmless practices performed by genuine projects. Whitelisting is another way to deal with the issue of obscure projects. A whitelist-based security framework just permits realized great projects to run. Questions are prohibited. This mode sometimes falls short for all circumstances, however it very well may be helpful. Sandboxing gives obscure projects a chance to run, however it segregates them from full access to your framework, so they can't do lasting damage. These different added layers serve to upgrade your assurance against malware. What's the Best Malware Protection? mcafee.com/activate antivirus would it be advisable for you to pick? You have an abundance of choices. Kaspersky Anti-Virus and Bitdefender Antivirus Plus routinely take impeccable or close ideal scores from the autonomous antivirus testing labs. A solitary membership for AntiVirus Plus gives you a chance to introduce security on the majority of your Windows, Android, Mac OS, and iOS gadgets. What's more, its unordinary conduct based recognition innovation implies Webroot SecureAnywhere Antivirus is the most diminutive antivirus around. We've named these four Editors' Choice for business antivirus, however they're by all account not the only items worth thought. Peruse the surveys of our top of the line items, and afterward settle on your own choice. Note that we have assessed a lot more antivirus utilities than we could incorporate into the diagram of top items. On the off chance that your preferred programming isn't recorded there, odds are we reviewed it. The blurbs beneath incorporate each item that oversaw 3.5 stars or better. Every one of the utilities recorded in this component are Windows antivirus applications. In case you're a macOS client, don't lose hope, be that as it may; PCMag has a different gathering devoted exclusively to the best Mac antivirus programming.
noahjonesx / MarkovModelMarkov 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.
open-struct-engineer / 2DBeamA repository of various methods associated with a 2D Beam in various programming languages for use in Structural Analysis
santosake / Appointment Scheduler AppThis application uses C# and MySQL. The objective of this project was to create an appointment scheduling program for a ficticious international company to help manage their various consultants, customers, and coordinate schedules in a time zone/region sensitive manner. The Database ERD is already set and the program must adopt it. Program Features: Login form with error control and automatically changes all English text to Spanish if users machine's region is set to a Spanish speaking region. Customer screen to add, edit, and delete customer records. Appointment screen to add, edit, and delete appointments with associated customer. Calendar with a month or weekly view. Automatically adjusted appointment times based on user time zone. 15 minute prior appointment alerts based on user's login time. Generate three kinds of reports; number of appointment types by month, schedule for each consultant, and number of appointments by city. Track user activity recording timestamps for logins in the UserActivityRecords.txt file. Various exceptions controls for all data entry fields.
WhatIsInCreedmoor / What The FlockWhat The Flock is an ESP32 based scanner built on the Espressif IoT Development Framework (ESP-IDF). It is designed to identify and log radio signatures associated with Flock Surveillance cameras. This project is an ESP-IDF port of the original "Flock You" program.
RileyCullen / PinterestScraperThis Pinterest scraper takes a link to a Pinterest board and gets all the pins associated with the given board. After getting the pins, the program will create a folder for the given keyword and scrape the the individual pins. The scrape will consist of collecting the image, title, source, and partial caption and storing them to a .csv file. Likewise, the title, source, and full caption are stored to a .json file.
007joshie / Password Safe PythonAn lightweight encryption based Password Safe. This was a NCEA level 2 High School project coded in Python 3.4.3. This program features the ability to Add / Change / Remove Apps and their passwords associated. Users must create an account, they will login in to their account with an Email address and a Pincode they have choosen.
aula-id / Atomic Rsshort id generation, designed to have billion troughput per second.
Data-Only-Greater / ConvergenceA Python program to Perform Calculations Associated with a Grid Convergence Study
mlawrenz / PythonMMGBSAProgram for running end point free energy calculations on protein-ligand complexes using AMBER and its associated MMPBSA.py program. Requires only a protein and ligand structure as input.
abo-abo / Dired GuessAssociate file extensions with programs that can open them for dired
AyaShehata903 / BreastCancerDetectionThis program is designed to predict two severity of abnormalities associated with breast cancer cells: benign and malignant. Mammograms from MIAS is preprocessed and features are extracted using the pre-trained CNN.
cmaraziaris / MIPS Cache Config ToolkitSet of MIPS assembly programs to help us find a secret cache configuration (cache size, block size and associativity).
georgecatalin / Master The C LanguageCode work associated with the course "Master the C Language" authored by Jason Fedin, Tim Buchalka's Learn Programming Academy on Udemy.
Infiniper / Simon GameSimon is an electronic game of short-term memory skill invented by Ralph H. Baer and Howard J. Morrison, working for toy design firm Marvin Glass and Associates, with software programming by Lenny Cope. The game creates a series of tones and lights and requires a user to repeat the sequence.
XuJin1992 / The Research And Implementation Of Data Mining For Geological DataData mining and knowledge discovery, refers to discover knowledge from huge amounts of data, has a broad application prospect.When faced with geological data, however, even the relatively mature existing models, there are defects performance and effect.Investigate its reason, mainly because of the inherent characteristics of geological data, high dimension, unstructured, more relevance, etc., in the data model, indexing structure knowledge representation, storage, mining, etc., is far more complicated than the traditional data. The geological data of the usual have raster, vector and so on, this paper pays attention to raster data processing.Tobler theorem tells us: geography everything associated with other things, but closer than far stronger correlation.Spatial correlation characteristics of geological data, the author of this paper, by establishing a spatial index R tree with spatial pattern mining algorithms as the guiding ideology, through the raster scanning method materialized space object space between adjacent relationship, transaction concept, thus the space with a pattern mining into the traditional association rules mining, and then take advantage of commonly used association rules to deal with some kind of geological data, to find association rules of interest. Using the simulation program to generate the geological data of the experiment, in the process of experiment, found a way to use R tree indexing can significantly speed up the generating spatial transaction set, at the same time, choose the more classic Apriori algorithm and FP - growth algorithm contrast performance, results show that the FP - growth algorithm is much faster than the Apriori algorithm, analyses the main reasons why the Apriori algorithm to generate a large number of candidate itemsets.In this paper, the main work is as follows: (1) In order to speed up the neighborhood search, choose to establish R tree spatial index, on the basis of summarizing the common scenarios to apply spatial indexing technology and the advantages and disadvantages. (2) Based on the analysis of traditional association rule mining algorithm and spatial association rule mining algorithm on the basis of the model based on event center space with pattern mining algorithm was described, and puts forward with a rule mining algorithm based on raster scanning, the algorithm by scanning for the center with a grid of R - neighborhood affairs set grid, will study data mining into the traditional data mining algorithm. (3) In the process of spatial index R tree insert, in order to prevent insertion to split after the leaf node, leading to a recursive has been split up destroy the one-way traverse, is put forward in the process of looking for insert position that records if full node number is M (M number) for each node up to insert nodes, first to divide to avoid after layers of recursive splitting up, speed up the R tree insertion efficiency. (4) On the basis of spatial transaction set preprocessing, realize the Apriori algorithm and FP-growth algorithm two kinds of classic association rule mining algorithm, performance contrast analysis.