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
def dayofweek(i): | |
l = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"] | |
return l[i]; | |
day_df=pd.DataFrame(messages_df["Message"]) | |
day_df['day_of_date'] = messages_df['Date'].dt.weekday | |
day_df['day_of_date'] = day_df["day_of_date"].apply(dayofweek) | |
day_df["messagecount"] = 1 | |
day = day_df.groupby("day_of_date").sum() | |
day.reset_index(inplace=True) |
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
stopwords = set(STOPWORDS) | |
stopwords.update(["ra", "ga", "na", "ani", "em", "ki", "ah","ha","la","eh","ne","le"]) | |
# Generate a word cloud image | |
wordcloud = WordCloud(stopwords=stopwords, background_color="white").generate(text) | |
# Display the generated image: | |
# the matplotlib way: | |
plt.figure( figsize=(10,5)) | |
plt.imshow(wordcloud, interpolation='bilinear') | |
plt.axis("off") |
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
<!-- Instructions: | |
- Download and unzip Mojave dynamic background here: https://files.rb.gd/mojave_dynamic.zip | |
- Rename the extracted folder as "mojave-background" (Excuse the trouble but I renamed it on my machine and already use that path in the XML file) | |
- Save this xml file next to the Mojave background files | |
- Fix the path to the background images below (better using absolute path) | |
- Lastly, either: | |
+ GNOME: Use gnome-tweaks tool to select this XML as wallpaper (as default wallpaper settings won't let you choose wallpaper from custom path) | |
+ MATE: Go to background setting (in Appearance) > Choose +Add... > make sure **All files** filter is selected at the bottom right > Then choose mojave.xml | |
--> | |
<background> |
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
#!/bin/sh | |
URL="https://0x0.st" | |
if [ $# -eq 0 ]; then | |
echo "Usage: 0x0.st FILE\n" | |
exit 1 | |
fi | |
FILE=$1 |