This file contains hidden or 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
curl --silent "https://api.github.com/repos/goreleaser/goreleaser/releases/latest" | jq -r '.assets[] | select (.name|test("amd64.deb")) | .browser_download_url' | |
curl --silent "https://api.github.com/repos/goreleaser/goreleaser/releases/latest" | jq -r '.assets[] | select (.name|test("Linux_x86_64.tar.gz")) | .browser_download_url' |
This file contains hidden or 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 argparse | |
import json | |
import copy | |
import sys | |
import os.path | |
import traceback | |
def parse_args(): | |
parser = argparse.ArgumentParser( |
This file contains hidden or 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
package main | |
import ( | |
"net/http" | |
"runtime" | |
) | |
This file contains hidden or 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/sh | |
# clear containers | |
docker rm -f $(docker ps -a -q) | |
# clear images | |
docker rmi -f $(docker images -a -q) | |
# clear volumes: | |
docker volume rm $(docker volume ls -q) |
This file contains hidden or 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
package main | |
import ( | |
"flag" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"os" | |
"os/signal" | |
"runtime" |
This file contains hidden or 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 <fstream> | |
#include <string> | |
int | |
main() | |
{ | |
std::string file = "/tmp/a_file.txt"; | |
std::ofstream dst(file, std::ios::trunc); | |
dst << "Hello, world!" << std::endl; |
This file contains hidden or 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
// g++ -Wall -Wextra -std=c++11 fakeprg.cpp -o /tmp/fakeprg | |
#include <iostream> | |
#include <fstream> | |
#include <string> | |
#include <cstdlib> | |
#include <ctime> | |
#include <climits> | |
#include <unistd.h> | |
#include <signal.h> |
This file contains hidden or 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 --debugger | |
set -e | |
BRANCH="master" | |
if grep -q BCM2708 /proc/cpuinfo; then | |
echo "RPI BUILD!" | |
RPI="1" | |
fi | |
[ -n "$1" ] && BRANCH=$1 |
This file contains hidden or 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 pandas as pd | |
df = pd.DataFrame({'a': [1, 2, 3, 3, 4, 1, 7, 8, 9], 'b': [1, 1, 1, 1, 4, 4, 2, 3, 1]}) | |
print(df) | |
print("========") | |
cidx = df.b.value_counts() <= 1 | |
df.loc[df.b.isin(cidx.index[cidx]), 'b'] = 9999 | |
print(df) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder