This is a guide on how to install Caffe for Ubuntu 16.04 and above, without GPU support (No CUDA required).
sudo apt-get install libopencv-dev python-opencv opencv-contrib-python
| public class InMemoryCache : ICacheService | |
| { | |
| public T Get<T>(string cacheID, TimeSpan duration, Func<T> getItemCallback) where T : class | |
| { | |
| T item = HttpRuntime.Cache.Get(cacheID) as T; | |
| if (item == null) | |
| { | |
| item = getItemCallback(); | |
| HttpContext.Current.Cache.Insert(cacheID, item, null, System.Web.Caching.Cache.NoAbsoluteExpiration, duration); | |
| } |
| var cancellationTokenSource = new CancellationTokenSource(); | |
| var cancellationToken = cancellationTokenSource.Token; | |
| Task.Delay(2000).ContinueWith(async (t) => | |
| { | |
| //Do stuff | |
| }, cancellationToken); |
| function getParameterByName(name, url) { | |
| if (!url) url = window.location.href; | |
| name = name.replace(/[\[\]]/g, "\\$&"); | |
| var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), | |
| results = regex.exec(url); | |
| if (!results) return null; | |
| if (!results[2]) return ''; | |
| return decodeURIComponent(results[2].replace(/\+/g, " ")); | |
| } |
| public static void WaitFileReady(string fileName) | |
| { | |
| while (true) | |
| { | |
| try | |
| { | |
| using (Stream stream = File.Open(fileName, FileMode.Open, FileAccess.Read, FileShare.Read)) | |
| { | |
| if (stream != null) | |
| { |
| public string strip(string str) | |
| { | |
| char[] arr = str.ToCharArray(); | |
| arr = Array.FindAll<char>(arr, (c => (char.IsLetter(c)))); | |
| str = new string(arr); | |
| return str.ToLowerInvariant(); | |
| } |
| conda create --name tensorflow python=3.5 | |
| activate tensorflow | |
| conda install jupyter | |
| conda install scipy | |
| conda install spyder | |
| conda install pip | |
| pip install tensorflow | |
| pip install pyyaml h5py | |
| pip install keras | |
| pip install opencv-python |
| var locale = "en-GB"; | |
| //IE | |
| if ((<any>(navigator)).browserLanguage) { | |
| locale = (<any>navigator).browserLanguage; | |
| } | |
| //All other vendors | |
| else if (navigator.language) { | |
| locale = (<any>navigator).language; | |
| } |
| #Install XFCE4 | |
| sudo apt install xfce4 | |
| sudo apt-add-repository ppa:x2go/stable | |
| sudo apt-get update | |
| sudo apt-get install x2goserver x2goserver-xsession | |
| #Intsall VSCode | |
| sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make | |
| sudo apt-get update | |
| sudo apt-get install ubuntu-make |
| git rm -r --cached . | |
| git add . | |
| git commit -m "untrack files contained in the .gitignore file" |