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> | |
| #include <GL/gl.h> | |
| #include <GL/glut.h> | |
| #include <math.h> | |
| #define PI 3.14159265 | |
| using namespace std; | |
| int a,b,r; |
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 <GL/gl.h> | |
| #include <GL/glut.h> | |
| #include <math.h> | |
| void eightSideDisp(void) | |
| { | |
| glClear (GL_COLOR_BUFFER_BIT); | |
| glColor3f (0.0, 0.0, 1.0); | |
| glPointSize(5.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 <stdio.h> | |
| #include<GL/gl.h> | |
| #include <GL/glut.h> | |
| #include <iostream> | |
| using namespace std; | |
| int x[4],y[4]; | |
| int trans[2][1]; |
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> | |
| #include <stdlib.h> | |
| #include <math.h> | |
| #include<GL/gl.h> | |
| #include <GL/glut.h> | |
| using namespace std; | |
| double pointX1, pointY1, pointX2, pointY2; |
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<GL/gl.h> | |
| #include <GL/glut.h> | |
| void myDisplay(void) | |
| { | |
| glClear (GL_COLOR_BUFFER_BIT); | |
| glColor3ub(0, 0, 0); | |
| glPointSize(4.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
| import copy | |
| import random | |
| class Individual: | |
| """Individual Gene""" | |
| def __init__(self, gene_length, filler, fitness_func, random_func, rand=True): | |
| self.gene_length = gene_length | |
| self.fitness_func = fitness_func | |
| self.random_func = random_func | |
| self.filler = filler |
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
| def is_under_attack(nq_arr,y,x): | |
| for i in range(y): | |
| #print(nq_arr,i,y,x) | |
| if(nq_arr[i] == x): | |
| return True | |
| if( abs(y - i) == abs (x - nq_arr[i]) ): | |
| return True | |
| return False | |
| def draw_board(nq_arr): |
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
| first_prob_arr =[ | |
| [6,1,10,2], | |
| [7,11,4,14], | |
| [5,None,9,15], | |
| [8,12,13,3] | |
| ] | |
| ex_prob_1 =[ | |
| [7,1,2], | |
| [5,None,4], |
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
| romania_map = { | |
| "Arad": {"Zerind": 75, "Timisoara": 118, "Sibiu": 140}, | |
| "Zerind": {"Arad": 75, "Oradea": 71}, | |
| "Oradea": {"Zerind": 71, "Sibiu": 151}, | |
| "Timisoara": {"Arad": 118, "Lugoj": 111}, | |
| "Lugoj": {"Timisoara": 111, "Mehadia":70}, | |
| "Mehadia": {"Lugoj": 70, "Dobreta": 75}, | |
| "Dobreta": {"Mehadia":75, "Craiova":120}, | |
| "Craiova": {"Dobreta": 120, "RimnicuVilcea": 146, "Pitesi": 138}, | |
| "RimnicuVilcea": {"Craiova": 146, "Pitesi": 97, "Sibiu":80}, |
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 urllib.parse import urlencode | |
| from urllib.request import Request, urlopen | |
| from os import popen | |
| import threading | |
| def check_result(): | |
| """A python script to periodically check if SSC resulthas been published or not""" | |
| timer = 5.0 #seconds | |
| print("checking...") |