$ i=1; for f in *; do mv "$f" "$(printf "%02i%s" "$i" "${f#[0-9][0-9]}")"; ((i++)); done;
Ref:
| from random import randint | |
| CPU_FACIL = "CPU (fácil)" | |
| CPU_DIFICIL = "CPU (difícil)" | |
| jogador = ["", ""] | |
| simbolo = ["X", "O"] | |
| def mostraTelaJogo(raw_tabuleiro): | |
| print("-----------------") | |
| print("{} vs {}".format(jogador[0], jogador[1])) | |
| tabuleiro = [x if x else " " for x in raw_tabuleiro] |
| #include <bits/stdc++.h> | |
| using namespace std; | |
| #define N 1000 | |
| bool hasDigitRegex(string& s) { | |
| return regex_search(s, regex("[0-9]")); | |
| } | |
| bool hasDigitNormal(string& s) { | |
| for (int i = 0; i < (int)s.size(); i++) { |
| // http://codeforces.com/group/kZPk3ZTzR5/contest/101041/problem/D | |
| // Nome do problema: Investigating the cartel | |
| // Descrição: Quantos elementos com frequência maior que 1 no intervalo | |
| // https://www.codepit.io/#/problems/5369c356f6fa9de49e5c7fa3/view | |
| // Nome do problema: D-query | |
| // Descrição: Quantos elementos diferentes no intervalo | |
| // Resolve consultas em O((N+Q)*sqrt(N)+Q*log(Q)) | |
| #include <bits/stdc++.h> |
| // Erdős–Gallai theorem | |
| // Gives a necessary and sufficient condition for a finite sequence | |
| // of natural numbers to be the degree sequence of a simple graph. | |
| // Must be sorted in non-increasing order. | |
| // Popularidade no Facebook: https://www.urionlinejudge.com.br/judge/pt/problems/view/1462 | |
| #include<bits/stdc++.h> | |
| using namespace std; | |
| #define int long long |
| #include <bits/stdc++.h> | |
| #define _ ios_base::sync_with_stdio(0); | |
| #define endl '\n' | |
| using namespace std; | |
| #define inf ((int)1e9) | |
| typedef pair <int, int> base; |
| // http://codeforces.com/blog/entry/53170 | |
| #include <bits/stdc++.h> | |
| using namespace std; | |
| #define N 100005 | |
| #define eb emplace_back | |
| int n, u, v, q; | |
| int sz[N], in[N], rin[N], out[N], chain[N], t; | |
| vector <int> adj[N]; |
| # Extracted from https://www.kaggle.com/danbrice/keras-plot-history-full-report-and-grid-search | |
| import matplotlib.pyplot as plt | |
| def plot_history(history): | |
| loss_list = [s for s in history.history.keys() if 'loss' in s and 'val' not in s] | |
| val_loss_list = [s for s in history.history.keys() if 'loss' in s and 'val' in s] | |
| acc_list = [s for s in history.history.keys() if 'acc' in s and 'val' not in s] | |
| val_acc_list = [s for s in history.history.keys() if 'acc' in s and 'val' in s] | |
| if len(loss_list) == 0: | |
| print('Loss is missing in history') |
| #include <bits/stdc++.h> | |
| using namespace std; | |
| #if DEBUG && !ONLINE_JUDGE | |
| #define debug(args...) (Debugger()) , args | |
| class Debugger { | |
| public: | |
| Debugger(const string sep = " | ") : first(1), sep(sep) {} | |
| template <typename T> Debugger& operator , (const T& arg) { | |
| if (first) first = false; | |
| else cerr << sep; |
| syntax on | |
| set et ts=4 sw=4 sts=4 ai nu cindent | |
| noremap <c-j> 15gj | |
| noremap <c-k> 15gk | |
| ""forked" from https://github.com/naumazeredo/competitive-programming/blob/master/vimrc |
$ i=1; for f in *; do mv "$f" "$(printf "%02i%s" "$i" "${f#[0-9][0-9]}")"; ((i++)); done;
Ref: