index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
50,609
vamshivarsa/game_store_website_django
refs/heads/master
/games/viewsold.py
from django.shortcuts import render from django.http import HttpResponse,Http404 from .models import Game def index(request): all_games=Game.objects.all() return render(request,'games/gameindex.html', {'all_games':all_games}) #old format withou out render(here we ...
{"/todolist/views.py": ["/todolist/models.py"], "/games/viewsold.py": ["/games/models.py"], "/games/views.py": ["/games/models.py"]}
50,610
vamshivarsa/game_store_website_django
refs/heads/master
/games/urls.py
from django.contrib import admin from django.urls import path,re_path from .import views urlpatterns = [ path('', views.IndexView.as_view(), name='index'), re_path(r'^(?P<pk>[0-9]+)/$', views.DetailView.as_view(), name='index'), ]
{"/todolist/views.py": ["/todolist/models.py"], "/games/viewsold.py": ["/games/models.py"], "/games/views.py": ["/games/models.py"]}
50,611
vamshivarsa/game_store_website_django
refs/heads/master
/games/views.py
from django.views import generic from .models import Game class IndexView(generic.ListView): template_name = 'games/gameindex.html' def get_queryset(self): return Game.objects.all() class DetailView(generic.DetailView): model = Game template_name = 'games/404error.html'
{"/todolist/views.py": ["/todolist/models.py"], "/games/viewsold.py": ["/games/models.py"], "/games/views.py": ["/games/models.py"]}
50,612
vamshivarsa/game_store_website_django
refs/heads/master
/todolist/models.py
from django.db import models # Create your models here. class TodoItem(models.Model): def __str__(self): return self.field field = models.TextField()
{"/todolist/views.py": ["/todolist/models.py"], "/games/viewsold.py": ["/games/models.py"], "/games/views.py": ["/games/models.py"]}
50,613
vamshivarsa/game_store_website_django
refs/heads/master
/games/models.py
from django.db import models class Game(models.Model): def __str__(self): return self.name + '-' + self.game_type + '-' + self.price name = models.CharField(max_length=1000) game_type=models.CharField(max_length=1000) price = models.CharField(max_length=1000) game_img = models.CharFiel...
{"/todolist/views.py": ["/todolist/models.py"], "/games/viewsold.py": ["/games/models.py"], "/games/views.py": ["/games/models.py"]}
50,614
vjkuznetsov/heroku-telegram-bot
refs/heads/master
/search_engine.py
import wikipedia from cinema_bot_exception import CinemaBotException from serpapi.google_search_results import GoogleSearchResults WATCH_QUERY_FIXTURE = r"смотреть онлайн" POSTER_QUERY_FIXTURE = r"постер" INFO_PREFIX = r"фильм" # cfg (depends on serp api format) WATCH_RESULT = "organic_results" WATCH_CATEGORY = "lin...
{"/bot.py": ["/search_engine.py"]}
50,615
vjkuznetsov/heroku-telegram-bot
refs/heads/master
/bot.py
import datetime import os import telebot import urllib import yaml import search_engine from io import BytesIO from cinema_bot_exception import CinemaBotException WELCOME_MESSAGE = r""" Hello, i'm cinemabot by Vladimir Kuznetsov (v.j.kuznetsov@gmail.com) Allowed coomands: /find - looking for a link to watching a mo...
{"/bot.py": ["/search_engine.py"]}
50,616
mkilli83/twitter-classifier
refs/heads/master
/src/core.py
# -*- coding: utf-8 -*- import datetime import re from pprint import pformat import GetOldTweets3 as got import pandas as pd from src.utils import Timer, load_csv, paths USE_TWEETS_COLS = ["username", "formatted_date", "cleaned_text", "text"] PRE_PROCESSING_OPTIONS = { # custom "lower_string": True, ...
{"/src/core.py": ["/src/utils.py"]}
50,617
mkilli83/twitter-classifier
refs/heads/master
/src/utils.py
import logging import os import pickle from datetime import datetime as dt from time import time import matplotlib.pyplot as plt import numpy as np import pandas as pd from sklearn.metrics import confusion_matrix from sklearn.utils.multiclass import unique_labels plt.style.use("ggplot") def load_csv(file_name, list_...
{"/src/core.py": ["/src/utils.py"]}
50,639
dokhiem/pythonweb-site
refs/heads/master
/blog/models.py
from django.db import models from django.conf import settings # Create your models here. class Post(models.Model): title=models.CharField(max_length=100) body=models.TextField() date=models.DateTimeField(auto_now_add=True) image=models.ImageField(null=True) def __str__(self): return self.tit...
{"/blog/views.py": ["/blog/models.py"]}
50,640
dokhiem/pythonweb-site
refs/heads/master
/blog/views.py
#from blog.forms import CommentForm from msilib.schema import ListView from tempfile import template from django.shortcuts import get_object_or_404, render from .models import Post, Comment from .forms import CommentForm from django.http import Http404,HttpResponseRedirect from django.views.generic import ListView,Deta...
{"/blog/views.py": ["/blog/models.py"]}
50,646
PanDa1G1/sunsecScanner
refs/heads/master
/sql_injection/union.py
# -*- coding: UTF-8 -*- from difflib import SequenceMatcher import requests import sys from urllib import parse import re import aiohttp from colorama import Fore, Style, Back class ScanUnion(): def __init__(self,url,method = "GET",file = "sql_injection/payload/header.txt"): self.url = url self.field_count = 0 ...
{"/src/Ipscan.py": ["/src/_print.py"], "/src/fuzz.py": ["/src/_print.py"], "/src/port_scan.py": ["/src/_print.py"], "/src/scan.py": ["/src/_print.py"], "/main.py": ["/src/scan.py", "/src/_print.py", "/src/fuzz.py", "/src/Ipscan.py", "/sql_injection/union.py", "/sql_injection/error_inject.py", "/sql_injection/Boolen_sca...
50,647
PanDa1G1/sunsecScanner
refs/heads/master
/ssrf/ssrf.py
import requests import re import sys import asyncio from aiohttp import ClientSession from difflib import SequenceMatcher from urllib.parse import quote from colorama import Fore, Style, Back class ssrfScan(): def __init__(self,url,remoteFile=None,num=100): self.url = url self.headers = { ...
{"/src/Ipscan.py": ["/src/_print.py"], "/src/fuzz.py": ["/src/_print.py"], "/src/port_scan.py": ["/src/_print.py"], "/src/scan.py": ["/src/_print.py"], "/main.py": ["/src/scan.py", "/src/_print.py", "/src/fuzz.py", "/src/Ipscan.py", "/sql_injection/union.py", "/sql_injection/error_inject.py", "/sql_injection/Boolen_sca...
50,648
PanDa1G1/sunsecScanner
refs/heads/master
/sunTest/sunTest/pipelines.py
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html class SuntestPipeline(object): def process_item(self, item, spider): result = dict(item) #print("[6]",result,...
{"/src/Ipscan.py": ["/src/_print.py"], "/src/fuzz.py": ["/src/_print.py"], "/src/port_scan.py": ["/src/_print.py"], "/src/scan.py": ["/src/_print.py"], "/main.py": ["/src/scan.py", "/src/_print.py", "/src/fuzz.py", "/src/Ipscan.py", "/sql_injection/union.py", "/sql_injection/error_inject.py", "/sql_injection/Boolen_sca...
50,649
PanDa1G1/sunsecScanner
refs/heads/master
/src/Ipscan.py
import queue import socket import threading import time from src._print import _print class Ipscan(): def __init__(self,url,thread_num = 100): self.host = url self.thread_num = thread_num self.queue = queue.Queue() self.queue2 = queue.Queue() self._print = _print() ...
{"/src/Ipscan.py": ["/src/_print.py"], "/src/fuzz.py": ["/src/_print.py"], "/src/port_scan.py": ["/src/_print.py"], "/src/scan.py": ["/src/_print.py"], "/main.py": ["/src/scan.py", "/src/_print.py", "/src/fuzz.py", "/src/Ipscan.py", "/sql_injection/union.py", "/sql_injection/error_inject.py", "/sql_injection/Boolen_sca...
50,650
PanDa1G1/sunsecScanner
refs/heads/master
/sunTest/sunTest/middlewares.py
# -*- coding: utf-8 -*- # Define here the models for your spider middleware # # See documentation in: # https://doc.scrapy.org/en/latest/topics/spider-middleware.html from scrapy import signals from selenium.common.exceptions import NoAlertPresentException from selenium.common.exceptions import NoSuchElementException...
{"/src/Ipscan.py": ["/src/_print.py"], "/src/fuzz.py": ["/src/_print.py"], "/src/port_scan.py": ["/src/_print.py"], "/src/scan.py": ["/src/_print.py"], "/main.py": ["/src/scan.py", "/src/_print.py", "/src/fuzz.py", "/src/Ipscan.py", "/sql_injection/union.py", "/sql_injection/error_inject.py", "/sql_injection/Boolen_sca...
50,651
PanDa1G1/sunsecScanner
refs/heads/master
/sql_injection/test/test1.py
# -*- coding: UTF-8 -*- from difflib import SequenceMatcher import requests import sys from urllib import parse import re import aiohttp from aiohttp import ClientSession import asyncio import json import time url = "http://127.0.0.1/sqli-labs-master/Less-9/?id=1'and(sleep(if(!(select(aScii(suBstr('867546938',2,1))<>5...
{"/src/Ipscan.py": ["/src/_print.py"], "/src/fuzz.py": ["/src/_print.py"], "/src/port_scan.py": ["/src/_print.py"], "/src/scan.py": ["/src/_print.py"], "/main.py": ["/src/scan.py", "/src/_print.py", "/src/fuzz.py", "/src/Ipscan.py", "/sql_injection/union.py", "/sql_injection/error_inject.py", "/sql_injection/Boolen_sca...
50,652
PanDa1G1/sunsecScanner
refs/heads/master
/sql_injection/error_inject.py
import asyncio import aiohttp from aiohttp import ClientSession from urllib import parse import re import sys import os from colorama import Fore, Style, Back from concurrent.futures import CancelledError class error_inject(): def __init__(self,url,method = "GET",headers = "sql_injection/payload/header.txt",payl...
{"/src/Ipscan.py": ["/src/_print.py"], "/src/fuzz.py": ["/src/_print.py"], "/src/port_scan.py": ["/src/_print.py"], "/src/scan.py": ["/src/_print.py"], "/main.py": ["/src/scan.py", "/src/_print.py", "/src/fuzz.py", "/src/Ipscan.py", "/sql_injection/union.py", "/sql_injection/error_inject.py", "/sql_injection/Boolen_sca...
50,653
PanDa1G1/sunsecScanner
refs/heads/master
/sunTest/sunTest/spiders/quotes.py
# -*- coding: utf-8 -*- import scrapy import re from sunTest.items import SuntestItem from bloom_filter import BloomFilter class QuotesSpider(scrapy.Spider): name = 'quotes' allowed_domains = [] start_urls = ['http://127.0.0.1/php/1.php'] def __init__(self): self.spiderUlrs=[] self.whiteList=["php","asp"] ...
{"/src/Ipscan.py": ["/src/_print.py"], "/src/fuzz.py": ["/src/_print.py"], "/src/port_scan.py": ["/src/_print.py"], "/src/scan.py": ["/src/_print.py"], "/main.py": ["/src/scan.py", "/src/_print.py", "/src/fuzz.py", "/src/Ipscan.py", "/sql_injection/union.py", "/sql_injection/error_inject.py", "/sql_injection/Boolen_sca...
50,654
PanDa1G1/sunsecScanner
refs/heads/master
/sql_injection/Boolen_scan.py
import requests from difflib import SequenceMatcher from colorama import Fore, Style, Back from urllib import parse import threading import queue import sys class Boolen_Scan(): def __init__(self,url,method = "GET",file = "sql_injection/payload/header.txt",string = "",not_string = "",thread_num = 50,payload_num =...
{"/src/Ipscan.py": ["/src/_print.py"], "/src/fuzz.py": ["/src/_print.py"], "/src/port_scan.py": ["/src/_print.py"], "/src/scan.py": ["/src/_print.py"], "/main.py": ["/src/scan.py", "/src/_print.py", "/src/fuzz.py", "/src/Ipscan.py", "/sql_injection/union.py", "/sql_injection/error_inject.py", "/sql_injection/Boolen_sca...
50,655
PanDa1G1/sunsecScanner
refs/heads/master
/sql_injection/time_scan.py
import requests from colorama import Fore, Style, Back from urllib import parse import threading import queue import time import sys class Time_scan(): def __init__(self,url,method = "GET",file = "sql_injection/payload/header.txt",thread_num = 50,payload_num = 10,wait_time=5): self.url = url self...
{"/src/Ipscan.py": ["/src/_print.py"], "/src/fuzz.py": ["/src/_print.py"], "/src/port_scan.py": ["/src/_print.py"], "/src/scan.py": ["/src/_print.py"], "/main.py": ["/src/scan.py", "/src/_print.py", "/src/fuzz.py", "/src/Ipscan.py", "/sql_injection/union.py", "/sql_injection/error_inject.py", "/sql_injection/Boolen_sca...
50,656
PanDa1G1/sunsecScanner
refs/heads/master
/src/fuzz.py
import asyncio from aiohttp import ClientSession import requests import hashlib import aiohttp from src._print import _print import time import io from difflib import SequenceMatcher class Fuzz(set): def __init__(self,url): self.url = url.split('?')[0] self.queue1 = asyncio.Queue() self.queue2 = asyncio.Queu...
{"/src/Ipscan.py": ["/src/_print.py"], "/src/fuzz.py": ["/src/_print.py"], "/src/port_scan.py": ["/src/_print.py"], "/src/scan.py": ["/src/_print.py"], "/main.py": ["/src/scan.py", "/src/_print.py", "/src/fuzz.py", "/src/Ipscan.py", "/sql_injection/union.py", "/sql_injection/error_inject.py", "/sql_injection/Boolen_sca...
50,657
PanDa1G1/sunsecScanner
refs/heads/master
/src/test.py
# -*- coding: UTF-8 -*- import sqlite3 from urllib import parse import requests from bs4 import BeautifulSoup from _print import _print import os import time import re class FingerScan(set): def __init__(self,url,db): self._print = _print() self.url = url self.headers = {'UserAgent':'Mozilla/5.0 (Windows; U;...
{"/src/Ipscan.py": ["/src/_print.py"], "/src/fuzz.py": ["/src/_print.py"], "/src/port_scan.py": ["/src/_print.py"], "/src/scan.py": ["/src/_print.py"], "/main.py": ["/src/scan.py", "/src/_print.py", "/src/fuzz.py", "/src/Ipscan.py", "/sql_injection/union.py", "/sql_injection/error_inject.py", "/sql_injection/Boolen_sca...
50,658
PanDa1G1/sunsecScanner
refs/heads/master
/src/port_scan.py
import nmap import queue import threading from src._print import _print import socket import time class myThread(): def __init__(self,host,port,thread_num = 100): self.host = host self._print = _print() self.port = port self.q = queue.Queue() self.timeout = 0.1 self.threads = [threading.Thread(target =...
{"/src/Ipscan.py": ["/src/_print.py"], "/src/fuzz.py": ["/src/_print.py"], "/src/port_scan.py": ["/src/_print.py"], "/src/scan.py": ["/src/_print.py"], "/main.py": ["/src/scan.py", "/src/_print.py", "/src/fuzz.py", "/src/Ipscan.py", "/sql_injection/union.py", "/sql_injection/error_inject.py", "/sql_injection/Boolen_sca...
50,659
PanDa1G1/sunsecScanner
refs/heads/master
/sql_injection/make_dict/make_time_payload.py
a = [("and","AnaNdd"),("suBstr","Mid"),("select","SELSEleCtect"),("aScii","aSciaSciii"),("suBstr","subSuBstrstr")] pre_ = ["' ",'" ',"') "," ","')) ",")' ","))' ",'") ','")) ',')" ','))" '] stuff_ = ["#","-- ","and('1')='1","and('1')=\"1","and('1')=('1","and('1')=(\"1","and('1')=(('1","and('1')=((\"1","and('1')='(1","...
{"/src/Ipscan.py": ["/src/_print.py"], "/src/fuzz.py": ["/src/_print.py"], "/src/port_scan.py": ["/src/_print.py"], "/src/scan.py": ["/src/_print.py"], "/main.py": ["/src/scan.py", "/src/_print.py", "/src/fuzz.py", "/src/Ipscan.py", "/sql_injection/union.py", "/sql_injection/error_inject.py", "/sql_injection/Boolen_sca...
50,660
PanDa1G1/sunsecScanner
refs/heads/master
/xss/xss_scan.py
# -*- coding: UTF-8 -*- import requests import re import threading import queue from selenium import webdriver from selenium.webdriver.firefox.options import Options from selenium.webdriver.common.alert import Alert import time from urllib.parse import quote import sys from colorama import Fore, Style, Back from seleni...
{"/src/Ipscan.py": ["/src/_print.py"], "/src/fuzz.py": ["/src/_print.py"], "/src/port_scan.py": ["/src/_print.py"], "/src/scan.py": ["/src/_print.py"], "/main.py": ["/src/scan.py", "/src/_print.py", "/src/fuzz.py", "/src/Ipscan.py", "/sql_injection/union.py", "/sql_injection/error_inject.py", "/sql_injection/Boolen_sca...
50,661
PanDa1G1/sunsecScanner
refs/heads/master
/src/scan.py
import asyncio import time import aiohttp from aiohttp import ClientSession from urllib import parse from src._print import _print class path_scan(object): def __init__(self,url,max_num,dictory): self.url = url self.dictory = dictory self.count = 0; self.loop = asyncio.get_event_loop() self.tasks = [] ...
{"/src/Ipscan.py": ["/src/_print.py"], "/src/fuzz.py": ["/src/_print.py"], "/src/port_scan.py": ["/src/_print.py"], "/src/scan.py": ["/src/_print.py"], "/main.py": ["/src/scan.py", "/src/_print.py", "/src/fuzz.py", "/src/Ipscan.py", "/sql_injection/union.py", "/sql_injection/error_inject.py", "/sql_injection/Boolen_sca...
50,662
PanDa1G1/sunsecScanner
refs/heads/master
/xss/make_payload.py
# -*- coding: UTF-8 -*- from urllib.parse import quote class make_payload(): def __init__(self): self.tag_file = "tag_payload.txt" self.attribute_file = "attr_payload.txt" self.payload="alert(668868)" self.protocal = "javascript:" def js_encode(self,sentence): payload = "" for char_ in sentence: pa...
{"/src/Ipscan.py": ["/src/_print.py"], "/src/fuzz.py": ["/src/_print.py"], "/src/port_scan.py": ["/src/_print.py"], "/src/scan.py": ["/src/_print.py"], "/main.py": ["/src/scan.py", "/src/_print.py", "/src/fuzz.py", "/src/Ipscan.py", "/sql_injection/union.py", "/sql_injection/error_inject.py", "/sql_injection/Boolen_sca...
50,663
PanDa1G1/sunsecScanner
refs/heads/master
/sql_injection/make_dict/make_boolen_dict.py
# -*- coding: UTF-8 -*- a = [("and","AnaNdd"),("suBstr","Mid"),("oR","ooRR"),("select","SELSEleCtect"),("aScii","aSciaSciii"),("suBstr","subSuBstrstr")] pre_ = ["' ",'" ',"') "," ","')) ",")' ","))' ",'") ','")) ',')" ','))" '] stuff_ = ["#","-- ","and('1')='1","and('1')=\"1","and('1')=('1","and('1')=(\"1","and('1')=(...
{"/src/Ipscan.py": ["/src/_print.py"], "/src/fuzz.py": ["/src/_print.py"], "/src/port_scan.py": ["/src/_print.py"], "/src/scan.py": ["/src/_print.py"], "/main.py": ["/src/scan.py", "/src/_print.py", "/src/fuzz.py", "/src/Ipscan.py", "/sql_injection/union.py", "/sql_injection/error_inject.py", "/sql_injection/Boolen_sca...
50,664
PanDa1G1/sunsecScanner
refs/heads/master
/src/_print.py
import colorama from colorama import Fore, Style, Back import platform import sys import os class _print(): def __init__(self): self.terminal_size = os.get_terminal_size().columns self.system = platform.system() self.lastInLine = False def inLine(self, string): self.lastInLine = True if len(string) > se...
{"/src/Ipscan.py": ["/src/_print.py"], "/src/fuzz.py": ["/src/_print.py"], "/src/port_scan.py": ["/src/_print.py"], "/src/scan.py": ["/src/_print.py"], "/main.py": ["/src/scan.py", "/src/_print.py", "/src/fuzz.py", "/src/Ipscan.py", "/sql_injection/union.py", "/sql_injection/error_inject.py", "/sql_injection/Boolen_sca...
50,665
PanDa1G1/sunsecScanner
refs/heads/master
/main.py
from src.scan import path_scan from src._print import _print import argparse from src.finger_scan import FingerScan from src.PortScan import myThread from src.fuzz import Fuzz import time from src.Ipscan import Ipscan from sql_injection.union import ScanUnion from sql_injection.error_inject import error_inject from sql...
{"/src/Ipscan.py": ["/src/_print.py"], "/src/fuzz.py": ["/src/_print.py"], "/src/port_scan.py": ["/src/_print.py"], "/src/scan.py": ["/src/_print.py"], "/main.py": ["/src/scan.py", "/src/_print.py", "/src/fuzz.py", "/src/Ipscan.py", "/sql_injection/union.py", "/sql_injection/error_inject.py", "/sql_injection/Boolen_sca...
50,704
arthurdjn/targeted-sentiment-analysis
refs/heads/master
/sentarget/metrics/__init__.py
from .confusion import ConfusionMatrix from .functional import *
{"/sentarget/metrics/__init__.py": ["/sentarget/metrics/confusion.py", "/sentarget/metrics/functional.py"], "/sentarget/datasets/nonlpl.py": ["/sentarget/datasets/_utils.py"], "/sentarget/metrics/confusion.py": ["/sentarget/metrics/functional.py"], "/sentarget/process.py": ["/sentarget/datasets/__init__.py"], "/sentarg...
50,705
arthurdjn/targeted-sentiment-analysis
refs/heads/master
/scripts/baseline.py
""" Run the baseline script. """ import torch from torch.utils.data import DataLoader import numpy as np from baseline.dataset import Vocab, ConllDataset from baseline.word2vec import Word2Vec from baseline.model import BiLSTM import argparse if __name__ == "__main__": parser = argparse.ArgumentParser() pa...
{"/sentarget/metrics/__init__.py": ["/sentarget/metrics/confusion.py", "/sentarget/metrics/functional.py"], "/sentarget/datasets/nonlpl.py": ["/sentarget/datasets/_utils.py"], "/sentarget/metrics/confusion.py": ["/sentarget/metrics/functional.py"], "/sentarget/process.py": ["/sentarget/datasets/__init__.py"], "/sentarg...
50,706
arthurdjn/targeted-sentiment-analysis
refs/heads/master
/sentarget/datasets/nonlpl.py
r""" ``NoNLPL`` is a dataset instance used to load pre-trained embeddings. """ import os from torchtext.vocab import Vectors from ._utils import download_from_url, extract_to_dir class NoNLPL(Vectors): r"""The Norwegian Bokmal NLPL dataset contains more than 1,000,000 pre-trained word embeddings from the no...
{"/sentarget/metrics/__init__.py": ["/sentarget/metrics/confusion.py", "/sentarget/metrics/functional.py"], "/sentarget/datasets/nonlpl.py": ["/sentarget/datasets/_utils.py"], "/sentarget/metrics/confusion.py": ["/sentarget/metrics/functional.py"], "/sentarget/process.py": ["/sentarget/datasets/__init__.py"], "/sentarg...
50,707
arthurdjn/targeted-sentiment-analysis
refs/heads/master
/sentarget/metrics/confusion.py
r""" Defines a ```ConfusionMatrix```, used to compute scores (True Positive, False Negative etc.). .. image:: images/confusion_matrix.png Example: .. code-block:: python # Create a confusion matrix confusion = ConfusionMatrix(num_classes=10) # Update the confusion matrix with a list of predictions and...
{"/sentarget/metrics/__init__.py": ["/sentarget/metrics/confusion.py", "/sentarget/metrics/functional.py"], "/sentarget/datasets/nonlpl.py": ["/sentarget/datasets/_utils.py"], "/sentarget/metrics/confusion.py": ["/sentarget/metrics/functional.py"], "/sentarget/process.py": ["/sentarget/datasets/__init__.py"], "/sentarg...
50,708
arthurdjn/targeted-sentiment-analysis
refs/heads/master
/sentarget/process.py
r""" Pre-process the data. """ import torchtext from sentarget.datasets import NoReCfine class Process: r""" """ def __init__(self, train_data, eval_data, test_data, fields=None): self.train_data, self.eval_data, self.test_data = train_data, eval_data, test_data self.fields = fields ...
{"/sentarget/metrics/__init__.py": ["/sentarget/metrics/confusion.py", "/sentarget/metrics/functional.py"], "/sentarget/datasets/nonlpl.py": ["/sentarget/datasets/_utils.py"], "/sentarget/metrics/confusion.py": ["/sentarget/metrics/functional.py"], "/sentarget/process.py": ["/sentarget/datasets/__init__.py"], "/sentarg...
50,709
arthurdjn/targeted-sentiment-analysis
refs/heads/master
/sentarget/utils/__init__.py
from .decorator import deprecated from .display import * from .functions import *
{"/sentarget/metrics/__init__.py": ["/sentarget/metrics/confusion.py", "/sentarget/metrics/functional.py"], "/sentarget/datasets/nonlpl.py": ["/sentarget/datasets/_utils.py"], "/sentarget/metrics/confusion.py": ["/sentarget/metrics/functional.py"], "/sentarget/process.py": ["/sentarget/datasets/__init__.py"], "/sentarg...
50,710
arthurdjn/targeted-sentiment-analysis
refs/heads/master
/sentarget/tuner/tuner.py
r""" Hyperparameters optimization using a grid search algorithm. Basically, you need to provide a set of parameters that will be modified. The grid search will run on all permutations from the set of parameters provided. Usually, you modify the hyperparameters and models' modules (ex, dropout etc.). In addition, if you...
{"/sentarget/metrics/__init__.py": ["/sentarget/metrics/confusion.py", "/sentarget/metrics/functional.py"], "/sentarget/datasets/nonlpl.py": ["/sentarget/datasets/_utils.py"], "/sentarget/metrics/confusion.py": ["/sentarget/metrics/functional.py"], "/sentarget/process.py": ["/sentarget/datasets/__init__.py"], "/sentarg...
50,711
arthurdjn/targeted-sentiment-analysis
refs/heads/master
/sentarget/nn/models/model.py
r""" Defines a model template. A `Model` is really similar to the `Module` class, except that a `Model` has more inner methods, used to train, evaluate and test a neural network. The *API* is similar to sklearn or tensorflow. .. code-block:: python class Net(Model): def __init__(self, *args): ...
{"/sentarget/metrics/__init__.py": ["/sentarget/metrics/confusion.py", "/sentarget/metrics/functional.py"], "/sentarget/datasets/nonlpl.py": ["/sentarget/datasets/_utils.py"], "/sentarget/metrics/confusion.py": ["/sentarget/metrics/functional.py"], "/sentarget/process.py": ["/sentarget/datasets/__init__.py"], "/sentarg...
50,712
arthurdjn/targeted-sentiment-analysis
refs/heads/master
/sentarget/datasets/norecfine.py
""" The ``NoReCfine`` class defines the latest datasets used for targeted sentiment analysis. .. code-block:: python # First, download the training / dev / test data train_data, dev_data, test_data = NoReCfine.splits(train_data="path_to_train", dev_data="...
{"/sentarget/metrics/__init__.py": ["/sentarget/metrics/confusion.py", "/sentarget/metrics/functional.py"], "/sentarget/datasets/nonlpl.py": ["/sentarget/datasets/_utils.py"], "/sentarget/metrics/confusion.py": ["/sentarget/metrics/functional.py"], "/sentarget/process.py": ["/sentarget/datasets/__init__.py"], "/sentarg...
50,713
arthurdjn/targeted-sentiment-analysis
refs/heads/master
/sentarget/utils/functions.py
""" Utility functions. """ import functools import itertools import torch def append2dict(main_dict, *dicts): """ Append key values to another dict with the same keys. Args: main_dict (dict): dictionary where values will be added. *dicts (dict): dictionaries to extract values and append...
{"/sentarget/metrics/__init__.py": ["/sentarget/metrics/confusion.py", "/sentarget/metrics/functional.py"], "/sentarget/datasets/nonlpl.py": ["/sentarget/datasets/_utils.py"], "/sentarget/metrics/confusion.py": ["/sentarget/metrics/functional.py"], "/sentarget/process.py": ["/sentarget/datasets/__init__.py"], "/sentarg...
50,714
arthurdjn/targeted-sentiment-analysis
refs/heads/master
/sentarget/datasets/_utils.py
r""" Some utils functions used to download and extract files. """ import requests import tarfile import zipfile import shutil import os from sentarget.utils import progress_bar def download_from_url(url, save_path): """Download a file from an URL. Args: url (str): path to the URL. save_path ...
{"/sentarget/metrics/__init__.py": ["/sentarget/metrics/confusion.py", "/sentarget/metrics/functional.py"], "/sentarget/datasets/nonlpl.py": ["/sentarget/datasets/_utils.py"], "/sentarget/metrics/confusion.py": ["/sentarget/metrics/functional.py"], "/sentarget/process.py": ["/sentarget/datasets/__init__.py"], "/sentarg...
50,715
arthurdjn/targeted-sentiment-analysis
refs/heads/master
/sentarget/nn/models/__init__.py
from . import lstm from .lstm import BiLSTM from .gru import BiGRU
{"/sentarget/metrics/__init__.py": ["/sentarget/metrics/confusion.py", "/sentarget/metrics/functional.py"], "/sentarget/datasets/nonlpl.py": ["/sentarget/datasets/_utils.py"], "/sentarget/metrics/confusion.py": ["/sentarget/metrics/functional.py"], "/sentarget/process.py": ["/sentarget/datasets/__init__.py"], "/sentarg...
50,716
arthurdjn/targeted-sentiment-analysis
refs/heads/master
/sentarget/metrics/functional.py
r""" Elementary functions used for statistical reports. """ import numpy as np def true_positive(matrix): r"""True positive values from a confusion matrix. .. math:: TP(M) = \text{Diag}(M) Args: matrix (numpy.ndarray): confusion matrix of shape :math:`(C, C)`. Returns: nu...
{"/sentarget/metrics/__init__.py": ["/sentarget/metrics/confusion.py", "/sentarget/metrics/functional.py"], "/sentarget/datasets/nonlpl.py": ["/sentarget/datasets/_utils.py"], "/sentarget/metrics/confusion.py": ["/sentarget/metrics/functional.py"], "/sentarget/process.py": ["/sentarget/datasets/__init__.py"], "/sentarg...
50,717
arthurdjn/targeted-sentiment-analysis
refs/heads/master
/sentarget/utils/display.py
""" This module defines basic function to render a simulation, like progress bar and statistics table. """ import numpy as np import time def get_time(start_time, end_time): """Get ellapsed time in minutes and seconds. Args: start_time (float): strarting time end_time (float): ending time ...
{"/sentarget/metrics/__init__.py": ["/sentarget/metrics/confusion.py", "/sentarget/metrics/functional.py"], "/sentarget/datasets/nonlpl.py": ["/sentarget/datasets/_utils.py"], "/sentarget/metrics/confusion.py": ["/sentarget/metrics/functional.py"], "/sentarget/process.py": ["/sentarget/datasets/__init__.py"], "/sentarg...
50,718
arthurdjn/targeted-sentiment-analysis
refs/heads/master
/sentarget/nn/solver.py
r""" A ``Solver`` is an object used for training, evaluating and testing a model. The performance is stored in a dictionary, both for training and testing. In addition, the best model occurred during training is stored, as well as it's checkpoint to re-load a model at a specific epoch. Example: .. code-block:: python...
{"/sentarget/metrics/__init__.py": ["/sentarget/metrics/confusion.py", "/sentarget/metrics/functional.py"], "/sentarget/datasets/nonlpl.py": ["/sentarget/datasets/_utils.py"], "/sentarget/metrics/confusion.py": ["/sentarget/metrics/functional.py"], "/sentarget/process.py": ["/sentarget/datasets/__init__.py"], "/sentarg...
50,719
arthurdjn/targeted-sentiment-analysis
refs/heads/master
/scripts/gridsearch.py
r""" Run a simple grid search algorithm. """ import configparser from argparse import ArgumentParser import numpy import torch from torchtext import data from torchtext.vocab import Vectors import sentarget from sentarget.datasets import NoReCfine from sentarget.tuner import Tuner def gridsearch(options={}, params...
{"/sentarget/metrics/__init__.py": ["/sentarget/metrics/confusion.py", "/sentarget/metrics/functional.py"], "/sentarget/datasets/nonlpl.py": ["/sentarget/datasets/_utils.py"], "/sentarget/metrics/confusion.py": ["/sentarget/metrics/functional.py"], "/sentarget/process.py": ["/sentarget/datasets/__init__.py"], "/sentarg...
50,720
arthurdjn/targeted-sentiment-analysis
refs/heads/master
/sentarget/nn/__init__.py
from sentarget.nn import models from .solver import Solver
{"/sentarget/metrics/__init__.py": ["/sentarget/metrics/confusion.py", "/sentarget/metrics/functional.py"], "/sentarget/datasets/nonlpl.py": ["/sentarget/datasets/_utils.py"], "/sentarget/metrics/confusion.py": ["/sentarget/metrics/functional.py"], "/sentarget/process.py": ["/sentarget/datasets/__init__.py"], "/sentarg...
50,721
arthurdjn/targeted-sentiment-analysis
refs/heads/master
/setup.py
""" Setup for docs and PyPi. """ from setuptools import setup, find_packages def readme_data(): """Read the README file.""" with open("README.md", "r") as fh: long_description = fh.read() return long_description find_packages() setup(name='sentarget', version='0.2', description='Ta...
{"/sentarget/metrics/__init__.py": ["/sentarget/metrics/confusion.py", "/sentarget/metrics/functional.py"], "/sentarget/datasets/nonlpl.py": ["/sentarget/datasets/_utils.py"], "/sentarget/metrics/confusion.py": ["/sentarget/metrics/functional.py"], "/sentarget/process.py": ["/sentarget/datasets/__init__.py"], "/sentarg...
50,722
arthurdjn/targeted-sentiment-analysis
refs/heads/master
/sentarget/datasets/__init__.py
from .norecfine import NoReCfine from .nonlpl import NoNLPL
{"/sentarget/metrics/__init__.py": ["/sentarget/metrics/confusion.py", "/sentarget/metrics/functional.py"], "/sentarget/datasets/nonlpl.py": ["/sentarget/datasets/_utils.py"], "/sentarget/metrics/confusion.py": ["/sentarget/metrics/functional.py"], "/sentarget/process.py": ["/sentarget/datasets/__init__.py"], "/sentarg...
50,723
arthurdjn/targeted-sentiment-analysis
refs/heads/master
/scripts/eval.py
""" Main script used to run and test a model, for Targeted Sentment Ananalysis. The dataset used should be taken from the lattest NoReCfine repository. """ import argparse import torch from torch import nn from torch.utils.data import DataLoader import torchtext from torchtext.datasets import SequenceTaggingDataset f...
{"/sentarget/metrics/__init__.py": ["/sentarget/metrics/confusion.py", "/sentarget/metrics/functional.py"], "/sentarget/datasets/nonlpl.py": ["/sentarget/datasets/_utils.py"], "/sentarget/metrics/confusion.py": ["/sentarget/metrics/functional.py"], "/sentarget/process.py": ["/sentarget/datasets/__init__.py"], "/sentarg...
50,724
arthurdjn/targeted-sentiment-analysis
refs/heads/master
/sentarget/tuner/__init__.py
from .tuner import Tuner from .functional import *
{"/sentarget/metrics/__init__.py": ["/sentarget/metrics/confusion.py", "/sentarget/metrics/functional.py"], "/sentarget/datasets/nonlpl.py": ["/sentarget/datasets/_utils.py"], "/sentarget/metrics/confusion.py": ["/sentarget/metrics/functional.py"], "/sentarget/process.py": ["/sentarget/datasets/__init__.py"], "/sentarg...
50,725
arthurdjn/targeted-sentiment-analysis
refs/heads/master
/sentarget/__init__.py
from sentarget import datasets, metrics, nn from sentarget.tuner import Tuner from sentarget.nn import Solver
{"/sentarget/metrics/__init__.py": ["/sentarget/metrics/confusion.py", "/sentarget/metrics/functional.py"], "/sentarget/datasets/nonlpl.py": ["/sentarget/datasets/_utils.py"], "/sentarget/metrics/confusion.py": ["/sentarget/metrics/functional.py"], "/sentarget/process.py": ["/sentarget/datasets/__init__.py"], "/sentarg...
50,726
arthurdjn/targeted-sentiment-analysis
refs/heads/master
/sentarget/nn/models/gru.py
r""" The Bilinear Recurrent network is a vanilla model used for targeted sentiment analysis, and compared to more elaborated models. Example: .. code-block:: python # Defines the shape of the models INPUT_DIM = len(TEXT.vocab) EMBEDDING_DIM = 100 HIDDEN_DIM = 128 OUTPUT_DIM = len(LABEL.vocab) ...
{"/sentarget/metrics/__init__.py": ["/sentarget/metrics/confusion.py", "/sentarget/metrics/functional.py"], "/sentarget/datasets/nonlpl.py": ["/sentarget/datasets/_utils.py"], "/sentarget/metrics/confusion.py": ["/sentarget/metrics/functional.py"], "/sentarget/process.py": ["/sentarget/datasets/__init__.py"], "/sentarg...
50,727
arthurdjn/targeted-sentiment-analysis
refs/heads/master
/sentarget/tuner/functional.py
""" Optimization functions used for hyperparameters tuning. """ import inspect from sentarget.utils import rgetattr, rsetattr def tune(model, config): r""" .. note:: If the key is separated with a '.', it means the first index is the module to change, then the attribute ``key = 'LSTM.dropou...
{"/sentarget/metrics/__init__.py": ["/sentarget/metrics/confusion.py", "/sentarget/metrics/functional.py"], "/sentarget/datasets/nonlpl.py": ["/sentarget/datasets/_utils.py"], "/sentarget/metrics/confusion.py": ["/sentarget/metrics/functional.py"], "/sentarget/process.py": ["/sentarget/datasets/__init__.py"], "/sentarg...
50,730
vesamattila-code/visma_holidayplanner
refs/heads/master
/unittests.py
import unittest from holidayplanner import HolidayPlanner, HolidayCVSHandler,HolidayStartLaterThanEnd,HolidayAccess,HolidayRangeTooWide import datetime from datetime import date, timedelta, datetime import pandas as pd class TestHolidayPlanner(unittest.TestCase): def test_holiday_access(self): acc=Holida...
{"/unittests.py": ["/holidayplanner.py"]}
50,731
vesamattila-code/visma_holidayplanner
refs/heads/master
/holidayplanner.py
import pandas as pd from datetime import date, timedelta, datetime import os.path from os import path class HolidayRangeTooWide(Exception): pass class HolidayStartLaterThanEnd(Exception): pass HOLIDAY_MAX_RANGE = 50 class HolidayAccess(): """Generic interface class to official holiday info.""" ...
{"/unittests.py": ["/holidayplanner.py"]}
50,732
changliukean/KEAN3
refs/heads/master
/lbo_testcases.py
from utility.dispatchUtils import load_pp_tech_info, convert_uc_dataframe, load_solar_dispatch, load_nuclear_dispatch from datetime import datetime, date from database.dbPCUC import put_characteristics from database.dbDispatch import put_dispatch, get_dispatch from database.dbLBO import put_powerplant, put_technology, ...
{"/lbo_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPCUC.py", "/database/dbDispatch.py", "/database/dbLBO.py", "/database/dbScenarioMaster.py", "/utility/lboUtils.py", "/model/Entity.py", "/model/Portfolio.py", "/utility/dateUtils.py"], "/lbo_oob_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPC...
50,733
changliukean/KEAN3
refs/heads/master
/utility/lboUtils.py
import pandas as pd import sys def read_excel_lbo_inputs(file_path, load_fsli_list): raw_lbo_inputs_df = pd.DataFrame() for load_fsli in load_fsli_list: fsli_tab_name = "Value_" + "_".join(load_fsli.split(" ")) print (fsli_tab_name) first_cell_name = "Output_" + "_".join(load_...
{"/lbo_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPCUC.py", "/database/dbDispatch.py", "/database/dbLBO.py", "/database/dbScenarioMaster.py", "/utility/lboUtils.py", "/model/Entity.py", "/model/Portfolio.py", "/utility/dateUtils.py"], "/lbo_oob_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPC...
50,734
changliukean/KEAN3
refs/heads/master
/lbo_oob_testcases.py
from utility.dispatchUtils import load_pp_tech_info, convert_uc_dataframe, load_solar_dispatch, load_nuclear_dispatch from datetime import datetime, date from database.dbPCUC import put_characteristics from database.dbDispatch import put_dispatch, get_dispatch from database.dbLBO import put_powerplant, put_technology, ...
{"/lbo_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPCUC.py", "/database/dbDispatch.py", "/database/dbLBO.py", "/database/dbScenarioMaster.py", "/utility/lboUtils.py", "/model/Entity.py", "/model/Portfolio.py", "/utility/dateUtils.py"], "/lbo_oob_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPC...
50,735
changliukean/KEAN3
refs/heads/master
/database/dbLiquidity.py
import mysql.connector from database.dbGeneral import HOST,USER,PASSWORD,DATABASE, PROD_DATABASE, config_connection from sqlalchemy import create_engine import pandas as pd from datetime import datetime, date def get_financials(portfolio, scenario, version, financials_table): connection_instance = config_connec...
{"/lbo_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPCUC.py", "/database/dbDispatch.py", "/database/dbLBO.py", "/database/dbScenarioMaster.py", "/utility/lboUtils.py", "/model/Entity.py", "/model/Portfolio.py", "/utility/dateUtils.py"], "/lbo_oob_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPC...
50,736
changliukean/KEAN3
refs/heads/master
/database/dbDispatch.py
import mysql.connector from database.dbGeneral import HOST,USER,PASSWORD,PROD_DATABASE,config_connection from sqlalchemy import create_engine import pandas as pd def get_dispatch(portfolio, scenario, version): connection_instance = config_connection(HOST, USER, PASSWORD, PROD_DATABASE) sql_statement = "Se...
{"/lbo_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPCUC.py", "/database/dbDispatch.py", "/database/dbLBO.py", "/database/dbScenarioMaster.py", "/utility/lboUtils.py", "/model/Entity.py", "/model/Portfolio.py", "/utility/dateUtils.py"], "/lbo_oob_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPC...
50,737
changliukean/KEAN3
refs/heads/master
/scenario_control/Scenario.py
from database import dbScenarioMaster from utility import dateUtils import pandas as pd from datetime import datetime, date import sys class Scenario: def __init__(self, module, table, portfolio, scenario, version, comment=''): self.module = module self.table = table self.portfolio = p...
{"/lbo_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPCUC.py", "/database/dbDispatch.py", "/database/dbLBO.py", "/database/dbScenarioMaster.py", "/utility/lboUtils.py", "/model/Entity.py", "/model/Portfolio.py", "/utility/dateUtils.py"], "/lbo_oob_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPC...
50,738
changliukean/KEAN3
refs/heads/master
/lbo/lbo.py
import pandas as pd import numpy as np from openpyxl import Workbook import openpyxl as opx from openpyxl.utils.dataframe import dataframe_to_rows from utility.dateUtils import get_month_list from database.dbPrices import get_historical_lmp from dateutil.relativedelta import relativedelta from datetime import date, da...
{"/lbo_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPCUC.py", "/database/dbDispatch.py", "/database/dbLBO.py", "/database/dbScenarioMaster.py", "/utility/lboUtils.py", "/model/Entity.py", "/model/Portfolio.py", "/utility/dateUtils.py"], "/lbo_oob_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPC...
50,739
changliukean/KEAN3
refs/heads/master
/financial/FreeCashFlow.py
from dateutil.relativedelta import relativedelta from financial import FSLI class FreeCashFlow(FSLI): def __init__(self, date_start, date_end, amount, time_zero, discount_rate=0, discounted_amount=0, discount_factor=0): FSLI.__init__(self, 'Free Cash Flow', date_start, date_end, amount, credit_sign=...
{"/lbo_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPCUC.py", "/database/dbDispatch.py", "/database/dbLBO.py", "/database/dbScenarioMaster.py", "/utility/lboUtils.py", "/model/Entity.py", "/model/Portfolio.py", "/utility/dateUtils.py"], "/lbo_oob_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPC...
50,740
changliukean/KEAN3
refs/heads/master
/main.py
from scenario_control.Scenario import Scenario, ScenarioMaster from datetime import datetime, date from financial.FSLI import FSLI if __name__ == '__main__': name = 'Gross Energy Margin' year_start = 2020 year_end = 2025 gem_value_list = [45636322, 41712668, 46086042, 47736731, 50610844, 54406182]...
{"/lbo_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPCUC.py", "/database/dbDispatch.py", "/database/dbLBO.py", "/database/dbScenarioMaster.py", "/utility/lboUtils.py", "/model/Entity.py", "/model/Portfolio.py", "/utility/dateUtils.py"], "/lbo_oob_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPC...
50,741
changliukean/KEAN3
refs/heads/master
/database/dbScenarioMaster.py
from database.dbGeneral import HOST, USER, PASSWORD, DATABASE, config_connection import pandas as pd from sqlalchemy import create_engine def get_scenario_master(output_portfolio, output_scenario_name, output_version, output_module, output_table): connection_instance = config_connection(HOST, USER, PASSWORD, DAT...
{"/lbo_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPCUC.py", "/database/dbDispatch.py", "/database/dbLBO.py", "/database/dbScenarioMaster.py", "/utility/lboUtils.py", "/model/Entity.py", "/model/Portfolio.py", "/utility/dateUtils.py"], "/lbo_oob_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPC...
50,742
changliukean/KEAN3
refs/heads/master
/database/dbPrices.py
from datetime import datetime, date, timedelta from calendar import monthrange from database.dbGeneral import HOST, USER, PASSWORD, DATABASE, PROD_DATABASE, config_connection import pandas as pd from sqlalchemy import create_engine def get_historical_lmp(node_id, start_date, end_date, dart, database=PROD_DATABASE):...
{"/lbo_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPCUC.py", "/database/dbDispatch.py", "/database/dbLBO.py", "/database/dbScenarioMaster.py", "/utility/lboUtils.py", "/model/Entity.py", "/model/Portfolio.py", "/utility/dateUtils.py"], "/lbo_oob_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPC...
50,743
changliukean/KEAN3
refs/heads/master
/model/Portfolio.py
import pandas as pd from database import dbLBO, dbDispatch, dbPCUC from utility import dispatchUtils, dateUtils from model.Entity import Powerplant from datetime import date import sys from pyexcelerate import Workbook import numpy as np class Portfolio: def __init__(self, name, entities=[]): self.name =...
{"/lbo_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPCUC.py", "/database/dbDispatch.py", "/database/dbLBO.py", "/database/dbScenarioMaster.py", "/utility/lboUtils.py", "/model/Entity.py", "/model/Portfolio.py", "/utility/dateUtils.py"], "/lbo_oob_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPC...
50,744
changliukean/KEAN3
refs/heads/master
/liquidity/Liquidity.py
from scenario_control.Scenario import Scenario, ScenarioMaster from datetime import date, timedelta from dateutil import relativedelta from utility.dateUtils import get_date_obj_from_str from calendar import monthrange import numpy as np from decimal import * import pandas as pd import sys from scipy.optimize import f...
{"/lbo_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPCUC.py", "/database/dbDispatch.py", "/database/dbLBO.py", "/database/dbScenarioMaster.py", "/utility/lboUtils.py", "/model/Entity.py", "/model/Portfolio.py", "/utility/dateUtils.py"], "/lbo_oob_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPC...
50,745
changliukean/KEAN3
refs/heads/master
/database/dbGeneral.py
import mysql.connector HOST='kindledb.cfdmlfy5ocmf.us-west-2.rds.amazonaws.com' USER='Andrew' PASSWORD='Kindle01' DATABASE='kean3' PROD_DATABASE = 'kean' def config_connection(host, user, password, database): conn_ins = mysql.connector.connect(host=host, user=user, password=password, database=database) retu...
{"/lbo_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPCUC.py", "/database/dbDispatch.py", "/database/dbLBO.py", "/database/dbScenarioMaster.py", "/utility/lboUtils.py", "/model/Entity.py", "/model/Portfolio.py", "/utility/dateUtils.py"], "/lbo_oob_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPC...
50,746
changliukean/KEAN3
refs/heads/master
/scenario_master_testcase.py
from scenario_control.Scenario import Scenario, ScenarioMaster from datetime import datetime, date from financial.FSLI import FSLI if __name__ == "__main__": print ("here we start our testing script") print ("---------------------------------------------") # Test case 1, load a financials scenario from ...
{"/lbo_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPCUC.py", "/database/dbDispatch.py", "/database/dbLBO.py", "/database/dbScenarioMaster.py", "/utility/lboUtils.py", "/model/Entity.py", "/model/Portfolio.py", "/utility/dateUtils.py"], "/lbo_oob_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPC...
50,747
changliukean/KEAN3
refs/heads/master
/database/dbLBO.py
import mysql.connector from database.dbGeneral import HOST,USER,PASSWORD,DATABASE, PROD_DATABASE, config_connection from sqlalchemy import create_engine import pandas as pd from datetime import datetime, date def put_financials_lbo(ready_to_kean_lbo_financials_df, portfolio, scenario, version, overwrite_option=False)...
{"/lbo_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPCUC.py", "/database/dbDispatch.py", "/database/dbLBO.py", "/database/dbScenarioMaster.py", "/utility/lboUtils.py", "/model/Entity.py", "/model/Portfolio.py", "/utility/dateUtils.py"], "/lbo_oob_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPC...
50,748
changliukean/KEAN3
refs/heads/master
/database/dbPCUC.py
import mysql.connector from database.dbGeneral import HOST,USER,PASSWORD,PROD_DATABASE,config_connection from sqlalchemy import create_engine import pandas as pd from datetime import datetime def put_characteristics(ready_to_kean_pcuc_df, scenario, version): connection_instance = config_connection(HOST, US...
{"/lbo_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPCUC.py", "/database/dbDispatch.py", "/database/dbLBO.py", "/database/dbScenarioMaster.py", "/utility/lboUtils.py", "/model/Entity.py", "/model/Portfolio.py", "/utility/dateUtils.py"], "/lbo_oob_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPC...
50,749
changliukean/KEAN3
refs/heads/master
/financial/FSLI.py
class FSLI: def __init__(self, name, date_start, date_end, amount=0, credit_sign=1, is_subtotal=False): self.name = name self.dateStart = date_start self.dateEnd = date_end self.amount = amount self.creditSign = credit_sign self.isSubtotal = is_subtotal def ...
{"/lbo_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPCUC.py", "/database/dbDispatch.py", "/database/dbLBO.py", "/database/dbScenarioMaster.py", "/utility/lboUtils.py", "/model/Entity.py", "/model/Portfolio.py", "/utility/dateUtils.py"], "/lbo_oob_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPC...
50,750
changliukean/KEAN3
refs/heads/master
/reportwriter/ReportWriter.py
import pyexcelerate import sys class ReportWriter: def __init__(self, workbook, data, formats): # the workbook that to be write on self.workbook = self.__initialize_workbook(workbook) # a dictionary of data matrices containing pure ...
{"/lbo_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPCUC.py", "/database/dbDispatch.py", "/database/dbLBO.py", "/database/dbScenarioMaster.py", "/utility/lboUtils.py", "/model/Entity.py", "/model/Portfolio.py", "/utility/dateUtils.py"], "/lbo_oob_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPC...
50,751
changliukean/KEAN3
refs/heads/master
/liquidity_oob_test.py
from liquidity.Liquidity import OID, DFC, Liquidity, Debt, OperatingCompany from datetime import date import importlib from reportwriter.ReportWriter import ReportWriter from scipy.optimize import fsolve import sys def lightstone_test(): # balance = 1725000000 # begin_date = date(2017,2,1) # end_date =...
{"/lbo_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPCUC.py", "/database/dbDispatch.py", "/database/dbLBO.py", "/database/dbScenarioMaster.py", "/utility/lboUtils.py", "/model/Entity.py", "/model/Portfolio.py", "/utility/dateUtils.py"], "/lbo_oob_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPC...
50,752
changliukean/KEAN3
refs/heads/master
/utility/dispatchUtils.py
import pandas as pd import numpy as np from utility.dateUtils import get_month_list from database.dbPrices import get_historical_lmp from dateutil.relativedelta import relativedelta from datetime import date, datetime import sys def get_hr(row, heatrate_summer, heatrate_winter): period = row['period'] if pe...
{"/lbo_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPCUC.py", "/database/dbDispatch.py", "/database/dbLBO.py", "/database/dbScenarioMaster.py", "/utility/lboUtils.py", "/model/Entity.py", "/model/Portfolio.py", "/utility/dateUtils.py"], "/lbo_oob_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPC...
50,753
changliukean/KEAN3
refs/heads/master
/model/andrew_sample.py
#TODO: Add check to see if revolver draw necessary #TODO: Add check to see if need to go below target working capital to make DSC #TODO: Add Act/360 day_count_factor to utilities #TODO: Add proper calc of average daily balance for Revolver (lc fees, ununused lines, interest expense) #TODO: Modify ptd calcs to allow for...
{"/lbo_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPCUC.py", "/database/dbDispatch.py", "/database/dbLBO.py", "/database/dbScenarioMaster.py", "/utility/lboUtils.py", "/model/Entity.py", "/model/Portfolio.py", "/utility/dateUtils.py"], "/lbo_oob_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPC...
50,754
changliukean/KEAN3
refs/heads/master
/display/ReportWriter.py
import openpyxl as opx from openpyxl.styles import PatternFill, Border, Side, Alignment, Protection, Font class Format: def __init__(self, start_row, start_column, end_row, end_column, font=Font(name='Calibri',size=11,bold=Fals...
{"/lbo_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPCUC.py", "/database/dbDispatch.py", "/database/dbLBO.py", "/database/dbScenarioMaster.py", "/utility/lboUtils.py", "/model/Entity.py", "/model/Portfolio.py", "/utility/dateUtils.py"], "/lbo_oob_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPC...
50,755
changliukean/KEAN3
refs/heads/master
/lbo_diff.py
from utility.dispatchUtils import load_pp_tech_info, convert_uc_dataframe, load_solar_dispatch, load_nuclear_dispatch from datetime import datetime, date from database.dbPCUC import put_characteristics from database.dbDispatch import put_dispatch, get_dispatch from database.dbLBO import put_powerplant, put_technology, ...
{"/lbo_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPCUC.py", "/database/dbDispatch.py", "/database/dbLBO.py", "/database/dbScenarioMaster.py", "/utility/lboUtils.py", "/model/Entity.py", "/model/Portfolio.py", "/utility/dateUtils.py"], "/lbo_oob_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPC...
50,756
changliukean/KEAN3
refs/heads/master
/model/Entity.py
from database import dbPrices, dbLBO import numpy as np from datetime import datetime, date, timedelta import pandas as pd import sys class Entity: def __init__(self, name, type): self.name = name self.type = type def get_match_signal(row): if np.isnan(row['total_lmp_x']) or np.isnan(row...
{"/lbo_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPCUC.py", "/database/dbDispatch.py", "/database/dbLBO.py", "/database/dbScenarioMaster.py", "/utility/lboUtils.py", "/model/Entity.py", "/model/Portfolio.py", "/utility/dateUtils.py"], "/lbo_oob_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPC...
50,757
changliukean/KEAN3
refs/heads/master
/utility/dateUtils.py
from datetime import datetime, date, timedelta from calendar import monthrange from dateutil.parser import parse from dateutil.relativedelta import relativedelta # store nerc holidays in kean3 # store dst dates in kean3 def get_one_month_ago(date_obj): current_month_begin = date(date_obj.year, date_obj.mont...
{"/lbo_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPCUC.py", "/database/dbDispatch.py", "/database/dbLBO.py", "/database/dbScenarioMaster.py", "/utility/lboUtils.py", "/model/Entity.py", "/model/Portfolio.py", "/utility/dateUtils.py"], "/lbo_oob_testcases.py": ["/utility/dispatchUtils.py", "/database/dbPC...
50,793
csourabh8824/djangohomerestframework
refs/heads/master
/generic_apiview/school/views.py
from django.shortcuts import render from .models import Student from .serializers import StudentSerializer from rest_framework.generics import GenericAPIView from rest_framework.mixins import ListModelMixin, CreateModelMixin, RetrieveModelMixin, UpdateModelMixin, DestroyModelMixin # Create your views here. # Mixins i...
{"/crud3/student/views.py": ["/crud3/student/forms.py"], "/crud1/school/views.py": ["/crud1/school/forms.py"], "/django-master/product/urls.py": ["/django-master/product/views.py"]}
50,794
csourabh8824/djangohomerestframework
refs/heads/master
/crud3/student/views.py
from django.shortcuts import render from django.views.generic import CreateView, ListView, UpdateView, DeleteView from .forms import RegistrationForm from .models import Student # Create your viewsfrom .models import Student here. class StudentCreateView(CreateView): form_class = RegistrationForm # fields = [...
{"/crud3/student/views.py": ["/crud3/student/forms.py"], "/crud1/school/views.py": ["/crud1/school/forms.py"], "/django-master/product/urls.py": ["/django-master/product/views.py"]}
50,795
csourabh8824/djangohomerestframework
refs/heads/master
/viewset/school/views.py
from django.shortcuts import render from .models import Student from rest_framework import viewsets from rest_framework.response import Response from rest_framework import status from .serializers import StudentSerializer # Create your views here. """ ViewSet class is a class based view that does not provide any metho...
{"/crud3/student/views.py": ["/crud3/student/forms.py"], "/crud1/school/views.py": ["/crud1/school/forms.py"], "/django-master/product/urls.py": ["/django-master/product/views.py"]}
50,796
csourabh8824/djangohomerestframework
refs/heads/master
/crud1/school/forms.py
from django import forms from .models import Student class RegisterForm(forms.ModelForm): password = forms.CharField(max_length=60, widget=forms.PasswordInput) class Meta: model = Student fields = '__all__'
{"/crud3/student/views.py": ["/crud3/student/forms.py"], "/crud1/school/views.py": ["/crud1/school/forms.py"], "/django-master/product/urls.py": ["/django-master/product/views.py"]}
50,797
csourabh8824/djangohomerestframework
refs/heads/master
/crud3/student/forms.py
from django import forms from .models import Student # If you are using model name in createview then use this # class RegistrationForm(forms.Form): # name = forms.CharField(max_length=20) # email = forms.EmailField() # If you are using form class in createview then use this class RegistrationForm(forms.Model...
{"/crud3/student/views.py": ["/crud3/student/forms.py"], "/crud1/school/views.py": ["/crud1/school/forms.py"], "/django-master/product/urls.py": ["/django-master/product/views.py"]}
50,798
csourabh8824/djangohomerestframework
refs/heads/master
/crud1/school/views.py
from django.shortcuts import render, redirect, HttpResponse from .forms import RegisterForm from .models import Student # Create your views here. def home(request): students = Student.objects.all() return render(request, "school/home.html", context={"students": students}) def add_student(request): if re...
{"/crud3/student/views.py": ["/crud3/student/forms.py"], "/crud1/school/views.py": ["/crud1/school/forms.py"], "/django-master/product/urls.py": ["/django-master/product/views.py"]}
50,799
csourabh8824/djangohomerestframework
refs/heads/master
/crud4/thirdparty.py
import requests import json URL = "http://127.0.0.1:8000/studentapi/2/" def show_data(id=None): data = { "id": id } json_data = json.dumps(data) response = requests.get(url=URL, data=json_data) print(response.json()) show_data(2) def create_data(): data = { "roll": 102, ...
{"/crud3/student/views.py": ["/crud3/student/forms.py"], "/crud1/school/views.py": ["/crud1/school/forms.py"], "/django-master/product/urls.py": ["/django-master/product/views.py"]}
50,800
csourabh8824/djangohomerestframework
refs/heads/master
/fbv_apiview/student/views.py
from django.shortcuts import render from rest_framework.decorators import api_view from rest_framework.response import Response from .models import Student from .serializers import StudentSerializer from rest_framework import status # Create your views here. # request.data contains all the data i.e id,name,roll,city It...
{"/crud3/student/views.py": ["/crud3/student/forms.py"], "/crud1/school/views.py": ["/crud1/school/forms.py"], "/django-master/product/urls.py": ["/django-master/product/views.py"]}
50,801
csourabh8824/djangohomerestframework
refs/heads/master
/django-master/product/urls.py
from django.urls import path from .views import ProductView urlpatterns = [ path('add/', ProductView.as_view(), name='product-add'), ]
{"/crud3/student/views.py": ["/crud3/student/forms.py"], "/crud1/school/views.py": ["/crud1/school/forms.py"], "/django-master/product/urls.py": ["/django-master/product/views.py"]}
50,802
csourabh8824/djangohomerestframework
refs/heads/master
/crud4/school/views.py
import io from django.shortcuts import render from django.http import HttpResponse from rest_framework.parsers import JSONParser from rest_framework.renderers import JSONRenderer from .serializers import StudentSerializer from django.views.decorators.csrf import csrf_exempt from .models import Student # Create your vie...
{"/crud3/student/views.py": ["/crud3/student/forms.py"], "/crud1/school/views.py": ["/crud1/school/forms.py"], "/django-master/product/urls.py": ["/django-master/product/views.py"]}
50,803
csourabh8824/djangohomerestframework
refs/heads/master
/django-master/product/views.py
from django.http import HttpResponseRedirect from django.shortcuts import render from django.views import View from django.urls import reverse from .forms import ProductForm class ProductView(View): form_class = ProductForm template_name = 'product_template.html' def get(self, request, *args, **kwargs...
{"/crud3/student/views.py": ["/crud3/student/forms.py"], "/crud1/school/views.py": ["/crud1/school/forms.py"], "/django-master/product/urls.py": ["/django-master/product/views.py"]}
50,804
csourabh8824/djangohomerestframework
refs/heads/master
/django-master/product/models.py
from django.db import models class Product(models.Model): title = models.CharField(max_length=200) summary = models.TextField(max_length=1000, help_text='Enter a brief description of the Product')
{"/crud3/student/views.py": ["/crud3/student/forms.py"], "/crud1/school/views.py": ["/crud1/school/forms.py"], "/django-master/product/urls.py": ["/django-master/product/views.py"]}
50,805
csourabh8824/djangohomerestframework
refs/heads/master
/crud2/school/views.py
from django.shortcuts import render, HttpResponse from django.views import View from django.views.generic import UpdateView, DeleteView from .forms import RegistrationForm from .models import Student # Create your views here. class Myview(View): def get(self, request, *args, **kwargs): form = Registration...
{"/crud3/student/views.py": ["/crud3/student/forms.py"], "/crud1/school/views.py": ["/crud1/school/forms.py"], "/django-master/product/urls.py": ["/django-master/product/views.py"]}
50,817
alingse/exception-collector
refs/heads/master
/local.py
class LocalError(Exception): def __init__(self, message): self.message = message def runA(): raise LocalError('hello') def runB(): a = 1 b = 0 return a/b def run(): try: runA() except Exception: pass try: runB() except Exception: pass
{"/demo.py": ["/local.py"]}
50,818
alingse/exception-collector
refs/heads/master
/demo.py
import builtins from collections import defaultdict collector = defaultdict(list) OldException = builtins.Exception class NewException(OldException): def __init__(self, *args, **kwargs): print(args, kwargs) super().__init__(*args, **kwargs) def __new__(cls, *args, **kwargs): if n...
{"/demo.py": ["/local.py"]}
50,828
ArtyZiff35/Android-Application-State-Graph-Model-Parser
refs/heads/master
/eventRecorder.py
from com.dtmilano.android.viewclient import ViewClient, View, ViewClientOptions from com.dtmilano.android.adb import adbclient from com.dtmilano.android.common import debugArgsToDict import subprocess from subprocess import check_output import psutil import os import time import sys import pyautogui # Method to kill...
{"/graphPlotter.py": ["/stateNode.py"]}
50,829
ArtyZiff35/Android-Application-State-Graph-Model-Parser
refs/heads/master
/customLanguageInterpreter/mainInterpreter.py
import sys from antlr4 import * from scriptingLanguageLexer import scriptingLanguageLexer from scriptingLanguageParser import scriptingLanguageParser from scriptingLanguageListener import scriptingLanguageListener from suiteClass import * from activityStateDetector import activityStateDetector import time def execu...
{"/graphPlotter.py": ["/stateNode.py"]}