Skip to content

Instantly share code, notes, and snippets.

View KanzakiRanko1's full-sized avatar

Jorge Luiz Rodrigues e Vilella KanzakiRanko1

View GitHub Profile

Keybase proof

I hereby claim:

  • I am kanzakiranko1 on github.
  • I am maav (https://keybase.io/maav) on keybase.
  • I have a public key ASANMS-kCf4BU2ljilfqI7eJPzs6QohpW3_H6lonRwzUdgo

To claim this, I am signing this object:

@KanzakiRanko1
KanzakiRanko1 / IsEven.java
Last active July 31, 2020 14:04
Most obvious way to generate code to check if a number is even, duh.
public class Main {
public static void main(String[] args) {
boolean last;
last = false;
System.out.println("private bool IsEven(int number) {");
for (int i = 1; i <= Integer.MAX_VALUE; i++) {
System.out.println(" %s if (number == %d) return %b;", int==1?"":"else", i, last);
last = !last;
}
System.out.println("}");
@KanzakiRanko1
KanzakiRanko1 / to_latlng.py
Last active March 23, 2020 15:13
Google Maps Reverse Geocoding Example
import googlemaps
import pandas as pd
import unidecode
# Google Maps API Key/Client
api_key = 'YOUR_API_KEY'
gmaps = googlemaps.Client(key=api_key)
def to_latlng(address, maps_client=gmaps):
address = unidecode.unidecode(address)