Skip to content

Instantly share code, notes, and snippets.

View palloc's full-sized avatar
💭
I may be slow to respond.

Michiaki Ito palloc

💭
I may be slow to respond.
View GitHub Profile
@palloc
palloc / k-means.py
Last active July 7, 2017 04:24
homework
from math import *
import random
import numpy as np
import collections
class Kmeans:
def __init__(self, cluster_num):
self.cluster_num = cluster_num
self.counter = 0
self.error = 0.
# -*- coding: utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from pandas import Series, DataFrame
from numpy.random import normal
N=0 #学習用のデータ数
M=[0,0,0,0] #多項式の次数
@palloc
palloc / solver.c
Created September 7, 2015 04:36
stego100
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(){
char buf[1048576];
int ch;
fputs(fgets(buf,sizeof(buf),stdin),stdout);
fputs(fgets(buf,sizeof(buf),stdin),stdout);
fputs(fgets(buf,sizeof(buf),stdin),stdout);
@palloc
palloc / solver.py
Created September 7, 2015 04:24
Signer and Verifier
import struct
from socket import *
p = socket(AF_INET, SOCK_STREAM)
p.connect(("cry1.chal.mmactf.link",44816))
rcv = p.recv(1024)[333:]
num1 = int(temp) / 12
num2 = 12
n = 167891001700388890587843249700549749388526432049480469518286617353920544258774519927209158925778143308323065254691520342763823691453238628056767074647261280532853686188135635704146982794597383205258532849509382400026732518927013916395873932058316105952437693180982367272310066869071042063581536335953290566509
@palloc
palloc / rsa1.cpp
Created September 3, 2015 08:20
OldRSApgm
//RSA暗号化プログラム
#include <iostream>
#include <vector>
#include <random>
#include <time.h>
#define unsigned unsigned long long
using namespace std;
@palloc
palloc / rsa2.cpp
Created September 3, 2015 08:16
RSApgm
#include <iostream>
#include <random>
#include <math.h>
using namespace std;
void Eratosthenes(unsigned *prime_arr,unsigned N){
unsigned arr[N];
for(int i = 0; i < N; i++){
arr[i] = 1;
if(i < N / 2) prime_arr[i] = 0;
@palloc
palloc / test.c
Created September 3, 2015 08:03
eee
#include <stdio.h>
int main(){
return 0;
}