Skip to content

Instantly share code, notes, and snippets.

View lucndm's full-sized avatar
🎯
Focusing

Nguyễn Đăng Minh Lực lucndm

🎯
Focusing
View GitHub Profile
@lucndm
lucndm / 2saoVnSpider.py
Created December 25, 2015 06:24
Crawler 2sao.vn
# -*- coding: utf-8 -*-
import scrapy
from scrapy.contrib.linkextractors import LinkExtractor
from scrapy.contrib.spiders import CrawlSpider, Rule
from manga_scrapy.items import VideoItem
#2sao.vn
class SaoVnSpider(CrawlSpider):
name = '2saovn'
allowed_domains = ['2sao.vn']
@lucndm
lucndm / Test
Created January 6, 2016 10:34
Test
dasfwfaf
@lucndm
lucndm / Http, Firewall
Last active January 7, 2016 02:46
Tắt mở firewall trên lunix, tạo http nhanh
Tạo Http nhanh để download file
python -m SimpleHTTPServer
Tắt firewall
iptables -F
Mở lại firewall
iptables-restore < /etc/sysconfig/iptables
@lucndm
lucndm / roundTime.py
Created March 24, 2016 09:23
Round Time With Python
# https://stackoverflow.com/questions/3463930/how-to-round-the-minute-of-a-datetime-object-python/10854034#10854034
def roundTime(dt=None, roundTo=60):
"""Round a datetime object to any time laps in seconds
dt : datetime.datetime object, default now.
roundTo : Closest number of seconds to round to, default 1 minute.
Author: Thierry Husson 2012 - Use it as you want but don't blame me.
"""
if dt == None : dt = datetime.datetime.now()
seconds = (dt - dt.min).seconds
@lucndm
lucndm / ReflectionHelper.cs
Created April 10, 2016 14:49
ReflectionHelper
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using log4net;
namespace LichPhatSong.Scraper.Helpers
{
public static class ReflectionHelper
@lucndm
lucndm / link pycharm spark
Created September 22, 2016 08:10
link pycharm spark
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDTbduV2RQfhebNH40Hde9mRopQVQnORDVgSGpKxuBuemL0GRxsUQxv9t58k1f8cAIt20aSFUPKYAGXKk0+7YG00eepo5amFgAJL3ZBDppQ7itK45LSDefE4W8SpVQ6uknkq7aDtz2BqU/WQQ7U3hKCLjBqM+9b3R1Q/jscnpY+E43PVTFDEFXiQMII0R3Feuol3qQU3wYnZH+BUM9xTtehsivSqf3kxjaKLfhOq7bOvdl9aENEoog/v/2pnG9k3lQVfkngzzANiH1ZrZJdOjily5vHnP34YD4bq1gFuMJuoDyc8Gyzq3/yEes0pN6DrYHjySdzfSs7cnVmnVFQXJgZ [email protected]
@lucndm
lucndm / airflow-k8s-executor-minikube-helm.md
Created March 27, 2019 03:33 — forked from kppullin/airflow-k8s-executor-minikube-helm.md
Airflow w/ kubernetes executor + minikube + helm

Overview

The steps below bootstrap an instance of airflow, configured to use the kubernetes airflow executor, working within a minikube cluster.

This guide works with the airflow 1.10 release, however will likely break or have unnecessary extra steps in future releases (based on recent changes to the k8s related files in the airflow source).

Prerequisites

  • Docker installed
  • Minikube installed and started
@lucndm
lucndm / hyper.json
Last active July 3, 2019 04:17
setting for terminal hyper js
clgt
@lucndm
lucndm / Build PC DeepLearning.md
Created October 15, 2019 07:23
Build PC DeepLearning


Personal Deep Learning Computer