Skip to content

Instantly share code, notes, and snippets.

View refraction-ray's full-sized avatar

Shixin Zhang refraction-ray

View GitHub Profile
@refraction-ray
refraction-ray / eigh-issue.ipynb
Last active July 10, 2019 08:31
Possible issue on numpy eigh
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@refraction-ray
refraction-ray / ubuntu-preseed.txt
Created April 14, 2019 13:14
sample preseed for ubuntu
#### Contents of the preconfiguration file (for stretch)
### direct copy from: https://help.ubuntu.com/lts/installation-guide/example-preseed.txt
### Localization
# Preseeding only locale sets language, country and locale.
d-i debian-installer/locale string en_US
# The values can also be preseeded individually for greater flexibility.
#d-i debian-installer/language string en
#d-i debian-installer/country string NL
@refraction-ray
refraction-ray / svd_diff.ipynb
Last active March 28, 2019 09:41
The API differences of SVD between numpy, tensorflow and pytorch
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@refraction-ray
refraction-ray / gradient_eigh.ipynb
Last active March 27, 2019 13:25
A demo of auto gradient of eigenvectors in tensorflow: and its possible issue
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@refraction-ray
refraction-ray / itertools_demo.ipynb
Created February 24, 2019 02:27
A minimal tutorial on itertools module in python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@refraction-ray
refraction-ray / functools_demo.ipynb
Last active February 24, 2019 02:27
A minimal tutorial on functools module in python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@refraction-ray
refraction-ray / collections_demo.ipynb
Last active March 29, 2019 02:29
A minimal tutorial on collections module in python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@refraction-ray
refraction-ray / nfa.py
Last active January 30, 2019 05:46
NFA solution for LeetCode 10
'''
Python 3
'''
class Solution:
def isMatch(self, s, p):
"""
:type s: str
:type p: str
:rtype: bool
@refraction-ray
refraction-ray / yield-demo.ipynb
Created January 25, 2019 15:02
Some snippets to show the basic usage of yield and yield from in python3
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@refraction-ray
refraction-ray / README.md
Last active January 3, 2019 05:13
Python import mechanism

This is a demo package to show the implementation details of python import system. Collect the above py files into a folder app. The folder orginization is

root
├── ext.py
│   
├── app
│   ├── __init__.py
│   ├── a.py