This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from bs4 import BeautifulSoup | |
import time | |
import pandas as pd | |
import random | |
from urllib.parse import urlsplit | |
headers = requests.utils.default_headers() | |
headers.update( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
shopt -s nullglob | |
downloadFromFile(){ | |
while read -r URL <&3; do | |
wget --content-disposition $(echo $URL | tr -d '\r') -P "$1/" | |
done 3<"$2" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function acp() { | |
git add . | |
git commit -m "$*" | |
git push origin master | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://git-scm.com/docs/git-remote#Documentation/git-remote.txt-emset-urlem | |
git remote set-url --add --push origin [email protected]:Foo/bar.git | |
git remote set-url --add --push origin [email protected]:Foo/bar.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
################################################################### | |
# Script Name : get-md-images.sh | |
# Description : Download all remote images written as markdown | |
# in our files and replace URLs by local path. | |
# Author : Yann Defretin | |
# Email : [email protected] | |
################################################################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from bs4 import BeautifulSoup | |
import time | |
import pandas as pd | |
import random | |
from urllib.parse import urlsplit | |
stories_cols = ['title', 'story'] | |
csv_stories = pd.DataFrame(columns=stories_cols) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ruby:2.7.1-slim AS base | |
LABEL maintainer="Yann Defretin <[email protected]" | |
# Common dependencies | |
RUN apt-get update -qq \ | |
&& DEBIAN_FRONTEND=noninteractive apt-get install -yq \ | |
--no-install-recommends \ | |
build-essential=12.6 \ | |
gnupg2=2.2.12-1+deb10u1 \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# EditorConfig is awesome: http://EditorConfig.org | |
# https://github.com/jokeyrhyme/standard-editorconfig | |
# top-most EditorConfig file | |
root = true | |
# defaults | |
[*] | |
charset = utf-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cs50.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <ctype.h> | |
int main(int argc, string argv[]) | |
{ | |
// the user must provide one and only argument | |
if (argc != 2) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cs50.h> | |
#include <stdio.h> | |
#include <string.h> | |
// Max number of candidates | |
#define MAX 9 | |
// Candidates have name and vote count | |
typedef struct | |
{ |
OlderNewer