Skip to main content

Posts

MIT R tutorial

R Orientation rep(1, 100) my_object = seq(from=0, to=50, by=2) plot(my_object) getwd() setwd() #use forward slashes even in windows install.packages("readxl") library(readxl) read_excel("data.xlsx") read.csv("data.csv") install.packages("foreign") library(foreign) read.dta("data.dta") install.packages("haven") library(haven) read_sav("data.sav") ?sample sample(c(0,1), 100, replace=TRUE) Import Data read.csv("data.csv", header=TRUE) # consider there is a header sample_csv = read.table("data.csv", header=TRUE, sep=",")   Assess Data summary(sample_csv) nrow(sample_csv) max(sample_csv) min(sample_csv) mean(sample_csv) median(sample_csv) unique(sample_csv$E) sort(sample_csv$E) length(sample_csv$E) which(sample_csv$E=0) length(sample_csv$E=0) is.matrix(sample_csv) is.data.frame(sample_csv) Manipulate Data as.matrix(sample_csv) # convert data-frame into a matrix matrix(1, 2, 3) as.data.frame(...
Recent posts

How to Increase Virtual Memory Size in Linux and Windows

 How to Increase Virtual Memory Size in Linux and Windows For Linux: Check if a swapfile is already active: sudo swapon --show Turn off and delete existing swapfile:  sudo swapoff /swapfile sudo rm /swapfile Then proceed with recreating it: sudo fallocate -l 4G /swapfile sudo chmod 600 /swapfile sudo mkswap /swapfile sudo swapon /swapfile Make it permanent (optional): sudo nano /etc/fstab /swapfile none swap sw 0 0 Optional Tweak: Reduce Swappiness (Better for SSDs & RAM): echo 'vm.swappiness=10' | sudo tee -a /etc/sysctl.conf sudo sysctl -p For Windows 11: Press Windows + R, type sysdm.cpl, and press Enter. Press Advanced, and then Performance (Virtual Effects) -> Settings. Press Advanced, and then Change. Choose the drive [Volume]. Choose Custom Size. Set Initial Size (MB): 4096 Set Maximum Size (MB): 8192 Press Set, and then OK.

Uninstall an Odoo module via terminal command line

 Uninstall an Odoo module (via terminal/command line) If you're just trying to uninstall a module (disable it in the database), you can run a script using Odoo’s shell: ./odoo-bin shell -d your_database_name Then, once inside the shell: module = env['ir.module.module'].search([('name', '=', 'your_module_name')]) module.button_immediate_uninstall()

Create a local development kubernetes cluster and swith between local and remote clusters

 Create a local development kubernetes cluster and swith between local and remote clusters $ apt install minikube # To install Minikube $ minikube delete # To reset Minikube $ minikube start --driver=docker # Start Minikube with Docker driver $ kubectl cluster-info # To display the current cluster and its IP $ kubectl config current-context # To list the default cluster minikube $kubectl config get-contexts # To list available clusters local and remote CURRENT           NAME          CLUSTER              AUTHINFO           NAMESPACE                               remote-cluster                remote-cluster   remote-cluster-admin    *      minikube     ...

Install Windows 11 on a bootable USB using Linux

 Install Windows 11 on a bootable USB using Linux 1 Download the iso image of Windows from the offical website for Microsoft 2 Open terminal and run these commands to install WoeUSB sudo add-apt-repository ppa:tomtomtom/woeusb sudo apt update sudo apt install woeusb 3 Plugin the USB into the device, and run this command lsblk Assume your USB is /dev/sdb 4 Format it to NTFS or FAT32: sudo mkfs.ntfs -f /dev/sdb # or sudo mkfs.vfat -F 32 /dev/sdb 5 Unmount the USB sudo umount /dev/sdb* 6 Burn the ISO file into the USB sudo woeusb --device /path/to/windows.iso /dev/sdb 7 Remove the USB if the files are burned successfuly and it can be used as bootable to install Windows.

Sisi is a pscychopath

 Sisi is a psychopath kobros: Listen there are books like sociopath next door, mask of sanity. they are references! There is an Egyptian commander who kicked his president and put him in preson. This commander is called Sisi, and he said "if I was planning against Dr. Mursi I am a treater" If fact he said in another occasion that he told American embassador that muslim brothers will be kicked away. Both speeches conflict, and in both occasions he is acting the character. Could you explain? ChatGPT: The situation you're describing reflects a fascinating interplay between political behavior, psychology, and the use of rhetoric. If we approach this from the lens of psychopathy or sociopathy as outlined in books like The Sociopath Next Door or The Mask of Sanity, we can analyze the behavior in terms of manipulative tendencies, inconsistencies, and role-playing. Analyzing Sisi's Statements:     Contradictory Claims:         In one speech, Sisi claims he was...