noshot 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (210) hide show
  1. noshot/__init__.py +1 -0
  2. noshot/data/AIDS CN NLP/AIDS/1. Implement Basic Search Strategies/(A) Breadth First Search.ipynb +112 -0
  3. noshot/data/AIDS CN NLP/AIDS/1. Implement Basic Search Strategies/(B) Depth First Search.ipynb +111 -0
  4. noshot/data/AIDS CN NLP/AIDS/1. Implement Basic Search Strategies/(C) Uniform Cost Search.ipynb +134 -0
  5. noshot/data/AIDS CN NLP/AIDS/1. Implement Basic Search Strategies/(D) Depth Limites Search.ipynb +115 -0
  6. noshot/data/AIDS CN NLP/AIDS/1. Implement Basic Search Strategies/(E) Iterative Deepening DFS.ipynb +123 -0
  7. noshot/data/AIDS CN NLP/AIDS/10. ANOVA/2_ANOVA.csv +769 -0
  8. noshot/data/AIDS CN NLP/AIDS/10. ANOVA/One Way ANOVA (Repeated Measure).ipynb +126 -0
  9. noshot/data/AIDS CN NLP/AIDS/10. ANOVA/One Way ANOVA.ipynb +134 -0
  10. noshot/data/AIDS CN NLP/AIDS/10. ANOVA/Sample 1 Way ANOVA Test.ipynb +119 -0
  11. noshot/data/AIDS CN NLP/AIDS/10. ANOVA/Two Way ANOVA.ipynb +138 -0
  12. noshot/data/AIDS CN NLP/AIDS/10. ANOVA/reaction_time.csv +5 -0
  13. noshot/data/AIDS CN NLP/AIDS/10. ANOVA/sample_data.csv +16 -0
  14. noshot/data/AIDS CN NLP/AIDS/10. ANOVA/sleep_deprivation.csv +4 -0
  15. noshot/data/AIDS CN NLP/AIDS/11. Linear Regression/3_Linear.csv +4802 -0
  16. noshot/data/AIDS CN NLP/AIDS/11. Linear Regression/Linear Regression LAB.ipynb +113 -0
  17. noshot/data/AIDS CN NLP/AIDS/11. Linear Regression/Linear Regression New- sklearn.ipynb +118 -0
  18. noshot/data/AIDS CN NLP/AIDS/11. Linear Regression/Linear Regression.ipynb +148 -0
  19. noshot/data/AIDS CN NLP/AIDS/11. Linear Regression/house_rate.csv +22 -0
  20. noshot/data/AIDS CN NLP/AIDS/12. Logistic Regression/Logistic Regression New- sklearn.ipynb +128 -0
  21. noshot/data/AIDS CN NLP/AIDS/12. Logistic Regression/Logistic Regression.ipynb +145 -0
  22. noshot/data/AIDS CN NLP/AIDS/12. Logistic Regression/default.csv +1001 -0
  23. noshot/data/AIDS CN NLP/AIDS/12. Logistic Regression/hours_scores_records.csv +101 -0
  24. noshot/data/AIDS CN NLP/AIDS/2. Implement A Star And MA Star/(A) Astar.ipynb +256 -0
  25. noshot/data/AIDS CN NLP/AIDS/2. Implement A Star And MA Star/(B) IDAstar.ipynb +157 -0
  26. noshot/data/AIDS CN NLP/AIDS/2. Implement A Star And MA Star/(C) SMAstar.ipynb +178 -0
  27. noshot/data/AIDS CN NLP/AIDS/3. Genetic Algorithm/Genetic.ipynb +95 -0
  28. noshot/data/AIDS CN NLP/AIDS/4. Simulated Annealing/Simulated Annealing.ipynb +74 -0
  29. noshot/data/AIDS CN NLP/AIDS/4. Simulated Annealing/Sudoku Simulated Annealing.ipynb +103 -0
  30. noshot/data/AIDS CN NLP/AIDS/5. Alpha Beta Pruning/AlphaBetaPruning.ipynb +182 -0
  31. noshot/data/AIDS CN NLP/AIDS/6. Consraint Satisfaction Problems (CSP)/(A) CSP House Allocation.ipynb +120 -0
  32. noshot/data/AIDS CN NLP/AIDS/6. Consraint Satisfaction Problems (CSP)/(B) CSP Map Coloring.ipynb +125 -0
  33. noshot/data/AIDS CN NLP/AIDS/7. Random Sampling/Random Sampling.ipynb +73 -0
  34. noshot/data/AIDS CN NLP/AIDS/7. Random Sampling/height_weight_bmi.csv +8389 -0
  35. noshot/data/AIDS CN NLP/AIDS/8. Z Test/Z Test Hash Function.ipynb +141 -0
  36. noshot/data/AIDS CN NLP/AIDS/8. Z Test/Z Test.ipynb +151 -0
  37. noshot/data/AIDS CN NLP/AIDS/8. Z Test/height_weight_bmi.csv +8389 -0
  38. noshot/data/AIDS CN NLP/AIDS/9. T Test/1_heart.csv +304 -0
  39. noshot/data/AIDS CN NLP/AIDS/9. T Test/Independent T Test.ipynb +119 -0
  40. noshot/data/AIDS CN NLP/AIDS/9. T Test/Paired T Test.ipynb +118 -0
  41. noshot/data/AIDS CN NLP/AIDS/9. T Test/T Test Hash Function.ipynb +142 -0
  42. noshot/data/AIDS CN NLP/AIDS/9. T Test/T Test.ipynb +158 -0
  43. noshot/data/AIDS CN NLP/AIDS/9. T Test/height_weight_bmi.csv +8389 -0
  44. noshot/data/AIDS CN NLP/AIDS/9. T Test/iq_test.csv +0 -0
  45. noshot/data/AIDS CN NLP/AIDS/Others (AllinOne)/All In One.ipynb +4581 -0
  46. noshot/data/AIDS CN NLP/CN/1. Chat Application/chat.java +81 -0
  47. noshot/data/AIDS CN NLP/CN/1. Chat Application/output.png +0 -0
  48. noshot/data/AIDS CN NLP/CN/1. Chat Application/procedure.png +0 -0
  49. noshot/data/AIDS CN NLP/CN/10. Ethernet LAN IEEE 802.3/LAN.tcl +65 -0
  50. noshot/data/AIDS CN NLP/CN/10. Ethernet LAN IEEE 802.3/analysis.awk +44 -0
  51. noshot/data/AIDS CN NLP/CN/10. Ethernet LAN IEEE 802.3/output.png +0 -0
  52. noshot/data/AIDS CN NLP/CN/10. Ethernet LAN IEEE 802.3/procedure.png +0 -0
  53. noshot/data/AIDS CN NLP/CN/11. Wireless LAN IEEE 802.11/complexdcf.tcl +229 -0
  54. noshot/data/AIDS CN NLP/CN/11. Wireless LAN IEEE 802.11/output.png +0 -0
  55. noshot/data/AIDS CN NLP/CN/11. Wireless LAN IEEE 802.11/procedure.png +0 -0
  56. noshot/data/AIDS CN NLP/CN/2. File Transfer/file_to_send.txt +2 -0
  57. noshot/data/AIDS CN NLP/CN/2. File Transfer/filetransfer.java +119 -0
  58. noshot/data/AIDS CN NLP/CN/2. File Transfer/output.png +0 -0
  59. noshot/data/AIDS CN NLP/CN/2. File Transfer/procedure.png +0 -0
  60. noshot/data/AIDS CN NLP/CN/3. RMI (Remote Method Invocation)/output.png +0 -0
  61. noshot/data/AIDS CN NLP/CN/3. RMI (Remote Method Invocation)/procedure.png +0 -0
  62. noshot/data/AIDS CN NLP/CN/3. RMI (Remote Method Invocation)/rmi.java +56 -0
  63. noshot/data/AIDS CN NLP/CN/4. Wired Network/output.png +0 -0
  64. noshot/data/AIDS CN NLP/CN/4. Wired Network/procedure.png +0 -0
  65. noshot/data/AIDS CN NLP/CN/4. Wired Network/wired.awk +25 -0
  66. noshot/data/AIDS CN NLP/CN/4. Wired Network/wired.tcl +81 -0
  67. noshot/data/AIDS CN NLP/CN/5. Wireless Network/output.png +0 -0
  68. noshot/data/AIDS CN NLP/CN/5. Wireless Network/procedure.png +0 -0
  69. noshot/data/AIDS CN NLP/CN/5. Wireless Network/wireless.awk +27 -0
  70. noshot/data/AIDS CN NLP/CN/5. Wireless Network/wireless.tcl +153 -0
  71. noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Congestion Control/Sack And Vegas/analysis.awk +27 -0
  72. noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Congestion Control/Sack And Vegas/output.png +0 -0
  73. noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Congestion Control/Sack And Vegas/sack.tcl +86 -0
  74. noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Congestion Control/Sack And Vegas/vegas.tcl +86 -0
  75. noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Congestion Control/Tahoe And Reno/analysis.awk +28 -0
  76. noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Congestion Control/Tahoe And Reno/output.png +0 -0
  77. noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Congestion Control/Tahoe And Reno/reno.tcl +78 -0
  78. noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Congestion Control/Tahoe And Reno/tahoe.tcl +79 -0
  79. noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Flow Control/analysis.awk +27 -0
  80. noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Flow Control/flow.tcl +163 -0
  81. noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/TCP Flow Control/output.png +0 -0
  82. noshot/data/AIDS CN NLP/CN/6. TCP Flow And Congestion Control/procedure.png +0 -0
  83. noshot/data/AIDS CN NLP/CN/7. Link State And Distance Vector Routing/DV.tcl +111 -0
  84. noshot/data/AIDS CN NLP/CN/7. Link State And Distance Vector Routing/LS.tcl +106 -0
  85. noshot/data/AIDS CN NLP/CN/7. Link State And Distance Vector Routing/analysis.awk +36 -0
  86. noshot/data/AIDS CN NLP/CN/7. Link State And Distance Vector Routing/output.png +0 -0
  87. noshot/data/AIDS CN NLP/CN/7. Link State And Distance Vector Routing/procedure.png +0 -0
  88. noshot/data/AIDS CN NLP/CN/8. Multicast And Broadcast Routing/analysis.awk +20 -0
  89. noshot/data/AIDS CN NLP/CN/8. Multicast And Broadcast Routing/broadcast.tcl +76 -0
  90. noshot/data/AIDS CN NLP/CN/8. Multicast And Broadcast Routing/multicast.tcl +103 -0
  91. noshot/data/AIDS CN NLP/CN/8. Multicast And Broadcast Routing/output.png +0 -0
  92. noshot/data/AIDS CN NLP/CN/8. Multicast And Broadcast Routing/procedure.png +0 -0
  93. noshot/data/AIDS CN NLP/CN/9. DHCP/DHCP.java +125 -0
  94. noshot/data/AIDS CN NLP/CN/9. DHCP/output.png +0 -0
  95. noshot/data/AIDS CN NLP/CN/9. DHCP/procedure.png +0 -0
  96. noshot/data/AIDS CN NLP/NLP/NLP 1/1-Prereqs.py +18 -0
  97. noshot/data/AIDS CN NLP/NLP/NLP 1/2-Chi2test.py +83 -0
  98. noshot/data/AIDS CN NLP/NLP/NLP 1/2-T-test.py +79 -0
  99. noshot/data/AIDS CN NLP/NLP/NLP 1/3-WSD-nb.py +53 -0
  100. noshot/data/AIDS CN NLP/NLP/NLP 1/4-Hindle-Rooth.py +53 -0
  101. noshot/data/AIDS CN NLP/NLP/NLP 1/5-HMM-Trellis.py +82 -0
  102. noshot/data/AIDS CN NLP/NLP/NLP 1/6-HMM-Viterbi.py +16 -0
  103. noshot/data/AIDS CN NLP/NLP/NLP 1/7-PCFG-parsetree.py +15 -0
  104. noshot/data/AIDS CN NLP/NLP/NLP 1/Chi2test.ipynb +285 -0
  105. noshot/data/AIDS CN NLP/NLP/NLP 1/Hindle-Rooth.ipynb +179 -0
  106. noshot/data/AIDS CN NLP/NLP/NLP 1/Lab 10 - Text generator using LSTM.ipynb +1461 -0
  107. noshot/data/AIDS CN NLP/NLP/NLP 1/Lab 11 NMT.ipynb +2307 -0
  108. noshot/data/AIDS CN NLP/NLP/NLP 1/PCFG.ipynb +134 -0
  109. noshot/data/AIDS CN NLP/NLP/NLP 1/Prereqs.ipynb +131 -0
  110. noshot/data/AIDS CN NLP/NLP/NLP 1/T test.ipynb +252 -0
  111. noshot/data/AIDS CN NLP/NLP/NLP 1/TFIDF BOW.ipynb +171 -0
  112. noshot/data/AIDS CN NLP/NLP/NLP 1/Trellis.ipynb +244 -0
  113. noshot/data/AIDS CN NLP/NLP/NLP 1/WSD.ipynb +645 -0
  114. noshot/data/AIDS CN NLP/NLP/NLP 1/Word2Vec.ipynb +93 -0
  115. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab01(tokenizer)/tokenizer.ipynb +370 -0
  116. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab01(tokenizer)/training_tokenizer.txt +6 -0
  117. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab02(stemming)/exp0.ipynb +274 -0
  118. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab02(stemming)/lab2.ipynb +905 -0
  119. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab02(stemming)/test.txt +1 -0
  120. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab02(stemming)/tokenizing.ipynb +272 -0
  121. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab03(parse-tree)/collocation.ipynb +332 -0
  122. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab03(parse-tree)/lab3.ipynb +549 -0
  123. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab03(parse-tree)/nlp.txt +1 -0
  124. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab04(collocation)/Lab4-NLP-Exp-2.ipynb +817 -0
  125. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab04(collocation)/collocation.ipynb +332 -0
  126. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab05(WSD)/NLP-Lab-5-Exp3.ipynb +231 -0
  127. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab05(WSD)/word-sense-disambiguation.ipynb +507 -0
  128. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab06(additional-exercise)/lab6.ipynb +134 -0
  129. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab07(HMM,Viterbi)/NLP Exp 4.ipynb +255 -0
  130. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab07(HMM,Viterbi)/NLP_Exp_5.ipynb +159 -0
  131. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab08(PCFG)/PCFG.ipynb +282 -0
  132. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab09-Hindle-rooth&MLP/Lab 9 - MLP classifier.ipynb +670 -0
  133. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab09-Hindle-rooth&MLP/MLP-alternative-code.ipynb +613 -0
  134. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab09-Hindle-rooth&MLP/hindle-rooth-algorithm.ipynb +74 -0
  135. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab10(LSTM)/Lab_10_Text_generator_using_LSTM.ipynb +480 -0
  136. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab11(Viterbi-PCFG,Machine-translation)/Machine-translation.ipynb +445 -0
  137. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab11(Viterbi-PCFG,Machine-translation)/Viterbi-PCFG.ipynb +105 -0
  138. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab11(Viterbi-PCFG,Machine-translation)/corpora_tools.py +87 -0
  139. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab11(Viterbi-PCFG,Machine-translation)/data_utils.py +11 -0
  140. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab11(Viterbi-PCFG,Machine-translation)/train_translator.py +83 -0
  141. noshot/data/AIDS CN NLP/NLP/NLP 2/Lab12(Information-Extraction)/Information_Extraction.ipynb +201 -0
  142. noshot/data/AIDS CN NLP/NLP/NLP 3/Backtrack-without-Verbitri.ipynb +185 -0
  143. noshot/data/AIDS CN NLP/NLP/NLP 3/Backward-Procedure.ipynb +597 -0
  144. noshot/data/AIDS CN NLP/NLP/NLP 3/Bag_of.ipynb +1422 -0
  145. noshot/data/AIDS CN NLP/NLP/NLP 3/CYK-algorithm.ipynb +1067 -0
  146. noshot/data/AIDS CN NLP/NLP/NLP 3/Forward-Procedure.ipynb +477 -0
  147. noshot/data/AIDS CN NLP/NLP/NLP 3/LSTM.ipynb +1290 -0
  148. noshot/data/AIDS CN NLP/NLP/NLP 3/Lab 10 - Text generator using LSTM.ipynb +1461 -0
  149. noshot/data/AIDS CN NLP/NLP/NLP 3/Lab 11 NMT.ipynb +2307 -0
  150. noshot/data/AIDS CN NLP/NLP/NLP 3/NLP-LAB-4.ipynb +216 -0
  151. noshot/data/AIDS CN NLP/NLP/NLP 3/NLP-LAB-5.ipynb +216 -0
  152. noshot/data/AIDS CN NLP/NLP/NLP 3/abc.txt +6 -0
  153. noshot/data/AIDS CN NLP/NLP/NLP 3/ex-1-nltk.ipynb +711 -0
  154. noshot/data/AIDS CN NLP/NLP/NLP 3/ex-2-nlp.ipynb +267 -0
  155. noshot/data/AIDS CN NLP/NLP/NLP 3/exp8&9.ipynb +305 -0
  156. noshot/data/AIDS CN NLP/NLP/NLP 3/hind.ipynb +287 -0
  157. noshot/data/AIDS CN NLP/NLP/NLP 3/lab66.ipynb +752 -0
  158. noshot/data/AIDS CN NLP/NLP/NLP 3/leb_3.ipynb +612 -0
  159. noshot/data/AIDS CN NLP/NLP/NLP 3/naive_bayes_classifier.pkl +0 -0
  160. noshot/data/AIDS CN NLP/NLP/NLP 3/nlp_leb_1.ipynb +3008 -0
  161. noshot/data/AIDS CN NLP/NLP/NLP 3/nlp_leb_2.ipynb +3095 -0
  162. noshot/data/AIDS CN NLP/NLP/NLP 3/nlplab-9.ipynb +295 -0
  163. noshot/data/AIDS CN NLP/NLP/NLP 3/nltk-ex-4.ipynb +506 -0
  164. noshot/data/AIDS CN NLP/NLP/NLP 3/text1.txt +48 -0
  165. noshot/data/AIDS CN NLP/NLP/NLP 3/text2.txt +8 -0
  166. noshot/data/AIDS CN NLP/NLP/NLP 3/text3.txt +48 -0
  167. noshot/data/AIDS CN NLP/NLP/NLP 3/translation-rnn.ipynb +812 -0
  168. noshot/data/AIDS CN NLP/NLP/NLP 3/word2vector.ipynb +173 -0
  169. noshot/data/AIDS CN NLP/NLP/NLP 4/Backward Procedure Algorithm.ipynb +179 -0
  170. noshot/data/AIDS CN NLP/NLP/NLP 4/Chi Square Collocation.ipynb +208 -0
  171. noshot/data/AIDS CN NLP/NLP/NLP 4/Collocation (T test).ipynb +188 -0
  172. noshot/data/AIDS CN NLP/NLP/NLP 4/Experiment 1.ipynb +437 -0
  173. noshot/data/AIDS CN NLP/NLP/NLP 4/Forward Procedure Algorithm.ipynb +132 -0
  174. noshot/data/AIDS CN NLP/NLP/NLP 4/Hindle Rooth.ipynb +414 -0
  175. noshot/data/AIDS CN NLP/NLP/NLP 4/MachineTranslation.ipynb +368 -0
  176. noshot/data/AIDS CN NLP/NLP/NLP 4/Multi Layer Perceptron using MLPClassifier.ipynb +86 -0
  177. noshot/data/AIDS CN NLP/NLP/NLP 4/Multi Layer Perceptron using Tensorflow.ipynb +112 -0
  178. noshot/data/AIDS CN NLP/NLP/NLP 4/PCFG Inside Probability.ipynb +451 -0
  179. noshot/data/AIDS CN NLP/NLP/NLP 4/Text Generation using LSTM.ipynb +297 -0
  180. noshot/data/AIDS CN NLP/NLP/NLP 4/Viterbi.ipynb +310 -0
  181. noshot/data/AIDS CN NLP/NLP/NLP 4/Word Sense Disambiguation.ipynb +335 -0
  182. noshot/data/AIDS CN NLP/NLP/NLP 5/10.Text Generation using LSTM.ipynb +316 -0
  183. noshot/data/AIDS CN NLP/NLP/NLP 5/11.Machine Translation.ipynb +868 -0
  184. noshot/data/AIDS CN NLP/NLP/NLP 5/2.T and Chi2 Test.ipynb +204 -0
  185. noshot/data/AIDS CN NLP/NLP/NLP 5/3.Word Sense Diambiguation.ipynb +234 -0
  186. noshot/data/AIDS CN NLP/NLP/NLP 5/4.Hinddle and Rooth.ipynb +128 -0
  187. noshot/data/AIDS CN NLP/NLP/NLP 5/5.Forward and Backward.ipynb +149 -0
  188. noshot/data/AIDS CN NLP/NLP/NLP 5/6.Viterbi.ipynb +111 -0
  189. noshot/data/AIDS CN NLP/NLP/NLP 5/7.PCFG Parse Tree.ipynb +134 -0
  190. noshot/data/AIDS CN NLP/NLP/NLP 5/7.PCFG using cyk.ipynb +101 -0
  191. noshot/data/AIDS CN NLP/NLP/NLP 5/8.Bag of words and TF-IDF.ipynb +310 -0
  192. noshot/data/AIDS CN NLP/NLP/NLP 5/9.Word2Vector.ipynb +78 -0
  193. noshot/data/AIDS CN NLP/NLP/NLP 5/NLP ALL In One.ipynb +2619 -0
  194. noshot/data/AIDS CN NLP/NLP/NLP 5/sample1.txt +15 -0
  195. noshot/data/AIDS CN NLP/NLP/NLP 5/sample2.txt +4 -0
  196. noshot/data/AIDS CN NLP/NLP/NLP 5/word2vec_model.bin +0 -0
  197. noshot/data/AIDS CN NLP/NLP/NLP 6/1. Tokenize, Tagging, NER, Parse Tree.ipynb +312 -0
  198. noshot/data/AIDS CN NLP/NLP/NLP 6/2. T Test and Chi2 Test.ipynb +185 -0
  199. noshot/data/AIDS CN NLP/NLP/NLP 6/3. Naive Bayes WSD.ipynb +199 -0
  200. noshot/data/AIDS CN NLP/NLP/NLP 6/4. Hinddle and Rooth.ipynb +151 -0
  201. noshot/data/AIDS CN NLP/NLP/NLP 6/5 and 6 FWD, BWD, Viterbi.ipynb +164 -0
  202. noshot/data/AIDS CN NLP/NLP/NLP 6/7. PCFG using CYK.ipynb +383 -0
  203. noshot/data/AIDS CN NLP/NLP/NLP 6/8. BOW and TF-IDF.ipynb +252 -0
  204. noshot/data/AIDS CN NLP/Ubuntu CN Lab.iso +0 -0
  205. noshot/main.py +47 -0
  206. noshot-0.1.0.dist-info/LICENSE.txt +21 -0
  207. noshot-0.1.0.dist-info/METADATA +65 -0
  208. noshot-0.1.0.dist-info/RECORD +210 -0
  209. noshot-0.1.0.dist-info/WHEEL +5 -0
  210. noshot-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,163 @@
