Skip to content

Instantly share code, notes, and snippets.

#-*-coding: utf-8-*-
# Index
## 1. Data Import
## 2. Data Preprocessing
## 3. Data Analysis - RFM Index Calculation
import numpy as np
import pandas as pd
import datetime
#-*-coding:utf-8-*-
from keras.datasets import boston_housing
from keras.models import Sequential
from keras.layers import Activation, Dense
from keras import optimizers
(X_train, y_train), (x_test, y_test) = boston_housing.load_data()
model = Sequential()
@ur0n2
ur0n2 / mstsc_rm.bat
Created October 9, 2017 12:28
mstsc log remove batch script
@echo off
reg delete "HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Default" /va /f
reg delete "HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Servers" /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Servers"
cd %userprofile%\documents\
attrib Default.rdp -s -h
del Default.rdp
@ur0n2
ur0n2 / gist:d7f23aaac30e5837287b4c71b1dac372
Created July 20, 2017 01:38
nginx letsencrypt reovke with certbot
# auto letsencrypt revoke with certbot-nginx
#remove
sudo service nginx stop
sudo add-apt-repository ppa:certbot/certbot -y
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get remove certbot -y
#sudo rm -rf letsencrypt
sudo apt-get remove letsencrypt -y
sudo apt-get purge certbot -y
@ur0n2
ur0n2 / hackers_reading_downloader.py
Created July 18, 2017 01:05
hackers_reading_downloader.py
import urllib
import base64
url = 'aHR0cDovL3d3dy5jaGFtcHN0dWR5LmNvbS8/cj1jaGFtcHN0dWR5Jm09bXlwYWdlJmE9ZG93biZmbmFtZT03MTI2L3dyaXRlLw=='
url = base64.b64decode(url)
for x in xrange(40):
dd = url + str(x) + ".pdf"
print(dd)
urllib.urlretrieve(dd, "C:\\Users\\Administrator\\Desktop\\test\\down\\" + str(x) + ".pdf")
@ur0n2
ur0n2 / Flash_Player_Remover_on_Win10.bat
Created June 8, 2017 01:44
Flash_Player_Remover_on_Win10.bat
echo off
cls
echo [-] Flash Player Remover for Windows 10 with Edge Browser.
takeown /f C:\Windows\SysWOW64\Macromed\Flash\*.*
takeown /f C:\Windows\System32\Macromed\Flash\*.*
cacls C:\Windows\SysWOW64\Macromed\Flash\*.* /E /T /G %UserDomain%\%UserName%:F
cacls C:\Windows\System32\Macromed\Flash\*.* /E /T /G %UserDomain%\%UserName%:F
@ur0n2
ur0n2 / prgm_path_classification.py
Last active May 22, 2017 03:41
windows x86/x64 program files path classification in python
import os
prgm_path = ""
if os.environ.get("PROGRAMFILES(X86)") is None: #this case is 32bit
prgm_path = os.environ.get("PROGRAMFILES")
else:
prgm_path = os.environ.get("PROGRAMFILES(X86)")
#print prgm_path
@ur0n2
ur0n2 / clip.py
Created May 10, 2017 14:12
Clipboard copy & paste with python
import sys
import ctypes
OpenClipboard = ctypes.windll.user32.OpenClipboard
EmptyClipboard = ctypes.windll.user32.EmptyClipboard
GetClipboardData = ctypes.windll.user32.GetClipboardData
SetClipboardData = ctypes.windll.user32.SetClipboardData
CloseClipboard = ctypes.windll.user32.CloseClipboard
CF_UNICODETEXT = 13
@ur0n2
ur0n2 / asd
Created March 31, 2017 05:36
asd
# 2017-03-31
# include mypc_solo, EMS_integrate (x86/x64), driver version check
# powershell Start-Process powershell_ISE -Verb runas
# del alternative to remove-item -force -recurse(non-interactive option) and find file is get-childitem no write to full path
<#
(Get-ChildItem "C:\Program Files (x86)\AhnLab\APC2\" -Include AhnRghNt.sys -Recurse).VersionInfo
(Get-ChildItem "C:\Program Files\AhnLab\APC2\" -Include AhnRghNt.sys -Recurse).VersionInfo
(Get-ChildItem "C:\Program Files\Common Files\AhnLab\" -Include Atamptnt.sys -Recurse).VersionInfo
Amoncdw7.sys
@ur0n2
ur0n2 / Doskey Registry.reg
Created March 10, 2017 03:20
Doskey Registry.reg
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
"Autorun"="C:\\\\linked\\\\Doskey_Alias_Setting.cmd"