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 urllib | |
import argparse | |
import sqlite3 | |
from xml.dom import minidom | |
import datetime | |
from arxiv_subject_classification import SUBJECT_CLASSIFICATION | |
def get_args(): |
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 urllib2 | |
import time | |
import xml.etree.ElementTree as ET | |
from datetime import datetime | |
OAI = "{http://www.openarchives.org/OAI/2.0/}" | |
ARXIV = "{http://arxiv.org/OAI/arXiv/}" | |
def harvest(initial_date, end_date): | |
results = [] |
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 | |
# store the current dir | |
CUR_DIR=$(pwd) | |
# Let the person running the script know what's going on. | |
echo "\n\033[1mPulling in latest changes for all repositories...\033[0m\n" | |
# Find all git repositories and update it to the master latest revision | |
for i in $(find . -name ".git" | cut -c 3-); do |
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
curl -u $1:$2 -s "https://api.github.com/orgs/$3/repos?per_page=200" | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}' |
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
git config --global alias.co checkout | |
git config --global alias.br branch | |
git config --global alias.ci commit | |
git config --global alias.st status | |
git config --global alias.unstage 'reset HEAD --' | |
git config --global alias.last 'log -1 HEAD' | |
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
git branch | grep -v master | xargs git branch -D |
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
<?xml version="1.0"?> | |
<rss version="2.0" xmlns:g="http://base.google.com/ns/1.0"> | |
<channel> | |
<title>The Title</title> | |
<link>http://www.example.com</link> | |
<description>An example item from the feed</description> | |
<item> | |
<g:id>DB_1</g:id> | |
<g:availability>in stock</g:availability> | |
<g:condition>new</g:condition> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<listings> | |
<title>My Hotel Feed</title> | |
<listing> | |
<hotel_id>1234</hotel_id> | |
<name>The best hotel</name> | |
<description>A very nice hotel</description> | |
<brand>Premium_brand</brand> | |
<address format="simple"> | |
<component name="addr1">100 Main Street</component> |
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 python3 | |
import os | |
import sys | |
walk_dir = os.getcwd() | |
count = 0 | |
def from_ts_to_mp4(source_file, dest_file): | |
os.system("ffmpeg -i {} -c:v copy -c:a copy {}".format(source_file, dest_file)) |
OlderNewer