Skip to content

Instantly share code, notes, and snippets.

@shurru
Created July 10, 2014 08:50
Show Gist options
  • Select an option

  • Save shurru/84974e9a384de54fbef2 to your computer and use it in GitHub Desktop.

Select an option

Save shurru/84974e9a384de54fbef2 to your computer and use it in GitHub Desktop.
def mongoupdate(self):
client= MongoClient('localhost')
# client= MongoClient('128.199.248.15',27017)
db=client.emosis
for i in xrange(0,len(self.O1save)):
post= {"date": self.date[i/4],
"O1": self.O1save[i],
"O2": self.O2save[i],
"fftO1":self.ffto1[i/4],
"fftO2":self.ffto2[i/4],
"stateO1": self.alpha,
"stateO2": self.alpha2
}
posts= db.posts
post_id= posts.insert(post)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment