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 pandas as pd | |
import tensorflow as tf | |
from sklearn.preprocessing import LabelEncoder | |
from tensorflow.keras.preprocessing.text import Tokenizer | |
def splitText(dataFrame: pd.DataFrame) -> pd.DataFrame: | |
dataFrame.text = dataFrame.text.apply(lambda x: x.split()) | |
dataFrame.labels = dataFrame.labels.apply(lambda x: x.split()) | |
# splits the dataframe into lists instead of strings | |
Wrapper around https://github.com/helmisatria/tweet-harvest
Usage:
$ python3 harvest.py yyy mm dd n keyword
yyyy
: year (e.g. 2018)mm
: month (e.g. 08)dd
: date (e.g. 20)
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
from datasets import Dataset, DatasetDict | |
from transformers import AutoTokenizer, TrainingArguments, Trainer, DataCollatorForTokenClassification, AutoModelForTokenClassification, pipeline | |
from sklearn.metrics import precision_score, recall_score, f1_score, classification_report, confusion_matrix, ConfusionMatrixDisplay | |
from shutil import rmtree | |
from tqdm import tqdm | |
import matplotlib.pyplot as plt | |
import seaborn as sns | |
import pandas as pd | |
import numpy as np |
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 random | |
import calendar | |
# our sus link | |
link = "https://docs.google.com/forms/d/1Kl1On8QB2n_tV_5qUazVNgTGEpw4PtoFOdJ-L45uOh4/viewform" | |
# load our names to an array | |
with open("names.txt", "r") as f: | |
names = [line.strip() for line in f] |
-
run this command first to see from where clang includes its header files
clang -v -fsyntax-only -x c++ /dev/null
. In my case, it's in/Library/Developer/CommandLineTools/usr/include/c++/v1
-
press Cmd + Shift + G in Finder and type the path or use
cd
to go to the dir -
mkdir bits
in there -
cd bits
and create a new filestdc++.h
and paste the following content to it (source: https://gist.github.com/Einstrasse/ac0fe7d7450621a39364ed3b05cacd11)
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
[colors] | |
black = #1A1D45 | |
bblack = #2c3073 | |
white = #D7B7BB | |
red = #FF4EA5 | |
green = #7EB564 | |
yellow = #F5B569 | |
blue = #7A89EC | |
magenta = #B66CDC | |
cyan = #6CAC99 |
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
! general | |
*foreground: #16161C | |
*background: #f9cbbe | |
! black | |
*color0: #f9cbbe | |
*color8: #ad8d84 | |
! red | |
*color1: #df2d52 |
NewerOlder