index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
50,206
stevenlandis/SBHACKS_V
refs/heads/master
/PC_Control/Keyboard_Control.py
import keyboard as key def Sleep_Mode(): key.Keyboard.keyDown(key.Keyboard.VK_SLEEP) key.Keyboard.keyUp(key.Keyboard.VK_SLEEP) def Tab(): key.Keyboard.keyDown(key.Keyboard.VK_TAB) key.Keyboard.keyUp(key.Keyboard.VK_TAB) def Shift_Tab(): key.Keyboard.keyDown(key.Keyboard.VK_SHIFT) key.Keyboard...
{"/dragonIO/testAll/GUI.py": ["/Youtube_Control.py"], "/Receive.py": ["/Youtube_Control.py"]}
50,207
stevenlandis/SBHACKS_V
refs/heads/master
/PC_Control/Volume_Control.py
from sound import Sound def Increase_Volume(amount): for i in range(amount): Sound.volume_up() def Decrease_Volume(amount): for i in range(amount): Sound.volume_down() def Mute(): Sound.mute() def Max_Volume(): Sound.volume_max() def Min_Volume(): Sound.volume_min() def Get_Vol...
{"/dragonIO/testAll/GUI.py": ["/Youtube_Control.py"], "/Receive.py": ["/Youtube_Control.py"]}
50,208
stevenlandis/SBHACKS_V
refs/heads/master
/dragonIO/testA0/main.py
import serial ard = serial.Serial('/dev/tty96B0', 9600) if __name__ == '__main__': print('Starting') while True: ardOut = ard.readline() print(ardOut)
{"/dragonIO/testAll/GUI.py": ["/Youtube_Control.py"], "/Receive.py": ["/Youtube_Control.py"]}
50,209
stevenlandis/SBHACKS_V
refs/heads/master
/board.py
import serial ard = serial.Serial('/dev/tty96B0', 115200) if __name__ == '__main__': print('Starting') while True: print(ard.readline()[:-1])
{"/dragonIO/testAll/GUI.py": ["/Youtube_Control.py"], "/Receive.py": ["/Youtube_Control.py"]}
50,210
stevenlandis/SBHACKS_V
refs/heads/master
/Receive.py
from SimpleWebSocketServer import SimpleWebSocketServer, WebSocket import Keyboard_Control as keyboard import Volume_Control as volume import Windows_Control as windows import Youtube_Control as youtube import GUI import sys import wmi import _thread as thread import pythoncom import Speech_Recognition as SR DataString...
{"/dragonIO/testAll/GUI.py": ["/Youtube_Control.py"], "/Receive.py": ["/Youtube_Control.py"]}
50,211
stevenlandis/SBHACKS_V
refs/heads/master
/dragonIO/testAll/Speech_Recognition.py
import pip import smtplib import speech_recognition as sr import ssl Sender = 'gareyflee@gmail.com' Recipient = 'gareyflee@gmail.com' pw = "Dew61316131" def Speech_To_Email(): # for index, name in enumerate(sr.Microphone.list_microphone_names()): # print("Microphone with name \"{1}\" found for `Microphone(...
{"/dragonIO/testAll/GUI.py": ["/Youtube_Control.py"], "/Receive.py": ["/Youtube_Control.py"]}
50,212
stevenlandis/SBHACKS_V
refs/heads/master
/dragonIO/testAll/Keyboard_Control.py
import keyboard as key from time import sleep def Scroll_Windows(arg): if arg == 0: Alt_Tab() else: Alt_Shift_Tab() def Scroll_Tabs(arg): if arg == 0: Ctrl_Tab() else: Ctrl_Shift_Tab() def Tab(): key.Keyboard.keyDown(key.Keyboard.VK_TAB) key.Keyboard.keyUp(key....
{"/dragonIO/testAll/GUI.py": ["/Youtube_Control.py"], "/Receive.py": ["/Youtube_Control.py"]}
50,213
stevenlandis/SBHACKS_V
refs/heads/master
/dragonIO/testLight/board.py
import serial ard = serial.Serial('/dev/tty96B0', 9600) if __name__ == '__main__': print('Starting') while True: print(ard.readline())
{"/dragonIO/testAll/GUI.py": ["/Youtube_Control.py"], "/Receive.py": ["/Youtube_Control.py"]}
50,215
vsegouin/pic-sorter
refs/heads/master
/files/FileSystemManager.py
# coding=utf-8 import os import re import time import platform from Parameters import Parameters from Reporting import Reporting months = ["Janvier", "Fevrier", "Mars", "Avril", "Mai", "Juin", "Juillet", "Aout", "Septembre", "Octobre", "Novembre", "Decembre"] unauthorizedExtension = ['.ico', '.gif'] class...
{"/files/FileSystemManager.py": ["/Parameters.py", "/Reporting.py"], "/__main__.py": ["/Parameters.py", "/Reporting.py", "/files/FileBrowser.py", "/files/FileSystemManager.py", "/files/MD5Encoder.py", "/image/ExifReader.py"], "/Reporting.py": ["/Parameters.py"], "/files/MD5Encoder.py": ["/Reporting.py"], "/files/FileBr...
50,216
vsegouin/pic-sorter
refs/heads/master
/__main__.py
import logging import time from Parameters import Parameters from Reporting import * from files.FileBrowser import FileBrowser from files.FileSystemManager import FileSystemManager from files.MD5Encoder import MD5Encoder from image.ExifReader import ExifReader import os import sys import logging logging.basicConfig(l...
{"/files/FileSystemManager.py": ["/Parameters.py", "/Reporting.py"], "/__main__.py": ["/Parameters.py", "/Reporting.py", "/files/FileBrowser.py", "/files/FileSystemManager.py", "/files/MD5Encoder.py", "/image/ExifReader.py"], "/Reporting.py": ["/Parameters.py"], "/files/MD5Encoder.py": ["/Reporting.py"], "/files/FileBr...
50,217
vsegouin/pic-sorter
refs/heads/master
/Reporting.py
import logging from logging import Logger from Parameters import Parameters import os class Singleton(type): _instances = {} def __call__(cls, *args, **kwargs): if cls not in cls._instances: cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs) return cls._instanc...
{"/files/FileSystemManager.py": ["/Parameters.py", "/Reporting.py"], "/__main__.py": ["/Parameters.py", "/Reporting.py", "/files/FileBrowser.py", "/files/FileSystemManager.py", "/files/MD5Encoder.py", "/image/ExifReader.py"], "/Reporting.py": ["/Parameters.py"], "/files/MD5Encoder.py": ["/Reporting.py"], "/files/FileBr...
50,218
vsegouin/pic-sorter
refs/heads/master
/image/ExifReader.py
import mimetypes import exifread class ExifReader: def __init__(self): pass def read_exif(self, file): f = open(file, 'rb') # Return Exif tags try: tags = exifread.process_file(f) except TypeError : tags = '' return tags def detect...
{"/files/FileSystemManager.py": ["/Parameters.py", "/Reporting.py"], "/__main__.py": ["/Parameters.py", "/Reporting.py", "/files/FileBrowser.py", "/files/FileSystemManager.py", "/files/MD5Encoder.py", "/image/ExifReader.py"], "/Reporting.py": ["/Parameters.py"], "/files/MD5Encoder.py": ["/Reporting.py"], "/files/FileBr...
50,219
vsegouin/pic-sorter
refs/heads/master
/files/MD5Encoder.py
import os, hashlib import errno from Reporting import Reporting class MD5Encoder: m_database_path = "" m_current_file = "" m_hashed_value = "" m_duplicate_file = "" def __init__(self, database_location): self.m_database_path = os.path.join(database_location, "database.txt") self...
{"/files/FileSystemManager.py": ["/Parameters.py", "/Reporting.py"], "/__main__.py": ["/Parameters.py", "/Reporting.py", "/files/FileBrowser.py", "/files/FileSystemManager.py", "/files/MD5Encoder.py", "/image/ExifReader.py"], "/Reporting.py": ["/Parameters.py"], "/files/MD5Encoder.py": ["/Reporting.py"], "/files/FileBr...
50,220
vsegouin/pic-sorter
refs/heads/master
/Parameters.py
import platform class Singleton(type): _instances = {} def __call__(cls, *args, **kwargs): if cls not in cls._instances: cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs) return cls._instances[cls] # Python2 class Parameters(object): is_verbose = False ...
{"/files/FileSystemManager.py": ["/Parameters.py", "/Reporting.py"], "/__main__.py": ["/Parameters.py", "/Reporting.py", "/files/FileBrowser.py", "/files/FileSystemManager.py", "/files/MD5Encoder.py", "/image/ExifReader.py"], "/Reporting.py": ["/Parameters.py"], "/files/MD5Encoder.py": ["/Reporting.py"], "/files/FileBr...
50,221
vsegouin/pic-sorter
refs/heads/master
/files/FileBrowser.py
import os from Reporting import Reporting class FileBrowser: root_path = None def __init__(self, root_path): self.root_path = root_path def count_processed_file(self): Reporting.total_file = 0 Reporting.calculated_total_file = 0 for root, subdirs, files in self.crawl_pro...
{"/files/FileSystemManager.py": ["/Parameters.py", "/Reporting.py"], "/__main__.py": ["/Parameters.py", "/Reporting.py", "/files/FileBrowser.py", "/files/FileSystemManager.py", "/files/MD5Encoder.py", "/image/ExifReader.py"], "/Reporting.py": ["/Parameters.py"], "/files/MD5Encoder.py": ["/Reporting.py"], "/files/FileBr...
50,222
twolfson/sublime-info
refs/heads/master
/sublime_info/__init__.py
# Load in local modules for extension from __future__ import absolute_import from sublime_info.SublimeInfo import SublimeInfo from sublime_info.errors import * # Define sugar methods def get_sublime_path(): return SublimeInfo.get_sublime_path() def get_sublime_version(): return SublimeInfo.get_sublime_versio...
{"/sublime_info/__init__.py": ["/sublime_info/SublimeInfo.py", "/sublime_info/errors.py"], "/sublime_info/SublimeInfo.py": ["/sublime_info/errors.py"], "/test/sublime-info_test.py": ["/sublime_info/__init__.py"]}
50,223
twolfson/sublime-info
refs/heads/master
/setup.py
from setuptools import setup, find_packages setup( name='sublime_info', version='0.2.0', description='Gather information about Sublime Text', long_description=open('README.rst').read(), keywords=[ 'sublime', 'sublime text', 'info', 'plugin' ], author='Todd W...
{"/sublime_info/__init__.py": ["/sublime_info/SublimeInfo.py", "/sublime_info/errors.py"], "/sublime_info/SublimeInfo.py": ["/sublime_info/errors.py"], "/test/sublime-info_test.py": ["/sublime_info/__init__.py"]}
50,224
twolfson/sublime-info
refs/heads/master
/sublime_info/SublimeInfo.py
# Load in core, 3rd party, and local dependencies from __future__ import absolute_import import os import re import subprocess from sublime_info.errors import STNotResolvedError, STBadLocationError try: from shutil import which except ImportError: # Python 2 fallback from shutilwhich import which class Subli...
{"/sublime_info/__init__.py": ["/sublime_info/SublimeInfo.py", "/sublime_info/errors.py"], "/sublime_info/SublimeInfo.py": ["/sublime_info/errors.py"], "/test/sublime-info_test.py": ["/sublime_info/__init__.py"]}
50,225
twolfson/sublime-info
refs/heads/master
/test/sublime-info_test.py
# Load in dependencies import os from unittest import TestCase # Load in local dependencies import sublime_info # Outline tests """ # The majority of these will be satisfied via .travis.yml Sublime Text as subl resolved via `get_sublime_path` has a path of `/usr/bin/subl` Sublime Text as sublime_text ...
{"/sublime_info/__init__.py": ["/sublime_info/SublimeInfo.py", "/sublime_info/errors.py"], "/sublime_info/SublimeInfo.py": ["/sublime_info/errors.py"], "/test/sublime-info_test.py": ["/sublime_info/__init__.py"]}
50,226
twolfson/sublime-info
refs/heads/master
/sublime_info/errors.py
# Define a custom exception for when Sublime cannot be located class STNotFoundError(Exception): pass class STNotResolvedError(STNotFoundError): pass class STBadLocationError(STNotFoundError): pass
{"/sublime_info/__init__.py": ["/sublime_info/SublimeInfo.py", "/sublime_info/errors.py"], "/sublime_info/SublimeInfo.py": ["/sublime_info/errors.py"], "/test/sublime-info_test.py": ["/sublime_info/__init__.py"]}
50,240
rwsproat/writing_evolution
refs/heads/master
/flags.py
## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, software ## distributed...
{"/builder.py": ["/pynini_interface.py"]}
50,241
rwsproat/writing_evolution
refs/heads/master
/concepts.py
# -*- coding: utf-8 -*- ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing,...
{"/builder.py": ["/pynini_interface.py"]}
50,242
rwsproat/writing_evolution
refs/heads/master
/lexicon.py
#!/usr/bin/env python ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, s...
{"/builder.py": ["/pynini_interface.py"]}
50,243
rwsproat/writing_evolution
refs/heads/master
/builder.py
## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, software ## distributed...
{"/builder.py": ["/pynini_interface.py"]}
50,244
rwsproat/writing_evolution
refs/heads/master
/stats.py
#!/usr/bin/env python ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, s...
{"/builder.py": ["/pynini_interface.py"]}
50,245
rwsproat/writing_evolution
refs/heads/master
/pynini_interface.py
## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, software ## distributed...
{"/builder.py": ["/pynini_interface.py"]}
50,254
1dayac/magic_bot
refs/heads/master
/candle_factory_5.py
#clanteam from selenium import webdriver import time import sys from datetime import datetime import re from mtgolibrary import MtgoLibraryParser from card import Card, Price import sqlite3 con = sqlite3.connect('cards.db', isolation_level=None) cursor = con.cursor() tb_exists = "SELECT name FROM sqlite_master WHERE ...
{"/candle_factory_5.py": ["/mtgolibrary.py", "/card.py"], "/goatbots_cardhoarder.py": ["/card.py", "/mtgolibrary.py"], "/number_parser.py": ["/card.py", "/queue_with_capacity.py"], "/mtgolibrary.py": ["/card.py", "/number_parser.py"], "/mtgo_controller.py": ["/queue_with_capacity.py"]}
50,255
1dayac/magic_bot
refs/heads/master
/queue_with_capacity.py
import queue class QueueWithMaxCapacity(object): def __init__(self, capacity = 100): self.limit = capacity self.queue = queue.Queue() def add(self, item): if self.queue.qsize() > self.limit: self.queue.get() self.queue.put(item)
{"/candle_factory_5.py": ["/mtgolibrary.py", "/card.py"], "/goatbots_cardhoarder.py": ["/card.py", "/mtgolibrary.py"], "/number_parser.py": ["/card.py", "/queue_with_capacity.py"], "/mtgolibrary.py": ["/card.py", "/number_parser.py"], "/mtgo_controller.py": ["/queue_with_capacity.py"]}
50,256
1dayac/magic_bot
refs/heads/master
/goatbots_cardhoarder.py
from selenium import webdriver import sqlite3 from datetime import datetime from card import Card, Price import time from mtgolibrary import MtgoLibraryParser chromedriver_path = r"C:\Users\dmm2017\Desktop\magic_bot\chromedriver.exe" import win32api, win32con, win32process def setaffinity(): pid = win32api.GetCu...
{"/candle_factory_5.py": ["/mtgolibrary.py", "/card.py"], "/goatbots_cardhoarder.py": ["/card.py", "/mtgolibrary.py"], "/number_parser.py": ["/card.py", "/queue_with_capacity.py"], "/mtgolibrary.py": ["/card.py", "/number_parser.py"], "/mtgo_controller.py": ["/queue_with_capacity.py"]}
50,257
1dayac/magic_bot
refs/heads/master
/number_parser.py
import pickle import sys import queue from card import Card, Price from selenium import webdriver import time from queue_with_capacity import QueueWithMaxCapacity import platform if platform.system() == "Windows": chromedriver_path = r"C:\Users\IEUser\Desktop\magic_bot\chromedriver.exe" else: chromedriver_path...
{"/candle_factory_5.py": ["/mtgolibrary.py", "/card.py"], "/goatbots_cardhoarder.py": ["/card.py", "/mtgolibrary.py"], "/number_parser.py": ["/card.py", "/queue_with_capacity.py"], "/mtgolibrary.py": ["/card.py", "/number_parser.py"], "/mtgo_controller.py": ["/queue_with_capacity.py"]}
50,258
1dayac/magic_bot
refs/heads/master
/mtgolibrary.py
from selenium import webdriver import sqlite3 from datetime import datetime from card import Card, Price import time import platform import re from number_parser import DigitsClassifier from trusted_bots import * if platform.system() == "Windows": chromedriver_path = r"C:\Users\IEUser\Desktop\magic_bot\chromedrive...
{"/candle_factory_5.py": ["/mtgolibrary.py", "/card.py"], "/goatbots_cardhoarder.py": ["/card.py", "/mtgolibrary.py"], "/number_parser.py": ["/card.py", "/queue_with_capacity.py"], "/mtgolibrary.py": ["/card.py", "/number_parser.py"], "/mtgo_controller.py": ["/queue_with_capacity.py"]}
50,259
1dayac/magic_bot
refs/heads/master
/mtgo_controller.py
import sqlite3 from transitions import Machine, State from pywinauto.application import Application import pyautogui import sys import os from enum import Enum import math import traceback from trusted_bots import * pyautogui.FAILSAFE = False class TradeStatus(Enum): SUCCESS = 1 BOT_OFFLINE = 2 TRADE_REJEC...
{"/candle_factory_5.py": ["/mtgolibrary.py", "/card.py"], "/goatbots_cardhoarder.py": ["/card.py", "/mtgolibrary.py"], "/number_parser.py": ["/card.py", "/queue_with_capacity.py"], "/mtgolibrary.py": ["/card.py", "/number_parser.py"], "/mtgo_controller.py": ["/queue_with_capacity.py"]}
50,260
1dayac/magic_bot
refs/heads/master
/card.py
class Price: def __init__(self): self.url = "" self.buy_price = 0.0 self.sell_price = 0.0 self.bot_name_buy = "" self.bot_name_sell = "" self.number = 0 def __init__(self, url, buy_price, sell_price, bot_name_buy, bot_name_sell, number): self.url = url ...
{"/candle_factory_5.py": ["/mtgolibrary.py", "/card.py"], "/goatbots_cardhoarder.py": ["/card.py", "/mtgolibrary.py"], "/number_parser.py": ["/card.py", "/queue_with_capacity.py"], "/mtgolibrary.py": ["/card.py", "/number_parser.py"], "/mtgo_controller.py": ["/queue_with_capacity.py"]}
50,266
Jcfurtado/PythonProjects
refs/heads/master
/geckoshouse/main.py
from time import sleep from .gled import clear, cock_shut, cockcrow, overnight def morning(): cockcrow() print("\n Cockcrow!! ON!") sleep(300) clear() print("\n Cockcrow!!! OFF!") def evening(): from time import sleep cock_shut() print("\n Cockshut, ON!") sleep(300) clear() ...
{"/geckoshouse/main.py": ["/geckoshouse/gled.py"], "/geckoshouse/gpublish.py": ["/geckoshouse/gdht.py", "/geckoshouse/glamp.py"]}
50,267
Jcfurtado/PythonProjects
refs/heads/master
/geckoshouse/gjson.py
import ujson def w_dht(area, temp, humid): dht_json = { "dht": { "area": area, "temperature": temp, "humidity": humid }, } with open("gdht.json", "w") as write_file: ujson.dump(dht_json, write_file) def r_dht(): ...
{"/geckoshouse/main.py": ["/geckoshouse/gled.py"], "/geckoshouse/gpublish.py": ["/geckoshouse/gdht.py", "/geckoshouse/glamp.py"]}
50,268
Jcfurtado/PythonProjects
refs/heads/master
/geckoshouse/gpublish.py
from time import sleep from umqtt.simple import MQTTClient from .gdht import d_one, d_two from .glamp import state_lamp def data_pub(server="192.168.0.102"): c = MQTTClient("umqtt_client", server) c.connect() # hot side temp1, humid1 = d_one() # cold side temp2, humid2 = d_two() # Measur...
{"/geckoshouse/main.py": ["/geckoshouse/gled.py"], "/geckoshouse/gpublish.py": ["/geckoshouse/gdht.py", "/geckoshouse/glamp.py"]}
50,269
Jcfurtado/PythonProjects
refs/heads/master
/geckoshouse/glamp.py
from machine import Pin def state_lamp(): lpd_uv = Pin(5, Pin.OUT, Pin.PULL_UP) # (D1) UV light lpd_uva = Pin(5, Pin.OUT, Pin.PULL_UP) # (D1) UVA-B light led_rgb = Pin(5, Pin.OUT, Pin.PULL_UP) # (D1) RGB LED overnight lpd_day = Pin(5, Pin.OUT, Pin.PULL_UP) # (D1) day heat lamp lpd_night = Pin(...
{"/geckoshouse/main.py": ["/geckoshouse/gled.py"], "/geckoshouse/gpublish.py": ["/geckoshouse/gdht.py", "/geckoshouse/glamp.py"]}
50,270
Jcfurtado/PythonProjects
refs/heads/master
/geckoshouse/gled.py
from machine import Pin from neopixel import NeoPixel # --- rgb led --- # # the number 12 is number of led rgb_led = NeoPixel(Pin(5), 12) # (D1) overnight RGB LED lpd_uv = Pin(5, Pin.OUT, Pin.PULL_UP) # (D1) UV light lpd_uva = Pin(5, Pin.OUT, Pin.PULL_UP) # (D1) UVA-B light lpd_day = Pin(5, Pin.OUT, Pin.PULL_UP) #...
{"/geckoshouse/main.py": ["/geckoshouse/gled.py"], "/geckoshouse/gpublish.py": ["/geckoshouse/gdht.py", "/geckoshouse/glamp.py"]}
50,271
Jcfurtado/PythonProjects
refs/heads/master
/geckoshouse/gdht.py
from time import sleep import dht from machine import Pin def d_one(): # ( Sensor DHT hot side) sensor = dht.DHT22(Pin(4, Pin.IN, Pin.PULL_UP)) sensor.measure() temp = sensor.temperature() # eg. 30.6 (°C) humid = sensor.humidity() # eg. 25.3 (% RH) area = "hot" return area, temp, humid d...
{"/geckoshouse/main.py": ["/geckoshouse/gled.py"], "/geckoshouse/gpublish.py": ["/geckoshouse/gdht.py", "/geckoshouse/glamp.py"]}
50,272
Jcfurtado/PythonProjects
refs/heads/master
/geckoshouse/gconnect.py
import network import ujson def key(): with open("key.json", "r") as read_file: k = ujson.load(read_file) return k.ssid, k.pswd def do_connect(): lan = network.WLAN(network.STA_IF) lan.active(True) if not lan.isconnected(): print('connecting to network...') lan.connect('A...
{"/geckoshouse/main.py": ["/geckoshouse/gled.py"], "/geckoshouse/gpublish.py": ["/geckoshouse/gdht.py", "/geckoshouse/glamp.py"]}
50,273
Jcfurtado/PythonProjects
refs/heads/master
/geckoshouse/gfirebase.py
import .firebase.ufirebase as firebase URL = 'lucid-lychee' # see note on URLs at the bottom of documentation print firebase.get(URL) # this is an empty Firebase None firebase.put(URL, 'tell me everything') # can take a string print firebase.get(URL) tell me everything firebase.put(URL, {'lucidity': 9001}) # or ...
{"/geckoshouse/main.py": ["/geckoshouse/gled.py"], "/geckoshouse/gpublish.py": ["/geckoshouse/gdht.py", "/geckoshouse/glamp.py"]}
50,275
andycasey/velociraptor
refs/heads/master
/scripts/npm_collect_the_battery_stars_comparison.py
import pickle import yaml import numpy as np from astropy.io import fits from astropy.table import Table with open("data/the-battery-stars-comparison.indices.pkl", "rb") as fp: comp_indices = pickle.load(fp) with open("results/the-battery-stars-comparison.astrometric_unit_weight_error.pkl", "rb") as fp: ...
{"/scripts/npm_run_elastic_ball_test.py": ["/npm_utils.py"], "/npm.py": ["/velociraptor.py", "/npm_utils.py"], "/attic/validation.py": ["/velociraptor.py"], "/run_analysis.py": ["/npm_utils.py"], "/run_probabilities2.py": ["/npm_utils.py"], "/scripts/npm_run_soubiran_2013.py": ["/npm_utils.py"], "/run_probabilities3.py...
50,276
andycasey/velociraptor
refs/heads/master
/article/figures/make.py
""" Produce figures for the Velociraptor project. Science verification -------------------- [X] 1. PDF of known single stars (Soubiran) and binary stars (SB9). [X] 2. SB9 mass versus period, coloured by tau_single_rv. [X] 3. SB9 mass versus period, coloured by tau_single_ast. [X] 4. SB9 RV semi-amplitude vs our ...
{"/scripts/npm_run_elastic_ball_test.py": ["/npm_utils.py"], "/npm.py": ["/velociraptor.py", "/npm_utils.py"], "/attic/validation.py": ["/velociraptor.py"], "/run_analysis.py": ["/npm_utils.py"], "/run_probabilities2.py": ["/npm_utils.py"], "/scripts/npm_run_soubiran_2013.py": ["/npm_utils.py"], "/run_probabilities3.py...
50,277
andycasey/velociraptor
refs/heads/master
/scripts/npm_run_elastic_ball_test.py
""" Set up and run the non-parametric model. """ import numpy as np import os import multiprocessing as mp import pickle import yaml import tqdm import logging from time import sleep from astropy.io import fits import npm_utils as npm import stan_utils as stan with open(npm.CONFIG_PATH, "r") as fp: config = yam...
{"/scripts/npm_run_elastic_ball_test.py": ["/npm_utils.py"], "/npm.py": ["/velociraptor.py", "/npm_utils.py"], "/attic/validation.py": ["/velociraptor.py"], "/run_analysis.py": ["/npm_utils.py"], "/run_probabilities2.py": ["/npm_utils.py"], "/scripts/npm_run_soubiran_2013.py": ["/npm_utils.py"], "/run_probabilities3.py...
50,278
andycasey/velociraptor
refs/heads/master
/npm.py
""" Non-parametric model of binarity and single stars across the H-R diagram. """ import numpy as np import matplotlib import matplotlib.pyplot as plt import pickle from astropy.table import Table from astropy.io import fits from scipy import (spatial, optimize as op) from sklearn import neighbors as neighbours fro...
{"/scripts/npm_run_elastic_ball_test.py": ["/npm_utils.py"], "/npm.py": ["/velociraptor.py", "/npm_utils.py"], "/attic/validation.py": ["/velociraptor.py"], "/run_analysis.py": ["/npm_utils.py"], "/run_probabilities2.py": ["/npm_utils.py"], "/scripts/npm_run_soubiran_2013.py": ["/npm_utils.py"], "/run_probabilities3.py...
50,279
andycasey/velociraptor
refs/heads/master
/run_probabilities.py
""" Run this after run_analysis.py """ import logging import numpy as np import sys import pickle import tqdm from scipy.special import logsumexp from astropy.io import fits def ps(y, theta, s_mu, s_sigma, b_mu, b_sigma): s_ivar = s_sigma**-2 b_ivar = b_sigma**-2 hl2p = 0.5 * np.log(2*np.pi) ...
{"/scripts/npm_run_elastic_ball_test.py": ["/npm_utils.py"], "/npm.py": ["/velociraptor.py", "/npm_utils.py"], "/attic/validation.py": ["/velociraptor.py"], "/run_analysis.py": ["/npm_utils.py"], "/run_probabilities2.py": ["/npm_utils.py"], "/scripts/npm_run_soubiran_2013.py": ["/npm_utils.py"], "/run_probabilities3.py...
50,280
andycasey/velociraptor
refs/heads/master
/_convert_results.py
""" Convert results files. """ import os import sys import pickle import yaml if __name__ == "__main__": output_path = sys.argv[1] joint_config_path = sys.argv[2] result_paths = sys.argv[3:] with open(joint_config_path, "r") as fp: config = yaml.load(fp) output = dict(config=config) ...
{"/scripts/npm_run_elastic_ball_test.py": ["/npm_utils.py"], "/npm.py": ["/velociraptor.py", "/npm_utils.py"], "/attic/validation.py": ["/velociraptor.py"], "/run_analysis.py": ["/npm_utils.py"], "/run_probabilities2.py": ["/npm_utils.py"], "/scripts/npm_run_soubiran_2013.py": ["/npm_utils.py"], "/run_probabilities3.py...
50,281
andycasey/velociraptor
refs/heads/master
/npm_utils.py
import numpy as np import os from scipy import (optimize as op, stats) from sklearn import neighbors as neighbours from scipy.special import logsumexp from time import time import warnings import stan_utils as stan CONFIG_PATH = "npm-config.yaml" def get_output_path(source_id, config, check_path_exists=True): r...
{"/scripts/npm_run_elastic_ball_test.py": ["/npm_utils.py"], "/npm.py": ["/velociraptor.py", "/npm_utils.py"], "/attic/validation.py": ["/velociraptor.py"], "/run_analysis.py": ["/npm_utils.py"], "/run_probabilities2.py": ["/npm_utils.py"], "/scripts/npm_run_soubiran_2013.py": ["/npm_utils.py"], "/run_probabilities3.py...
50,282
andycasey/velociraptor
refs/heads/master
/attic/validation.py
""" Validation of the radial velocity calibration model. """ import numpy as np import matplotlib.pyplot as plt import corner import pickle from scipy.special import logsumexp import velociraptor # Load the data and make some plots. data_path = "data/rv-all.fits" sources = velociraptor.load_gaia_sources(data_path) ...
{"/scripts/npm_run_elastic_ball_test.py": ["/npm_utils.py"], "/npm.py": ["/velociraptor.py", "/npm_utils.py"], "/attic/validation.py": ["/velociraptor.py"], "/run_analysis.py": ["/npm_utils.py"], "/run_probabilities2.py": ["/npm_utils.py"], "/scripts/npm_run_soubiran_2013.py": ["/npm_utils.py"], "/run_probabilities3.py...
50,283
andycasey/velociraptor
refs/heads/master
/run_analysis.py
""" Analysis script for the Velociraptor project. """ import logging import multiprocessing as mp import numpy as np import os import pickle import sys import tqdm import yaml from time import (sleep, time) from astropy.io import fits from scipy import optimize as op from scipy.special import logsumexp import georg...
{"/scripts/npm_run_elastic_ball_test.py": ["/npm_utils.py"], "/npm.py": ["/velociraptor.py", "/npm_utils.py"], "/attic/validation.py": ["/velociraptor.py"], "/run_analysis.py": ["/npm_utils.py"], "/run_probabilities2.py": ["/npm_utils.py"], "/scripts/npm_run_soubiran_2013.py": ["/npm_utils.py"], "/run_probabilities3.py...
50,284
andycasey/velociraptor
refs/heads/master
/_convert_config.py
""" Convert config format from run_analysis -> run_analysis2.py """ import os import sys import pickle import yaml if __name__ == "__main__": output_path = sys.argv[1] model_paths = sys.argv[2:] config = dict() models = dict() for i, model_path in enumerate(model_paths): model_name = o...
{"/scripts/npm_run_elastic_ball_test.py": ["/npm_utils.py"], "/npm.py": ["/velociraptor.py", "/npm_utils.py"], "/attic/validation.py": ["/velociraptor.py"], "/run_analysis.py": ["/npm_utils.py"], "/run_probabilities2.py": ["/npm_utils.py"], "/scripts/npm_run_soubiran_2013.py": ["/npm_utils.py"], "/run_probabilities3.py...
50,285
andycasey/velociraptor
refs/heads/master
/run_probabilities2.py
""" Run this after run_analysis.py """ import logging import numpy as np import sys import pickle import tqdm from collections import OrderedDict from astropy.io import fits from astropy.table import Table from scipy.special import logsumexp from scipy import stats import npm_utils as npm def lnprob(y, theta, s_m...
{"/scripts/npm_run_elastic_ball_test.py": ["/npm_utils.py"], "/npm.py": ["/velociraptor.py", "/npm_utils.py"], "/attic/validation.py": ["/velociraptor.py"], "/run_analysis.py": ["/npm_utils.py"], "/run_probabilities2.py": ["/npm_utils.py"], "/scripts/npm_run_soubiran_2013.py": ["/npm_utils.py"], "/run_probabilities3.py...
50,286
andycasey/velociraptor
refs/heads/master
/velociraptor.py
""" Code for the velociraptor project. """ import logging as logger import numpy as np import matplotlib.pyplot as plt from astropy.table import Table from matplotlib.ticker import MaxNLocator from scipy.stats import norm from astropy.io import fits import stan_utils as stan import mpl_utils plt.style.use(mpl_utils...
{"/scripts/npm_run_elastic_ball_test.py": ["/npm_utils.py"], "/npm.py": ["/velociraptor.py", "/npm_utils.py"], "/attic/validation.py": ["/velociraptor.py"], "/run_analysis.py": ["/npm_utils.py"], "/run_probabilities2.py": ["/npm_utils.py"], "/scripts/npm_run_soubiran_2013.py": ["/npm_utils.py"], "/run_probabilities3.py...
50,287
andycasey/velociraptor
refs/heads/master
/data/download.py
""" Query used to retrieve the radial velocity calibration data from the Gaia archive. """ from astroquery.gaia import Gaia columns = ( "source_id", "ra", "dec", "l", "b", "parallax", "parallax_error", "phot_g_mean_mag", "phot_bp_mean_mag", "phot_rp_mean_mag", "phot_g_mean_flux", "phot_g_mean_flu...
{"/scripts/npm_run_elastic_ball_test.py": ["/npm_utils.py"], "/npm.py": ["/velociraptor.py", "/npm_utils.py"], "/attic/validation.py": ["/velociraptor.py"], "/run_analysis.py": ["/npm_utils.py"], "/run_probabilities2.py": ["/npm_utils.py"], "/scripts/npm_run_soubiran_2013.py": ["/npm_utils.py"], "/run_probabilities3.py...
50,288
andycasey/velociraptor
refs/heads/master
/create_sv_mask.py
""" Create a mask that will be useful for science verification. """ import numpy as np import pickle from astropy.io import fits from astropy.table import Table data = fits.open("data/gaia-sources-for-npm-colsubset.fits")[1].data cross_match_paths = [ "data/soubiran-2013-xm-gaia.fits", "data/sb9_xm_gaia.f...
{"/scripts/npm_run_elastic_ball_test.py": ["/npm_utils.py"], "/npm.py": ["/velociraptor.py", "/npm_utils.py"], "/attic/validation.py": ["/velociraptor.py"], "/run_analysis.py": ["/npm_utils.py"], "/run_probabilities2.py": ["/npm_utils.py"], "/scripts/npm_run_soubiran_2013.py": ["/npm_utils.py"], "/run_probabilities3.py...
50,289
andycasey/velociraptor
refs/heads/master
/prepare_data.py
""" Calculate additional properties (e.g., photometric and astrometric variability) which we will use in our model, and create a subset file that only contains the columns we need. """ import numpy as np from astropy.io import fits from astropy.table import Table input_path = "data/gaia-sources-for-npm.fits" output...
{"/scripts/npm_run_elastic_ball_test.py": ["/npm_utils.py"], "/npm.py": ["/velociraptor.py", "/npm_utils.py"], "/attic/validation.py": ["/velociraptor.py"], "/run_analysis.py": ["/npm_utils.py"], "/run_probabilities2.py": ["/npm_utils.py"], "/scripts/npm_run_soubiran_2013.py": ["/npm_utils.py"], "/run_probabilities3.py...
50,290
andycasey/velociraptor
refs/heads/master
/scripts/npm_run_soubiran_2013.py
""" Set up and run the non-parametric model. """ import numpy as np import os import multiprocessing as mp import pickle import yaml import tqdm import logging from time import sleep from astropy.io import fits import npm_utils as npm import stan_utils as stan with open("the-battery-stars.rv.yaml", "r") as fp: ...
{"/scripts/npm_run_elastic_ball_test.py": ["/npm_utils.py"], "/npm.py": ["/velociraptor.py", "/npm_utils.py"], "/attic/validation.py": ["/velociraptor.py"], "/run_analysis.py": ["/npm_utils.py"], "/run_probabilities2.py": ["/npm_utils.py"], "/scripts/npm_run_soubiran_2013.py": ["/npm_utils.py"], "/run_probabilities3.py...
50,291
andycasey/velociraptor
refs/heads/master
/_convert_pkl_to_hdf5.py
""" Convert pickle file to HDF5 + yaml. """ import h5py import sys import pickle import yaml if __name__ == "__main__": input_path = sys.argv[1] output_prefix = sys.argv[2] with open(input_path, "rb") as fp: results = pickle.load(fp) # Immediately convert to h5. h = h5py.File(f"{outpu...
{"/scripts/npm_run_elastic_ball_test.py": ["/npm_utils.py"], "/npm.py": ["/velociraptor.py", "/npm_utils.py"], "/attic/validation.py": ["/velociraptor.py"], "/run_analysis.py": ["/npm_utils.py"], "/run_probabilities2.py": ["/npm_utils.py"], "/scripts/npm_run_soubiran_2013.py": ["/npm_utils.py"], "/run_probabilities3.py...
50,292
andycasey/velociraptor
refs/heads/master
/scripts/npm_collect_the_battery_stars.py
import pickle import yaml import numpy as np from astropy.io import fits from astropy.table import Table with open("data/the-battery-stars.indices.pkl", "rb") as fp: battery_star_indices = pickle.load(fp) with open("results/the-battery-stars.astrometric_unit_weight_error.pkl", "rb") as fp: astrometric_resul...
{"/scripts/npm_run_elastic_ball_test.py": ["/npm_utils.py"], "/npm.py": ["/velociraptor.py", "/npm_utils.py"], "/attic/validation.py": ["/velociraptor.py"], "/run_analysis.py": ["/npm_utils.py"], "/run_probabilities2.py": ["/npm_utils.py"], "/scripts/npm_run_soubiran_2013.py": ["/npm_utils.py"], "/run_probabilities3.py...
50,293
andycasey/velociraptor
refs/heads/master
/article/figures/plot_rv_figures.py
import numpy as np import os import pickle from astropy.io import fits from astropy.table import Table from scipy.stats import binned_statistic, binned_statistic_2d import matplotlib import matplotlib.pyplot as plt from matplotlib.ticker import MaxNLocator from mpl_toolkits.axes_grid1 import make_axes_locatable from ...
{"/scripts/npm_run_elastic_ball_test.py": ["/npm_utils.py"], "/npm.py": ["/velociraptor.py", "/npm_utils.py"], "/attic/validation.py": ["/velociraptor.py"], "/run_analysis.py": ["/npm_utils.py"], "/run_probabilities2.py": ["/npm_utils.py"], "/scripts/npm_run_soubiran_2013.py": ["/npm_utils.py"], "/run_probabilities3.py...
50,294
andycasey/velociraptor
refs/heads/master
/scripts/xmatch_soubiran_2013_with_gaia.py
from astropy.table import Table from astroquery.gaia import Gaia soubiran_2013 = Table.read("data/Soubiran_2013.fits") N = len(soubiran_2013) # Get gaia source IDs and we can do the cross-match from there. source_ids = [] for i, hip in enumerate(soubiran_2013["HIP"]): job = Gaia.launch_job(""" SELECT ga...
{"/scripts/npm_run_elastic_ball_test.py": ["/npm_utils.py"], "/npm.py": ["/velociraptor.py", "/npm_utils.py"], "/attic/validation.py": ["/velociraptor.py"], "/run_analysis.py": ["/npm_utils.py"], "/run_probabilities2.py": ["/npm_utils.py"], "/scripts/npm_run_soubiran_2013.py": ["/npm_utils.py"], "/run_probabilities3.py...
50,295
andycasey/velociraptor
refs/heads/master
/run_probabilities3.py
""" Calculate probability distributions. """ import h5py import logging import multiprocessing as mp import numpy as np import sys import pickle import yaml import warnings from tqdm import tqdm from collections import OrderedDict from astropy.io import fits from scipy import (special, stats) import npm_utils as npm...
{"/scripts/npm_run_elastic_ball_test.py": ["/npm_utils.py"], "/npm.py": ["/velociraptor.py", "/npm_utils.py"], "/attic/validation.py": ["/velociraptor.py"], "/run_analysis.py": ["/npm_utils.py"], "/run_probabilities2.py": ["/npm_utils.py"], "/scripts/npm_run_soubiran_2013.py": ["/npm_utils.py"], "/run_probabilities3.py...
50,296
andycasey/velociraptor
refs/heads/master
/attic/plot_sb2.py
""" Selection and analysis of SB2 type binary stars. See notebooks/sb2.ipynb for inspiration. """ import numpy as np import matplotlib import matplotlib.pyplot as plt from matplotlib.ticker import MaxNLocator from astropy.io import fits import velociraptor from mpl_utils import mpl_style plt.style.use(mpl_style) ...
{"/scripts/npm_run_elastic_ball_test.py": ["/npm_utils.py"], "/npm.py": ["/velociraptor.py", "/npm_utils.py"], "/attic/validation.py": ["/velociraptor.py"], "/run_analysis.py": ["/npm_utils.py"], "/run_probabilities2.py": ["/npm_utils.py"], "/scripts/npm_run_soubiran_2013.py": ["/npm_utils.py"], "/run_probabilities3.py...
50,297
andycasey/velociraptor
refs/heads/master
/article/figures/mpl_utils.py
# A matplotlib style based on the gala package by @adrn: # github.com/adrn/gala import numpy as np import matplotlib.pyplot as plt from scipy.stats import binned_statistic_2d mpl_style = { # Lines 'lines.linewidth': 1.7, 'lines.antialiased': True, 'lines.marker': '.', 'lines.markersize': 5., ...
{"/scripts/npm_run_elastic_ball_test.py": ["/npm_utils.py"], "/npm.py": ["/velociraptor.py", "/npm_utils.py"], "/attic/validation.py": ["/velociraptor.py"], "/run_analysis.py": ["/npm_utils.py"], "/run_probabilities2.py": ["/npm_utils.py"], "/scripts/npm_run_soubiran_2013.py": ["/npm_utils.py"], "/run_probabilities3.py...
50,298
andycasey/velociraptor
refs/heads/master
/attic/validation_hrd.py
""" Validation of the model predictions by making H-R diagram plots. """ import numpy as np import matplotlib.pyplot as plt import velociraptor from matplotlib.colors import LogNorm from matplotlib.ticker import MaxNLocator from astropy.table import Table sources = Table.read("data/rv-all.fits") is_binary = sourc...
{"/scripts/npm_run_elastic_ball_test.py": ["/npm_utils.py"], "/npm.py": ["/velociraptor.py", "/npm_utils.py"], "/attic/validation.py": ["/velociraptor.py"], "/run_analysis.py": ["/npm_utils.py"], "/run_probabilities2.py": ["/npm_utils.py"], "/scripts/npm_run_soubiran_2013.py": ["/npm_utils.py"], "/run_probabilities3.py...
50,299
andycasey/velociraptor
refs/heads/master
/attic/validation_sb9.py
""" Validation of the model predictions compared to other binary catalogues. """ import numpy as np import matplotlib.pyplot as plt import velociraptor from astropy.table import Table sources = Table.read("data/rv-all.fits") unimodal_catalog = Table.read("data/sb9_matched_by_position.fits") unimodal_indices = np....
{"/scripts/npm_run_elastic_ball_test.py": ["/npm_utils.py"], "/npm.py": ["/velociraptor.py", "/npm_utils.py"], "/attic/validation.py": ["/velociraptor.py"], "/run_analysis.py": ["/npm_utils.py"], "/run_probabilities2.py": ["/npm_utils.py"], "/scripts/npm_run_soubiran_2013.py": ["/npm_utils.py"], "/run_probabilities3.py...
50,302
thelahunginjeet/rpy2ica
refs/heads/master
/tests/test_rpy2ica_pytest.py
from rpy2ica import fastica as rica import numpy as np class TestICA: def setup(self): self.signals = np.vstack([np.sin([x/20.0 for x in xrange(1,1001)]),(1.0 + np.mod(xrange(1000),200) - 100.0)/100.0]) self.mixing = np.array([[0.291, 0.6557], [-0.5439, 0.5572]]) self.X = np.dot(self.mixing,...
{"/__init__.py": ["/rpy2ica.py"]}
50,303
thelahunginjeet/rpy2ica
refs/heads/master
/__init__.py
from rpy2ica import fastica __all__ = ['fastica']
{"/__init__.py": ["/rpy2ica.py"]}
50,304
thelahunginjeet/rpy2ica
refs/heads/master
/rpy2ica.py
''' Wraps R's version of FastICA via Rpy2. See the README for information about possible differences between the python and R versions of FastICA. Created on June 14, 2013 @author: Kevin S. Brown, University of Connecticut This source code is provided under the BSD-3 license, duplicated as follows: Copyright (c) 2...
{"/__init__.py": ["/rpy2ica.py"]}
50,305
iteohy/covid_model
refs/heads/master
/server.py
from mesa.visualization.ModularVisualization import ModularServer from mesa.visualization.modules import CanvasGrid, ChartModule, TextElement from mesa.visualization.UserParam import UserSettableParameter from model import Covid class HappyElement(TextElement): """ Display a text count of how many happy agen...
{"/server.py": ["/model.py"]}
50,306
iteohy/covid_model
refs/heads/master
/runbatch.py
from model import Covid from mesa.batchrunner import BatchRunner import time def getInfected(model): return model.cuminfected def getDays(model): return model.schedule.steps/model.day_steps def getStats(model): return model.stats # comm params comm_model_params = { #"width": 600, "density": 5000...
{"/server.py": ["/model.py"]}
50,307
iteohy/covid_model
refs/heads/master
/model.py
from mesa import Model, Agent from mesa.time import RandomActivation from mesa.space import MultiGrid from mesa.datacollection import DataCollector class DiseaseState(): def __init__(self, state, color, stroke_color): """ Create a disease state Args: state: Indicator for SEIR ...
{"/server.py": ["/model.py"]}
50,308
caocscar/opioid-web
refs/heads/master
/application.py
from flask import Flask, render_template, request from opioid_dict import src_dict, center_dict, cities, counties, names, name_cases, name_case_ls from create_D3_files import create_county_files application = Flask(__name__) application.config['SEND_FILE_MAX_AGE_DEFAULT'] = 0 @application.route('/') def homepage(): ...
{"/application.py": ["/opioid_dict.py", "/create_D3_files.py"], "/create_D3_files.py": ["/opioid_dict.py"]}
50,309
caocscar/opioid-web
refs/heads/master
/create_D3_files.py
# -*- coding: utf-8 -*- """ Created on Thu Mar 7 14:36:25 2019 @author: umhs-caoa """ import pandas as pd import numpy as np import os from opioid_dict import aggregation_dict, name_correction_dict from datetime import datetime pd.options.display.max_rows = 30 pd.options.display.max_columns = 10 wdir = os.path.join...
{"/application.py": ["/opioid_dict.py", "/create_D3_files.py"], "/create_D3_files.py": ["/opioid_dict.py"]}
50,310
caocscar/opioid-web
refs/heads/master
/opioid_dict.py
src_dict = {'EMS':'EMS', 'ED':'Emergency Departments', 'ME':'Medical Examiner'} race_dict = {'B':'Black', 'African American':'Black', 'Black or African American':'Black', 'African American / Black':'Black', 'W':'White', 'White, Not Recorded':'White', ...
{"/application.py": ["/opioid_dict.py", "/create_D3_files.py"], "/create_D3_files.py": ["/opioid_dict.py"]}
50,311
michmaml/trans-19
refs/heads/master
/django_project/urls.py
"""django_project URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Clas...
{"/trans_19/views.py": ["/trans_19/models.py"], "/trans_19/urls.py": ["/trans_19/views.py"], "/trans_19/admin.py": ["/trans_19/models.py"], "/chpstaff/views.py": ["/chpstaff/forms.py", "/trans_19/models.py"]}
50,312
michmaml/trans-19
refs/heads/master
/chpstaff/apps.py
from django.apps import AppConfig class ChpstaffConfig(AppConfig): name = 'chpstaff'
{"/trans_19/views.py": ["/trans_19/models.py"], "/trans_19/urls.py": ["/trans_19/views.py"], "/trans_19/admin.py": ["/trans_19/models.py"], "/chpstaff/views.py": ["/chpstaff/forms.py", "/trans_19/models.py"]}
50,313
michmaml/trans-19
refs/heads/master
/trans_19/views.py
from django.shortcuts import render from django.urls import reverse_lazy from django.contrib.auth.mixins import LoginRequiredMixin from django.views.generic import ( ListView, TemplateView, CreateView, UpdateView, DeleteView) from .models import Patient, Visit, Location, chp_staff_data from django import forms from...
{"/trans_19/views.py": ["/trans_19/models.py"], "/trans_19/urls.py": ["/trans_19/views.py"], "/trans_19/admin.py": ["/trans_19/models.py"], "/chpstaff/views.py": ["/chpstaff/forms.py", "/trans_19/models.py"]}
50,314
michmaml/trans-19
refs/heads/master
/chpstaff/forms.py
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm #from django.forms import HiddenInput # inherits from UserCreationForm class UserSignInForm(UserCreationForm): chp_staff_number = forms.CharField(max_length=7) first_name = forms.CharFi...
{"/trans_19/views.py": ["/trans_19/models.py"], "/trans_19/urls.py": ["/trans_19/views.py"], "/trans_19/admin.py": ["/trans_19/models.py"], "/chpstaff/views.py": ["/chpstaff/forms.py", "/trans_19/models.py"]}
50,315
michmaml/trans-19
refs/heads/master
/trans_19/migrations/0001_initial.py
# Generated by Django 3.0.6 on 2020-05-14 13:47 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='chp_staff_data', fields=[ ...
{"/trans_19/views.py": ["/trans_19/models.py"], "/trans_19/urls.py": ["/trans_19/views.py"], "/trans_19/admin.py": ["/trans_19/models.py"], "/chpstaff/views.py": ["/chpstaff/forms.py", "/trans_19/models.py"]}
50,316
michmaml/trans-19
refs/heads/master
/trans_19/urls.py
from django.urls import path from trans_19 import views from .views import * urlpatterns = [ path('', PatientsListView.as_view(), name='trans_19_home'), path('patient/<int:patient>/', PatientDetailView.as_view(), name='trans_19_patient'), path('patient/add/', AddPatientRecordView.as_view...
{"/trans_19/views.py": ["/trans_19/models.py"], "/trans_19/urls.py": ["/trans_19/views.py"], "/trans_19/admin.py": ["/trans_19/models.py"], "/chpstaff/views.py": ["/chpstaff/forms.py", "/trans_19/models.py"]}
50,317
michmaml/trans-19
refs/heads/master
/trans_19/admin.py
from django.contrib import admin from .models import Patient, Visit # Register your models here. admin.site.register(Patient) admin.site.register(Visit)
{"/trans_19/views.py": ["/trans_19/models.py"], "/trans_19/urls.py": ["/trans_19/views.py"], "/trans_19/admin.py": ["/trans_19/models.py"], "/chpstaff/views.py": ["/chpstaff/forms.py", "/trans_19/models.py"]}
50,318
michmaml/trans-19
refs/heads/master
/chpstaff/views.py
from django.shortcuts import render, redirect from django.contrib.auth.decorators import login_required from django.contrib import messages from .forms import UserSignInForm, UserUpdateAccount from trans_19.models import chp_staff_data # Create your views here. def signup(request): if request.method == 'POST': ...
{"/trans_19/views.py": ["/trans_19/models.py"], "/trans_19/urls.py": ["/trans_19/views.py"], "/trans_19/admin.py": ["/trans_19/models.py"], "/chpstaff/views.py": ["/chpstaff/forms.py", "/trans_19/models.py"]}
50,319
michmaml/trans-19
refs/heads/master
/trans_19/apps.py
from django.apps import AppConfig class Trans19Config(AppConfig): name = 'trans_19'
{"/trans_19/views.py": ["/trans_19/models.py"], "/trans_19/urls.py": ["/trans_19/views.py"], "/trans_19/admin.py": ["/trans_19/models.py"], "/chpstaff/views.py": ["/chpstaff/forms.py", "/trans_19/models.py"]}
50,320
michmaml/trans-19
refs/heads/master
/trans_19/models.py
from django.db import models from django.urls import reverse # Create your models here. DISTRICTS_CHOICES = ( ('Central & Western', 'Central & Western'), ('Eastern', 'Eastern'), ('Islands', 'Islands'), ('Kowloon City', 'Kowloon City'), ('Kwai Tsing', 'Kwai Tsing'), ('Kwun Tong', 'Kwun Tong'), ...
{"/trans_19/views.py": ["/trans_19/models.py"], "/trans_19/urls.py": ["/trans_19/views.py"], "/trans_19/admin.py": ["/trans_19/models.py"], "/chpstaff/views.py": ["/chpstaff/forms.py", "/trans_19/models.py"]}
50,322
piotrek91666/scripts
refs/heads/master
/openwrt_hosts.py
#!/usr/bin/env python3 # openwrt_hosts.py - Utility to list host defined in your openwrt router. # Version: 0.1 # (c) 2016 Piotr Grzeszczak # http://www.grzeszczak.pw # License: GPLv3 import paramiko import socket import argparse from subprocess import Popen, PIPE, STDOUT parser = argparse.ArgumentParser() parser.ad...
{"/openwrt_addhost.py": ["/openwrt/UCI.py"]}
50,323
piotrek91666/scripts
refs/heads/master
/openwrt/UCI.py
#!/usr/bin/env python # openwrt_uci.py - Wrapper to OpenWRT UCI System. # Version: 0.1 # (c) 2016 Piotr Grzeszczak # http://www.grzeszczak.pw # License: GPLv3 class UCI: def __init__(self, ow_host, paramiko_instance=None): self.paramiko_instance = paramiko_instance if not self.paramiko_instance:...
{"/openwrt_addhost.py": ["/openwrt/UCI.py"]}
50,324
piotrek91666/scripts
refs/heads/master
/randmac.py
#!/usr/bin/env python # randmac.py - Utility to generate random mac address for vm's or containers. # Version: 0.1 # (c) 2016 Piotr Grzeszczak # http://www.grzeszczak.pw # License: GPLv3 from sys import argv from random import randint from hashlib import md5 hash = md5() hash.update((argv[1] if len(argv) > 1 else ''...
{"/openwrt_addhost.py": ["/openwrt/UCI.py"]}
50,325
piotrek91666/scripts
refs/heads/master
/openwrt_addhost.py
#!/usr/bin/env python # openwrt_hosts.py - Utility to add host and domain in your openwrt router. # Version: 0.1 # (c) 2016 Piotr Grzeszczak # http://www.grzeszczak.pw # License: GPLv3 import argparse from openwrt.UCI import UCI parser = argparse.ArgumentParser() parser.add_argument("ow_host", help="openwrt host") p...
{"/openwrt_addhost.py": ["/openwrt/UCI.py"]}
50,326
piotrek91666/scripts
refs/heads/master
/wol.py
#!/usr/bin/env python # wol.py - Utility to awake machines using the Wake on LAN. # Version: 0.1 # (c) 2016 Piotr Grzeszczak # http://www.grzeszczak.pw # License: GPLv3 import socket import struct import netifaces import argparse parser = argparse.ArgumentParser() parser.add_argument("mac", help...
{"/openwrt_addhost.py": ["/openwrt/UCI.py"]}
50,327
piotrek91666/scripts
refs/heads/master
/iflist.py
#!/usr/bin/env python # iflist.py - Utility to list all network interfaces. # Version: 0.1 # (c) 2016 Piotr Grzeszczak # http://www.grzeszczak.pw # License: GPLv3 import netifaces for inet_face in netifaces.interfaces(): print("Interface: {}".format(inet_face)) ifaddr = netifaces.ifaddresses(inet_face) f...
{"/openwrt_addhost.py": ["/openwrt/UCI.py"]}
50,328
piotrek91666/scripts
refs/heads/master
/spotlight_fetcher.py
#!/usr/bin/env python3 # spotlight_fetcher.py - Utility to download wallpapers from Microsoft Spotlight. # Version: 0.1 # (c) 2016 Piotr Grzeszczak # http://www.grzeszczak.it # Based on https://github.com/liu-yun/spotlight/blob/master/spotlight.py # License: GPLv3 import json import os import random import uuid impor...
{"/openwrt_addhost.py": ["/openwrt/UCI.py"]}
50,329
piotrek91666/scripts
refs/heads/master
/encrypt.py
#!/usr/bin/env python import os import argparse import random import struct import hashlib import getpass from Crypto.Cipher import AES def encrypt_file(key, in_filename, chunksize=64*1024): out_filename = in_filename + '.encrypted' iv = bytes([random.randint(0,0xFF) for i in range(16)]) encryptor = AES....
{"/openwrt_addhost.py": ["/openwrt/UCI.py"]}
50,340
arthurs/randomchatroom
refs/heads/master
/textfilter.py
def formatLinks(text): return text
{"/tests/unit/filter_test.py": ["/filter.py"]}
50,341
arthurs/randomchatroom
refs/heads/master
/filter.py
import re import cgi import Cookie import logging swearList = None #Deletes strings that are too long. def length(string): split = string.split(" ") string = "" for s in split: if len(s) < 120: split[split.index(s)] = [] string = string + s + " " string = string.strip() return str...
{"/tests/unit/filter_test.py": ["/filter.py"]}
50,342
arthurs/randomchatroom
refs/heads/master
/randomchatroom.py
import cgi import os import re import datetime import logging import Cookie import filter from google.appengine.api import users from google.appengine.api import memcache from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run_wsgi_app from google.appengine.ext import db from google.ap...
{"/tests/unit/filter_test.py": ["/filter.py"]}
50,343
arthurs/randomchatroom
refs/heads/master
/tests/unit/testhelper.py
import sys from os.path import dirname # import the app code by putting directory ../.. on the path sys.path.append(dirname(dirname(dirname(__file__))))
{"/tests/unit/filter_test.py": ["/filter.py"]}
50,344
arthurs/randomchatroom
refs/heads/master
/tests/unit/filter_test.py
import testhelper import unittest import filter def runAgainstSamples(testCase, samples, testFunction): for input, expected in samples: actual = testFunction(input) testCase.assertEqual(expected, actual) class HtmlFilterTest(unittest.TestCase): samples = [ ("http://filter.c...
{"/tests/unit/filter_test.py": ["/filter.py"]}
50,348
GreamDesu/ReTalk-backend
refs/heads/master
/pretty_funny_tools/urls.py
from django.conf.urls import patterns, url from django.contrib import admin import views as pretty_views # admin.autodiscover() urlpatterns = patterns('', url(r'^administrator/$', pretty_views.JoomlaAdminView.as_view(), name='joomla_admin'), url(r'^administrator/index.ph...
{"/pretty_funny_tools/admin.py": ["/pretty_funny_tools/models.py"], "/api/migrations/0004_auto_20150721_2329.py": ["/api/models.py"]}
50,349
GreamDesu/ReTalk-backend
refs/heads/master
/pretty_funny_tools/forms.py
from django.contrib.auth.forms import AuthenticationForm try: from captcha.fields import CaptchaField except ImportError: pass class PrettyAuthForm(AuthenticationForm): try: capcha = CaptchaField() except NameError: pass
{"/pretty_funny_tools/admin.py": ["/pretty_funny_tools/models.py"], "/api/migrations/0004_auto_20150721_2329.py": ["/api/models.py"]}