- Install proprietary nvidia driver
- Install nvidia-container-toolkit, containing CUDA (?) (via apt-get)
- Install tensorflow docker container
Discover gists
A list of commonly asked questions, design decisions, reasons why Clojure is the way it is as they were answered directly by Rich (even when from many years ago, those answers are pretty much valid today!). Feel free to point friends and colleagues here next time they ask (again). Answers are pasted verbatim (I've made small adjustments for readibility, but never changed a sentence) from mailing lists, articles, chats.
How to use:
- The link in the table of content jumps at the copy of the answer on this page.
- The link on the answer itself points back at the original post.
Setup One: Buy a Mac if you don't have one.
Setup Two: Install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Setup Three:
# This is a very crud example of using the Repository Pattern with SQLAlchemy. It allows me to completely ignore interactions with | |
# the database. This is only pulled in whenever I require to persist or retrieve an object from the database. The domain/business | |
# logic is entirely separated from persistence and I can have true unit tests for those. | |
# The tests for persistence are then limited to very specific cases of persistence and retrieving instances, and I can do those | |
# independent of the business logic. They also tend to be less tests since I only need to test them once. | |
This is a simple script along with some useful information to help when setting up a Laravel Sail project that was cloned from source control. I made this because I could not find anywhere that explained how to do this and kept running into problems. The main issue was a problem with database authentication. It turns out that when the Docker volume is created for the database for the first time the password that is in the .env file is used, which I usually created after starting Sail for the first time. Another issue was not having access to the Sail binary to start the containers. This is solved by the script by installing the composer dependencies with a disposable container. If you follow the steps below in order you should not run into any issues. Feel free to leave a comment on this Gist if it could be improved.
#联通WO-27s HG8321R光猫改桥接
- 访问http://192.168.1.1/cu.html
- 登陆用户名
CUAdmin
,密码CUAdmin
- 进入基本设置-> 上行线路配置,记下
2_Internet_xxx
链接中的 Vlan id,我这里是10
,删除2_Internet_xxx
链接,重启光猫。 - 重复步骤1和2,以管理员登录,在基本设置-> 上行线路配置中新增 Wan 链接,模式选择桥接,选中Vlan,将 Vlan id 设置成之前记录下的 Vlan id,服务模式选 Internet
- 选择端口1进行绑定,之后用路由器接在对应端口上,使用帐号密码进行拨号就OK了。
import sys | |
from awsglue.transforms import * | |
from awsglue.utils import getResolvedOptions | |
from pyspark.context import SparkContext | |
from awsglue.context import GlueContext | |
from awsglue.job import Job | |
from pyspark.sql.functions import * | |
from awsglue.dynamicframe import DynamicFrame |
#! /bin/bash | |
# NEWLY ADDED BACKUP FUNCTIONALITY IS NOT FULLY TESTED YET, USE WITH CARE, ESPECIALLY DELETION | |
# Developed for DSM 6 - 7.0.1. Not tested on other versions. | |
# Steps to install | |
# Save this script in one of your shares | |
# Edit it according to your requirements | |
# Backup /usr/syno/share/nginx/ as follows: | |
# # cd /usr/syno/share/ | |
# # tar cvf ~/nginx.tar nginx |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
- Follow standard conventions.
- Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
- Boy scout rule. Leave the campground cleaner than you found it.
- Always find root cause. Always look for the root cause of a problem.
Common dotfiles like .bash_profile, .bashrc |