index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
34,526
yhtps237/ostendit
refs/heads/master
/shows/views.py
from django.shortcuts import render, get_object_or_404, redirect from .models import Shows from django.contrib.admin.views.decorators import staff_member_required from .forms import ShowsModelForm from comments.models import Comment from comments.forms import CommentModelForm from django.contrib.auth.decorators import ...
{"/shows/views.py": ["/shows/models.py", "/shows/forms.py", "/comments/models.py", "/comments/forms.py"], "/pages/views.py": ["/shows/models.py"], "/shows/forms.py": ["/shows/models.py"], "/shows/urls.py": ["/shows/views.py"], "/user/views.py": ["/shows/models.py"], "/shows/admin.py": ["/shows/models.py"], "/user/urls....
34,527
yhtps237/ostendit
refs/heads/master
/shows/migrations/0003_auto_20200525_1550.py
# Generated by Django 2.2.1 on 2020-05-25 11:50 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('shows', '0002_shows_animation'), ] operations = [ migrations.AlterField( model_name='shows', name='animation', ...
{"/shows/views.py": ["/shows/models.py", "/shows/forms.py", "/comments/models.py", "/comments/forms.py"], "/pages/views.py": ["/shows/models.py"], "/shows/forms.py": ["/shows/models.py"], "/shows/urls.py": ["/shows/views.py"], "/user/views.py": ["/shows/models.py"], "/shows/admin.py": ["/shows/models.py"], "/user/urls....
34,528
yhtps237/ostendit
refs/heads/master
/comments/migrations/0004_auto_20200527_1156.py
# Generated by Django 2.2.1 on 2020-05-27 07:56 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('comments', '0003_auto_20200527_1153'), ] operations = [ migrations.AlterField( model_name='comment', name='commented...
{"/shows/views.py": ["/shows/models.py", "/shows/forms.py", "/comments/models.py", "/comments/forms.py"], "/pages/views.py": ["/shows/models.py"], "/shows/forms.py": ["/shows/models.py"], "/shows/urls.py": ["/shows/views.py"], "/user/views.py": ["/shows/models.py"], "/shows/admin.py": ["/shows/models.py"], "/user/urls....
34,529
yhtps237/ostendit
refs/heads/master
/pages/views.py
from django.shortcuts import render from shows.models import Shows # Create your views here. def home_view(request): context = { 'title': 'Hello World' } if request.user.is_authenticated: queryset = Shows.objects.published() else: queryset = Shows.objects.published()[:5] ...
{"/shows/views.py": ["/shows/models.py", "/shows/forms.py", "/comments/models.py", "/comments/forms.py"], "/pages/views.py": ["/shows/models.py"], "/shows/forms.py": ["/shows/models.py"], "/shows/urls.py": ["/shows/views.py"], "/user/views.py": ["/shows/models.py"], "/shows/admin.py": ["/shows/models.py"], "/user/urls....
34,530
yhtps237/ostendit
refs/heads/master
/shows/migrations/0008_auto_20200527_1448.py
# Generated by Django 2.2.1 on 2020-05-27 10:48 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('shows', '0007_auto_20200527_1037'), ] operations = [ migrations.AlterField( model_name='shows', name='content', ...
{"/shows/views.py": ["/shows/models.py", "/shows/forms.py", "/comments/models.py", "/comments/forms.py"], "/pages/views.py": ["/shows/models.py"], "/shows/forms.py": ["/shows/models.py"], "/shows/urls.py": ["/shows/views.py"], "/user/views.py": ["/shows/models.py"], "/shows/admin.py": ["/shows/models.py"], "/user/urls....
34,531
yhtps237/ostendit
refs/heads/master
/shows/forms.py
from django import forms from .models import Shows class ShowsModelForm(forms.ModelForm): title = forms.CharField(label='', widget=forms.TextInput( attrs={'class': 'form-control'})) slug = forms.CharField(label='', widget=forms.TextInput( attrs={'placeholder': 'Your title but lowercase and rep...
{"/shows/views.py": ["/shows/models.py", "/shows/forms.py", "/comments/models.py", "/comments/forms.py"], "/pages/views.py": ["/shows/models.py"], "/shows/forms.py": ["/shows/models.py"], "/shows/urls.py": ["/shows/views.py"], "/user/views.py": ["/shows/models.py"], "/shows/admin.py": ["/shows/models.py"], "/user/urls....
34,532
yhtps237/ostendit
refs/heads/master
/shows/urls.py
from django.urls import path from .views import ( shows_list_view, show_detail_view, show_create_view, show_update_view, show_delete_view, ) app_name = 'shows' urlpatterns = [ # path('movies/', shows_list_view), # path('<slug:slug>/', show_detail_view), path('live-action/', shows_list_...
{"/shows/views.py": ["/shows/models.py", "/shows/forms.py", "/comments/models.py", "/comments/forms.py"], "/pages/views.py": ["/shows/models.py"], "/shows/forms.py": ["/shows/models.py"], "/shows/urls.py": ["/shows/views.py"], "/user/views.py": ["/shows/models.py"], "/shows/admin.py": ["/shows/models.py"], "/user/urls....
34,533
yhtps237/ostendit
refs/heads/master
/user/views.py
from django.shortcuts import render, redirect, get_object_or_404 from django.contrib.auth import login, logout, authenticate from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required from django.contrib.auth.forms import AuthenticationForm, UserCreationForm from shows.models...
{"/shows/views.py": ["/shows/models.py", "/shows/forms.py", "/comments/models.py", "/comments/forms.py"], "/pages/views.py": ["/shows/models.py"], "/shows/forms.py": ["/shows/models.py"], "/shows/urls.py": ["/shows/views.py"], "/user/views.py": ["/shows/models.py"], "/shows/admin.py": ["/shows/models.py"], "/user/urls....
34,534
yhtps237/ostendit
refs/heads/master
/comments/migrations/0005_auto_20200527_1159.py
# Generated by Django 2.2.1 on 2020-05-27 07:59 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('comments', '0004_auto_20200527_1156'), ] operations = [ migrations.AlterField( model_name='comment', name='commented...
{"/shows/views.py": ["/shows/models.py", "/shows/forms.py", "/comments/models.py", "/comments/forms.py"], "/pages/views.py": ["/shows/models.py"], "/shows/forms.py": ["/shows/models.py"], "/shows/urls.py": ["/shows/views.py"], "/user/views.py": ["/shows/models.py"], "/shows/admin.py": ["/shows/models.py"], "/user/urls....
34,535
yhtps237/ostendit
refs/heads/master
/shows/migrations/0004_auto_20200525_1558.py
# Generated by Django 2.2.1 on 2020-05-25 11:58 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('shows', '0003_auto_20200525_1550'), ] operations = [ migrations.AlterField( model_name='shows', name='animation', ...
{"/shows/views.py": ["/shows/models.py", "/shows/forms.py", "/comments/models.py", "/comments/forms.py"], "/pages/views.py": ["/shows/models.py"], "/shows/forms.py": ["/shows/models.py"], "/shows/urls.py": ["/shows/views.py"], "/user/views.py": ["/shows/models.py"], "/shows/admin.py": ["/shows/models.py"], "/user/urls....
34,536
yhtps237/ostendit
refs/heads/master
/comments/models.py
from django.db import models from django.conf import settings # Create your models here. class Comment(models.Model): user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.SET_NULL, null=True) commented_to = models.SlugField() slug = models.SlugField(unique=False...
{"/shows/views.py": ["/shows/models.py", "/shows/forms.py", "/comments/models.py", "/comments/forms.py"], "/pages/views.py": ["/shows/models.py"], "/shows/forms.py": ["/shows/models.py"], "/shows/urls.py": ["/shows/views.py"], "/user/views.py": ["/shows/models.py"], "/shows/admin.py": ["/shows/models.py"], "/user/urls....
34,537
yhtps237/ostendit
refs/heads/master
/shows/admin.py
from django.contrib import admin from .models import Shows # Register your models here. admin.site.register(Shows)
{"/shows/views.py": ["/shows/models.py", "/shows/forms.py", "/comments/models.py", "/comments/forms.py"], "/pages/views.py": ["/shows/models.py"], "/shows/forms.py": ["/shows/models.py"], "/shows/urls.py": ["/shows/views.py"], "/user/views.py": ["/shows/models.py"], "/shows/admin.py": ["/shows/models.py"], "/user/urls....
34,538
yhtps237/ostendit
refs/heads/master
/shows/migrations/0007_auto_20200527_1037.py
# Generated by Django 2.2.1 on 2020-05-27 06:37 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('shows', '0006_auto_20200527_0939'), ] operations = [ migrations.AlterField( model_name='shows', name='slug', ...
{"/shows/views.py": ["/shows/models.py", "/shows/forms.py", "/comments/models.py", "/comments/forms.py"], "/pages/views.py": ["/shows/models.py"], "/shows/forms.py": ["/shows/models.py"], "/shows/urls.py": ["/shows/views.py"], "/user/views.py": ["/shows/models.py"], "/shows/admin.py": ["/shows/models.py"], "/user/urls....
34,539
yhtps237/ostendit
refs/heads/master
/user/urls.py
from django.urls import path from .views import ( signup_view, login_view, logout_view, user_profile_view, ) app_name = 'user' urlpatterns = [ path('signup/', signup_view, name="signup_view"), path('login/', login_view, name="login_view"), path('logout/', logout_view, name="logout_view"), ...
{"/shows/views.py": ["/shows/models.py", "/shows/forms.py", "/comments/models.py", "/comments/forms.py"], "/pages/views.py": ["/shows/models.py"], "/shows/forms.py": ["/shows/models.py"], "/shows/urls.py": ["/shows/views.py"], "/user/views.py": ["/shows/models.py"], "/shows/admin.py": ["/shows/models.py"], "/user/urls....
34,540
yhtps237/ostendit
refs/heads/master
/searches/models.py
from django.db import models from django.conf import settings # Create your models here. class Search(models.Model): user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.SET_NULL, null=True) query = models.CharField(max_length=100) timestamp = models.DateTimeFie...
{"/shows/views.py": ["/shows/models.py", "/shows/forms.py", "/comments/models.py", "/comments/forms.py"], "/pages/views.py": ["/shows/models.py"], "/shows/forms.py": ["/shows/models.py"], "/shows/urls.py": ["/shows/views.py"], "/user/views.py": ["/shows/models.py"], "/shows/admin.py": ["/shows/models.py"], "/user/urls....
34,541
yhtps237/ostendit
refs/heads/master
/comments/forms.py
from django import forms from .models import Comment class CommentModelForm(forms.ModelForm): comment = forms.CharField(label='', widget=forms.Textarea( attrs={'class': 'form-control'})) class Meta: model = Comment fields = [ 'comment' ]
{"/shows/views.py": ["/shows/models.py", "/shows/forms.py", "/comments/models.py", "/comments/forms.py"], "/pages/views.py": ["/shows/models.py"], "/shows/forms.py": ["/shows/models.py"], "/shows/urls.py": ["/shows/views.py"], "/user/views.py": ["/shows/models.py"], "/shows/admin.py": ["/shows/models.py"], "/user/urls....
34,549
triplez23/mapf-3
refs/heads/master
/utils.py
from matplotlib import colors from matplotlib.animation import ArtistAnimation import matplotlib.pyplot as plt import numpy as np import math import matplotlib matplotlib.use("Agg") class Agent(): def __init__(self, start, target, route): self.start = start self.target = None self.route = ...
{"/alocate_targets.py": ["/a_star.py", "/utils.py"], "/maze_solver.py": ["/utils.py", "/a_star.py", "/alocate_targets.py"], "/a_star.py": ["/utils.py"]}
34,550
triplez23/mapf-3
refs/heads/master
/alocate_targets.py
from a_star import run_a_star import numpy as np import time from utils import plot_paths from itertools import permutations class Rated_combination(): def __init__(self, pathway, rating): self.pathway = pathway self.rating = rating # def sort_by_distance(agents, targets): # distance_table =...
{"/alocate_targets.py": ["/a_star.py", "/utils.py"], "/maze_solver.py": ["/utils.py", "/a_star.py", "/alocate_targets.py"], "/a_star.py": ["/utils.py"]}
34,551
triplez23/mapf-3
refs/heads/master
/maze_solver.py
from termcolor import colored, cprint import os import time import utils import numpy as np from a_star import run_a_star from alocate_targets import alocate class Maze(): def __init__(self, layout, original_layout, agents, targets): self.layout = layout self.original_layout = original_layout ...
{"/alocate_targets.py": ["/a_star.py", "/utils.py"], "/maze_solver.py": ["/utils.py", "/a_star.py", "/alocate_targets.py"], "/a_star.py": ["/utils.py"]}
34,552
triplez23/mapf-3
refs/heads/master
/a_star.py
import utils import heapq def run_a_star(maze, layout, start, end, put_on_a_show, constraints): queue = [] closed = [] prev = {} distance = {} timestep = 0 heapq.heappush(queue, (0, start, timestep)) distance[start] = 0 layout[start[1]][start[0]] = 'S' layout[end[1]][end[0]] = '...
{"/alocate_targets.py": ["/a_star.py", "/utils.py"], "/maze_solver.py": ["/utils.py", "/a_star.py", "/alocate_targets.py"], "/a_star.py": ["/utils.py"]}
34,561
johnviljoen/f16_mpc_py
refs/heads/master
/main.py
# In[] imports # from ctypes import * from ctypes import CDLL #import ctypes import os # import numpy and sin, cos for convenience import numpy as np # handbuilt functions for all this from utils import tic, toc, vis from trim import trim from sim import upd_sim from mpc import linearise, dmom, calc_MC, calc_x_seq, ...
{"/main.py": ["/utils.py", "/trim.py", "/sim.py", "/mpc.py", "/parameters.py"], "/sim.py": ["/parameters.py"], "/trim.py": ["/sim.py", "/parameters.py"], "/redundant/gym_testing.py": ["/parameters.py"], "/redundant/d_mpc_testing.py": ["/utils.py", "/trim.py", "/sim.py", "/mpc.py", "/parameters.py"], "/mpc.py": ["/sim.p...
34,562
johnviljoen/f16_mpc_py
refs/heads/master
/parameters.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Oct 8 22:02:06 2020 @author: johnviljoen """ ''' This file contains all parameters (paras) required to run the simulation, the aircraft, environmental, simulation, initial conditions, and other parameters''' #import numpy as np import numpy as np fro...
{"/main.py": ["/utils.py", "/trim.py", "/sim.py", "/mpc.py", "/parameters.py"], "/sim.py": ["/parameters.py"], "/trim.py": ["/sim.py", "/parameters.py"], "/redundant/gym_testing.py": ["/parameters.py"], "/redundant/d_mpc_testing.py": ["/utils.py", "/trim.py", "/sim.py", "/mpc.py", "/parameters.py"], "/mpc.py": ["/sim.p...
34,563
johnviljoen/f16_mpc_py
refs/heads/master
/sim.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Jul 7 14:50:18 2021 @author: johnviljoen """ import numpy as np from numpy import pi from parameters import act_lim import ctypes def upd_thrust(T_cmd, T_state): # command saturation T_cmd = np.clip(T_cmd,act_lim[1][0],act_lim[0][0]) # ...
{"/main.py": ["/utils.py", "/trim.py", "/sim.py", "/mpc.py", "/parameters.py"], "/sim.py": ["/parameters.py"], "/trim.py": ["/sim.py", "/parameters.py"], "/redundant/gym_testing.py": ["/parameters.py"], "/redundant/d_mpc_testing.py": ["/utils.py", "/trim.py", "/sim.py", "/mpc.py", "/parameters.py"], "/mpc.py": ["/sim.p...
34,564
johnviljoen/f16_mpc_py
refs/heads/master
/trim.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Jul 7 14:49:02 2021 @author: johnviljoen """ import numpy as np from numpy import pi # import scipy fmin for trim function from scipy.optimize import minimize from sim import calc_xdot from parameters import act_lim, x_lim # calculate objective fu...
{"/main.py": ["/utils.py", "/trim.py", "/sim.py", "/mpc.py", "/parameters.py"], "/sim.py": ["/parameters.py"], "/trim.py": ["/sim.py", "/parameters.py"], "/redundant/gym_testing.py": ["/parameters.py"], "/redundant/d_mpc_testing.py": ["/utils.py", "/trim.py", "/sim.py", "/mpc.py", "/parameters.py"], "/mpc.py": ["/sim.p...
34,565
johnviljoen/f16_mpc_py
refs/heads/master
/utils.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Jul 7 14:45:08 2021 @author: johnviljoen """ # import time for tic toc functions import time # import matplotlib for visualisation import matplotlib.pyplot as plt from numpy import pi # In[] def TicTocGenerator(): # Generator that returns t...
{"/main.py": ["/utils.py", "/trim.py", "/sim.py", "/mpc.py", "/parameters.py"], "/sim.py": ["/parameters.py"], "/trim.py": ["/sim.py", "/parameters.py"], "/redundant/gym_testing.py": ["/parameters.py"], "/redundant/d_mpc_testing.py": ["/utils.py", "/trim.py", "/sim.py", "/mpc.py", "/parameters.py"], "/mpc.py": ["/sim.p...
34,566
johnviljoen/f16_mpc_py
refs/heads/master
/redundant/gym_testing.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Jul 10 13:54:33 2021 @author: johnviljoen """ from parameters import x_lim, act_lim import numpy as np import gym from gym import spaces class F16_env(gym.Env): """Custom Environment that follows gym interface""" metadata = {'render.modes': [...
{"/main.py": ["/utils.py", "/trim.py", "/sim.py", "/mpc.py", "/parameters.py"], "/sim.py": ["/parameters.py"], "/trim.py": ["/sim.py", "/parameters.py"], "/redundant/gym_testing.py": ["/parameters.py"], "/redundant/d_mpc_testing.py": ["/utils.py", "/trim.py", "/sim.py", "/mpc.py", "/parameters.py"], "/mpc.py": ["/sim.p...
34,567
johnviljoen/f16_mpc_py
refs/heads/master
/redundant/d_mpc_testing.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Jul 9 19:40:12 2021 @author: johnviljoen """ # In[] imports # from ctypes import * from ctypes import CDLL #import ctypes import os # import numpy and sin, cos for convenience import numpy as np # handbuilt functions for all this from utils import ...
{"/main.py": ["/utils.py", "/trim.py", "/sim.py", "/mpc.py", "/parameters.py"], "/sim.py": ["/parameters.py"], "/trim.py": ["/sim.py", "/parameters.py"], "/redundant/gym_testing.py": ["/parameters.py"], "/redundant/d_mpc_testing.py": ["/utils.py", "/trim.py", "/sim.py", "/mpc.py", "/parameters.py"], "/mpc.py": ["/sim.p...
34,568
johnviljoen/f16_mpc_py
refs/heads/master
/mpc.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Jul 7 14:55:50 2021 @author: johnviljoen """ import numpy as np from sim import calc_xdot, calc_out from scipy.linalg import solve_discrete_lyapunov from sys import exit import scipy # In[ discrete linear quadratic regulator ] # from https://gith...
{"/main.py": ["/utils.py", "/trim.py", "/sim.py", "/mpc.py", "/parameters.py"], "/sim.py": ["/parameters.py"], "/trim.py": ["/sim.py", "/parameters.py"], "/redundant/gym_testing.py": ["/parameters.py"], "/redundant/d_mpc_testing.py": ["/utils.py", "/trim.py", "/sim.py", "/mpc.py", "/parameters.py"], "/mpc.py": ["/sim.p...
34,569
johnviljoen/f16_mpc_py
refs/heads/master
/redundant/test.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Jul 31 14:41:39 2021 @author: johnviljoen """ import numpy as np from numpy import pi import ctypes from ctypes import CDLL import os from parameters import act_lim, x_lim from parameters import initial_state_vector_ft_rad as x0 from parameters impor...
{"/main.py": ["/utils.py", "/trim.py", "/sim.py", "/mpc.py", "/parameters.py"], "/sim.py": ["/parameters.py"], "/trim.py": ["/sim.py", "/parameters.py"], "/redundant/gym_testing.py": ["/parameters.py"], "/redundant/d_mpc_testing.py": ["/utils.py", "/trim.py", "/sim.py", "/mpc.py", "/parameters.py"], "/mpc.py": ["/sim.p...
34,575
sanchit2843/object_detection_helper
refs/heads/main
/utils/util.py
def split_line_yolo(line): line = line.split(" ") path = line[0] boxes = [[int(y) for y in x.split(",")] for x in line[1:]] return path, boxes
{"/plot_yolo_txt.py": ["/utils/util.py"], "/class_distribution_yolo_txt.py": ["/utils/util.py"]}
34,576
sanchit2843/object_detection_helper
refs/heads/main
/plot_yolo_txt.py
import os import cv2 import argparse from utils.util import split_line_yolo def plot_image(image, boxes): for box in boxes: image = cv2.rectangle( image, (box[0], box[1]), (box[2], box[3]), (255, 0, 0), thickness=2 ) image = cv2.putText( image, str(box[4...
{"/plot_yolo_txt.py": ["/utils/util.py"], "/class_distribution_yolo_txt.py": ["/utils/util.py"]}
34,577
sanchit2843/object_detection_helper
refs/heads/main
/class_distribution_yolo_txt.py
import os import argparse from utils.util import split_line_yolo from collections import Counter # give class wise box count if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument( "--yolo_txt_path", type=str, required=True, help="path to yolo txt", ...
{"/plot_yolo_txt.py": ["/utils/util.py"], "/class_distribution_yolo_txt.py": ["/utils/util.py"]}
34,616
ownpush/otp_demo_server
refs/heads/master
/project/config.py
""" The MIT License (MIT) Copyright (c) 2016 Fastboot Mobile LLC. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights ...
{"/project/user/views.py": ["/project/__init__.py", "/project/user/forms.py", "/project/push/tasks.py"], "/project/main/views.py": ["/project/push/tasks.py"], "/project/__init__.py": ["/project/user/views.py", "/project/main/views.py", "/project/push/views.py"]}
34,617
ownpush/otp_demo_server
refs/heads/master
/project/user/views.py
""" The MIT License (MIT) Copyright (c) 2016 Fastboot Mobile LLC. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights ...
{"/project/user/views.py": ["/project/__init__.py", "/project/user/forms.py", "/project/push/tasks.py"], "/project/main/views.py": ["/project/push/tasks.py"], "/project/__init__.py": ["/project/user/views.py", "/project/main/views.py", "/project/push/views.py"]}
34,618
ownpush/otp_demo_server
refs/heads/master
/project/main/views.py
""" The MIT License (MIT) Copyright (c) 2016 Fastboot Mobile LLC. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights ...
{"/project/user/views.py": ["/project/__init__.py", "/project/user/forms.py", "/project/push/tasks.py"], "/project/main/views.py": ["/project/push/tasks.py"], "/project/__init__.py": ["/project/user/views.py", "/project/main/views.py", "/project/push/views.py"]}
34,619
ownpush/otp_demo_server
refs/heads/master
/project/__init__.py
""" The MIT License (MIT) Copyright (c) 2016 Fastboot Mobile LLC. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights ...
{"/project/user/views.py": ["/project/__init__.py", "/project/user/forms.py", "/project/push/tasks.py"], "/project/main/views.py": ["/project/push/tasks.py"], "/project/__init__.py": ["/project/user/views.py", "/project/main/views.py", "/project/push/views.py"]}
34,620
ownpush/otp_demo_server
refs/heads/master
/project/push/views.py
""" The MIT License (MIT) Copyright (c) 2016 Fastboot Mobile LLC. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights ...
{"/project/user/views.py": ["/project/__init__.py", "/project/user/forms.py", "/project/push/tasks.py"], "/project/main/views.py": ["/project/push/tasks.py"], "/project/__init__.py": ["/project/user/views.py", "/project/main/views.py", "/project/push/views.py"]}
34,621
ownpush/otp_demo_server
refs/heads/master
/project/user/forms.py
""" The MIT License (MIT) Copyright (c) 2016 Fastboot Mobile LLC. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights ...
{"/project/user/views.py": ["/project/__init__.py", "/project/user/forms.py", "/project/push/tasks.py"], "/project/main/views.py": ["/project/push/tasks.py"], "/project/__init__.py": ["/project/user/views.py", "/project/main/views.py", "/project/push/views.py"]}
34,622
ownpush/otp_demo_server
refs/heads/master
/project/push/tasks.py
""" The MIT License (MIT) Copyright (c) 2016 Fastboot Mobile LLC. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights ...
{"/project/user/views.py": ["/project/__init__.py", "/project/user/forms.py", "/project/push/tasks.py"], "/project/main/views.py": ["/project/push/tasks.py"], "/project/__init__.py": ["/project/user/views.py", "/project/main/views.py", "/project/push/views.py"]}
34,654
ryan00234/331
refs/heads/master
/temp.py
# -*- coding: utf-8 -*- import os pkg_name = 'bf.cloud.bfclouddemowithui' def cpu(): # os.popen('adb wait-for-device') cmd_cpu = os.popen('adb shell dumpsys cpuinfo |grep bf.cloud.bfclouddemowithui') for i in cmd_cpu.readlines(): cpuinfo = i.split(' ') user = float(cpuinfo[4][:-1]) ...
{"/331.py": ["/temp.py"]}
34,655
ryan00234/331
refs/heads/master
/331.py
# -*- coding: utf-8 -*- from flask import Flask, render_template, jsonify, request from flask_bootstrap import Bootstrap from flask_moment import Moment import temp device_id = '192.168.17.157:5555' app = Flask(__name__) # app.config.from_object('config') bootstrap = Bootstrap(app) moment = Moment(app) @app.errorh...
{"/331.py": ["/temp.py"]}
34,660
ediecs/Sis500
refs/heads/master
/core/test.py
# -*- coding: utf-8 -*- import re from core.functions import * from core.data import * import re, pickle, os def regexTest(): result = run("qual a melhor epoca", "algodao") print(result['0']['pergunta'][0]) rgxPage = re.compile('500pr_pgnumber\w{3}') end = re.sub(rgxPage,'', result['0']['pergunta'][0])...
{"/core/test.py": ["/core/functions.py", "/core/data.py"], "/core/functions.py": ["/core/data.py"], "/core/setup.py": ["/core/functions.py", "/core/data.py"]}
34,661
ediecs/Sis500
refs/heads/master
/core/data.py
#0 = nome do livro, 1 = indice de inicio do getAnswers,2, indice final,3 = pergunta zero, 4 = modo de gravação de txt #5 = nome livro correto listaLivros = \ [ ["abacaxi", 16, 194, "A falta de chuva prejudica o abacaxizeiro", "w", "Abacaxi"], ["algodao", 17, 266, "Qual a origem mais provável do algodoeiro", "w", "Al...
{"/core/test.py": ["/core/functions.py", "/core/data.py"], "/core/functions.py": ["/core/data.py"], "/core/setup.py": ["/core/functions.py", "/core/data.py"]}
34,662
ediecs/Sis500
refs/heads/master
/core/functions.py
#IMPORTAÇÕES: #PDF MINER - pacotes necessários para realizar extração do texto dos PDFs from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter from pdfminer.converter import TextConverter from pdfminer.layout import LAParams from pdfminer.pdfpage import PDFPage from io import StringIO #OUTRAS IMPORTAÇÕES...
{"/core/test.py": ["/core/functions.py", "/core/data.py"], "/core/functions.py": ["/core/data.py"], "/core/setup.py": ["/core/functions.py", "/core/data.py"]}
34,663
ediecs/Sis500
refs/heads/master
/core/setup.py
from core.functions import * from core.data import * #Importa a lista de livros que está no arquivo "data" def importaLista(): return getListaLivros() #Itera por todos os pdfs na lista e transforma em texto def pdf2text(): lista = importaLista() for i in range(0,len(lista)-1): getText(lista[i][0],...
{"/core/test.py": ["/core/functions.py", "/core/data.py"], "/core/functions.py": ["/core/data.py"], "/core/setup.py": ["/core/functions.py", "/core/data.py"]}
34,668
ms-shankar/trending-subreddits
refs/heads/master
/app/tasks/all_subreddits.py
import luigi import luigi.contrib.postgres from app.helpers.prepare_ingestion import PrepareIngestion from app.utils.helper import derive_subreddits_list_save_path, derive_current_timestamp, derive_home_dir class GetAllSubreddits(luigi.Task): """ Gets the latest list of available subreddits from r/ListOfSubr...
{"/app/tasks/all_subreddits.py": ["/app/helpers/prepare_ingestion.py", "/app/utils/helper.py"], "/app/helpers/subreddit_ingestion.py": ["/app/utils/constants.py"], "/tests/test_helpers/test_rank_subreddits.py": ["/app/helpers/rank_subreddits.py", "/tests/test_config/constants.py"], "/app/tasks/ingestion.py": ["/app/uti...
34,669
ms-shankar/trending-subreddits
refs/heads/master
/app/helpers/subreddit_ingestion.py
from app.utils.constants import CONFIG_PATH import praw from dataclasses import dataclass import configparser @dataclass class Post: post_id: str url: str total_comments: int = 0 c: int = 0 post_score: float = 0.0 class SubredditIngestion: """ A helper class for the secondary task Ingest...
{"/app/tasks/all_subreddits.py": ["/app/helpers/prepare_ingestion.py", "/app/utils/helper.py"], "/app/helpers/subreddit_ingestion.py": ["/app/utils/constants.py"], "/tests/test_helpers/test_rank_subreddits.py": ["/app/helpers/rank_subreddits.py", "/tests/test_config/constants.py"], "/app/tasks/ingestion.py": ["/app/uti...
34,670
ms-shankar/trending-subreddits
refs/heads/master
/tests/test_helpers/test_rank_subreddits.py
from parameterized import parameterized import unittest from app.helpers.rank_subreddits import SubredditsRanking from tests.test_config.constants import SUBREDDIT_CONTENTS_SAVE_DIR_1, START_DATE_1, SUBREDDIT_CONTENTS_SAVE_DIR_2, \ START_DATE_2, RANKING_DATA_1, RANKING_DATA_2 from collections import OrderedDict d...
{"/app/tasks/all_subreddits.py": ["/app/helpers/prepare_ingestion.py", "/app/utils/helper.py"], "/app/helpers/subreddit_ingestion.py": ["/app/utils/constants.py"], "/tests/test_helpers/test_rank_subreddits.py": ["/app/helpers/rank_subreddits.py", "/tests/test_config/constants.py"], "/app/tasks/ingestion.py": ["/app/uti...
34,671
ms-shankar/trending-subreddits
refs/heads/master
/app/tasks/ingestion.py
import luigi import os import luigi.contrib.postgres from app.utils.helper import derive_current_timestamp, create_dir, derive_home_dir from app.tasks.all_subreddits import GetAllSubreddits from app.tasks.ingest_subreddit import IngestSubreddit class Ingestion(luigi.Task): """ Ingest the reddit data for all ...
{"/app/tasks/all_subreddits.py": ["/app/helpers/prepare_ingestion.py", "/app/utils/helper.py"], "/app/helpers/subreddit_ingestion.py": ["/app/utils/constants.py"], "/tests/test_helpers/test_rank_subreddits.py": ["/app/helpers/rank_subreddits.py", "/tests/test_config/constants.py"], "/app/tasks/ingestion.py": ["/app/uti...
34,672
ms-shankar/trending-subreddits
refs/heads/master
/app/utils/helper.py
import os import datetime from app.utils.constants import SUBREDDIT_CONTENTS_SAVE_DIR, HOME_DIR, CONFIG_PATH import configparser def cleanup_exisiting_files(file_path): # Handle errors while calling os.remove() try: os.remove(file_path) except FileNotFoundError: print(f"No file in path {fi...
{"/app/tasks/all_subreddits.py": ["/app/helpers/prepare_ingestion.py", "/app/utils/helper.py"], "/app/helpers/subreddit_ingestion.py": ["/app/utils/constants.py"], "/tests/test_helpers/test_rank_subreddits.py": ["/app/helpers/rank_subreddits.py", "/tests/test_config/constants.py"], "/app/tasks/ingestion.py": ["/app/uti...
34,673
ms-shankar/trending-subreddits
refs/heads/master
/app/tasks/ingest_subreddit.py
import luigi import os import luigi.contrib.postgres import json from app.utils.helper import derive_current_timestamp from app.helpers.subreddit_ingestion import SubredditIngestion class IngestSubreddit(luigi.Task): """ Task to individually ingest the Subreddit data and store as separate output targets ...
{"/app/tasks/all_subreddits.py": ["/app/helpers/prepare_ingestion.py", "/app/utils/helper.py"], "/app/helpers/subreddit_ingestion.py": ["/app/utils/constants.py"], "/tests/test_helpers/test_rank_subreddits.py": ["/app/helpers/rank_subreddits.py", "/tests/test_config/constants.py"], "/app/tasks/ingestion.py": ["/app/uti...
34,674
ms-shankar/trending-subreddits
refs/heads/master
/app/helpers/rank_subreddits.py
import os import glob import json from collections import OrderedDict from operator import itemgetter class SubredditsRanking: """ A helper class for the primary task RankSubreddits, that performs all task specific operations """ def __init__(self, start_date, dir_path): self.start_date = sta...
{"/app/tasks/all_subreddits.py": ["/app/helpers/prepare_ingestion.py", "/app/utils/helper.py"], "/app/helpers/subreddit_ingestion.py": ["/app/utils/constants.py"], "/tests/test_helpers/test_rank_subreddits.py": ["/app/helpers/rank_subreddits.py", "/tests/test_config/constants.py"], "/app/tasks/ingestion.py": ["/app/uti...
34,675
ms-shankar/trending-subreddits
refs/heads/master
/tasks_pipeline.py
# default run: # PYTHONPATH='.' luigi --module tasks_pipeline --local-scheduler PipelineWrappertask # custom run: # PYTHONPATH='.' luigi --module tasks_pipeline --local-scheduler PipelineWrappertask(<-configurable params passed->)) from luigi.contrib.simulate import RunAnywayTarget import luigi.contrib.postgres import...
{"/app/tasks/all_subreddits.py": ["/app/helpers/prepare_ingestion.py", "/app/utils/helper.py"], "/app/helpers/subreddit_ingestion.py": ["/app/utils/constants.py"], "/tests/test_helpers/test_rank_subreddits.py": ["/app/helpers/rank_subreddits.py", "/tests/test_config/constants.py"], "/app/tasks/ingestion.py": ["/app/uti...
34,676
ms-shankar/trending-subreddits
refs/heads/master
/app/tasks/rank_subreddits.py
import luigi import luigi.contrib.postgres import os import csv from app.utils.constants import SUBREDDIT_CONTENTS_SAVE_DIR from app.helpers.rank_subreddits import SubredditsRanking from app.utils.helper import derive_subreddits_rank_save_path, derive_current_timestamp from app.tasks.ingestion import Ingestion class...
{"/app/tasks/all_subreddits.py": ["/app/helpers/prepare_ingestion.py", "/app/utils/helper.py"], "/app/helpers/subreddit_ingestion.py": ["/app/utils/constants.py"], "/tests/test_helpers/test_rank_subreddits.py": ["/app/helpers/rank_subreddits.py", "/tests/test_config/constants.py"], "/app/tasks/ingestion.py": ["/app/uti...
34,677
ms-shankar/trending-subreddits
refs/heads/master
/tests/test_helpers/test_prepare_ingestion.py
from parameterized import parameterized import unittest from app.helpers.prepare_ingestion import PrepareIngestion def extract_subreddit_names_test_inputs(): # parameterize input data and expected result as test case inputs return [(" \r\n/r/IndianMusicOnline \r\n/r/RatedChess", ['IndianMusicOnline', 'RatedC...
{"/app/tasks/all_subreddits.py": ["/app/helpers/prepare_ingestion.py", "/app/utils/helper.py"], "/app/helpers/subreddit_ingestion.py": ["/app/utils/constants.py"], "/tests/test_helpers/test_rank_subreddits.py": ["/app/helpers/rank_subreddits.py", "/tests/test_config/constants.py"], "/app/tasks/ingestion.py": ["/app/uti...
34,678
ms-shankar/trending-subreddits
refs/heads/master
/app/utils/constants.py
import os HOME_DIR = os.getcwd().split('/app/utils')[0] ALL_SUBREDDITS_URL = "https://www.reddit.com/r/ListOfSubreddits/wiki/listofsubreddits.json" SUBREDDIT_CONTENTS_SAVE_DIR = os.path.join(HOME_DIR, "datalake") INGESTION_TASKS_STATUS_PATH = os.path.join(HOME_DIR, "ingestion_status.txt") PIPELINE_STATUS_PATH = os....
{"/app/tasks/all_subreddits.py": ["/app/helpers/prepare_ingestion.py", "/app/utils/helper.py"], "/app/helpers/subreddit_ingestion.py": ["/app/utils/constants.py"], "/tests/test_helpers/test_rank_subreddits.py": ["/app/helpers/rank_subreddits.py", "/tests/test_config/constants.py"], "/app/tasks/ingestion.py": ["/app/uti...
34,679
ms-shankar/trending-subreddits
refs/heads/master
/app/helpers/prepare_ingestion.py
import json import urllib from app.utils.constants import ALL_SUBREDDITS_URL, ALL_SUBREDDITS_JSON, MINIMAL_SUBREDDITS_JSON class PrepareIngestion: """ A helper class for the primary task GetAllSubreddits, that performs all task specific operations """ def __init__(self): self.url = ALL_SUBRED...
{"/app/tasks/all_subreddits.py": ["/app/helpers/prepare_ingestion.py", "/app/utils/helper.py"], "/app/helpers/subreddit_ingestion.py": ["/app/utils/constants.py"], "/tests/test_helpers/test_rank_subreddits.py": ["/app/helpers/rank_subreddits.py", "/tests/test_config/constants.py"], "/app/tasks/ingestion.py": ["/app/uti...
34,680
ms-shankar/trending-subreddits
refs/heads/master
/tests/test_tasks/test_tasks.py
import luigi import luigi.interface import unittest import os import shutil from app.tasks.all_subreddits import GetAllSubreddits from tests.test_config.constants import SUBREDDIT_CONTENTS_SAVE_DIR class TestAllTasks(unittest.TestCase): def setUp(self): if os.path.exists(SUBREDDIT_CONTENTS_SAVE_DIR): ...
{"/app/tasks/all_subreddits.py": ["/app/helpers/prepare_ingestion.py", "/app/utils/helper.py"], "/app/helpers/subreddit_ingestion.py": ["/app/utils/constants.py"], "/tests/test_helpers/test_rank_subreddits.py": ["/app/helpers/rank_subreddits.py", "/tests/test_config/constants.py"], "/app/tasks/ingestion.py": ["/app/uti...
34,681
ms-shankar/trending-subreddits
refs/heads/master
/app/tasks/store_rankings.py
import luigi import os import luigi.contrib.postgres import configparser import logging from app.utils.constants import SUBREDDIT_CONTENTS_SAVE_DIR, CONFIG_PATH from app.tasks.rank_subreddits import RankSubreddits from app.helpers.ranking_storage import RankingStorage from app.utils.helper import derive_current_timest...
{"/app/tasks/all_subreddits.py": ["/app/helpers/prepare_ingestion.py", "/app/utils/helper.py"], "/app/helpers/subreddit_ingestion.py": ["/app/utils/constants.py"], "/tests/test_helpers/test_rank_subreddits.py": ["/app/helpers/rank_subreddits.py", "/tests/test_config/constants.py"], "/app/tasks/ingestion.py": ["/app/uti...
34,682
ms-shankar/trending-subreddits
refs/heads/master
/app/helpers/ranking_storage.py
from app.utils.constants import SUBREDDIT_CONTENTS_SAVE_DIR import os import psycopg2 import csv from app.utils.helper import derive_db_config_value class RankingStorage: """ A helper class for the primary task StoreRankings, that performs all task specific operations """ def __init__(self): ...
{"/app/tasks/all_subreddits.py": ["/app/helpers/prepare_ingestion.py", "/app/utils/helper.py"], "/app/helpers/subreddit_ingestion.py": ["/app/utils/constants.py"], "/tests/test_helpers/test_rank_subreddits.py": ["/app/helpers/rank_subreddits.py", "/tests/test_config/constants.py"], "/app/tasks/ingestion.py": ["/app/uti...
34,683
ms-shankar/trending-subreddits
refs/heads/master
/tests/test_config/constants.py
import os HOME_DIR = os.getcwd() SUBREDDIT_CONTENTS_SAVE_DIR_1 = os.path.join(HOME_DIR, "tests", "test_data", "35202015316", "data") START_DATE_1 = "35202015316" SUBREDDIT_CONTENTS_SAVE_DIR_2 = os.path.join(HOME_DIR, "tests", "test_data", "35202015317", "data") START_DATE_2 = "35202015317" RANK1_PATH_1 = os.path.jo...
{"/app/tasks/all_subreddits.py": ["/app/helpers/prepare_ingestion.py", "/app/utils/helper.py"], "/app/helpers/subreddit_ingestion.py": ["/app/utils/constants.py"], "/tests/test_helpers/test_rank_subreddits.py": ["/app/helpers/rank_subreddits.py", "/tests/test_config/constants.py"], "/app/tasks/ingestion.py": ["/app/uti...
34,688
traviswu0910/Intern_Project
refs/heads/master
/Twitters_credentials.py
# credentials.py # Twitter App access keys for @user # Consume: CONSUMER_KEY = '5DTFYr4f0OPxT5CLgBFnlph6o' CONSUMER_SECRET = 'x1LrDVkXhijc6sF8e11feKpJh5AVt85peTyBzWRFSbRDo8icFJ' # Access: ACCESS_TOKEN = '1423189604-U62DkH9fHtUbHAHxu69OiK5m7ljV06Kc4tKOUKQ' ACCESS_SECRET = 'prjj1qFpKXiyOCu3U0xwjForprXcNUUyzIoBvGh0...
{"/Twitters_Crawler.py": ["/Twitters_credentials.py"], "/Twitters_gen_top_twitters_keys.py": ["/Module_Clean.py"], "/util.py": ["/download.py"], "/Twitters_gen_top_twitters.py": ["/Module_Clean.py"], "/index.py": ["/util.py", "/getInputs.py"], "/getInputs.py": ["/GetUIData.py", "/util.py", "/download.py"], "/try_api.py...
34,689
traviswu0910/Intern_Project
refs/heads/master
/Twitters_Raw2Parsed.py
#將rawdata轉成parsed_data import ast import json dic = {} data=[] with open('./All_Data/Twitters_Rawdata/2020-07-20_API.txt') as fp: #填入要parse的rawdata名稱 for line in fp: obj = ast.literal_eval(line) for x in range (len(obj)): if (x%6==0): dic={} dic['Name'] = obj[x] elif (x%6==1): dic['Text'] = obj[x...
{"/Twitters_Crawler.py": ["/Twitters_credentials.py"], "/Twitters_gen_top_twitters_keys.py": ["/Module_Clean.py"], "/util.py": ["/download.py"], "/Twitters_gen_top_twitters.py": ["/Module_Clean.py"], "/index.py": ["/util.py", "/getInputs.py"], "/getInputs.py": ["/GetUIData.py", "/util.py", "/download.py"], "/try_api.py...
34,690
traviswu0910/Intern_Project
refs/heads/master
/Twitters_Crawler.py
from MetaClass import Clean from MetaClass import Crawler import tweepy from Twitters_credentials import * # import Twitters_w2l import time from datetime import datetime import json today=datetime.now().strftime('%Y-%m-%d') RawData=[] def word2list(filename): names = [] with open(filename, 'r') as f: for l in f....
{"/Twitters_Crawler.py": ["/Twitters_credentials.py"], "/Twitters_gen_top_twitters_keys.py": ["/Module_Clean.py"], "/util.py": ["/download.py"], "/Twitters_gen_top_twitters.py": ["/Module_Clean.py"], "/index.py": ["/util.py", "/getInputs.py"], "/getInputs.py": ["/GetUIData.py", "/util.py", "/download.py"], "/try_api.py...
34,691
traviswu0910/Intern_Project
refs/heads/master
/Twitters_gen_top_twitters_keys.py
#推文內容丟入W2V找出前四名 import pandas as pd import json import glob from tqdm import tqdm from gensim.models import Word2Vec import pickle import numpy as np from Module_Clean import Clean #清洗資料 def clean_text(x): #print(text) #print('-------') text = Clean(x) text.Capitalize() text.Delet...
{"/Twitters_Crawler.py": ["/Twitters_credentials.py"], "/Twitters_gen_top_twitters_keys.py": ["/Module_Clean.py"], "/util.py": ["/download.py"], "/Twitters_gen_top_twitters.py": ["/Module_Clean.py"], "/index.py": ["/util.py", "/getInputs.py"], "/getInputs.py": ["/GetUIData.py", "/util.py", "/download.py"], "/try_api.py...
34,692
traviswu0910/Intern_Project
refs/heads/master
/News_Crawler_WSJ.py
# ws.py from bs4 import BeautifulSoup as bs import json from datetime import date import requests from fake_useragent import UserAgent def getUrl(text):#整理資料,只留下title跟link link = '' title = '' text = str(text) filt = text.split('"') #today = str(date.today()).replace('-', '') for a in filt: if len(a)>=5: i...
{"/Twitters_Crawler.py": ["/Twitters_credentials.py"], "/Twitters_gen_top_twitters_keys.py": ["/Module_Clean.py"], "/util.py": ["/download.py"], "/Twitters_gen_top_twitters.py": ["/Module_Clean.py"], "/index.py": ["/util.py", "/getInputs.py"], "/getInputs.py": ["/GetUIData.py", "/util.py", "/download.py"], "/try_api.py...
34,693
traviswu0910/Intern_Project
refs/heads/master
/util.py
# tag.py import random import json import datetime as dt from download import strategy_list SchemaLocation='All_Data/' Path={ 'schema':SchemaLocation, 'feed':'{}Reference/Info.json'.format(SchemaLocation), 'id':'{}Reference/Info_ID.json'.format(SchemaLocation), } class Sign(): SUCCESS = '' USERNAME_T...
{"/Twitters_Crawler.py": ["/Twitters_credentials.py"], "/Twitters_gen_top_twitters_keys.py": ["/Module_Clean.py"], "/util.py": ["/download.py"], "/Twitters_gen_top_twitters.py": ["/Module_Clean.py"], "/index.py": ["/util.py", "/getInputs.py"], "/getInputs.py": ["/GetUIData.py", "/util.py", "/download.py"], "/try_api.py...
34,694
traviswu0910/Intern_Project
refs/heads/master
/Twitters_Cleaned to 2_week_twitter.py
#Cleaned data to two_week_twitter import json import pandas as pd import datetime time_range = pd.date_range('20180101','20200713') #想要輸出多久的資料 for time in time_range: two_week_range = pd.date_range(pd.to_datetime(time)-pd.to_timedelta(2,'w'),time,freq='d') df = [] for days in two_week_range: days = days.strftim...
{"/Twitters_Crawler.py": ["/Twitters_credentials.py"], "/Twitters_gen_top_twitters_keys.py": ["/Module_Clean.py"], "/util.py": ["/download.py"], "/Twitters_gen_top_twitters.py": ["/Module_Clean.py"], "/index.py": ["/util.py", "/getInputs.py"], "/getInputs.py": ["/GetUIData.py", "/util.py", "/download.py"], "/try_api.py...
34,695
traviswu0910/Intern_Project
refs/heads/master
/Twitters_gen_top_twitters.py
#從gen_top_twitters_keys中選出的關鍵字,再去選出推文 import pickle import pandas as pd from tqdm import tqdm import json from Module_Clean import Clean def clean_text(x): #清洗資料 text = Clean(x) text.Capitalize() text.DeletePunctuation() text.DeleteRedundant_Twitters() # print(text.Text) retu...
{"/Twitters_Crawler.py": ["/Twitters_credentials.py"], "/Twitters_gen_top_twitters_keys.py": ["/Module_Clean.py"], "/util.py": ["/download.py"], "/Twitters_gen_top_twitters.py": ["/Module_Clean.py"], "/index.py": ["/util.py", "/getInputs.py"], "/getInputs.py": ["/GetUIData.py", "/util.py", "/download.py"], "/try_api.py...
34,696
traviswu0910/Intern_Project
refs/heads/master
/News_try_and_delete_redundant.py
#抓贅字用,修正清洗資料用 #也可看時間序列變化 import pickle import pandas as pd with open('top_news_keys','rb')as f: data = pickle.load(f) def show_key_words_with_score(): total_date = pd.date_range('20180101','20200708',freq='d') total_date = total_date.strftime('%Y%m%d') for date in total_date: try: print(date) print(data[d...
{"/Twitters_Crawler.py": ["/Twitters_credentials.py"], "/Twitters_gen_top_twitters_keys.py": ["/Module_Clean.py"], "/util.py": ["/download.py"], "/Twitters_gen_top_twitters.py": ["/Module_Clean.py"], "/index.py": ["/util.py", "/getInputs.py"], "/getInputs.py": ["/GetUIData.py", "/util.py", "/download.py"], "/try_api.py...
34,697
traviswu0910/Intern_Project
refs/heads/master
/Twitters_gen_top_tweet_author.py
#輸出三個私募基金推特 import json import pandas as pd data = pd.DataFrame() time_range = pd.date_range('20180101','20200708') time_range = time_range.strftime('%Y%m%d') for date in time_range: with open(f'./All_Data/2_weeks_twitters/{date}.json') as file: data = pd.read_json(file) df = data.query('Name == "realDonaldTr...
{"/Twitters_Crawler.py": ["/Twitters_credentials.py"], "/Twitters_gen_top_twitters_keys.py": ["/Module_Clean.py"], "/util.py": ["/download.py"], "/Twitters_gen_top_twitters.py": ["/Module_Clean.py"], "/index.py": ["/util.py", "/getInputs.py"], "/getInputs.py": ["/GetUIData.py", "/util.py", "/download.py"], "/try_api.py...
34,698
traviswu0910/Intern_Project
refs/heads/master
/index.py
# index.py from flask import Flask, redirect, url_for, render_template, request,jsonify,make_response import json import pandas as pd import datetime as dt from util import * from getInputs import * user = UserInfo() app = Flask(__name__) developing = True @app.route('/draw') def drawingBoard(): return render_te...
{"/Twitters_Crawler.py": ["/Twitters_credentials.py"], "/Twitters_gen_top_twitters_keys.py": ["/Module_Clean.py"], "/util.py": ["/download.py"], "/Twitters_gen_top_twitters.py": ["/Module_Clean.py"], "/index.py": ["/util.py", "/getInputs.py"], "/getInputs.py": ["/GetUIData.py", "/util.py", "/download.py"], "/try_api.py...
34,699
traviswu0910/Intern_Project
refs/heads/master
/Twitter_deleted.py
import pandas as pd import json import ast import os from datetime import datetime, timedelta with open('./All_Data/Twitters_Rawdata/list_try.txt') as f: #open twitter author list name_list = f.readline() name_list = ast.literal_eval(name_list) def find_delete_tweet(date): print('Date:', date) # after_data with ...
{"/Twitters_Crawler.py": ["/Twitters_credentials.py"], "/Twitters_gen_top_twitters_keys.py": ["/Module_Clean.py"], "/util.py": ["/download.py"], "/Twitters_gen_top_twitters.py": ["/Module_Clean.py"], "/index.py": ["/util.py", "/getInputs.py"], "/getInputs.py": ["/GetUIData.py", "/util.py", "/download.py"], "/try_api.py...
34,700
traviswu0910/Intern_Project
refs/heads/master
/getInputs.py
from GetUIData import * from util import * import datetime from download import * def utilInputs(form=None, util=None, user_portfolios=None): if util=='NewsAssistant': selected = {'pph_1':'','pph_2':'','pph_3':'','pph_4':'','pph_5':''} options = [ {'value': 'pph_1', 'label': 'Daily 5% abov...
{"/Twitters_Crawler.py": ["/Twitters_credentials.py"], "/Twitters_gen_top_twitters_keys.py": ["/Module_Clean.py"], "/util.py": ["/download.py"], "/Twitters_gen_top_twitters.py": ["/Module_Clean.py"], "/index.py": ["/util.py", "/getInputs.py"], "/getInputs.py": ["/GetUIData.py", "/util.py", "/download.py"], "/try_api.py...
34,701
traviswu0910/Intern_Project
refs/heads/master
/try_api.py
import pandas as pd import json import ast import glob import os from datetime import datetime import random from Module_Clean import Clean fullName = pd.read_json("./All_Data/Reference/InfoCodeToFullName.json").set_index('InfoCode') synonym = pd.read_json("./All_Data/Reference/Synonym.json").set_index('InfoCode') de...
{"/Twitters_Crawler.py": ["/Twitters_credentials.py"], "/Twitters_gen_top_twitters_keys.py": ["/Module_Clean.py"], "/util.py": ["/download.py"], "/Twitters_gen_top_twitters.py": ["/Module_Clean.py"], "/index.py": ["/util.py", "/getInputs.py"], "/getInputs.py": ["/GetUIData.py", "/util.py", "/download.py"], "/try_api.py...
34,702
traviswu0910/Intern_Project
refs/heads/master
/Twitters_Parsed2Cleaned.py
#Parsed data to Cleaned data import pandas as pd import json import datetime import glob #合併parsed data data = pd.DataFrame() all_txt_files = glob.glob('./All_Data/Twitters_ParsedData/*.json') for file in all_txt_files: a = pd.read_json(file) data = data.append(a) #只取推文、作者、時間 b = data[['Name','Time','Text']] c...
{"/Twitters_Crawler.py": ["/Twitters_credentials.py"], "/Twitters_gen_top_twitters_keys.py": ["/Module_Clean.py"], "/util.py": ["/download.py"], "/Twitters_gen_top_twitters.py": ["/Module_Clean.py"], "/index.py": ["/util.py", "/getInputs.py"], "/getInputs.py": ["/GetUIData.py", "/util.py", "/download.py"], "/try_api.py...
34,703
traviswu0910/Intern_Project
refs/heads/master
/Module_Clean.py
from MetaClass import Clean import re import json import pandas as pd #co_list = pd.read_json('./Schema/Reference/InfoCodeToFullName.json').InfoCode.values.tolist() def not_redundant_int(x): ''' 有些數字在做文字探勘時要去掉,但如果這些數字是公司的infocode則先不去掉 ''' try: x=int(x) return False except:return Tru...
{"/Twitters_Crawler.py": ["/Twitters_credentials.py"], "/Twitters_gen_top_twitters_keys.py": ["/Module_Clean.py"], "/util.py": ["/download.py"], "/Twitters_gen_top_twitters.py": ["/Module_Clean.py"], "/index.py": ["/util.py", "/getInputs.py"], "/getInputs.py": ["/GetUIData.py", "/util.py", "/download.py"], "/try_api.py...
34,704
traviswu0910/Intern_Project
refs/heads/master
/GetUIData.py
# -*- coding: utf-8 -*- """ Created on Thu Jul 9 16:07:17 2020 @author: ZuroChang """ import json import pandas as pd import datetime as dt fullName = pd.read_json("./All_Data/Reference/InfoCodeToFullName.json").set_index('InfoCode') method_list = { 'pph_1':'news_PortfolioList_AbovePositive5', ...
{"/Twitters_Crawler.py": ["/Twitters_credentials.py"], "/Twitters_gen_top_twitters_keys.py": ["/Module_Clean.py"], "/util.py": ["/download.py"], "/Twitters_gen_top_twitters.py": ["/Module_Clean.py"], "/index.py": ["/util.py", "/getInputs.py"], "/getInputs.py": ["/GetUIData.py", "/util.py", "/download.py"], "/try_api.py...
34,705
traviswu0910/Intern_Project
refs/heads/master
/download.py
import pandas as pd import json from datetime import datetime from os import path, mkdir fPath = './All_Data' strategy_list = { 'pph_1':'news_PortfolioList_AbovePositive5', 'pph_2':'news_PortfolioList_BelowNegative5', 'pph_3':'news_PortfolioList_WeekAbovePositive10', 'pph_4':'news_PortfolioList_WeekBe...
{"/Twitters_Crawler.py": ["/Twitters_credentials.py"], "/Twitters_gen_top_twitters_keys.py": ["/Module_Clean.py"], "/util.py": ["/download.py"], "/Twitters_gen_top_twitters.py": ["/Module_Clean.py"], "/index.py": ["/util.py", "/getInputs.py"], "/getInputs.py": ["/GetUIData.py", "/util.py", "/download.py"], "/try_api.py...
34,706
Lorderot/recommendation-system
refs/heads/master
/models.py
from server import db from sqlalchemy import inspect class BaseModel(db.Model): """ Base data model for all objects """ __abstract__ = True def __init__(self, *args): super().__init__(*args) def __repr__(self): """Define a base way to print models""" return '%s%s' % (self.__c...
{"/models.py": ["/server.py"], "/server.py": ["/get_real_estate.py", "/pull_city_polygons.py", "/models.py"], "/manage.py": ["/server.py"]}
34,707
Lorderot/recommendation-system
refs/heads/master
/config.py
import os class BaseConfig(object): DEBUG = False TESTING = False class ProductionConfig(BaseConfig): # export PROD_DATABASE_URL=postgresql://DB_USER:PASSWORD@HOST/DATABASE SQLALCHEMY_DATABASE_URI = os.environ['PROD_DATABASE_URL'] class DevelopmentConfig(BaseConfig): # export DEV_DATABASE_URL=...
{"/models.py": ["/server.py"], "/server.py": ["/get_real_estate.py", "/pull_city_polygons.py", "/models.py"], "/manage.py": ["/server.py"]}
34,708
Lorderot/recommendation-system
refs/heads/master
/get_real_estate.py
import numpy as np import pandas as pd import postgresql from flask import jsonify from geopy import distance, Point from geopy.geocoders import Nominatim from shapely.geometry import Point as shPoint CITY_CENTERS = { 'SAN DIEGO': { 'Latitude': 32.715736, 'Longitude': -117.161087, }, 'SAN ...
{"/models.py": ["/server.py"], "/server.py": ["/get_real_estate.py", "/pull_city_polygons.py", "/models.py"], "/manage.py": ["/server.py"]}
34,709
Lorderot/recommendation-system
refs/heads/master
/server.py
from flask import Flask, request, jsonify from flask_sqlalchemy import SQLAlchemy import os import pandas as pd import geopandas as gpd from get_real_estate import get_real_estate import pull_city_polygons as pcpolygon app = Flask(__name__) # export APP_SETTINGS=config.ProductionConfig # export APP_SETTINGS=config.D...
{"/models.py": ["/server.py"], "/server.py": ["/get_real_estate.py", "/pull_city_polygons.py", "/models.py"], "/manage.py": ["/server.py"]}
34,710
Lorderot/recommendation-system
refs/heads/master
/pull_city_polygons.py
import pandas as pd import geopandas as gpd import osmnx as ox ox.config(use_cache=True) USA_CITIES = [ 'SAN DIEGO', 'SAN FRANCISCO' ] def update_city_polygons(polygons_data_dir): polygons_gdf = gpd.GeoDataFrame() for city in USA_CITIES: city_to_search = '{city}, US'.format(city=city) tr...
{"/models.py": ["/server.py"], "/server.py": ["/get_real_estate.py", "/pull_city_polygons.py", "/models.py"], "/manage.py": ["/server.py"]}
34,711
Lorderot/recommendation-system
refs/heads/master
/manage.py
from flask_script import Manager from flask_migrate import Migrate, MigrateCommand from server import app, db migrate = Migrate(app, db) manager = Manager(app) manager.add_command('db', MigrateCommand) # python manage.py db migrate //detects changes # python manage.py db upgrade //updates DB if __name__ == '__main_...
{"/models.py": ["/server.py"], "/server.py": ["/get_real_estate.py", "/pull_city_polygons.py", "/models.py"], "/manage.py": ["/server.py"]}
34,712
Lorderot/recommendation-system
refs/heads/master
/jsons/test_request.py
import json import requests from time import clock JSON_TO_SEND = r'input.json' with open(JSON_TO_SEND) as json_file: json_data = json.load(json_file) request_header = { 'Content-Type': 'application/json', 'Accept': 'application/json' } st = clock() resp = requests.post('http://localhost:5000/api/destina...
{"/models.py": ["/server.py"], "/server.py": ["/get_real_estate.py", "/pull_city_polygons.py", "/models.py"], "/manage.py": ["/server.py"]}
34,754
Sherlock-Hou/Huffing_n_PUFfin
refs/heads/master
/PUFAttackSimulation.py
from ArbiterPUF import ArbiterPUF from ArbiterPUFClone import ArbiterPUFClone, PUFClassifier from numpy import shape from CRP import CRP import json from pandas import DataFrame from LogisticRegression import LogisticRegressionModel, LogisticRegressionCostFunction, RPROP import random from multiprocessing import Pool f...
{"/PUFAttackSimulation.py": ["/CMAEvolutionStrategy.py", "/ArbiterPUFFitnessMetric.py"]}
34,755
Sherlock-Hou/Huffing_n_PUFfin
refs/heads/master
/CMAEvolutionStrategy.py
from numpy import identity, sqrt, power, exp, floor, log, divide, sum, multiply, square, subtract from numpy.random import multivariate_normal from numpy.ma import sum, dot, transpose from random import random from numpy.linalg import inv class CMAEvolutionStrategy: def __init__(self, problem_dimension, fitness_m...
{"/PUFAttackSimulation.py": ["/CMAEvolutionStrategy.py", "/ArbiterPUFFitnessMetric.py"]}
34,756
Sherlock-Hou/Huffing_n_PUFfin
refs/heads/master
/ArbiterPUFFitnessMetric.py
from numpy import count_nonzero from Simplified_Arbiter_PUF import SimplifiedArbiterPUF from XORArbiterPUF import XORArbiterPUF class XORArbiterPUFFitnessMetric: def __init__(self, training_set): self.training_set = training_set def get_fitness(self, candidate_vectors): internal_pufs = [Simpli...
{"/PUFAttackSimulation.py": ["/CMAEvolutionStrategy.py", "/ArbiterPUFFitnessMetric.py"]}
34,823
catherineverdiergo/XebExercice
refs/heads/master
/mowerstestplayer.py
# -*- coding:utf-8 -*- import re from mower import Mower UP_RIGHT_CORNER_PATTERN = re.compile('([-+]?\\d+) ([-+]?\\d+)') MOWER_STATUS_PATTERN = re.compile('([-+]?\\d+) ([-+]?\\d+) ([NESW])') def read_integer(matcher, grp_number, line_number): """ Parse an integer from a regex matcher able to parse strings...
{"/mowerstestplayer.py": ["/mower.py"], "/mowersviz.py": ["/mowerstestplayer.py", "/mower.py"], "/testmowers.py": ["/mowerstestplayer.py"]}
34,824
catherineverdiergo/XebExercice
refs/heads/master
/mowersviz.py
# -*- coding:utf-8 -*- from matplotlib import pyplot as plt import numpy as np from matplotlib import cm from matplotlib.colors import ListedColormap from mowerstestplayer import MowersTestPlayer from mower import Mower from matplotlib.animation import FuncAnimation from matplotlib.patches import FancyArrow TITLE_LIN...
{"/mowerstestplayer.py": ["/mower.py"], "/mowersviz.py": ["/mowerstestplayer.py", "/mower.py"], "/testmowers.py": ["/mowerstestplayer.py"]}
34,825
catherineverdiergo/XebExercice
refs/heads/master
/mower.py
# -*- coding:utf-8 -*- """ Xebia exercice: Robotic mower moving on a grid lawn modelization. """ class Mower(object): GRID_UP_RIGHT_CORNER = None # should hold upper right corner of the grid ( via set_up_right_corner method) # list of valid orientations (!!! keep this order to insure proper swing operat...
{"/mowerstestplayer.py": ["/mower.py"], "/mowersviz.py": ["/mowerstestplayer.py", "/mower.py"], "/testmowers.py": ["/mowerstestplayer.py"]}
34,826
catherineverdiergo/XebExercice
refs/heads/master
/testmowers.py
import unittest from mowerstestplayer import MowersTestPlayer class MowerTestCase(unittest.TestCase): def test1(self): # Open and parse test file player = MowersTestPlayer('testmowers1.data') player.open() # play test results = player.apply() # check results ...
{"/mowerstestplayer.py": ["/mower.py"], "/mowersviz.py": ["/mowerstestplayer.py", "/mower.py"], "/testmowers.py": ["/mowerstestplayer.py"]}
34,873
OpenNews/opennews-source
refs/heads/master
/source/people/migrations/0004_auto_20170206_2215.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2017-02-06 22:15 from __future__ import unicode_literals from django.db import migrations import sorl.thumbnail.fields class Migration(migrations.Migration): dependencies = [ ('people', '0003_organizationadmin'), ] operations = [ m...
{"/source/utils/caching.py": ["/source/utils/json.py"], "/source/people/models.py": ["/source/base/utils.py", "/source/utils/auth.py", "/source/utils/caching.py"], "/source/code/urls.py": ["/source/code/views.py"], "/source/people/management/commands/migrate_org_admins.py": ["/source/people/models.py"], "/config/settin...
34,874
OpenNews/opennews-source
refs/heads/master
/source/jobs/migrations/0001_initial.py
# -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2016-01-28 01:00 from __future__ import unicode_literals import caching.base from django.db import migrations, models import django.db.models.deletion import source.jobs.models class Migration(migrations.Migration): initial = True dependencies = [ ...
{"/source/utils/caching.py": ["/source/utils/json.py"], "/source/people/models.py": ["/source/base/utils.py", "/source/utils/auth.py", "/source/utils/caching.py"], "/source/code/urls.py": ["/source/code/views.py"], "/source/people/management/commands/migrate_org_admins.py": ["/source/people/models.py"], "/config/settin...
34,875
OpenNews/opennews-source
refs/heads/master
/source/utils/caching.py
import hashlib import json from django.conf import settings from django.contrib.auth.decorators import login_required from django.core.cache import cache from django.core.urlresolvers import resolve, reverse from django.http import HttpRequest, HttpResponse, HttpResponseForbidden, Http404, JsonResponse from django.uti...
{"/source/utils/caching.py": ["/source/utils/json.py"], "/source/people/models.py": ["/source/base/utils.py", "/source/utils/auth.py", "/source/utils/caching.py"], "/source/code/urls.py": ["/source/code/views.py"], "/source/people/management/commands/migrate_org_admins.py": ["/source/people/models.py"], "/config/settin...
34,876
OpenNews/opennews-source
refs/heads/master
/source/utils/json.py
import json from django.http import JsonResponse from django.utils.functional import Promise from django.utils.encoding import force_text from django.core.serializers.json import DjangoJSONEncoder class LazyEncoder(DjangoJSONEncoder): def default(self, obj): if isinstance(obj, Promise): return...
{"/source/utils/caching.py": ["/source/utils/json.py"], "/source/people/models.py": ["/source/base/utils.py", "/source/utils/auth.py", "/source/utils/caching.py"], "/source/code/urls.py": ["/source/code/views.py"], "/source/people/management/commands/migrate_org_admins.py": ["/source/people/models.py"], "/config/settin...
34,877
OpenNews/opennews-source
refs/heads/master
/source/code/migrations/0003_auto_20161213_1755.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-12-13 17:55 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('code', '0002_auto_20160128_0100'), ] operations = [ migrations.AddField( ...
{"/source/utils/caching.py": ["/source/utils/json.py"], "/source/people/models.py": ["/source/base/utils.py", "/source/utils/auth.py", "/source/utils/caching.py"], "/source/code/urls.py": ["/source/code/views.py"], "/source/people/management/commands/migrate_org_admins.py": ["/source/people/models.py"], "/config/settin...
34,878
OpenNews/opennews-source
refs/heads/master
/source/people/models.py
import requests from datetime import datetime from django.conf import settings from django.core.urlresolvers import reverse from django.contrib.auth.models import User from django.db import models from django.db.models.signals import post_save, post_delete from django.dispatch import receiver from django.utils.html im...
{"/source/utils/caching.py": ["/source/utils/json.py"], "/source/people/models.py": ["/source/base/utils.py", "/source/utils/auth.py", "/source/utils/caching.py"], "/source/code/urls.py": ["/source/code/views.py"], "/source/people/management/commands/migrate_org_admins.py": ["/source/people/models.py"], "/config/settin...
34,879
OpenNews/opennews-source
refs/heads/master
/source/code/migrations/0005_code_grouping.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2017-01-19 22:04 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('code', '0004_auto_20170117_1904'), ] operations = [ migrations.AddField( ...
{"/source/utils/caching.py": ["/source/utils/json.py"], "/source/people/models.py": ["/source/base/utils.py", "/source/utils/auth.py", "/source/utils/caching.py"], "/source/code/urls.py": ["/source/code/views.py"], "/source/people/management/commands/migrate_org_admins.py": ["/source/people/models.py"], "/config/settin...