- take a string, tokenize words, count number of unique words and have a method that can return top N distinct words: https://github.com/dhoss/gotoke
- analyze csv log file of http requests. format will be request type,url,request status code, response size. group by url + request type, and aggregate the request size
- create http crawler that will take number of parallel threads/requests, rate limit, and total number of requests to be executed as parameters and implement rate limiting, parallel requests and exit after maximum number of requests complete.
This file contains 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
Checking two1nine for number 3 | |
Checking two1nine for number 2 | |
2 is the last number | |
Checking eightwothree for number 8 | |
8 is the first number | |
Checking eightwothree for number 5 | |
Checking eightwothree for number 4 | |
Checking eightwothree for number 9 | |
Checking eightwothree for number 1 | |
Checking eightwothree for number 7 |
This file contains 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
package in.stonecolddev; | |
import java.util.List; | |
import java.util.Map; | |
public class DayOne implements DayRunner { | |
public static String partOne(List<String> data) { | |
Integer sum = 0; |
This file contains 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 python | |
# encoding: utf-8 | |
import tweepy #https://github.com/tweepy/tweepy | |
import csv | |
import sys | |
#Twitter API credentials | |
consumer_key = "" | |
consumer_secret = "" |
This file contains 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
# I've tried both of these: | |
try: | |
for part in parts: | |
dirs = [dir for dir in os.listdir(path_to_check) if not isfile(os.path.join(path_to_check, dir))] | |
if "thing" in dirs: | |
return path_to_check | |
del path_parts[-1] | |
else: | |
raise ValueError("thing not found") |
970-290-6669
This file contains 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
sqlalchemy.engine.base.Engine: INFO: select version() | |
sqlalchemy.engine.base.Engine: INFO: {} | |
sqlalchemy.engine.base.Engine: INFO: select current_schema() | |
sqlalchemy.engine.base.Engine: INFO: {} | |
sqlalchemy.engine.base.Engine: INFO: SELECT CAST('test plain returns' AS VARCHAR(60)) AS anon_1 | |
sqlalchemy.engine.base.Engine: INFO: {} | |
sqlalchemy.engine.base.Engine: INFO: SELECT CAST('test unicode returns' AS VARCHAR(60)) AS anon_1 | |
sqlalchemy.engine.base.Engine: INFO: {} | |
sqlalchemy.engine.base.Engine: INFO: show standard_conforming_strings | |
sqlalchemy.engine.base.Engine: INFO: {} |
This file contains 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
import org.jooq.Record; | |
import org.jooq.RecordMapper; | |
import com.lumos.db.tables.pojos.Images; | |
import org.jooq.Table; | |
import java.util.List; | |
import static com.lumos.db.Tables.IMAGES; | |
/** |
This file contains 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
package com.lumos.service; | |
import com.lumos.ConfigReader; | |
import com.lumos.util.Data; | |
import com.lumos.util.Page; | |
import org.jooq.DSLContext; | |
import org.jooq.Record; | |
import org.jooq.RecordMapper; | |
import com.lumos.db.tables.pojos.Images; | |
import org.jooq.Table; |
This file contains 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
package com.lumos.service; | |
import com.lumos.ConfigReader; | |
import com.lumos.util.Data; | |
import com.lumos.util.Page; | |
import org.jooq.DSLContext; | |
import org.jooq.Record; | |
import org.jooq.RecordMapper; | |
import com.lumos.db.tables.pojos.Images; | |
import org.jooq.Table; |
NewerOlder