This file contains 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 java.lang.reflect.Constructor; | |
import java.lang.reflect.Field; | |
import java.math.BigInteger; | |
import org.bouncycastle.crypto.DataLengthException; | |
import org.bouncycastle.crypto.params.RSAPrivateCrtKeyParameters; | |
import org.bouncycastle.jcajce.provider.asymmetric.rsa.BCRSAPrivateCrtKey; | |
public class RSATest { |
This file contains 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
public static void compressZipfile(String sourceDir, OutputStream os) throws IOException { | |
ZipOutputStream zos = new ZipOutputStream(os); | |
compressDirectoryToZipfile(sourceDir, sourceDir, zos); | |
IOUtils.closeQuietly(zos); | |
} | |
private static void compressDirectoryToZipfile(String rootDir, String sourceDir, ZipOutputStream out) throws IOException, FileNotFoundException { | |
File[] fileList = new File(sourceDir).listFiles(); | |
if (fileList.length == 0) { // empty directory / empty folder | |
ZipEntry entry = new ZipEntry(sourceDir.replace(rootDir, "") + "/"); |
This file contains 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
sigmoid = lambda x: 1 / (1 + np.exp(-x)) | |
x=linspace(-10,10,10) | |
y=linspace(-10,10,100) | |
plot(x,sigmoid(x),'r', label='linspace(-10,10,10)') | |
plot(y,sigmoid(y),'b', label='linspace(-10,10,100)') | |
grid() | |
xlabel('X Axis') | |
ylabel('Y Axis') | |
title('Sigmoid Function') | |
suptitle('Sigmoid') |
This file contains 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
<!DOCTYPE html> | |
<html lang="js" ng-app="testApp"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Angular Practice</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular.min.js"></script> | |
<script src="myscript.js"></script> | |
<style> | |
.even { | |
background: #ccc; |
This file contains 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 codecs | |
filename = 'input.csv' | |
# fr = open(filename) | |
fr = codecs.open(filename,"r","shift_jis") | |
lines = fr.readlines() | |
lines.sort() | |
dict = {} |