Skip to content

Instantly share code, notes, and snippets.

View Cubbee's full-sized avatar
👾

Denis Sokolov Cubbee

👾
View GitHub Profile
class ImageView extends Component {
onSelect = (keys, event) => {
console.log('Trigger Select', keys, event);
};
onExpand = () => {
console.log('Trigger Expand');
};
render() {
class DirectoryList extends React.Component {
constructor(props) {
super(props);
this.state = {dirContents: []};
this.getDirectoryListing('/home/tux');
}
getDirectoryListing(dir) {
fetch('http://uhost-04:5000/api/get_directory_tree',
{method: 'POST', body: JSON.stringify({root: dir}), // данные могут быть 'строкой' или {объектом}!
layer {
name: "data"
type: "Python"
top: "data"
top: "label"
python_param {
module: "voc_layers"
layer: "CocoSegDataLayer"
param_str: "{\'coco_dir\': \'/home/sokolov/uhost-01/media/DiskG/databases/coco/\', \'split\': \'train\', \'mean\': (104.00699, 116.66877, 122.67892), \'seed\': 1337}"
}
@Cubbee
Cubbee / FileCounter
Last active August 29, 2015 14:12
get number of files in subdirectories of $my_path
$my_path = "X:\"
Get-ChildItem $my_path | Where {$_.PSIsContainer} |
Foreach {
$filepath = $my_path + "\" + $_ + "\*"
$filetype = "*.jpg" , "*.jpeg", "*.png", "*.bmp", "*.gif"
$file_count = (Get-ChildItem -path $filepath -Include $filetype -recurse | where-object {-not ($_.PSIsContainer)}).Count
Write-Host $_, $file_count
}
http://softlayer-ams.dl.sourceforge.net/project/winpython/WinPython_2.7/2.7.6.4/WinPython-64bit-2.7.6.4.exe