This file contains 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
# make sure you don't have any soon to be forgotten version of vim installed | |
$ sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-gui-common | |
# Install Deps | |
$ sudo apt-get install build-essential cmake | |
$ sudo apt-get install python3-dev | |
#Optional: so vim can be uninstalled again via `dpkg -r vim` | |
$ sudo apt-get install checkinstall |
This file contains 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
def _recursive_key_path(dictionary, key_to_find, key_path=[]): | |
if key_to_find in key_path: | |
return key_path | |
else: | |
for key, value in dictionary.items(): | |
if key == key_to_find: | |
key_path.append(key) | |
return recursive(value, key_to_find, key_path) | |
if isinstance(value, dict): | |
key_path.append(key) |
This file contains 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
/* | |
* | |
* Recursive Combinations Fomula implementation in C | |
* c(n,k)=c(n-1,k)+c(n-1,k-1) | |
* | |
* */ | |
long combine ( int n, int r ) | |
{ | |
if ( (n==r) || (r==0) || (n==0) ) |
This file contains 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
DELETE FROM claim_rates | |
WHERE ctid IN (SELECT | |
ctid | |
FROM (SELECT | |
ctid, | |
ROW_NUMBER() | |
OVER ( | |
PARTITION BY claim_tag, rate_type, pricing_record_id | |
ORDER BY claim_tag, rate_type, pricing_record_id) AS rnum | |
FROM claim_rates) t |
This file contains 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
// ================================ | |
// COPrinterPaperSizes.h | |
// ================================ | |
#import <Foundation/Foundation.h> | |
#define PAPER_NAME @"paper_name" | |
#define PAPER_SIZE @"paper_size" | |
@interface COPrinterPaperSizes: NSObject |