Skip to content

Instantly share code, notes, and snippets.

View MINOSai's full-sized avatar
📱
Feeding biscuits to Android Studio

Yaswant Narayan MINOSai

📱
Feeding biscuits to Android Studio
View GitHub Profile
@MINOSai
MINOSai / gist:510c7811775a7e53682b74957b258bd5
Created July 21, 2017 04:39
Progress on yaswant desktop
for song_name in list_of_songs:
song_name = formatting(song_name)
response = requests.get('https://www.youtube.com/results?', params={'search_query': song_name})
content = BeautifulSoup(response.content)
proper_video = scraper(content)
if not proper_video:
songs_not_downloaded.append(song_name)
continue
entire_link = "https://www.youtube.com{}".format(proper_video['link'])
# print(entire_link)
@MINOSai
MINOSai / gist:3d6268459042c3d7512701a8bc5473a6
Last active January 10, 2018 19:00 — forked from dodyg/gist:5823184
Kotlin Programming Language Cheat Sheet Part 1

Intro

Kotlin is a new programming language for the JVM. It produces Java bytecode, supports Android and generates JavaScript. The latest version of the language is Kotlin M5.3

Kotlin project website is at kotlin.jetbrains.org.

All the codes here can be copied and run on Kotlin online editor.

Let's get started.

@MINOSai
MINOSai / gist:e0f39142c5cd6bfc46a9297adcfd4f82
Last active January 10, 2018 19:02 — forked from dodyg/gist:5616605
Kotlin Programming Language Cheat Sheet Part 2

This is a quick guide to Kotlin programming language. The previous part of this guide is here

Object Oriented

fun main(args : Array<String>) {
  class local (val x : Int)
  
  val y = local(10)
 println("${y.x}")
import os
file = open('courselinks.txt', 'r')
temp = [link.replace('/table-of-contents', '') for link in file]
urls = [link.replace('\n', '') for link in temp]
default_path = os.getcwd()
for url in urls :
download_folder = default_path + '/' + url[44:]
package org.yaswant.test;
import org.cloudbus.cloudsim.*;
import org.cloudbus.cloudsim.core.CloudSim;
import org.cloudbus.cloudsim.provisioners.BwProvisionerSimple;
import org.cloudbus.cloudsim.provisioners.PeProvisionerSimple;
import org.cloudbus.cloudsim.provisioners.RamProvisionerSimple;
import org.workflowsim.*;
import org.workflowsim.failure.FailureGenerator;
import org.workflowsim.failure.FailureMonitor;
@MINOSai
MINOSai / hill.py
Created October 31, 2018 00:42
Hill cipher
def transposeMatrix(m):
return map(list,zip(*m))
def getMatrixMinor(m,i,j):
return [row[:j] + row[j+1:] for row in (m[:i]+m[i+1:])]
def getMatrixDeternminant(m):
#base case for 2x2 matrix
if len(m) == 2:
return m[0][0]*m[1][1]-m[0][1]*m[1][0]