index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
43,196
fsociety6/SmartAurangabadHack
refs/heads/master
/CCWebsite/account/migrations/0005_auto_20200121_1256.py
# Generated by Django 2.2.5 on 2020-01-21 07:26 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('account', '0004_auto_20200121_1113'), ] operations = [ migrations.AlterField( model_name='extendedusermodel', name='...
{"/CCWebsite/account/views.py": ["/CCWebsite/account/forms.py"], "/CCWebsite/account/forms.py": ["/CCWebsite/account/models.py"], "/CCWebsite/account/admin.py": ["/CCWebsite/account/models.py"], "/CCWebsite/health/admin.py": ["/CCWebsite/health/models.py"]}
43,197
fsociety6/SmartAurangabadHack
refs/heads/master
/CCWebsite/account/migrations/0003_auto_20200121_1111.py
# Generated by Django 2.2.5 on 2020-01-21 05:41 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('account', '0002_auto_20200121_1057'), ] operations = [ migrations.AlterField( model_name='extendedusermodel', name='...
{"/CCWebsite/account/views.py": ["/CCWebsite/account/forms.py"], "/CCWebsite/account/forms.py": ["/CCWebsite/account/models.py"], "/CCWebsite/account/admin.py": ["/CCWebsite/account/models.py"], "/CCWebsite/health/admin.py": ["/CCWebsite/health/models.py"]}
43,198
fsociety6/SmartAurangabadHack
refs/heads/master
/CCWebsite/account/forms.py
from django.contrib.auth.forms import UserCreationForm from django import forms from django.contrib.auth.models import User from .models import ExtendedUserModel from account.models import ExtendedUserModel class UserForm(UserCreationForm): class Meta: model = User fields = ['username', 'email', '...
{"/CCWebsite/account/views.py": ["/CCWebsite/account/forms.py"], "/CCWebsite/account/forms.py": ["/CCWebsite/account/models.py"], "/CCWebsite/account/admin.py": ["/CCWebsite/account/models.py"], "/CCWebsite/health/admin.py": ["/CCWebsite/health/models.py"]}
43,199
fsociety6/SmartAurangabadHack
refs/heads/master
/CCWebsite/account/admin.py
from django.contrib import admin from .models import ExtendedUserModel # Register your models here. admin.site.register(ExtendedUserModel)
{"/CCWebsite/account/views.py": ["/CCWebsite/account/forms.py"], "/CCWebsite/account/forms.py": ["/CCWebsite/account/models.py"], "/CCWebsite/account/admin.py": ["/CCWebsite/account/models.py"], "/CCWebsite/health/admin.py": ["/CCWebsite/health/models.py"]}
43,200
fsociety6/SmartAurangabadHack
refs/heads/master
/CCWebsite/health/migrations/0002_crowdsource.py
# Generated by Django 2.2.5 on 2020-01-21 12:47 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('health', '0001_initial')...
{"/CCWebsite/account/views.py": ["/CCWebsite/account/forms.py"], "/CCWebsite/account/forms.py": ["/CCWebsite/account/models.py"], "/CCWebsite/account/admin.py": ["/CCWebsite/account/models.py"], "/CCWebsite/health/admin.py": ["/CCWebsite/health/models.py"]}
43,201
fsociety6/SmartAurangabadHack
refs/heads/master
/CCWebsite/account/models.py
from django.contrib.auth.models import User from django.db import models from phone_field import PhoneField class ExtendedUserModel(models.Model): choice=[('MALE','Male'),('FEMALE','Female')] age = models.IntegerField() gender = models.CharField(max_length=20,choices=choice) location = models.DecimalF...
{"/CCWebsite/account/views.py": ["/CCWebsite/account/forms.py"], "/CCWebsite/account/forms.py": ["/CCWebsite/account/models.py"], "/CCWebsite/account/admin.py": ["/CCWebsite/account/models.py"], "/CCWebsite/health/admin.py": ["/CCWebsite/health/models.py"]}
43,202
fsociety6/SmartAurangabadHack
refs/heads/master
/CCWebsite/health/models.py
from django.db import models from django.contrib.auth.models import User # Create your models here. class Disease(models.Model): ID1 = models.IntegerField() name = models.CharField(max_length=1000) def __str__(self): return f'{self.name}' class Crowdsource(models.Model): choice = [('MALE', ...
{"/CCWebsite/account/views.py": ["/CCWebsite/account/forms.py"], "/CCWebsite/account/forms.py": ["/CCWebsite/account/models.py"], "/CCWebsite/account/admin.py": ["/CCWebsite/account/models.py"], "/CCWebsite/health/admin.py": ["/CCWebsite/health/models.py"]}
43,203
fsociety6/SmartAurangabadHack
refs/heads/master
/CCWebsite/account/migrations/0006_auto_20200121_2141.py
# Generated by Django 2.2.5 on 2020-01-21 16:11 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('account', '0005_auto_20200121_1256'), ] operations = [ migrations.AlterFie...
{"/CCWebsite/account/views.py": ["/CCWebsite/account/forms.py"], "/CCWebsite/account/forms.py": ["/CCWebsite/account/models.py"], "/CCWebsite/account/admin.py": ["/CCWebsite/account/models.py"], "/CCWebsite/health/admin.py": ["/CCWebsite/health/models.py"]}
43,204
fsociety6/SmartAurangabadHack
refs/heads/master
/CCWebsite/health/admin.py
from django.contrib import admin from .models import Disease,Crowdsource # Register your models here. # class Details(admin.ModelAdmin): # fieldsets=[ # ("Personal Details",{"fields":["Age","Gender","Created_By","created_date","modified_date"]}), # ("Disease",{"fields":["Disease"]}) # ] admin.s...
{"/CCWebsite/account/views.py": ["/CCWebsite/account/forms.py"], "/CCWebsite/account/forms.py": ["/CCWebsite/account/models.py"], "/CCWebsite/account/admin.py": ["/CCWebsite/account/models.py"], "/CCWebsite/health/admin.py": ["/CCWebsite/health/models.py"]}
43,205
fsociety6/SmartAurangabadHack
refs/heads/master
/CCWebsite/CCWebsite/routing.py
from channels.routing import ProtocolTypeRouter from channels.security.websocket import AllowedHostsOriginValidator application = ProtocolTypeRouter({ # # Empty for now (http->django views is added by default) # 'websocket': AllowedHostsOriginValidator( # # ) })
{"/CCWebsite/account/views.py": ["/CCWebsite/account/forms.py"], "/CCWebsite/account/forms.py": ["/CCWebsite/account/models.py"], "/CCWebsite/account/admin.py": ["/CCWebsite/account/models.py"], "/CCWebsite/health/admin.py": ["/CCWebsite/health/models.py"]}
43,211
Nitsua365/MazeGenerator
refs/heads/main
/mazeGenerator.py
from numpy import ndarray from random import randint import cv2 class MazeNode: def __init__(self, coordinate, index): self.coordinate = coordinate self.index = index def __eq__(self, other): return self.coordinate[0] == other.coordinate[0] and \ self.coordinate[1] == o...
{"/main.py": ["/mazeGenerator.py"]}
43,212
Nitsua365/MazeGenerator
refs/heads/main
/main.py
from mazeGenerator import MazeGenerator def main(): mazeNodeWidthInput = int(input("enter node width: ")) mazeNodeHeightInput = int(input("enter node height: ")) mazeWallWidth = int(input("enter wall width: ")) mazeNodeSize = int(input("enter maze node size: ")) mazeOutputFileName = input("enter o...
{"/main.py": ["/mazeGenerator.py"]}
43,213
XinBow99/dacrd-by-python
refs/heads/master
/Dcard.py
##########imports########## import requests import json import os # 停止SSL報錯 from requests.packages.urllib3.exceptions import InsecureRequestWarning requests.packages.urllib3.disable_warnings(InsecureRequestWarning) ########################### # 解析JSON ########################### class Dcard: def __init__(self): ...
{"/main.py": ["/Dcard.py"]}
43,214
XinBow99/dacrd-by-python
refs/heads/master
/main.py
import Dcard if __name__ == "__main__": user = Dcard.Dcard() user.getForumsInfor('nkfust', popular=True, limit=30) #user.downloadImage() user.getThisInfo()
{"/main.py": ["/Dcard.py"]}
43,217
runvnc/zork_on_gemini
refs/heads/master
/data.py
import os, subprocess, sys from urllib.parse import unquote from shlex import quote from pathlib import Path import time parent_pipes = {} child_pipes = {} mypath = os.path.dirname(os.path.realpath(__file__)) def fname(which,usr): return f'{mypath}/data/{which}_{usr}' def outf(usr): return fname('OUTPUT',usr) def ...
{"/spawner.py": ["/control_zork.py"], "/control_zork.py": ["/data_redis.py"]}
43,218
runvnc/zork_on_gemini
refs/heads/master
/spawner.py
#!/usr/bin/python import os, subprocess, sys from urllib.parse import unquote from pathlib import Path import time from multiprocessing import Process, set_start_method import logging, redis, datetime from control_zork import * logging.basicConfig(filename='spawner.log', level=logging.DEBUG) pubsub = {} mypath = os....
{"/spawner.py": ["/control_zork.py"], "/control_zork.py": ["/data_redis.py"]}
43,219
runvnc/zork_on_gemini
refs/heads/master
/data_redis.py
import os, subprocess, sys from urllib.parse import unquote, quote from pathlib import Path import time from multiprocessing import Process, set_start_method import logging, redis, datetime pubsub = {} mypath = os.path.dirname(os.path.realpath(__file__)) redisconn = redis.Redis(host='localhost', port=6379, db=0, deco...
{"/spawner.py": ["/control_zork.py"], "/control_zork.py": ["/data_redis.py"]}
43,220
runvnc/zork_on_gemini
refs/heads/master
/data_pipes.py
import os, subprocess, sys from urllib.parse import unquote from shlex import quote from pathlib import Path import time from multiprocessing import Process, Pipe, set_start_method import logging #parent_pipes = {} #child_pipes = {} mypath = os.path.dirname(os.path.realpath(__file__)) def spawn_session(usr, func): ...
{"/spawner.py": ["/control_zork.py"], "/control_zork.py": ["/data_redis.py"]}
43,221
runvnc/zork_on_gemini
refs/heads/master
/control_zork.py
#!/usr/bin/python import os, pexpect, sys, time, traceback from data_redis import * import logging import pexpect.replwrap import atexit APPTIMEOUT = 60 * 30 PINGINTERVAL = 1 def exiting(): logging.info("Child exiting for some reason."+__name__) def init(user): if os.fork() == 0: # <-- return ...
{"/spawner.py": ["/control_zork.py"], "/control_zork.py": ["/data_redis.py"]}
43,222
runvnc/zork_on_gemini
refs/heads/master
/start_server.py
#!/bin/bash rm *.log redis-cli --scan --pattern active* | xargs redis-cli del while true; do jetforce --hostname zork.club --host 167.71.119.170 --tls-certfile /etc/letsencrypt/live/zork.club/fullchain.pem --tls-keyfile /etc/letsencrypt/live/zork.club/privkey.pem done
{"/spawner.py": ["/control_zork.py"], "/control_zork.py": ["/data_redis.py"]}
43,223
runvnc/zork_on_gemini
refs/heads/master
/gemini.py
import os from urllib.parse import unquote from shlex import quote from pathlib import Path import shortuuid query = '' if 'QUERY_STRING' in os.environ: query = unquote(os.environ["QUERY_STRING"]) user = '' if 'REMOTE_USER' in os.environ: user = quote(unquote(os.environ["REMOTE_USER"])) user = user[:30] ...
{"/spawner.py": ["/control_zork.py"], "/control_zork.py": ["/data_redis.py"]}
43,281
vikrant462/Word_Puzzle_Game
refs/heads/master
/homepage.py
import sqlite3 as sql import winsound import random from tkinter import * import PIL.Image import tkinter from PIL import ImageTk, Image import PIL.Image import os #sound winsound.PlaySound("game_menu",winsound.SND_ASYNC) #ENDsound a=['movies','fruits','cities','plants','animals'] f=open('file.txt','w') f.write(rando...
{"/MAIN_FILE_If_Using_Idle.py": ["/beta1.py", "/homepage.py"]}
43,282
vikrant462/Word_Puzzle_Game
refs/heads/master
/MAIN_FILE_If_Using_Idle.py
import imp import tkinter import beta1 import homepage if __name__=='__main__': imp.reload(homepage) while True: imp.reload(beta1) beta1.main() if beta1.reset_val==1: continue if beta1.exit_val==1: break
{"/MAIN_FILE_If_Using_Idle.py": ["/beta1.py", "/homepage.py"]}
43,283
vikrant462/Word_Puzzle_Game
refs/heads/master
/beta1.py
### Packages import winsound import tkinter import PIL.Image from PIL import ImageTk, Image import threading import sqlite3 as sql import random import time import numpy as np from tkinter import * import tkinter.messagebox as tm ### END Packages ### Global variables ##word creation i,g,count,beg_row,beg_col,m=0,0,0,...
{"/MAIN_FILE_If_Using_Idle.py": ["/beta1.py", "/homepage.py"]}
43,284
HarryThuku/News-Highlight
refs/heads/master
/app/requests.py
import urllib.request, json from .models import Source, Article import ssl api_key = None sources_url = None top_headlines_url = None news_by_sources = None search_url = None context = ssl._create_unverified_context() def configure_requests(app): ''' ''' global sources_url, top_headlines_url, api_key, ne...
{"/app/main/views.py": ["/app/requests.py"]}
43,285
HarryThuku/News-Highlight
refs/heads/master
/app/main/errors.py
from flask import render_template from . import main @main.errorhandler(404) def four_Ow_four(error): return render_template('error.html'),404
{"/app/main/views.py": ["/app/requests.py"]}
43,286
HarryThuku/News-Highlight
refs/heads/master
/app/main/views.py
from flask import render_template, request, redirect, url_for from . import main from ..requests import get_sources, get_article, get_article_source, search_news @main.route('/') def index(): title = 'Home | News Highlights' sources = get_sources() general_news = get_article('general') return render_te...
{"/app/main/views.py": ["/app/requests.py"]}
43,287
HarryThuku/News-Highlight
refs/heads/master
/config.py
import os class Config: ''' ''' SOURCES_URL = 'https://newsapi.org/v2/sources?language=en&apiKey={}' NEWS_BY_SOURCES_URL = 'https://newsapi.org/v2/top-headlines?sources={}&apiKey={}' TOP_HEADLINES_URL = 'https://newsapi.org/v2/top-headlines?country=us&category={}&apiKey={}' # it displays news items...
{"/app/main/views.py": ["/app/requests.py"]}
43,288
hui2018/CopyFileFromExcelPath
refs/heads/master
/runHemoTool.py
import os def runHemo(): filePath = 'C:\\Users\\Jack\\Desktop\\des' arr = os.listdir(filePath) for a in range(len(arr)): #os.system('hemo exe location -csv ' + "path of the .csv files arr[a]") print(arr[a]) #os.system('C:\\Users\\Jack\\Desktop\\test\\test.xlsx')
{"/readFile.py": ["/runHemoTool.py"]}
43,289
hui2018/CopyFileFromExcelPath
refs/heads/master
/readFile.py
import pandas as pd import shutil as st import runHemoTool as hemo def main(): df = pd.read_excel('C:\\Users\\Jack\\Desktop\\test\\test.xlsx', sheet_name='Sheet2') mylist = df['A'].tolist() for a in range(len(mylist)): splitting = mylist[a].split('\\') fileName = splitting[len(splitting)-1...
{"/readFile.py": ["/runHemoTool.py"]}
43,292
jordandpflum/TextAnalysis
refs/heads/master
/webScraper.py
from selenium import webdriver, common chrome_options = webdriver.ChromeOptions() chrome_options.add_argument('--headless') chrome_options.add_argument('--no-sandbox') chrome_options.add_argument('--disable-dev-shm-usage') import pandas as pd import sys def edmundWebScraper(url, pages): """ Scrape Data from a ...
{"/mianDriver_Jordan.py": ["/webScraper.py", "/replaceModelWBrand.py", "/MDS.py", "/calculateLift.py"], "/mainDriver_Katelyn.py": ["/webScraper.py", "/replaceModelWBrand.py", "/MDS.py", "/calculateLift.py"]}
43,293
jordandpflum/TextAnalysis
refs/heads/master
/MDS.py
def MDS(): return None
{"/mianDriver_Jordan.py": ["/webScraper.py", "/replaceModelWBrand.py", "/MDS.py", "/calculateLift.py"], "/mainDriver_Katelyn.py": ["/webScraper.py", "/replaceModelWBrand.py", "/MDS.py", "/calculateLift.py"]}
43,294
jordandpflum/TextAnalysis
refs/heads/master
/mianDriver_Jordan.py
from webScraper import edmundWebScraper from replaceModelWBrand import replaceModelWBrand from MDS import MDS from calculateLift import calculateLift from selenium import webdriver chrome_options = webdriver.ChromeOptions() chrome_options.add_argument('--headless') chrome_options.add_argument('--no-sandbox') chrome_op...
{"/mianDriver_Jordan.py": ["/webScraper.py", "/replaceModelWBrand.py", "/MDS.py", "/calculateLift.py"], "/mainDriver_Katelyn.py": ["/webScraper.py", "/replaceModelWBrand.py", "/MDS.py", "/calculateLift.py"]}
43,295
jordandpflum/TextAnalysis
refs/heads/master
/mainDriver_Bryant.py
import numpy as np from sklearn.datasets import load_iris import matplotlib.pyplot as plt from sklearn.manifold import MDS from sklearn.preprocessing import MinMaxScaler scaler = MinMaxScaler() X_scaled = scaler.fit_transform(X) mds = MDS(2,random_state=0) X_2d = mds.fit_transform(X_scaled) colors = ['re...
{"/mianDriver_Jordan.py": ["/webScraper.py", "/replaceModelWBrand.py", "/MDS.py", "/calculateLift.py"], "/mainDriver_Katelyn.py": ["/webScraper.py", "/replaceModelWBrand.py", "/MDS.py", "/calculateLift.py"]}
43,296
jordandpflum/TextAnalysis
refs/heads/master
/mainDriver_Katelyn.py
from webScraper import edmundWebScraper from replaceModelWBrand import replaceModelWBrand from MDS import MDS from calculateLift import calculateLift
{"/mianDriver_Jordan.py": ["/webScraper.py", "/replaceModelWBrand.py", "/MDS.py", "/calculateLift.py"], "/mainDriver_Katelyn.py": ["/webScraper.py", "/replaceModelWBrand.py", "/MDS.py", "/calculateLift.py"]}
43,297
jordandpflum/TextAnalysis
refs/heads/master
/calculateLift.py
def calculateLift(): return None
{"/mianDriver_Jordan.py": ["/webScraper.py", "/replaceModelWBrand.py", "/MDS.py", "/calculateLift.py"], "/mainDriver_Katelyn.py": ["/webScraper.py", "/replaceModelWBrand.py", "/MDS.py", "/calculateLift.py"]}
43,298
jordandpflum/TextAnalysis
refs/heads/master
/replaceModelWBrand.py
def replaceModelWBrand(tokens, wordBrandCSV): """ Replace Model Occurance with Brand :param tokens: list of all important words in comments :param wordBrandCSV: CSV of word-brand association :return: a list of allBrands mentioned in the comments """ brandWordAssociation = pd.read_csv('word...
{"/mianDriver_Jordan.py": ["/webScraper.py", "/replaceModelWBrand.py", "/MDS.py", "/calculateLift.py"], "/mainDriver_Katelyn.py": ["/webScraper.py", "/replaceModelWBrand.py", "/MDS.py", "/calculateLift.py"]}
43,303
ericlearning/inverse-kinematics
refs/heads/main
/utils/graphics.py
import torch import arcade import torch.nn as nn import torch.optim as optim from arcade.key import * from .visualization import draw_arm from .losses import mseloss, constraint keys_inc = [Q, W, E, R, T, Y, U, I, O] keys_dec = [A, S, D, F, G, H, J, K, L] class Kinematics(arcade.Window): def __init__(self, w, h, ...
{"/utils/graphics.py": ["/utils/visualization.py", "/utils/losses.py"], "/vis_inv_constraint.py": ["/utils/graphics.py"], "/vis_kinematics.py": ["/utils/graphics.py"], "/utils/visualization.py": ["/utils/kinematics.py"]}
43,304
ericlearning/inverse-kinematics
refs/heads/main
/vis_inv_constraint.py
import math import torch import arcade import torch.nn as nn from utils.graphics import InvKinematicsConstraint WIDTH = 800 HEIGHT = 800 COUNT = 200 all_thetas = torch.rand((COUNT,)) * (3.1415 * 2) all_arms = torch.rand((COUNT,)) * (15) + 5 all_thetas = torch.full((COUNT,), 0, dtype=torch.float32) all_arms = torch.f...
{"/utils/graphics.py": ["/utils/visualization.py", "/utils/losses.py"], "/vis_inv_constraint.py": ["/utils/graphics.py"], "/vis_kinematics.py": ["/utils/graphics.py"], "/utils/visualization.py": ["/utils/kinematics.py"]}
43,305
ericlearning/inverse-kinematics
refs/heads/main
/vis_kinematics.py
import torch import arcade from utils.graphics import Kinematics WIDTH = 800 HEIGHT = 800 COUNT = 9 all_thetas = torch.rand((COUNT,)) * (3.1415 * 2) all_arms = torch.rand((COUNT,)) * (50) + 50 def main(): window = Kinematics( w=WIDTH, h=HEIGHT, title='Kinematics', all_thetas=all_t...
{"/utils/graphics.py": ["/utils/visualization.py", "/utils/losses.py"], "/vis_inv_constraint.py": ["/utils/graphics.py"], "/vis_kinematics.py": ["/utils/graphics.py"], "/utils/visualization.py": ["/utils/kinematics.py"]}
43,306
ericlearning/inverse-kinematics
refs/heads/main
/utils/visualization.py
import torch import arcade from skimage.color import hsv2rgb from .kinematics import forward_kinematics, forward_kinematics_all @torch.no_grad() def draw_arm_naive(thetas, arms, w, h): prev_x, prev_y = 0, 0 shapes = arcade.ShapeElementList() for i in range(1, len(thetas)+1): joint = arcade.create_e...
{"/utils/graphics.py": ["/utils/visualization.py", "/utils/losses.py"], "/vis_inv_constraint.py": ["/utils/graphics.py"], "/vis_kinematics.py": ["/utils/graphics.py"], "/utils/visualization.py": ["/utils/kinematics.py"]}
43,307
ericlearning/inverse-kinematics
refs/heads/main
/utils/losses.py
import torch def mseloss(coord1, coord2, w=None, h=None): if w is None or h is None: return (coord1[0] - coord2[0]) ** 2 + (coord1[1] - coord2[1]) ** 2 else: return ((coord1[0] - coord2[0]) / w) ** 2 + ((coord1[1] - coord2[1]) / h) ** 2 def constraint(thetas): return -torch.abs(thetas - 3....
{"/utils/graphics.py": ["/utils/visualization.py", "/utils/losses.py"], "/vis_inv_constraint.py": ["/utils/graphics.py"], "/vis_kinematics.py": ["/utils/graphics.py"], "/utils/visualization.py": ["/utils/kinematics.py"]}
43,308
ericlearning/inverse-kinematics
refs/heads/main
/utils/kinematics.py
import torch def forward_kinematics(thetas, arms): thetas = thetas.reshape(1, -1) thetas_acc = thetas @ torch.triu(torch.ones((len(arms), len(arms)))) thetas_acc = thetas_acc.flatten() x = torch.cos(thetas_acc) @ arms y = torch.sin(thetas_acc) @ arms return x, y def forward_kinematics_all(t...
{"/utils/graphics.py": ["/utils/visualization.py", "/utils/losses.py"], "/vis_inv_constraint.py": ["/utils/graphics.py"], "/vis_kinematics.py": ["/utils/graphics.py"], "/utils/visualization.py": ["/utils/kinematics.py"]}
43,309
rapid7/autocompose
refs/heads/master
/autocompose/command_line/command/clean_networks.py
import argparse from autocompose.cleaner import clean_networks from .command import Command __parser = argparse.ArgumentParser(prog="autocompose clean-networks", description='Remove all Docker networks.') clean_networks_command = Command(__parser, clean_networks)
{"/autocompose/command_line/command/clean_networks.py": ["/autocompose/cleaner.py", "/autocompose/command_line/command/command.py"], "/autocompose/updater.py": ["/autocompose/authenticator.py", "/autocompose/util.py"], "/autocompose/command_line/command/login.py": ["/autocompose/authenticator.py", "/autocompose/command...
43,310
rapid7/autocompose
refs/heads/master
/autocompose/updater.py
from .authenticator import get_authorization_data from .util import print_docker_output def update_images(aws_session, docker_client, **kwargs): """ Updates any Docker images from ECR. :param aws_session: :param docker_client: :param kwargs: :return: """ print('Updating ECR Docker imag...
{"/autocompose/command_line/command/clean_networks.py": ["/autocompose/cleaner.py", "/autocompose/command_line/command/command.py"], "/autocompose/updater.py": ["/autocompose/authenticator.py", "/autocompose/util.py"], "/autocompose/command_line/command/login.py": ["/autocompose/authenticator.py", "/autocompose/command...
43,311
rapid7/autocompose
refs/heads/master
/autocompose/command_line/command/login.py
import argparse from autocompose.authenticator import login_to_ecs from .command import Command __parser = argparse.ArgumentParser(prog="autocompose login", description='Login to ECR.') login_command = Command(__parser, login_to_ecs)
{"/autocompose/command_line/command/clean_networks.py": ["/autocompose/cleaner.py", "/autocompose/command_line/command/command.py"], "/autocompose/updater.py": ["/autocompose/authenticator.py", "/autocompose/util.py"], "/autocompose/command_line/command/login.py": ["/autocompose/authenticator.py", "/autocompose/command...
43,312
rapid7/autocompose
refs/heads/master
/autocompose/command_line/command/path.py
import argparse from autocompose.util import print_paths from .command import Command __parser = argparse.ArgumentParser(prog="autocompose path", description='Print the autocompose paths.') path_command = Command(__parser, print_paths)
{"/autocompose/command_line/command/clean_networks.py": ["/autocompose/cleaner.py", "/autocompose/command_line/command/command.py"], "/autocompose/updater.py": ["/autocompose/authenticator.py", "/autocompose/util.py"], "/autocompose/command_line/command/login.py": ["/autocompose/authenticator.py", "/autocompose/command...
43,313
rapid7/autocompose
refs/heads/master
/tests/test_util.py
import unittest from autocompose.util import Util class TestReplaceTemplateVariables(unittest.TestCase): def test_replace(self): self.assertEqual(4, Util.replace_template_variables(3, {3: 4})) self.assertEqual([1, 2, 4], Util.replace_template_variables([1, 2, 3], {3: 4})) self.assertEqual...
{"/autocompose/command_line/command/clean_networks.py": ["/autocompose/cleaner.py", "/autocompose/command_line/command/command.py"], "/autocompose/updater.py": ["/autocompose/authenticator.py", "/autocompose/util.py"], "/autocompose/command_line/command/login.py": ["/autocompose/authenticator.py", "/autocompose/command...
43,314
rapid7/autocompose
refs/heads/master
/autocompose/command_line/command/compose.py
import argparse from autocompose.composer import print_compose_file from .command import Command __parser = argparse.ArgumentParser(prog="autocompose compose", description='Create a docker-compose.yml file.') __parser.add_argument(dest='scenarios', nargs='*', help='Scenarios and/or services.') compose_command = Comm...
{"/autocompose/command_line/command/clean_networks.py": ["/autocompose/cleaner.py", "/autocompose/command_line/command/command.py"], "/autocompose/updater.py": ["/autocompose/authenticator.py", "/autocompose/util.py"], "/autocompose/command_line/command/login.py": ["/autocompose/authenticator.py", "/autocompose/command...
43,315
rapid7/autocompose
refs/heads/master
/autocompose/command_line/command/clean_containers.py
import argparse from autocompose.cleaner import clean_containers from .command import Command __parser = argparse.ArgumentParser(prog="autocompose clean-containers", description='Remove all Docker containers.') clean_containers_command = Command(__parser, clean_containers)
{"/autocompose/command_line/command/clean_networks.py": ["/autocompose/cleaner.py", "/autocompose/command_line/command/command.py"], "/autocompose/updater.py": ["/autocompose/authenticator.py", "/autocompose/util.py"], "/autocompose/command_line/command/login.py": ["/autocompose/authenticator.py", "/autocompose/command...
43,316
rapid7/autocompose
refs/heads/master
/autocompose/pusher.py
from .authenticator import get_authorization_data from .util import * def tag_to_ecr(aws_session, docker_client, tag): if tag is None or tag is '': tag = 'latest' service_name = get_service_name() repo = __get_docker_repository_name(aws_session, service_name) full_tag = service_name + ':' + t...
{"/autocompose/command_line/command/clean_networks.py": ["/autocompose/cleaner.py", "/autocompose/command_line/command/command.py"], "/autocompose/updater.py": ["/autocompose/authenticator.py", "/autocompose/util.py"], "/autocompose/command_line/command/login.py": ["/autocompose/authenticator.py", "/autocompose/command...
43,317
rapid7/autocompose
refs/heads/master
/autocompose/command_line/command/update_images.py
import argparse from autocompose.updater import update_images from .command import Command __parser = argparse.ArgumentParser(prog="autocompose update-images", description='Update images.') update_images_command = Command(__parser, update_images)
{"/autocompose/command_line/command/clean_networks.py": ["/autocompose/cleaner.py", "/autocompose/command_line/command/command.py"], "/autocompose/updater.py": ["/autocompose/authenticator.py", "/autocompose/util.py"], "/autocompose/command_line/command/login.py": ["/autocompose/authenticator.py", "/autocompose/command...
43,318
rapid7/autocompose
refs/heads/master
/autocompose/cleaner.py
import docker from docker import errors def clean_containers(docker_client, **kwargs): """ Removes all containers from the local machine. :param docker_client: The Docker client :return: None. """ images = docker_client.containers(all=True) print('Killing and removing all Docker container...
{"/autocompose/command_line/command/clean_networks.py": ["/autocompose/cleaner.py", "/autocompose/command_line/command/command.py"], "/autocompose/updater.py": ["/autocompose/authenticator.py", "/autocompose/util.py"], "/autocompose/command_line/command/login.py": ["/autocompose/authenticator.py", "/autocompose/command...
43,319
rapid7/autocompose
refs/heads/master
/autocompose/authenticator.py
import base64 import json from botocore.exceptions import ClientError as BotoClientError from .util import * # Config directory for Docker __docker_config_directory = os.path.join(os.environ['HOME'], '.docker') # Docker config file __docker_config_file = os.path.join(__docker_config_directory, 'config.json') def ...
{"/autocompose/command_line/command/clean_networks.py": ["/autocompose/cleaner.py", "/autocompose/command_line/command/command.py"], "/autocompose/updater.py": ["/autocompose/authenticator.py", "/autocompose/util.py"], "/autocompose/command_line/command/login.py": ["/autocompose/authenticator.py", "/autocompose/command...
43,320
rapid7/autocompose
refs/heads/master
/autocompose/constants.py
# Constants used throughout autocompose. AUTOCOMPOSE_VERSION_KEY = 'autocompose-version' AUTOCOMPOSE_BUILD_VERSION_KEY = 'autocompose-build-version' AUTOCOMPOSE_UP_VERSION_KEY = 'autocompose-up-version' AUTOCOMPOSE_IMAGE_KEY = 'autocompose-image' AUTOCOMPOSE_TEMPLATES_KEY = 'autocompose-templates' AUTOCOMPOSE_SERVICE_...
{"/autocompose/command_line/command/clean_networks.py": ["/autocompose/cleaner.py", "/autocompose/command_line/command/command.py"], "/autocompose/updater.py": ["/autocompose/authenticator.py", "/autocompose/util.py"], "/autocompose/command_line/command/login.py": ["/autocompose/authenticator.py", "/autocompose/command...
43,321
rapid7/autocompose
refs/heads/master
/autocompose/command_line/command/clean_images.py
import argparse from autocompose.cleaner import clean_images from .command import Command __parser = argparse.ArgumentParser(prog="autocompose clean-images", description='Remove all Docker images.') clean_images_command = Command(__parser, clean_images)
{"/autocompose/command_line/command/clean_networks.py": ["/autocompose/cleaner.py", "/autocompose/command_line/command/command.py"], "/autocompose/updater.py": ["/autocompose/authenticator.py", "/autocompose/util.py"], "/autocompose/command_line/command/login.py": ["/autocompose/authenticator.py", "/autocompose/command...
43,322
rapid7/autocompose
refs/heads/master
/autocompose/builder.py
import shutil import subprocess from .constants import * from .pusher import tag_to_ecr from .util import * def build(aws_session, docker_client, image_name=None, tag=None): """ Builds a docker image from the current directory. :param aws_session: The AWS session. :param docker_client: The Docker cli...
{"/autocompose/command_line/command/clean_networks.py": ["/autocompose/cleaner.py", "/autocompose/command_line/command/command.py"], "/autocompose/updater.py": ["/autocompose/authenticator.py", "/autocompose/util.py"], "/autocompose/command_line/command/login.py": ["/autocompose/authenticator.py", "/autocompose/command...
43,323
rapid7/autocompose
refs/heads/master
/autocompose/command_line/command/build.py
import argparse from autocompose.builder import build from .command import Command __parser = argparse.ArgumentParser(prog="autocompose build", description='Build a Docker image for the current directory.') __parser.add_argument('--image-name', default=None, help='Image name. Defaul...
{"/autocompose/command_line/command/clean_networks.py": ["/autocompose/cleaner.py", "/autocompose/command_line/command/command.py"], "/autocompose/updater.py": ["/autocompose/authenticator.py", "/autocompose/util.py"], "/autocompose/command_line/command/login.py": ["/autocompose/authenticator.py", "/autocompose/command...
43,324
rapid7/autocompose
refs/heads/master
/autocompose/util.py
import os import re import sys import yaml from compose import progress_stream __autocompose_service_name = None class ExplicitYamlDumper(yaml.SafeDumper): """ A yaml dumper that will never emit aliases. """ def ignore_aliases(self, data): return True def replace_template_variables(obj, t...
{"/autocompose/command_line/command/clean_networks.py": ["/autocompose/cleaner.py", "/autocompose/command_line/command/command.py"], "/autocompose/updater.py": ["/autocompose/authenticator.py", "/autocompose/util.py"], "/autocompose/command_line/command/login.py": ["/autocompose/authenticator.py", "/autocompose/command...
43,325
rapid7/autocompose
refs/heads/master
/autocompose/command_line/command/command.py
class Command(object): def __init__(self, argument_parser, function): self.argument_parser = argument_parser self.function = function def parse_and_execute(self, args, aws_session, docker_client): arguments = self.argument_parser.parse_args(args) self.function(aws_session=aws_se...
{"/autocompose/command_line/command/clean_networks.py": ["/autocompose/cleaner.py", "/autocompose/command_line/command/command.py"], "/autocompose/updater.py": ["/autocompose/authenticator.py", "/autocompose/util.py"], "/autocompose/command_line/command/login.py": ["/autocompose/authenticator.py", "/autocompose/command...
43,326
rapid7/autocompose
refs/heads/master
/autocompose/command_line/command/push.py
import argparse from autocompose.pusher import push_to_ecs from .command import Command __parser = argparse.ArgumentParser(prog="autocompose push", description='Push a Docker image to ECR.') __parser.add_argument('--image-name', default=None, help='Image name. Default is the current directory.') __parser.add_argument...
{"/autocompose/command_line/command/clean_networks.py": ["/autocompose/cleaner.py", "/autocompose/command_line/command/command.py"], "/autocompose/updater.py": ["/autocompose/authenticator.py", "/autocompose/util.py"], "/autocompose/command_line/command/login.py": ["/autocompose/authenticator.py", "/autocompose/command...
43,327
rapid7/autocompose
refs/heads/master
/autocompose/composer.py
from .authenticator import get_authorization_data from .constants import * from .util import * def print_compose_file(aws_session, scenarios, **kwargs): """ Prints a generated docker-compose file out to stdout. :param aws_session: The AWS session. :param scenarios: The scenarios and/or services. :...
{"/autocompose/command_line/command/clean_networks.py": ["/autocompose/cleaner.py", "/autocompose/command_line/command/command.py"], "/autocompose/updater.py": ["/autocompose/authenticator.py", "/autocompose/util.py"], "/autocompose/command_line/command/login.py": ["/autocompose/authenticator.py", "/autocompose/command...
43,328
rapid7/autocompose
refs/heads/master
/autocompose/command_line/command_line.py
#!/usr/bin/env python3 import argparse import os import sys import boto3 import docker from .command.build import build_command from .command.clean_containers import clean_containers_command from .command.clean_images import clean_images_command from .command.clean_networks import clean_networks_command from .comman...
{"/autocompose/command_line/command/clean_networks.py": ["/autocompose/cleaner.py", "/autocompose/command_line/command/command.py"], "/autocompose/updater.py": ["/autocompose/authenticator.py", "/autocompose/util.py"], "/autocompose/command_line/command/login.py": ["/autocompose/authenticator.py", "/autocompose/command...
43,331
huangchaoxing/Use-a-CNN-to-drive-a-differential-mobile-robot
refs/heads/master
/train.py
# -*- coding: utf-8 -*- """ Created on Sat Feb 2 16:47:30 2019 @author: HP """ from matplotlib import pyplot as plt import torch import torchvision import torchvision.transforms as transforms import torch.nn as nn import numpy as np from data_split import train_valid_split from steerNet import SteerNe...
{"/train.py": ["/data_split.py"]}
43,332
huangchaoxing/Use-a-CNN-to-drive-a-differential-mobile-robot
refs/heads/master
/data_split.py
# -*- coding: utf-8 -*- """ Created on Sat Feb 2 16:59:13 2019 @author: HP """ import torch import numpy as np import torchvision #from utils import plot_images import steerDS from torchvision import transforms from torch.utils.data.sampler import SubsetRandomSampler import matplotlib.pyplot as plt ...
{"/train.py": ["/data_split.py"]}
43,333
stickzman/honors_thesis
refs/heads/master
/PolicyGradient/tutorial/tut_cartpole_with_save.py
import tensorflow as tf import tensorflow.contrib.slim as slim import numpy as np import gym import matplotlib.pyplot as plt from tut_policy_gradient_agent import agent try: xrange = xrange except: xrange = range env = gym.make('CartPole-v0') gamma = 0.99 def discount_rewards(r): """ take 1D float array of rewa...
{"/Convolutional/convol_alt.py": ["/lakeEngineFullBoard.py"], "/mountain_car.py": ["/PolicyGradient/policy_gradient_agent.py"]}
43,334
stickzman/honors_thesis
refs/heads/master
/PolicyGradient/tutorial/tut_cartpole.py
import tensorflow as tf import tensorflow.contrib.slim as slim import numpy as np import gym import matplotlib.pyplot as plt from tut_policy_gradient_agent import agent try: xrange = xrange except: xrange = range env = gym.make('CartPole-v0') gamma = 0.99 def discount_rewards(r): """ take 1D float array of rewa...
{"/Convolutional/convol_alt.py": ["/lakeEngineFullBoard.py"], "/mountain_car.py": ["/PolicyGradient/policy_gradient_agent.py"]}
43,335
stickzman/honors_thesis
refs/heads/master
/Q-Value/Neural Network/cartpole.py
import numpy as np import random import gym import tensorflow as tf import matplotlib.pyplot as plt learningRate = 0.02 env = gym.make("CartPole-v0") tf.reset_default_graph() #Build TensorFlow graph observations = tf.placeholder(shape = [1,4], dtype=tf.float32) weights = tf.Variable(tf.random_uniform([4,2],0,0.01))...
{"/Convolutional/convol_alt.py": ["/lakeEngineFullBoard.py"], "/mountain_car.py": ["/PolicyGradient/policy_gradient_agent.py"]}
43,336
stickzman/honors_thesis
refs/heads/master
/PolicyGradient/tutorial/tut_policy_gradient_agent.py
import tensorflow as tf import tensorflow.contrib.slim as slim import numpy as np class agent(): def __init__(self, lr, s_size,a_size,h_size): #These lines established the feed-forward part of the network. The agent takes a state and produces an action. self.state_in= tf.placeholder(shape=[None,s_size],dtype=tf.f...
{"/Convolutional/convol_alt.py": ["/lakeEngineFullBoard.py"], "/mountain_car.py": ["/PolicyGradient/policy_gradient_agent.py"]}
43,337
stickzman/honors_thesis
refs/heads/master
/PolicyGradient/frozenlake.py
import numpy as np import gym from policy_gradient_agent import Agent import matplotlib.pyplot as plt env = gym.make("FrozenLake-v0") agent = Agent(.2, 16, 4, 20, 10, .99) num_eps = 10000 total_rewards = [] avg_rewards = [] for i in range(num_eps): s = env.reset() running_reward = 0 for t in range(999): a = age...
{"/Convolutional/convol_alt.py": ["/lakeEngineFullBoard.py"], "/mountain_car.py": ["/PolicyGradient/policy_gradient_agent.py"]}
43,338
stickzman/honors_thesis
refs/heads/master
/Actor-Critic/critic.py
import tensorflow as tf import tensorflow.contrib.slim as slim import numpy as np import gym import matplotlib.pyplot as plt env = gym.make("CartPole-v0") val_lr = 0.01 pol_lr = 0.001 discount_rate = .98 state_size = 4 max_eps = 5000 max_timesteps = 201 #Define Tensorflow graph tf.reset_default_graph() #Critic sta...
{"/Convolutional/convol_alt.py": ["/lakeEngineFullBoard.py"], "/mountain_car.py": ["/PolicyGradient/policy_gradient_agent.py"]}
43,339
stickzman/honors_thesis
refs/heads/master
/Convolutional/convol_alt.py
import numpy as np import random import tensorflow as tf import tensorflow.contrib.slim as slim import matplotlib.pyplot as plt import os, sys sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from lakeEngineFullBoard import Env def oneHotEncode(arr, size): ''' res = [] for type in arr.as...
{"/Convolutional/convol_alt.py": ["/lakeEngineFullBoard.py"], "/mountain_car.py": ["/PolicyGradient/policy_gradient_agent.py"]}
43,340
stickzman/honors_thesis
refs/heads/master
/genAlg/genAlg.py
import numpy as np import tensorflow as tf import tensorflow.contrib.slim as slim import gym import matplotlib.pyplot as plt from genAlgAgent import Population from genAlgAgent14Genes import Population as Population14G from genAlgAgent10Genes import Population as Population10G import argparse parser = argparse.Argumen...
{"/Convolutional/convol_alt.py": ["/lakeEngineFullBoard.py"], "/mountain_car.py": ["/PolicyGradient/policy_gradient_agent.py"]}
43,341
stickzman/honors_thesis
refs/heads/master
/PolicyGradient/pol_grad_cartpole.py
import tensorflow as tf import tensorflow.contrib.slim as slim import numpy as np import gym import matplotlib.pyplot as plt from policy_gradient_agent import Agent env = gym.make('CartPole-v0') myAgent = Agent(lr=1e-2, s_size=4, a_size=2, h_size=8, b_size=10, gamma=.99) #Load the agent. total_episodes = 5000 #Set t...
{"/Convolutional/convol_alt.py": ["/lakeEngineFullBoard.py"], "/mountain_car.py": ["/PolicyGradient/policy_gradient_agent.py"]}
43,342
stickzman/honors_thesis
refs/heads/master
/genAlg/genAlgAgent14Genes.py
import numpy as np import tensorflow as tf import tensorflow.contrib.slim as slim import gym import matplotlib.pyplot as plt import hashlib class Population: def __init__(self, envName, sess, state_in, output, genSize, numParents, numGens, genLength=5, minW=0, maxW=1, crsProb=.90, mutProb=.0001, deterministic=False...
{"/Convolutional/convol_alt.py": ["/lakeEngineFullBoard.py"], "/mountain_car.py": ["/PolicyGradient/policy_gradient_agent.py"]}
43,343
stickzman/honors_thesis
refs/heads/master
/Q-Value/Q-Matrix/frozenlake.py
import gym import numpy y = .97 #Discount Rate learnRate = .2 totalEps = 1000 def updateQMat(q, reward, state, action, newState): futureReward = max(q[newState][:]) q[state][action] = q[state][action] + learnRate * (reward + y * futureReward - q[state][action]) return success = False lastFailEp = -1 firstSuccE...
{"/Convolutional/convol_alt.py": ["/lakeEngineFullBoard.py"], "/mountain_car.py": ["/PolicyGradient/policy_gradient_agent.py"]}
43,344
stickzman/honors_thesis
refs/heads/master
/lakeEngineFullBoard.py
import numpy as np import random #Recreate Frozen Lake w/o slipping function class Env: GOAL_REWARD = 1 HOLE_REWARD = -1 DEFAULT_REWARD = 0 SLIP_PERCENT = 0 #Representation of tiles in lake array SAFE_TILE = 0 HOLE_TILE = 1 START_TILE = 2 GOAL_TILE = 3 PLAYER_TILE = 4 #Representation of moves in move ...
{"/Convolutional/convol_alt.py": ["/lakeEngineFullBoard.py"], "/mountain_car.py": ["/PolicyGradient/policy_gradient_agent.py"]}
43,345
stickzman/honors_thesis
refs/heads/master
/PolicyGradient/policy_gradient_agent.py
import numpy as np import tensorflow as tf import tensorflow.contrib.slim as slim class Agent(): def __init__(self, lr, s_size, a_size, h_size, b_size, gamma): self.exp_buffer = [] self.end_of_last_ep = 0 self.ep_count = 0 self.b_size = b_size self.gamma = gamma tf.reset_default_graph() #Clear the Ten...
{"/Convolutional/convol_alt.py": ["/lakeEngineFullBoard.py"], "/mountain_car.py": ["/PolicyGradient/policy_gradient_agent.py"]}
43,346
stickzman/honors_thesis
refs/heads/master
/Q-Value/Neural Network/TFunfrozenlake.py
import numpy as np import random import tensorflow as tf import matplotlib.pyplot as plt import os, sys sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))) from thawedLakeEngine import Env lr = .1 tf.reset_default_graph() #These lines establish the feed-forward part of the ...
{"/Convolutional/convol_alt.py": ["/lakeEngineFullBoard.py"], "/mountain_car.py": ["/PolicyGradient/policy_gradient_agent.py"]}
43,347
stickzman/honors_thesis
refs/heads/master
/Q-Value/Q-Matrix/unfrozenlake.py
import numpy import random import os, sys sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))) from thawedLakeEngine import Env discountRate = .97 learnRate = .15 totalEps = 1000 #------------------------------------------------------------ #Implement the same learning algo...
{"/Convolutional/convol_alt.py": ["/lakeEngineFullBoard.py"], "/mountain_car.py": ["/PolicyGradient/policy_gradient_agent.py"]}
43,348
stickzman/honors_thesis
refs/heads/master
/mountain_car.py
import numpy as np import gym from PolicyGradient.policy_gradient_agent import Agent import matplotlib.pyplot as plt env = gym.make("MountainCar-v0") agent = Agent(lr=.1,s_size=2, a_size=3, h_size=8, b_size=25, gamma=.5) total_episodes = 1000 #Set total number of episodes to train agent on. max_ep_length = 999 i = ...
{"/Convolutional/convol_alt.py": ["/lakeEngineFullBoard.py"], "/mountain_car.py": ["/PolicyGradient/policy_gradient_agent.py"]}
43,408
ridoansaleh/DjangoBooks
refs/heads/master
/web/web/views.py
from django.shortcuts import redirect def index_redirect(request): return redirect('/books/')
{"/web/books/views.py": ["/web/books/models.py"]}
43,409
ridoansaleh/DjangoBooks
refs/heads/master
/web/books/models.py
from django.db import models class Member(models.Model): firstname = models.CharField(max_length=40) lastname = models.CharField(max_length=40) def __str__(self): return self.firstname + " " + self.lastname class Books(models.Model): book_title = models.CharField(max_length=100, blank=False)...
{"/web/books/views.py": ["/web/books/models.py"]}
43,410
ridoansaleh/DjangoBooks
refs/heads/master
/web/books/views.py
from django.shortcuts import render, redirect from .models import Member, Books def index(request): books = Books.objects.all() context = {'books': books} return render(request, 'books/index.html', context) def create(request): book = Books(book_title=request.POST['book_title'], writer=request.POST[...
{"/web/books/views.py": ["/web/books/models.py"]}
43,411
darrylma/FSND_Movie_Website
refs/heads/master
/entertainment_center.py
import media import fresh_tomatoes import urllib import json #Define movie title array and initialize arrays for movie details movie_titles = ["The Dark Knight","Shutter Island","Predestination","Inside Out","Gattaca","Memento"] storylines = [None] * len(movie_titles) posters = [None] * len(movie_titles) release_dates...
{"/entertainment_center.py": ["/media.py"]}
43,412
darrylma/FSND_Movie_Website
refs/heads/master
/media.py
import webbrowser class Movie(): """ This class provides a way to store movie related information """ VALID_RATINGS = ["G","PG","PG-13","R"] #Defines what information to be stored for each movie object def __init__(self, movie_title, movie_storyline, movie_poster_image_url, movie_trailer_youtube_url,...
{"/entertainment_center.py": ["/media.py"]}
43,417
tomorrownow/PyFCM
refs/heads/master
/fcm/Aggregation_FCMs/Aggregation_FCMs.py
# # -*- coding: utf-8 -*- # """ # Created on Sat Mar 31 16:04:39 2018 # @author: Payam Aminpour # Michigan State University # aminpour@msu.edu # """ # # In[1]: # import __init__ as init # import matplotlib.pyplot as plt # plt.rcdefaults() # import matplotlib.pyplot as plt # import xlrd # import n...
{"/tests/test_scenario.py": ["/fcm/load.py"], "/tests/test_analysis.py": ["/fcm/analysis/tools.py"], "/pyfcm/analysis/scenario.py": ["/fcm/analysis/tools.py"], "/tests/test_load.py": ["/fcm/load.py"]}
43,418
tomorrownow/PyFCM
refs/heads/master
/fcm/Clustering_FCMs/__init__.py
# # -*- coding: utf-8 -*- # """ # Created on Sun Aug 5 15:19:59 2018 # @author: Payam Aminpour # """ # name = "FCM_Scenario_Analysis" # print( # "\n", # "The file location is the path of your project file in your computer.", # "\n", # "For Example: C:/Paym Computer/Safety Project/All_Ad...
{"/tests/test_scenario.py": ["/fcm/load.py"], "/tests/test_analysis.py": ["/fcm/analysis/tools.py"], "/pyfcm/analysis/scenario.py": ["/fcm/analysis/tools.py"], "/tests/test_load.py": ["/fcm/load.py"]}
43,419
tomorrownow/PyFCM
refs/heads/master
/tests/test_scenario.py
from fcm.load import load_csv from fcm.analysis import scenario def test_scenario_tanh_k_one_variable(shared_datadir): df = load_csv(shared_datadir / "test_adjacency_matrix.csv") result = scenario.scenario_analysis( data=df.values, columns=df.columns, scenarios={"c1": 1}, noise...
{"/tests/test_scenario.py": ["/fcm/load.py"], "/tests/test_analysis.py": ["/fcm/analysis/tools.py"], "/pyfcm/analysis/scenario.py": ["/fcm/analysis/tools.py"], "/tests/test_load.py": ["/fcm/load.py"]}
43,420
tomorrownow/PyFCM
refs/heads/master
/tests/test_analysis.py
import fcm from fcm.analysis.tools import ( _infer_rule, InferenceRule, reduce_noise, _transform, SquashingFucntion, ) import numpy as np import pytest # Inference Rule Tests def test_infer_rule_kosko(datadir): concepts = ["c1", "c2", "c3"] adj_matrices = np.array([[1.0, -1.0, 0.0], [0.5...
{"/tests/test_scenario.py": ["/fcm/load.py"], "/tests/test_analysis.py": ["/fcm/analysis/tools.py"], "/pyfcm/analysis/scenario.py": ["/fcm/analysis/tools.py"], "/tests/test_load.py": ["/fcm/load.py"]}
43,421
tomorrownow/PyFCM
refs/heads/master
/fcm/Aggregation_FCMs/__init__.py
# # -*- coding: utf-8 -*- # """ # Created on Sun Aug 5 15:19:59 2018 # @author: Payam Aminpour # """ # name = "FCM_Scenario_Analysis" # print( # "\n", # "The file location is the path of your project file in your computer.", # "\n", # "For Example: C:/Paym Computer/Safety Project/All_Ad...
{"/tests/test_scenario.py": ["/fcm/load.py"], "/tests/test_analysis.py": ["/fcm/analysis/tools.py"], "/pyfcm/analysis/scenario.py": ["/fcm/analysis/tools.py"], "/tests/test_load.py": ["/fcm/load.py"]}
43,422
tomorrownow/PyFCM
refs/heads/master
/fcm/Uncertainty_Analysis/__init__.py
# # -*- coding: utf-8 -*- # """ # Created on Sun Aug 5 15:19:59 2018 # @author: Payam Aminpour # """ # name = "FCM_Scenario_Analysis" # print( # "\n", # "The file location is the path of your project file in your computer.", # "\n", # "For Example: C:/Paym Computer/Safety Project/Adjace...
{"/tests/test_scenario.py": ["/fcm/load.py"], "/tests/test_analysis.py": ["/fcm/analysis/tools.py"], "/pyfcm/analysis/scenario.py": ["/fcm/analysis/tools.py"], "/tests/test_load.py": ["/fcm/load.py"]}
43,423
tomorrownow/PyFCM
refs/heads/master
/fcm/Uncertainty_Analysis/Uncertainty_Analysis.py
# # -*- coding: utf-8 -*- # """ # Created on Sat Mar 31 16:04:39 2018 # @author: Payam Aminpour # Michigan State University # aminpour@msu.edu # """ # # In[1]: # import __init__ as init # import matplotlib.pyplot as plt # plt.rcdefaults() # import matplotlib.pyplot as plt # import random # import...
{"/tests/test_scenario.py": ["/fcm/load.py"], "/tests/test_analysis.py": ["/fcm/analysis/tools.py"], "/pyfcm/analysis/scenario.py": ["/fcm/analysis/tools.py"], "/tests/test_load.py": ["/fcm/load.py"]}
43,424
tomorrownow/PyFCM
refs/heads/master
/fcm/load.py
# import os import pandas as pd # import seaborn as sns # class FuzzyCognitiveModel: # def __init__(self, name, fcm_data, concept_map=None): # self.name = name # self.group = group # self.data = fcm_data # self.concept_map = concept_map # class SocialCognitiveModel: # def __in...
{"/tests/test_scenario.py": ["/fcm/load.py"], "/tests/test_analysis.py": ["/fcm/analysis/tools.py"], "/pyfcm/analysis/scenario.py": ["/fcm/analysis/tools.py"], "/tests/test_load.py": ["/fcm/load.py"]}
43,425
tomorrownow/PyFCM
refs/heads/master
/pyfcm/analysis/scenario.py
""" Created on Mon May 03 9:12:22 2021 @author: Corey White North Carolina State University ctwhite@ncsu.edu """ import matplotlib.pyplot as plt # import xlrd import numpy as np import math import networkx as nx from fcm.analysis.tools import infer_steady, infer_scenario, reduce_noise def scenari...
{"/tests/test_scenario.py": ["/fcm/load.py"], "/tests/test_analysis.py": ["/fcm/analysis/tools.py"], "/pyfcm/analysis/scenario.py": ["/fcm/analysis/tools.py"], "/tests/test_load.py": ["/fcm/load.py"]}
43,426
tomorrownow/PyFCM
refs/heads/master
/fcm/analysis/sensitvity.py
""" Created on Fri Apr 30 15:51:12 2021 @author: Corey White North Carolina State University ctwhite@ncsu.edu """ import math import networkx as nx import numpy as np import matplotlib.pyplot as plt from fcm.analysis import infer_steady, infer_scenario, reduce_noise def sensitivity_analysis( d...
{"/tests/test_scenario.py": ["/fcm/load.py"], "/tests/test_analysis.py": ["/fcm/analysis/tools.py"], "/pyfcm/analysis/scenario.py": ["/fcm/analysis/tools.py"], "/tests/test_load.py": ["/fcm/load.py"]}
43,427
tomorrownow/PyFCM
refs/heads/master
/setup.py
# -*- coding: utf-8 -*- """ Created on Fri Apr 30 11:55:30 2021 @author: Corey White """ import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="FCM", version="1.0.0", author="Corey White", author_email="ctwhite@ncsu.edu", d...
{"/tests/test_scenario.py": ["/fcm/load.py"], "/tests/test_analysis.py": ["/fcm/analysis/tools.py"], "/pyfcm/analysis/scenario.py": ["/fcm/analysis/tools.py"], "/tests/test_load.py": ["/fcm/load.py"]}
43,428
tomorrownow/PyFCM
refs/heads/master
/tests/test_load.py
import fcm from fcm.load import load_csv, load_xlsx from pandas.core.frame import DataFrame import pytest def test_load_csv(shared_datadir): df = load_csv(shared_datadir / "test_adjacency_matrix.csv") assert isinstance(df, DataFrame) def test_load_xlsx(shared_datadir): df = load_xlsx(shared_datadir / "...
{"/tests/test_scenario.py": ["/fcm/load.py"], "/tests/test_analysis.py": ["/fcm/analysis/tools.py"], "/pyfcm/analysis/scenario.py": ["/fcm/analysis/tools.py"], "/tests/test_load.py": ["/fcm/load.py"]}
43,429
tomorrownow/PyFCM
refs/heads/master
/fcm/Clustering_FCMs/Clustering_FCMs.py
# # -*- coding: utf-8 -*- # """ # Created on Sat Mar 31 16:04:39 2018 # @author: Payam Aminpour # Michigan State University # aminpour@msu.edu # """ # import __init__ as init # import matplotlib.pyplot as plt # plt.rcdefaults() # import matplotlib.pyplot as plt # import xlrd # import n...
{"/tests/test_scenario.py": ["/fcm/load.py"], "/tests/test_analysis.py": ["/fcm/analysis/tools.py"], "/pyfcm/analysis/scenario.py": ["/fcm/analysis/tools.py"], "/tests/test_load.py": ["/fcm/load.py"]}
43,430
tomorrownow/PyFCM
refs/heads/master
/fcm/analysis/tools.py
# Methods used while analyzing fuzzy cognitive models # Copyright (C) 2018-2021 Corey White and others (see below) # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the Licens...
{"/tests/test_scenario.py": ["/fcm/load.py"], "/tests/test_analysis.py": ["/fcm/analysis/tools.py"], "/pyfcm/analysis/scenario.py": ["/fcm/analysis/tools.py"], "/tests/test_load.py": ["/fcm/load.py"]}