Skip to content

Instantly share code, notes, and snippets.

View xjtu-blacksmith's full-sized avatar
😶
Long way to go ...

Jerry You xjtu-blacksmith

😶
Long way to go ...
View GitHub Profile
@user01
user01 / torch.xor.py
Created April 1, 2017 01:53
Toy XOR network with pyTorch
import torch
from torch.autograd import Variable
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
EPOCHS_TO_TRAIN = 50000
class Net(nn.Module):
@sshaw
sshaw / greeting.liquid
Last active October 3, 2019 09:37
"Random" Greeting in a Shopify Liquid Template
{% assign name = "sshaw" %}
{% assign greetings = "Hi %s!|Oi %s!|¡Hola %s!" | split: "|" %}
{% assign index = "now" | date: "%s" | modulo: greetings.size %}
{{ greetings[index] | replace_first: '%s', name }}
@vovan888
vovan888 / gist:9436638
Last active June 21, 2022 02:15
Split mediawiki xml export file to separate pages - one file for every page.
#!/usr/bin/perl -w
# output files can be converted to other wiki formats with pandoc:
# find . -type f -exec pandoc -f mediawiki -t markdown_github -o "{}".mark "{}" \;
use strict;
use Parse::MediaWikiDump;
my $file = shift(@ARGV) or die "must specify a Mediawiki dump file";
my $pages = Parse::MediaWikiDump::Pages->new($file);
@rxaviers
rxaviers / gist:7360908
Last active April 24, 2024 10:27
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: