Skip to content

Instantly share code, notes, and snippets.

View vikasTmz's full-sized avatar

Vikas Thamizharasan vikasTmz

View GitHub Profile
@vikasTmz
vikasTmz / blender_normalize.py
Last active January 1, 2023 02:18
Normalize pointcloud/mesh in Blender to fit in unit cube
'''
Transforms model to NOCS:
Scaling diagonal
Setting center of mass to volume center
Translating it to center of unit cube
'''
import bpy
import numpy as np
platform=linux64, hw=x86_64
OSL_SITE = louvre
dist_dir = dist/linux64
INSTALL_PREFIX = /gpfs/main/home/user/OpenShadingLanguage/dist/linux64
Re-run cmake no build system arguments
-- The CXX compiler identification is GNU 8.3.0
-- The C compiler identification is GNU 8.3.0
-- Check for working CXX compiler: /bin/c++
-- Check for working CXX compiler: /bin/c++ -- works
-- Detecting CXX compiler ABI info
sudo ifconfig -a
sudo ifconfig usb0 up
sudo subl /etc/network/interfaces
sudo ifup usb0
sudo service network-manager restart
# contents of /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
source /etc/network/interfaces.d/*
@vikasTmz
vikasTmz / wget_gdrive.py
Last active October 4, 2017 09:18
wget large file from google drive
import requests
###############################################################################################
# Usage: python google_drive.py drive_file_id destination_file_path
#
# Eg: Drive link: "https://drive.google.com/uc?export=download&id=0BwmD_VLjROrfTTljRDVZMFJnVWM"
# drive_file_id: "0BwmD_VLjROrfTTljRDVZMFJnVWM"
#
# credits: https://stackoverflow.com/users/1475331/user115202
###############################################################################################
human animals can be animals and to <eos> <eos> <eos> <eos> <eos> <eos> <eos> <eos> <eos> <eos> <eos> <eos> <eos> <eos>
there is a great moral difference between humans and animals <eos> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
geothermal energy can be to fossil from <eos> <eos> <eos> <eos> <eos> <eos> <eos> <eos> <eos> <eos> <eos> <eos> <eos> <eos>
geothermal wastewater contains toxic chemicals <eos> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
globalization has has ethnic <eos> <eos> <eos> <eos> <eos> <eos> <eos> <eos> <eos> <eos> <eos> <eos> <eos> <eos> <eos> <eos> <eos>
sweden s multiculturalism has resulted in violence and instability <eos> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad> <pad>
capitalism are is the not <eos> <eos> <eos> <eos> <eos> <eos> <eos> <eos> <eos> <eos> <eos> <eos> <eos> <eos> <eos> <eos>
ecotourism is unsustainable given the lack apart from in australia of an accepted system of <unk> <eos> <pad>
output/
WARNING:tensorflow:tf.op_scope(values, name, default_name) is deprecated, use tf.name_scope(name, default_name, values)
WARNING:tensorflow:tf.op_scope(values, name, default_name) is deprecated, use tf.name_scope(name, default_name, values)
WARNING:tensorflow:From run_model.py:299 in run_training.: initialize_all_variables (from tensorflow.python.ops.variables) is deprecated and will be removed after 2017-03-02.
Instructions for updating:
Use `tf.global_variables_initializer` instead.
WARNING:tensorflow:From run_model.py:310 in run_training.: __init__ (from tensorflow.python.training.summary_io) is deprecated and will be removed after 2016-11-30.
Instructions for updating:
Please switch to tf.summary.FileWriter. The interface and behavior is the same; this is just a rename.
Load file
@vikasTmz
vikasTmz / Git.sh
Created December 7, 2015 20:34
Creating a commit on a specific date and time
#!/bin/bash
echo 0 >> Git_Repo
GIT_AUTHOR_DATE=2015-01-10T12:00:00 GIT_COMMITTER_DATE=2015-01-22T12:00:00 git commit -a -m "random" > /dev/null
echo 1 >> Git_Repo
GIT_AUTHOR_DATE=2014-11-18T12:00:00 GIT_COMMITTER_DATE=2014-11-18T12:00:00 git commit -a -m "random" > /dev/null
@vikasTmz
vikasTmz / Matrix.html
Created December 7, 2015 20:24
Matrix rain animation
<!DOCTYPE HTML>
<html>
<head>
<!-- <link rel="stylesheet" type="text/css" href="matrix.css"> -->
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Julius+Sans+One">
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Lobster">
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Lobster+Two">
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Indie Flower">
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Monoton">
<title>Tesseract</title>
@vikasTmz
vikasTmz / Email.py
Created December 7, 2015 20:20
Automated email spam
import smtplib
#from email.mime.text import MIMEText
filename=raw_input('Enter filename: ')
def prompt(prompt):
return raw_input(prompt).strip()
fromaddr = prompt("From: ")
@vikasTmz
vikasTmz / Sublime-txt-kepmap(first).md
Last active December 7, 2015 20:20
sublime-keymap(user)

More to be added

[
{ "keys": ["f12"], "command": "reindent", "args": {"single_line": false} },
{ "keys": ["ctrl+shift+o"], "command": "open_recent_file", "args": {"index": 0 } },
{ "keys": ["ctrl+alt+d"], "command": "open_file", "args": {"file":
"/home/vikas/.config/sublime-text-2/Shortcuts-Best_of_Sublime"} }, { "keys": ["ctrl+alt+y"], "command": "open_file", "args": {"file":
"/home/vikas/.config/sublime-text-2/Packages/User/Default (Linux).sublime-keymap"} }
]

#Useful Packages : ###Emmet : "http://emmet.io/"