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
######################################################### | |
# | |
# classes is a git repository with many class projects | |
# I want to split one of those projects into its own repo | |
# and I want preserve the commit history | |
# | |
# The super top-level repo is classes.git | |
# Within classes.git is a sub-directory "networks/project2" | |
# we want to create a new repository with just the history of | |
# "networks/project2" |
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
''' | |
Usage: python archive_articles.py test.csv | |
Input: test.csv | |
name url | |
1 url1 | |
2 url2 | |
..... | |
output: | |
1.png | |
2.png |
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 | |
# update | |
apt -y update | |
apt -y upgrade | |
apt -y dist-upgrade | |
# 5.2 mainline kernel | |
cd /tmp | |
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.2-rc6/linux-headers-5.2.0-050200rc6_5.2.0-050200rc6.201906222033_all.deb |
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
#!/bin/bash | |
# | |
# EDIT: this script is outdated, please see https://forums.developer.nvidia.com/t/pytorch-for-jetson-nano-version-1-6-0-now-available | |
# | |
sudo apt-get install python-pip | |
# upgrade pip | |
pip install -U pip | |
pip --version | |
# pip 9.0.1 from /home/ubuntu/.local/lib/python2.7/site-packages (python 2.7) |
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
#ifndef matrix_utils_hpp | |
#define matrix_utils_hpp | |
#include <vector> | |
#include <array> | |
#include <type_traits> | |
#include <fstream> | |
#include <boost/archive/xml_iarchive.hpp> | |
#include <boost/archive/xml_oarchive.hpp> |
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
import mxnet as mx | |
from mxnet import nd, autograd | |
from mxnet.gluon import nn | |
from mxnet.gluon.contrib.nn import Identity, Concurrent | |
from mxnet import gluon | |
import logging | |
def d(a, b): | |
return (a - b).norm() |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<!-- Launch Daemon do not always have access to all the path variables | |
As a results, scripts will sometimes fail if the you are using path variables inside them | |
To enable the script to have access to all path variables, open up a terminal and type in --> | |
<!-- echo $PATH --> | |
<!-- You can opt to filter out some of the path variables which are not required by script--> | |
<key>EnvironmentVariables</key> |
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 python | |
"""Simple HTTP Server With Upload. | |
This module builds on BaseHTTPServer by implementing the standard GET | |
and HEAD requests in a fairly straightforward manner. | |
""" | |
__version__ = "0.1" | |
__all__ = ["SimpleHTTPRequestHandler"] |
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
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
; #Warn ; Enable warnings to assist with detecting common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
LCtrl & Tab:: AltTab | |
!Tab:: Send ^{Tab} | |
!+Tab:: Send ^+{Tab} | |
^Space:: Send ^{Esc} |
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
import requests | |
import argparse | |
import os | |
import re | |
import json | |
import mutagen | |
import base64 | |
from mutagen import easyid3 | |
import sys | |
from Crypto.Cipher import AES |
OlderNewer