Skip to content

Instantly share code, notes, and snippets.

View moqca's full-sized avatar

Andres Moreno moqca

  • Tijuana, Mexico
View GitHub Profile
@moqca
moqca / screener.py
Created July 26, 2021 02:53 — forked from shashankvemuri/screener.py
the entire stock screener code
# Imports
from pandas_datareader import data as pdr
from yahoo_fin import stock_info as si
from pandas import ExcelWriter
import yfinance as yf
import pandas as pd
import datetime
import time
yf.pdr_override()
@moqca
moqca / email
Created September 3, 2019 16:28
mor.qca@gmail.com
select
week,
'Monday' as weekday,
id,
splitstart
from fullsched f
JOIN splittimes t on f.mons::time without time zone <= t.splitend and f.mone::time without time zone >= t.splitstart
INNER JOIN dbo.agenttable a on a.employeeid = f.id
where
week = 33
statuskey productive scheduled
----------- ------------- ----------------
Activity 1 3818.296111 0
Activity 2 0.000833333 0
Activity 3 17.76555556 0
scheduled time 0 5608.333333
@moqca
moqca / t
Created April 29, 2019 19:51
Schedule:
Frank - 06:30 to 08:00
06:00 06:30 07:00 07:30 08:00
----- ----- ----- ----- -----
0 1 1 1 0
Data:
daystart | days | category
4 | 1 | A
4 | 3 | A
4 | 5 | A
5 | 3 | A
3 | 11 | B
3 | 4 | B
SELECT ID, series from table OUTER JOIN (?) generate_series(1,4) on ? = ?
Expected result
ID + Series
------+-------
112 | 1
123 | 2
123 | 3
new_table['name'] = xl['name']
new_table['status'] = xl['status']
new_table['team_id'] = xl['id_employee.1']
new_table['dept'] = xl['department']
new_table['id'] = new_table['id'].astype(int)
nn = new_table[new_table['id']<9999]
@moqca
moqca / web_browsert.py
Created February 24, 2014 20:05
bad bad bad
import json
from pprint import pprint
import requests
USER_AGENT = {'User-agent': 'cmd line browser'}
class User(object):
""" Class for handling user methods"""
@moqca
moqca / Cascabel_.idea_.name
Created February 20, 2014 19:07
MainWindow just closes
Cascabel