Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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/sh | |
### Set the job name (for your reference) | |
#PBS -N nbserver | |
### Set the project name, your department code by default | |
#PBS -P <project_name> | |
### Request email when job begins and ends | |
#PBS -m bea | |
### Specify email address to use for notification. | |
#PBS -M $USER@iitd.ac.in | |
#### |
This file contains 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
// CP hath spoiled me, I'm too lazy to write headers out. | |
// atleast not lazy enough to use namespace std :P | |
#include <bits/stdc++.h> | |
// Sudoku bitboard: | |
struct board_t { | |
uint8_t data[324]; | |
uint8_t gs[90]; | |
uint8_t rs[90]; | |
uint8_t cs[90]; |
This file contains 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
# Person, queue_in_time, queue_out_time, timedelta | |
# <int>, <time> , <time> , <timedelta> | |
import datetime | |
import curses | |
import pandas as pd | |
import os | |
def main(win): | |
win.nodelay(False) |
This file contains 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> | |
typedef char byte; | |
typedef unsigned int word; | |
char* header = | |
"-- TESTCASE AUTOGENERATED by gentest\n" | |
"library ieee;\n" | |
"use ieee.std_logic_1164.all;\n" |
This file contains 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 <time.h> | |
double rand_gen(double *classes, double *probabilities, int n) { | |
double class = ((double)rand())/RAND_MAX; | |
double prob_sum = 0; | |
int class_index = 0; | |
for (; class_index<n; class_index++) { | |
if (prob_sum < class && prob_sum+probabilities[class_index] > class) { |
This file contains 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/zsh | |
set -e | |
cp $HOME/Desktop/*.png . | |
# delete all screen 1 screenshots | |
find . -name '*PM.png' -delete | |
# convert images one by one |
This file contains 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
package com.sensei.algorithms.numeric; | |
import java.util.Scanner; | |
public class OpSolverGreedy { | |
public static final double EPSILON = 0.005; | |
public static void main(String[] args) { | |
Scanner sc = new Scanner(System.in); |
This file contains 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 <math.h> | |
#include <stdlib.h> | |
#include <stdbool.h> | |
#include <SDL2/SDL.h> | |
typedef struct { | |
int x; | |
int y; | |
int r; |
This file contains 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 java.io.*; | |
import java.util.*; | |
import java.math.*; | |
import static java.lang.Math.*; | |
/** | |
This is my custom comeptitive programming setup. | |
@author Aniruddha Deb | |
*/ |
NewerOlder