Skip to content

Instantly share code, notes, and snippets.

View dejanbatanjac's full-sized avatar
🏠

Dejan Batanjac dejanbatanjac

🏠
View GitHub Profile
https://google.com
https://google2.com
https://msn.com
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dejanbatanjac
dejanbatanjac / Sum.ipynb
Created November 19, 2019 09:42
Sum.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dejanbatanjac
dejanbatanjac / Freeze layer.ipynb
Created November 18, 2019 21:06
Freezingn layers (parameters) some ideas
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dejanbatanjac
dejanbatanjac / Freeze layer.ipynb
Last active November 19, 2019 09:42
Sum.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dejanbatanjac
dejanbatanjac / ralamb.py
Created August 28, 2019 19:04 — forked from redknightlois/ralamb.py
Ralamb optimizer (RAdam + LARS trick)
class Ralamb(Optimizer):
def __init__(self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-8, weight_decay=0):
defaults = dict(lr=lr, betas=betas, eps=eps, weight_decay=weight_decay)
self.buffer = [[None, None, None] for ind in range(10)]
super(Ralamb, self).__init__(params, defaults)
def __setstate__(self, state):
super(Ralamb, self).__setstate__(state)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
$con = file_get_contents('https://pixabay.com/get/e833b2062df6093ed95c4518b74f4791e27ee4d004b0154696f5c070a4eeb2_640.jpg');
if(strlen($con)>0){
echo "hurray, we can get " . strlen($con) . " bytes from https://pixabay.com/get/e833b2062df6093ed95c4518b74f4791e27ee4d004b0154696f5c070a4eeb2_640.jpg";
}else{
echo "file_get_contents() PHP not working, we can get 0 (read:zero) bytes from https://pixabay.com/get/e833b2062df6093ed95c4518b74f4791e27ee4d004b0154696f5c070a4eeb2_640.jpg. This means we cannot read files";
}
@dejanbatanjac
dejanbatanjac / pario.no
Created August 10, 2018 10:51
rewrite post slugs
<?php
// change this this to strip old slugs if needed:
//update wp_posts set post_name = '' where guid like '%.asp'
set_time_limit(20000);
/** Loads the WordPress Environment and Template, allowing wp functions like the_title() */
define('WP_USE_THEMES', false);
require('./wp-blog-header.php');
function bleach($which)
@dejanbatanjac
dejanbatanjac / react with the timer
Created January 29, 2017 11:53
react with the timer
import React from "react";
import ReactDOM from "react-dom";
class Footer extends React.Component{
constructor(props){
super(props);
this.state={ time: 1 }
//this.updater = this.updater.bind(this);
this.handleClick = this.handleClick.bind(this);