https://developers.refinitiv.com/article/setup-jupyter-notebook-r https://docs.anaconda.com/anaconda/navigator/tutorials/r-lang/
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 getAverage(values): | |
return sum(values) / float(len(values)) |
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 isFloat(value): | |
return not re.match("^[+-]?\d+?\.\d+?$", value) is None |
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
#source | |
export JAVA_HOME=/opt/jdk1.8.0_144 | |
export SPARK_HOME=/opt/spark-2.2.0-bin-hadoop2.7 | |
export SPARK_DIR=/opt/spark-2.2.0-bin-hadoop2.7 | |
export PYSPARK_PYTHON=python3 | |
export PYSPARK_DRIVER_PYTHON=ipython3 | |
export PYSPARK_DRIVER_PYTHON_OPTS="notebook" | |
export PATH=$PATH:$SPARK_HOME/bin | |
pyspark |
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
[Desktop Entry] | |
Type=Application | |
Terminal=true | |
Exec=/opt/idea-IC-203.7717.56/bin/idea.sh | |
Name=IntelliJ | |
Icon=/opt/idea-IC-203.7717.56/bin/idea.png |
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/bash | |
# Get the dictionary data file... run it just once... | |
# put those 3 files at ~/bin directory and give execution permission | |
cd ~/bin | |
wget https://www.mit.edu/~ecprice/wordlist.10000 -o wordlist.10000.txt |
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
#!/usr/bin/bash | |
curl -vs https://www.google.com/ 2>&1 | grep "expire date" | cut -c17-50 | |
# Result sounds like: Apr 16 15:52:21 2023 GMT |
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
cd "C:\Program Files\Oracle\VirtualBox\" | |
VBoxManage.exe modifyvm "Your Virtual Machine Name" --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff | |
VBoxManage setextradata "Your Virtual Machine Name" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac11,3" | |
VBoxManage setextradata "Your Virtual Machine Name" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0" | |
VBoxManage setextradata "Your Virtual Machine Name" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple" | |
VBoxManage setextradata "Your Virtual Machine Name" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" | |
VBoxManage setextradata "Your Virtual Machine Name" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1 |
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 numpy as np | |
def getrandomdatetime(): | |
return str(datetime.fromtimestamp(np.random.randint(0, 2177334732))) |
OlderNewer