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
call plug#begin('~/.vim/plugged') | |
Plug 'scrooloose/nerdtree' " Files manager. | |
Plug 'nightsense/stellarized' | |
Plug 'itchyny/lightline.vim' | |
Plug 'dracula/vim', { 'as': 'dracula' } | |
call plug#end() | |
"========== General Configs ========== |
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/sh | |
# Userland mode (~$USER/), (~/). | |
# ~/.fonts is now deprecated and that | |
#FONT_HOME=~/.fonts | |
# ~/.local/share/fonts should be used instead | |
FONT_HOME=~/.local/share/fonts | |
echo "installing fonts at $PWD to $FONT_HOME" | |
mkdir -p "$FONT_HOME/adobe-fonts/source-code-pro" |
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
[Emacs] M-x text-scale-increase: increase font size |
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
// include the library code: | |
#include <LiquidCrystal.h> | |
// initialize the library by associating any needed LCD interface pin | |
// with the arduino pin number it is connected to | |
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2; | |
LiquidCrystal lcd(rs, en, d4, d5, d6, d7); | |
// cam bien sieu am config | |
const unsigned int TRIG_PIN = 7; |
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
// X = (A + B * C)/(D - E * F) | |
// three-address code | |
MPY Y, B, C | |
ADD Y, Y, A | |
MPY Z, E, F | |
SUB Z, D, Z | |
DIV X, Y, Z |
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
// ex 6 | |
#include <stdio.h> | |
void enterArray(int *a, int &n) | |
{ | |
printf("How many elements do you want to put into this array?\nEnter n: "); | |
scanf("%d", &n); | |
for (int i = 0; i < n; i++) | |
{ |
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
git pull origin master --allow-unrelated-histories | |
git config --global credential.helper cache |
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
# Go to https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html | |
# then download 'jdk-8u261-linux-x64.tar.gz' (for Linux 64-bit) | |
# cd to your Downloads directory then run Terminal | |
sudo mkdir -p /usr/lib/jdk | |
sudo tar zxvf jdk-8u261-linux-x64.tar.gz -C /usr/lib/jdk | |
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jdk/jdk1.8.0_261/bin/java" 1 | |
sudo update-alternatives --set java /usr/lib/jdk/jdk1.8.0_261/bin/java | |
java -version |
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
# Install spaCy | |
pip3 install -U spacy | |
# Download the large English model for spaCy | |
python3 -m spacy download en_core_web_lg | |
# Install textacy which will also be useful | |
pip3 install -U textacy | |
# Insert into file.py |
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 scrapy | |
import re | |
from scrapy.linkextractors import LinkExtractor | |
from scrapy.spiders import CrawlSpider, Rule | |
# TODO | |
# get the h2 article (1 per page) | |
class Vinmec_QA(scrapy.Spider): | |
name = "Vinmec_QA" | |
allowed_domains = ['vinmec.com'] |
OlderNewer