Skip to content

Commit 548ec24

Browse files
author
Tong Qi
committed
add 0006
1 parent f23f9b7 commit 548ec24

File tree

4 files changed

+31
-0
lines changed

4 files changed

+31
-0
lines changed

tongqi/0006/0006.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import os
2+
import re
3+
from collections import Counter
4+
5+
def get_filepaths(directory):
6+
file_paths = []
7+
for root, directories, files in os.walk(directory):
8+
for filename in files:
9+
filepath = os.path.join(root, filename)
10+
file_paths.append(filepath)
11+
12+
return file_paths
13+
14+
def counter_more_words(li):
15+
words_dict = Counter(li)
16+
return [i[0] for i in words_dict.most_common()[:10]]
17+
18+
for diaryfile in get_filepaths('diaries'):
19+
with open(diaryfile) as f:
20+
word_li = re.findall("\w+", f.read())
21+
print " ".join(counter_more_words(word_li))
22+

tongqi/0006/diaries/1.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Corporate Development, aka corp dev, is the group within companies that buys other companies. If you're talking to someone from corp dev, that's why, whether you realize it yet or not.
2+
3+
It's usually a mistake to talk to corp dev unless (a) you want to sell your company right now and (b) you're sufficiently likely to get an offer at an acceptable price. In practice that means startups should only talk to corp dev when they're either doing really well or really badly. If you're doing really badly, meaning the company is about to die, you may as well talk to them, because you have nothing to lose. And if you're doing really well, you can safely talk to them, because you both know the price will have to be high, and if they show the slightest sign of wasting your time, you'll be confident enough to tell them to get lost.

tongqi/0006/diaries/2.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
It's usually a mistake to talk to corp dev unless (a) you want to sell your company right now and (b) you're sufficiently likely to get an offer at an acceptable price. In practice that means startups should only talk to corp dev when they're either doing really well or really badly. If you're doing really badly, meaning the company is about to die, you may as well talk to them, because you have nothing to lose. And if you're doing really well, you can safely talk to them, because you both know the price will have to be high, and if they show the slightest sign of wasting your time, you'll be confident enough to tell them to get lost.
2+
3+
The danger is to companies in the middle. Particularly to young companies that are growing fast, but haven't been doing it for long enough to have grown big yet. It's usually a mistake for a promising company less than a year old even to talk to corp dev.

tongqi/0006/diaries/3.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
The danger is to companies in the middle. Particularly to young companies that are growing fast, but haven't been doing it for long enough to have grown big yet. It's usually a mistake for a promising company less than a year old even to talk to corp dev.
2+
3+
But it's a mistake founders constantly make. When someone from corp dev wants to meet, the founders tell themselves they should at least find out what they want. Besides, they don't want to offend Big Company by refusing to meet.

0 commit comments

Comments
 (0)