Skip to content

Instantly share code, notes, and snippets.

@shamdasani
shamdasani / style.css
Created November 5, 2016 22:40
clock 2
.twelve {
position: absolute;
width: 3px;
height: 15px;
background: #111111;
left: 0;
top: 0;
right: 0;
margin: 0 auto;
}
.center {
width: 10px;
height: 10px;
position: absolute;
left: 0; right: 0; bottom: 0; top: 0;
margin: auto;
background: #000;
border-radius: 100%;
}
@shamdasani
shamdasani / app.js
Last active November 5, 2016 23:11
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
@shamdasani
shamdasani / style.css
Last active November 11, 2016 14:34
1
* {
margin: 0;
padding: 0;
border: 0;
}
body {
background-color: #000;
}
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 (
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
TextInput,
View,
Linking,
Alert
} from 'react-native';
//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);
});
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)
var fs = require('fs');
var http = require('http');
var inbox = require("inbox");
const MailParser = require('mailparser').MailParser;
let parser = new MailParser()
var journal = {
entries: []
};
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 = ''