Skip to content

Instantly share code, notes, and snippets.

Avatar

Zhang Junda AHEADer

  • Tiktok
  • Singapore
View GitHub Profile
View 分布式系统学习资料.md

##分布式系统(Distributed System)资料


#####希望转载的朋友,你可以不用联系我.但是一定要保留原文链接,因为这个项目还在继续也在不定期更新.希望看到文章的朋友能够学到更多.

介绍:这是一篇介绍在动态网络里面实现分布式系统重构的paper.论文的作者(导师)是MIT读博的时候是做分布式系统的研究的,现在在NUS带学生,不仅仅是分布式系统,还有无线网络.如果感兴趣可以去他的主页了解.

View benchmark.md

Benchmark

This is a speed benchmark for distributed training.

Enviroment

System configuration

  • Ubuntu xxx
  • CUDA xxx
  • NCCL xxx

Framework

View send_mail.rb
#!/usr/bin/env ruby
require 'rubygems'
require 'rest_client'
def send_mail
response = RestClient.post "http://api.sendcloud.net/apiv2/mail/send",
:apiUser => 'ahelp17cow_test_rSoOwt', # 使用api_user和api_key进行验证
:apiKey => '',
:from => "help@17cow.com", # 发信人,用正确邮件地址替代
View alipay.rb
require "stripe"
# fill your secrete key below
Stripe.api_key = ""
=begin
Stripe::Charge.create({
:amount => 2000,
:currency => "usd",
:source => "tok_1AfmufFvcm7x2qiEmA1KYAgk", # obtained with Stripe.js
:description => "Charge for emily.williams@example.com"
}, {
View test.c
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <signal.h>
#include <sys/wait.h>
pid_t p1, p2;
void handler(int s)
{
kill(p1, SIGUSR1);
kill(p2, SIGUSR2);
View bad_syn_attack.c
/*It seems to have done nothing if the ip address is the outside server.
*But it works quiet well on local.
*For example,the ip address is 192.168.1.1,the router of your network.
*Then all computers can hardly connect the Internet.
*然并卵!!!
* */
#include<stdio.h>
#include<string.h> //memset
#include<sys/socket.h>
View dc.py
def dpMakeChange(coinValueList,change,mincoins,coinsused):
for cents in range(change+1):
coincount = cents
newcoin = 1
for j in [c for c in coinValueList if c <= cents]:
if mincoins[cents-j] + 1 <coincount:
coincount = mincoins[cents-j]+1
newcoin = j
mincoins[cents] = coincount
coinsused[cents] = newcoin