1
+ #How to run
2
+ #==========
3
+ #save this file as flow.tcl in desktop folder
4
+ #open desktop right-click and choose 'Open in Terminal'
5
+ #run this command
6
+ #ns flow.tcl
7
+
8
+ #nam file, xgraph and awk file will be executed automatically
9
+
10
+ #creating a simulator object
11
+ set ns [ new Simulator ]
12
+ #creating trace file
13
+ set tf [open flow.tr w]
14
+ $ns trace-all $tf
15
+ #creating nam file
16
+ set nf [open flow.nam w]
17
+ $ns namtrace-all $nf
18
+
19
+ #creating variables for throughput files
20
+ set ft1 [open "Sender1_throughput" "w"]
21
+ set ft2 [open "Sender2_throughput" "w"]
22
+ set ft3 [open "Sender3_throughput" "w"]
23
+ set ft4 [open "Total_throughput" "w"]
24
+
25
+ #creating variables for bandwidth files
26
+ set fb1 [open "Bandwidth1" "w"]
27
+ set fb2 [open "Bandwidth2" "w"]
28
+ set fb3 [open "Bandwidth3" "w"]
29
+ set fb4 [open "TotalBandwidth" "w"]
30
+
31
+ #finish procedure to call nam and xgraph
32
+ proc finish {} {
33
+ global ns nf ft1 ft2 ft3 ft4 fb1 fb2 fb3 fb4
34
+ $ns flush-trace
35
+ #closing all files
36
+ close $nf
37
+ close $ft1
38
+ close $ft2
39
+ close $ft3
40
+ close $ft4
41
+ close $fb1
42
+ close $fb2
43
+ close $fb3
44
+ close $fb4
45
+ #executing graphs
46
+ exec xgraph Sender1_throughput Sender2_throughput Sender3_throughput Total_throughput &
47
+ exec xgraph Bandwidth1 Bandwidth2 Bandwidth3 TotalBandwidth &
48
+ puts "running nam..."
49
+ exec nam flow.nam &
50
+ exec awk -f analysis.awk flow.tr &
51
+ exit 0
52
+ }
53
+
54
+ #record procedure to calculate total bandwidth and throughput
55
+ proc record {} {
56
+ global null1 null2 null3 ft1 ft2 ft3 ft4 fb1 fb2 fb3 fb4
57
+ global ftp1 smtp1 http1
58
+
59
+ set ns [Simulator instance]
60
+ set time 0.1
61
+ set now [$ns now]
62
+
63
+ set bw0 [$null1 set bytes_]
64
+ set bw1 [$null2 set bytes_]
65
+ set bw2 [$null3 set bytes_]
66
+
67
+ set totbw [expr $bw0 + $bw1 + $bw2]
68
+ puts $ft4 "$now [expr $totbw/$time*8/1000000]"
69
+
70
+ puts $ft1 "$now [expr $bw0/$time*8/1000000]"
71
+ puts $ft2 "$now [expr $bw1/$time*8/1000000]"
72
+ puts $ft3 "$now [expr $bw2/$time*8/1000000]"
73
+
74
+ puts $fb1 "$now [expr $bw0]"
75
+ puts $fb2 "$now [expr $bw1]"
76
+ puts $fb3 "$now [expr $bw2]"
77
+ puts $fb4 "$now [expr $totbw]"
78
+
79
+ $null1 set bytes_ 0
80
+ $null2 set bytes_ 0
81
+ $null3 set bytes_ 0
82
+
83
+ $ns at [expr $now+$time] "record"
84
+ }
85
+
86
+ #creating 10 nodes
87
+ for {set i 0} {$i < 10} {incr i} {
88
+ set n($i) [$ns node]
89
+ }
90
+
91
+ #creating duplex links
92
+ $ns duplex-link $n(0) $n(1) 1Mb 10ms DropTail
93
+ $ns duplex-link $n(0) $n(3) 1.5Mb 10ms RED
94
+ $ns duplex-link $n(1) $n(2) 1Mb 10ms DropTail
95
+ $ns duplex-link $n(2) $n(7) 2Mb 10ms RED
96
+ $ns duplex-link $n(7) $n(8) 2Mb 10ms DropTail
97
+ $ns duplex-link $n(8) $n(9) 2Mb 10ms RED
98
+ $ns duplex-link $n(3) $n(5) 1Mb 10ms DropTail
99
+ $ns duplex-link $n(5) $n(6) 1Mb 10ms RED
100
+ $ns duplex-link $n(6) $n(4) 1Mb 10ms DropTail
101
+ $ns duplex-link $n(4) $n(7) 1Mb 10ms RED
102
+
103
+ #orienting links
104
+ $ns duplex-link-op $n(0) $n(1) orient right-up
105
+ $ns duplex-link-op $n(1) $n(2) orient right
106
+ $ns duplex-link-op $n(0) $n(3) orient right-down
107
+ $ns duplex-link-op $n(2) $n(7) orient right-down
108
+ $ns duplex-link-op $n(7) $n(8) orient right-up
109
+ $ns duplex-link-op $n(5) $n(6) orient right
110
+ $ns duplex-link-op $n(6) $n(4) orient left-up
111
+ $ns duplex-link-op $n(3) $n(5) orient right-down
112
+ $ns duplex-link-op $n(4) $n(7) orient right-up
113
+ $ns duplex-link-op $n(8) $n(9) orient right-down
114
+
115
+ proc ftp_traffic {node0 node9 } {
116
+ global ns null1 tcp1 ftp1
117
+ set tcp1 [new Agent/TCP]
118
+ set null1 [new Agent/TCPSink]
119
+ $ns attach-agent $node0 $tcp1
120
+ $ns attach-agent $node9 $null1
121
+ $ns connect $tcp1 $null1
122
+ set ftp1 [new Application/FTP]
123
+ $ftp1 attach-agent $tcp1
124
+ $ns at 1.0 "$ftp1 start"
125
+ $ns at 3.2 "$ftp1 stop"
126
+ }
127
+ ftp_traffic $n(0) $n(8)
128
+
129
+ proc smtp_traffic {node0 node3 } {
130
+ global ns null2 tcp2 smtp1
131
+ set tcp2 [new Agent/TCP]
132
+ set null2 [new Agent/TCPSink]
133
+ $ns attach-agent $node0 $tcp2
134
+ $ns attach-agent $node3 $null2
135
+ $ns connect $tcp2 $null2
136
+ set smtp1 [new Application/Traffic/Exponential]
137
+ $smtp1 attach-agent $tcp2
138
+ $ns at 2.0 "$smtp1 start"
139
+ $ns at 3.8 "$smtp1 stop"
140
+ }
141
+ smtp_traffic $n(3) $n(6)
142
+
143
+ proc http_traffic {node1 node7 } {
144
+ global ns null3 tcp3 http1
145
+ set tcp3 [new Agent/TCP]
146
+ set null3 [new Agent/TCPSink]
147
+ $ns attach-agent $node1 $tcp3
148
+ $ns attach-agent $node7 $null3
149
+ $ns connect $tcp3 $null3
150
+ set http1 [new Application/Traffic/Exponential]
151
+ $http1 attach-agent $tcp3
152
+ $ns at 0.2 "$http1 start"
153
+ $ns at 3.2 "$http1 stop" }
154
+ http_traffic $n(0) $n(7)
155
+
156
+ #scheduling events
157
+ $ns at 0.5 "record"
158
+ $ns at 0.2 "$ns trace-annotate \"Starting HTTP from 0 to 7\""
159
+ $ns at 1.0 "$ns trace-annotate \"Starting FTP from 0 to 8\""
160
+ $ns at 2.0 "$ns trace-annotate \"Starting SMTP from 3 to 6\""
161
+ $ns at 5.0 "finish"
162
+ $ns run
163
+
@@ -0,0 +1,111 @@
1
+ #How to run
2
+ #==========
3
+ #save this file as DV.tcl in desktop folder
4
+ #also save analysis.awk file in the same location
5
+ #open desktop right-click and choose 'Open in Terminal'
6
+ #run this command
7
+ #ns DV.tcl
8
+
9
+ #both nam and awk file will be executed automatically
10
+
11
+ set ns [new Simulator]
12
+ $ns rtproto DV
13
+ $ns color 1 green
14
+ set node0 [$ns node]
15
+ set node1 [$ns node]
16
+ set node2 [$ns node]
17
+ set node3 [$ns node]
18
+ set node4 [$ns node]
19
+
20
+ set node5 [$ns node]
21
+ set node6 [$ns node]
22
+ set tf [open out_dv.tr w]
23
+ $ns trace-all $tf
24
+ set nf [open out_dv.nam w]
25
+ $ns namtrace-all $nf
26
+
27
+ set ft [open "dvr_th" "w"]
28
+ $node0 label "node 0"
29
+ $node1 label "node 1"
30
+ $node2 label "node 2"
31
+ $node3 label "node 3"
32
+ $node4 label "node 4"
33
+
34
+ $node5 label "node 5"
35
+ $node6 label "node 6"
36
+ $ns duplex-link $node0 $node1 1.5Mb 10ms DropTail
37
+ $ns duplex-link $node1 $node2 1.5Mb 10ms DropTail
38
+ $ns duplex-link $node2 $node3 1.5Mb 10ms DropTail
39
+ $ns duplex-link $node3 $node4 1.5Mb 10ms DropTail
40
+
41
+ $ns duplex-link $node4 $node5 1.5Mb 10ms DropTail
42
+ $ns duplex-link $node5 $node6 1.5Mb 10ms DropTail
43
+ $ns duplex-link $node6 $node0 1.5Mb 10ms DropTail
44
+ $ns duplex-link-op $node0 $node1 orient left-down
45
+ $ns duplex-link-op $node1 $node2 orient left-down
46
+ $ns duplex-link-op $node2 $node3 orient right-down
47
+ $ns duplex-link-op $node3 $node4 orient right
48
+ $ns duplex-link-op $node4 $node5 orient right-up
49
+ $ns duplex-link-op $node5 $node6 orient left-up
50
+ $ns duplex-link-op $node6 $node0 orient left-up
51
+
52
+ set tcp2 [new Agent/TCP]
53
+ $tcp2 set class_ 1
54
+ $ns attach-agent $node0 $tcp2
55
+ set sink2 [new Agent/TCPSink]
56
+ $ns attach-agent $node3 $sink2
57
+ $ns connect $tcp2 $sink2
58
+ set traffic_ftp2 [new Application/FTP]
59
+
60
+ $traffic_ftp2 attach-agent $tcp2
61
+ proc record {} {
62
+ global sink2 tf ft
63
+ global ftp
64
+ set ns [Simulator instance]
65
+ set time 0.1
66
+ set now [$ns now]
67
+ set bw0 [$sink2 set bytes_]
68
+ puts $ft "$now [expr $bw0/$time*8/1000000]"
69
+ $sink2 set bytes_ 0
70
+ $ns at [expr $now+$time] "record"
71
+ }
72
+
73
+ proc finish {} {
74
+ global ns nf
75
+ $ns flush-trace
76
+ close $nf
77
+ exec nam out_dv.nam &
78
+ exec xgraph dvr_th &
79
+ exec awk -f analysis.awk out_dv.tr &
80
+ exit 0
81
+ }
82
+
83
+ $ns at 0.55 "record"
84
+ $ns at 0.5 "$node0 color \"Green\""
85
+ $ns at 0.5 "$node3 color \"Green\""
86
+ $ns at 0.5 "$ns trace-annotate \"Starting FTP node0 to node6\""
87
+ $ns at 0.5 "$node0 label-color green"
88
+ $ns at 0.5 "$node3 label-color green"
89
+ $ns at 0.5 "$traffic_ftp2 start"
90
+ $ns at 0.5 "$node1 label-color green"
91
+
92
+ $ns at 0.5 "$node2 label-color green"
93
+ $ns at 0.5 "$node4 label-color blue"
94
+ $ns at 0.5 "$node5 label-color blue"
95
+ $ns at 0.5 "$node6 label-color blue"
96
+ $ns rtmodel-at 2.0 down $node2 $node3
97
+
98
+ $ns at 2.0 "$node4 label-color green"
99
+ $ns at 2.0 "$node5 label-color green"
100
+ $ns at 2.0 "$node6 label-color green"
101
+ $ns at 2.0 "$node1 label-color blue"
102
+ $ns at 2.0 "$node2 label-color blue"
103
+
104
+ $ns rtmodel-at 3.0 up $node2 $node3
105
+ $ns at 3.0 "$traffic_ftp2 start"
106
+ $ns at 4.9 "$traffic_ftp2 stop"
107
+ $ns at 5.0 "finish"
108
+ $ns run
109
+
110
+
111
+
@@ -0,0 +1,106 @@
1
+ #How to run
2
+ #==========
3
+ #save this file as LS.tcl in desktop folder
4
+ #also save analysis.awk file in the same location
5
+ #open desktop right-click and choose 'Open in Terminal'
6
+ #run this command
7
+ #ns LS.tcl
8
+
9
+ #both nam and awk file will be executed automatically
10
+
11
+ set ns [new Simulator]
12
+ $ns rtproto LS
13
+ $ns color 1 green
14
+ set node0 [$ns node]
15
+ set node1 [$ns node]
16
+ set node2 [$ns node]
17
+ set node3 [$ns node]
18
+ set node4 [$ns node]
19
+ set node5 [$ns node]
20
+ set node6 [$ns node]
21
+ set tf [open out_ls.tr w]
22
+ $ns trace-all $tf
23
+ set nf [open out_ls.nam w]
24
+ $ns namtrace-all $nf
25
+ set ft [open "lsr_th" "w"]
26
+ $node0 label "node 0"
27
+ $node1 label "node 1"
28
+ $node2 label "node 2"
29
+ $node3 label "node 3"
30
+ $node4 label "node 4"
31
+ $node5 label "node 5"
32
+ $node6 label "node 6"
33
+ $ns duplex-link $node0 $node1 1.5Mb 10ms DropTail
34
+ $ns duplex-link $node1 $node2 1.5Mb 10ms DropTail
35
+ $ns duplex-link $node2 $node3 1.5Mb 10ms DropTail
36
+ $ns duplex-link $node3 $node4 1.5Mb 10ms DropTail
37
+ $ns duplex-link $node4 $node5 1.5Mb 10ms DropTail
38
+ $ns duplex-link $node5 $node6 1.5Mb 10ms DropTail
39
+ $ns duplex-link $node6 $node0 1.5Mb 10ms DropTail
40
+
41
+ $ns duplex-link-op $node0 $node1 orient left-down
42
+ $ns duplex-link-op $node1 $node2 orient left-down
43
+ $ns duplex-link-op $node2 $node3 orient right-down
44
+ $ns duplex-link-op $node3 $node4 orient right
45
+ $ns duplex-link-op $node4 $node5 orient right-up
46
+ $ns duplex-link-op $node5 $node6 orient left-up
47
+ $ns duplex-link-op $node6 $node0 orient left-up
48
+
49
+ set tcp2 [new Agent/TCP]
50
+ $tcp2 set class_ 1
51
+ $ns attach-agent $node0 $tcp2
52
+ set sink2 [new Agent/TCPSink]
53
+ $ns attach-agent $node3 $sink2
54
+ $ns connect $tcp2 $sink2
55
+
56
+ set traffic_ftp2 [new Application/FTP]
57
+ $traffic_ftp2 attach-agent $tcp2
58
+ proc record {} {
59
+ global sink2 tf ft
60
+ global ftp
61
+
62
+ set ns [Simulator instance]
63
+ set time 0.1
64
+ set now [$ns now]
65
+ set bw0 [$sink2 set bytes_]
66
+ puts $ft "$now [expr $bw0/$time*8/1000000]"
67
+ $sink2 set bytes_ 0
68
+ $ns at [expr $now+$time] "record"
69
+ }
70
+
71
+ proc finish {} {
72
+ global ns nf
73
+ $ns flush-trace
74
+ close $nf
75
+ exec nam out_ls.nam &
76
+ exec xgraph lsr_th &
77
+ exec awk -f analysis.awk out_ls.tr &
78
+ exit 0
79
+ }
80
+
81
+ $ns at 0.55 "record"
82
+ $ns at 0.5 "$node0 color \"Green\""
83
+ $ns at 0.5 "$node3 color \"Green\""
84
+ $ns at 0.5 "$ns trace-annotate \"Starting FTP node0 to node3\""
85
+ $ns at 0.5 "$node0 label-color green"
86
+ $ns at 0.5 "$node3 label-color green"
87
+
88
+ $ns at 0.5 "$traffic_ftp2 start"
89
+ $ns at 0.5 "$node1 label-color green"
90
+ $ns at 0.5 "$node2 label-color green"
91
+ $ns at 0.5 "$node4 label-color blue"
92
+ $ns at 0.5 "$node5 label-color blue"
93
+ $ns at 0.5 "$node6 label-color blue"
94
+ $ns rtmodel-at 2.0 down $node2 $node3
95
+ $ns at 2.0 "$node4 label-color green"
96
+ $ns at 2.0 "$node5 label-color green"
97
+ $ns at 2.0 "$node6 label-color green"
98
+ $ns at 2.0 "$node1 label-color blue"
99
+ $ns at 2.0 "$node2 label-color blue"
100
+ $ns rtmodel-at 3.0 up $node2 $node3
101
+ $ns at 3.0 "$traffic_ftp2 start"
102
+ $ns at 4.9 "$traffic_ftp2 stop"
103
+ $ns at 5.0 "finish"
104
+ $ns run
105
+
106
+
@@ -0,0 +1,36 @@
1
+ BEGIN {
2
+ recvdSize = 0
3
+ startTime = 0.5
4
+ stopTime = 5.0
5
+ }
6
+
7
+ {
8
+ event = $1
9
+ time = $2
10
+ node_id = $3
11
+ pkt_size = $6
12
+ level = $4
13
+
14
+ if (event == "s") {
15
+ if (time < startTime) {
16
+ startTime = time
17
+ }
18
+ }
19
+
20
+ if (event == "r") {
21
+ if (time > stopTime) {
22
+ stopTime = time
23
+ }
24
+ recvdSize += pkt_size
25
+ }
26
+ }
27
+
28
+ END{
29
+ print("")
30
+ printf("Average Throughput[kbps] = %.2f",(recvdSize/(stopTime-startTime))*(8/1000))
31
+ print("")
32
+ printf("StartTime = %.2f",startTime)
33
+ print("")
34
+ printf("StopTime = %.2f",stopTime)
35
+ print("")
36
+ }
@@ -0,0 +1,20 @@
1
+ BEGIN{
2
+ r1=d1=total=0
3
+ ratio=tp1=0.0
4
+ }
5
+
6
+ {
7
+ if($1 =="r" && $5=="cbr")r1++
8
+ if($1 =="d" && $5=="cbr")d1++
9
+ }
10
+
11
+ END{
12
+ total = r1+d1
13
+ ratio = (r1)*100/total
14
+ tp1 = (r1+d1)*8/1000000
15
+ print("")
16
+ print("Packets Received:",r1)
17
+ print("Packets Dropped:",d1)
18
+ print("Packets Delivery Ratio:",ratio,"%")
19
+ print("UDP Throughput:",tp1,"Mbps")
20
+ }
@@ -0,0 +1,76 @@
1
+ #How to run
2
+ #==========
3
+ #save this file as broadcast.tcl in desktop folder
4
+ #also save analysis.awk file in the same location
5
+ #open desktop right-click and choose 'Open in Terminal'
6
+ #run this command
7
+ #ns broadcast.tcl
8
+
9
+ #both nam and awk file will be executed automatically
10
+
11
+ set ns [new Simulator -multicast on]
12
+
13
+ set tf [open broadcast.tr w]
14
+ $ns trace-all $tf
15
+
16
+ set namfile [open broadcast.nam w]
17
+ $ns namtrace-all $namfile
18
+
19
+ set n0 [$ns node]
20
+ set n1 [$ns node]
21
+ set n2 [$ns node]
22
+ set n3 [$ns node]
23
+ set n4 [$ns node]
24
+
25
+ $ns duplex-link $n0 $n1 1Mb 10ms DropTail
26
+ $ns duplex-link $n0 $n2 1Mb 10ms DropTail
27
+ $ns duplex-link $n1 $n3 1Mb 10ms DropTail
28
+ $ns duplex-link $n2 $n4 1Mb 10ms DropTail
29
+
30
+ set mproto DM
31
+ set mrthandle [$ns mrtproto $mproto {}]
32
+
33
+ set group [Node allocaddr]
34
+
35
+ set udp [new Agent/UDP]
36
+ $ns attach-agent $n0 $udp
37
+
38
+ $udp set dst_addr_ $group
39
+ $udp set dst_port_ 0
40
+
41
+ set cbr [new Application/Traffic/CBR]
42
+ $cbr attach-agent $udp
43
+
44
+ set rcvr1 [new Agent/Null]
45
+ set rcvr2 [new Agent/Null]
46
+ set rcvr3 [new Agent/Null]
47
+ set rcvr4 [new Agent/Null]
48
+
49
+ $ns attach-agent $n1 $rcvr1
50
+ $ns attach-agent $n2 $rcvr2
51
+ $ns attach-agent $n3 $rcvr3
52
+ $ns attach-agent $n4 $rcvr4
53
+
54
+ $ns at 0.0 "$n1 join-group $rcvr1 $group"
55
+ $ns at 0.0 "$n2 join-group $rcvr2 $group"
56
+ $ns at 0.0 "$n3 join-group $rcvr3 $group"
57
+ $ns at 0.0 "$n4 join-group $rcvr4 $group"
58
+
59
+ $ns at 0.5 "$cbr start"
60
+ $ns at 2.0 "$cbr stop"
61
+
62
+ $ns at 2.5 "finish"
63
+
64
+ proc finish {} {
65
+ global ns tf namfile
66
+ $ns flush-trace
67
+ close $tf
68
+ close $namfile
69
+ puts "Executing nam..."
70
+ exec nam broadcast.nam &
71
+ exec awk -f analysis.awk broadcast.tr &
72
+ exit 0
73
+ }
74
+
75
+ $ns run
76
+
@@ -0,0 +1,103 @@
1
+ #How to run
2
+ #==========
3
+ #save this file as multicast.tcl in desktop folder
4
+ #also save analysis.awk file in the same location
5
+ #open desktop right-click and choose 'Open in Terminal'
6
+ #run this command
7
+ #ns multicast.tcl
8
+
9
+ #both nam and awk file will be executed automatically
10
+
11
+ set ns [new Simulator -multicast on]
12
+ set tf [open multicast.tr w]
13
+ $ns trace-all $tf
14
+
15
+ set fd [open multicast.nam w]
16
+ $ns namtrace-all $fd
17
+
18
+ set n0 [$ns node]
19
+ set n1 [$ns node]
20
+ set n2 [$ns node]
21
+ set n3 [$ns node]
22
+ set n4 [$ns node]
23
+ set n5 [$ns node]
24
+ set n6 [$ns node]
25
+ set n7 [$ns node]
26
+
27
+ $ns duplex-link $n0 $n2 1.5Mb 10ms DropTail
28
+ $ns duplex-link $n1 $n2 1.5Mb 10ms DropTail
29
+ $ns duplex-link $n2 $n3 1.5Mb 10ms DropTail
30
+ $ns duplex-link $n3 $n4 1.5Mb 10ms DropTail
31
+ $ns duplex-link $n3 $n7 1.5Mb 10ms DropTail
32
+ $ns duplex-link $n4 $n5 1.5Mb 10ms DropTail
33
+ $ns duplex-link $n4 $n6 1.5Mb 10ms DropTail
34
+
35
+ set mproto DM
36
+ set mrthandle [$ns mrtproto $mproto {}]
37
+
38
+ set group1 [Node allocaddr]
39
+
40
+ set group2 [Node allocaddr]
41
+
42
+ set udp0 [new Agent/UDP]
43
+ $ns attach-agent $n0 $udp0
44
+ $udp0 set dst_addr_ $group1
45
+ $udp0 set dst_port_ 0
46
+ set cbr1 [new Application/Traffic/CBR]
47
+ $cbr1 attach-agent $udp0
48
+
49
+ set udp1 [new Agent/UDP]
50
+ $ns attach-agent $n1 $udp1
51
+ $udp1 set dst_addr_ $group2
52
+ $udp1 set dst_port_ 0
53
+ set cbr2 [new Application/Traffic/CBR]
54
+ $cbr2 attach-agent $udp1
55
+
56
+ set rcvr1 [new Agent/Null]
57
+ $ns attach-agent $n5 $rcvr1
58
+ $ns at 1.0 "$n5 join-group $rcvr1 $group1"
59
+ set rcvr2 [new Agent/Null]
60
+ $ns attach-agent $n6 $rcvr2
61
+ $ns at 1.5 "$n6 join-group $rcvr2 $group1"
62
+
63
+ set rcvr3 [new Agent/Null]
64
+ $ns attach-agent $n7 $rcvr3
65
+ $ns at 2.0 "$n7 join-group $rcvr3 $group1"
66
+
67
+ set rcvr4 [new Agent/Null]
68
+ $ns attach-agent $n5 $rcvr1
69
+ $ns at 2.5 "$n5 join-group $rcvr4 $group2"
70
+
71
+ set rcvr5 [new Agent/Null]
72
+ $ns attach-agent $n6 $rcvr2
73
+ $ns at 3.0 "$n6 join-group $rcvr5 $group2"
74
+
75
+ set rcvr6 [new Agent/Null]
76
+ $ns attach-agent $n7 $rcvr3
77
+
78
+ $ns at 3.5 "$n7 join-group $rcvr6 $group2"
79
+ $ns at 4.0 "$n5 leave-group $rcvr1 $group1"
80
+ $ns at 4.5 "$n6 leave-group $rcvr2 $group1"
81
+ $ns at 5.0 "$n7 leave-group $rcvr3 $group1"
82
+ $ns at 5.5 "$n5 leave-group $rcvr4 $group2"
83
+ $ns at 6.0 "$n6 leave-group $rcvr5 $group2"
84
+ $ns at 6.5 "$n7 leave-group $rcvr6 $group2"
85
+
86
+ $ns at 0.5 "$cbr1 start"
87
+ $ns at 9.5 "$cbr1 stop"
88
+ $ns at 0.5 "$cbr2 start"
89
+ $ns at 9.5 "$cbr2 stop"
90
+
91
+ $ns at 10.0 "finish"
92
+ proc finish {} {
93
+ global ns tf
94
+ $ns flush-trace
95
+ close $tf
96
+ puts "Executing nam..."
97
+ exec nam multicast.nam &
98
+ exec awk -f analysis.awk multicast.tr &
99
+ exit 0
100
+ }
101
+
102
+ $ns set-animation-rate 3.0ms
103
+ $ns run