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
from __future__ import absolute_import, unicode_literals | |
from celery import current_app | |
from celery.bin import worker | |
if __name__ == '__main__': | |
app = current_app._get_current_object() | |
worker = worker.worker(app=app) |
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
""" | |
This code snippet do the following: | |
- It grabs the last 100 tweets from 10 users | |
- saves the tweets in .csv format inside the CSV directory (it creates the CSV directory if it not exists) | |
""" | |
import sys, os | |
import csv | |
import tweepy | |
from tweepy import OAuthHandler |
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
def imprime_primeiro_item(lista_de_items): | |
print(lista_de_items[0]) | |
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
FROM ubuntu | |
MAINTAINER Andre Almar <[email protected]> | |
# Add the PostgreSQL PGP key to verify their Debian packages. | |
# It should be the same key as | |
# https://www.postgresql.org/media/keys/ACCC4CF8.asc | |
RUN apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8 | |
# Add PostgreSQL's repository. It contains the most recent stable release |
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 controllers; | |
import com.jcraft.jsch.ChannelExec; | |
import com.jcraft.jsch.JSch; | |
import com.jcraft.jsch.Session; | |
import java.io.ByteArrayOutputStream; | |
import java.io.DataInputStream; | |
import java.io.DataOutputStream; | |
import java.util.HashMap; |
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 controllers; | |
import oi.siebel.Control; //that's the Class I created to send the SSH commands to an UNIX shell | |
import play.mvc.Controller; | |
import play.mvc.Result; | |
import java.util.*; | |
import java.lang.*; | |
public class Application extends Controller { |
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
#This are the proxy settings we use for activator | |
# Multiple proxy hosts can be used by separating them with a '|' sign | |
# Do not enclose the proxy host(s) in quotes | |
-Dhttp.proxyHost=99.99.99.99 - your proxy IP/host | |
-Dhttp.proxyPort=82 - your proxy PORT | |
-Dhttps.proxyHost=99.99.99.99 - your proxy IP/host | |
-Dhttps.proxyPort=82 - your proxy PORT | |
# Here we configure the hosts which should not go through the proxy. You should include your private network, if applicable. |
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 os | |
import glob | |
import sys | |
import cx_Oracle | |
row_id = raw_input("Enter ROW_ID: ") | |
row_id = str(row_id) | |
SQL = ''' |
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
>>> x = [1, 2, 3, 4, 5, 6, 6, 8] | |
>>> x | |
[1, 2, 3, 4, 5, 6, 6, 8] | |
>>> generator_expression = (i for i in x) | |
>>> generator_expression | |
<generator object <genexpr> at 0x101812af0> | |
>>> list_comprehension = [i for i in x] | |
>>> list_comprehension | |
[1, 2, 3, 4, 5, 6, 6, 8] | |
>>> |
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
generator_expression = (1,2,3,4,5,6,7,8) |