Skip to content

Instantly share code, notes, and snippets.

View xadahiya's full-sized avatar

Akshay Dahiya xadahiya

View GitHub Profile
@xadahiya
xadahiya / login.html
Created July 11, 2016 20:16
Typingeek Login html
<!DOCTYPE html>
{% load account socialaccount %}
{% load i18n %}
{% load staticfiles %}
{% load compress %}
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
@xadahiya
xadahiya / MemeMaker.html
Last active September 21, 2016 16:52 — forked from jwill/MemeMaker.html
Starter code for Meme Maker
<!DOCTYPE html>
<html>
<head>
<title>MemeMaker-Simple</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<style>
@xadahiya
xadahiya / min-char-rnn.py
Created March 13, 2017 07:52 — forked from karpathy/min-char-rnn.py
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
### We only need to replace the subsystem_parsed_classes by this and the new hydra server for drones API is ready.
parsed_classes = [
{
"@id":"http://schema.org/Order",
"@type":"hydra:Class",
"title":"Order",
"description":"Handle orders from the central server.",
"supportedOperation":[
{
"statusCodes": [
"""
Example from the README
"""
def main():
the_iri_of_the_resource = 'http://www.markus-lanthaler.com/hydra/event-api/events/102'
from hydra import Resource, SCHEMA
res = Resource.from_iri(the_iri_of_the_resource)
get_event = res.find_suitable_operation(None, None, SCHEMA.Event)
"""
Generated API Documentation for Server API using server_doc_gen.py."""
doc = {
"@context": {
"ApiDocumentation": "hydra:ApiDocumentation",
"description": "hydra:description",
"domain": {
"@id": "rdfs:domain",
"@type": "@id"
#!/usr/bin/env python
# Log Analysis
# Project 2
# Udacity - Full Stack Nanodegree
# import Postgresql library
import psycopg2
# Store global database name
import React, { Component } from 'react';
import { StyleSheet, View, Text, AsyncStorage,
Button, Alert, TouchableOpacity, } from 'react-native';
import * as helpers from '../helpers';
export default class Decks extends Component {
state = {
storageData: '',
## Instructions to run
# 1. Download the file using
# wget https://gist.githubusercontent.com/xadahiya/c677f7e69bcf7169cb29e08052273544/raw/6b27345d9094dba8a35f71363c0f015870e9e362/vagrant.sh
#2. Run
# chmod 777 vagrant.sh
#3. Finally run the file using
"""Test for checking if the response format is proper. Run test_crud before running this."""
# -*- coding: utf-8 -*-
import unittest
import random
import string
import json
import re
from hydrus.app import app_factory
from hydrus.utils import set_session, set_doc, set_api_name