Skip to content

Instantly share code, notes, and snippets.

View StarJade-Park's full-sized avatar
😃
Hi

0x0d5 StarJade-Park

😃
Hi
View GitHub Profile
@StarJade-Park
StarJade-Park / RGB.m
Last active July 9, 2017 04:07
[RGB histogram] Extract RGB, histogram equalization -> red component and synthesize RGB #Multimedia_Systems #matlab
clc; % Clear the command window.
clear; % Clear workspace variable
close all; % Clear figure windows
% Read the captured image file in MATLAB.
bmp = imread('RGB.bmp');
% Display the image on the screen.
imshow(bmp);
@StarJade-Park
StarJade-Park / image_rename.py
Last active July 11, 2017 06:46
[Image Rename] Convert non-order image files to order image files #python3 #image
from PIL import Image
import os
print("현재 위치 = " + os.curdir)
old_dir = os.listdir(os.path.join('.', 'old')
rename_dir = os.path.join('.', 'rename')
if not os.path.exists(rename_dir):
os.mkdir(rename_dir)
@StarJade-Park
StarJade-Park / progressbar.py
Last active July 9, 2017 04:06
[py3-progressbar] python3 progressbar simple example #python3 #py3-progressbar
# Output example
# Running: 100% [######################################################] 10 of 10
from progressbar import ProgressBar, Percentage, Bar, SimpleProgress
widgets = ['Running: ', Percentage(), ' ',
Bar(marker='#', left='[', right=']'),
' ', SimpleProgress()]
pbar = ProgressBar(widgets=widgets, maxval=rangeOfFile.__len__()).start()
@StarJade-Park
StarJade-Park / crawler.py
Created May 4, 2017 05:14
roughly crawler
from bs4 import BeautifulSoup
from progressbar import Bar, SimpleProgress, Percentage, ProgressBar
import urllib
blog1 = "blog_url" # url input
input1 = 1 # temporary input var
input2 = 41
def replaceTxt(f, txt):
@StarJade-Park
StarJade-Park / 2nd order IIR.c
Last active July 9, 2017 05:14
[2nd order IIR] 2nd order IIR(Infinite-duration Impulse Response) #matlab #2nd_IIR #C #Multimedia_Systems
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// def const val
#define SAMPLING_BIT 16
// def struct confficients for IIR
typedef struct __IIRConfficients {
double b0, b1, b2;
@StarJade-Park
StarJade-Park / plot_specgram.m
Last active July 9, 2017 04:08
[Sound Filtering] Sound filtering & show spectrogram #sound_filter #matlab #Multimedia_Systems
clc; % Clear the command window.
clear; % Clear workspace variable
close all; % Clear figure windows
% original file
file_name = 'sound.snd';
file_id = fopen(file_name ,'r');
file_info = dir(file_name);
file_size = file_info.bytes;
# Re: [WARNING] Intel Skylake/Kaby Lake processors: broken hyper-threading
# https://lists.debian.org/debian-user/2017/06/msg01011.html
# Copyright 2017 Uwe Kleine-König
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License version 2 as published by the
# Free Software Foundation.
open(my $cpuinfo, "</proc/cpuinfo") or die "failed to open cpuinfo\n";
#include "pch.h"
#include <iostream>
#include <memory>
using namespace std;
template<typename Object>
void Deleter(Object* obj)
{
delete obj;
#include "pch.h"
#include <iostream>
#include <memory>
#include <unordered_set>
using namespace std;
template<typename Object>
void Deleter(Object* obj)
{
#include <cassert>
#define assert_false assert(false)
#define STATIC_TODO static_assert(false, "TODO")
#ifndef C_PLUS_PLUS_VERSION
#define C_11_UNDER 199711L
#define C_11_AFTER 201103L
#define C_14_AFTER 201402L
#define C_17_AFTER 201703L