This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
from os import listdir, chdir, rename | |
# Valid chars in a file name | |
alpha = 'abcdefghijklmnopqrstuvwxyz0123456789.' | |
dir_path = "/home/varun/Desktop/Github Projects/CodeKata/Python" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.Random; | |
import java.util.Vector; | |
import java.util.stream.IntStream; | |
/*Please write a program to use vector and list to store 10 integers in order | |
(from smallest to largest). | |
You need to find proper location using vector or list functions for each number added. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.EmptyStackException; | |
import java.util.Scanner; | |
import java.util.Stack; | |
/* | |
wap that reads postfix expressions and prints their values. | |
Each input expression should be entered on its own line, | |
and the program should terminate when the user enters a blank line. | |
Please do error checking for any error. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class DecimalToBinary { | |
public static void main(String[] args) { | |
new DecimalToBinary().run(); | |
} | |
public void toDecimal(int number){ | |
int binary[] = new int[number]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
#include <time.h> | |
// const | |
#define AtBeginning 1 | |
#define AtEnd 0 | |
struct Node | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sublime, sublime_plugin | |
from time import localtime, strftime | |
class InsertDatetimeCommand(sublime_plugin.TextCommand): | |
def run(self, edit): | |
format = "%d/%b/%Y/(%I.%M:%p)" | |
current_date = strftime(format, localtime()) | |
content = "Author: Aamir khan (aamirkhan180@gmail.com)\n{}\n".format(current_date) | |
sel = self.view.sel(); | |
for s in sel: | |
if s.empty(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (isset($_POST['email'])) { | |
$email = $_POST['email']; | |
$template = strtr("{\"email_address\": \"%email%\",\"status\": \"subscribed\"}", | |
array('%email%' => $email)); | |
$curl = curl_init(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getFakeProfiles(){ | |
return fetch('https://randomuser.me/api') | |
.then(res => res.json()) | |
.then(res =>res['results'][0]) | |
.catch(e => e); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Date object to unix timestamp | |
function unix(date) { | |
return Math.round(date.getTime() / 1000); | |
} | |
// replace all from string | |
String.prototype.replaceAll = function(rgx, replacement) { | |
var self = this; | |
return self.replace(new RegExp(rgx, "g"), replacement); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Incognito by David Eagleman | |
2. How Smart Machines Think by Sean Gerrish | |
3. The Hundred-Page Machine Learning Book by Andriy Burkov | |
4. Python Machine Learning (2nd Edition) by Sebastian Rasckha & Vahid Mirjalili | |
5. Deep Learning by Andrew W. Trask | |
6. Bayesian Methods For Hackers by Cameron Davidson - Pilon | |
7. Doing Data Science by Cathy O'Neil & Rachel Schutt | |
8. Reinforcement Learning by Richard S. Sutton & Andrew G. Barto | |
9. The Book of Why by Judea Pearl & Dana Mackenzie | |
10. Quantum Machine Learning by Peter Wittek |
OlderNewer