code stringlengths 2.5k 6.36M | kind stringclasses 2
values | parsed_code stringlengths 0 404k | quality_prob float64 0 0.98 | learning_prob float64 0.03 1 |
|---|---|---|---|---|
출처: https://blog.breezymind.com/2018/03/02/sklearn-feature_extraction-text-2/
```
import pandas as pd
import numpy as np
pd.options.mode.chained_assignment = None
np.random.seed(0)
from konlpy.tag import Mecab
mecab = Mecab()
from sklearn.feature_extraction.text import TfidfVectorizer, CountVectorizer
from sklearn.... | github_jupyter | import pandas as pd
import numpy as np
pd.options.mode.chained_assignment = None
np.random.seed(0)
from konlpy.tag import Mecab
mecab = Mecab()
from sklearn.feature_extraction.text import TfidfVectorizer, CountVectorizer
from sklearn.metrics.pairwise import linear_kernel, cosine_similarity
# tokenizer : 문장에서 색인어 추출... | 0.29523 | 0.809088 |
```
import numpy as np
import pandas as pd
import wisps
import wisps.simulations as wispsim
import matplotlib.pyplot as plt
from astropy.io import fits, ascii
from astropy.table import Table
%matplotlib inline
bigf= wisps.get_big_file()
bigf=bigf[bigf.snr1>=3]
#3dhst data
from astropy.io import ascii
hst3d= ascii.read... | github_jupyter | import numpy as np
import pandas as pd
import wisps
import wisps.simulations as wispsim
import matplotlib.pyplot as plt
from astropy.io import fits, ascii
from astropy.table import Table
%matplotlib inline
bigf= wisps.get_big_file()
bigf=bigf[bigf.snr1>=3]
#3dhst data
from astropy.io import ascii
hst3d= ascii.read('/u... | 0.36727 | 0.549641 |
```
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import json
import io
```
# Import data from json file to dataframe
##### 1. load json files and convert to three dataframe
```
business_json_file = 'business.json'
user_json_file = 'user.json'
review_json_file = 'review.json'
business = []
u... | github_jupyter | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import json
import io
business_json_file = 'business.json'
user_json_file = 'user.json'
review_json_file = 'review.json'
business = []
user = []
review = []
for line in open(business_json_file, 'r'):
business.append(json.loads(line))
for line i... | 0.212314 | 0.755186 |
Before you turn this problem in, make sure everything runs as expected. First, **restart the kernel** (in the menubar, select Kernel$\rightarrow$Restart) and then **run all cells** (in the menubar, select Cell$\rightarrow$Run All).
Make sure you fill in any place that says `YOUR CODE HERE` or "YOUR ANSWER HERE", as we... | github_jupyter | NAME = ""
COLLABORATORS = ""
from IPython.display import Image
Image('./Media/res-param-1.png',width='700')
from IPython.display import Image
Image('./Media/res-param-2.png',width='700')
from IPython.display import Image
Image('./Media/centroid-res-param.png',width='700') | 0.151467 | 0.903465 |
# Development of Deep Learning Guided Genetic Algorithm for Material Design Optimization
Kuanlin Chen, PhD student of the schulman lab<br>
Advisor: Rebecca Schulman, PhD<br>
Johns Hopkins University
**Keywords: Machine Learning, Deep Learning, Computer Vision, Numeric Simulation, Multi-Objective Optimization**
***
#... | github_jupyter | # Package Importing
import csv, math, os, time, copy, matplotlib, datetime, keras
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
from keras.datasets import mnist
from keras.models import Sequential, load_model
from keras.layers import Dense, Dropout, Flatten
from keras.layers.convolutiona... | 0.512693 | 0.987993 |
# Visualizing Logistic Regression
```
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets('data/', one_hot=True)
trainimg = mnist.train.images
trainlabel = mnist.train.labels
testimg = mnist.te... | github_jupyter | import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets('data/', one_hot=True)
trainimg = mnist.train.images
trainlabel = mnist.train.labels
testimg = mnist.test.images
testlabel = mnist.test.label... | 0.676086 | 0.913252 |
### Closed-loop control of a deformable mirror (DM)
#### using SVD pseudo-inversion of DM influence matrix
#### and low-pass filtering of the eigenvalues for improved convergence stability
Hardware used:
* Thorlabs WFS-150 Shack-Hartmann sensor
* Mirao52e deformable mirror
This code uses Thorlabs 64-bit WFS driver i... | github_jupyter | import ctypes as ct
import matplotlib.pyplot as plt
import numpy as np
%matplotlib inline
import sys
sys.path.append('./lib')
from Mirao52_utils import *
#define home dir of the code:
homeDir = 'C:/Users/Nikita/Documents/GitHub/AO-toolkit/'
#load the WFS DLL:
WFS = ct.windll.WFS_64
#Load the Mirao52e DLL:
DM = ct.win... | 0.286269 | 0.795539 |
# Statistical Relational Learning with `pslpython`
As we've seen there are several ways to work with graph-based data, including: SPARQL queries, graph algorithms traversals, ML embedding, etc.
Each of these methods makes trade-offs in terms of:
* computational costs as the graph size scales
* robustness when th... | github_jupyter | import kglab
namespaces = {
"acq": "http://example.org/stuff/",
"foaf": "http://xmlns.com/foaf/0.1/",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
}
kg = kglab.KnowledgeGraph(
name = "LINQS simple acquaintance example for PSL",
base_uri = "http://example.org/stuff/",
language = "en",
... | 0.304765 | 0.988885 |
```
import os
import sys
import time
import numpy as np
import pandas as pd
from scipy import misc
import matplotlib.pyplot as plt
from scipy import sparse
from scipy.sparse import csgraph
from scipy import linalg
from pysheds.grid import Grid
from scipy import ndimage
from matplotlib import colors
import seaborn as sn... | github_jupyter | import os
import sys
import time
import numpy as np
import pandas as pd
from scipy import misc
import matplotlib.pyplot as plt
from scipy import sparse
from scipy.sparse import csgraph
from scipy import linalg
from pysheds.grid import Grid
from scipy import ndimage
from matplotlib import colors
import seaborn as sns
i... | 0.268174 | 0.628892 |
# Final Project Submission
* Student name: `Reno Vieira Neto`
* Student pace: `self paced`
* Scheduled project review date/time: `Fri Oct 15, 2021 3pm – 3:45pm (PDT)`
* Instructor name: `James Irving`
* Blog post URL: https://renoneto.github.io/using_streamlit
#### This project originated the [following app](https://... | github_jupyter | import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
import re
import time
from surprise import Reader, Dataset, dump
from surprise.model_selection import cross_validate, GridSearchCV
from surprise.prediction_algorithms import KNNBasic, KNNBaseline, SVD, SVDpp
from surprise.accur... | 0.662906 | 0.885829 |
End of preview. Expand in Data Studio
- Downloads last month
- 23