Skip to main content

Posts

bulk helper entry for elasticsearch

    helpers.bulk( es, all_extra_dialog, index= 'kyc) 
Recent posts

test embedded

  https://www.youtube.com/watch?v=7HDO1p3VdYg

using python tornado skeleton

import time import tornado.ioloop import tornado.web from tornado import gen, concurrent import json class MainHandler ( tornado . web . RequestHandler ): # @gen.coroutine # def get(self): # l = ['Ram', 'Shyam', 'Sita', 'Lakshman'] # v = random.choice(l) # yield self.write("Hello, world --> " + v) @gen.coroutine # @concurrent.run_on_executor(executor='_thread_pool') def post ( self ): print ( self ) # req_data = (json.loads(self.request.body)) print ( self .request.body) req_data = (json.loads( self .request.body.decode( 'utf-8' ))) # # print("inside the post request") channelID = req_data[ "channelId" ] print ( "channelid :" + channelID) self .set_header( "Content-Type" , "text/plain" ) yield self .write(channelID) def make_app (): return to

remove unwanted files from git of gitignore

It is as simple as  Website link :  https://stackoverflow.com/questions/46273032/is-there-a-way-to-remove-all-ignored-files-from-a-git-repo/46273201 git clean -dfX git-clean - Remove untracked files from the working tree -d  for removing directories -f  remove forcefully -n  Don’t actually remove anything, just show what would be done. -X  Remove only files ignored by Git. This may be useful to rebuild everything from scratch, but keep manually created files.

remove unwanted file from git repo after using git add . and gitignore

# # I just ran into this after initializing a Visual Studio project _before_ adding a .gitignore file (like an idiot). # # I felt real dumb commiting a bunch of files I didn't need to, so the commands below should do the trick. The first two commands # # came from the second answer on this post: http://stackoverflow.com/questions/7527982/applying-gitignore-to-committed-files # See the unwanted files: git ls-files -ci --exclude-standard # Remove the unwanted files: git ls-files -ci --exclude-standard -z | xargs -0 git rm --cached # Commit changes git commit -am " Removed unwanted files marked in .gitignore " # Push reference : https://gist.github.com/jeffjohnson9046/80bc182db7ae2f4a6150