In this article, I will share some of my experience on installing NVIDIA driver and CUDA on Linux OS. Here I mainly use Ubuntu as example. Comments for CentOS/Fedora are also provided as much as I can.
# Put the following in shopify_app.authentication.py. This assumes we have a | |
# custom User model in shopify_app.models with a unique myshopify_domain | |
# attribute. The Shopify app API key and shared secret are imported from | |
# settings.py. | |
import datetime | |
import jwt | |
from datetime import timezone | |
from rest_framework import authentication | |
from rest_framework import exceptions |
Copy tools to root of project | |
Copy src of your final selected demo to lib/src | |
Open tools/gulp.config.json | |
Paste this | |
{ | |
"config": { | |
"path": { | |
"src": "../lib/src" | |
}, | |
"dist": [ |
" copy all this into a vim buffer, save it, then... | |
" source the file by typing :so % | |
" Now the vim buffer acts like a specialized application for mastering vim | |
" There are two queues, Study and Known. Depending how confident you feel | |
" about the item you are currently learning, you can move it down several | |
" positions, all the way to the end of the Study queue, or to the Known | |
" queue. | |
" type ,, (that's comma comma) |
I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.
I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real
These little programs read a spelt (EDIT: it is not "spoken") number from the | |
standard input and write the corresponding number to the standard output. Weigh | |
just 243 bytes and 227 bytes of C. (EDIT: was originally 256 and 240 bytes.) | |
The longer version handles numbers up to 999,999,999,999,999, that is, just | |
shy of 1,000 trillions. The shorter version handles numbers up to 19,999,999, | |
or 999,999,999 if your "int" is 64 bits long. The input should be correct, | |
although it will handle "a" and "and" correctly and ignore some invalid | |
words. |
/* Fibonacci Calculation using Matrices | |
* Ameer Ayoub <[email protected]> | |
* Jun 13, 2011 | |
*/ | |
#include <iostream> | |
#include <math.h> | |
using namespace std; | |
const int fib_matrix_size = 2; |
# increment_version_num.py | |
# Utility to incremement version number in drupal info files | |
# Ameer Ayoub <[email protected]> | |
import re, sys, os | |
major_v = 0 | |
minor_v = 0 | |
def inc_dv_num(s, minor = True): | |
global major_v, minor_v |
au BufRead,BufNewFile jquery.*.js set ft=javascript syntax=jquery | |
set nocompatible | |
set autoindent | |
set tabstop=2 | |
set showmatch | |
set vb t_vb= | |
set ruler | |
set nohls | |
set incsearch | |
syntax on |
from fractions import gcd | |
def euler39optimized(): | |
sum_count = [0] * 1001 | |
y = 2 | |
while y**2 <= 500: | |
for z in [x for x in range(y) if gcd(y, x) == 1]: | |
a = y**2 - z**2 | |
b = 2*y*z | |
c = y**2 + z**2 |