Skip to content

Instantly share code, notes, and snippets.

View mtrcn's full-sized avatar
🏠
Working from home

Mete Ercan Pakdil mtrcn

🏠
Working from home
View GitHub Profile
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Directory\Background\shell\Cmder]
[-HKEY_CLASSES_ROOT\Directory\shell\Cmder]
def compareFields(jdbcDF, domainDf):
print "Missing Columns:"
print [col_name for col_name in [x.lower().replace(" ", "") for x in jdbcDF.columns] if not col_name in domainDf.columns]
print "Redundant Columns:"
print [col_name for col_name in domainDf.columns if not col_name in [x.lower().replace(" ", "") for x in jdbcDF.columns]]
mismatched_types = dict()
for col in (col_name for col_name in jdbcDF.columns if col_name.lower().replace(" ", "") in requests_consultaanvraag_df.columns):
colLowerName = col.lower().replace(" ", "")
destinationColType = str(domainDf.schema.fields[domainDf.columns.index(colLowerName)].dataType)
sourceColType = str(jdbcDF.schema.fields[jdbcDF.columns.index(col)].dataType)
@mtrcn
mtrcn / index.js
Last active February 25, 2020 15:06
Print ArcGIS Server Layers in a tree
const axios = require('axios');
const treeify = require('treeify');
const server_url = 'http://sampleserver1.arcgisonline.com/arcgis/';
const getFolders = async function(){
let response = await axios.get(`${server_url}rest/services?f=json`);
return response.data.folders;
}
@mtrcn
mtrcn / ilceler.json
Created April 5, 2020 18:49
Turkiye Ilceler JSON
[
{
"bolge": "AKDENİZ",
"id": 1,
"il": "ADANA",
"ilce": "ALADAĞ",
"plaka": 1
},
{
"bolge": "AKDENİZ",
@mtrcn
mtrcn / git cherry-pick within a pull request.md
Created December 13, 2022 13:35 — forked from ozh/git cherry-pick within a pull request.md
git cherry-pick within a pull request

1. Create new branch:

git checkout -b otherrepo-master master

2. Get the contents of the PR

git pull https://github.com/otherrepo/my-repo-name.git master