Skip to content

Instantly share code, notes, and snippets.

View Mahdisadjadi's full-sized avatar

mahdi sadjadi Mahdisadjadi

View GitHub Profile
import numpy as np
from numpy.linalg import matrix_power
from matplotlib import pyplot as plt
import seaborn as sns
SIZE = 100
M = np.zeros((SIZE, SIZE))
# encoding rolls of die
for y in xrange(SIZE):
@Mahdisadjadi
Mahdisadjadi / structure-of-tweepy-status-object.json
Created December 12, 2017 17:00
the structure of the Status object of Tweepy
/* json.dumps(StatusObject._json) */
{
"created_at": "Thu Jul 28 00:08:39 +0000 2016",
"in_reply_to_status_id": null,
"id_str": "758454081656467456",
"retweeted": false,
"entities": {
"hashtags": [
{
@Mahdisadjadi
Mahdisadjadi / f2pyExample.ipynb
Created October 24, 2016 21:05 — forked from shane5ul/f2pyExample.ipynb
A jupyter notebook which demonstrates the use of f2py for computing radial distribution functions
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Mahdisadjadi
Mahdisadjadi / Self-Consistent Density Functional Theory Calculations with Quantum ESPRESSO.ipynb Silicon, Aluminum, Iron, and Graphene are characterized with a popular Fortran implementation of the self-consistent density functional theory -- Quantum ESPRESSO. An introduction to DFT and using QE is given, and results for Silicon are compared with those of previous calculations using the empirical pseudopotential and tight-binding methods.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Mahdisadjadi
Mahdisadjadi / Tight-Binding Calculation of the Band Structure of Silicon.ipynb The band structure of Silicon is calculated using the empirical tight-binding method implemented in the Python programming language. Only interactions between first nearest neighbors are taken into account. The energy splittings for Silicon at symmetry points appear to be somewhat accurate to accepted values, although second neighbors will have …
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Mahdisadjadi
Mahdisadjadi / Optimizer.py
Created February 22, 2016 05:28 — forked from jiahao/Optimizer.py
Pure Python implementation of some numerical optimizers
#!/usr/bin/env python
'''
Pure Python implementation of some numerical optimizers
Created on Jan 21, 2011
@author Jiahao Chen
'''