Skip to content

Instantly share code, notes, and snippets.

View Ir1d's full-sized avatar
💭
Looking for internship

Dejia Xu Ir1d

💭
Looking for internship
View GitHub Profile
@mimosa
mimosa / bilibili_api.lua
Last active October 5, 2018 12:23
B站 api key 规则,每3小时轮换一个 :(
function string.fh(str)
return (str:gsub('..', function (cc)
return string.char(tonumber(cc, 16))
end))
end
function sort_nums()
return ("6337393836663535306539363566613865616264646435653033363665356466"):fh()
end
bit = require('bit')
@brannondorsey
brannondorsey / pix2pix_paper_notes.md
Last active January 3, 2022 09:57
Notes on the Pix2Pix (pixel-level image-to-image translation) Arxiv paper

Image-to-Image Translation with Conditional Adversarial Networks

Notes from arXiv:1611.07004v1 [cs.CV] 21 Nov 2016

  • Euclidean distance between predicted and ground truth pixels is not a good method of judging similarity because it yields blurry images.
  • GANs learn a loss function rather than using an existing one.
  • GANs learn a loss that tries to classify if the output image is real or fake, while simultaneously training a generative model to minimize this loss.
  • Conditional GANs (cGANs) learn a mapping from observed image x and random noise vector z to y: y = f(x, z)
  • The generator G is trained to produce outputs that cannot be distinguished from "real" images by an adversarially trained discrimintor, D which is trained to do as well as possible at detecting the generator's "fakes".
  • The discriminator D, learns to classify between real and synthesized pairs. The generator learns to fool the discriminator.
  • Unlike an unconditional GAN, both th
@akiross
akiross / Convolutional Arithmetic.ipynb
Last active March 12, 2024 16:31
Few experiments on how convolution and transposed convolution (deconvolution) should work in tensorflow.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@krambertech
krambertech / Component.jsx
Created July 2, 2016 10:44
ReactJS: Input fire onChange when user stopped typing (or pressed Enter key)
import React, { Component } from 'react';
import TextField from 'components/base/TextField';
const WAIT_INTERVAL = 1000;
const ENTER_KEY = 13;
export default class TextSearch extends Component {
constructor(props) {
super();
<?php
$html = '<form><div style="width: 300px; height: 28px; background-size: 276px 28px;display: inline-block;"><input type="text" maxlength="40" name="q"> <input type="submit" value="go"></div></form>';
if(!isset($_GET['q'])) {
echo $html;
} else {
$q = $_GET['q'];
@shagunsodhani
shagunsodhani / CurriculumLearning.md
Created May 8, 2016 17:14
Notes for Curriculum Learning paper

Curriculum Learning

Introduction

  • Curriculum Learning - When training machine learning models, start with easier subtasks and gradually increase the difficulty level of the tasks.
  • Motivation comes from the observation that humans and animals seem to learn better when trained with a curriculum like a strategy.
  • Link to the paper.

Contributions of the paper

" let mapleader=","
set guifont=ubuntu\ mono\ for\ powerline:h18
syntax on
set expandtab
" set clipboard=unnamed
set number
set tabstop=4
set shiftwidth=4
set softtabstop=4
set background=dark
(by lydrainbowcat)
题意:
给定N个整数a1,a2...an,求1~n的一个排列p1~pn,最大化 abs(abs(abs(abs(a[p1]-a[p2])-a[p3])-a[p4])......-a[pn])。
N<=200, |ai|<=1000
解法:
首先,所有<=0的ai放在最后,可以全部利用起来,使答案不断变大。
于是只需考虑正的ai。找到其中最大的,放在最后,问题变为对于剩余的数做最小化的上述问题。
最小化就比较好做了,相当于把数分成两堆,使得他们的和尽量接近,可以用背包求解。
@liruqi
liruqi / block_aliyun.conf
Last active October 2, 2020 14:51
Block aliyun
/*
* https://myip.ms/view/ip_owners/179248/Aliyun_Computing_Co_Ltd.html
res = ""; for (i=0; i<41; i++) { console.log(arr[i].text); res = res + "\n" + arr[i].text; }
arr = $("table .JColResizer .row_name a")
101.132.0.0 - 101.133.255.255
101.200.0.0 - 101.201.255.255
101.37.0.0 - 101.37.255.255
106.14.0.0 - 106.15.255.255
@cjsoft
cjsoft / ac.cpp
Last active April 11, 2016 14:05
csu1216
#include <iostream>
#include <cstdio>
#include <cstring>
#define pick(a, b) ((a >> (b - 1)) & 1)
#define EPS 1e-7
using namespace std;
typedef long long ll;
int n;
struct trie {
char e;