Download the latest Nvidia driver on http://www.nvidia.com/drivers
Update the kernel to the latest version
$ yum update
Change to runlevel 3 - multi user mode for the next reboot
package base; | |
import java.util.List; | |
public abstract class AbstractBase { | |
abstract protected List getChildren(); | |
} |
// | |
// _oo0oo_ | |
// o8888888o | |
// 88" . "88 | |
// (| -_- |) | |
// 0\ = /0 | |
// ___/`---'\___ | |
// .' \\| |// '. | |
// / \\||| : |||// \ | |
// / _||||| -:- |||||- \ |
/* | |
* 逐行读取文件 | |
* 分段读取文件 | |
*/ | |
var fs = require('fs'); | |
//每段读取的长度 | |
//@param inputFile{filepath} | |
//@param onEnd{func} 所有内容读完了 | |
module.exports = function(inputFile, onEnd){ | |
var sLength = 1024; |
curl -XPUT 'http://localhost:9200/us/user/1?pretty=1' -d ' | |
{ | |
"email" : "[email protected]", | |
"name" : "John Smith", | |
"username" : "@john" | |
} | |
' | |
curl -XPUT 'http://localhost:9200/gb/user/2?pretty=1' -d ' | |
{ |
#!/bin/bash | |
current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,') | |
if [ "$current_branch" = "master" ] || [ "$current_branch" = "develop" ]; then | |
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | |
echo "" | |
echo "禁止直接向master或develop分支提交代码!" | |
echo "" | |
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" | |
exit 1 |
Download the latest Nvidia driver on http://www.nvidia.com/drivers
Update the kernel to the latest version
$ yum update
Change to runlevel 3 - multi user mode for the next reboot
# ### Interface cuSOLVER PyCUDA | |
from __future__ import print_function | |
import pycuda.gpuarray as gpuarray | |
import pycuda.driver as cuda | |
import pycuda.autoinit | |
import numpy as np | |
import scipy.sparse as sp | |
import ctypes |
#! /usr/bin/env python | |
# | |
# Mixpanel, Inc. -- http://mixpanel.com/ | |
# | |
# Python API client library to consume mixpanel.com analytics data. | |
# | |
# Copyright 2010-2013 Mixpanel, Inc | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. |
#!/usr/bin/env python3 | |
# | |
# Query AWS Athena using SQL | |
# Copyright (c) Alexey Baikov <sysboss[at]mail.ru> | |
# | |
# This snippet is a basic example to query Athen and load the results | |
# to a variable. | |
# | |
# Requirements: | |
# > pip3 install boto3 botocore retrying |
from pyspark.sql.types import * | |
from pyspark.sql.functions import * | |
#Flatten array of structs and structs | |
def flatten(df): | |
# compute Complex Fields (Lists and Structs) in Schema | |
complex_fields = dict([(field.name, field.dataType) | |
for field in df.schema.fields | |
if type(field.dataType) == ArrayType or type(field.dataType) == StructType]) | |
while len(complex_fields)!=0: |