This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | from nltk.corpus import wordnet as wn | |
| from sets import Set | |
| def wordlist(word): | |
| t=Set([]) | |
| for word in wn.synsets(word): | |
| for syn in word.lemma_names(): | |
| t.add(syn.lower()) | |
| for hypo in word.hyponyms() : | |
| #t.append(hypo.lemmas_name()) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import random | |
| def randomchunk(lst,chunknum): | |
| total=len(lst) | |
| #take the even chunksize and given a normal distribution | |
| #it seems that a normal coeffecient of variation would be 0.47, | |
| #so with the random choices let it be the "mean" + or - 0.47* mean, if the - is <1, let it be one | |
| chunkVariaton=0.47*(float(total)/chunknum) | |
| high=int((float(total)/chunknum)+ chunkVariaton) | |
| low=int((float(total)/chunknum)- chunkVariaton) | |
| if low < 1: | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import random | |
| def randomchunk(lst,chunknum): | |
| total=len(lst) | |
| #take the even chunksize and given a normal distribution | |
| #it seems that a normal coeffecient of variation would be 0.47, | |
| #so with the random choices let it be the "mean" + or - 0.47* mean, if the - is <1, let it be one | |
| chunkVariaton=0.47*(float(total)/chunknum) | |
| high=int((float(total)/chunknum)+ chunkVariaton) | |
| low=int((float(total)/chunknum)- chunkVariaton) | |
| if low < 1: | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #include <iostream> | |
| int minus(int lhs, int rhs); | |
| int main(){ | |
| std::cout<<minus(-4,1)<<'\n'; | |
| std::cout<<minus(4,1)<<'\n'; | |
| std::cout<<minus(4,-1)<<'\n'; | |
| std::cout<<minus(-4,-1)<<'\n'; | |
| return 0; | |
| } |