This file contains hidden or 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
Wiphy phy3 | |
wiphy index: 3 | |
max # scan SSIDs: 4 | |
max scan IEs length: 482 bytes | |
max # sched scan SSIDs: 10 | |
max # match sets: 16 | |
Retry short limit: 7 | |
Retry long limit: 4 | |
Coverage class: 0 (up to 0m) | |
Device supports AP-side u-APSD. |
This file contains hidden or 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 torch | |
import warnings | |
class BiCGSTAB(): | |
""" | |
This is a pytorch implementation of BiCGSTAB or BCGSTAB, a stable version | |
of the CGD method, published first by Van Der Vrost. | |
For solving ``Ax = b`` system. |
This file contains hidden or 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 bpy | |
# make mesh | |
vertices = [(0, 0, 0), (1, 0, 0), (0, 1, 0), (0, 0, 1)] | |
edges = [] | |
faces = [(0, 1, 2), (1, 2, 3), (2, 3, 1), (3, 1, 0)] | |
new_mesh = bpy.data.meshes.new('new_mesh') | |
new_mesh.from_pydata(vertices, edges, faces) | |
new_mesh.update() |
This file contains hidden or 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 occ, mesh, utils | |
verts, faces, grps = mesh.from_stp('models/cylinder.stp') | |
from pytorch3d import ops, structures, loss as loss3d | |
from torch import Tensor, optim | |
V, F = Tensor(verts).to('cuda'), Tensor(faces).long().to('cuda') | |
G = { 'Cylinder': [], 'Plane': [] } | |
for typ, face in grps: | |
if not typ in G: | |
G[typ] = [] |
This file contains hidden or 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 <vector> | |
using namespace std; | |
struct segment_t { | |
int shape; | |
double lower, upper; | |
}; | |
inline auto operator<(const segment_t &a, const segment_t &b) { |
This file contains hidden or 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 os | |
import tempfile | |
import numpy as np | |
import math | |
from skopt import gp_minimize | |
exe = r"D:\Program Files (x86)\CST STUDIO SUITE 2019\AMD64\CST DESIGN ENVIRONMENT_AMD64.exe" | |
cst = r"C:\Users\oxyfl\Downloads\三频.cst" | |
ret_tree_path = '1D Results\S-Parameters\S1,1' |
This file contains hidden or 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
from typing import List, Tuple | |
from skrf import Network, Circuit, DefinedGammaZ0 | |
from time import perf_counter | |
import numpy as np | |
import torch | |
n = Network('test/touchstone/dipole-x2.s2p') | |
f = n.frequency | |
z = DefinedGammaZ0(f, 50) |
This file contains hidden or 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
# https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-ubuntu-16-04 | |
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE | |
echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf && systctl -p |
This file contains hidden or 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
interface Point { | |
x: number | |
y: number | |
} | |
type Ring = Point[] | |
interface Joint { | |
i: number | |
j: number | |
k: number | |
p: Point |
This file contains hidden or 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 ipfs from 'ipfs' | |
function $e<K extends keyof HTMLElementTagNameMap>(tag: K, props = { } as { [key: string]: any }, children = [] as any[]) { | |
const e = document.createElement(tag) | |
for (const [key, val] of Object.entries(props)) { | |
(e as any)[key] = val | |
} | |
for (const [key, val] of Object.entries(props.style || { })) { | |
(e.style as any)[key] = val | |
} |
NewerOlder