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
# First I created a working directory | |
~$ mkdir s3-kafka | |
# Then I installed the dependency I needed in that directory with pip | |
~$ cd s3-kafka | |
~$ pip install kafka-python -t $(pwd) | |
# Then I put my code into a file called s3-kafka.py | |
~$ vi s3-kafka.py |
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.example.demo; | |
import com.amazonaws.HttpMethod; | |
import com.amazonaws.services.s3.AmazonS3; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.beans.factory.annotation.Value; | |
import org.springframework.scheduling.annotation.Async; | |
import org.springframework.stereotype.Service; |
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
// https://leetcode.com/problems/frog-jump/ | |
/* | |
A frog is crossing a river. The river is divided into x units and at each unit there may or may not exist a stone. | |
The frog can jump on a stone, but it must not jump into the water. | |
Given a list of stones' positions (in units) in sorted ascending order, | |
determine if the frog is able to cross the river by landing on the last stone. Initially, | |
the frog is on the first stone and assume the first jump must be 1 unit. | |
If the frog's last jump was k units, then its next jump must be either k - 1, k, or k + 1 units. | |
Note that the frog can only jump in the forward direction. | |
Note: |
##Google Interview Questions: Product Marketing Manager
- Why do you want to join Google? -- Because I want to create tools for others to learn, for free. I didn't have a lot of money when growing up so I didn't get access to the same books, computers and resources that others had which caused money, I want to help ensure that others can learn on the same playing field regardless of their families wealth status or location.
- What do you know about Google’s product and technology? -- A lot actually, I am a beta tester for numerous products, I use most of the Google tools such as: Search, Gmaill, Drive, Reader, Calendar, G+, YouTube, Web Master Tools, Keyword tools, Analytics etc.
- If you are Product Manager for Google’s Adwords, how do you plan to market this?
- What would you say during an AdWords or AdSense product seminar?
- Who are Google’s competitors, and how does Google compete with them? -- Google competes on numerous fields: --- Search: Baidu, Bing, Duck Duck Go
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
My learning |
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 java.util.Date; | |
public enum S3PresignedUrlExpiration { | |
PURI_UPLOAD_FILE(1000 * 2), PURI_READ_FILE(1000 * 1); | |
private final long expirationTime; | |
S3PresignedUrlExpiration(long expirationTime) { | |
this.expirationTime = expirationTime; | |
} |
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 com.amazonaws.protocol.json.JsonClientMetadata; | |
import com.amazonaws.protocol.json.SdkJsonProtocolFactory; | |
import com.amazonaws.protocol.json.StructuredJsonGenerator; | |
import com.amazonaws.services.kinesisfirehose.model.Record; | |
import com.amazonaws.services.kinesisfirehose.model.transform.RecordJsonMarshaller; | |
import com.google.gson.JsonObject; | |
import com.google.gson.JsonParser; | |
import java.nio.ByteBuffer; | |
import java.util.function.Function; |
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
bleach==1.5.0 | |
certifi==2016.2.28 | |
cycler==0.10.0 | |
decorator==4.1.2 | |
entrypoints==0.2.3 | |
html5lib==0.9999999 | |
ipykernel==4.6.1 | |
ipython==6.2.1 | |
ipython-genutils==0.2.0 | |
ipywidgets==7.0.3 |
NewerOlder