Skip to content

Instantly share code, notes, and snippets.

View PyDataBlog's full-sized avatar
🥷
Code with purpose

Bernard Brenyah PyDataBlog

🥷
Code with purpose
View GitHub Profile
@pazzo83
pazzo83 / tfidf_transformer_mlj.jl
Last active July 21, 2021 04:55
TFIDF transformer for MLJ
using MLJModelInterface, MLJBase, TextAnalysis, SparseArrays
MLJModelInterface.@mlj_model mutable struct TfidfTransformer <: MLJModelInterface.Unsupervised
end
struct TfidfTransformerResult
vocab::Vector{String}
idf_vector::Vector{Float64}
end
@davidteren
davidteren / nerd_fonts.md
Last active June 16, 2024 14:00
Install Nerd Fonts via Homebrew [updated & fixed]
@djjudas21
djjudas21 / README.md
Created December 30, 2020 15:14
MicroK8s, Ingress and MetalLB

Ingress MetalLB

Out of the box, the MicroK8s distribution of ingress-nginx installed as the MicroK8s addon ingress binds to ports 80+443 on the node's IP address using a hostPort, as we can see here:

microk8s kubectl -n ingress describe daemonset.apps/nginx-ingress-microk8s-controller
Name:           nginx-ingress-microk8s-controller
Selector:       name=nginx-ingress-microk8s
# -*- coding: utf-8 -*-
""" Deletes all tweets below a certain retweet threshold.
"""
import tweepy
from datetime import datetime
# Constants
CONSUMER_KEY = ''
using PyCall
using LinearAlgebra
using Statistics
using StatsBase
using BenchmarkTools
using Distances
# import the same data
data = pyimport("sklearn.datasets")
@franciscocpg
franciscocpg / install-docker.sh
Last active May 31, 2024 20:16
Install docker arch EndeavourOS
set -e
yay -S docker
sudo usermod -aG docker $USER
newgrp docker
sudo systemctl enable docker
sudo systemctl start docker
def read_data():
data = pd.read_csv(
"/Users/nikki/work/code/knowledge_graph/data_extraction/data/survey_results_public.csv",
low_memory=False)
print("Column name of data : ", data.columns)
return data
def process_user_data(data):
user_data = data[['Respondent','Hobby', 'OpenSource', 'Student', 'Employment', 'CompanySize', 'YearsCoding']]
@jitsejan
jitsejan / main.py
Last active February 13, 2024 12:54
Azure Table Storage Pandas Dataframe
import pandas as pd
from azure.cosmosdb.table.tableservice import TableService
CONNECTION_STRING = "DUMMYSTRING"
SOURCE_TABLE = "DUMMYTABLE"
def set_table_service():
""" Set the Azure Table Storage service """
return TableService(connection_string=CONNECTION_STRING)
@ElToro1966
ElToro1966 / r_ubuntu_18_04.sh
Last active October 1, 2023 18:29 — forked from pachadotdev/r_ubuntu_17_10.sh
Install R and RStudio on Ubuntu 18.04 with essential libraries for data science. Based on pachamaltese/r_ubuntu_17_10.sh (for Ubuntu 17.10). Note: You need to make sure the default library location - /usr/local/lib/R/site-packages - is writable .
# Install R
sudo apt update
sudo apt install gdebi libxml2-dev libssl-dev libcurl4-openssl-dev libopenblas-dev r-base r-base-dev
# Install RStudio
cd ~/Downloads
wget https://download1.rstudio.org/desktop/bionic/amd64/rstudio-1.2.5001-amd64.deb
sudo gdebi rstudio-1.2.5001-amd64.deb
printf '\nexport QT_STYLE_OVERRIDE=gtk\n' | sudo tee -a ~/.profile
@devin-petersohn
devin-petersohn / dask_perf.png
Last active November 25, 2020 09:44
Pandas on Ray Introduction
dask_perf.png