Skip to content

Instantly share code, notes, and snippets.

View findmyway's full-sized avatar
🏹
make it work 🚲 make it right 📝 make it fast 🚀

Jun Tian findmyway

🏹
make it work 🚲 make it right 📝 make it fast 🚀
View GitHub Profile
@findmyway
findmyway / Install CUDA 10.1 on Ubuntu 18.04.md
Created April 13, 2020 07:14 — forked from eddex/Install CUDA 10.1 on Ubuntu 18.04.md
How to install CUDA 10.1 on Ubuntu 18.04

How to install CUDA 10.1 on Ubuntu 18.04

A clean installation of Ubuntu 18.04.02 LTS was used.

This gist is an extension to the official docs, adding missing parts and instructions.

2 pre-install actions

follow the pre-installation actions on:

wakatime
using BinaryBuilder
const src_name = "ViZDoom"
const src_version = v"1.2.1"
platforms = [
BinaryProvider.Linux(:x86_64, :glibc)
]
sources = [
@findmyway
findmyway / test.py
Last active February 27, 2018 07:24
Another block
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from articles.models import Article
# Create your views here.
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
@findmyway
findmyway / clojure-ctags.md
Created December 2, 2016 14:01
Add Clojure support to exuberant ctags and vim-tagbar

ctags

Add the following to ~/.ctags (thanks, xzj / clojure.ctags):

--langdef=Clojure
--langmap=Clojure:.clj
--regex-clojure=/\([ \t]*create-ns[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/n,namespace/
--regex-clojure=/\([ \t]*def[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/d,definition/
--regex-clojure=/\([ \t]*defn[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/f,function/
--regex-clojure=/\([ \t]*defn-[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/p,private function/
@findmyway
findmyway / SimpleHTTPServerWithUpload.py
Created July 6, 2016 04:09 — forked from UniIsland/SimpleHTTPServerWithUpload.py
Simple Python Http Server with Upload
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""
@findmyway
findmyway / gist:b46a0d94e56b64f3be7e
Created January 29, 2015 16:14
Data Visualization and Analysis in Recsys Challenge p1
plt.rcParams['figure.figsize'] = (15, 10) # set default fig size
click_file = './data/yoochoose-data/yoochoose-clicks.dat'
buy_file = './data/yoochoose-data/yoochoose-buys.dat'
click = pd.read_csv(click_file,
header=None, index_col=False, parse_dates=[1],
names=['SesID', 'TimeStamp','ItemID','Category'],
dtype={'SesID':str,
'TimeStamp':datetime,
total = pd.concat([click[['TimeStamp','SesID','ItemID']],buy[['TimeStamp','SesID','ItemID']]],
ignore_index=True)
buy_sessions = buy['SesID'].drop_duplicates()
total['IsBuy'] = total['SesID'].isin(buy_sessions)
total_sesID_group = total.groupby('SesID')
click_sesID_group = total[total['IsBuy'] == False].groupby('SesID')
buy_sesID_group = total[total['IsBuy'] == True].groupby('SesID')
item2category = click[['ItemID','Category']].copy()
@findmyway
findmyway / analysis
Created January 29, 2015 03:26
Data Visualization and Analysis in Recsys Challenge
{
"metadata": {
"signature": "sha256:64a50bdb2c1208370196ddd66a389e0c14ccc4bc39b13d8b3a5052740c85f4ad"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from articles.models import Article
# Create your views here.
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger