index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
8,283
smaibom/DiscordSignupBot
refs/heads/master
/gsheetsapi.py
import gspread from oauth2client import file, client, tools class Spreadsheet(object): """docstring for Spreadsheet""" def __init__(self, sheetID): self.sheet = load_spreadsheet(sheetID) def add_worksheet(self,sheetName,srows = 40,scols = 50): """ Adds a new worksheet to the spreadsheet object ...
{"/signupsystem.py": ["/gsheetsapi.py"]}
8,284
smaibom/DiscordSignupBot
refs/heads/master
/signupsystem.py
import numpy as np import gspread import gsheetsapi class SignupSystem(object): """docstring for SignupSystem""" def __init__(self,sheetID): self.spreadsheet = gsheetsapi.Spreadsheet(sheetID) self.worksheets = dict() wsl = self.spreadsheet.get_worksheets() for ws in wsl: self.worksheets[ws.ti...
{"/signupsystem.py": ["/gsheetsapi.py"]}
8,288
ericbhanson/cashtag_analyzer
refs/heads/master
/cashtag_analyzer/__init__.py
import sqlalchemy import sys import yaml def connect_to_db(db_settings): protocol = db_settings['protocol'] user = db_settings['user'] password = db_settings['password'] host = db_settings['host'] dbname = db_settings['dbname'] engine = sqlalchemy.create_engine(protocol + '://' + user + ':' + password + '@' + ho...
{"/cashtag_analyzer/tweet_collector.py": ["/cashtag_analyzer/__init__.py"], "/cashtag_analyzer/market_data_collector.py": ["/cashtag_analyzer/__init__.py"]}
8,289
ericbhanson/cashtag_analyzer
refs/heads/master
/cashtag_analyzer/tweet_collector.py
import cashtag_analyzer import re import tweepy # Connect to the Twitter API using the authorization information provided in the settings file. def connect_to_twitter(twitter_settings): access_token = twitter_settings['access_token'] access_token_secret = twitter_settings['access_token_secret'] consumer_key = twit...
{"/cashtag_analyzer/tweet_collector.py": ["/cashtag_analyzer/__init__.py"], "/cashtag_analyzer/market_data_collector.py": ["/cashtag_analyzer/__init__.py"]}
8,290
ericbhanson/cashtag_analyzer
refs/heads/master
/cashtag_analyzer/market_data_collector.py
import cashtag_analyzer # Import the modules from the __init__ script. import ccxt # Import ccxt to connect to exchange APIs. import collections # Import collections to create lists within dictionaries on the fly. import datetime # Import datetime for the timedelta and utcfromtimestamp functions. import numpy...
{"/cashtag_analyzer/tweet_collector.py": ["/cashtag_analyzer/__init__.py"], "/cashtag_analyzer/market_data_collector.py": ["/cashtag_analyzer/__init__.py"]}
8,292
cocpy/Tello-Python
refs/heads/master
/tello/__init__.py
__title__ = 'tello-python' __author__ = 'C灵C' __liscence__ = 'MIT' __copyright__ = 'Copyright 2021 C灵C' __version__ = '1.1.6' __all__ = ['tello', 'stats'] from .tello import Tello from .stats import Stats
{"/tello/demo.py": ["/tello/__init__.py"]}
8,293
cocpy/Tello-Python
refs/heads/master
/tello/demo.py
from tello import tello drone = tello.Tello() # 起飞 drone.takeoff() # 前进100cm drone.forward(100) # 旋转90° drone.cw(90) # 左翻滚 drone.flip('l') # 打开视频流 drone.streamon() # 降落 drone.land()
{"/tello/demo.py": ["/tello/__init__.py"]}
8,294
cocpy/Tello-Python
refs/heads/master
/setup.py
import setuptools with open('README.md', 'r', encoding='utf-8') as fh: long_description = fh.read() setuptools.setup( name='tello-python', version='1.1.6', author='C灵C', author_email='c0c@cocpy.com', description='Control DJI Tello drone with Python3', long_description=long_description, ...
{"/tello/demo.py": ["/tello/__init__.py"]}
8,301
mkihr-ojisan/yakudobot
refs/heads/master
/scheduler.py
import tweepy,os,datetime,time from apscheduler.schedulers.blocking import BlockingScheduler from main import db from database.models import YakudoScore twische = BlockingScheduler() auth = tweepy.OAuthHandler(os.environ.get('CONSUMER_KEY'),os.environ.get('CONSUMER_SECRET')) auth.set_access_token(os.environ.get('ACCE...
{"/scheduler.py": ["/main.py", "/database/models.py"], "/database/models.py": ["/main.py"], "/monitor.py": ["/main.py", "/database/models.py"]}
8,302
mkihr-ojisan/yakudobot
refs/heads/master
/main.py
from flask import Flask from flask_sqlalchemy import SQLAlchemy app = Flask(__name__) app.config.from_object('database.config') # 追加 db = SQLAlchemy(app) # 追加 #herokuサーバーをスリープさせない為の対策 @app.route("/") def index(): return "This is mis1yakudo_bot!" if __name__ == "__main__": app.run()
{"/scheduler.py": ["/main.py", "/database/models.py"], "/database/models.py": ["/main.py"], "/monitor.py": ["/main.py", "/database/models.py"]}
8,303
mkihr-ojisan/yakudobot
refs/heads/master
/database/models.py
from main import db from flask_sqlalchemy import SQLAlchemy import datetime class YakudoScore(db.Model): id = db.Column(db.Integer, primary_key=True) username = db.Column(db.Text) tweetid = db.Column(db.Text) retweetid = db.Column(db.Text) score = db.Column(db.Float) date = db.Column(db.Text, ...
{"/scheduler.py": ["/main.py", "/database/models.py"], "/database/models.py": ["/main.py"], "/monitor.py": ["/main.py", "/database/models.py"]}
8,304
mkihr-ojisan/yakudobot
refs/heads/master
/database/config.py
import os #SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or "sqlite:///test.db" SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL').replace("://", "ql://", 1) or "sqlite:///test.db" SQLALCHEMY_TRACK_MODIFICATIONS = True SECRET_KEY="secret key"
{"/scheduler.py": ["/main.py", "/database/models.py"], "/database/models.py": ["/main.py"], "/monitor.py": ["/main.py", "/database/models.py"]}
8,305
mkihr-ojisan/yakudobot
refs/heads/master
/monitor.py
import datetime import tempfile import requests import os import tweepy from threading import Thread import cv2 from main import db from database.models import YakudoScore import traceback auth = tweepy.OAuthHandler(os.environ.get('CONSUMER_KEY'),os.environ.get('CONSUMER_SECRET')) auth.set_access_token(os.environ.get(...
{"/scheduler.py": ["/main.py", "/database/models.py"], "/database/models.py": ["/main.py"], "/monitor.py": ["/main.py", "/database/models.py"]}
8,310
gilmoore/VAE_Tacotron2
refs/heads/master
/tacotron/utils/plot.py
import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np def split_title_line(title_text, max_words=5): """ A function that splits any string based on specific character (returning it with the string), with maximum number of words on it """ seq = title_text.split() return '\n'...
{"/train.py": ["/tacotron/train.py"], "/tacotron/synthesizer.py": ["/hparams.py"], "/tacotron/models/tacotron.py": ["/tacotron/models/modules.py", "/tacotron/models/zoneout_LSTM.py", "/tacotron/utils/util.py"], "/tacotron/utils/audio.py": ["/hparams.py"], "/tacotron/synthesize.py": ["/hparams.py", "/tacotron/synthesize...
8,311
gilmoore/VAE_Tacotron2
refs/heads/master
/train.py
import argparse from tacotron.train import tacotron_train def main(): parser = argparse.ArgumentParser() parser.add_argument('--base_dir', default='.') parser.add_argument('--hparams', default='', help='Hyperparameter overrides as a comma-separated list of name=value pairs') parser.add_argument('--input', defau...
{"/train.py": ["/tacotron/train.py"], "/tacotron/synthesizer.py": ["/hparams.py"], "/tacotron/models/tacotron.py": ["/tacotron/models/modules.py", "/tacotron/models/zoneout_LSTM.py", "/tacotron/utils/util.py"], "/tacotron/utils/audio.py": ["/hparams.py"], "/tacotron/synthesize.py": ["/hparams.py", "/tacotron/synthesize...
8,312
gilmoore/VAE_Tacotron2
refs/heads/master
/hparams.py
import tensorflow as tf import numpy as np # Default hyperparameters hparams = tf.contrib.training.HParams( # Comma-separated list of cleaners to run on text prior to training and eval. For non-English # text, you may want to use "basic_cleaners" or "transliteration_cleaners". cleaners='english_cleaners', #Au...
{"/train.py": ["/tacotron/train.py"], "/tacotron/synthesizer.py": ["/hparams.py"], "/tacotron/models/tacotron.py": ["/tacotron/models/modules.py", "/tacotron/models/zoneout_LSTM.py", "/tacotron/utils/util.py"], "/tacotron/utils/audio.py": ["/hparams.py"], "/tacotron/synthesize.py": ["/hparams.py", "/tacotron/synthesize...
8,313
gilmoore/VAE_Tacotron2
refs/heads/master
/tacotron/synthesizer.py
import os import numpy as np import tensorflow as tf from hparams import hparams from librosa import effects from tacotron.models import create_model from tacotron.utils.text import text_to_sequence from tacotron.utils import plot from datasets import audio from datetime import datetime class Synthesizer: def load(s...
{"/train.py": ["/tacotron/train.py"], "/tacotron/synthesizer.py": ["/hparams.py"], "/tacotron/models/tacotron.py": ["/tacotron/models/modules.py", "/tacotron/models/zoneout_LSTM.py", "/tacotron/utils/util.py"], "/tacotron/utils/audio.py": ["/hparams.py"], "/tacotron/synthesize.py": ["/hparams.py", "/tacotron/synthesize...
8,314
gilmoore/VAE_Tacotron2
refs/heads/master
/tacotron/models/tacotron.py
import tensorflow as tf from tacotron.utils.symbols import symbols from tacotron.utils.infolog import log from tacotron.models.helpers import TacoTrainingHelper, TacoTestHelper from tacotron.models.modules import * from tacotron.models.zoneout_LSTM import ZoneoutLSTMCell from tensorflow.contrib.seq2seq import dynamic_d...
{"/train.py": ["/tacotron/train.py"], "/tacotron/synthesizer.py": ["/hparams.py"], "/tacotron/models/tacotron.py": ["/tacotron/models/modules.py", "/tacotron/models/zoneout_LSTM.py", "/tacotron/utils/util.py"], "/tacotron/utils/audio.py": ["/hparams.py"], "/tacotron/synthesize.py": ["/hparams.py", "/tacotron/synthesize...
8,315
gilmoore/VAE_Tacotron2
refs/heads/master
/tacotron/utils/audio.py
import librosa import librosa.filters import numpy as np from scipy import signal from hparams import hparams import tensorflow as tf def load_wav(path): return librosa.core.load(path, sr=hparams.sample_rate)[0] def save_wav(wav, path): wav *= 32767 / max(0.01, np.max(np.abs(wav))) librosa.output.write_wav(path, ...
{"/train.py": ["/tacotron/train.py"], "/tacotron/synthesizer.py": ["/hparams.py"], "/tacotron/models/tacotron.py": ["/tacotron/models/modules.py", "/tacotron/models/zoneout_LSTM.py", "/tacotron/utils/util.py"], "/tacotron/utils/audio.py": ["/hparams.py"], "/tacotron/synthesize.py": ["/hparams.py", "/tacotron/synthesize...
8,316
gilmoore/VAE_Tacotron2
refs/heads/master
/tacotron/synthesize.py
import argparse import os import re from hparams import hparams, hparams_debug_string from tacotron.synthesizer import Synthesizer import tensorflow as tf import time from tqdm import tqdm from tacotron.utils.audio import load_wav, melspectrogram def run_eval(args, checkpoint_path, output_dir): print(hparams_debug_st...
{"/train.py": ["/tacotron/train.py"], "/tacotron/synthesizer.py": ["/hparams.py"], "/tacotron/models/tacotron.py": ["/tacotron/models/modules.py", "/tacotron/models/zoneout_LSTM.py", "/tacotron/utils/util.py"], "/tacotron/utils/audio.py": ["/hparams.py"], "/tacotron/synthesize.py": ["/hparams.py", "/tacotron/synthesize...
8,317
gilmoore/VAE_Tacotron2
refs/heads/master
/tacotron/utils/util.py
import tensorflow as tf import numpy as np from hparams import hparams as hp def shape_list(x): """Return list of dims, statically where possible.""" x = tf.convert_to_tensor(x) # If unknown rank, return dynamic shape if x.get_shape().dims is None: return tf.shape(x) static = x.get_shape().as_list() ...
{"/train.py": ["/tacotron/train.py"], "/tacotron/synthesizer.py": ["/hparams.py"], "/tacotron/models/tacotron.py": ["/tacotron/models/modules.py", "/tacotron/models/zoneout_LSTM.py", "/tacotron/utils/util.py"], "/tacotron/utils/audio.py": ["/hparams.py"], "/tacotron/synthesize.py": ["/hparams.py", "/tacotron/synthesize...
8,318
gilmoore/VAE_Tacotron2
refs/heads/master
/synthesize.py
import argparse from tacotron.synthesize import tacotron_synthesize def main(): accepted_modes = ['eval', 'synthesis'] parser = argparse.ArgumentParser() parser.add_argument('--checkpoint', default='logs-Tacotron/pretrained/', help='Path to model checkpoint') parser.add_argument('--hparams', default='', help='H...
{"/train.py": ["/tacotron/train.py"], "/tacotron/synthesizer.py": ["/hparams.py"], "/tacotron/models/tacotron.py": ["/tacotron/models/modules.py", "/tacotron/models/zoneout_LSTM.py", "/tacotron/utils/util.py"], "/tacotron/utils/audio.py": ["/hparams.py"], "/tacotron/synthesize.py": ["/hparams.py", "/tacotron/synthesize...
8,319
gilmoore/VAE_Tacotron2
refs/heads/master
/tacotron/train.py
import numpy as np from datetime import datetime import os import subprocess import time import tensorflow as tf import traceback import argparse from tacotron.feeder import Feeder from hparams import hparams, hparams_debug_string from tacotron.models import create_model from tacotron.utils.text import sequence_to_t...
{"/train.py": ["/tacotron/train.py"], "/tacotron/synthesizer.py": ["/hparams.py"], "/tacotron/models/tacotron.py": ["/tacotron/models/modules.py", "/tacotron/models/zoneout_LSTM.py", "/tacotron/utils/util.py"], "/tacotron/utils/audio.py": ["/hparams.py"], "/tacotron/synthesize.py": ["/hparams.py", "/tacotron/synthesize...
8,320
gilmoore/VAE_Tacotron2
refs/heads/master
/tacotron/models/zoneout_LSTM.py
import numpy as np import tensorflow as tf from tensorflow.python.ops.rnn_cell import RNNCell # Thanks to 'initializers_enhanced.py' of Project RNN Enhancement: # https://github.com/nicolas-ivanov/Seq2Seq_Upgrade_TensorFlow/blob/master/rnn_enhancement/initializers_enhanced.py def orthogonal_initializer(scale=1.0): ...
{"/train.py": ["/tacotron/train.py"], "/tacotron/synthesizer.py": ["/hparams.py"], "/tacotron/models/tacotron.py": ["/tacotron/models/modules.py", "/tacotron/models/zoneout_LSTM.py", "/tacotron/utils/util.py"], "/tacotron/utils/audio.py": ["/hparams.py"], "/tacotron/synthesize.py": ["/hparams.py", "/tacotron/synthesize...
8,321
gilmoore/VAE_Tacotron2
refs/heads/master
/tacotron/models/modules.py
import tensorflow as tf from tacotron.models.zoneout_LSTM import ZoneoutLSTMCell from tensorflow.contrib.rnn import LSTMBlockCell from hparams import hparams from tensorflow.contrib.rnn import GRUCell from tacotron.utils.util import shape_list def VAE(inputs, input_lengths, filters, kernel_size, strides, num_units, i...
{"/train.py": ["/tacotron/train.py"], "/tacotron/synthesizer.py": ["/hparams.py"], "/tacotron/models/tacotron.py": ["/tacotron/models/modules.py", "/tacotron/models/zoneout_LSTM.py", "/tacotron/utils/util.py"], "/tacotron/utils/audio.py": ["/hparams.py"], "/tacotron/synthesize.py": ["/hparams.py", "/tacotron/synthesize...
8,322
gminator/weather
refs/heads/master
/openweather/models.py
from django.db import models import requests from datetime import datetime, timedelta import math class Day(object): def unit(self,temp): return round({ "c" : temp-273.15, "k" : temp, "f" : (((temp-274.15)/5) * 9) + 32, }[self.units], 2) def __init__(self, **kwargs): self.lat = kwargs["lat"] if "l...
{"/openweather/api.py": ["/openweather/models.py"], "/openweather/tests.py": ["/openweather/models.py"]}
8,323
gminator/weather
refs/heads/master
/openweather/api.py
from django.shortcuts import render from rest_framework.authentication import SessionAuthentication, BasicAuthentication, TokenAuthentication from rest_framework import viewsets from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response from openweather.models import OpenWeathe...
{"/openweather/api.py": ["/openweather/models.py"], "/openweather/tests.py": ["/openweather/models.py"]}
8,324
gminator/weather
refs/heads/master
/openweather/views.py
from django.shortcuts import render from django.views.generic import TemplateView, ListView,ListView, DetailView,View class OpenWeatherView(TemplateView): template_name = "weather.html"
{"/openweather/api.py": ["/openweather/models.py"], "/openweather/tests.py": ["/openweather/models.py"]}
8,325
gminator/weather
refs/heads/master
/openweather/tests.py
from django.test import TestCase from openweather.models import OpenWeather,BadDateException, Day from unittest.mock import patch from datetime import datetime # Create your tests here. class OpenWeatherTests(TestCase): def test_test_median_humidity(self,): day = Day(hourly=[ {"temp": 274.15,"humidity": 10, "w...
{"/openweather/api.py": ["/openweather/models.py"], "/openweather/tests.py": ["/openweather/models.py"]}
8,422
aeberspaecher/transparent_pyfftw
refs/heads/master
/transparent_pyfftw/generate_wrappers.py
#!/usr/bin/env python #-*- coding:utf-8 -*- """Generate pyfftw wrapper functions by name. Add the threads keyword to the call, do nothing else. """ # if the wrapper codes are removed from transparent_pyfftw_wrapper.py, # we can regenerate and re-add with # ./generate_wrappers.py >> transparent_pyfftw_wrapper.py nam...
{"/transparent_pyfftw/__init__.py": ["/transparent_pyfftw/transparent_pyfftw.py"]}
8,423
aeberspaecher/transparent_pyfftw
refs/heads/master
/transparent_pyfftw/transparent_pyfftw.py
#!/usr/bin/env python #-*- coding:utf-8 -*- """Common functions for transparent_pyfftw. """ import os import numpy as np import pyfftw from .options import wisdom_file def read_wisdom(): """Read wisdom and get it in the data structures expected by pyfftw. """ try: wisdom = file(wisdom_file, ...
{"/transparent_pyfftw/__init__.py": ["/transparent_pyfftw/transparent_pyfftw.py"]}
8,424
aeberspaecher/transparent_pyfftw
refs/heads/master
/transparent_pyfftw/scipy_fftpack.py
#!/usr/bin/env python #-*- coding:utf-8 -*- """Wrappers for pyfftw's SciPy fftpack interfaces. """ import pyfftw.interfaces.scipy_fftpack as sfft from .generate_wrappers import generate_wrapper from .transparent_pyfftw import * # the wrappers are generated on import: func_names = sfft.__all__ for func_name in fun...
{"/transparent_pyfftw/__init__.py": ["/transparent_pyfftw/transparent_pyfftw.py"]}
8,425
aeberspaecher/transparent_pyfftw
refs/heads/master
/transparent_pyfftw/__init__.py
#!/usr/bin/env python #-*- coding:utf-8 -*- """Transparent wrappers for pyfftw's NumPy FFT interfaces. Does nothing more but inserting a number of threads into your FFT calls and handing that parameter to pyfftw. Wrappers are available for pyfftw.numpy_fft and pyfftw.scipy_fftpack. To save acquired wisdom, call tra...
{"/transparent_pyfftw/__init__.py": ["/transparent_pyfftw/transparent_pyfftw.py"]}
8,426
aeberspaecher/transparent_pyfftw
refs/heads/master
/transparent_pyfftw/numpy_fft.py
#!/usr/bin/env python #-*- coding:utf-8 -*- """Wrappers for pyfftw's NumPy fft interfaces. """ import pyfftw.interfaces.numpy_fft as nfft from .generate_wrappers import generate_wrapper from .transparent_pyfftw import * # the wrappers are generated on import: func_names = nfft.__all__ for func_name in func_names:...
{"/transparent_pyfftw/__init__.py": ["/transparent_pyfftw/transparent_pyfftw.py"]}
8,430
OsamaAlOlabi/black-jack-card-game
refs/heads/master
/main.py
import art import game_logic print(art.logo) game_logic.random_card_for_me() game_logic.random_card_for_me() game_logic.random_card_for_bot() game_logic.black_jack()
{"/main.py": ["/game_logic.py"]}
8,431
OsamaAlOlabi/black-jack-card-game
refs/heads/master
/game_logic.py
import art import random cards = [11, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10] my_cards = [] bot_cards = [] my_score = 0 bot_score = 0 # Choose a random card for the player def random_card_for_me(): global my_score my_card_num_index = random.randrange(len(cards)) my_card_num_value = cards[my_card_num_in...
{"/main.py": ["/game_logic.py"]}
8,435
BrianIshii/StockAnalyzer
refs/heads/master
/AAPL.py
import datetime import pandas as pd import numpy as np import matplotlib.pyplot as plt import Analysis.trade as trade global dates def main(): global dates start_date = "2015-01-02" symbols = ['SPY'] dates = pd.date_range("2015-01-02", "2015-02-02") symbols.append("AAPL") df = trade.get_da...
{"/AAPL.py": ["/Analysis/trade.py"]}
8,436
BrianIshii/StockAnalyzer
refs/heads/master
/Data/data.py
#!/usr/bin/env python3 """ data.py is an object to look at stock data Brian Ishii 2017 """ import os import pandas as pd import json class Data: def __init__(self, start_date, end_date, data_type="Adj Close"): self.symbols = ["SPY"] self.dates = self.get_dates(start_date, end_date) self....
{"/AAPL.py": ["/Analysis/trade.py"]}
8,437
BrianIshii/StockAnalyzer
refs/heads/master
/Stock/stock_tests.py
#!/usr/bin/env python3 """ stock_tests.py has test for stock.py Brian Ishii 2017 """ import unittest from stock import * class StockTestCases(unittest.TestCase): @classmethod def setUpClass(cls): pass def test_1(self): pass if __name__ == '__main__': unittest.main()
{"/AAPL.py": ["/Analysis/trade.py"]}
8,438
BrianIshii/StockAnalyzer
refs/heads/master
/Stock/Stock.py
#/usr/bin/env python3 """ data.py is an object to look at stock data Brian Ishii 2017 """ import json class Stock: def __init__(self, symbol): self.symbol = symbol def __repr__(self): pass def __str__(self): pass def get_json_data(self, symbol): f = open("s...
{"/AAPL.py": ["/Analysis/trade.py"]}
8,439
BrianIshii/StockAnalyzer
refs/heads/master
/Analysis/practice_numpy.py
import numpy as np def OneD_array(): print np.array([2,3,4]) def TwoD_array(): print np.array([(2,3,4),(5,6,7)]) def empty_array(): #print np.empty(5) #print np.empty((4,5)) print np.empty((5,4,3)) def ones_array(): print np.ones((5,4,3)) def random_array(): print np.random.random((5,4)) def randInt...
{"/AAPL.py": ["/Analysis/trade.py"]}
8,440
BrianIshii/StockAnalyzer
refs/heads/master
/practice.py
import pandas as pd import matplotlib.pyplot as plt import trade def first_graph(): df = pd.read_csv("StockData/AAPL_stock_history.csv") plt.plot(df["Adj Close"]) print df plt.show() def new_dataFrame(): #define date range start_date = "2016-01-22" end_date = "2016-12-26" dates = pd.date_...
{"/AAPL.py": ["/Analysis/trade.py"]}
8,441
BrianIshii/StockAnalyzer
refs/heads/master
/Analysis/trade.py
''' Trade.py is a library to look at stock data Written by Brian Ishii 2017 ''' import os import pandas as pd import matplotlib.pyplot as plt import math #import updateData def plot_selected(df, columns, start_index, end_index): """ plots selected data Arguments: df -- (pd.DataFrame) pandas dataframe...
{"/AAPL.py": ["/Analysis/trade.py"]}
8,442
BrianIshii/StockAnalyzer
refs/heads/master
/Analysis/test_trade.py
import unittest from trade import * class TimerTests (unittest.TestCase): def test_symbol_to_path_1(self): self.assertEqual(symbol_to_path("AAPL"),"StockData/AAPL.csv") def test_symbol_to_path_2(self): self.assertEqual(symbol_to_path("GOOGL"),"StockData/GOOGL.csv") if __name__ == '__main__...
{"/AAPL.py": ["/Analysis/trade.py"]}
8,443
BrianIshii/StockAnalyzer
refs/heads/master
/Data/data_tests.py
#!/usr/bin/env python3 """ data_tests.py has tests for data.py Brian Ishii 2017 """ import unittest import os from data import * class DataTests(unittest.TestCase): @classmethod def setUpClass(cls): test = Data("2015-01-02", "2015-01-06") cls.test = test cls.cwd = os.getcwd() de...
{"/AAPL.py": ["/Analysis/trade.py"]}
8,472
dvska/django-admin-ip-whitelist
refs/heads/master
/migrations/0001_initial.py
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-07-17 20:53 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='DjangoA...
{"/admin_ip_whitelist/tests.py": ["/admin_ip_whitelist/models.py"], "/admin_ip_whitelist/middleware.py": ["/admin_ip_whitelist/models.py"], "/admin_ip_whitelist/admin.py": ["/admin_ip_whitelist/models.py"]}
8,473
dvska/django-admin-ip-whitelist
refs/heads/master
/setup.py
#!/usr/bin/env python try: from setuptools import setup except ImportError: from distutils.core import setup Version = '0.1.1' setup(name='django-admin-ip-whitelist', version=Version, # install_requires='redis', description="Django middleware to allow access to /admin only for users, whose I...
{"/admin_ip_whitelist/tests.py": ["/admin_ip_whitelist/models.py"], "/admin_ip_whitelist/middleware.py": ["/admin_ip_whitelist/models.py"], "/admin_ip_whitelist/admin.py": ["/admin_ip_whitelist/models.py"]}
8,474
dvska/django-admin-ip-whitelist
refs/heads/master
/admin_ip_whitelist/tests.py
from django.core.cache import cache from django.core.urlresolvers import reverse from django.test import TestCase, override_settings from testfixtures import LogCapture, log_capture from .models import ADMIN_ACCESS_WHITELIST_PREFIX, DjangoAdminAccessIPWhitelist class MiddlewareTests(TestCase): def tearDown(self)...
{"/admin_ip_whitelist/tests.py": ["/admin_ip_whitelist/models.py"], "/admin_ip_whitelist/middleware.py": ["/admin_ip_whitelist/models.py"], "/admin_ip_whitelist/admin.py": ["/admin_ip_whitelist/models.py"]}
8,475
dvska/django-admin-ip-whitelist
refs/heads/master
/admin_ip_whitelist/middleware.py
import logging import django from django.conf import settings from django.core.cache import cache from django.core.exceptions import MiddlewareNotUsed from django.utils.deprecation import MiddlewareMixin from django.http import HttpResponseForbidden from .models import DjangoAdminAccessIPWhitelist, ADMIN_ACCESS_WHITE...
{"/admin_ip_whitelist/tests.py": ["/admin_ip_whitelist/models.py"], "/admin_ip_whitelist/middleware.py": ["/admin_ip_whitelist/models.py"], "/admin_ip_whitelist/admin.py": ["/admin_ip_whitelist/models.py"]}
8,476
dvska/django-admin-ip-whitelist
refs/heads/master
/admin_ip_whitelist/admin.py
from django.contrib import admin from .models import DjangoAdminAccessIPWhitelist admin.site.register(DjangoAdminAccessIPWhitelist)
{"/admin_ip_whitelist/tests.py": ["/admin_ip_whitelist/models.py"], "/admin_ip_whitelist/middleware.py": ["/admin_ip_whitelist/models.py"], "/admin_ip_whitelist/admin.py": ["/admin_ip_whitelist/models.py"]}
8,477
dvska/django-admin-ip-whitelist
refs/heads/master
/admin_ip_whitelist/test_urls.py
from django.conf.urls import url from django.contrib import admin from .test_views import TestView urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^test/', TestView.as_view(), name='test'), ]
{"/admin_ip_whitelist/tests.py": ["/admin_ip_whitelist/models.py"], "/admin_ip_whitelist/middleware.py": ["/admin_ip_whitelist/models.py"], "/admin_ip_whitelist/admin.py": ["/admin_ip_whitelist/models.py"]}
8,478
dvska/django-admin-ip-whitelist
refs/heads/master
/admin_ip_whitelist/models.py
# dvska made # Licensed under the Apache License, Version 2.0 (the "License"); from django.core.cache import cache from django.db import models from django.db.models.signals import post_delete, pre_save ADMIN_ACCESS_WHITELIST_PREFIX = 'DJANGO_ADMIN_ACCESS_WHITELIST:' WHITELIST_PREFIX = 'DJANGO_ADMIN_ACCESS_WHITELIST...
{"/admin_ip_whitelist/tests.py": ["/admin_ip_whitelist/models.py"], "/admin_ip_whitelist/middleware.py": ["/admin_ip_whitelist/models.py"], "/admin_ip_whitelist/admin.py": ["/admin_ip_whitelist/models.py"]}
8,479
1mSAD/Discord-Mediabot
refs/heads/main
/main.py
import discord from discord.ext import commands from discord import file from discord_slash import SlashCommand #Setting Values from config import * client = commands.Bot(command_prefix=config["Prefix"]) slash = SlashCommand(client, sync_commands=True, sync_on_cog_reload=True) TOKEN = config["TOKEN"] events_extension...
{"/main.py": ["/config.py", "/api/flaskapi.py"], "/cogs/commands/help.py": ["/config.py"], "/cogs/functions/tik_fn.py": ["/config.py"], "/cogs/functions/insta_fn.py": ["/config.py"], "/cogs/commands/sendtodm.py": ["/config.py"], "/cogs/events/instagram.py": ["/config.py"], "/cogs/commands/slash-sendtodm.py": ["/config....
8,480
1mSAD/Discord-Mediabot
refs/heads/main
/cogs/commands/help.py
import discord from discord.ext import commands from discord_slash import cog_ext, SlashContext import json #Setting Values import sys sys.path.append("./") from config import * prefix = config["Prefix"] def gembed(ctx): embed=discord.Embed(title='help', description='available commands.', color = discord.Colour....
{"/main.py": ["/config.py", "/api/flaskapi.py"], "/cogs/commands/help.py": ["/config.py"], "/cogs/functions/tik_fn.py": ["/config.py"], "/cogs/functions/insta_fn.py": ["/config.py"], "/cogs/commands/sendtodm.py": ["/config.py"], "/cogs/events/instagram.py": ["/config.py"], "/cogs/commands/slash-sendtodm.py": ["/config....
8,481
1mSAD/Discord-Mediabot
refs/heads/main
/cogs/functions/tik_fn.py
import requests import json import math import re from decimal import Decimal import os from urllib.parse import parse_qsl, urlparse import random import time from pystreamable import StreamableApi import sys sys.path.append("./") from config import * stream_email = config["stream_email"] stream_pass = config["stre...
{"/main.py": ["/config.py", "/api/flaskapi.py"], "/cogs/commands/help.py": ["/config.py"], "/cogs/functions/tik_fn.py": ["/config.py"], "/cogs/functions/insta_fn.py": ["/config.py"], "/cogs/commands/sendtodm.py": ["/config.py"], "/cogs/events/instagram.py": ["/config.py"], "/cogs/commands/slash-sendtodm.py": ["/config....
8,482
1mSAD/Discord-Mediabot
refs/heads/main
/cogs/functions/insta_fn.py
import requests import json import time from pystreamable import StreamableApi #Setting Values import sys sys.path.append("./") from config import * stream_email = config["stream_email"] stream_pass = config["stream_pass"] import discord class Insta_fn: def __init__(self, url, multipost_num=0): shortcod...
{"/main.py": ["/config.py", "/api/flaskapi.py"], "/cogs/commands/help.py": ["/config.py"], "/cogs/functions/tik_fn.py": ["/config.py"], "/cogs/functions/insta_fn.py": ["/config.py"], "/cogs/commands/sendtodm.py": ["/config.py"], "/cogs/events/instagram.py": ["/config.py"], "/cogs/commands/slash-sendtodm.py": ["/config....
8,483
1mSAD/Discord-Mediabot
refs/heads/main
/cogs/commands/sendtodm.py
import discord from discord.ext import commands from discord import file import os import random import sys sys.path.append("./cogs/functions") import tik_fn import insta_fn # Setting Values sys.path.append("./") from config import * path_down = config["path"] limitsize = config["limitsize"] # <-- 8 mb for file siz...
{"/main.py": ["/config.py", "/api/flaskapi.py"], "/cogs/commands/help.py": ["/config.py"], "/cogs/functions/tik_fn.py": ["/config.py"], "/cogs/functions/insta_fn.py": ["/config.py"], "/cogs/commands/sendtodm.py": ["/config.py"], "/cogs/events/instagram.py": ["/config.py"], "/cogs/commands/slash-sendtodm.py": ["/config....
8,484
1mSAD/Discord-Mediabot
refs/heads/main
/cogs/events/instagram.py
import discord from discord.ext import commands from discord import file import os import sys sys.path.append("./cogs/functions") import insta_fn #Setting Values sys.path.append("./") from config import * instapath = config["path"] limitsize = config["limitsize"] # <-- 8 mb for file size limit set by discord class...
{"/main.py": ["/config.py", "/api/flaskapi.py"], "/cogs/commands/help.py": ["/config.py"], "/cogs/functions/tik_fn.py": ["/config.py"], "/cogs/functions/insta_fn.py": ["/config.py"], "/cogs/commands/sendtodm.py": ["/config.py"], "/cogs/events/instagram.py": ["/config.py"], "/cogs/commands/slash-sendtodm.py": ["/config....
8,485
1mSAD/Discord-Mediabot
refs/heads/main
/config.py
import os from dotenv import load_dotenv load_dotenv() config = { "TOKEN": '' or os.getenv("TOKEN"), #Discord Bot Token. 'Prefix': '.', "INSTA_USER": '' or os.getenv("IG_USERNAME"), # Instagram Username "SESSION-Path": './api', # get session with instaloader -l USERNAME, then copy the session file to ...
{"/main.py": ["/config.py", "/api/flaskapi.py"], "/cogs/commands/help.py": ["/config.py"], "/cogs/functions/tik_fn.py": ["/config.py"], "/cogs/functions/insta_fn.py": ["/config.py"], "/cogs/commands/sendtodm.py": ["/config.py"], "/cogs/events/instagram.py": ["/config.py"], "/cogs/commands/slash-sendtodm.py": ["/config....
8,486
1mSAD/Discord-Mediabot
refs/heads/main
/cogs/commands/slash-sendtodm.py
import discord from discord.ext import commands from discord import file from discord_slash import cog_ext, SlashContext from discord_slash.utils.manage_commands import create_choice, create_option import os import random import sys sys.path.append("./cogs/functions") import tik_fn import insta_fn # Setting Values s...
{"/main.py": ["/config.py", "/api/flaskapi.py"], "/cogs/commands/help.py": ["/config.py"], "/cogs/functions/tik_fn.py": ["/config.py"], "/cogs/functions/insta_fn.py": ["/config.py"], "/cogs/commands/sendtodm.py": ["/config.py"], "/cogs/events/instagram.py": ["/config.py"], "/cogs/commands/slash-sendtodm.py": ["/config....
8,487
1mSAD/Discord-Mediabot
refs/heads/main
/api/flaskapi.py
from flask import Flask, json, request import json import requests import random import instaloader import sys sys.path.append("./") #Setting Values from config import * USER = config["INSTA_USER"] session_path = config["SESSION-Path"] proxyip = config["proxyip"] app = Flask(__name__) #app.config.from_mapping(config)...
{"/main.py": ["/config.py", "/api/flaskapi.py"], "/cogs/commands/help.py": ["/config.py"], "/cogs/functions/tik_fn.py": ["/config.py"], "/cogs/functions/insta_fn.py": ["/config.py"], "/cogs/commands/sendtodm.py": ["/config.py"], "/cogs/events/instagram.py": ["/config.py"], "/cogs/commands/slash-sendtodm.py": ["/config....
8,488
1mSAD/Discord-Mediabot
refs/heads/main
/cogs/events/tiktok.py
import discord from discord.ext import commands from discord import file import os import sys sys.path.append("./cogs/functions") import tik_fn # Setting Values sys.path.append("./") from config import * tik_down = config["path"] limitsize = config["limitsize"] # <-- 8 mb for file size limit set by discord class T...
{"/main.py": ["/config.py", "/api/flaskapi.py"], "/cogs/commands/help.py": ["/config.py"], "/cogs/functions/tik_fn.py": ["/config.py"], "/cogs/functions/insta_fn.py": ["/config.py"], "/cogs/commands/sendtodm.py": ["/config.py"], "/cogs/events/instagram.py": ["/config.py"], "/cogs/commands/slash-sendtodm.py": ["/config....
8,490
LightCC/OpenPegs
refs/heads/master
/src/PegBoard.py
try: from .PegNode import PegNode except ImportError: print("\n{}: Try running `pegs` from the command line!!\nor run with `python run_pegs.py` from root directory\n".format(__file__)) class PegException(Exception): pass class PegBoard: '''PegBoard is a linked list of nodes on a Peg Board ...
{"/src/PegBoard.py": ["/src/PegNode.py"], "/src/pegs.py": ["/src/PegPyramid.py"], "/src/PegNode.py": ["/src/PegNodeLink.py"], "/tests/test_PegBoard.py": ["/src/PegBoard.py", "/src/PegNode.py", "/src/PegNodeLink.py"], "/tests/test_PegNode.py": ["/src/PegNode.py"], "/src/PegNodeLink.py": ["/src/PegNode.py"], "/tests/test...
8,491
LightCC/OpenPegs
refs/heads/master
/src/pegs.py
try: from .PegPyramid import PegPyramid except ImportError: print("\n{}: Try running `pegs` from the command line!!\nor run with `python run_pegs.py` from root directory\n".format(__file__)) def main(): indent = 3 print("Running Pegs Game...") pyramid = PegPyramid() print('\n' 'Game b...
{"/src/PegBoard.py": ["/src/PegNode.py"], "/src/pegs.py": ["/src/PegPyramid.py"], "/src/PegNode.py": ["/src/PegNodeLink.py"], "/tests/test_PegBoard.py": ["/src/PegBoard.py", "/src/PegNode.py", "/src/PegNodeLink.py"], "/tests/test_PegNode.py": ["/src/PegNode.py"], "/src/PegNodeLink.py": ["/src/PegNode.py"], "/tests/test...
8,492
LightCC/OpenPegs
refs/heads/master
/src/PegNode.py
try: from .PegNodeLink import PegNodeLink except ImportError: print("\n{}: Try running `pegs` from the command line!!\nor run with `python run_pegs.py` from root directory\n".format(__file__)) class PegNode: '''Create a new PegNode instance Arguments: parent: the parent that owns this node, ...
{"/src/PegBoard.py": ["/src/PegNode.py"], "/src/pegs.py": ["/src/PegPyramid.py"], "/src/PegNode.py": ["/src/PegNodeLink.py"], "/tests/test_PegBoard.py": ["/src/PegBoard.py", "/src/PegNode.py", "/src/PegNodeLink.py"], "/tests/test_PegNode.py": ["/src/PegNode.py"], "/src/PegNodeLink.py": ["/src/PegNode.py"], "/tests/test...
8,493
LightCC/OpenPegs
refs/heads/master
/tests/test_PegBoard.py
import pytest from src.PegBoard import PegBoard from src.PegNode import PegNode from src.PegNodeLink import PegNodeLink def fake_function(): pass @pytest.fixture(params=[1, 1.1, {1, 2, 3}, 'string', {1: 1, 2: '2'}, (1, '1'), fake_function]) def not_a_list(request): '''A test fixture "not_a_list" that can be u...
{"/src/PegBoard.py": ["/src/PegNode.py"], "/src/pegs.py": ["/src/PegPyramid.py"], "/src/PegNode.py": ["/src/PegNodeLink.py"], "/tests/test_PegBoard.py": ["/src/PegBoard.py", "/src/PegNode.py", "/src/PegNodeLink.py"], "/tests/test_PegNode.py": ["/src/PegNode.py"], "/src/PegNodeLink.py": ["/src/PegNode.py"], "/tests/test...
8,494
LightCC/OpenPegs
refs/heads/master
/tests/test_PegNode.py
import pytest from src.PegNode import PegNode def fake_function(): pass ## supplies valid (node_id, node_id_str) @pytest.fixture(params=[(1, '1'), ('string', 'string'), (1.1, '1.1')]) def valid_node_id_type(request): return request.param ## supplies values that are not strings @pytest.fixture(params=[1, 1.1,...
{"/src/PegBoard.py": ["/src/PegNode.py"], "/src/pegs.py": ["/src/PegPyramid.py"], "/src/PegNode.py": ["/src/PegNodeLink.py"], "/tests/test_PegBoard.py": ["/src/PegBoard.py", "/src/PegNode.py", "/src/PegNodeLink.py"], "/tests/test_PegNode.py": ["/src/PegNode.py"], "/src/PegNodeLink.py": ["/src/PegNode.py"], "/tests/test...
8,495
LightCC/OpenPegs
refs/heads/master
/src/PegNodeLink.py
class PegNodeLink: '''PegNodeLink objects provide mapping of legal jumps from a PegNode When jumping, a PegNodeLink provides the start_node that a peg is currently located at, an adjacent_node that can be jumped over (if a peg is at that location), and an end_node (which must be empty) for the peg to land ...
{"/src/PegBoard.py": ["/src/PegNode.py"], "/src/pegs.py": ["/src/PegPyramid.py"], "/src/PegNode.py": ["/src/PegNodeLink.py"], "/tests/test_PegBoard.py": ["/src/PegBoard.py", "/src/PegNode.py", "/src/PegNodeLink.py"], "/tests/test_PegNode.py": ["/src/PegNode.py"], "/src/PegNodeLink.py": ["/src/PegNode.py"], "/tests/test...
8,496
LightCC/OpenPegs
refs/heads/master
/tests/test_PegNodeLink.py
import pytest from src.PegNodeLink import PegNodeLink from src.PegNode import PegNode def fake_function(): pass ## supply a node_arg for instantiating PegNodeLink objects # that is not a PegNode object to trigger a ValueError exception @pytest.fixture(params=[None, 1, ...
{"/src/PegBoard.py": ["/src/PegNode.py"], "/src/pegs.py": ["/src/PegPyramid.py"], "/src/PegNode.py": ["/src/PegNodeLink.py"], "/tests/test_PegBoard.py": ["/src/PegBoard.py", "/src/PegNode.py", "/src/PegNodeLink.py"], "/tests/test_PegNode.py": ["/src/PegNode.py"], "/src/PegNodeLink.py": ["/src/PegNode.py"], "/tests/test...
8,497
LightCC/OpenPegs
refs/heads/master
/src/PegPyramid.py
try: from .PegNode import PegNode from .PegBoard import PegBoard except ImportError: print("\n{}: Try running `pegs` from the command line!!\nor run with `python run_pegs.py` from root directory\n".format(__file__)) class PegPyramid(PegBoard): def __init__(self): node_ids = list(range(1, 16...
{"/src/PegBoard.py": ["/src/PegNode.py"], "/src/pegs.py": ["/src/PegPyramid.py"], "/src/PegNode.py": ["/src/PegNodeLink.py"], "/tests/test_PegBoard.py": ["/src/PegBoard.py", "/src/PegNode.py", "/src/PegNodeLink.py"], "/tests/test_PegNode.py": ["/src/PegNode.py"], "/src/PegNodeLink.py": ["/src/PegNode.py"], "/tests/test...
8,530
turtlecode/RadioButtonDesktopApplication-Python-Pyqt5
refs/heads/main
/radiobutton.py
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'radiobutton.ui' # # Created by: PyQt5 UI code generator 5.15.4 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCore, ...
{"/radiobutton_lesson8.py": ["/radiobutton.py"]}
8,531
turtlecode/RadioButtonDesktopApplication-Python-Pyqt5
refs/heads/main
/radiobutton_lesson8.py
import sys from PyQt5 import QtWidgets from radiobutton import Ui_MainWindow class my_app(QtWidgets.QMainWindow): def __init__(self): super(my_app, self).__init__() self.ui = Ui_MainWindow() self.ui.setupUi(self) self.ui.turkey.toggled.connect(self.country_onclick) self.ui....
{"/radiobutton_lesson8.py": ["/radiobutton.py"]}
8,534
brunolorente/ogc-route-client
refs/heads/master
/helpers.py
import requests from pprint import pprint ''' HELPERS ''' def get_api_name(landing_page): try: api_response = requests.get(url = landing_page, params = {'f':'json'}) json_api_response = api_response.json() except requests.ConnectionError as exception: return False return json_a...
{"/app.py": ["/helpers.py"]}
8,535
brunolorente/ogc-route-client
refs/heads/master
/app.py
import json import requests from pprint import pp, pprint from helpers import get_routes, get_api_name from flask import Flask, render_template, request, url_for app = Flask(__name__) API_BASE_URL = 'https://dp21.skymantics.com/rimac' API_NAME = get_api_name(API_BASE_URL) DEFAULT_ZOOM = 12 DEFAULT_CENTER = [0,0] TILE...
{"/app.py": ["/helpers.py"]}
8,544
beallio/media-server-status
refs/heads/master
/serverstatus/assets/exceptions.py
""" Custom exceptions for managing different servers """ class MissingConfigFile(Exception): """ Config file not found """ pass class MissingForecastIOKey(Exception): """ No Forecast.IO API key found """ pass class PlexAPIKeyNotFound(Exception): """ No Plex API key found ...
{"/serverstatus/views.py": ["/serverstatus/__init__.py"], "/serverstatus/assets/apifunctions.py": ["/serverstatus/assets/weather.py", "/serverstatus/assets/services.py", "/serverstatus/assets/sysinfo.py", "/serverstatus/assets/wrappers.py"], "/serverstatus/assets/weather.py": ["/serverstatus/assets/exceptions.py"]}
8,545
beallio/media-server-status
refs/heads/master
/serverstatus/assets/sysinfo.py
import datetime import subprocess import os import time import urllib2 from collections import OrderedDict from math import floor, log import logging import psutil logger = logging.getLogger(__name__) def convert_bytes(value, unit, output_str=False, decimals=2, auto_determine=False): """ :param value: int...
{"/serverstatus/views.py": ["/serverstatus/__init__.py"], "/serverstatus/assets/apifunctions.py": ["/serverstatus/assets/weather.py", "/serverstatus/assets/services.py", "/serverstatus/assets/sysinfo.py", "/serverstatus/assets/wrappers.py"], "/serverstatus/assets/weather.py": ["/serverstatus/assets/exceptions.py"]}
8,546
beallio/media-server-status
refs/heads/master
/serverstatus/views.py
""" Routing file for flask app Handles routing for requests """ import json import datetime from flask import render_template, Response, request from serverstatus import app from assets import apifunctions @app.route('/') @app.route('/index') def index(): """ Base index view at "http://www.example.com/" ...
{"/serverstatus/views.py": ["/serverstatus/__init__.py"], "/serverstatus/assets/apifunctions.py": ["/serverstatus/assets/weather.py", "/serverstatus/assets/services.py", "/serverstatus/assets/sysinfo.py", "/serverstatus/assets/wrappers.py"], "/serverstatus/assets/weather.py": ["/serverstatus/assets/exceptions.py"]}
8,547
beallio/media-server-status
refs/heads/master
/__init__.py
#!/usr/bin/env python """ Main initializing file. If called from command line starts WSGI debug testing server """ if __name__ == '__main__': from serverstatus import app app.config.update(DEBUG=True, TESTING=True) app.run(host='0.0.0.0') print 'Test server running...'
{"/serverstatus/views.py": ["/serverstatus/__init__.py"], "/serverstatus/assets/apifunctions.py": ["/serverstatus/assets/weather.py", "/serverstatus/assets/services.py", "/serverstatus/assets/sysinfo.py", "/serverstatus/assets/wrappers.py"], "/serverstatus/assets/weather.py": ["/serverstatus/assets/exceptions.py"]}
8,548
beallio/media-server-status
refs/heads/master
/serverstatus/__init__.py
""" Initialize and setup flask app """ import imp import os import logging import logging.handlers as handlers from flask import Flask app = Flask(__name__) # update config for flask app app.config.update( APPNAME='server_status', LOGGINGMODE=logging.DEBUG, APPLOCATION=os.path.join(os.path.dirname(os.p...
{"/serverstatus/views.py": ["/serverstatus/__init__.py"], "/serverstatus/assets/apifunctions.py": ["/serverstatus/assets/weather.py", "/serverstatus/assets/services.py", "/serverstatus/assets/sysinfo.py", "/serverstatus/assets/wrappers.py"], "/serverstatus/assets/weather.py": ["/serverstatus/assets/exceptions.py"]}
8,549
beallio/media-server-status
refs/heads/master
/config.py
""" Internal configuration file for Server Status app Change the values according to your own server setup. By default, the app is set to initialize the config file from "/var/config.py" If you wish to change the location you'll need to change the location of the file in serverstatus/__init__.py For ForecastIO you'll...
{"/serverstatus/views.py": ["/serverstatus/__init__.py"], "/serverstatus/assets/apifunctions.py": ["/serverstatus/assets/weather.py", "/serverstatus/assets/services.py", "/serverstatus/assets/sysinfo.py", "/serverstatus/assets/wrappers.py"], "/serverstatus/assets/weather.py": ["/serverstatus/assets/exceptions.py"]}
8,550
beallio/media-server-status
refs/heads/master
/serverstatus/assets/apifunctions.py
""" Serves as backend for returning information about server to jQuery and Jinja templates. Data is returned in the form of dicts to mimic JSON formatting. """ from collections import OrderedDict import logging from serverstatus.assets.weather import Forecast from serverstatus.assets.services import CheckCrashPlan, S...
{"/serverstatus/views.py": ["/serverstatus/__init__.py"], "/serverstatus/assets/apifunctions.py": ["/serverstatus/assets/weather.py", "/serverstatus/assets/services.py", "/serverstatus/assets/sysinfo.py", "/serverstatus/assets/wrappers.py"], "/serverstatus/assets/weather.py": ["/serverstatus/assets/exceptions.py"]}
8,551
beallio/media-server-status
refs/heads/master
/serverstatus/tests/test_serverstatus.py
import urllib2 import unittest from collections import OrderedDict from copy import deepcopy from flask import Flask from flask.ext.testing import LiveServerTestCase from serverstatus import app from serverstatus.assets.apifunctions import APIFunctions from serverstatus.assets.services import ServerSync, SubSonic fro...
{"/serverstatus/views.py": ["/serverstatus/__init__.py"], "/serverstatus/assets/apifunctions.py": ["/serverstatus/assets/weather.py", "/serverstatus/assets/services.py", "/serverstatus/assets/sysinfo.py", "/serverstatus/assets/wrappers.py"], "/serverstatus/assets/weather.py": ["/serverstatus/assets/exceptions.py"]}
8,552
beallio/media-server-status
refs/heads/master
/serverstatus/assets/services.py
import os import logging import urllib2 import urlparse from collections import OrderedDict from operator import itemgetter from time import localtime, strftime import datetime from cStringIO import StringIO from PIL import Image, ImageOps import libsonic import xmltodict from serverstatus import app import serversta...
{"/serverstatus/views.py": ["/serverstatus/__init__.py"], "/serverstatus/assets/apifunctions.py": ["/serverstatus/assets/weather.py", "/serverstatus/assets/services.py", "/serverstatus/assets/sysinfo.py", "/serverstatus/assets/wrappers.py"], "/serverstatus/assets/weather.py": ["/serverstatus/assets/exceptions.py"]}
8,553
beallio/media-server-status
refs/heads/master
/setup.py
#!/usr/bin/env python import os try: from setuptools import setup except ImportError: from distutils.core import setup readme_file = 'README.md' readme_file_full_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), readme_file) with open(readme_file_full_path, 'r') as f: readme_contents = f.re...
{"/serverstatus/views.py": ["/serverstatus/__init__.py"], "/serverstatus/assets/apifunctions.py": ["/serverstatus/assets/weather.py", "/serverstatus/assets/services.py", "/serverstatus/assets/sysinfo.py", "/serverstatus/assets/wrappers.py"], "/serverstatus/assets/weather.py": ["/serverstatus/assets/exceptions.py"]}
8,554
beallio/media-server-status
refs/heads/master
/serverstatus/assets/wrappers.py
""" function wrappers module """ import logging from inspect import stack, getmodule def logger(log_type): """ decorator to log output of functions :param log_type: logger level as string (debug, warn, info, etc) :type log_type: str """ def log_decorator(func): """ wrapped fun...
{"/serverstatus/views.py": ["/serverstatus/__init__.py"], "/serverstatus/assets/apifunctions.py": ["/serverstatus/assets/weather.py", "/serverstatus/assets/services.py", "/serverstatus/assets/sysinfo.py", "/serverstatus/assets/wrappers.py"], "/serverstatus/assets/weather.py": ["/serverstatus/assets/exceptions.py"]}
8,555
beallio/media-server-status
refs/heads/master
/serverstatus/assets/weather.py
# coding=utf-8 from collections import namedtuple from time import localtime, strftime import logging import forecastio from serverstatus.assets.exceptions import MissingForecastIOKey LOGGER = logging.getLogger(__name__) class Forecast(object): def __init__(self, weather_config): assert type(weather_c...
{"/serverstatus/views.py": ["/serverstatus/__init__.py"], "/serverstatus/assets/apifunctions.py": ["/serverstatus/assets/weather.py", "/serverstatus/assets/services.py", "/serverstatus/assets/sysinfo.py", "/serverstatus/assets/wrappers.py"], "/serverstatus/assets/weather.py": ["/serverstatus/assets/exceptions.py"]}
8,556
beallio/media-server-status
refs/heads/master
/wsgi.py
""" APACHE MOD_WSGI Load script Some of the variables in this file may need to be adjusted depending on server setup and/or location of virtual environment and application """ import sys import os PROJECT_DIR = '/var/www/status' # change to the root of your app # 'venv/bin' is the location of the project's virtual en...
{"/serverstatus/views.py": ["/serverstatus/__init__.py"], "/serverstatus/assets/apifunctions.py": ["/serverstatus/assets/weather.py", "/serverstatus/assets/services.py", "/serverstatus/assets/sysinfo.py", "/serverstatus/assets/wrappers.py"], "/serverstatus/assets/weather.py": ["/serverstatus/assets/exceptions.py"]}
8,557
mbijou/car-repair-shop-backend
refs/heads/master
/company/serializers/__init__.py
from rest_framework import serializers from company.models import Company from django.db.transaction import atomic class CompanySerializer(serializers.ModelSerializer): class Meta: model = Company fields = ("name",) def save(self, **kwargs): Company.save_company() return super...
{"/company/serializers/__init__.py": ["/company/models.py"], "/company/viewsets/__init__.py": ["/company/models.py", "/company/serializers/__init__.py"], "/company/urls.py": ["/company/viewsets/__init__.py"], "/company/admin.py": ["/company/models.py"]}
8,558
mbijou/car-repair-shop-backend
refs/heads/master
/company/viewsets/__init__.py
from rest_framework import views from rest_framework.mixins import ListModelMixin from rest_framework.viewsets import ModelViewSet from rest_framework.response import Response from company.models import Company from company.serializers import CompanySerializer from django.db.transaction import atomic class CompanyVie...
{"/company/serializers/__init__.py": ["/company/models.py"], "/company/viewsets/__init__.py": ["/company/models.py", "/company/serializers/__init__.py"], "/company/urls.py": ["/company/viewsets/__init__.py"], "/company/admin.py": ["/company/models.py"]}
8,559
mbijou/car-repair-shop-backend
refs/heads/master
/company/urls.py
from django.urls import path from company.viewsets import CompanyViewSet from rest_framework import routers router = routers.SimpleRouter() router.register(r'company', CompanyViewSet) urlpatterns = router.urls
{"/company/serializers/__init__.py": ["/company/models.py"], "/company/viewsets/__init__.py": ["/company/models.py", "/company/serializers/__init__.py"], "/company/urls.py": ["/company/viewsets/__init__.py"], "/company/admin.py": ["/company/models.py"]}
8,560
mbijou/car-repair-shop-backend
refs/heads/master
/company/admin.py
from django.contrib import admin # Register your models here. from company.models import Company admin.register(Company)
{"/company/serializers/__init__.py": ["/company/models.py"], "/company/viewsets/__init__.py": ["/company/models.py", "/company/serializers/__init__.py"], "/company/urls.py": ["/company/viewsets/__init__.py"], "/company/admin.py": ["/company/models.py"]}
8,561
mbijou/car-repair-shop-backend
refs/heads/master
/company/models.py
from django.db import models from django.core.exceptions import ValidationError # Create your models here. class Company(models.Model): name = models.CharField(max_length=200) def save(self, *args, **kwargs): self.pk = 1 return super().save(*args, **kwargs) @classmethod def save_comp...
{"/company/serializers/__init__.py": ["/company/models.py"], "/company/viewsets/__init__.py": ["/company/models.py", "/company/serializers/__init__.py"], "/company/urls.py": ["/company/viewsets/__init__.py"], "/company/admin.py": ["/company/models.py"]}
8,564
rikenshah/Well-thy
refs/heads/master
/pyScripts/analysis.py
import pandas as pd datapath = "../datasets/merged.csv" df = pd.read_csv(datapath)
{"/health/views.py": ["/health/models.py"]}
8,565
rikenshah/Well-thy
refs/heads/master
/pyScripts/gov.py
# This is a magic script that transforms two datasets into one smartly by comparison of resonse parameters import pandas as pd datapath = "../datasets/healthcaregov/data.csv" datapath2 = "../datasets/prudentialLifeInsurance/train.csv" savepath1 = "../datasets/merged1.csv" df = pd.read_csv(datapath) df2 = df[df["Ind...
{"/health/views.py": ["/health/models.py"]}
8,566
rikenshah/Well-thy
refs/heads/master
/health/models.py
from django.db import models from django.core.validators import MaxValueValidator, MinValueValidator from django.contrib.auth.models import User class HealthProfile(models.Model): user = models.ForeignKey(User, on_delete=models.CASCADE) age = models.IntegerField(validators=[MaxValueValidator(100), MinValueValidator(...
{"/health/views.py": ["/health/models.py"]}
8,567
rikenshah/Well-thy
refs/heads/master
/health/migrations/0005_auto_20180426_1550.py
# Generated by Django 2.0.1 on 2018-04-26 15:50 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('health', '0004_auto_20180426_1547'), ] operations = [ migrations.AlterField( model_name='healthprofile', name='sleep...
{"/health/views.py": ["/health/models.py"]}
8,568
rikenshah/Well-thy
refs/heads/master
/health/migrations/0001_initial.py
# Generated by Django 2.0.1 on 2018-04-10 16:31 from django.conf import settings import django.core.validators from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AU...
{"/health/views.py": ["/health/models.py"]}
8,569
rikenshah/Well-thy
refs/heads/master
/health/migrations/0006_auto_20180426_1551.py
# Generated by Django 2.0.1 on 2018-04-26 15:51 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('health', '0005_auto_20180426_1550'), ] operations = [ migrations.AlterField( model_name='healthprofile', name='exerc...
{"/health/views.py": ["/health/models.py"]}
8,570
rikenshah/Well-thy
refs/heads/master
/health/migrations/0003_auto_20180426_1527.py
# Generated by Django 2.0.1 on 2018-04-26 15:27 import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('health', '0002_auto_20180414_0114'), ] operations = [ migrations.AlterField( model_name='healthpro...
{"/health/views.py": ["/health/models.py"]}
8,571
rikenshah/Well-thy
refs/heads/master
/pyScripts/get_recommendations.py
''' Generates recommendation for the user based on bmi, smoking, tobacco usage, alcohol consumption, exercise travel time, sleep time, job type. ''' import csv, re featureWeights_dict={} healthy_bmi = 0 moderate_travel = 1 excess_travel = 2 low_sleep = 0 moderate_sleep = 1 no_exercise = 0 moderate_exercise = 1 ...
{"/health/views.py": ["/health/models.py"]}