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 socket | |
import sys | |
import time | |
# Inisialisasi Create a TCP/IP socket | |
client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
#Koneksi | |
server_address = ('localhost', 14000) | |
print >>sys.stderr, 'connecting to %s port %s' % server_address |
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 socket | |
import select | |
import sys | |
from threading import * | |
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
server_address = ("localhost", 14000) | |
client.connect(server_address) |
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 asyncore | |
import socket | |
import os | |
import shutil | |
import sys | |
import threading | |
def response_listdir(param): | |
param = param.split("/listdir/") |
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<stdio.h> | |
#include<stdlib.h> | |
#include<string.h> | |
#include<algorithm> | |
#include<math.h> | |
using namespace std; | |
typedef struct tree{ | |
int count; |
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 PIL import Image | |
#thresholding | |
def thresholding(img): | |
#load image | |
pixels = img.load() | |
#create blank output image | |
output = Image.new(img.mode, img.size) | |
outputPixels = output.load() |
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 PIL import Image | |
def langrangeInterpolation(x,x0,x1,x2,x3,fx0,fx1,fx2,fx3): | |
fx = ((((x-x1)*(x-x2)*(x-x3))/((x0-x1)*(x0-x2)*(x0-x3))) *fx0) + ((((x-x0)*(x-x2)*(x-x3))/((x1-x0)*(x1-x2)*(x1-x3))) *fx1) + ((((x-x1)*(x-x0)*(x-x3))/((x2-x1)*(x2-x0)*(x2-x3))) *fx2) + ((((x-x1)*(x-x2)*(x-x0))/((x3-x1)*(x3-x2)*(x3-x0))) *fx3) | |
return fx | |
def resize(img): | |
pixels = img.load() |
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
public class MovingObject { | |
private int initialVelocity; | |
private int duration; | |
private int acceleration; | |
public MovingObject(int initialVelocity, int duration, int acceleration) { | |
this.initialVelocity = initialVelocity; | |
this.duration = duration; | |
this.acceleration = acceleration; | |
} |
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
public class Main { | |
public static void main(String[] args) { | |
MovingObject object = new MovingObject(10, 10, 10 ); | |
System.out.println(object.displacement()); | |
} | |
} |
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
public class MovingObject { | |
private int initialVelocity; | |
private int duration; | |
private int acceleration; | |
private int mass; | |
public MovingObject(int initialVelocity, int duration, int acceleration, int mass) { | |
this.initialVelocity = initialVelocity; | |
this.duration = duration; | |
this.acceleration = acceleration; |
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
public class Main { | |
public static void main(String[] args) { | |
MovingObject object = new MovingObject(10, 10, 10 ); | |
System.out.println(object.displacement()); | |
System.out.println(object.currentMomentum()); | |
} | |
} |
OlderNewer