How do I uninstall a Windows service if the files do not exist anymore?

You have at least three options. I have presented them in order of usage preference. Method 1 – You can use the SC tool (Sc.exe) included in the Resource Kit. (included with Windows 7/8) Open a Command Prompt and enter sc delete <service-name> Tool help snippet follows: DESCRIPTION: SC is a command line program used … Read more

How do I get current date/time on the Windows command line in a suitable format for usage in a file/folder name?

See Windows Batch File (.bat) to get current date in MMDDYYYY format: @echo off For /f “tokens=2-4 delims=/ ” %%a in (‘date /t’) do (set mydate=%%c-%%a-%%b) For /f “tokens=1-2 delims=/:” %%a in (‘time /t’) do (set mytime=%%a%%b) echo %mydate%_%mytime% If you prefer the time in 24 hour/military format, you can replace the second FOR line … Read more

How do I measure execution time of a command on the Windows command line?

PowerShell has a cmdlet for this called Measure-Command. You’ll have to ensure that PowerShell is available on the machine that runs it. PS> Measure-Command { echo hi } Days : 0 Hours : 0 Minutes : 0 Seconds : 0 Milliseconds : 0 Ticks : 1318 TotalDays : 1.52546296296296E-09 TotalHours : 3.66111111111111E-08 TotalMinutes : 2.19666666666667E-06 … Read more

pip install fails with “connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:598)”

pip install gensim config –global http.sslVerify false Just install any package with the “config –global http.sslVerify false” statement You can ignore SSL errors by setting pypi.org and files.pythonhosted.org as well as the older pypi.python.org as trusted hosts. $ pip install –trusted-host pypi.org –trusted-host pypi.python.org –trusted-host files.pythonhosted.org <package_name> Note: Sometime during April 2018, the Python Package … Read more

How can I set up an editor to work with Git on Windows?

Update September 2015 (6 years later) The last release of git-for-Windows (2.5.3) now includes: By configuring git config core.editor notepad, users can now use notepad.exe as their default editor. Configuring git config format.commitMessageColumns 72 will be picked up by the notepad wrapper and line-wrap the commit message after the user edits it. See commit 69b301b … Read more

CSV file written with Python has blank lines between each row

The csv.writer module directly controls line endings and writes \r\n into the file directly. In Python 3 the file must be opened in untranslated text mode with the parameters ‘w’, newline=”” (empty string) or it will write \r\r\n on Windows, where the default text mode will translate each \n into \r\n. #!python3 with open(‘/pythonwork/thefile_subset11.csv’, ‘w’, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)