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 random | |
from itertools import count | |
# Extended Euclidean Algorithm | |
def egcd(a, b): | |
x,y, u,v = 0,1, 1,0 | |
while a != 0: | |
q, r = b//a, b%a | |
m, n = x-u*q, y-v*q | |
b,a, x,y, u,v = a,r, u,v, m,n |
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
# !/usr/bin/python # This is client.py file | |
import socket # Import socket module | |
s = socket.socket() # Create a socket object | |
host = socket.gethostname() # Get local machine name | |
port = 12345 # Reserve a port for your service. | |
s.connect((host, port)) |
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 <iostream> | |
using namespace std; | |
class base | |
{ | |
int real,img; | |
public: | |
base () | |
{ |
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
#!/bin/bash | |
if [ $(id -u) != 0 ] | |
then | |
echo "\033[1;37;40mThis script must be run as root user . \nGo back and try again as root user\033[0m" | |
exit 1 | |
fi | |
echo $(hostname) | |
echo '\033[1;37;40m Updating and installing packages \033[0m' |
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
#FTP | |
sudo apt-get install vsftpd | |
sudo service vsftpd start | |
ftp localhost | |
#Den receive data by get -> get filename |
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
. | |
|-- 100_Hits_Love_Happy_Valentines_Day | |
| |-- 001 Nat King Cole - Love.mp3 | |
| |-- 002 Paul Anka - Diana (Remastered).mp3 | |
| |-- 003 Shirley Bassey, Джордж Гершвин - S' Wonderfull (Remastered).mp3 | |
| |-- 004 Frank Sinatra - Come Fly With Me.mp3 | |
| |-- 005 Dean Martin - Volare (Remastered).mp3 | |
| |-- 006 Elvis Presley - Lover Doll.mp3 | |
| |-- 007 Carla Thomas - Gee Whiz, Look In His Eyes (Remastered).mp3 | |
| |-- 008 Timi Yuro - Only You.mp3 |
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
#define GLUT_DISABLE_ATEXIT_HACK | |
#include <windows.h> | |
#include <iostream> | |
#include <gl\glut.h> | |
// Initial Position of the Ball | |
float x_position = 0.0; | |
float y_position = 0.0; | |
// Radius of ball |
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
#define GLUT_DISABLE_ATEXIT_HACK | |
#include <windows.h> | |
#include <gl\glut.h> | |
#include <iostream> | |
float x1=-2.0, x2=2.0; | |
static int flag=1; | |
static int i=0; |
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 <GL/glut.h> | |
static float zoom_factor = 0.5; | |
float ver[8][3] = | |
{ | |
{-0.5 , -0.5 , 0.5} , | |
{-0.5 , 0.5 , 0.5} , | |
{0.5 , 0.5 , 0.5} , | |
{0.5 , -0.5 , 0.5} , |
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
. | |
|-- Seen | |
| |-- 300 Rise of an Empire (2014) | |
| | |-- 300.Rise.of.an.Empire.2014.1080p.BluRay.x264.YIFY.en.srt | |
| | |-- 300.Rise.of.an.Empire.2014.1080p.BluRay.x264.YIFY.mp4 | |
| | |-- Thumbs.db | |
| | `-- WWW.YIFY-TORRENTS.COM.jpg | |
| |-- 500 Days Of Summer (2009) | |
| | |-- 500 Days Of Summer.2009.720p.BDRip.x264-VLiS.en.srt | |
| | |-- 500 Days Of Summer.2009.720p.BDRip.x264-VLiS.mp4 |