For nvidia GPUs do the follwing:
nvidia-smi -l 1
This blog covers various topics from technical tweaks to latest in computational linguistics, Artificial Intelligence, Machine Learning and Wed Data Mining.
This is explained here
https://docs.anaconda.com/anaconda/user-guide/tasks/remote-jupyter-notebook/
Follow the following steps to use Jupyter Notebook launched from remote server.
Launch Jupyter Notebook from remote server, selecting a port number for <PORT>:
# Replace <PORT> with your selected port number
jupyter notebook --no-browser --port=<PORT>
For example, if you want to use port number 8080, you would run the following:
jupyter notebook --no-browser --port=8080
Or run the following command to launch with default port:
jupyter notebook --no-browser
Please note the port setting. You will need it in the next step.
You can access the notebook from your remote machine over SSH by setting up a SSH tunnel. Run the following command from your local machine:
# Replace <PORT> with the port number you selected in the above step
# Replace <REMOTE_USER> with the remote server username
# Replace <REMOTE_HOST> with your remote server address
ssh -L 8080:localhost:<PORT> <REMOTE_USER>@<REMOTE_HOST>
The above command opens up a new SSH session in the terminal.
Open a browser from your local machine and navigate to http://localhost:8080/, the Jupyter Notebook web interface. Replace 8080 with your port number used in step 1.
---------------------------------------------------
If you want to use jupyter lab instead of notebook and connect remotely from visual studio you can follow these steps.
1. First start a jupyter lab server on the remote server:
jupyter lab --no-browser --NotebookApp.allow_origin='*' --port=8080
2. Now from visual studio connect to this server using the Jupyter extension
https://stackoverflow.com/questions/72121390/how-to-use-jupyterlab-in-visual-studio-code
you might have to install the extension first.
>mongodThis will start the deamon.
>mongoTo use a DB do
#include YOU HAVE TO INCLUDE boost/python.hpp within tag markers. char const* greet() { return "hello, world"; } BOOST_PYTHON_MODULE(hello) { using namespace boost::python; def("greet", greet); }
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user
$ pip install ipdbTo insert a breakpoint (hard coded break points) in the code use ipdb.set_trace(). You can insert many breakpoints as you like. To run the code:
$ python mycode.pyWhen the breakpoint is hit, you will be dropped to ipdb prompt, similar to the ipython prompt. Use "c" (continue) command to continue the code until the next breakpoint or until the program ends.
import sparsesvd import ipdb def f(x): print x y = 2 *x ipdb.set_trace() print y z = y * 3 ipdb.set_trace() print z pass if __name__ == "__main__": f(10) print "all done"
$ pbibtex projname -kanji=sjisor by the TexShop Preferences --> Engine dialog under default bibtex engine specification by setting
pbibtex -kanji=sjis
nosetests -v test.py
nosetests -v -s test.py
nosetests -v -s test.py:className:test_method
def synchronized(lock): """ Synchronization decorator. """ def wrap(f): def newFunction(*args, **kw): lock.acquire() try: return f(*args, **kw) finally: lock.release() return newFunction return wrap if __name__ == '__main__': from threading import Thread, Lock import time myLock = Lock() class MyThread(Thread): def __init__(self, n): Thread.__init__(self) self.n = n @synchronized(myLock) def run(self): """ Print out some stuff. The method sleeps for a second each iteration. If another thread were running, it would execute then. But since the only active threads are all synchronized on the same lock, no other thread will run. """ for i in range(5): print 'Thread %d: Start %d...' % (self.n, i), time.sleep(1) print '...stop [%d].' % self.n threads = [MyThread(i) for i in range(10)] for t in threads: t.start() for t in threads: t.join()
deliveredto:your_email_service_mail_accountname_that_forwarded_message.
A = [[x1, x2], [x3, x4]]
B = [[y1, y2], [y3, y4]]
For nvidia GPUs do the follwing: nvidia-smi -l 1