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 ffmpeg | |
( | |
ffmpeg | |
.input('D:\\P\\ffmpeg-20190702-231d0c8-win64-static\\bin\\xiaoice_360p.mp4', re=None) | |
.audio | |
.filter('aderivative') | |
.output('rtmp://localhost/live/test', f='flv') | |
.run() | |
) |
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 argparse | |
# config parser | |
parser = argparse.ArgumentParser() | |
parser.add_argument("mesh") | |
parser.add_argument("-f", "--framefield", default="") | |
parser.add_argument("-n", "--quadnum", type=int, default=500) |
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
<ServerManagerConfiguration> | |
<ProxyGroup name="filters"> | |
<!-- ================================================================== --> | |
<SourceProxy name="DistancePolyDataFilter" class="vtkDistancePolyDataFilter" label="DistancePolyDataFilter"> | |
<Documentation | |
long_help="Computes the signed distance from one vtkPolyData to another." | |
short_help="vtkDistancePolyDataFilter."> | |
</Documentation> | |
<InputProperty |
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
%% copy from ocw.mit.edu | |
%% random matrix theory | |
%n=20; s=30000; d=.05; %matrix size, samples, sample dist | |
n=10; s=1000; d=.05; % s=30000 is too slow | |
e=[]; %gather up eigenvalues | |
im=1; %imaginary(1) or real(0) | |
for i=1:s, | |
a=randn(n)+im*sqrt(-1)*randn(n);a=(a+a')/(2*sqrt(2*n*(im+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
%% f2d.m | |
function f2d(A) | |
x=0:0.05:3*pi; | |
[X, Y]=meshgrid(x); | |
F=zeros(size(X)); | |
min_val = inf; | |
min_coord = [0 0]; | |
max_val = -inf; | |
max_coord = [0 0]; |
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 <iostream> | |
#include <exception> | |
#include <fstream> | |
#include <string> | |
using namespace std; | |
int main(int argc, char const *argv[]) { | |
if (argc < 2) { | |
cout << "Usage: " << argv[0] << " filename.txt" << endl; | |
return 0; |
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 keyboard | |
import time | |
from tkinter import * | |
class Clock(Tk): | |
def __init__(self, master=None): | |
Tk.__init__(self, master) | |
self.wm_attributes("-topmost", 1) | |
self.createWidgets() |
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
find . -name "*.zip" | while read filename; do unzip -o -d "`dirname "$filename"`" "$filename"; done; |
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
sed -e 's,^,^,' -e 's,$,$,' filelist > newfilelist | |
cd your_directory | |
ls | egrep -vf newfilelist | xargs -n 1 echo rm > rmscript | |
#If the files have spaces in their name (if the files have the " in the name that will not works) : | |
ls | egrep -vf newfilelist | sed 's,^\(.*\)$,rm "\1",' > rmscript |
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
//!Makefile, replace $USER with your name | |
//INC=-I/home/$USER/libs/libigl/include -I/home/$USER/libs/eigen3 | |
//all: | |
// g++ -std=c++11 $(INC) voxel.cpp -o voxel.out | |
#include <igl/bounding_box.h> | |
#include <igl/readOBJ.h> | |
#include <igl/writeOFF.h> | |
#include <string> | |
#include <vector> |