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
A | |
A + Certified | |
A-110 | |
A-122 | |
A-123 | |
A-133 | |
A-frames | |
A-GPS | |
A/B Testing | |
A/R analysis |
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 string | |
from nltk.stem.snowball import SnowballStemmer | |
import os | |
from nltk.chunk import conlltags2tree, tree2conlltags | |
import pickle | |
# Change here | |
corpus_root = 'gmb-2.2.0' | |
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 requests | |
from bs4 import BeautifulSoup | |
def get_all_links(url): | |
content = requests.get(url).content | |
soup = BeautifulSoup(content, 'html.parser') | |
links = [] | |
for link in soup.find_all('a'): | |
if link.has_attr('href'): | |
href = link['href'] |
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
To sell only the stocks that are not there in this week's new strategy and keep the stocks that still remain, you can modify the code as follows: | |
```python | |
import backtrader as bt | |
import pandas as pd | |
# Define the strategy | |
class MyStrategy(bt.Strategy): | |
def __init__(self): |
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 PySimpleGUI as sg | |
tasks = ["something", "something2", "something3"] | |
layout = [ | |
[sg.Text('ToDo')], | |
[sg.InputText('Enter ToDo Item', key='todo_item'), sg.Button(button_text='Add', key="add_save")], | |
[sg.Listbox(values=tasks, size=(40, 10), key="items"), sg.Button('Delete'), sg.Button('Edit')], | |
] |
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 logging | |
import collections | |
import threading | |
import time | |
from collections import defaultdict | |
def log_info(message, logger): | |
logger.info(message) | |
time.sleep(3) |
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 logging | |
import time | |
import threading | |
from collections import defaultdict | |
def log_info(message,logger): | |
logger.info(message) | |
time.sleep(3) | |
logger.info(message) |
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 logging | |
import time | |
import threading | |
import io | |
def log_info(message,logger): | |
logger.info(message) | |
time.sleep(3) | |
logger.info(message) |
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 logging | |
import time | |
import threading | |
logger = logging.getLogger() | |
# Set up logging | |
logging.basicConfig( | |
level=logging.INFO, format="%(asctime)s %(message)s", datefmt="%Y-%m-%d %H:%M:%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
""" | |
Measure the frequencies coming in through the microphone | |
Patchwork of wire_full.py from pyaudio tests and spectrum.py from Chaco examples | |
""" | |
import pyaudio | |
import numpy as np | |
import scipy.signal | |
CHUNK = 1024 * 2 |
NewerOlder