Skip to content

Instantly share code, notes, and snippets.

View wybert's full-sized avatar
🏠
Working from home

Xiaokang Fu wybert

🏠
Working from home
View GitHub Profile

How to install game-porting-toolkit (aka proton for macOS)

You also might wanna just use Whisky which does this automatically

This guide works on macOS 13.4+ using Command Line Tools for XCode 15 Beta!

What is this?

In the recent WWDC, Apple announced and released the "game porting toolkit", which upon further inspection this is just a modified version of CrossOver's fork of wine which is a "compatibility layer" that allows you to run Windows applications on macOS and Linux.

@mjdietzx
mjdietzx / residual_network.py
Last active March 26, 2024 06:33
Clean and simple Keras implementation of residual networks (ResNeXt and ResNet) accompanying accompanying Deep Residual Learning: https://blog.waya.ai/deep-residual-learning-9610bb62c355.
"""
Clean and simple Keras implementation of network architectures described in:
- (ResNet-50) [Deep Residual Learning for Image Recognition](https://arxiv.org/pdf/1512.03385.pdf).
- (ResNeXt-50 32x4d) [Aggregated Residual Transformations for Deep Neural Networks](https://arxiv.org/pdf/1611.05431.pdf).
Python 3.
"""
from keras import layers
from keras import models
@soply
soply / disp_multiple_images.py
Last active November 22, 2024 04:48
Plot multiple images with matplotlib in a single figure. Titles can be given optionally as second argument.
import matplotlib.pyplot as plt
import numpy as np
def show_images(images, cols = 1, titles = None):
"""Display a list of images in a single figure with matplotlib.
Parameters
---------
images: List of np.arrays compatible with plt.imshow.
@lebedov
lebedov / thumb_grid.py
Last active August 4, 2020 16:50
Display a grid of thumbnails.
#!/usr/bin/env python
"""
Display a grid of thumbnails.
"""
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import ImageGrid
import numpy as np
import PIL
@BibMartin
BibMartin / Create Map label with folium.ipynb
Created January 31, 2016 14:55
Create map label with folium
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@paulochf
paulochf / ipython_notebook_large_width.py
Last active November 14, 2024 11:23
IPython/Jupyter Notebook enlarge/change cell width
from IPython.display import display, HTML
display(HTML(data="""
<style>
div#notebook-container { width: 95%; }
div#menubar-container { width: 65%; }
div#maintoolbar-container { width: 99%; }
</style>
"""))
@jwass
jwass / geojsonio_embed.ipynb
Created August 18, 2014 18:02
Embed geojson.io in a Jupyter / IPython notebook using geojsonio.py
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jwass
jwass / cambridge_raw_osm.geojson
Last active April 11, 2016 04:12
Demonstrate using GeoPandas and geojsonio.py (http://github.com/jwass/geojsonio.py) to view styled data in a few lines. Running the script will open a browser with the final URL: http://geojson.io/#id=gist:/10218442
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.