Skip to content

Instantly share code, notes, and snippets.

View Mahdisadjadi's full-sized avatar

mahdi sadjadi Mahdisadjadi

View GitHub Profile
@mxl00474
mxl00474 / Moving_graph_with_matplotlib.ipynb
Created May 19, 2020 14:34
matplotlibを使ってJupyterLab上で動く3Dグラフを作成する
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shane5ul
shane5ul / f2pyExample.ipynb
Last active April 10, 2019 19:58
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.
@jaganadhg
jaganadhg / kmeanscosine.py
Last active December 21, 2021 06:33
KMeans cosine
from sklearn.cluster import k_means_
from sklearn.metrics.pairwise import cosine_similarity, pairwise_distances
from sklearn.preprocessing import StandardScaler
def create_cluster(sparse_data, nclust = 10):
# Manually override euclidean
def euc_dist(X, Y = None, Y_norm_squared = None, squared = False):
#return pairwise_distances(X, Y, metric = 'cosine', n_jobs = 10)
@wmedlar
wmedlar / Self-Consistent Density Functional Theory Calculations with Quantum ESPRESSO.ipynb
Created January 5, 2016 22:00
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.
@wmedlar
wmedlar / Tight-Binding Calculation of the Band Structure of Silicon.ipynb
Last active February 5, 2023 08:45
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.
@jgomezdans
jgomezdans / HessianCalculations.ipynb
Last active September 18, 2015 06:30
Hessian calculation
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kageurufu
kageurufu / __init__.py
Created May 21, 2015 19:17
Example of loading large data in memory
from flask import Flask
app = Flask(__name__)
from . import views
@amroamroamro
amroamroamro / README.md
Last active August 12, 2024 14:12
[Python] Fitting plane/surface to a set of data points

Python version of the MATLAB code in this Stack Overflow post: https://stackoverflow.com/a/18648210/97160

The example shows how to determine the best-fit plane/surface (1st or higher order polynomial) over a set of three-dimensional points.

Implemented in Python + NumPy + SciPy + matplotlib.

quadratic_surface

@subfuzion
subfuzion / global-gitignore.md
Last active August 29, 2024 00:52
Global gitignore

There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules directory) as well as files that are generated (and regenerated) as artifacts of a build process.

All other files should be in your own global gitignore file:

  • Create a file called .gitignore in your home directory and add any filepath patterns you want to ignore.
  • Tell git where your global gitignore file is.

Note: The specific name and path you choose aren't important as long as you configure git to find it, as shown below. You could substitute .config/git/ignore for .gitignore in your home directory, if you prefer.

@xdamman
xdamman / install_ffmpeg_ubuntu.sh
Created July 2, 2014 21:03
Install latest ffmpeg on ubuntu 12.04 or 14.04
#!/bin/bash
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04
# Inspired from https://gist.github.com/faleev/3435377
# Remove any existing packages:
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev
# Get the dependencies (Ubuntu Server or headless users):
sudo apt-get update