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
| # Windows Key to Control Key Remapping Script | |
| # This script remaps the Windows key to act as a Control key using Windows Registry | |
| # Run as Administrator for the changes to take effect | |
| param( | |
| [switch]$Restore, | |
| [switch]$Help | |
| ) | |
| function Show-Help { |
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
| // Include javascript file in chrome console | |
| var script= document.createElement('script'); | |
| script.type= 'text/javascript'; | |
| script.src= 'script.js'; | |
| document.head.appendChild(script); |
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
| from IPython.display import HTML | |
| import base64 | |
| import pandas as pd | |
| def create_download_link( df, title = "Download CSV file", filename = "data.csv"): | |
| csv = df.to_csv(index =False) | |
| b64 = base64.b64encode(csv.encode()) | |
| payload = b64.decode() | |
| html = '<a download="{filename}" href="data:text/csv;base64,{payload}" target="_blank">{title}</a>' | |
| html = html.format(payload=payload,title=title,filename=filename) |
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
| from IPython.display import HTML | |
| import base64 | |
| import pandas as pd | |
| def create_download_link( df, title = "Download CSV file", filename = "data.csv"): | |
| csv = df.to_csv(index =False) | |
| b64 = base64.b64encode(csv.encode()) | |
| payload = b64.decode() | |
| html = '<a download="{filename}" href="data:text/csv;base64,{payload}" target="_blank">{title}</a>' | |
| html = html.format(payload=payload,title=title,filename=filename) |
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
| #include <iostream> | |
| #include <fstream> | |
| #include <vector> | |
| #include <string> | |
| #include <sstream> | |
| #include <random> | |
| #include <assert.h> | |
| #include <algorithm> | |
| #include <ctime> | |
| #include <utility> |
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
| #include<iostream> | |
| #include<string> | |
| #include<vector> | |
| using namespace std; | |
| //compute the next arry for KMP | |
| int nextp(string str,vector<int>&pi){ | |
| str.insert(0,1,'@');// convert to 1 based index | |
| pi=vector<int>(str.size(),0); | |
| pi[0]=-1;pi[1]=0; |
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
| #include <iostream> | |
| #include <string> | |
| #include <vector> | |
| using namespace std; | |
| int key[10][11] = { | |
| //numbers | avalible number increase sequence | |
| { 1, 0 }, //0 | |
| { 10, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },//1 | |
| { 7, 0, 2, 3, 5, 6, 8, 9 },//2 |
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
| #include <iostream> | |
| #include <string> | |
| #include <algorithm> | |
| using namespace std; | |
| int reduce(string &str){ | |
| if(str.empty())return 0; | |
| int pos=0; | |
| bool keep=true; | |
| for(int i=0;i<str.size()-1;i++){ | |
| if(str[i]==str[i+1]){ |
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
| #include <iostream> | |
| #include <memory.h> | |
| #include <string> | |
| #include <stdio.h> | |
| #include <queue> | |
| #include <stack> | |
| using namespace std; | |
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
| #include <iostream> | |
| #include <queue> | |
| #include <string> | |
| #include <vector> | |
| #include <algorithm> | |
| #include <cmath> | |
| #include <ctime> | |
| #include <cstdio> | |
| #include <cstring> |
NewerOlder