Skip to content

Instantly share code, notes, and snippets.

View sjsakib's full-sized avatar
🦥

Sharfin Jahan Sakib sjsakib

🦥
View GitHub Profile
@sjsakib
sjsakib / greedy.cpp
Last active February 22, 2016 05:51
int coin[] = {50,20,10,5,2,1};
int return_change(int amount) {
int res = 0;
int j = 0;
while(amount>0) {
if(amount<=coin[j]) {
amount-=coin[j];
res++;
} else {
if(j == 6) { //নোট বা কয়েন শেষ কিন্তু টাকা শেষ হয়নি। তাহলে ভাংতি দেয়া যাবে না
@sjsakib
sjsakib / find_jammers.py
Last active April 12, 2016 06:13
A python script that fetches Code Jam 2016 Bangladeshi participants' handle, rank and point from the qualification round scoreboard. Needs selenium and chromedriver
#encoding: utf-8
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
def get_text(driver,element): #could be done without this ugly funcion. didn't know
return driver.execute_script("""
@sjsakib
sjsakib / Jammers.txt
Last active April 12, 2016 04:43
List of Bangladeshi Code Jammers
# Rank Handle Points
------------------------------------------------
1 246 NAFIS 100
2 501 arka.hjp 100
3 921 nightfury1204 100
4 1601 VUAcoder 100
5 2280 Jhamra 75
6 2363 aminul 75
7 2496 Sadia.013 75
8 2531 math10 75
@sjsakib
sjsakib / C++.sublime-build
Created April 21, 2016 21:59
Sublime build system to run in cmd window
{
"shell_cmd": "g++ -std=c++11 \"${file}\" -o \"${file_path}/${file_base_name}\" && \"${file_path}/${file_base_name}\"",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++,source.cpp",
"variants":
[
{
"name": "Interactive",
import sys
sys.stdin = open("in","r");
print raw_input();
import java.util.*;
import java.io.*;
public class InputWithFile {
public static void main(String[] args) throws Exception {
System.setIn(new FileInputStream(new File("in")));
Scanner in = new Scanner(System.in);
System.out.println(in.next());
}
}
{
"shell_cmd": "start cmd /k \"python ${file} & pause & exit\"",
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"working_dir": "${file_path}",
"selector": "source.python",
"variants":
[
{
"name": "Inspect",
{
"shell_cmd": "javac \"${file}\" && java ${file_base_name}",
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
"selector": "source.java",
"variants":
[
{
"name": "Interactive",
"shell_cmd": "javac \"${file}\" && start cmd /k \"java ${file_base_name} & pause & exit\""
This app is used to make a messenger bot. This app won't be used by anyone but me. So the question of privacy policy does not
arises.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.