Skip to content

Instantly share code, notes, and snippets.

@gurdeepsinghiet
gurdeepsinghiet / lxml_examples.py
Created June 4, 2022 02:36 — forked from IanHopkinson/lxml_examples.py
Examples of xpath queries using lxml in python
#!/usr/bin/env python
# encoding: utf-8
import lxml.etree
import lxml.html
import requests
xml_sample = """<?xml version="1.0" encoding="UTF-8"?>
<foo:Results xmlns:foo="http://www.foo.com" xmlns="http://www.bah.com">
<foo:Recordset setCount="2">
@gurdeepsinghiet
gurdeepsinghiet / app.py
Created April 7, 2022 12:27 — forked from Babatunde13/app.py
The first part of my Flask and SQLAlchemy series.
from flask import Flask, jsonify, request
from flask_sqlalchemy import SQLAlchemy
import uuid
app = Flask(__name__)
db = SQLAlchemy(app)
app.config['SECRET_KEY']='secret'
app.config['SQLALCHEMY_DATABASE_URI']='sqlite:///app.db'
@gurdeepsinghiet
gurdeepsinghiet / min-char-rnn.py
Created April 1, 2022 04:37 — 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)
/* Becky Button. This code is made such that the motor 1 (m1p1 m1p2) is on the left and Motor 2 (m2p1, m2p2) is on the right.
I will be posting an instructables soon on how to make this work, with all of the schematics and such.*/
int m1Pin1 = 3; // pin 2 on L293D IC
int m1Pin2 = 4; // pin 7 on L293D IC
int enablePinm1 = 5; // pin 1 on L293D IC
int m2Pin1 = 6;
int m2Pin2 = 7;
#include <stdlib.h>
#include <stdio.h>
int main()
{
printf("Unicorns are cool \n");
printf("Einstein is old \a");
return 0;
@gurdeepsinghiet
gurdeepsinghiet / cgo.md
Created February 25, 2022 08:25 — forked from zchee/cgo.md
cgo convert list

See also, http://libraryofalexandria.io/cgo/

Using Go cgo

cgo has a lot of trap.
but Not "C" pkg also directory in $GOROOT/src. IDE's(vim) Goto command not works.

So, Here collect materials.