Skip to content

Instantly share code, notes, and snippets.

View ariG23498's full-sized avatar
🐢
Learning slowly

Aritra Roy Gosthipaty ariG23498

🐢
Learning slowly
View GitHub Profile
@ariG23498
ariG23498 / sudoku_refined.c
Last active July 9, 2019 12:43
sudoku_solver
#include <stdio.h>
#include <math.h>
#define N 9
#define unassigned 0
//int a[N][N];
//int numbers=0;
@ariG23498
ariG23498 / crawl_bug_forward.py
Created July 27, 2018 19:54
bug crawl mockvita
f = [1, 2, 3, 4, 5, 6]
dir = [['U', 'E', 'D', 'W'], ['U', 'N', 'D', 'S'], ['N', 'E', 'S', 'W'], ['U', 'W', 'D', 'E'], ['U', 'S', 'D', 'N'],
['N', 'W', 'S', 'E']]
face = [[3, 2, 6, 5], [3, 4, 6, 1], [4, 2, 1, 5], [3, 5, 6, 2], [3, 1, 6, 4], [4, 5, 1, 2]]
absolute_dir=['N','W','D','S','E','U']
initial_face = int(input())
initial_dir = input()
directions = input()
prev_face = initial_face
prev_dir = initial_dir
@ariG23498
ariG23498 / gist:0430d32f05668bc8652c5983621d4fcf
Created February 19, 2019 19:13 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@ariG23498
ariG23498 / Distance.java
Created June 14, 2019 03:50
This code takes in a document `doc1.txt` and then spits out the frequency of each word in the document.
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.HashMap;
import java.nio.charset.Charset;
import java.util.List;
import java.util.StringTokenizer;
import java.io.IOException;
class Distance {
public static void main(String[] args) throws IOException {
import java.io.*;
import java.util.*;
class ReversePolish {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
for (int i = 0; i < n; i++) {
char[] arr = br.readLine().toCharArray();
Stack<Character> operator = new Stack<Character>();
@ariG23498
ariG23498 / HTTP_Flutter_Todo.dart
Created August 27, 2019 13:36
HTTP Flutter Template
class Todo {
int userId;
int id;
String title;
bool completed;
// Sugar syntax
Todo({this.userId, this.id, this.title, this.completed});
factory Todo.fromJson(Map<String, dynamic> json) {
@ariG23498
ariG23498 / condaenv.txt
Created September 18, 2019 07:13 — forked from pratos/condaenv.txt
To package a conda environment (Requirement.txt and virtual environment)
# For Windows users# Note: <> denotes changes to be made
#Create a conda environment
conda create --name <environment-name> python=<version:2.7/3.5>
#To create a requirements.txt file:
conda list #Gives you list of packages used for the environment
conda list -e > requirements.txt #Save all the info about packages to your folder
@ariG23498
ariG23498 / A*_bunnies_foobar.py
Created May 8, 2020 15:29
Foobar(prepare_for_escape)
from math import sqrt, ceil
class Node:
'''
Class for nodes
'''
def __init__(self, parent = None, position= None):
'''
initialize the object
'''
self.parent = parent
@ariG23498
ariG23498 / partitions.py
Created May 10, 2020 12:45
Foobar problem on staircase
def print_util(mat):
for i in mat:
for j in i:
print(j, end=" ")
print()
def solution(number):
mat = [[0 for i in range(number+1)] for i in range(number+1)]
mat[0][0] = 1
# The first row is skipped
for summands in range(1,number+1):
@ariG23498
ariG23498 / Image_Fetch_Resise.ipynb
Last active August 3, 2020 06:17
Fetches image from URL and then resizes it
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.