Using the library importlab and grep on a shell prompt from the project's root folder:
importlab --tree path/to/file.py | grep -E '^\s+[^::]*py$'
Using the library importlab and grep on a shell prompt from the project's root folder:
importlab --tree path/to/file.py | grep -E '^\s+[^::]*py$'
cd /etc/nginx/sites-enabled
ls
for checkingsudo rm site-to-be-removed
sudo nginx -t
, and if OKsudo service nginx reload
Let's assume the database is named "production" in your mongodb atlas cluster. First we do a dump:
mongodump --uri="mongodb+srv://<username>:<password>@<subdomain>.mongodb.net/production" --archive="mongodump-production"
Make sure you fill in the correct:
#!/bin/sh | |
cloc --fullpath --not-match-d='(node_modules|build|static|coverage|__tests__|tests)' --exclude-list-file=notcount . |
# Idea from: https://machinelearningmastery.com/setup-python-environment-machine-learning-deep-learning-anaconda/ | |
# scipy | |
import scipy | |
print('scipy: %s' % scipy.__version__) | |
# numpy | |
import numpy | |
print('numpy: %s' % numpy.__version__) | |
# matplotlib | |
import matplotlib |
import { Controller, Post, Body, Get, UseInterceptors, UploadedFile } from '@nestjs/common'; | |
import { CreateWebsiteDto } from './dto/create-website.dto'; | |
import { FileInterceptor } from '@nestjs/platform-express'; | |
import {existsSync, mkdirSync, writeFileSync} from 'fs'; | |
import { randomBytes } from 'crypto'; | |
import { join } from 'path'; | |
import { copySync } from 'fs-extra'; | |
import { exec, pwd } from 'shelljs'; | |
import * as rimraf from 'rimraf'; |
The goal of the CodRep 2019 competition was to predict formatting errors in source code.
We were given 8000 Java files with one formatting error in each one and another file (out.txt
) that contained the character position the formatting error existed. For example, in the snippet below, the error (unnecessary space) is found in position 30:
package main | |
import ( | |
"context" | |
"encoding/json" | |
"fmt" | |
"net/http/httputil" | |
"os" | |
"strings" |