➜ openssl dgst -sha256 openssl-1.1.1.tar.gz
SHA256(openssl-1.1.1.tar.gz)= 2836875a0f89c03d0fdf483941512613a50cfb421d6fd94b9f41d7279d586a3d
➜ cat openssl-1.1.1.tar.gz.sha256
2836875a0f89c03d0fdf483941512613a50cfb421d6fd94b9f41d7279d586a3d
| #!/usr/bin/env bash | |
| filename='reqs.txt' | |
| echo Start | |
| while read p; do | |
| title=$(echo "$p" | cut -d, -f1) | |
| body=$(echo "$p" | cut -d, -f2) | |
| gh issue create --title "$title" --body "$body" --label "enhancement" | |
| done < $filename |
| public static void progressPercentage(int remain, int total) { | |
| if (remain > total) { | |
| throw new IllegalArgumentException(); | |
| } | |
| int maxBareSize = 10; // 10unit for 100% | |
| int remainProcent = ((100 * remain) / total) / maxBareSize; | |
| char defaultChar = '-'; | |
| String icon = "*"; | |
| String bare = new String(new char[maxBareSize]).replace('\0', defaultChar) + "]"; | |
| StringBuilder bareDone = new StringBuilder(); |
| import torch | |
| from torch import nn | |
| from torch.autograd import Variable | |
| import torch.nn.functional as F | |
| import torch.optim as optim | |
| # toy feed-forward net | |
| class Net(nn.Module): | |
| def __init__(self): |
| class UnionFind: | |
| """Weighted quick-union with path compression and connected components. | |
| The original Java implementation is introduced at | |
| https://www.cs.princeton.edu/~rs/AlgsDS07/01UnionFind.pdf | |
| >>> uf = UnionFind(10) | |
| >>> for (p, q) in [(3, 4), (4, 9), (8, 0), (2, 3), (5, 6), (5, 9), | |
| ... (7, 3), (4, 8), (6, 1)]: | |
| ... uf.union(p, q) |
| # If you come from bash you might have to change your $PATH. | |
| export PATH=$HOME/bin:/usr/local/bin:$PATH | |
| # Path to your oh-my-zsh installation. | |
| export ZSH="/Users/cicorias/.oh-my-zsh" | |
| # Set name of the theme to load --- if set to "random", it will | |
| # load a random theme each time oh-my-zsh is loaded, in which case, | |
| # to know which specific one was loaded, run: echo $RANDOM_THEME | |
| # See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes |
| {% load static %} | |
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
| <title> | |
| {% block title %} | |
| {% endblock %} |
| git config --unset core.filemode | |
| git config --global core.filemode false |
| git config --unset core.filemode | |
| git config --global core.filemode false |
| from django.db import models | |
| class BakedGood(models.Model): | |
| name = models.CharField(max_length=64) | |
| desc = models.CharField(max_length=256) | |
| good_type = models.TextChoices('type', 'BAGEL BREAD COOKIE CAKE PRETZEL') | |
| sTypes = models.CharField(blank=True, choices=good_type.choices, max_length=20) | |
| price = models.DecimalField(max_digits=6, decimal_places=2) | |
| recipe = models.TextField() |
➜ openssl dgst -sha256 openssl-1.1.1.tar.gz
SHA256(openssl-1.1.1.tar.gz)= 2836875a0f89c03d0fdf483941512613a50cfb421d6fd94b9f41d7279d586a3d
➜ cat openssl-1.1.1.tar.gz.sha256
2836875a0f89c03d0fdf483941512613a50cfb421d6fd94b9f41d7279d586a3d