This file contains hidden or 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
;; -*- coding: utf-8; lexical-binding: t -*- | |
(defun copy-num (file words) | |
(with-temp-buffer | |
(insert-file-contents-literally file) | |
(goto-char (point-min)) | |
(catch 'e | |
(mapcar #'(lambda (x) | |
(unless (search-forward x nil t) | |
(throw 'e ""))) |
This file contains hidden or 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 | |
vim -X -u NONE -c ':1 | /abc' -c '/xyz' -c '/123' -c 'normal! $vT y' -c ':redir! >> input.txt | silent! echo @0 | redir END | :q!' output.txt | |
vim -X -u NONE -c ':redir! >> output.txt | silent! echon "\n" | redir END | :q! |
This file contains hidden or 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/env python | |
# -*- coding: utf-8 -*- | |
import sys, requests, codecs | |
from bs4 import BeautifulSoup | |
def scraping(url): | |
response = requests.get(url) | |
html = response.text.encode(response.encoding) | |
soup = BeautifulSoup(html, 'lxml') |
This file contains hidden or 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/env python2 | |
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals | |
from __future__ import print_function | |
from bs4 import BeautifulSoup | |
import mechanize, re, time, json, codecs | |
class KnowledgeArticles: | |
def __init__(self): |
This file contains hidden or 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/env python2 | |
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals | |
from __future__ import print_function | |
from bs4 import BeautifulSoup | |
import mechanize, re, time, json, codecs | |
class LodgeArticles: | |
def __init__(self): |
This file contains hidden or 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/env python3 | |
# -*- coding: utf-8 -*- | |
from datetime import datetime | |
import itertools | |
import pandas as pd | |
import pprint | |
import pytz | |
import unittest |
This file contains hidden or 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/env ruby | |
# -*- coding: utf-8 -*- | |
# ruby log_extractor.rb --in_csv "./abc.csv" --in_time_column "2" --in_value_column "3" --in_skip_lines "0" --out_time_column_format "%Y/%m/%d %H:00:00" --interval "5" --begin_date "20xx/xx/xx" --duration "month" | |
require 'csv' | |
require 'date' | |
require 'optparse' | |
require 'time' | |
class LogExtractor | |
def initialize |
This file contains hidden or 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/env ruby | |
# -*- coding: utf-8 -*- | |
# fixheader.rb --in_csv "./abc.csv | |
require 'csv' | |
require 'optparse' | |
class Header | |
def initialize | |
params = optparse |
This file contains hidden or 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/env ruby | |
# -*- coding: utf-8 -*- | |
# ruby csv2excel.rb --in_csv "./csv/abc.csv" --in_column "Date" --in_skip_lines 0 --out_excel "./xlsx/xyz.xlsx" --out_sheet "Sheet1" --out_range "A2:A100" | |
class WIN32OLE | |
def to_a | |
[].tap do |array| | |
each { |o| array.push o } | |
end | |
end | |
end |
This file contains hidden or 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
(require 'projectile) | |
(projectile-global-mode) | |
(setq projectile-indexing-method 'alien) | |
(setq projectile-enable-caching t) | |
(setq projectile-completion-system 'helm) | |
(helm-projectile-on) |