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://pt.wiktionary.org/wiki/Template:conj.pt | |
// https://pt.wiktionary.org/wiki/Template:conj.pt.er | |
// https://pt.wiktionary.org/wiki/Special:WhatLinksHere/Template:conj.pt?limit=500&namespace=10 | |
/*var text = $('#wpTextbox1').val(); | |
jsMsg( text.replace( /<noinclude>[\s\S]+?<\/noinclude>/g, '' ) ); | |
$('#wpTextbox1').val().replace(/<noinclude>[\s\S]+?<\/noinclude>/g, '').match( /\{\{\s*conj\.pt\s*\|\s*título\s*=\s*([\s\S]+?)\s*\|\s*\{\{\{1\|?\}\}\}(.+?)\s*\|/ ); | |
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
# Download Spark 1.4 from http://spark.apache.org/downloads.html | |
# | |
# Download the nyc flights dataset as a CSV from https://s3-us-west-2.amazonaws.com/sparkr-data/nycflights13.csv | |
# Launch SparkR using | |
# ./bin/sparkR --packages com.databricks:spark-csv_2.10:1.0.3 | |
# The SparkSQL context should already be created for you as sqlContext | |
sqlContext | |
# Java ref type org.apache.spark.sql.SQLContext id 1 |
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 pandas as pd | |
import csv | |
with open("<filename>.csv", 'r') as f: | |
with open("updated_file.csv", 'w') as f1: | |
f.next() # skip header line | |
f.next() # skip header empty line | |
for line in f: | |
f1.write(line.replace('\x00', '')) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# Generic Aliases | |
alias ll='ls -latr' # List all file in long list format by modification time | |
alias ..='cd ..' # Go up one directory | |
alias ...='cd ../..' # Go up two directories | |
alias ....='cd ../../..' # Go up three directories | |
alias -- -='cd -' # Go back | |
alias c='clear' # Clear Screen | |
alias k='clear' # Clear Screen | |
alias cls='clear' # Clear Screen | |
alias _="sudo" # Execute with sudo |
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
def get_uncompressed_size(self, file): | |
fileobj = open(file, 'r') | |
fileobj.seek(-8, 2) | |
crc32 = gzip.read32(fileobj) | |
isize = gzip.read32(fileobj) # may exceed 2GB | |
fileobj.close() | |
return isize |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# .ebextensions/01-ebs.config | |
commands: | |
01clear-if-unmounted: | |
command: if ! mount | grep /media/ebs_volume > /dev/nul; then rm -rf /media/ebs_volume; fi | |
02attach-volume: | |
command: aws ec2 attach-volume --region eu-central-1 --volume-id vol-ddb08e34 --instance-id $(curl -s http://169.254.169.254/latest/meta-data/instance-id) --device /dev/sdh | |
ignoreErrors: true | |
03wait: | |
command: sleep 10 | |
04trymount: |
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
<?php | |
/* | |
* Plugin: StreamlineFoundation | |
* | |
* Class: Schedule | |
* | |
* Description: Provides scheduling mechanics including creating a schedule, testing if a specific moment is part of the schedule, moving back | |
* and forth between scheduled moments in time and translating the created schedule back to a human readable form. | |
* | |
* Usage: ::fromCronString() creates a new Schedule class and requires a string in the cron ('* * * * *', $language) format. |
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
#!/usr/bin/env python | |
import os | |
import boto3 | |
import argparse | |
import json | |
# `pip install -U PTable` will get you the right fork of PrettyTable | |
from prettytable import PrettyTable | |
from botocore.exceptions import ClientError |
OlderNewer