Use git lfs to track very big files. For more info about github lfs, see here.
Ignore all intermediate files of UE4, only left those essential files to run the project.
| #!env python | |
| # script to sync publish this folder to a web server | |
| import time | |
| import glob | |
| import os | |
| import boto | |
| import boto.s3 | |
| import os.path | |
| import sys |
| """Simple utility script for semi-gracefully downgrading v3 notebooks to v2""" | |
| import io | |
| import os | |
| import sys | |
| from IPython.nbformat import current | |
| def heading_to_md(cell): | |
| """turn heading cell into corresponding markdown""" |
| %pylab inline | |
| import pandas as pd | |
| import sqlite3 | |
| con = sqlite3.connect("../Project_202a/yelp.db") | |
| df = pd.read_sql(“select * from xx", con) | |
| import MySQLdb | |
| import pandas as pd | |
| db = MySQLdb.connect(host="localhost", # your host, usually localhost |
| folder_name=${PWD##*/} | |
| unrealcv_zip=unrealcv-5c4762b.zip | |
| if [ ${folder_name} = 'plugins' ] || [ ${folder_name} = 'Plugins' ]; then | |
| echo "Download plugin" | |
| wget www.cs.jhu.edu/~qiuwch/unrealcv-plugin/${unrealcv_zip} -c | |
| echo "Extract files from zip" | |
| unzip -q -d unrealcv ${unrealcv_zip} | |
| else | |
| echo "Please run this script in Plugins folder" |
| class Solution { | |
| vector<int> a; | |
| public: | |
| Solution(vector<int> nums) : a(nums) {} | |
| /** Resets the array to its original configuration and return it. */ | |
| vector<int> reset() { return a; } | |
| /** Returns a random shuffling of the array. */ | |
| vector<int> shuffle() { |
| import unittest, time, random | |
| from testcfg import client | |
| class FPSCounter: | |
| def __init__(self): | |
| self.start_index = 0 | |
| self.start_time = time.time() | |
| def tick(self, current_index): | |
| current_time = time.time() |
Use git lfs to track very big files. For more info about github lfs, see here.
Ignore all intermediate files of UE4, only left those essential files to run the project.
Useful snippets for some UE4 tasks.
draw_center.cpp How to draw actor centerget_actor.cpp How to get an actor using its iddraw_debug_3d.cpp How to draw 3D debug points| project_folder=$1 | |
| if [[ -z ${project_folder} ]]; then | |
| echo Please specify project folder | |
| else | |
| echo Project folder is ${project_folder} | |
| rm -rf ${project_folder}/Plugins | |
| cp -r /c/qiuwch/workspace/unrealcv/unrealcv/Plugins ${project_folder} | |
| fi |
| import numpy as np | |
| import StringIO | |
| filename = 'C:/qiuwch/workspace/cnpy/cnpy/cnpy/arr1.npy' | |
| arr = np.load(filename) | |
| print 'Loading from file %s is done' % filename | |
| print arr.shape | |
| # (64, 64, 128) = 524288 | |
| # 8388688, file size |