index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
65,823
luoheng/TCssrbm
refs/heads/master
/tests/speedTest_unshared_conv_diagonally.py
import sys import time import unittest import pdb import numpy import theano from unshared_conv_diagonally import FilterActs from unshared_conv_diagonally import WeightActs from unshared_conv_diagonally import ImgActs def rand(shp, dtype): return numpy.random.rand(*shp).astype(dtype) class TestWeightActsSpe...
{"/test_NCC.py": ["/CrossCorrelation.py"]}
65,824
luoheng/TCssrbm
refs/heads/master
/MSSIM.py
import numpy class MSSIM(object): def __init__(self, test_samples, samples, window_size, seed=98987): self.test_samples = test_samples self.samples = samples self.window_size = window_size self.rng = numpy.random.RandomState(seed) ...
{"/test_NCC.py": ["/CrossCorrelation.py"]}
65,825
luoheng/TCssrbm
refs/heads/master
/TCssrbm.py
""" This file extends the mu-ssRBM for tiled-convolutional training """ import cPickle, pickle import numpy numpy.seterr('warn') #SHOULD NOT BE IN LIBIMPORT from PIL import Image import theano from theano import tensor from theano.tensor import nnet,grad from pylearn.io import image_tiling from pylearn.a...
{"/test_NCC.py": ["/CrossCorrelation.py"]}
65,826
luoheng/TCssrbm
refs/heads/master
/Brodatz.py
import theano import numpy from PIL import Image from protocol_ import TensorFnDataset floatX=theano.config.floatX def Brodatz_op(s_idx, filename, # a list of texture images patch_shape=(1,98,98), noise_concelling=0.0, # see it in the paper of mu-ssRBM see...
{"/test_NCC.py": ["/CrossCorrelation.py"]}
65,827
luoheng/TCssrbm
refs/heads/master
/TCssDBN.py
""" This file implements the binary convolutional ssRBM as a second layer in DBN """ import cPickle, pickle import numpy numpy.seterr('warn') #SHOULD NOT BE IN LIBIMPORT from PIL import Image import theano from theano import tensor from theano.tensor import nnet,grad from theano.tensor.nnet.conv import co...
{"/test_NCC.py": ["/CrossCorrelation.py"]}
65,828
luoheng/TCssrbm
refs/heads/master
/protocol_.py
"""Convenience base classes to help with writing Dataset ops To randomly generate data, we use try: x = self.x_ except: x = self.fn(*self.fn_args) """ __docformat__ = "restructuredtext_en" import numpy import theano class Dataset(theano.Op): """ The basic dataset interface is an expression that m...
{"/test_NCC.py": ["/CrossCorrelation.py"]}
65,834
guzhijun369/test3
refs/heads/master
/utomarket/release_ad.py
from utomarket.skip_util import * from utomarket.util import * from selenium.webdriver.common.keys import Keys from .personal_center_util import select_mode # browser.find_element_by_xpath("//span[contains(text(),'获取验证码')]/..") def release_ad_o(browser, country='中国', currency='人民币', transaction_type='固定价格', floating...
{"/utomarket/release_ad.py": ["/utomarket/skip_util.py", "/utomarket/util.py", "/utomarket/personal_center_util.py"], "/tests/test_release_ad.py": ["/utomarket/utomarket.py", "/utomarket/util.py", "/utomarket/settings.py"], "/tests/test_user_info.py": ["/utomarket/util.py", "/utomarket/utomarket.py"], "/utomarket/login...
65,835
guzhijun369/test3
refs/heads/master
/tests/test_release_ad.py
from utomarket.utomarket import Utomarket from utomarket.util import explicit_wait, get_current_url from utomarket.settings import Settings import time def test_release_buy_ad(): # 发布购买广告,浮动价格 ins = Utomarket('test129', '3201') ins.login().ad_btn('购买').release_ad(transaction_type='浮动价格') ins.browser.clos...
{"/utomarket/release_ad.py": ["/utomarket/skip_util.py", "/utomarket/util.py", "/utomarket/personal_center_util.py"], "/tests/test_release_ad.py": ["/utomarket/utomarket.py", "/utomarket/util.py", "/utomarket/settings.py"], "/tests/test_user_info.py": ["/utomarket/util.py", "/utomarket/utomarket.py"], "/utomarket/login...
65,836
guzhijun369/test3
refs/heads/master
/tests/test_user_info.py
from utomarket.util import explicit_wait from utomarket.utomarket import Utomarket import time from utomarket.util import is_exist_element, navigator_to, get_current_url def test_change_mail(): # 修改邮箱 ins = Utomarket('uitest7', '3201') ins.login().my_center('个人中心').change_mail('284468321@qq.com', '3201') ...
{"/utomarket/release_ad.py": ["/utomarket/skip_util.py", "/utomarket/util.py", "/utomarket/personal_center_util.py"], "/tests/test_release_ad.py": ["/utomarket/utomarket.py", "/utomarket/util.py", "/utomarket/settings.py"], "/tests/test_user_info.py": ["/utomarket/util.py", "/utomarket/utomarket.py"], "/utomarket/login...
65,837
guzhijun369/test3
refs/heads/master
/utomarket/login_util.py
from selenium.webdriver.common.action_chains import ActionChains # from utomarket.personal_center_util import band_google_o from utomarket.util import * from utomarket.settings import Settings def login_user(browser, username, password, logger): logger.debug('开始登陆,用户名:{},密码:{}'.format(username, password)) na...
{"/utomarket/release_ad.py": ["/utomarket/skip_util.py", "/utomarket/util.py", "/utomarket/personal_center_util.py"], "/tests/test_release_ad.py": ["/utomarket/utomarket.py", "/utomarket/util.py", "/utomarket/settings.py"], "/tests/test_user_info.py": ["/utomarket/util.py", "/utomarket/utomarket.py"], "/utomarket/login...
65,838
guzhijun369/test3
refs/heads/master
/utomarket/register_util.py
from selenium.webdriver.common.action_chains import ActionChains from utomarket.skip_util import select_country from utomarket.util import * from utomarket.settings import Settings import time from utomarket.get_code_util import * def register_test(browser, email, code, username, pass_wd, country, invitation_code=Non...
{"/utomarket/release_ad.py": ["/utomarket/skip_util.py", "/utomarket/util.py", "/utomarket/personal_center_util.py"], "/tests/test_release_ad.py": ["/utomarket/utomarket.py", "/utomarket/util.py", "/utomarket/settings.py"], "/tests/test_user_info.py": ["/utomarket/util.py", "/utomarket/utomarket.py"], "/utomarket/login...
65,839
guzhijun369/test3
refs/heads/master
/utomarket/get_code_util.py
def get_code(browser, code): captcha_xpath = browser.find_element_by_id('code') #获取图形验证码输入框 captcha_xpath.send_keys(code) confirm_btn = browser.find_elements_by_css_selector('button[type="submit"]')[1]#获取弹窗确定按钮 confirm_btn.click()
{"/utomarket/release_ad.py": ["/utomarket/skip_util.py", "/utomarket/util.py", "/utomarket/personal_center_util.py"], "/tests/test_release_ad.py": ["/utomarket/utomarket.py", "/utomarket/util.py", "/utomarket/settings.py"], "/tests/test_user_info.py": ["/utomarket/util.py", "/utomarket/utomarket.py"], "/utomarket/login...
65,840
guzhijun369/test3
refs/heads/master
/tests/test_logout.py
from utomarket.utomarket import Utomarket import time def test_logout(): # 退出登录 ins = Utomarket('test129', '3201') ins.login() time.sleep(3) ins.logout('退出登录') now_url = ins.get_url() assert now_url == 'https://dev.utomarket.com:9094/#/user/login' ins.browser.close()
{"/utomarket/release_ad.py": ["/utomarket/skip_util.py", "/utomarket/util.py", "/utomarket/personal_center_util.py"], "/tests/test_release_ad.py": ["/utomarket/utomarket.py", "/utomarket/util.py", "/utomarket/settings.py"], "/tests/test_user_info.py": ["/utomarket/util.py", "/utomarket/utomarket.py"], "/utomarket/login...
65,841
guzhijun369/test3
refs/heads/master
/tests/test_util.py
from utomarket.utomarket import Utomarket from utomarket.util import * from utomarket.settings import Settings import time def test_get_current_url(): ins = Utomarket('test129', '3201') ins.login() assert get_current_url(ins.browser) == Settings.login_url time.sleep(2) ins.browser.close() def t...
{"/utomarket/release_ad.py": ["/utomarket/skip_util.py", "/utomarket/util.py", "/utomarket/personal_center_util.py"], "/tests/test_release_ad.py": ["/utomarket/utomarket.py", "/utomarket/util.py", "/utomarket/settings.py"], "/tests/test_user_info.py": ["/utomarket/util.py", "/utomarket/utomarket.py"], "/utomarket/login...
65,842
guzhijun369/test3
refs/heads/master
/utomarket/logout_util.py
from utomarket.util import * from .skip_util import * def logout_o(browser, logger, menu): logger.debug("退出登录") user_info(browser, menu) btn_login_xpath = '//*[@id="root"]/div/div[1]/div[2]/div/form/div[4]/div/div/span/button' explicit_wait(browser, "VOEL", [btn_login_xpath, "xpath"], logger)
{"/utomarket/release_ad.py": ["/utomarket/skip_util.py", "/utomarket/util.py", "/utomarket/personal_center_util.py"], "/tests/test_release_ad.py": ["/utomarket/utomarket.py", "/utomarket/util.py", "/utomarket/settings.py"], "/tests/test_user_info.py": ["/utomarket/util.py", "/utomarket/utomarket.py"], "/utomarket/login...
65,843
guzhijun369/test3
refs/heads/master
/utomarket/personal_center_util.py
from selenium.webdriver.common.action_chains import ActionChains from pymouse import PyMouse from pykeyboard import PyKeyboard from random import choice import time from utomarket.skip_util import * from utomarket.util import * from utomarket.settings import Settings def upload_avatar_o(browser): upload_btns ...
{"/utomarket/release_ad.py": ["/utomarket/skip_util.py", "/utomarket/util.py", "/utomarket/personal_center_util.py"], "/tests/test_release_ad.py": ["/utomarket/utomarket.py", "/utomarket/util.py", "/utomarket/settings.py"], "/tests/test_user_info.py": ["/utomarket/util.py", "/utomarket/utomarket.py"], "/utomarket/login...
65,844
guzhijun369/test3
refs/heads/master
/tests/test_register.py
from utomarket.utomarket import Utomarket from utomarket.util import explicit_wait, get_current_url from utomarket.settings import Settings import time def test_register(): # 注册 username = 'uitest7' pw = 'q5310543' ins = Utomarket(username, pw) email = 'testui7@qq.com' ins.register(email, '3201',...
{"/utomarket/release_ad.py": ["/utomarket/skip_util.py", "/utomarket/util.py", "/utomarket/personal_center_util.py"], "/tests/test_release_ad.py": ["/utomarket/utomarket.py", "/utomarket/util.py", "/utomarket/settings.py"], "/tests/test_user_info.py": ["/utomarket/util.py", "/utomarket/utomarket.py"], "/utomarket/login...
65,845
guzhijun369/test3
refs/heads/master
/tests/test_top_notice.py
from utomarket.util import explicit_wait from utomarket.utomarket import Utomarket def test_top_notice(): # 置顶公告 ins = Utomarket('test129', '3201') ins.login().top_notice_internal() ins.browser.close()
{"/utomarket/release_ad.py": ["/utomarket/skip_util.py", "/utomarket/util.py", "/utomarket/personal_center_util.py"], "/tests/test_release_ad.py": ["/utomarket/utomarket.py", "/utomarket/util.py", "/utomarket/settings.py"], "/tests/test_user_info.py": ["/utomarket/util.py", "/utomarket/utomarket.py"], "/utomarket/login...
65,846
guzhijun369/test3
refs/heads/master
/utomarket/settings.py
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) class Settings: log_location = os.path.join(BASE_DIR, 'logs') browser_language = 'zh-CN' loggers = {} login_url = 'https://dev.utomarket.com:9094/#/user/login'
{"/utomarket/release_ad.py": ["/utomarket/skip_util.py", "/utomarket/util.py", "/utomarket/personal_center_util.py"], "/tests/test_release_ad.py": ["/utomarket/utomarket.py", "/utomarket/util.py", "/utomarket/settings.py"], "/tests/test_user_info.py": ["/utomarket/util.py", "/utomarket/utomarket.py"], "/utomarket/login...
65,847
guzhijun369/test3
refs/heads/master
/utomarket/util.py
import time import random from contextlib import contextmanager from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as ec from selenium.webdriver.common.by import By from selenium.common.exceptions import WebDriverException, TimeoutException from pymouse ...
{"/utomarket/release_ad.py": ["/utomarket/skip_util.py", "/utomarket/util.py", "/utomarket/personal_center_util.py"], "/tests/test_release_ad.py": ["/utomarket/utomarket.py", "/utomarket/util.py", "/utomarket/settings.py"], "/tests/test_user_info.py": ["/utomarket/util.py", "/utomarket/utomarket.py"], "/utomarket/login...
65,848
guzhijun369/test3
refs/heads/master
/utomarket/skip_util.py
from utomarket.util import * # from utomarket.logout_util import * from selenium.webdriver.common.action_chains import ActionChains import re def user_info(browser, menu): # 移到头像显示下拉菜单点击菜单 btn_info = browser.find_element_by_xpath('//*[@id="root"]/div/div/div/div[1]/div/div/span[1]/span[4]/span') ActionChains...
{"/utomarket/release_ad.py": ["/utomarket/skip_util.py", "/utomarket/util.py", "/utomarket/personal_center_util.py"], "/tests/test_release_ad.py": ["/utomarket/utomarket.py", "/utomarket/util.py", "/utomarket/settings.py"], "/tests/test_user_info.py": ["/utomarket/util.py", "/utomarket/utomarket.py"], "/utomarket/login...
65,849
guzhijun369/test3
refs/heads/master
/utomarket/transaction.py
from utomarket.skip_util import * from utomarket.util import * from selenium.webdriver.common.keys import Keys from .personal_center_util import select_mode def ad_detail_o(browser, name): # 进入广告详情 ad_div = browser.find_element_by_xpath("//a[contains(text(),'%s')]/../../.." % name) click_btn = ad_div.find_e...
{"/utomarket/release_ad.py": ["/utomarket/skip_util.py", "/utomarket/util.py", "/utomarket/personal_center_util.py"], "/tests/test_release_ad.py": ["/utomarket/utomarket.py", "/utomarket/util.py", "/utomarket/settings.py"], "/tests/test_user_info.py": ["/utomarket/util.py", "/utomarket/utomarket.py"], "/utomarket/login...
65,850
guzhijun369/test3
refs/heads/master
/utomarket/wallet_util.py
from selenium.webdriver.common.action_chains import ActionChains from utomarket.util import * def enter_wallet_home(browser): btn_wallet_xpath = '//*[@id="root"]/div/div/div/div[1]/div/div/span[1]/span[1]/a/span/span' explicit_wait(browser, 'VOEL', [btn_wallet_xpath, 'xpath']) btn_wallet = browser.find_...
{"/utomarket/release_ad.py": ["/utomarket/skip_util.py", "/utomarket/util.py", "/utomarket/personal_center_util.py"], "/tests/test_release_ad.py": ["/utomarket/utomarket.py", "/utomarket/util.py", "/utomarket/settings.py"], "/tests/test_user_info.py": ["/utomarket/util.py", "/utomarket/utomarket.py"], "/utomarket/login...
65,851
guzhijun369/test3
refs/heads/master
/tests/test_wallet.py
import time from utomarket.util import explicit_wait from utomarket.utomarket import Utomarket def test_withdraw_internal_inner(): # 内部转账 ins = Utomarket('test129', '3201') address = '37jzbkEiZW4KfY7ueFLiXtnCJbu98Ay7wS' amount = '0.0005' method = '内部' ins.login().withdraw_internal(address, amount...
{"/utomarket/release_ad.py": ["/utomarket/skip_util.py", "/utomarket/util.py", "/utomarket/personal_center_util.py"], "/tests/test_release_ad.py": ["/utomarket/utomarket.py", "/utomarket/util.py", "/utomarket/settings.py"], "/tests/test_user_info.py": ["/utomarket/util.py", "/utomarket/utomarket.py"], "/utomarket/login...
65,852
guzhijun369/test3
refs/heads/master
/tests/test_transaction.py
from utomarket.utomarket import Utomarket from utomarket.util import explicit_wait, get_current_url from utomarket.settings import Settings import time def test_ad_detail(): # 出售广告详情 # ins_owner = Utomarket('test129', '3201') # 广告主 ins_trader = Utomarket('test128', '3201') # 交易对象 ins_trader.login().ad_...
{"/utomarket/release_ad.py": ["/utomarket/skip_util.py", "/utomarket/util.py", "/utomarket/personal_center_util.py"], "/tests/test_release_ad.py": ["/utomarket/utomarket.py", "/utomarket/util.py", "/utomarket/settings.py"], "/tests/test_user_info.py": ["/utomarket/util.py", "/utomarket/utomarket.py"], "/utomarket/login...
65,853
guzhijun369/test3
refs/heads/master
/tests/test_login.py
from utomarket.utomarket import Utomarket from utomarket.util import get_page_title, explicit_wait def test_login(): # 登录 # username = 'test130' # password = '3201' # ins = Utomarket(username, password) # ins.login().sliding_verification() cases = [ ('test130', '3201', 'success'), ...
{"/utomarket/release_ad.py": ["/utomarket/skip_util.py", "/utomarket/util.py", "/utomarket/personal_center_util.py"], "/tests/test_release_ad.py": ["/utomarket/utomarket.py", "/utomarket/util.py", "/utomarket/settings.py"], "/tests/test_user_info.py": ["/utomarket/util.py", "/utomarket/utomarket.py"], "/utomarket/login...
65,854
guzhijun369/test3
refs/heads/master
/utomarket/utomarket.py
import os import logging from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver import DesiredCapabilities from selenium.webdriver.common.proxy import Proxy, ProxyType from selenium.common.exceptions import WebDriverException # from .settings import Settings from ...
{"/utomarket/release_ad.py": ["/utomarket/skip_util.py", "/utomarket/util.py", "/utomarket/personal_center_util.py"], "/tests/test_release_ad.py": ["/utomarket/utomarket.py", "/utomarket/util.py", "/utomarket/settings.py"], "/tests/test_user_info.py": ["/utomarket/util.py", "/utomarket/utomarket.py"], "/utomarket/login...
65,860
Rama-007/Aspect_Based_Sentiment_Analysis
refs/heads/master
/parser.py
import xml.sax import sys from collections import defaultdict import nltk,random from sklearn.multiclass import OneVsRestClassifier from sklearn.svm import LinearSVC from sklearn.model_selection import KFold, cross_val_score # from autocorrect import spell from sklearn.preprocessing import MultiLabelBinarizer from skl...
{"/parser.py": ["/category_classifier_svm.py", "/sentiment_analysis.py", "/final.py"]}
65,861
Rama-007/Aspect_Based_Sentiment_Analysis
refs/heads/master
/aspect_extractor.py
import nltk from collections import defaultdict from scipy import spatial import numpy as np text_aspects=[] fp=open("glove.6B/glove.6B.300d.txt","r") glove_emb={} for line in fp: temp=line.split(" ") glove_emb[temp[0]]=np.asarray([float(i) for i in temp[1:]]) ontology_embeded=defaultdict(list) def extractor(o...
{"/parser.py": ["/category_classifier_svm.py", "/sentiment_analysis.py", "/final.py"]}
65,862
Rama-007/Aspect_Based_Sentiment_Analysis
refs/heads/master
/sentiment_analysis.py
import nltk from collections import defaultdict import numpy as np import keras from keras.models import Sequential from keras.layers import Dense, Dropout, Flatten, GRU, Embedding, LSTM, Input, Bidirectional, TimeDistributed, merge, Reshape, Flatten from keras.layers import Conv2D, MaxPooling2D, BatchNormalization f...
{"/parser.py": ["/category_classifier_svm.py", "/sentiment_analysis.py", "/final.py"]}
65,863
Rama-007/Aspect_Based_Sentiment_Analysis
refs/heads/master
/neural_aspect_extractor.py
import nltk from collections import defaultdict import numpy as np import keras from keras.models import Sequential from keras.layers import Dense, Dropout, Flatten, GRU, Embedding, Concatenate, LSTM, Input, Bidirectional, TimeDistributed from keras.layers import Conv2D, MaxPooling2D, BatchNormalization from keras.pr...
{"/parser.py": ["/category_classifier_svm.py", "/sentiment_analysis.py", "/final.py"]}
65,864
Rama-007/Aspect_Based_Sentiment_Analysis
refs/heads/master
/category_classifier_svm.py
import numpy as np import nltk,random from sklearn.multiclass import OneVsRestClassifier from sklearn.svm import LinearSVC from sklearn.model_selection import KFold, cross_val_score # from autocorrect import spell from sklearn.preprocessing import MultiLabelBinarizer from sklearn.feature_extraction.text import TfidfVec...
{"/parser.py": ["/category_classifier_svm.py", "/sentiment_analysis.py", "/final.py"]}
65,865
Rama-007/Aspect_Based_Sentiment_Analysis
refs/heads/master
/category_classifier.py
import numpy as np import nltk,random from sklearn.multiclass import OneVsRestClassifier from sklearn.svm import LinearSVC from sklearn.model_selection import KFold, cross_val_score # from autocorrect import spell from sklearn.preprocessing import MultiLabelBinarizer import keras from keras.models import Sequential fr...
{"/parser.py": ["/category_classifier_svm.py", "/sentiment_analysis.py", "/final.py"]}
65,866
Rama-007/Aspect_Based_Sentiment_Analysis
refs/heads/master
/generate_ontology.py
from collections import defaultdict ontology_dict=defaultdict(list) noun_frequency=defaultdict(int) category_list=[] import nltk def ontology(data,labels): for e1 in labels: category_list.extend(e1) category_list1=list(set(category_list)) for text in data: words=nltk.word_tokenize(text) pos=nltk.pos_tag...
{"/parser.py": ["/category_classifier_svm.py", "/sentiment_analysis.py", "/final.py"]}
65,867
Rama-007/Aspect_Based_Sentiment_Analysis
refs/heads/master
/final.py
import nltk from collections import defaultdict import numpy as np import keras from keras.models import Sequential from keras.layers import Dense, Dropout, Flatten, GRU, Embedding, Concatenate, LSTM, Input, Bidirectional, TimeDistributed from keras.layers import Conv2D, MaxPooling2D, BatchNormalization from keras.pr...
{"/parser.py": ["/category_classifier_svm.py", "/sentiment_analysis.py", "/final.py"]}
65,872
PedroQuintella/esw_cinema
refs/heads/main
/application/urls.py
from django.urls import path from rest_framework.routers import SimpleRouter from .views import IndexView, SobreView, FilmesView, ContatoView, FilmeDetalheView, DadosGraficoFilmesView, \ RelatorioFilmesView, FilmeViewSet, GeneroViewSet, SessaoViewSet, UsuarioViewSet, SalaViewSet, AssentoViewSet router = SimpleRo...
{"/application/urls.py": ["/application/views.py"], "/application/views.py": ["/application/models.py", "/application/serializers.py"], "/application/migrations/0001_initial.py": ["/application/models.py"], "/application/admin.py": ["/application/models.py"], "/application/serializers.py": ["/application/models.py"]}
65,873
PedroQuintella/esw_cinema
refs/heads/main
/application/views.py
# Create your views here. from django.views.generic import TemplateView, ListView, FormView from .models import Filme, Sessao, Genero, Usuario, Assento, Sala from django_weasyprint import WeasyTemplateView from django.core.files.storage import FileSystemStorage from django.template.loader import render_to_string from ...
{"/application/urls.py": ["/application/views.py"], "/application/views.py": ["/application/models.py", "/application/serializers.py"], "/application/migrations/0001_initial.py": ["/application/models.py"], "/application/admin.py": ["/application/models.py"], "/application/serializers.py": ["/application/models.py"]}
65,874
PedroQuintella/esw_cinema
refs/heads/main
/application/migrations/0003_auto_20210530_2329.py
# Generated by Django 2.2.19 on 2021-05-31 02:29 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('application', '0002_auto_20210525_1918'), ] operations = [ migrations.CreateModel( name='Gener...
{"/application/urls.py": ["/application/views.py"], "/application/views.py": ["/application/models.py", "/application/serializers.py"], "/application/migrations/0001_initial.py": ["/application/models.py"], "/application/admin.py": ["/application/models.py"], "/application/serializers.py": ["/application/models.py"]}
65,875
PedroQuintella/esw_cinema
refs/heads/main
/venv/Scripts/django-admin.py
#!d:\pedro\documents\arquivos pedro\arquivos da faculdade\laboratório de programação com frameworks\projeto cinema\esw_cinema\venv\scripts\python.exe from django.core import management if __name__ == "__main__": management.execute_from_command_line()
{"/application/urls.py": ["/application/views.py"], "/application/views.py": ["/application/models.py", "/application/serializers.py"], "/application/migrations/0001_initial.py": ["/application/models.py"], "/application/admin.py": ["/application/models.py"], "/application/serializers.py": ["/application/models.py"]}
65,876
PedroQuintella/esw_cinema
refs/heads/main
/application/migrations/0001_initial.py
# Generated by Django 2.2.19 on 2021-04-27 23:47 import application.models from django.db import migrations, models import django.db.models.deletion import stdimage.models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( ...
{"/application/urls.py": ["/application/views.py"], "/application/views.py": ["/application/models.py", "/application/serializers.py"], "/application/migrations/0001_initial.py": ["/application/models.py"], "/application/admin.py": ["/application/models.py"], "/application/serializers.py": ["/application/models.py"]}
65,877
PedroQuintella/esw_cinema
refs/heads/main
/application/migrations/0004_auto_20210607_2059.py
# Generated by Django 2.2.19 on 2021-06-07 23:59 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('application', '0003_auto_20210530_2329'), ] operations = [ migrations.AlterModelOptions( name='filme', options={'ordering':...
{"/application/urls.py": ["/application/views.py"], "/application/views.py": ["/application/models.py", "/application/serializers.py"], "/application/migrations/0001_initial.py": ["/application/models.py"], "/application/admin.py": ["/application/models.py"], "/application/serializers.py": ["/application/models.py"]}
65,878
PedroQuintella/esw_cinema
refs/heads/main
/application/admin.py
from django.contrib import admin # Register your models here. from .models import Usuario, Genero, Filme, Compra, Sala, Sessao, Assento, Ingresso @admin.register(Usuario) class UsuarioAdmin(admin.ModelAdmin): list_display = ('nome', 'email') @admin.register(Genero) class GeneroAdmin(admin.ModelAdmin): lis...
{"/application/urls.py": ["/application/views.py"], "/application/views.py": ["/application/models.py", "/application/serializers.py"], "/application/migrations/0001_initial.py": ["/application/models.py"], "/application/admin.py": ["/application/models.py"], "/application/serializers.py": ["/application/models.py"]}
65,879
PedroQuintella/esw_cinema
refs/heads/main
/application/models.py
# Create your models here. from django.db import models from stdimage.models import StdImageField import uuid from django.utils.translation import gettext_lazy as _ def get_file_path(_instance, filename): ext = filename.split('.')[-1] filename = f'{uuid.uuid4()}.{ext}' return filename class Usuario(mode...
{"/application/urls.py": ["/application/views.py"], "/application/views.py": ["/application/models.py", "/application/serializers.py"], "/application/migrations/0001_initial.py": ["/application/models.py"], "/application/admin.py": ["/application/models.py"], "/application/serializers.py": ["/application/models.py"]}
65,880
PedroQuintella/esw_cinema
refs/heads/main
/application/migrations/0006_auto_20210607_2246.py
# Generated by Django 2.2.19 on 2021-06-08 01:46 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('application', '0005_auto_20210607_2227'), ] operations = [ migrations.AlterField( model_name='...
{"/application/urls.py": ["/application/views.py"], "/application/views.py": ["/application/models.py", "/application/serializers.py"], "/application/migrations/0001_initial.py": ["/application/models.py"], "/application/admin.py": ["/application/models.py"], "/application/serializers.py": ["/application/models.py"]}
65,881
PedroQuintella/esw_cinema
refs/heads/main
/application/migrations/0008_remove_assento_disponibilidade.py
# Generated by Django 2.2.19 on 2021-06-11 20:20 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('application', '0007_sessao_assentos'), ] operations = [ migrations.RemoveField( model_name='assento', name='disponibilidade...
{"/application/urls.py": ["/application/views.py"], "/application/views.py": ["/application/models.py", "/application/serializers.py"], "/application/migrations/0001_initial.py": ["/application/models.py"], "/application/admin.py": ["/application/models.py"], "/application/serializers.py": ["/application/models.py"]}
65,882
PedroQuintella/esw_cinema
refs/heads/main
/application/migrations/0005_auto_20210607_2227.py
# Generated by Django 2.2.19 on 2021-06-08 01:27 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('application', '0004_auto_20210607_2059'), ] operations = [ migrations.AlterModelOptions( name='sessao', options={'ordering'...
{"/application/urls.py": ["/application/views.py"], "/application/views.py": ["/application/models.py", "/application/serializers.py"], "/application/migrations/0001_initial.py": ["/application/models.py"], "/application/admin.py": ["/application/models.py"], "/application/serializers.py": ["/application/models.py"]}
65,883
PedroQuintella/esw_cinema
refs/heads/main
/application/serializers.py
from rest_framework import serializers from application.models import Usuario, Genero, Filme, Sala, Sessao, Assento class GeneroSerializer(serializers.ModelSerializer): class Meta: model = Genero fields = ( 'id', 'nome' ) class FilmeSerializer(serializers.ModelS...
{"/application/urls.py": ["/application/views.py"], "/application/views.py": ["/application/models.py", "/application/serializers.py"], "/application/migrations/0001_initial.py": ["/application/models.py"], "/application/admin.py": ["/application/models.py"], "/application/serializers.py": ["/application/models.py"]}
65,891
orike122/pydeepspace
refs/heads/master
/components/vision.py
import time from collections import deque from typing import Deque, NamedTuple, Tuple import hal from networktables import NetworkTablesInstance from pyswervedrive.chassis import SwerveChassis from utilities.functions import rotate_vector class Odometry(NamedTuple): x: float y: float heading: float ...
{"/autonomous/autonomous.py": ["/automations/alignment.py", "/automations/cargo.py", "/components/cargo.py", "/components/hatch.py", "/components/vision.py", "/utilities/pure_pursuit.py"], "/tests/test_vision.py": ["/components/vision.py"], "/automations/alignment.py": ["/automations/cargo.py", "/automations/hatch.py",...
65,892
orike122/pydeepspace
refs/heads/master
/autonomous/autonomous.py
from dataclasses import dataclass import math from magicbot.state_machine import AutonomousStateMachine, state import wpilib from automations.alignment import ( HatchDepositAligner, HatchIntakeAligner, CargoDepositAligner, ) from automations.cargo import CargoManager from components.cargo import CargoMani...
{"/autonomous/autonomous.py": ["/automations/alignment.py", "/automations/cargo.py", "/components/cargo.py", "/components/hatch.py", "/components/vision.py", "/utilities/pure_pursuit.py"], "/tests/test_vision.py": ["/components/vision.py"], "/automations/alignment.py": ["/automations/cargo.py", "/automations/hatch.py",...
65,893
orike122/pydeepspace
refs/heads/master
/utilities/pure_pursuit.py
import math from typing import List, NamedTuple, Optional, Sequence, Tuple import numpy as np #: A point in 2D cartesian space. Cartesian2D = Tuple[float, float] class Waypoint(NamedTuple): """A waypoint to feed into PurePursuit.build_path.""" x: float y: float #: Desired robot heading theta: f...
{"/autonomous/autonomous.py": ["/automations/alignment.py", "/automations/cargo.py", "/components/cargo.py", "/components/hatch.py", "/components/vision.py", "/utilities/pure_pursuit.py"], "/tests/test_vision.py": ["/components/vision.py"], "/automations/alignment.py": ["/automations/cargo.py", "/automations/hatch.py",...
65,894
orike122/pydeepspace
refs/heads/master
/tests/test_vision.py
from components.vision import Odometry, Vision from utilities.functions import rotate_vector import math import time class FakeImu: def __init__(self): self.angle = 0.0 def getAngle(self): return self.angle class FakeChassis: def __init__(self): self.odometry_x = 0.0 se...
{"/autonomous/autonomous.py": ["/automations/alignment.py", "/automations/cargo.py", "/components/cargo.py", "/components/hatch.py", "/components/vision.py", "/utilities/pure_pursuit.py"], "/tests/test_vision.py": ["/components/vision.py"], "/automations/alignment.py": ["/automations/cargo.py", "/automations/hatch.py",...
65,895
orike122/pydeepspace
refs/heads/master
/components/climb.py
import math import ctre import magicbot import rev import wpilib import wpilib_controller from utilities.navx import NavX class Lift: HEIGHT_PER_REV = 0.002 GROUND_CLEARANCE = -0.05 __slots__ = ("motor", "encoder", "forward_limit_switch") def __init__(self, motor: rev.CANSparkMax) -> None: ...
{"/autonomous/autonomous.py": ["/automations/alignment.py", "/automations/cargo.py", "/components/cargo.py", "/components/hatch.py", "/components/vision.py", "/utilities/pure_pursuit.py"], "/tests/test_vision.py": ["/components/vision.py"], "/automations/alignment.py": ["/automations/cargo.py", "/automations/hatch.py",...
65,896
orike122/pydeepspace
refs/heads/master
/automations/alignment.py
from magicbot import tunable from magicbot.state_machine import StateMachine, state from automations.cargo import CargoManager from automations.hatch import HatchAutomation from components.vision import Vision from pyswervedrive.chassis import SwerveChassis from utilities.functions import rotate_vector class Aligne...
{"/autonomous/autonomous.py": ["/automations/alignment.py", "/automations/cargo.py", "/components/cargo.py", "/components/hatch.py", "/components/vision.py", "/utilities/pure_pursuit.py"], "/tests/test_vision.py": ["/components/vision.py"], "/automations/alignment.py": ["/automations/cargo.py", "/automations/hatch.py",...
65,897
orike122/pydeepspace
refs/heads/master
/robot.py
#!/usr/bin/env python3 import enum import math import rev import ctre import magicbot import wpilib from automations.alignment import ( HatchIntakeAligner, HatchDepositAligner, CargoDepositAligner, ) from automations.cargo import CargoManager from automations.climb import ClimbAutomation from automations....
{"/autonomous/autonomous.py": ["/automations/alignment.py", "/automations/cargo.py", "/components/cargo.py", "/components/hatch.py", "/components/vision.py", "/utilities/pure_pursuit.py"], "/tests/test_vision.py": ["/components/vision.py"], "/automations/alignment.py": ["/automations/cargo.py", "/automations/hatch.py",...
65,898
orike122/pydeepspace
refs/heads/master
/automations/climb.py
from magicbot import StateMachine, state, timed_state from components.climb import Climber from components.cargo import CargoManipulator, Height from pyswervedrive.chassis import SwerveChassis class ClimbAutomation(StateMachine): chassis: SwerveChassis climber: Climber cargo_component: CargoManipulator ...
{"/autonomous/autonomous.py": ["/automations/alignment.py", "/automations/cargo.py", "/components/cargo.py", "/components/hatch.py", "/components/vision.py", "/utilities/pure_pursuit.py"], "/tests/test_vision.py": ["/components/vision.py"], "/automations/alignment.py": ["/automations/cargo.py", "/automations/hatch.py",...
65,899
orike122/pydeepspace
refs/heads/master
/automations/hatch.py
import math from magicbot import StateMachine, state from components.hatch import Hatch from pyswervedrive.chassis import SwerveChassis class HatchAutomation(StateMachine): chassis: SwerveChassis hatch: Hatch def __init__(self): super().__init__() self.fired_position = 0, 0 def gr...
{"/autonomous/autonomous.py": ["/automations/alignment.py", "/automations/cargo.py", "/components/cargo.py", "/components/hatch.py", "/components/vision.py", "/utilities/pure_pursuit.py"], "/tests/test_vision.py": ["/components/vision.py"], "/automations/alignment.py": ["/automations/cargo.py", "/automations/hatch.py",...
65,900
orike122/pydeepspace
refs/heads/master
/autonomous/test.py
from magicbot.state_machine import AutonomousStateMachine, state from pyswervedrive.chassis import SwerveChassis from utilities.navx import NavX from utilities.pure_pursuit import PurePursuit, Waypoint class TestPursuitAuto(AutonomousStateMachine): MODE_NAME = "Test Pursuit Auto" DEFAULT = False chassi...
{"/autonomous/autonomous.py": ["/automations/alignment.py", "/automations/cargo.py", "/components/cargo.py", "/components/hatch.py", "/components/vision.py", "/utilities/pure_pursuit.py"], "/tests/test_vision.py": ["/components/vision.py"], "/automations/alignment.py": ["/automations/cargo.py", "/automations/hatch.py",...
65,901
orike122/pydeepspace
refs/heads/master
/components/cargo.py
import enum import math import ctre import rev import wpilib from components.vision import Vision class Height(enum.Enum): FLOOR = 18.6 CARGO_SHIP = 0 LOADING_STATION = 0 class CargoManipulator: vision: Vision arm_motor: rev.CANSparkMax intake_motor: ctre.VictorSPX intake_switch: wp...
{"/autonomous/autonomous.py": ["/automations/alignment.py", "/automations/cargo.py", "/components/cargo.py", "/components/hatch.py", "/components/vision.py", "/utilities/pure_pursuit.py"], "/tests/test_vision.py": ["/components/vision.py"], "/automations/alignment.py": ["/automations/cargo.py", "/automations/hatch.py",...
65,902
orike122/pydeepspace
refs/heads/master
/automations/cargo.py
from magicbot import StateMachine, state, timed_state from components.cargo import CargoManipulator, Height from components.vision import Vision class CargoManager(StateMachine): cargo_component: CargoManipulator vision: Vision def on_disable(self): self.done() def intake_floor(self, force...
{"/autonomous/autonomous.py": ["/automations/alignment.py", "/automations/cargo.py", "/components/cargo.py", "/components/hatch.py", "/components/vision.py", "/utilities/pure_pursuit.py"], "/tests/test_vision.py": ["/components/vision.py"], "/automations/alignment.py": ["/automations/cargo.py", "/automations/hatch.py",...
65,903
orike122/pydeepspace
refs/heads/master
/components/hatch.py
import wpilib class Hatch: fingers: wpilib.DoubleSolenoid punchers: wpilib.Solenoid enable_piston: wpilib.DoubleSolenoid left_limit_switch: wpilib.DigitalInput right_limit_switch: wpilib.DigitalInput def setup(self): self.has_hatch = False self._fingers_state = wpilib.Double...
{"/autonomous/autonomous.py": ["/automations/alignment.py", "/automations/cargo.py", "/components/cargo.py", "/components/hatch.py", "/components/vision.py", "/utilities/pure_pursuit.py"], "/tests/test_vision.py": ["/components/vision.py"], "/automations/alignment.py": ["/automations/cargo.py", "/automations/hatch.py",...
65,918
wjt/fewerror
refs/heads/master
/fewerror/twitter/fmk.py
import enum import logging from .util import user_url log = logging.getLogger(__name__) def lang_base(lang): base, *rest = lang.split('-') return base class FMK(enum.Enum): '''Classification for new followers.''' FOLLOW_BACK = 1 NEUTRAL = 2 BLOCK = 3 def classify_user(api, whom, fetch_s...
{"/fewerror/twitter/fmk.py": ["/fewerror/twitter/util.py"], "/tests/test_state.py": ["/fewerror/state.py"], "/fewerror/telegram.py": ["/fewerror/__init__.py"], "/fewerror/twitter/__init__.py": ["/fewerror/__init__.py", "/fewerror/state.py", "/fewerror/util.py", "/fewerror/twitter/util.py", "/fewerror/twitter/fmk.py"], ...
65,919
wjt/fewerror
refs/heads/master
/tests/test_state.py
#!/usr/bin/env python from contextlib import contextmanager from datetime import datetime, timedelta from fewerror.state import State class Now: def __init__(self): self.now = datetime.now() def advance(self, td): self.now += td def __call__(self): return self.now @contextmanag...
{"/fewerror/twitter/fmk.py": ["/fewerror/twitter/util.py"], "/tests/test_state.py": ["/fewerror/state.py"], "/fewerror/telegram.py": ["/fewerror/__init__.py"], "/fewerror/twitter/__init__.py": ["/fewerror/__init__.py", "/fewerror/state.py", "/fewerror/util.py", "/fewerror/twitter/util.py", "/fewerror/twitter/fmk.py"], ...
65,920
wjt/fewerror
refs/heads/master
/fewerror/telegram.py
#!/usr/bin/env python3 # vim: fileencoding=utf-8 import argparse import logging import os import telegram from telegram.ext import ( Updater, CommandHandler, MessageHandler, Filters, ) from . import checkedshirt, find_corrections, format_reply log = logging.getLogger(__name__) def _context(message): """Jus...
{"/fewerror/twitter/fmk.py": ["/fewerror/twitter/util.py"], "/tests/test_state.py": ["/fewerror/state.py"], "/fewerror/telegram.py": ["/fewerror/__init__.py"], "/fewerror/twitter/__init__.py": ["/fewerror/__init__.py", "/fewerror/state.py", "/fewerror/util.py", "/fewerror/twitter/util.py", "/fewerror/twitter/fmk.py"], ...
65,921
wjt/fewerror
refs/heads/master
/fewerror/twitter/__init__.py
# coding=utf-8 import json import logging import logging.config import os import random import re import time import tweepy from tweepy.streaming import StreamListener from .. import find_corrections, format_reply from ..state import State from ..util import reverse_inits, OrderedSet from .util import user_url, statu...
{"/fewerror/twitter/fmk.py": ["/fewerror/twitter/util.py"], "/tests/test_state.py": ["/fewerror/state.py"], "/fewerror/telegram.py": ["/fewerror/__init__.py"], "/fewerror/twitter/__init__.py": ["/fewerror/__init__.py", "/fewerror/state.py", "/fewerror/util.py", "/fewerror/twitter/util.py", "/fewerror/twitter/fmk.py"], ...
65,922
wjt/fewerror
refs/heads/master
/fewerror/checkedshirt.py
import argparse import json import logging import os import raven from raven.handlers.logging import SentryHandler log = logging.getLogger(__name__) def add_arguments(parser): g = parser.add_argument_group('logging').add_mutually_exclusive_group() g.add_argument('--log-config', type=argpar...
{"/fewerror/twitter/fmk.py": ["/fewerror/twitter/util.py"], "/tests/test_state.py": ["/fewerror/state.py"], "/fewerror/telegram.py": ["/fewerror/__init__.py"], "/fewerror/twitter/__init__.py": ["/fewerror/__init__.py", "/fewerror/state.py", "/fewerror/util.py", "/fewerror/twitter/util.py", "/fewerror/twitter/fmk.py"], ...
65,923
wjt/fewerror
refs/heads/master
/fewerror/twitter/util.py
def user_url(user): return "https://twitter.com/{}".format(user.screen_name) def status_url(status): return "{}/status/{}".format(user_url(status.author), status.id)
{"/fewerror/twitter/fmk.py": ["/fewerror/twitter/util.py"], "/tests/test_state.py": ["/fewerror/state.py"], "/fewerror/telegram.py": ["/fewerror/__init__.py"], "/fewerror/twitter/__init__.py": ["/fewerror/__init__.py", "/fewerror/state.py", "/fewerror/util.py", "/fewerror/twitter/util.py", "/fewerror/twitter/fmk.py"], ...
65,924
wjt/fewerror
refs/heads/master
/tests/test_crashes.py
#!/usr/bin/env python import fewerror crashy_tweet = '''2x more likely to hire men than women, even when he's less capable http://t.co/XcovCXpsqC "We shouldn't sacrifice quality to hire women!"''' def test_not_crashing(): reply = fewerror.find_corrections(crashy_tweet) if reply: # if we get anythin...
{"/fewerror/twitter/fmk.py": ["/fewerror/twitter/util.py"], "/tests/test_state.py": ["/fewerror/state.py"], "/fewerror/telegram.py": ["/fewerror/__init__.py"], "/fewerror/twitter/__init__.py": ["/fewerror/__init__.py", "/fewerror/state.py", "/fewerror/util.py", "/fewerror/twitter/util.py", "/fewerror/twitter/fmk.py"], ...
65,925
wjt/fewerror
refs/heads/master
/cbdq/gnewline.py
#!/usr/bin/env python3 import argparse import json import re import sys import yaml skip_keys = frozenset(('QUOTE', 'SPACE', '00-SOURCE')) traceryish_rx = re.compile(r'#(\w+)(?:\.\w+)*#') def fmap(f, val): if isinstance(val, list): return [fmap(f, x) for x in val] else: return f(val) def s...
{"/fewerror/twitter/fmk.py": ["/fewerror/twitter/util.py"], "/tests/test_state.py": ["/fewerror/state.py"], "/fewerror/telegram.py": ["/fewerror/__init__.py"], "/fewerror/twitter/__init__.py": ["/fewerror/__init__.py", "/fewerror/state.py", "/fewerror/util.py", "/fewerror/twitter/util.py", "/fewerror/twitter/fmk.py"], ...
65,926
wjt/fewerror
refs/heads/master
/fewerror/twitter/__main__.py
#!/usr/bin/env python3 import argparse import logging import os import tweepy from . import auth_from_env, batch, stream from .. import checkedshirt log = logging.getLogger(__name__) def main(): var = os.path.abspath('var') parser = argparse.ArgumentParser() # Annoyingly you really do have to write ...
{"/fewerror/twitter/fmk.py": ["/fewerror/twitter/util.py"], "/tests/test_state.py": ["/fewerror/state.py"], "/fewerror/telegram.py": ["/fewerror/__init__.py"], "/fewerror/twitter/__init__.py": ["/fewerror/__init__.py", "/fewerror/state.py", "/fewerror/util.py", "/fewerror/twitter/util.py", "/fewerror/twitter/fmk.py"], ...
65,927
wjt/fewerror
refs/heads/master
/fewerror/twitter/batch.py
import argparse import glob import json import logging import os import re import time import tweepy from . import FMK, classify_user, user_url log = logging.getLogger(__name__) DEFAULT_BLOCK_TIMEOUT = 120 def add_user_args(parser): g = parser.add_mutually_exclusive_group(required=True) g.add_argument('-...
{"/fewerror/twitter/fmk.py": ["/fewerror/twitter/util.py"], "/tests/test_state.py": ["/fewerror/state.py"], "/fewerror/telegram.py": ["/fewerror/__init__.py"], "/fewerror/twitter/__init__.py": ["/fewerror/__init__.py", "/fewerror/state.py", "/fewerror/util.py", "/fewerror/twitter/util.py", "/fewerror/twitter/fmk.py"], ...
65,928
wjt/fewerror
refs/heads/master
/fewerror/thatsnotmybot.py
#!/usr/bin/env python3 import argparse import logging import os import re import textblob import tracery import tweepy import yaml from tracery.modifiers import base_english from fewerror.twitter import auth_from_env, status_url from fewerror import checkedshirt SOURCE = os.path.join(os.path.dirname(__file__), 'that...
{"/fewerror/twitter/fmk.py": ["/fewerror/twitter/util.py"], "/tests/test_state.py": ["/fewerror/state.py"], "/fewerror/telegram.py": ["/fewerror/__init__.py"], "/fewerror/twitter/__init__.py": ["/fewerror/__init__.py", "/fewerror/state.py", "/fewerror/util.py", "/fewerror/twitter/util.py", "/fewerror/twitter/fmk.py"], ...
65,929
wjt/fewerror
refs/heads/master
/tests/test_twitter.py
# vim: fileencoding=utf-8 import json import os import datetime as dt from unittest.mock import NonCallableMock import pytest from tweepy.models import User, Status, Relationship from tweepy.parsers import ModelParser from fewerror.twitter import get_sanitized_text, LessListener @pytest.mark.parametrize('filename,e...
{"/fewerror/twitter/fmk.py": ["/fewerror/twitter/util.py"], "/tests/test_state.py": ["/fewerror/state.py"], "/fewerror/telegram.py": ["/fewerror/__init__.py"], "/fewerror/twitter/__init__.py": ["/fewerror/__init__.py", "/fewerror/state.py", "/fewerror/util.py", "/fewerror/twitter/util.py", "/fewerror/twitter/fmk.py"], ...
65,930
wjt/fewerror
refs/heads/master
/fewerror/state.py
import datetime import dateutil.parser import json import logging import os from tempfile import NamedTemporaryFile log = logging.getLogger(__name__) class State(object): def __init__(self, filename, olde=None, now=datetime.datetime.utcnow, per_...
{"/fewerror/twitter/fmk.py": ["/fewerror/twitter/util.py"], "/tests/test_state.py": ["/fewerror/state.py"], "/fewerror/telegram.py": ["/fewerror/__init__.py"], "/fewerror/twitter/__init__.py": ["/fewerror/__init__.py", "/fewerror/state.py", "/fewerror/util.py", "/fewerror/twitter/util.py", "/fewerror/twitter/fmk.py"], ...
65,931
wjt/fewerror
refs/heads/master
/fewerror/get_oauth_token.py
#!/usr/bin/env python3 # vim: tw=79 import argparse import dotenv import logging import os import subprocess import tweepy from . import checkedshirt log = logging.getLogger(__name__) def main(): default_path = os.path.join(os.path.dirname(__file__), '..', ...
{"/fewerror/twitter/fmk.py": ["/fewerror/twitter/util.py"], "/tests/test_state.py": ["/fewerror/state.py"], "/fewerror/telegram.py": ["/fewerror/__init__.py"], "/fewerror/twitter/__init__.py": ["/fewerror/__init__.py", "/fewerror/state.py", "/fewerror/util.py", "/fewerror/twitter/util.py", "/fewerror/twitter/fmk.py"], ...
65,932
wjt/fewerror
refs/heads/master
/fewerror/__init__.py
# coding=utf-8 import logging from textblob import TextBlob, Word from nltk.corpus.reader import WordListCorpusReader from .util import OrderedSet log = logging.getLogger(__name__) def furthermore(qs): if len(qs) > 1: return "{}, and furthermore {}".format( ", ".join(qs[:-1]), q...
{"/fewerror/twitter/fmk.py": ["/fewerror/twitter/util.py"], "/tests/test_state.py": ["/fewerror/state.py"], "/fewerror/telegram.py": ["/fewerror/__init__.py"], "/fewerror/twitter/__init__.py": ["/fewerror/__init__.py", "/fewerror/state.py", "/fewerror/util.py", "/fewerror/twitter/util.py", "/fewerror/twitter/fmk.py"], ...
65,933
wjt/fewerror
refs/heads/master
/tests/test_grammar.py
# vim: fileencoding=utf-8 import fewerror import codecs import string import pytest from textblob import TextBlob true_positives = [ (u"I don't know whether I find the Believe.in thing more or less offensive than Tesco Clubcard sending HTML with `text/plain`", 'more or fewer offensive', ), pytest....
{"/fewerror/twitter/fmk.py": ["/fewerror/twitter/util.py"], "/tests/test_state.py": ["/fewerror/state.py"], "/fewerror/telegram.py": ["/fewerror/__init__.py"], "/fewerror/twitter/__init__.py": ["/fewerror/__init__.py", "/fewerror/state.py", "/fewerror/util.py", "/fewerror/twitter/util.py", "/fewerror/twitter/fmk.py"], ...
65,934
wjt/fewerror
refs/heads/master
/fewerror/util.py
import collections import collections.abc def reverse_inits(xs): for i in range(len(xs), 0, -1): yield xs[:i] class OrderedSet(collections.abc.MutableSet): def __init__(self, it=()): super(OrderedSet, self).__init__() self._map = collections.OrderedDict((x, None) for x in it) d...
{"/fewerror/twitter/fmk.py": ["/fewerror/twitter/util.py"], "/tests/test_state.py": ["/fewerror/state.py"], "/fewerror/telegram.py": ["/fewerror/__init__.py"], "/fewerror/twitter/__init__.py": ["/fewerror/__init__.py", "/fewerror/state.py", "/fewerror/util.py", "/fewerror/twitter/util.py", "/fewerror/twitter/fmk.py"], ...
65,935
wjt/fewerror
refs/heads/master
/tests/test_thatsnotmybot.py
import os import yaml import pytest from unittest.mock import MagicMock, call from fewerror.thatsnotmybot import ThatsNotMyBot def test_validate(): ThatsNotMyBot() def test_generate(): ThatsNotMyBot().generate() def test_argparse(): ThatsNotMyBot().main([]) @pytest.mark.parametrize('initial_state,i...
{"/fewerror/twitter/fmk.py": ["/fewerror/twitter/util.py"], "/tests/test_state.py": ["/fewerror/state.py"], "/fewerror/telegram.py": ["/fewerror/__init__.py"], "/fewerror/twitter/__init__.py": ["/fewerror/__init__.py", "/fewerror/state.py", "/fewerror/util.py", "/fewerror/twitter/util.py", "/fewerror/twitter/fmk.py"], ...
65,956
timhebert1963/distance-between-two-cities
refs/heads/master
/distance_between_two_cities.py
from functions_distance_between_two_cities import * import os def main(): ''' a googlemaps geocode api_key is needed to run this script 2 youtube links which explain how to get the api_key and set environment variables https://www.youtube.com/watch?v=1MVDIFShE5Q https://www.youtube.co...
{"/distance_between_two_cities.py": ["/functions_distance_between_two_cities.py"]}
65,957
timhebert1963/distance-between-two-cities
refs/heads/master
/functions_distance_between_two_cities.py
from math import sin, cos, sqrt, atan2, radians #from modules_distance_between_two_cities import * from Tim_common import * import os import googlemaps def display_state_abbr(): print(" State Abbreviations:") print('\n') print(" {:2s} : {:15s} {:2s} : {:15s} {:2s} : {:15s} {:2s} : {:1...
{"/distance_between_two_cities.py": ["/functions_distance_between_two_cities.py"]}
65,962
fjelltopp/meerkat_abacus
refs/heads/development
/meerkat_abacus/pipeline_worker/tests/test_add_multiple_alerts.py
import unittest from unittest import mock from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from datetime import datetime from meerkat_abacus import model from meerkat_abacus.pipeline_worker.process_steps import add_multiple_alerts from meerkat_abacus.pipeline_worker.process_steps import wri...
{"/meerkat_abacus/pipeline_worker/tests/test_add_multiple_alerts.py": ["/meerkat_abacus/__init__.py", "/meerkat_abacus/pipeline_worker/process_steps/__init__.py", "/meerkat_abacus/consumer/database_setup.py", "/meerkat_abacus/config.py"], "/meerkat_abacus/pipeline_worker/tests/send_alerts_test.py": ["/meerkat_abacus/__...
65,963
fjelltopp/meerkat_abacus
refs/heads/development
/meerkat_abacus/pipeline_worker/tests/send_alerts_test.py
import unittest from unittest import mock from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from datetime import datetime from meerkat_abacus import model from meerkat_abacus.pipeline_worker.process_steps.send_alerts import SendAlerts from meerkat_abacus.consumer.database_setup import create...
{"/meerkat_abacus/pipeline_worker/tests/test_add_multiple_alerts.py": ["/meerkat_abacus/__init__.py", "/meerkat_abacus/pipeline_worker/process_steps/__init__.py", "/meerkat_abacus/consumer/database_setup.py", "/meerkat_abacus/config.py"], "/meerkat_abacus/pipeline_worker/tests/send_alerts_test.py": ["/meerkat_abacus/__...
65,964
fjelltopp/meerkat_abacus
refs/heads/development
/meerkat_abacus/pipeline_worker/pipeline.py
""" Main pipeline for abacus """ import datetime from meerkat_abacus import model from meerkat_abacus.pipeline_worker.process_steps.quality_control import QualityControl from meerkat_abacus.pipeline_worker.process_steps.write_to_db import WriteToDb from meerkat_abacus.pipeline_worker.process_steps.add_links import Ad...
{"/meerkat_abacus/pipeline_worker/tests/test_add_multiple_alerts.py": ["/meerkat_abacus/__init__.py", "/meerkat_abacus/pipeline_worker/process_steps/__init__.py", "/meerkat_abacus/consumer/database_setup.py", "/meerkat_abacus/config.py"], "/meerkat_abacus/pipeline_worker/tests/send_alerts_test.py": ["/meerkat_abacus/__...
65,965
fjelltopp/meerkat_abacus
refs/heads/development
/meerkat_abacus/consul_export.py
import json import logging import os import sys import pathlib import boto3 import botocore from time import sleep from meerkat_libs import consul_client from meerkat_abacus.util import get_db_engine from meerkat_abacus.util.authenticate import abacus_auth_token import meerkat_abacus.model as abacus_model from sqlal...
{"/meerkat_abacus/pipeline_worker/tests/test_add_multiple_alerts.py": ["/meerkat_abacus/__init__.py", "/meerkat_abacus/pipeline_worker/process_steps/__init__.py", "/meerkat_abacus/consumer/database_setup.py", "/meerkat_abacus/config.py"], "/meerkat_abacus/pipeline_worker/tests/send_alerts_test.py": ["/meerkat_abacus/__...
65,966
fjelltopp/meerkat_abacus
refs/heads/development
/meerkat_abacus/util/fake_data_to_form.py
import pyxform from meerkat_abacus.config import config country_config = config.country_config from pyxform import builder, xls2json from pyxform.utils import has_external_choices, sheet_to_csv for form in country_config["fake_data"].keys(): json_survey = { 'type': 'survey', 'name': form, 'title': f...
{"/meerkat_abacus/pipeline_worker/tests/test_add_multiple_alerts.py": ["/meerkat_abacus/__init__.py", "/meerkat_abacus/pipeline_worker/process_steps/__init__.py", "/meerkat_abacus/consumer/database_setup.py", "/meerkat_abacus/config.py"], "/meerkat_abacus/pipeline_worker/tests/send_alerts_test.py": ["/meerkat_abacus/__...
65,967
fjelltopp/meerkat_abacus
refs/heads/development
/meerkat_abacus/util/epi_week.py
from collections import defaultdict from datetime import datetime, timedelta from meerkat_abacus.config import config country_config = config.country_config def __handle_epi_week_53(epi_year, epi_week_53_strategy=country_config.get("epi_week_53_strategy", ...
{"/meerkat_abacus/pipeline_worker/tests/test_add_multiple_alerts.py": ["/meerkat_abacus/__init__.py", "/meerkat_abacus/pipeline_worker/process_steps/__init__.py", "/meerkat_abacus/consumer/database_setup.py", "/meerkat_abacus/config.py"], "/meerkat_abacus/pipeline_worker/tests/send_alerts_test.py": ["/meerkat_abacus/__...
65,968
fjelltopp/meerkat_abacus
refs/heads/development
/meerkat_abacus/util/create_fake_data.py
""" Functionality to create fake data """ import random import datetime import uuid from meerkat_abacus import util from meerkat_abacus import model from meerkat_abacus import logger random.seed(1) def get_value(field, data): """ Takes a field and returns the value A field is a dict with a key that...
{"/meerkat_abacus/pipeline_worker/tests/test_add_multiple_alerts.py": ["/meerkat_abacus/__init__.py", "/meerkat_abacus/pipeline_worker/process_steps/__init__.py", "/meerkat_abacus/consumer/database_setup.py", "/meerkat_abacus/config.py"], "/meerkat_abacus/pipeline_worker/tests/send_alerts_test.py": ["/meerkat_abacus/__...
65,969
fjelltopp/meerkat_abacus
refs/heads/development
/meerkat_abacus/pipeline_worker/tests/test_initial_visit_control.py
import unittest from unittest.mock import patch from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from datetime import datetime from meerkat_abacus.config import config from meerkat_abacus import model from meerkat_abacus.pipeline_worker.process_steps import initial_visit_control from meerka...
{"/meerkat_abacus/pipeline_worker/tests/test_add_multiple_alerts.py": ["/meerkat_abacus/__init__.py", "/meerkat_abacus/pipeline_worker/process_steps/__init__.py", "/meerkat_abacus/consumer/database_setup.py", "/meerkat_abacus/config.py"], "/meerkat_abacus/pipeline_worker/tests/send_alerts_test.py": ["/meerkat_abacus/__...
65,970
fjelltopp/meerkat_abacus
refs/heads/development
/meerkat_abacus/consumer/tests/__init__.py
""" Meerkat Abacus Test Unit tests Meerkat Abacus """ from unittest import mock import random import unittest from meerkat_abacus.consumer import get_data from meerkat_abacus.config import config as param_config class TestConsumer(unittest.TestCase): def setUp(self): pass def tearDown(self): ...
{"/meerkat_abacus/pipeline_worker/tests/test_add_multiple_alerts.py": ["/meerkat_abacus/__init__.py", "/meerkat_abacus/pipeline_worker/process_steps/__init__.py", "/meerkat_abacus/consumer/database_setup.py", "/meerkat_abacus/config.py"], "/meerkat_abacus/pipeline_worker/tests/send_alerts_test.py": ["/meerkat_abacus/__...
65,971
fjelltopp/meerkat_abacus
refs/heads/development
/meerkat_abacus/util/datetime_helper.py
import datetime SUBMISSION_DATE_FORMAT = "%b %d, %Y %H:%M:%S %p" PSQL_SUBMISSION_DATE_FORMAT = "Mon DD, YYYY HH:MI:SS AM" PSQL_VISIT_DATE_FORMAT = "Mon DD, YYYY" def strptime(date_string): return datetime.datetime.strptime(date_string, SUBMISSION_DATE_FORMAT)
{"/meerkat_abacus/pipeline_worker/tests/test_add_multiple_alerts.py": ["/meerkat_abacus/__init__.py", "/meerkat_abacus/pipeline_worker/process_steps/__init__.py", "/meerkat_abacus/consumer/database_setup.py", "/meerkat_abacus/config.py"], "/meerkat_abacus/pipeline_worker/tests/send_alerts_test.py": ["/meerkat_abacus/__...
65,972
fjelltopp/meerkat_abacus
refs/heads/development
/meerkat_abacus/pipeline_worker/process_steps/write_to_db.py
from meerkat_abacus.pipeline_worker.process_steps import ProcessingStep from meerkat_abacus import model class WriteToDb(ProcessingStep): def __init__(self, param_config, session): super().__init__() self.step_name = "write_to_db" config = { "delete": {"data": "type", ...
{"/meerkat_abacus/pipeline_worker/tests/test_add_multiple_alerts.py": ["/meerkat_abacus/__init__.py", "/meerkat_abacus/pipeline_worker/process_steps/__init__.py", "/meerkat_abacus/consumer/database_setup.py", "/meerkat_abacus/config.py"], "/meerkat_abacus/pipeline_worker/tests/send_alerts_test.py": ["/meerkat_abacus/__...
65,973
fjelltopp/meerkat_abacus
refs/heads/development
/meerkat_abacus/pipeline_worker/process_steps/__init__.py
from abc import abstractmethod import cProfile, pstats, io import datetime from meerkat_abacus import model from meerkat_abacus import logger class ProcessingStep(object): """ Base class for all ProcessingSteps """ def __init__(self): self.step_name = "processing_step" self.session ...
{"/meerkat_abacus/pipeline_worker/tests/test_add_multiple_alerts.py": ["/meerkat_abacus/__init__.py", "/meerkat_abacus/pipeline_worker/process_steps/__init__.py", "/meerkat_abacus/consumer/database_setup.py", "/meerkat_abacus/config.py"], "/meerkat_abacus/pipeline_worker/tests/send_alerts_test.py": ["/meerkat_abacus/__...
65,974
fjelltopp/meerkat_abacus
refs/heads/development
/meerkat_abacus/util/__init__.py
""" Various utility functions for meerkat abacus """ import csv import itertools import boto3 from xmljson import badgerfish as bf from lxml.html import Element, tostring import requests from requests.auth import HTTPDigestAuth from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker, scoped_sessi...
{"/meerkat_abacus/pipeline_worker/tests/test_add_multiple_alerts.py": ["/meerkat_abacus/__init__.py", "/meerkat_abacus/pipeline_worker/process_steps/__init__.py", "/meerkat_abacus/consumer/database_setup.py", "/meerkat_abacus/config.py"], "/meerkat_abacus/pipeline_worker/tests/send_alerts_test.py": ["/meerkat_abacus/__...
65,975
fjelltopp/meerkat_abacus
refs/heads/development
/meerkat_abacus/pipeline_worker/tests/test_to_codes_step.py
import unittest from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from datetime import datetime from meerkat_abacus import model from meerkat_abacus.pipeline_worker.process_steps import to_codes from meerkat_abacus.consumer.database_setup import create_db from meerkat_abacus.config import co...
{"/meerkat_abacus/pipeline_worker/tests/test_add_multiple_alerts.py": ["/meerkat_abacus/__init__.py", "/meerkat_abacus/pipeline_worker/process_steps/__init__.py", "/meerkat_abacus/consumer/database_setup.py", "/meerkat_abacus/config.py"], "/meerkat_abacus/pipeline_worker/tests/send_alerts_test.py": ["/meerkat_abacus/__...
65,976
fjelltopp/meerkat_abacus
refs/heads/development
/meerkat_abacus/pipeline_worker/tests/test_to_data_type.py
import unittest from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from meerkat_abacus.config import config from meerkat_abacus import model from meerkat_abacus.pipeline_worker.process_steps import to_data_type from meerkat_abacus.consumer.database_setup import create_db class TestToDataType...
{"/meerkat_abacus/pipeline_worker/tests/test_add_multiple_alerts.py": ["/meerkat_abacus/__init__.py", "/meerkat_abacus/pipeline_worker/process_steps/__init__.py", "/meerkat_abacus/consumer/database_setup.py", "/meerkat_abacus/config.py"], "/meerkat_abacus/pipeline_worker/tests/send_alerts_test.py": ["/meerkat_abacus/__...
65,977
fjelltopp/meerkat_abacus
refs/heads/development
/meerkat_abacus/pipeline_worker/tests/variable_test.py
import unittest from meerkat_abacus import model from meerkat_abacus.codes.variable import Variable positive = { "applicable": 1, "value": 1 } negative = { "applicable": 0, "value": 0 } class VariableTest(unittest.TestCase): """ Tests to check that Variables class gives the correct...
{"/meerkat_abacus/pipeline_worker/tests/test_add_multiple_alerts.py": ["/meerkat_abacus/__init__.py", "/meerkat_abacus/pipeline_worker/process_steps/__init__.py", "/meerkat_abacus/consumer/database_setup.py", "/meerkat_abacus/config.py"], "/meerkat_abacus/pipeline_worker/tests/send_alerts_test.py": ["/meerkat_abacus/__...
65,978
fjelltopp/meerkat_abacus
refs/heads/development
/meerkat_abacus/pipeline_worker/tests/to_codes_test.py
import unittest from meerkat_abacus import model from meerkat_abacus.codes.to_codes import to_code from meerkat_abacus.codes.variable import Variable from geoalchemy2.shape import from_shape from shapely.geometry import Polygon # Data for the tests class ToCodeTest(unittest.TestCase): """ Test the to_code fun...
{"/meerkat_abacus/pipeline_worker/tests/test_add_multiple_alerts.py": ["/meerkat_abacus/__init__.py", "/meerkat_abacus/pipeline_worker/process_steps/__init__.py", "/meerkat_abacus/consumer/database_setup.py", "/meerkat_abacus/config.py"], "/meerkat_abacus/pipeline_worker/tests/send_alerts_test.py": ["/meerkat_abacus/__...
65,979
fjelltopp/meerkat_abacus
refs/heads/development
/meerkat_abacus/pipeline_worker/tests/test_quality_control.py
import unittest from unittest.mock import patch from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from datetime import datetime import meerkat_abacus from meerkat_abacus.config import config from meerkat_abacus import model from meerkat_abacus.pipeline_worker.process_steps import quality_con...
{"/meerkat_abacus/pipeline_worker/tests/test_add_multiple_alerts.py": ["/meerkat_abacus/__init__.py", "/meerkat_abacus/pipeline_worker/process_steps/__init__.py", "/meerkat_abacus/consumer/database_setup.py", "/meerkat_abacus/config.py"], "/meerkat_abacus/pipeline_worker/tests/send_alerts_test.py": ["/meerkat_abacus/__...
65,980
fjelltopp/meerkat_abacus
refs/heads/development
/meerkat_abacus/config.py
""" Configuration file for meerkat_abacus This configuration file sets up application level configurations and imports the country specific configurations. Many of the application level configurations can be overwritten by environemental variables: MEERKAT_ABACUS_DB_URL: db_url DATA_DIRECTORY: path to directory whe...
{"/meerkat_abacus/pipeline_worker/tests/test_add_multiple_alerts.py": ["/meerkat_abacus/__init__.py", "/meerkat_abacus/pipeline_worker/process_steps/__init__.py", "/meerkat_abacus/consumer/database_setup.py", "/meerkat_abacus/config.py"], "/meerkat_abacus/pipeline_worker/tests/send_alerts_test.py": ["/meerkat_abacus/__...
65,981
fjelltopp/meerkat_abacus
refs/heads/development
/meerkat_abacus/country_config/demo_config.py
""" Config for Demo Location """ import datetime s3_bucket = False country_config = { "country_name": "Demo", "tables": [ "demo_case", "demo_alert", "demo_register", # "plague_data" ], "pipeline": ["quality_control", "initial_visit_control", "write_to_db"...
{"/meerkat_abacus/pipeline_worker/tests/test_add_multiple_alerts.py": ["/meerkat_abacus/__init__.py", "/meerkat_abacus/pipeline_worker/process_steps/__init__.py", "/meerkat_abacus/consumer/database_setup.py", "/meerkat_abacus/config.py"], "/meerkat_abacus/pipeline_worker/tests/send_alerts_test.py": ["/meerkat_abacus/__...