Skip to content

Instantly share code, notes, and snippets.

View iamprayush's full-sized avatar

Prayush Dawda iamprayush

  • Engineer at cred | GSoC '20 @oppia
  • India
View GitHub Profile
@denniske
denniske / custom-solution.dart
Last active May 30, 2021 09:48
Flutter Modal bottom sheet will not overlap keyboard (Fixed)
import 'package:flutter/material.dart';
class CustomPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Container(),
floatingActionButton: FloatingActionButton(
onPressed: () {
showModalBottomSheet(
@crmaxx
crmaxx / install.log
Last active June 15, 2024 10:38
Installing and configuring P4Merge for Git on Ubuntu
# based on http://blogs.pdmlab.com/alexander.zeitler/articles/installing-and-configuring-p4merge-for-git-on-ubuntu/
$ cd ~/Downloads
$ wget https://cdist2.perforce.com/perforce/r18.2/bin.linux26x86_64/p4v.tgz
$ tar zxvf p4v.tgz
$ sudo mkdir /opt/p4v
@Geoyi
Geoyi / install virtualenv ubuntu 16.04.md
Created September 16, 2017 12:19 — forked from frfahim/install virtualenv ubuntu 16.04.md
How to install virtual environment on ubuntu 16.04

How to install virtualenv:

Install pip first

sudo apt-get install python3-pip

Then install virtualenv using pip3

sudo pip3 install virtualenv 
@0001vrn
0001vrn / countingSort.cpp
Created August 16, 2016 08:17
C++ program to implement Counting Sort
#include <iostream>
using namespace std;
void countingSort(int arr[],int n,int RANGE){
int count[RANGE]={0};
int i;
int out[n];
for(i=0;i<n;i++)
@un1t
un1t / django-script.py
Created February 21, 2015 21:48
How to run scripts outside django
# coding: utf-8
import os
import django
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings")
django.setup()
# write your code here
@mandiwise
mandiwise / Count lines in Git repo
Last active July 4, 2024 16:56
A command to calculate lines of code in all tracked files in a Git repo
// Reference: http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository
$ git ls-files | xargs wc -l
@aymanfarhat
aymanfarhat / karger.py
Last active May 2, 2021 03:33
Implementation of Karger's algorithm in Python. Randomized algorithm for computing minimum cuts in a connected graph. Input file source is Coursera's Algo 1 course HW3: http://spark-public.s3.amazonaws.com/algo1/programming_prob/kargerMinCut.txt
import re
import random
# Load the file into a graph represented by a dict of lists
def load_graph():
g = {}
f = open('kargerMinCut.txt')
lines = f.readlines()
f.close()
@speric
speric / gist:6096965
Created July 28, 2013 01:20
vimtutor Lesson Summaries
Lesson 1 SUMMARY
1. The cursor is moved using either the arrow keys or the hjkl keys.
h (left) j (down) k (up) l (right)
2. To start Vim from the shell prompt type: vim FILENAME <ENTER>
3. To exit Vim type: <ESC> :q! <ENTER> to trash all changes.
OR type: <ESC> :wq <ENTER> to save the changes.