This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
#include <bits/stdc++.h> | |
#include <unistd.h> | |
#include <sys/stat.h> | |
using namespace std; | |
#include "mpi.h" | |
#define BLOCK_LOW(id,p,n) ((id)*(n)/(p)) | |
#define BLOCK_HIGH(id,p,n) (BLOCK_LOW((id)+1,p,n)-1) | |
#define BLOCK_SIZE(id,p,n) (BLOCK_HIGH(id,p,n)-BLOCK_LOW(id,p,n)+1) |
import requests | |
# 查詢參數 | |
my_params = { | |
'current_sem': '107-2', | |
'cstype': 1, | |
'alltime': 'yes', | |
'allproced':'yes', | |
'allsel':'yes', | |
'page_cnt':100, |
import os | |
import sys | |
import torch | |
import torch.nn as nn | |
import torch.utils.model_zoo as model_zoo | |
class VGG(nn.Module): | |
def __init__(self, features, num_classes = 7, init_weights = True): | |
super(VGG, self).__init__() | |
self.features = features |
## | |
# path:/etc/nginx/sites-available/default | |
# You should look at the following URL's in order to grasp a solid understanding | |
# of Nginx configuration files in order to fully unleash the power of Nginx. | |
# https://www.nginx.com/resources/wiki/start/ | |
# https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/ | |
# https://wiki.debian.org/Nginx/DirectoryStructure | |
# | |
# In most cases, administrators will remove this file from sites-enabled/ and | |
# leave it as reference inside of sites-available where it will continue to be |
class foo{ | |
constructor(){ | |
this.name = 'foo'; | |
} | |
sayhi(){ | |
console.log('hi'); | |
} | |
} | |
let target = new foo(); | |
let obj = {x:1,y:2,z:3,speed:4}; |
String.prototype.toJadenCase = function () { | |
// console.log(this.valueOf()); | |
let str = this.valueOf(); | |
str = str.replace(/^([a-z])/g,(u)=>u.toUpperCase()); | |
str = str.replace(/\s([a-z])/g,(u)=>u.toUpperCase()); | |
return str; | |
//... | |
}; |
Author: Hanmo Ou 2018/1/20 | |
The format of an AAG file: | |
The file is used to describe a logical circuit. | |
Each gate is assigned a gate number, while gate number 0 is the constant 0 gate by default. | |
The first line is the header, which contains information of the circuit, including number of each type of gates, and the maximum gate number. | |
The header is written in the below format : | |
aag M I L O A |
var fs = require('fs'); | |
function ptnGen(){ | |
const COUNT = 100; | |
for(let i = 1 ; i <= 15 ; i++){ | |
let output = ``; | |
let x = String(i); | |
if(i < 10) | |
x = `0` + i; | |
let ctx = fs.readFileSync(`./tests.fraig/sim${x}.aag`,'utf8'); |
#opt01.aag | |
aag 2 1 0 1 1 | |
2 | |
4 | |
4 1 2 | |
c | |
PO(3) = PI(1) | |
#opt02.aag | |
aag 2 1 0 1 1 |