This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Sub ClearExistingTable() | |
Dim Piv As PivotTable | |
For Each Piv In cnPivot.PivotTables | |
Piv.TableRange2.Clear | |
Next Piv | |
End Sub |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private sub createpivot() | |
On Error Goto EH: | |
Dim ptCache As PivotCache | |
Set ptCache = ThisWorkbook.PivotCaches.Create(SourceType:=xlDatabase _ | |
, SourceData:= chRoyaltyReport.ListObjects("tabRoyalty) _ | |
, Version:=xlPivotTableVersion15) | |
' ChRoyaltyReport Worksheet name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub First_Method() | |
For i = 1 To 7 | |
On Error GoTo Tab1: | |
Range("B" & i).Value = Range("A" & i).Value + i | |
NextCol: | |
Next i |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from subprocess import check_call | |
def post_save(model, os_path, contents_manager): | |
"""post-save hook for converting notebooks to .py and .html files.""" | |
if model['type'] != 'notebook': | |
return # only do this for notebooks | |
d, fname = os.path.split(os_path) | |
check_call(['ipython', 'nbconvert', '--to', 'script', fname], cwd=d) | |
check_call(['ipython', 'nbconvert', '--to', 'html', fname], cwd=d) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Books | |
--- Programming Collective Intelligence Paperback Tony Segaran | |
-- Text Processing in Python Paperback – David Mertz | |
Libraries |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://stackoverflow.com/questions/44187150/power-bi-dax-how-do-i-count-rows-in-one-table-based-on-values-in-another-table | |
https://stackoverflow.com/questions/44108244/dax-min-value-from-family |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://stackoverflow.com/questions/23059397/handling-files-with-different-structure-for-each-loop-ssis?rq=1 | |
https://stackoverflow.com/questions/2830711/create-a-new-table-and-import-data-from-csv-file-into-sql-server-2005 | |
https://stackoverflow.com/questions/6735733/what-are-the-differences-between-merge-join-and-lookup-transformations-in-ssis |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://stackoverflow.com/documentation/excel-vba/1107/vba-best-practices/9292/avoid-using-select-or-activate#t=201705241336442838007 | |
https://blogs.office.com/2009/03/12/excel-vba-performance-coding-best-practices/ | |
https://fastexcel.wordpress.com/2011/05/25/writing-efficient-vba-udfs-part-1/ | |
https://fastexcel.wordpress.com/page/2/?s=writing+efficient | |
http://use-the-index-luke.com/anatomy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Top Ten Highest Scores in IPL ( 2008 - 2016 ) | |
SELECT Top 10 A.Match_Id , C.Player_Name , SUM(B.Runs_Scored) As 'Runs' | |
FROM Ball_by_Ball A | |
INNER JOIN Batsman_Scored B | |
ON CONCAT(A.Match_Id,A.Over_Id,A.Ball_Id,A.Innings_No) | |
= CONCAT(B.Match_Id,B.Over_Id ,B.Ball_Id ,B.Innings_No) | |
INNER JOIN Player C | |
ON A.Striker = C.Player_Id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Players with most Centuries in IPL ( 2008 - 2016 ) | |
WITH CTE ( Match_Id , Player_Name , Runs ) | |
As | |
( | |
SELECT A.Match_Id , C.Player_Name , SUM(B.Runs_Scored) As 'Runs' | |
FROM Ball_by_Ball A | |
INNER JOIN Batsman_Scored B | |
ON CONCAT(A.Match_Id,A.Over_Id,A.Ball_Id,A.Innings_No) | |
= CONCAT(B.Match_Id,B.Over_Id ,B.Ball_Id ,B.Innings_No) |