Posts

Showing posts from 2016

Excel COUNTIFS Function

COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2]…) ref:https://exceljet.net/excel-functions/excel-countifs-function

Excel COUNTIFS Function

COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2]…) ref:https://exceljet.net/excel-functions/excel-countifs-function

[Excel][INDEX/MATCH]How to use INDEX MATCH function in Excel

Image
=INDEX ( column to return a value from , (MATCH ( lookup value ,  column to lookup against , 0)) reference: https://www.ablebits.com/office-addins-blog/2014/08/13/excel-index-match-function-vlookup/

Notepad++ - how to add character to beginning of line & End of the line

Image
 Your text in Notepad++ Step 2: To add Text at the Start of each line  Press Ctrl+F to open Find window, click on the Replace tab, check that you have selected Regular Expression option, now add ^ in the Find textbox and the text you want at the start of each line in the Replace textbox, and click Replace all. Step 3: To add Text at the End of each line  Press Ctrl+F to open Find window, click on the Replace tab, check that you have selected Regular Expression option, now add $ in the Find textbox and the text you want at the End of each line in the Replace textbox, and click Replace all. Step 4: Result 

3) Python Naming convention

Class starts with lowercase identifier s starts with lowercase _identifie r indicates that the identifier is private . __identifier indicates a strongly private identifier. __identifier__ , the identifier is a language-defined special name . Python is case sensitive.

How to enable $Admin Shares in Windows 7, 8 or 10.

REG ADD HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System /v LocalAccountTokenFilterPolicy /t REG_SZ /d 00000001 /f REG ADD HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Lanmanserver\Parameters /v AutoshareWKS /t REG_SZ /d 00000001 /f

How to get regestryvalue of remote system

Make sure enable remoteregestry service if not type below commands in remote system sc config remoteregistry start=auto sc start remote regestry To get value of  remote system regesty value reg query "\\computername\HKLM\SYSTEM\ControlSet001\Services\amdkmdag" /v Releaseversion"

2) Folders to copy/Move in Windows with shutil package in windows

import os, shutil src = "C:\\Folder\\" dst = "\\\\servername\\Results\\" shutil.copy(src, dst) shutil.move(src, dst)

1) How to install Python / Pip on Windows 7 (or 8)

How to install Python / Pip on Windows 7 (or 8) Download the MSI installer from  http://www.python.org/download/ . Select 32 bit or 64 bit based on the System Settings which opens by pressing Win+Break Run the installer. Be sure to check the option to add Python to your PATH while installing. Open PowerShell as admin by right clicking on the PowerShell icon and selecting ‘Run as Admin’ To solve permission issues, run the following command: Set-ExecutionPolicy Unrestricted Enter the following commands in PowerShell to download the bootstrap scripts for  easy_install  and  pip : mkdir c:\envs cd c:\envs (new-object System.Net.WebClient).DownloadFile('https://bootstrap.pypa.io/ez_setup.py', 'c:\envs\distribute_setup.py') (new-object System.Net.WebClient).DownloadFile('https://raw.github.com/pypa/pip/master/contrib/get-pip.py', 'c:\envs\get-pip.py') python c:\envs\distribute_setup.py python c:\envs\get-pip.py Once these commands ru...

Download files with powershell

Run below command from powershell ( new-object System . Net . WebClient ). DownloadFile ( 'https://bootstrap.pypa.io/ez_setup.py' , 'c:\foldername\filenametosave.py' ) Example: ( new-object System . Net . WebClient ). DownloadFile ( 'https://bootstrap.pypa.io/ez_setup.py' , 'c:\envs\distribute_setup.py' )

WMIC For Gathering System Info

Get CPU name >wmic cpu get name Name AMD A10 PRO-7350B R6, 10 Compute Cores 4C+6G Get Operating System: C:\>wmic os get Name

Adding remote systems user credentials to the Windows Vault

Manually netplwiz.exe or win+R=>control userpasswords2 We have Windows 7 devices on one domain, and some users need regular access to files on another, independant domain.  We can add credentials manually using control userpasswords2>Advanced>Manage Passwords>Add a windows credential" however we are looking for a way to script it so we can add the credentials to the user's "vault" to allow logon scripts to automatically connect to the servers on the other domain. Using Script/bat file cmdkey /add: HOSTNAME /user: username /pass: password
Image
Find Items in one column that are not in another column Select the list in column A Right-Click and select Name a Range... Enter "ColumnToSearch" Click cell C1 Enter this formula:  =MATCH(B1,ColumnToSearch,0) Drag the formula down for all items in B If the formula fails to find a match, it will be marked #N/A, otherwise it will be a number. If you'd like it to be TRUE for match and FALSE for no match, use this formula instead: =ISNUMBER(MATCH(B1,ColumnToSearch,0)) If you'd like to return the  unfound value  and return empty string for found values =IF(ISNUMBER(MATCH(B1,ColumnToSearch,0)),"",B1) MY Example: Formula:=IF(ISNUMBER(MATCH(A2,C:C,0)),"",A2)