Skip to content

Instantly share code, notes, and snippets.

Samay Shamdasani shamdasani

Block or report user

Report or block shamdasani

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View prediction.py
import pandas as pd
import numpy as np
import quandl, math, time, datetime
import matplotlib.pyplot as plt
import pickle
from matplotlib import style
from sklearn import preprocessing, model_selection, svm
from sklearn.linear_model import LinearRegression
quandl.ApiConfig.api_key = ''
View index.js
var fs = require('fs');
var http = require('http');
var inbox = require("inbox");
const MailParser = require('mailparser').MailParser;
let parser = new MailParser()
var journal = {
entries: []
};
View guess-number.py
numberofGuesses = 0
number = random.randint(1,50)
name = raw_input("Hello! What is your name? ")
print(name + ", I am thinking of a whole number between 1 and 50. Can you guess what it is?")
while numberofGuesses < 8:
guess = raw_input("Take a guess ")
guess = int(guess)
View request.js
//Instagram ID
function instagramID() {
return fetch('https://api.instagram.com/v1/users/self/?access_token='+queryParams.code)
.then((response) => response.json())
.then((responseJson) => {
return responseJson.data.id;
})
.catch((error) => {
console.error(error);
});
View profile.js
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
TextInput,
View,
Linking,
Alert
} from 'react-native';
View home.js
import React, { Component } from 'react';
import { View } from 'react-native';
import { Text } from 'react-native-elements';
import Camera from 'react-native-camera';
class Home extends Component {
render () {
return (
View app.js
function moveHands() {
with(new Date()) {
h = 30 * (getHours() % 12 + getMinutes() / 60); // 30 degrees hour
m = 6 * getMinutes(); // 6 degrees every minute
s = 6 * getSeconds(); // 6 degrees every second
document.getElementById('seconds').style.cssText = "-webkit-transform:rotate(" + s + "deg);"; // setting the rotate CSS attribute to those degree values
document.getElementById('minutes').style.cssText = "-webkit-transform:rotate(" + m + "deg);";
document.getElementById('hours').style.cssText = "-webkit-transform:rotate(" + h + "deg);";
setTimeout(moveHands, 1000); // calling the function every second
View style.css
.center {
width: 10px;
height: 10px;
position: absolute;
left: 0; right: 0; bottom: 0; top: 0;
margin: auto;
background: #000;
border-radius: 100%;
}
View style.css
.twelve {
position: absolute;
width: 3px;
height: 15px;
background: #111111;
left: 0;
top: 0;
right: 0;
margin: 0 auto;
}
View style.css
* {
margin: 0;
padding: 0;
border: 0;
}
body {
background-color: #000;
}
You can’t perform that action at this time.