Skip to content

Instantly share code, notes, and snippets.

View nickedes's full-sized avatar

Nikhil Mittal nickedes

  • Bangalore, India
View GitHub Profile
import pandas as pd
data = [1,2,3,4,5]
df = pd.DataFrame(data)
print(df.to_csv(index=False,header=False,line_terminator=','))
# XOR of first N natural no.s
N = int(input())
if (N % 2) == 0:
if (N % 4) == 0:
r = N
else:
r = N+1
else:
if (N % 4) == 1:
r = 1
#include <GLUT/glut.h> // glut (gl utility toolkit) basic windows functions, keyboard, mouse.
#include <stdio.h> // standard (I/O library)
#include <stdlib.h> // standard library (set of standard C functions
#include <math.h> // Math library (Higher math functions )
#include <string.h>
// lighting
GLfloat LightAmbient[]= { 0.5f, 0.5f, 0.5f, 1.0f };
GLfloat LightDiffuse[]= { 0.5f, 0.5f, 0.5f, 1.0f };
GLfloat LightPosition[]= { 5.0f, 25.0f, 5.0f, 1.0f };
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define WIDTH 600
#define HEIGHT 600
#include <GLUT/glut.h>