Skip to content

Instantly share code, notes, and snippets.

View ragmha's full-sized avatar

Räghib Hasan ragmha

View GitHub Profile
//askInfo
public static int[][] askInfo(int rows,int columns){
Scanner reader = new Scanner(System.in);
//Multi Dimension array creation and reference assignment to array variable matrix
int[][] matrix = new int[rows][columns];
for(int i=0;i<rows;++i){
for(int j=0;j<columns;++j){
@ragmha
ragmha / gist:da4e40e6de0b49fbcb74
Last active September 15, 2015 07:27
lINUX COMMAND
# add ivan to wheel group
usermod -a -G wheel ivan
remove # from wheel
java,scala,js
@ragmha
ragmha / LICENSE
Created October 17, 2015 21:47 — forked from ourmaninamsterdam/LICENSE
Arrayzing - The JavaScript array cheatsheet
The MIT License (MIT)
Copyright (c) 2015 Justin Perry
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
@ragmha
ragmha / shit.md
Created January 26, 2016 11:02
la la
  1. Startup First create an account to https://www.datacamp.com, practice with the first two chapters (Ch1. Python Basics and Ch2. Python Lists) from the course https://campus.datacamp.com/courses/intro-to-python-for-data-science,

When you are ready, write here: "Done" and show in the class your exercises to me.

You could also read the first two chapters from the book A Primer on scientific programming with Python:

Ch 1. Computing with formulas. Ch 2. Loops and lists.

@ragmha
ragmha / lol.py
Created February 8, 2016 14:13
lol
def array10 (array):
if (len(array) == 1):
return False
if (array[0]*10 == array[1]):
return True
return (array10(array[1:]))
def allStar(line):
if (len(line) == 1):
return (line)
@ragmha
ragmha / Edx.py
Created February 16, 2016 04:26
solution
# 4
def isPalindrome(aString):
a = ""
for i in range(len(aString)-1,-1,-1):
a = a+aString[i]
if a == aString:
return True
else:
return False
@ragmha
ragmha / Problem7.py
Last active February 16, 2016 12:29
def dict_interdiff(d1, d2):
'''
d1, d2: dicts whose keys and values are integers
Returns a tuple of dictionaries according to the instructions above
'''
intersect = {}
difference ={}
for akey in d1.keys() :
if akey in d2.keys():