I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
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"?> | |
<yahoo-weather-codes> | |
<code number="0" description="tornado"/> | |
<code number="1" description="tropical storm"/> | |
<code number="2" description="hurricane"/> | |
<code number="3" description="severe thunderstorms"/> | |
<code number="4" description="thunderstorms"/> | |
<code number="5" description="mixed rain and snow"/> | |
<code number="6" description="mixed rain and sleet"/> | |
<code number="7" description="mixed snow and sleet"/> |
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
CXX = g++ | |
CXXFLAGS = $(shell mapnik-config --cflags) $(shell Magick++-config --cxxflags --cppflags) -Wall | |
LDFLAGS = $(shell mapnik-config --libs --dep-libs --ldflags) $(shell Magick++-config --ldflags --libs) -lboost_program_options -lpthread | |
OBJ = mapnik_osm_metatiles.o | |
BIN = render_mapnik_osm_metatiles | |
all : $(BIN) |
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
################################################################################ | |
# Calculates the maximum likelihood estimates of a logistic regression model | |
# Slopes are constrained to non-negative values | |
# | |
# fmla : model formula | |
# x : a [n x p] dataframe with the data. Factors should be coded accordingly | |
# | |
# OUTPUT | |
# beta : the estimated regression coefficients | |
# vcov : the variane-covariance matrix |
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 scipy as sp | |
from scipy import optimize as opt | |
def nnlr(X, y, C): | |
""" | |
Non-negative Logistic Regression with L2 regularizer | |
""" | |
def lr_cost(X, y, theta, C): | |
m = len(y) | |
return (1./m) * (sp.dot(-y, sp.log(sigmoid(sp.dot(X, theta)))) \ |
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
@echo off | |
::需要设置的网络,一般为“本地连接”或者“无线网络连接” | |
set name="无线网络连接" | |
::请根据您的参数修改以下数据 | |
::设置 IP地址 | |
set ipaddress=18.1.16.169 | |
::设置 子掩码 | |
set mask=255.255.252.0 | |
::设置 网关 | |
set gateway=18.1.19.254 |
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
#include <wb.h> | |
// Check ec2-174-129-21-232.compute-1.amazonaws.com:8080/mp/6 for more information | |
#define wbCheck(stmt) do { \ | |
cudaError_t err = stmt; \ | |
if (err != cudaSuccess) { \ | |
wbLog(ERROR, "Failed to run stmt ", #stmt); \ | |
return -1; \ |
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
Nokia : | |
http://{s}.maptile.maps.svc.ovi.com/maptiler/v2/maptile/newest/normal.day/{z}/{x}/{y}/256/png8 | |
MapQuest : | |
http://a.tile.openstreetmap.org/{z}/{x}/{y}.jpg | |
http://otile1.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg | |
http://otile1.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg |
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
/** | |
* @brief Image enchancement and Hough transform example | |
* @author Eugene Khvedchenya <ekhvedchenya@gmail.com> | |
* @copyright computer-vision-talks.com/articles/how-to-detect-circles-in-noisy-image/ | |
*/ | |
#include <opencv2/opencv.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
/** | |
* OpenCV video streaming over TCP/IP | |
* Client: Receives video from server and display it | |
* by Steve Tuenkam | |
*/ | |
#include "opencv2/opencv.hpp" | |
#include <sys/socket.h> | |
#include <arpa/inet.h> | |
#include <unistd.h> |
OlderNewer