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
import json | |
from gensim.models import Word2Vec | |
import nltk | |
from nltk.tokenize import sent_tokenize, word_tokenize | |
def get_train(end): | |
train = [] |
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
from pydub import AudioSegment | |
from matplotlib import pyplot as plot | |
from PIL import Image, ImageDraw | |
import numpy as np | |
import os | |
src = "./test.mp3" | |
audio = AudioSegment.from_file(src) | |
data = np.fromstring(audio._data, np.int16) |
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
sudo apt-get update | |
sudo apt-get install build-essential chrpath libssl-dev libxft-dev -y | |
sudo apt-get install libfreetype6 libfreetype6-dev -y | |
sudo apt-get install libfontconfig1 libfontconfig1-dev -y | |
cd ~ | |
export PHANTOM_JS="phantomjs-2.1.1-linux-x86_64" | |
wget https://github.com/Medium/phantomjs/releases/download/v2.1.1/$PHANTOM_JS.tar.bz2 | |
sudo tar xvjf $PHANTOM_JS.tar.bz2 | |
sudo mv $PHANTOM_JS /usr/local/share | |
sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin |
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
import json | |
import random | |
from sklearn.feature_extraction.text import CountVectorizer | |
from sklearn.linear_model import LogisticRegression | |
from sklearn import preprocessing | |
json_data = open('./dataset.json').read() | |
tweets = json.loads(json_data) | |
tweets_train, tweets_test = [], [] |
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
images.txt |
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
from collections import defaultdict | |
users = {} | |
trust = {} | |
# 신뢰 관계 특정 개수 이상인 유저 | |
group = {} | |
group_list = [] | |
def build_users(): |
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
#include <cstdio> | |
#include <iostream> | |
#include <vector> | |
#include <map> | |
#include <set> | |
#include <string> | |
#include <algorithm> | |
#include <ctime> | |
#include <fstream> | |
#include <cmath> |
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
package org.deeplearning4j.examples.feedforward.classification; | |
import org.apache.spark.api.java.function.VoidFunction; | |
import org.bytedeco.javacv.FrameFilter; | |
import scala.Tuple2; | |
import org.apache.spark.api.java.*; | |
import org.apache.spark.api.java.function.Function; | |
import org.apache.spark.mllib.recommendation.ALS; | |
import org.apache.spark.mllib.recommendation.MatrixFactorizationModel; |
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
from collections import defaultdict | |
from decimal import * | |
import random | |
import time | |
getcontext().prec = 128 | |
# convert to big decimal | |
def lf(num): | |
return Decimal(num) |
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
from collections import defaultdict | |
from decimal import * | |
import random | |
import time | |
#getcontext().prec = 1000 | |
# convert to big decimal | |
def lf(num): | |
return Decimal(num) |