Skip to content

Instantly share code, notes, and snippets.

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

Ettore Rizza ettorerizza

🏠
Working from home
View GitHub Profile
@rtempleton
rtempleton / snowflake_database_ddl.py
Last active February 23, 2024 16:54
Sample Python script to loop through all the database objects and generate the DDL to replicate an environment prior to account replication being made available.
#!/usr/bin/env python
# Get all the database objects and permissions.
# Can be used after running snowflake_roles.py to create the required roles
# 2018-10-23 jfrink added ddl for roles, modified connection parameters
# 2019-01-15 jfrink added Roles and permissions report by object.
# 2019-03-07 jfrink added extract script to create a dump of all the tables to a stage
# and also the corresponding script to load all the data.
# Converted show tables over to using information schema for cases greater then 10k rows.
# Converted show views over to using information schema for cases greater then 10k rows.
@felixlohmeier
felixlohmeier / bash-refine.md
Last active April 12, 2022 05:27
How to control OpenRefine 3.3+ with cURL (and jq) in Bash scripts

How to control OpenRefine 3.3+ with cURL (and jq) in Bash scripts

tested on Fedora 32 with bash 5.0.17 and curl 7.69.1

Quick start

  1. Clone this gist
git clone https://gist.github.com/d76bd27fbc4b8ab6d683822cdf61f81d.git bash-refine
@ostephens
ostephens / example-marc-xml-parser.php
Last active May 10, 2019 15:56
example-marc-xml-parser.php
<?php
// TODO
//
// Change dc:subject to tags as with OpenLearn
// Add notes at top of each output file
// Add namespaces at top of each output file
// Add Table of Contents?
$books = "";
$serials = "";
@petesql
petesql / count_rows_within_csv_files.ps1
Created January 24, 2019 20:10
count_rows_within_csv_files
# Count rows within CSV files, in a specified directory.
Get-ChildItem "C:\myfolder\" -re -in "*.csv" |
Foreach-Object {
$fileStats = Get-Content $_.FullName | Measure-Object -line
$linesInFile = $fileStats.Lines -1
Write-Host "$_,$linesInFile"
}
/*
===================================================
Generate MERGE Statements for All Tables
===================================================
Copyright: Eitan Blumin (C) 2012
Email: eitan@madeiradata.com
Source: www.madeiradata.com
Disclaimer:
The author is not responsible for any damage this
@malkitsingh
malkitsingh / instructions.txt
Created February 2, 2017 17:37
Step by step guide to install nominatim server
I followed these two blogs to install server
1. http://koo.fi/blog/2015/03/19/openstreetmap-nominatim-server-for-geocoding/#Compile_Nominatim
This explains ( and is the main blog which I followed) various steps
2. https://www.linuxbabe.com/linux-server/openstreetmap-tile-server-ubuntu-16-04
This explains how to setup swap files and install tiles if needed.
I will use Ubuntu 14.04 LTS as the platform. Just a basic install with ssh server. We will install Apache to serve http requests. Make sure you have enough disk space and RAM to hold the data and serve it efficiently. I used the Finland extract, which was about a 200 MB download. The resulting database was 26 GB after importing, indexing and adding Wikipedia data. The Wikipedia data probably actually took more disk space than the OSM data. My server has 4 GB RAM, which seems to be enough for this small data set.
1. Sofware requirements
# 10_basic.py
# 15_make_soup.py
# 20_search.py
# 25_navigation.py
# 30_edit.py
# 40_encoding.py
# 50_parse_only_part.py
@fredbenenson
fredbenenson / kickstarter_sql_style_guide.md
Last active April 2, 2024 15:19
Kickstarter SQL Style Guide
layout title description tags
default
SQL Style Guide
A guide to writing clean, clear, and consistent SQL.
data
process

Purpose