This project has moved to https://github.com/lovasoa/dezoom.sh
This file contains 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 random | |
import glob | |
import os | |
import shutil | |
def copyfiles(fil, root_dir): | |
basename = os.path.basename(fil) | |
filename = os.path.splitext(basename)[0] |
This file contains 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 PIL import Image, ImageDraw | |
def yolo_to_xml_bbox(bbox, w, h): | |
# x_center, y_center width heigth | |
w_half_len = (bbox[2] * w) / 2 | |
h_half_len = (bbox[3] * h) / 2 | |
xmin = int((bbox[0] * w) - w_half_len) | |
ymin = int((bbox[1] * h) - h_half_len) | |
xmax = int((bbox[0] * w) + w_half_len) |
This file contains 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 xml.etree.ElementTree as ET | |
import glob | |
import os | |
import json | |
def xml_to_yolo_bbox(bbox, w, h): | |
# xmin, ymin, xmax, ymax | |
x_center = ((bbox[2] + bbox[0]) / 2) / w | |
y_center = ((bbox[3] + bbox[1]) / 2) / h |
This file contains 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 | |
// Register the meta field for the rest api | |
// https://stackoverflow.com/questions/56460557/how-to-include-meta-fields-in-wordpress-api-post#answer-56508996 | |
add_action( 'rest_api_init', 'register_postviews_meta_fields'); | |
function register_postviews_meta_fields(){ | |
register_meta( 'post', 'wpb_post_views_count', array( | |
'type' => 'integer', | |
'description' => 'Post views', | |
'single' => true, |
This file contains 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 | |
/** | |
* Check the orderby param for the particular REST API for hte custom post type. | |
* If it is set to a particular meta_ket, then set the orderby and meta_key query args/ | |
* @link https://www.timrosswebdevelopment.com/wordpress-rest-api-order-by-meta_value/ | |
*/ | |
function filter_rest_accommodation_query($query_vars, $request) { | |
$orderby = $request->get_param('orderby'); | |
if (isset($orderby) && $orderby === 'number_of_beds') { | |
$query_vars["orderby"] = "meta_value_num"; |
This file contains 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
#https://www.google.com/search?q=smbios.reflecthost&oq=smbios.r&aqs=chrome.0.0j69i57j0l4.2850j0j7&sourceid=chrome&ie=UTF-8 | smbios.reflecthost - Google Search | |
#http://www.bitcon.be/how-to-install-an-hp-branded-windows-os-as-a-virtual-server/ | How to install an HP branded Windows OS as a virtual server | BITCON - IT consultants | |
#https://communities.vmware.com/thread/162241?tstart=0 | This system is not supported platform |VMware Communities | |
#https://superuser.com/questions/199906/how-to-edit-bios-information-for-a-virtual-machine-in-vmware | How to edit BIOS information for a virtual machine in VMWare? - Super User | |
#http://www.insanelymac.com/forum/topic/292170-how-to-spoof-real-mac-in-vmware/ | How to spoof real Mac in VMware - Multi-booting and Virtualisation - InsanelyMac Forum | |
Method 1: edit VMX file for the specific VM | |
#add this line | |
SMBIOS.reflectHost = TRUE |
This file contains 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 | |
$db = @mysql_connect('localhost', 'root', 'password') or die(mysql_error()); | |
mysql_select_db('test', $db) or die(mysql_error()); | |
$qry_qbank = mysql_query("SELECT * FROM at_qa_dump limit 100") or die(mysql_error()); | |
//require('wp-blog-header.php'); | |
while ($row = mysql_fetch_array($qry_qbank)) { | |
$qno = $row['ID']; | |
$question_title = $row['Question_Title']; | |
$question_content = $row['Question_Content']; |
This file contains 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
package com.codeoverdrive.util; | |
import android.graphics.Typeface; | |
import android.text.SpannableString; | |
import android.text.SpannableStringBuilder; | |
import android.text.TextPaint; | |
import android.text.style.StyleSpan; | |
import java.util.ArrayList; | |
import java.util.List; |
This file contains 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
# Apache Server Config | MIT License | |
# https://gist.github.com/bhubbard/6082577 | |
# Modified from https://github.com/h5bp/server-configs-apaches | |
# ############################################################################## | |
# # Default WordPress # | |
# ############################################################################## | |
# http://randomtype.ca/blog/the-wordpress-htaccess-file-explained/ | |
# BEGIN WordPress |
NewerOlder