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
#!/usr/bin/env bash | |
for f in *; do | |
mv "$f" `echo $f | tr ' ' '_'`; | |
done | |
for f in *; do | |
echo $f; | |
echo $f | md5sum | awk '{print $1}'; | |
aws s3 cp $f s3://bucket-name-something/$(echo $f | md5sum | awk '{print $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
// From https://gist.github.com/MartinMuzatko/1060fe584d17c7b9ca6e | |
const commarize = (n) => { | |
if (n >= 1e3) { | |
const units = [" thousand", " million", " billion", " trillion"]; | |
let unit = Math.floor((n.toFixed(0).length - 1) / 3) * 3; | |
const num = (n / ("1e" + unit)).toFixed(2); | |
const unitname = units[Math.floor(unit / 3) - 1]; | |
return num + unitname; | |
} |
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
public class pattern1 { | |
public static void main(String[] args) { | |
int n = Integer.parseInt(args[0]); | |
if(n == 1) System.out.println("x "); else | |
printPattern(n); | |
} | |
private static void printPattern(int n) { | |
boolean genap = (n%2 == 0) ? true : false; | |
String basePattern = ""; | |
for (int i=0; i<(genap ? (n/2) : (n/2+1)); i++) { |
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
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="fill_parent" | |
android:layout_height="wrap_content" | |
android:orientation="vertical" | |
android:padding="8dp" | |
android:background="#000000"> | |
<TextView |