Skip to content

Instantly share code, notes, and snippets.

View amrit3701's full-sized avatar
🏠
Working from home

Amritpal Singh amrit3701

🏠
Working from home
View GitHub Profile
@amrit3701
amrit3701 / comparision_of_UUID.md
Created March 17, 2019 08:31
Comparison of reading IfcGloballyUniqueId from IFC in different OS

Below is the comparison of reading IfcGloballyUniqueId from IFC file by using ifcopenshell (Python2.7) in different OS.

Download IFC file: GND_TDP202.ifc

On Ubuntu:

root@98a1aa8ab4a9:/share# lsb_release -a
No LSB modules are available.
@amrit3701
amrit3701 / README.md
Last active June 12, 2020 16:23
Create an SVG file of cube with its dimensions using FreeCAD

This example shows that how to produce SVG file of cube with its dimensions in FreeCAD (compiled without GUI).

Output SVG file: screenshot

@amrit3701
amrit3701 / .vimrc
Last active September 29, 2018 15:20
My custom .vimrc.
" vim-bootstrap b0a75e4
"*****************************************************************************
"" Vim-PLug core
"*****************************************************************************
if has('vim_starting')
set nocompatible " Be iMproved
endif
let vimplug_exists=expand('~/.vim/autoload/plug.vim')
@amrit3701
amrit3701 / mahankosh.py
Last active March 14, 2018 15:41
Convert Mahankosh.txt to dictionary format.
"""Translate Manhankosh.txt to dictionary."""
# Download mahankosh_data.txt: https://drive.google.com/file/d/19nF3Z6OfdDLw2V3CoQ3KOVx7tm-UjYcN/view
with open('mahankosh_data.txt') as f:
data = f.readlines()
mahankosh_dic = convert_to_dict(data)
def convert_to_dict(data):
"""Get Mahankosh data in dictionary format."""
dic = {}
@amrit3701
amrit3701 / getLikes.py
Created February 4, 2018 11:10
This script calculates winners data of sscsldh (LuvLdh) Facebook page.
from decouple import config
import facebook
import requests
import re
import json
def getMaximiumLikes(api, posts):
likesdic = {}
usernamedic = {}
for post in posts:
@amrit3701
amrit3701 / GeoLocation.js
Last active January 22, 2018 17:52
Get current user location
function getLocation() {
navigator.geolocation.getCurrentPosition(showPosition);
}
function showPosition(position) {
console.log("Latitude: " + position.coords.latitude +
"<br>Longitude: " + position.coords.longitude);
}
getLocation();
@amrit3701
amrit3701 / code
Created December 12, 2015 18:32
code of amritpal singh
<html>
<body>
<h1>amritpal singh</h1>
</body>
</html>