I hereby claim:
- I am tonypiazza on github.
- I am tonypiazza (https://keybase.io/tonypiazza) on keybase.
- I have a public key ASBN7ohW1c1MIoxEmvnxl4C_JQqzxkoLEpYTGQ1P1Gzl1Qo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
import csv | |
import sys | |
import traceback | |
FIELD_NAMES = ['Province_State', 'Country_Region', | |
'Lat', 'Long', 'Date', 'Count'] | |
if __name__ == '__main__': | |
count = 0 |
#!/bin/bash | |
echo 'Creating a temporary directory...' | |
temp_dir=`mktemp -d -q` | |
if [[ ! "$temp_dir" || ! -d "$temp_dir" ]]; then | |
echo 'Could not create temp dir!' | |
exit 1 | |
else | |
pushd "$temp_dir" |
/* | |
* Copyright 2015 Piazza Software Consulting, LLC | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
public Iterable<Playlist> findByUserName(String userName) { | |
return getBucketFactory() | |
.getAsyncBucket(Playlist.class) | |
.flatMap(bucket -> bucket | |
.get(USER_PREFIX + userName) | |
.flatMap(doc -> | |
Observable.from(doc.content().getArray(PLAYLISTS_PROPERTY)) | |
) | |
.flatMap(id -> bucket.get(id.toString())) | |
.map(doc -> fromJsonObject(doc.content(), Playlist.class)) |
#!/bin/bash | |
# Script written by Tony Piazza (https://gist.github.com/tonypiazza) | |
# Privileges check | |
if [ $UID != 0 ] | |
then | |
echo -e "Insufficient privileges!" | |
exit 1 | |
fi |
#!/bin/bash | |
# Script written by Tony Piazza (https://gist.github.com/tonypiazza) | |
# make sure we have sufficient privileges | |
if [ $UID != 0 ] | |
then | |
echo -e "Insufficient privileges!" | |
exit 1 | |
fi |
package com.piazzaconsulting.aspect; | |
import org.apache.log4j.Logger; | |
import org.aspectj.lang.JoinPoint; | |
import org.aspectj.lang.annotation.After; | |
import org.aspectj.lang.annotation.Before; | |
import org.aspectj.lang.reflect.MemberSignature; | |
public aspect LoggingAspect { | |
private static final String POINTCUT = |
@RunWith(Suite.class) | |
@Suite.SuiteClasses({AuctionTest.class, BidTest.class, UserTest.class}) | |
public class CoreAuctionDomainSuite { | |
// empty class | |
} |
@Test | |
public void canGetAuctionsForUsername() throws ServiceException { | |
String username = "tpiazza"; | |
Auction[] auctions = new Auction[5 + new Random().nextInt(16)]; | |
for(int i = 0; i < auctions.length; i++) { | |
Auction auction = createDummyAuction( username ); | |
auctions[i] = auction; | |
service.saveAuction( auction ); | |
} | |
assertThat( service.getAuctions(username), hasItems(auctions) ); |