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
## ---- 1. Backend ---- ## | |
// Adding a custom Meta container to admin products pages | |
add_action('add_meta_boxes', 'create_custom_meta_box'); | |
if (!function_exists('create_custom_meta_box')) { | |
function create_custom_meta_box() | |
{ | |
add_meta_box( | |
'custom_product_meta_box', | |
__(' Product Main URL <em>(orginal)</em>', 'cmb'), |
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
## ---- 1. Backend ---- ## | |
// Adding a custom Meta container to admin products pages | |
add_action('add_meta_boxes', 'create_custom_meta_box'); | |
if (!function_exists('create_custom_meta_box')) { | |
function create_custom_meta_box() | |
{ | |
add_meta_box( | |
'custom_product_meta_box', | |
__(' Product Main URL <em>(orginal)</em>', 'cmb'), |
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
""" | |
Author: A cup of Tea | |
Description: Algorithm about how BD government is going to find Abrar Murderer | |
""" | |
def findGuiltyToAbrarMurder(): | |
if(guilty == activistOfBCL): | |
victim = activistOfShibir | |
silenceLikeHell() | |
useBruteForceToRemoveMovement(BCLGang, BDPolice) |
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 google.colab import files | |
files.upload() #this will prompt you to upload the kaggle.json | |
!pip install -q kaggle | |
!mkdir -p ~/.kaggle | |
!cp kaggle.json ~/.kaggle/ | |
!ls ~/.kaggle | |
!chmod 600 /root/.kaggle/kaggle.json # set permission | |
#than copy the kaggle API | |
!kaggle datasets download -d sohaibanwaar1203/prepossessed-arrays-of-binary-data | |
#not necessary |
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
## Upgrading ubuntu from 16.04LTS to 18.04LTS using command line | |
# first update previous version | |
sudo apt update && sudo apt upgrade && sudo apt dist-upgrade && sudo apt autoremove | |
# update manager core | |
sudo apt install update-manager-core | |
# make prompt=lts if not in following file | |
sudo nano /etc/update-manager/release-upgrades |
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
<?php // Do not include this if already open! | |
/** | |
* Code goes in theme functions.php. | |
*/ | |
add_filter( 'woocommerce_product_subcategories_args', 'custom_woocommerce_product_subcategories_args' ); | |
function custom_woocommerce_product_subcategories_args( $args ) { | |
$args['exclude'] = get_option( 'default_product_cat' ); | |
return $args; |
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
#!/bin/bash | |
# This gist contains commands used in my everyday life | |
### compressing a file | |
tar -czvf name-of-archive.tar.gz /path/to/directory-or-file | |
# -c: create an archive. | |
# -z: compress the archive with gzip. | |
# -v: verbosity | |
# -f: allows you to specify the filename of the archive |
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
#!/bin/bash | |
# Instructions for installing necessary packages for running machine learning projects in Ubuntu machine | |
# first update and upgrade your system | |
sudo apt-get update | |
sudo apt-get install build-essential cmake g++ gfortran git pkg-config python-dev python3-tk software-properties-common wget | |
# install pip3 for working on python 3 | |
sudo apt-get install python3-pip | |
pip3 install --upgrade pip |
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
#!/bin/bash | |
## This gist is a step by step instructions to install cuda v8.0 and cudnn 6.0 on ubuntu 16.04 | |
## official guide: http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html | |
### steps #### | |
# verify the system has a cuda-capable gpu | |
# verify the system has gcc installed | |
# download and install the nvidia cuda toolkit | |
# download cudnn | |
# setup environment variables |