Data Visualization course. EPFL. Masters 2017-2018. Lab 2. Solutions.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class une_classe { | |
private: | |
bool mavar; | |
public: | |
void ANicemethod (Param const &a ) { | |
if(a==2) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<iframe src="https://gist.github.com/kikohs/9706664/" width="100%" height="600"></iframe> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Implementation of pairwise ranking using scikit-learn LinearSVC | |
Reference: "Large Margin Rank Boundaries for Ordinal Regression", R. Herbrich, | |
T. Graepel, K. Obermayer. | |
Authors: Fabian Pedregosa <fabian@fseoane.net> | |
Alexandre Gramfort <alexandre.gramfort@inria.fr> | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
execfile("/your/path/to/videomaker.py") | |
videomaker( | |
ts_min=1352261778000, # "from" timestamp.. | |
ts_max=1352262378000, # .."to" timestamp | |
frames=20, # number of images in the video. eg 200 frames for a video at 20 frames per seconds = 10 seconds of video | |
output_prefix="/path/to/output/dir/frame_", # path where to write the png. images will be prefixed with "frame_" | |
output_format=".png" # you probably want to leave png here | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Running code with jupyter_client and saving outputs""" | |
# LICENSE: CC-0 (public domain) | |
from binascii import a2b_base64 | |
from jupyter_client.manager import start_new_kernel | |
def handle_output(msg): | |
msg_type = msg['header']['msg_type'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: gpl-3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
YOUTUBE_FORMATS=$(youtube-dl -F "$1") | |
if [[ "$YOUTUBE_FORMATS" == *"(DASH Video)"* ]]; then | |
VIDEO_NAME=$(youtube-dl --get-filename "$1") | |
VIDEO_NAME_TMP="$VIDEO_NAME.tmp" | |
echo "Filename: $VIDEO_NAME" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This could be a problem cause by your Windows OS being a bottleneck and limit your speed. After some talks and discussion with a colleague, this is the solution that worked for my case!
- Go to your Start Menu.
- Go to 'View Network Connections'.
- Right-click on your Wi-Fi adapter.
- Select the 'Properties' menu option.
- Find the 'Internet Protocol Version 4' and select the 'Properties' menu option. (keep the IPv4 option checked)
- Click on the 'Advanced' button.
- Uncheck 'Automatic Metric' and enter 1 in the 'Interface metric' text box.