index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
65,026
kh06089/2019-LMSLite
refs/heads/master
/courses/migrations/0011_auto_20190403_2011.py
# Generated by Django 2.1.7 on 2019-04-03 20:11 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('courses', '0010_auto_20190403_2009'), ] operations = [ migrations.AlterField( model_name='quiz', name='file', ...
{"/courses/forms.py": ["/LMSLite/helpers.py", "/courses/models.py"], "/LMSLite/views.py": ["/courses/models.py"], "/LMSLite/helpers.py": ["/courses/models.py"], "/courses/admin.py": ["/courses/models.py", "/courses/forms.py"], "/courses/views.py": ["/LMSLite/helpers.py", "/courses/models.py", "/courses/forms.py"], "/co...
65,027
kh06089/2019-LMSLite
refs/heads/master
/courses/migrations/0009_auto_20190328_0507.py
# Generated by Django 2.1.7 on 2019-03-28 05:07 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('courses', '0008_auto_20190327_2020'), ] operations = [ migrations.AlterField( model_name='assignment', name='due_dat...
{"/courses/forms.py": ["/LMSLite/helpers.py", "/courses/models.py"], "/LMSLite/views.py": ["/courses/models.py"], "/LMSLite/helpers.py": ["/courses/models.py"], "/courses/admin.py": ["/courses/models.py", "/courses/forms.py"], "/courses/views.py": ["/LMSLite/helpers.py", "/courses/models.py", "/courses/forms.py"], "/co...
65,028
kh06089/2019-LMSLite
refs/heads/master
/courses/admin.py
from django.contrib import admin from django.contrib.auth.admin import UserAdmin from courses.models import Course, Assignment, Grade from .forms import CourseAdminCreationForm, CourseAdminChangeForm class CourseAdmin(admin.ModelAdmin): form = CourseAdminCreationForm add_form = CourseAdminChangeForm list_displa...
{"/courses/forms.py": ["/LMSLite/helpers.py", "/courses/models.py"], "/LMSLite/views.py": ["/courses/models.py"], "/LMSLite/helpers.py": ["/courses/models.py"], "/courses/admin.py": ["/courses/models.py", "/courses/forms.py"], "/courses/views.py": ["/LMSLite/helpers.py", "/courses/models.py", "/courses/forms.py"], "/co...
65,029
kh06089/2019-LMSLite
refs/heads/master
/courses/migrations/0013_auto_20190403_2114.py
# Generated by Django 2.1.7 on 2019-04-03 21:14 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('courses', '0012_auto_20190403_2015'), ] operations = [ migrations.AlterField( model_name='assignment', name='grade',...
{"/courses/forms.py": ["/LMSLite/helpers.py", "/courses/models.py"], "/LMSLite/views.py": ["/courses/models.py"], "/LMSLite/helpers.py": ["/courses/models.py"], "/courses/admin.py": ["/courses/models.py", "/courses/forms.py"], "/courses/views.py": ["/LMSLite/helpers.py", "/courses/models.py", "/courses/forms.py"], "/co...
65,030
kh06089/2019-LMSLite
refs/heads/master
/courses/migrations/0014_auto_20190403_2253.py
# Generated by Django 2.1.7 on 2019-04-03 22:53 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('courses', '0013_auto_20190403_2114'), ] operations = [ migrations.AlterField( model_name='quiz', name='file', ...
{"/courses/forms.py": ["/LMSLite/helpers.py", "/courses/models.py"], "/LMSLite/views.py": ["/courses/models.py"], "/LMSLite/helpers.py": ["/courses/models.py"], "/courses/admin.py": ["/courses/models.py", "/courses/forms.py"], "/courses/views.py": ["/LMSLite/helpers.py", "/courses/models.py", "/courses/forms.py"], "/co...
65,031
kh06089/2019-LMSLite
refs/heads/master
/accounts/migrations/0012_student_grades.py
# Generated by Django 2.1.7 on 2019-04-11 19:51 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('courses', '0015_auto_20190411_1951'), ('accounts', '0011_auto_20190404_2028'), ] operations = [ migrations.AddField( mod...
{"/courses/forms.py": ["/LMSLite/helpers.py", "/courses/models.py"], "/LMSLite/views.py": ["/courses/models.py"], "/LMSLite/helpers.py": ["/courses/models.py"], "/courses/admin.py": ["/courses/models.py", "/courses/forms.py"], "/courses/views.py": ["/LMSLite/helpers.py", "/courses/models.py", "/courses/forms.py"], "/co...
65,032
kh06089/2019-LMSLite
refs/heads/master
/courses/migrations/0023_auto_20190430_1310.py
# Generated by Django 2.1.7 on 2019-04-30 17:10 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('courses', '0022_auto_20190430_1304'), ] operations = [ migrations.AlterField( model_name='quiz', name='average', ...
{"/courses/forms.py": ["/LMSLite/helpers.py", "/courses/models.py"], "/LMSLite/views.py": ["/courses/models.py"], "/LMSLite/helpers.py": ["/courses/models.py"], "/courses/admin.py": ["/courses/models.py", "/courses/forms.py"], "/courses/views.py": ["/LMSLite/helpers.py", "/courses/models.py", "/courses/forms.py"], "/co...
65,033
kh06089/2019-LMSLite
refs/heads/master
/accounts/views.py
from django.http import HttpResponseRedirect from django.shortcuts import render, redirect from accounts.forms import ProfessorChangeForm def profile_view(request): context_dict = {} if request.user.is_authenticated: form = ProfessorChangeForm(request.POST, request.FILES, instance=request.user) context_dict[...
{"/courses/forms.py": ["/LMSLite/helpers.py", "/courses/models.py"], "/LMSLite/views.py": ["/courses/models.py"], "/LMSLite/helpers.py": ["/courses/models.py"], "/courses/admin.py": ["/courses/models.py", "/courses/forms.py"], "/courses/views.py": ["/LMSLite/helpers.py", "/courses/models.py", "/courses/forms.py"], "/co...
65,034
kh06089/2019-LMSLite
refs/heads/master
/courses/migrations/0020_auto_20190430_0043.py
# Generated by Django 2.1.7 on 2019-04-30 00:43 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('courses', '0019_auto_20190416_2229'), ] operations = [ migrations.AddField( model_name='quiz', name='quiz_code', ...
{"/courses/forms.py": ["/LMSLite/helpers.py", "/courses/models.py"], "/LMSLite/views.py": ["/courses/models.py"], "/LMSLite/helpers.py": ["/courses/models.py"], "/courses/admin.py": ["/courses/models.py", "/courses/forms.py"], "/courses/views.py": ["/LMSLite/helpers.py", "/courses/models.py", "/courses/forms.py"], "/co...
65,035
kh06089/2019-LMSLite
refs/heads/master
/accounts/migrations/0013_auto_20190416_2256.py
# Generated by Django 2.1.7 on 2019-04-16 22:56 import accounts.models from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('accounts', '0012_student_grades'), ] operations = [ migrations.AlterField( model_name='user', ...
{"/courses/forms.py": ["/LMSLite/helpers.py", "/courses/models.py"], "/LMSLite/views.py": ["/courses/models.py"], "/LMSLite/helpers.py": ["/courses/models.py"], "/courses/admin.py": ["/courses/models.py", "/courses/forms.py"], "/courses/views.py": ["/LMSLite/helpers.py", "/courses/models.py", "/courses/forms.py"], "/co...
65,036
kh06089/2019-LMSLite
refs/heads/master
/courses/views.py
import datetime from django.core.files.storage import default_storage from django.http import HttpResponse from django.shortcuts import render, redirect from tempfile import NamedTemporaryFile from django.utils.encoding import smart_str from LMSLite.helpers import grade_quiz, reset_quiz, create_quiz, update_quiz, pr...
{"/courses/forms.py": ["/LMSLite/helpers.py", "/courses/models.py"], "/LMSLite/views.py": ["/courses/models.py"], "/LMSLite/helpers.py": ["/courses/models.py"], "/courses/admin.py": ["/courses/models.py", "/courses/forms.py"], "/courses/views.py": ["/LMSLite/helpers.py", "/courses/models.py", "/courses/forms.py"], "/co...
65,037
kh06089/2019-LMSLite
refs/heads/master
/courses/migrations/0018_auto_20190416_2143.py
# Generated by Django 2.1.7 on 2019-04-16 21:43 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('courses', '0017_auto_20190416_2138'), ] operations = [ migrations.AlterField( model_name='grade...
{"/courses/forms.py": ["/LMSLite/helpers.py", "/courses/models.py"], "/LMSLite/views.py": ["/courses/models.py"], "/LMSLite/helpers.py": ["/courses/models.py"], "/courses/admin.py": ["/courses/models.py", "/courses/forms.py"], "/courses/views.py": ["/LMSLite/helpers.py", "/courses/models.py", "/courses/forms.py"], "/co...
65,038
kh06089/2019-LMSLite
refs/heads/master
/courses/migrations/0015_auto_20190411_1951.py
# Generated by Django 2.1.7 on 2019-04-11 19:51 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('courses', '0014_auto_20190403_2253'), ] operations = [ migrations.CreateModel( name='Grade', ...
{"/courses/forms.py": ["/LMSLite/helpers.py", "/courses/models.py"], "/LMSLite/views.py": ["/courses/models.py"], "/LMSLite/helpers.py": ["/courses/models.py"], "/courses/admin.py": ["/courses/models.py", "/courses/forms.py"], "/courses/views.py": ["/LMSLite/helpers.py", "/courses/models.py", "/courses/forms.py"], "/co...
65,039
kh06089/2019-LMSLite
refs/heads/master
/courses/migrations/0016_auto_20190415_1610.py
# Generated by Django 2.1.7 on 2019-04-15 16:10 import courses.models from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('accounts', '0012_student_grades'), ('courses', '0015_auto_20190411_1951'), ] operatio...
{"/courses/forms.py": ["/LMSLite/helpers.py", "/courses/models.py"], "/LMSLite/views.py": ["/courses/models.py"], "/LMSLite/helpers.py": ["/courses/models.py"], "/courses/admin.py": ["/courses/models.py", "/courses/forms.py"], "/courses/views.py": ["/LMSLite/helpers.py", "/courses/models.py", "/courses/forms.py"], "/co...
65,040
kh06089/2019-LMSLite
refs/heads/master
/accounts/migrations/0014_student_quizes.py
# Generated by Django 2.1.7 on 2019-04-23 20:23 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('courses', '0019_auto_20190416_2229'), ('accounts', '0013_auto_20190416_2256'), ] operations = [ migrations.AddField( mod...
{"/courses/forms.py": ["/LMSLite/helpers.py", "/courses/models.py"], "/LMSLite/views.py": ["/courses/models.py"], "/LMSLite/helpers.py": ["/courses/models.py"], "/courses/admin.py": ["/courses/models.py", "/courses/forms.py"], "/courses/views.py": ["/LMSLite/helpers.py", "/courses/models.py", "/courses/forms.py"], "/co...
65,041
kh06089/2019-LMSLite
refs/heads/master
/courses/migrations/0025_auto_20190430_1406.py
# Generated by Django 2.1.7 on 2019-04-30 18:06 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('courses', '0024_merge_20190430_1352'), ] operations = [ migrations.AlterField( model_name='quiz', name='quiz_code', ...
{"/courses/forms.py": ["/LMSLite/helpers.py", "/courses/models.py"], "/LMSLite/views.py": ["/courses/models.py"], "/LMSLite/helpers.py": ["/courses/models.py"], "/courses/admin.py": ["/courses/models.py", "/courses/forms.py"], "/courses/views.py": ["/LMSLite/helpers.py", "/courses/models.py", "/courses/forms.py"], "/co...
65,042
kh06089/2019-LMSLite
refs/heads/master
/courses/migrations/0017_auto_20190416_2138.py
# Generated by Django 2.1.7 on 2019-04-16 21:38 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('courses', '0016_auto_20190415_1610'), ] operations = [ migrations.AlterField( model_name='grade', name='file', ...
{"/courses/forms.py": ["/LMSLite/helpers.py", "/courses/models.py"], "/LMSLite/views.py": ["/courses/models.py"], "/LMSLite/helpers.py": ["/courses/models.py"], "/courses/admin.py": ["/courses/models.py", "/courses/forms.py"], "/courses/views.py": ["/LMSLite/helpers.py", "/courses/models.py", "/courses/forms.py"], "/co...
65,043
kh06089/2019-LMSLite
refs/heads/master
/accounts/migrations/0011_auto_20190404_2028.py
# Generated by Django 2.1.7 on 2019-04-04 20:28 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('accounts', '0010_auto_20190404_2027'), ] operations = [ migrations.AlterField( model_name='user', name='profile_phot...
{"/courses/forms.py": ["/LMSLite/helpers.py", "/courses/models.py"], "/LMSLite/views.py": ["/courses/models.py"], "/LMSLite/helpers.py": ["/courses/models.py"], "/courses/admin.py": ["/courses/models.py", "/courses/forms.py"], "/courses/views.py": ["/LMSLite/helpers.py", "/courses/models.py", "/courses/forms.py"], "/co...
65,109
dzchen314/WarandPeace-text-parser
refs/heads/master
/header_parser.py
''' Parses Tolstoy's War and Peace into header, body, and footer for processing using a state machine framework. ''' from statemachine import StateMachine import sys # Machine States def error(text): # Catch errors: unidentifiable line sys.stderr.write('Unidentifiable line:\n'+ line) def end(text): # End...
{"/header_parser.py": ["/statemachine.py"], "/book_parser.py": ["/statemachine.py"]}
65,110
dzchen314/WarandPeace-text-parser
refs/heads/master
/statemachine.py
''' Basic state machine framework for text parsing ''' class StateMachine: def __init__(self): self.handlers = [] self.startState = None self.endStates = [] def add_state(self, handler, end_state=0): # Add states to the state machine by appending a handler self.handlers...
{"/header_parser.py": ["/statemachine.py"], "/book_parser.py": ["/statemachine.py"]}
65,111
dzchen314/WarandPeace-text-parser
refs/heads/master
/book_parser.py
''' Book parser written to parse Tolstoy's War and Peace. Stores book index, book year, chapter index, paragraph index, sentence index, sentence text, word indices, and word text into a nested dictionary and serializes dictionary into JSON format. ''' from collections import defaultdict from nltk import tokenize from ...
{"/header_parser.py": ["/statemachine.py"], "/book_parser.py": ["/statemachine.py"]}
65,174
Data-Scopes/scale
refs/heads/master
/scripts/liwc.py
from collections import defaultdict import LIWCtools.LIWCtools as liwc_tools import pandas as pd class LIWC(object): def __init__(self, dict_filename: str): self.LD = liwc_tools.LDict(dict_filename, encoding='utf-8') self.liwc_cat = {} self.in_cat = defaultdict(lambda: defaultdict(bool)) ...
{"/scripts/text_tail_analysis.py": ["/scripts/liwc.py"]}
65,175
Data-Scopes/scale
refs/heads/master
/scripts/pmi.py
from typing import Iterable, List, Union from collections import Counter, OrderedDict from itertools import combinations import math def count_tokens(token_sets: List[List[str]]) -> Counter: """Count items in set of item sets.""" token_freq = Counter() for token_set in token_sets: token_freq.updat...
{"/scripts/text_tail_analysis.py": ["/scripts/liwc.py"]}
65,176
Data-Scopes/scale
refs/heads/master
/scripts/helper.py
from typing import Iterator, Iterable, Tuple, Sized, Union from elasticsearch import Elasticsearch from collections import OrderedDict import math import numpy as np import gzip import json import csv def read_json(data_file: str) -> Iterator: """read_json reads the content of a JSON-line format file, which has a...
{"/scripts/text_tail_analysis.py": ["/scripts/liwc.py"]}
65,177
Data-Scopes/scale
refs/heads/master
/scripts/text_tail_analysis.py
from typing import Dict, Iterable, Iterator, List, Set, Union from collections import Counter, defaultdict from spacy.tokens import Doc, DocBin, Span, Token from pandas import DataFrame import math import time from scripts.liwc import LIWC def get_dataframe_review_texts(df: DataFrame) -> Iterator[str]: """return...
{"/scripts/text_tail_analysis.py": ["/scripts/liwc.py"]}
65,199
IshMSahni/Photo-editor
refs/heads/master
/filters.py
""" SYSC 1005 Fall 2018 Filters for Lab 7. All of these filters were presented during lectures. """ from Cimpl import * from random import randint def grayscale(image): """ (Cimpl.Image) -> Cimpl.Image Return a grayscale copy of image. >>> image = load_image(choose_file()) >>> gray_image = g...
{"/photo_editor.py": ["/filters.py"]}
65,200
IshMSahni/Photo-editor
refs/heads/master
/photo_editor.py
# SYSC 1005 A Fall 2018 Lab 7 import sys # get_image calls exit from Cimpl import * from filters import * def get_image(): """ Interactively select an image file and return a Cimpl Image object containing the image loaded from the file. """ # Pop up a dialogue box to select a file file = ch...
{"/photo_editor.py": ["/filters.py"]}
65,216
MichelleLochner/astronomaly
refs/heads/main
/astronomaly/feature_extraction/wavelet_features.py
import pywt import numpy as np from astronomaly.base.base_pipeline import PipelineStage def flatten_swt2_coefficients(wavelet_coeffs): """ A standardised way of flattening the swt2d coefficients They are stored as n_levels -> (cA, (cH, cV, cD)) where each of the sets of coeffcients has a list of [npi...
{"/astronomaly/feature_extraction/wavelet_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/feature_extraction/shape_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/lof.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/human_loop_learnin...
65,217
MichelleLochner/astronomaly
refs/heads/main
/astronomaly/feature_extraction/shape_features.py
import numpy as np import cv2 from astronomaly.base.base_pipeline import PipelineStage from astronomaly.base import logging_tools def find_contours(img, threshold): """ Finds the contours of an image that meet a threshold Parameters ---------- img : np.ndarray Input image (must be greysca...
{"/astronomaly/feature_extraction/wavelet_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/feature_extraction/shape_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/lof.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/human_loop_learnin...
65,218
MichelleLochner/astronomaly
refs/heads/main
/astronomaly/scripts/goods_example.py
# Example of astronomaly applied to a fits image from astronomaly.data_management import image_reader from astronomaly.preprocessing import image_preprocessing from astronomaly.feature_extraction import power_spectrum from astronomaly.feature_extraction import shape_features from astronomaly.dimensionality_reduction im...
{"/astronomaly/feature_extraction/wavelet_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/feature_extraction/shape_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/lof.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/human_loop_learnin...
65,219
MichelleLochner/astronomaly
refs/heads/main
/astronomaly/anomaly_detection/lof.py
from astronomaly.base.base_pipeline import PipelineStage from sklearn.neighbors import LocalOutlierFactor import pandas as pd import pickle from os import path class LOF_Algorithm(PipelineStage): def __init__(self, contamination='auto', n_neighbors=20, **kwargs): """ Runs sklearn's local outlier f...
{"/astronomaly/feature_extraction/wavelet_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/feature_extraction/shape_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/lof.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/human_loop_learnin...
65,220
MichelleLochner/astronomaly
refs/heads/main
/astronomaly/anomaly_detection/human_loop_learning.py
from astronomaly.base.base_pipeline import PipelineStage from astronomaly.base import logging_tools from sklearn.ensemble import RandomForestRegressor import numpy as np import pandas as pd from scipy.spatial import cKDTree class ScoreConverter(PipelineStage): def __init__(self, lower_is_weirder=True, new_min=0, ...
{"/astronomaly/feature_extraction/wavelet_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/feature_extraction/shape_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/lof.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/human_loop_learnin...
65,221
MichelleLochner/astronomaly
refs/heads/main
/astronomaly/visualisation/umap_plot.py
import umap import numpy as np import pandas as pd from astronomaly.base.base_pipeline import PipelineStage from astronomaly.base import logging_tools class UMAP_Plot(PipelineStage): # https://umap-learn.readthedocs.io/en/latest/api.html def __init__(self, min_dist=0.1, n_neighbors=15, max_samples=2000, ...
{"/astronomaly/feature_extraction/wavelet_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/feature_extraction/shape_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/lof.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/human_loop_learnin...
65,222
MichelleLochner/astronomaly
refs/heads/main
/astronomaly/feature_extraction/flatten_features.py
from astronomaly.base.base_pipeline import PipelineStage import numpy as np class Flatten_Features(PipelineStage): def __init__(self, **kwargs): """ A very simple feature extraction that ravels an input image to reduce it to a 1d vector. This can be useful for simple test datasets like ...
{"/astronomaly/feature_extraction/wavelet_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/feature_extraction/shape_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/lof.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/human_loop_learnin...
65,223
MichelleLochner/astronomaly
refs/heads/main
/astronomaly/feature_extraction/autoencoder.py
import numpy as np import os from astronomaly.base.base_pipeline import PipelineStage try: from keras.models import load_model from keras.layers import Input, Conv2D, MaxPooling2D, UpSampling2D from keras.models import Model except ImportError: print("Failed to import Keras. Deep learning will be unava...
{"/astronomaly/feature_extraction/wavelet_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/feature_extraction/shape_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/lof.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/human_loop_learnin...
65,224
MichelleLochner/astronomaly
refs/heads/main
/astronomaly/data_management/raw_features.py
from astronomaly.base.base_dataset import Dataset import numpy as np import pandas as pd class RawFeatures(Dataset): def __init__(self, **kwargs): """ A Dataset class for simply reading in a set of data to be directly used as features. Parameters ---------- filenam...
{"/astronomaly/feature_extraction/wavelet_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/feature_extraction/shape_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/lof.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/human_loop_learnin...
65,225
MichelleLochner/astronomaly
refs/heads/main
/astronomaly/dimensionality_reduction/pca.py
from astronomaly.base.base_pipeline import PipelineStage import numpy as np import pandas as pd from os import path class PCA_Decomposer(PipelineStage): def __init__(self, n_components=0, threshold=0, **kwargs): """ Dimensionality reduction with principle component analysis (PCA). Wraps t...
{"/astronomaly/feature_extraction/wavelet_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/feature_extraction/shape_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/lof.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/human_loop_learnin...
65,226
MichelleLochner/astronomaly
refs/heads/main
/astronomaly/dimensionality_reduction/truncated_svd.py
from astronomaly.base.base_pipeline import PipelineStage import numpy as np import pandas as pd from os import path class Truncated_SVD_Decomposer(PipelineStage): def __init__(self, n_components=0, **kwargs): """ Perform a truncated SVD decomposition. This is very useful for extremely hig...
{"/astronomaly/feature_extraction/wavelet_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/feature_extraction/shape_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/lof.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/human_loop_learnin...
65,227
MichelleLochner/astronomaly
refs/heads/main
/astronomaly/feature_extraction/power_spectrum.py
import numpy as np from scipy import ndimage from astronomaly.base.base_pipeline import PipelineStage def psd_2d(img, nbins): """ Computes the power spectral density for an input image. Translation and rotation invariate features. Parameters ---------- img : np.ndarray Input image ...
{"/astronomaly/feature_extraction/wavelet_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/feature_extraction/shape_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/lof.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/human_loop_learnin...
65,228
MichelleLochner/astronomaly
refs/heads/main
/astronomaly/data_management/light_curve_reader.py
import pandas as pd import numpy as np from astronomaly.base.base_dataset import Dataset import os # ignores the false positve pandas warning # for the following kind of code # df['key'] == item, for an existing key in a df pd.options.mode.chained_assignment = None def split_lc(lc_data, max_gap): """ Splits ...
{"/astronomaly/feature_extraction/wavelet_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/feature_extraction/shape_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/lof.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/human_loop_learnin...
65,229
MichelleLochner/astronomaly
refs/heads/main
/astronomaly/visualisation/tsne_plot.py
from sklearn.manifold import TSNE import numpy as np import pandas as pd from astronomaly.base.base_pipeline import PipelineStage class TSNE_Plot(PipelineStage): def __init__(self, perplexity=30, max_samples=2000, shuffle=False, **kwargs): """ Computes a t-SNE 2d visualisation of...
{"/astronomaly/feature_extraction/wavelet_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/feature_extraction/shape_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/lof.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/human_loop_learnin...
65,230
MichelleLochner/astronomaly
refs/heads/main
/astronomaly/scripts/CRTS_example.py
# An example for the CRTS data from astronomaly.data_management import light_curve_reader from astronomaly.feature_extraction import feets_features from astronomaly.postprocessing import scaling from astronomaly.anomaly_detection import isolation_forest, human_loop_learning from astronomaly.visualisation import tsne_pl...
{"/astronomaly/feature_extraction/wavelet_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/feature_extraction/shape_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/lof.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/human_loop_learnin...
65,231
MichelleLochner/astronomaly
refs/heads/main
/astronomaly/feature_extraction/photutils_features.py
from astronomaly.base.base_pipeline import PipelineStage import numpy as np from photutils import morphology class PhotutilsFeatures(PipelineStage): def __init__(self, columns, **kwargs): """ Uses the photutils package to extract requested properties from the image. The list of available p...
{"/astronomaly/feature_extraction/wavelet_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/feature_extraction/shape_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/lof.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/human_loop_learnin...
65,232
MichelleLochner/astronomaly
refs/heads/main
/astronomaly/feature_extraction/flux_histogram.py
import numpy as np from astronomaly.base.base_pipeline import PipelineStage from astronomaly.preprocessing.image_preprocessing import image_transform_scale def calculate_flux_histogram(img, nbins, norm=True): """ Histograms the flux values of the pixels into a given number of bins. Parameters ------...
{"/astronomaly/feature_extraction/wavelet_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/feature_extraction/shape_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/lof.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/human_loop_learnin...
65,233
MichelleLochner/astronomaly
refs/heads/main
/astronomaly/base/base_pipeline.py
from astronomaly.base import logging_tools from os import path import pandas as pd import numpy as np from pandas.util import hash_pandas_object import time class PipelineStage(object): def __init__(self, *args, **kwargs): """ Base class defining functionality for all pipeline stages. To c...
{"/astronomaly/feature_extraction/wavelet_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/feature_extraction/shape_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/lof.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/human_loop_learnin...
65,234
MichelleLochner/astronomaly
refs/heads/main
/setup.py
import setuptools import re import os VERSIONFILE = os.path.join("astronomaly", "_version.py") verstrline = open(VERSIONFILE, "rt").read() VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]" mo = re.search(VSRE, verstrline, re.M) if mo: verstr = mo.group(1) else: raise RuntimeError("Unable to find version string in %...
{"/astronomaly/feature_extraction/wavelet_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/feature_extraction/shape_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/lof.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/human_loop_learnin...
65,235
MichelleLochner/astronomaly
refs/heads/main
/astronomaly/_version.py
__version__ = "1.2"
{"/astronomaly/feature_extraction/wavelet_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/feature_extraction/shape_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/lof.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/human_loop_learnin...
65,236
MichelleLochner/astronomaly
refs/heads/main
/astronomaly/feature_extraction/feets_features.py
import numpy as np import feets from astronomaly.base.base_pipeline import PipelineStage import warnings from astronomaly.base import logging_tools class Feets_Features(PipelineStage): def __init__(self, exclude_features, compute_on_mags=False, ignore_warnings=False, ...
{"/astronomaly/feature_extraction/wavelet_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/feature_extraction/shape_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/lof.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/human_loop_learnin...
65,237
MichelleLochner/astronomaly
refs/heads/main
/astronomaly/scripts/raw_features_example.py
# Replicates the simulated example in the paper import os import numpy as np from astronomaly.data_management import raw_features from astronomaly.anomaly_detection import lof, human_loop_learning from astronomaly.visualisation import tsne_plot # Root directory for data data_dir = os.path.join(os.getcwd(), 'example_da...
{"/astronomaly/feature_extraction/wavelet_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/feature_extraction/shape_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/lof.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/human_loop_learnin...
65,238
MichelleLochner/astronomaly
refs/heads/main
/astronomaly/utils/utils.py
import matplotlib.pyplot as plt import astropy import os import pandas as pd import numpy as np import xlsxwriter from PIL import Image def convert_pybdsf_catalogue(catalogue_file, image_file, remove_point_sources=False, merge_islands=False, ...
{"/astronomaly/feature_extraction/wavelet_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/feature_extraction/shape_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/lof.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/human_loop_learnin...
65,239
MichelleLochner/astronomaly
refs/heads/main
/astronomaly/base/base_dataset.py
import os from astronomaly.base import logging_tools class Dataset(object): def __init__(self, *args, **kwargs): """ Base Dataset object that all other dataset objects should inherit from. Whenever a child of this class is implemented, super().__init__() should be called and explic...
{"/astronomaly/feature_extraction/wavelet_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/feature_extraction/shape_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/lof.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/human_loop_learnin...
65,240
MichelleLochner/astronomaly
refs/heads/main
/astronomaly/frontend/interface.py
import numpy as np import os import importlib import sys class Controller: def __init__(self, pipeline_file): """ This is the main controller for the interface between the Python backend and the JavaScript frontend. The Controller is passed a python file, which must contain a "run_...
{"/astronomaly/feature_extraction/wavelet_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/feature_extraction/shape_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/lof.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/human_loop_learnin...
65,241
MichelleLochner/astronomaly
refs/heads/main
/astronomaly/preprocessing/image_preprocessing.py
import numpy as np from skimage.transform import resize import cv2 from astropy.stats import sigma_clipped_stats def image_transform_log(img): """ Normalise and then perform log transform on image Parameters ---------- img : np.ndarray Input image (assumed float values) Returns -...
{"/astronomaly/feature_extraction/wavelet_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/feature_extraction/shape_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/lof.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/human_loop_learnin...
65,242
MichelleLochner/astronomaly
refs/heads/main
/astronomaly/base/logging_tools.py
import logging import os def setup_logger(log_directory='', log_filename="astronomaly.log"): """ Ensures the system logger is set up correctly. If a FileHandler logger has already been attached to the current logger, nothing new is done. Parameters ---------- log_directory : str, optional ...
{"/astronomaly/feature_extraction/wavelet_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/feature_extraction/shape_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/lof.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/human_loop_learnin...
65,243
MichelleLochner/astronomaly
refs/heads/main
/astronomaly/data_management/image_reader.py
from astropy.io import fits from astropy.wcs import WCS import numpy as np import os import tracemalloc import pandas as pd import matplotlib as mpl import io from skimage.transform import resize import cv2 from astronomaly.base.base_dataset import Dataset from astronomaly.base import logging_tools from astronomaly.uti...
{"/astronomaly/feature_extraction/wavelet_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/feature_extraction/shape_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/lof.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/human_loop_learnin...
65,244
MichelleLochner/astronomaly
refs/heads/main
/astronomaly/postprocessing/scaling.py
from sklearn.preprocessing import StandardScaler import pandas as pd from astronomaly.base.base_pipeline import PipelineStage class FeatureScaler(PipelineStage): def __init__(self, **kwargs): """ Rescales features using a standard sklearn scalar that subtracts the mean and divides by the ...
{"/astronomaly/feature_extraction/wavelet_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/feature_extraction/shape_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/lof.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/human_loop_learnin...
65,245
MichelleLochner/astronomaly
refs/heads/main
/astronomaly/frontend/run_server.py
from flask import Flask, render_template, request, Response import json from os.path import join from astronomaly.frontend.interface import Controller import logging import argparse # Main function to serve Astronomaly parser = argparse.ArgumentParser(description='Run the Astronomaly server') help_str = 'Location of ...
{"/astronomaly/feature_extraction/wavelet_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/feature_extraction/shape_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/lof.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/human_loop_learnin...
65,246
MichelleLochner/astronomaly
refs/heads/main
/astronomaly/scripts/galaxy_zoo_example.py
# An example with a subset of Galaxy Zoo data from astronomaly.data_management import image_reader from astronomaly.preprocessing import image_preprocessing from astronomaly.feature_extraction import shape_features from astronomaly.postprocessing import scaling from astronomaly.anomaly_detection import isolation_forest...
{"/astronomaly/feature_extraction/wavelet_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/feature_extraction/shape_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/lof.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/human_loop_learnin...
65,247
MichelleLochner/astronomaly
refs/heads/main
/astronomaly/anomaly_detection/isolation_forest.py
from astronomaly.base.base_pipeline import PipelineStage from sklearn.ensemble import IsolationForest import pandas as pd import pickle from os import path class IforestAlgorithm(PipelineStage): def __init__(self, contamination='auto', **kwargs): """ Runs sklearn's isolation forest anomaly detecti...
{"/astronomaly/feature_extraction/wavelet_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/feature_extraction/shape_features.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/lof.py": ["/astronomaly/base/base_pipeline.py"], "/astronomaly/anomaly_detection/human_loop_learnin...
65,249
I4-Projektseminar-HHU-2016/seminar-project-HaydarAk
refs/heads/master
/DB_handler.py
import pickle import glob import sqlite3 import psutil import os import errno import time # reads & returns the amount of space of physical memory held by the process, this method is called in def memory_usage(): p = psutil.Process(os.getpid()) # gets process_id from operating system used_mem =...
{"/main_file.py": ["/SQLReader.py", "/DB_handler.py"]}
65,250
I4-Projektseminar-HHU-2016/seminar-project-HaydarAk
refs/heads/master
/SQLReader.py
# -*- coding: utf-8 -*- import gzip import time import psutil import glob import multiprocessing from multiprocessing import Process import pickle import os import errno from os import path # reads & returns the amount of space of physical memory held by the process, this method is called in def memory_usage(): p...
{"/main_file.py": ["/SQLReader.py", "/DB_handler.py"]}
65,251
I4-Projektseminar-HHU-2016/seminar-project-HaydarAk
refs/heads/master
/main_file.py
import os.path from SQLReader import work_on_file from DB_handler import build_db if __name__ == '__main__': pagelinks = 'enwiki-20160720-pagelinks.sql.gz' pages = 'enwiki-20160720-page.sql.gz' if os.path.isfile(pages) and os.path.isfile(pagelinks): work_on_file(pages, 'page') work_on_file(...
{"/main_file.py": ["/SQLReader.py", "/DB_handler.py"]}
65,252
UnsignedArduino/CircuitPython-Project-Manager
refs/heads/main
/main.py
""" The main program. ----------- Classes list: No classes! ----------- Functions list: No functions! """ # TODO: Make binaries like in CPY Bundle Manager import gui from pathlib import Path from sys import argv from project_tools.create_logger import create_logger import logging LEVEL = logging.DEBUG log_pa...
{"/main.py": ["/gui.py"], "/gui.py": ["/gui_tools/clickable_label.py"]}
65,253
UnsignedArduino/CircuitPython-Project-Manager
refs/heads/main
/gui_tools/clickable_label.py
""" A module that extends the tk.Label class to make a clickable link. ----------- Classes list: No classes! ----------- Functions list: No functions! """ import tkinter as tk from tkinter import ttk class ClickableLabel(tk.Label): def __init__(self, master, callback, *args, **kwargs): super().__i...
{"/main.py": ["/gui.py"], "/gui.py": ["/gui_tools/clickable_label.py"]}
65,254
UnsignedArduino/CircuitPython-Project-Manager
refs/heads/main
/gui.py
""" The main GUI code. ----------- Classes list: - class GUI(tk.Tk).__init__(self) ----------- Functions list: No functions! """ import tkinter as tk from tkinter import ttk from tkinter import messagebox as mbox from tkinter import filedialog as fd from gui_tools.right_click.entry import EntryWithRightClick fr...
{"/main.py": ["/gui.py"], "/gui.py": ["/gui_tools/clickable_label.py"]}
65,255
UnsignedArduino/CircuitPython-Project-Manager
refs/heads/main
/project_tools/project.py
""" This module handles CircuitPython projects. ----------- Classes list: No classes! ----------- Functions list: - replace_sus_chars(file_name: str) -> str - make_new_project(parent_directory: Path, project_name: str = "Untitled", project_description: str = "", autogen_gitignore: bool = True, ...
{"/main.py": ["/gui.py"], "/gui.py": ["/gui_tools/clickable_label.py"]}
65,261
summunity/DjangoReact_CLI
refs/heads/main
/src/apps/interface.py
from ..format_cmd import format_cmd_prompt def launch_app( state, config ): """ launch app state """ command_str = """ Which application do you want to launch: """ from .process import launch_app as launch_process apps = config[config['launch'] == True] for i in range(0, len(apps)...
{"/src/apps/interface.py": ["/src/format_cmd.py", "/src/apps/process.py", "/src/thread.py"], "/cli.py": ["/src/apps/interface.py", "/src/git/interface.py", "/cmd_thread.py"], "/src/apps/process.py": ["/src/thread.py"], "/src/git/interface.py": ["/src/format_cmd.py", "/src/git/process.py"], "/src/git/process.py": ["/src...
65,262
summunity/DjangoReact_CLI
refs/heads/main
/src/thread.py
from time import sleep def launching_func( app, commands ): import os import subprocess os.chdir(app['path']) for cmd in commands: print( 'command', cmd) subprocess.call(cmd) sleep(1) def launch_thread( app, commands ): import multiprocessing proc = multiproces...
{"/src/apps/interface.py": ["/src/format_cmd.py", "/src/apps/process.py", "/src/thread.py"], "/cli.py": ["/src/apps/interface.py", "/src/git/interface.py", "/cmd_thread.py"], "/src/apps/process.py": ["/src/thread.py"], "/src/git/interface.py": ["/src/format_cmd.py", "/src/git/process.py"], "/src/git/process.py": ["/src...
65,263
summunity/DjangoReact_CLI
refs/heads/main
/cli.py
""" Diamond Cronjob ================= Event Detection based on data stored in Diamond :Author: Nik Sumikawa :Date: Nov 3, 2020 """ import logging log = logging.getLogger(__name__) import pandas as pd from src.apps.interface import * from src.git.interface import * import os class CLI: def __init__(self):...
{"/src/apps/interface.py": ["/src/format_cmd.py", "/src/apps/process.py", "/src/thread.py"], "/cli.py": ["/src/apps/interface.py", "/src/git/interface.py", "/cmd_thread.py"], "/src/apps/process.py": ["/src/thread.py"], "/src/git/interface.py": ["/src/format_cmd.py", "/src/git/process.py"], "/src/git/process.py": ["/src...
65,264
summunity/DjangoReact_CLI
refs/heads/main
/src/apps/process.py
from ..thread import launch_thread def launch_app( app ): """ launch application """ if app['type'] == 'django': cmd = 'python manage.py runserver 0.0.0.0:%s' % app['port'] return launch_thread(app, [cmd]) if app['type'] == 'react': cmd = 'npm run export PORT=%s react-scripts s...
{"/src/apps/interface.py": ["/src/format_cmd.py", "/src/apps/process.py", "/src/thread.py"], "/cli.py": ["/src/apps/interface.py", "/src/git/interface.py", "/cmd_thread.py"], "/src/apps/process.py": ["/src/thread.py"], "/src/git/interface.py": ["/src/format_cmd.py", "/src/git/process.py"], "/src/git/process.py": ["/src...
65,265
summunity/DjangoReact_CLI
refs/heads/main
/src/format_cmd.py
def format_cmd_prompt( cmd ): """ formats the command prompt """ formatted = '' for line in cmd.split('\n'): formatted += line.lstrip() + '\n' return formatted
{"/src/apps/interface.py": ["/src/format_cmd.py", "/src/apps/process.py", "/src/thread.py"], "/cli.py": ["/src/apps/interface.py", "/src/git/interface.py", "/cmd_thread.py"], "/src/apps/process.py": ["/src/thread.py"], "/src/git/interface.py": ["/src/format_cmd.py", "/src/git/process.py"], "/src/git/process.py": ["/src...
65,266
summunity/DjangoReact_CLI
refs/heads/main
/src/git/interface.py
from ..format_cmd import format_cmd_prompt from .process import * def git( type, state, config ): """ launch app state """ command_str = """ Which application do you want to pull: """ for i in range(0, len(config)): app_name = config.loc[i]['title'] command_str += '%s: %s\n...
{"/src/apps/interface.py": ["/src/format_cmd.py", "/src/apps/process.py", "/src/thread.py"], "/cli.py": ["/src/apps/interface.py", "/src/git/interface.py", "/cmd_thread.py"], "/src/apps/process.py": ["/src/thread.py"], "/src/git/interface.py": ["/src/format_cmd.py", "/src/git/process.py"], "/src/git/process.py": ["/src...
65,267
summunity/DjangoReact_CLI
refs/heads/main
/cmd_thread.py
import threading import time import ctypes class CmdThread(threading.Thread): def __init__(self, app, commands): threading.Thread.__init__(self) self.app = app self.commands = commands def run(self): import subprocess import os os.chdir(self.app['path']) ...
{"/src/apps/interface.py": ["/src/format_cmd.py", "/src/apps/process.py", "/src/thread.py"], "/cli.py": ["/src/apps/interface.py", "/src/git/interface.py", "/cmd_thread.py"], "/src/apps/process.py": ["/src/thread.py"], "/src/git/interface.py": ["/src/format_cmd.py", "/src/git/process.py"], "/src/git/process.py": ["/src...
65,268
summunity/DjangoReact_CLI
refs/heads/main
/src/git/process.py
from ..thread import launch_thread def git_pull( app ): """ launch application """ url = 'https://%s:%s@%s' % ( app['username'], app['password'], app['git'], ) cmd = 'git pull %s' % url return launch_thread(app, [cmd]) def git_push( app ): """ launch application "...
{"/src/apps/interface.py": ["/src/format_cmd.py", "/src/apps/process.py", "/src/thread.py"], "/cli.py": ["/src/apps/interface.py", "/src/git/interface.py", "/cmd_thread.py"], "/src/apps/process.py": ["/src/thread.py"], "/src/git/interface.py": ["/src/format_cmd.py", "/src/git/process.py"], "/src/git/process.py": ["/src...
65,269
summunity/DjangoReact_CLI
refs/heads/main
/multiprocTest.py
from time import sleep def TestFunction( test1, test2 ): print( 'these are the props', test1, test2) while True: print( 'we are looping' ) sleep(1) return if __name__ == "__main__": import multiprocessing proc = multiprocessing.Process(target=TestFunction, args=({'test':1, 't...
{"/src/apps/interface.py": ["/src/format_cmd.py", "/src/apps/process.py", "/src/thread.py"], "/cli.py": ["/src/apps/interface.py", "/src/git/interface.py", "/cmd_thread.py"], "/src/apps/process.py": ["/src/thread.py"], "/src/git/interface.py": ["/src/format_cmd.py", "/src/git/process.py"], "/src/git/process.py": ["/src...
65,277
bwsi-hadr/student-image-processing
refs/heads/master
/analyzeimage.py
def analyzeimage(old_image): # analyze the image 'old_image' here # save the analyzed image to 'static/temp.jpg' # return the path of the new image file return "static/temp.jpg"
{"/view.py": ["/analyzeimage.py"]}
65,278
bwsi-hadr/student-image-processing
refs/heads/master
/view.py
from wtforms import Form, TextField, TextAreaField, validators, StringField, SubmitField, RadioField from random import Random import cv2, numpy from werkzeug import secure_filename from flask_wtf.file import FileField from analyzeimage import analyzeimage from PIL import Image import time import urllib.request from fl...
{"/view.py": ["/analyzeimage.py"]}
65,279
dpn-admin/DPN-PYTHON-CLIENT
refs/heads/master
/dpnclient/test_util.py
import os from pytest import raises from . import util from . import const from datetime import datetime def test_now_str(): timestamp = util.now_str() assert util.RE_TIMESTAMP.match(timestamp) is not None def test_looks_like_uuid(): assert util.looks_like_uuid("e084c014-9ba1-41a3-9eb3-6daef8097bc5") == T...
{"/dpnclient/test_util.py": ["/dpnclient/__init__.py"], "/xfer_test.py": ["/dpnclient/__init__.py"], "/dpnclient/test_client.py": ["/dpnclient/client.py"], "/dpnclient/client.py": ["/dpnclient/__init__.py", "/dpnclient/base_client.py"], "/dpnclient/test_base_client.py": ["/dpnclient/base_client.py"], "/dpnclient/util.p...
65,280
dpn-admin/DPN-PYTHON-CLIENT
refs/heads/master
/xfer_test.py
# xfer_test.py # # A quick and dirty script to implement DPN replicating node # functions. This is not a production script. It merely # implements the following basic transfer features for an initial # test run: # # 1. Query a remote node for pending transfer requests. # 2. Use rsync to copy files in the transfer reque...
{"/dpnclient/test_util.py": ["/dpnclient/__init__.py"], "/xfer_test.py": ["/dpnclient/__init__.py"], "/dpnclient/test_client.py": ["/dpnclient/client.py"], "/dpnclient/client.py": ["/dpnclient/__init__.py", "/dpnclient/base_client.py"], "/dpnclient/test_base_client.py": ["/dpnclient/base_client.py"], "/dpnclient/util.p...
65,281
dpn-admin/DPN-PYTHON-CLIENT
refs/heads/master
/dpnclient/test_client.py
from pytest import raises from .client import Client # TODO: Integration tests. There is nothing testable # in client.py without a server to talk to. # class ClientTestSettings: # def __init__(self): # self.MY_NODE = "dpn.example.com" # self.KEYS = {"remote": "000000000000"} # client_test_config ...
{"/dpnclient/test_util.py": ["/dpnclient/__init__.py"], "/xfer_test.py": ["/dpnclient/__init__.py"], "/dpnclient/test_client.py": ["/dpnclient/client.py"], "/dpnclient/client.py": ["/dpnclient/__init__.py", "/dpnclient/base_client.py"], "/dpnclient/test_base_client.py": ["/dpnclient/base_client.py"], "/dpnclient/util.p...
65,282
dpn-admin/DPN-PYTHON-CLIENT
refs/heads/master
/dpnclient/client.py
import json from . import const from . import util from .base_client import BaseClient from requests.exceptions import RequestException from datetime import datetime class Client(BaseClient): """ This is the higher-level DPN REST client that performs meaningful repository operations. It's based on the lowe...
{"/dpnclient/test_util.py": ["/dpnclient/__init__.py"], "/xfer_test.py": ["/dpnclient/__init__.py"], "/dpnclient/test_client.py": ["/dpnclient/client.py"], "/dpnclient/client.py": ["/dpnclient/__init__.py", "/dpnclient/base_client.py"], "/dpnclient/test_base_client.py": ["/dpnclient/base_client.py"], "/dpnclient/util.p...
65,283
dpn-admin/DPN-PYTHON-CLIENT
refs/heads/master
/dpnclient/test_base_client.py
from .base_client import BaseClient # TODO: Integration tests! def test_headers(): baseclient = BaseClient("http://www.example.com", "API_TOKEN_1234") headers = baseclient.headers() assert headers['Content-Type'] == 'application/json' assert headers['Accept'] == 'application/json' assert headers['...
{"/dpnclient/test_util.py": ["/dpnclient/__init__.py"], "/xfer_test.py": ["/dpnclient/__init__.py"], "/dpnclient/test_client.py": ["/dpnclient/client.py"], "/dpnclient/client.py": ["/dpnclient/__init__.py", "/dpnclient/base_client.py"], "/dpnclient/test_base_client.py": ["/dpnclient/base_client.py"], "/dpnclient/util.p...
65,284
dpn-admin/DPN-PYTHON-CLIENT
refs/heads/master
/dpnclient/util.py
import re from . import const import hashlib from datetime import datetime # Regex for something that looks like a UUID. RE_UUID = re.compile("^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-?[a-f0-9]{12}\Z", re.IGNORECASE) RE_TIMESTAMP = re.compile(r'^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.*\d*Z\Z') def now_str(): ...
{"/dpnclient/test_util.py": ["/dpnclient/__init__.py"], "/xfer_test.py": ["/dpnclient/__init__.py"], "/dpnclient/test_client.py": ["/dpnclient/client.py"], "/dpnclient/client.py": ["/dpnclient/__init__.py", "/dpnclient/base_client.py"], "/dpnclient/test_base_client.py": ["/dpnclient/base_client.py"], "/dpnclient/util.p...
65,285
dpn-admin/DPN-PYTHON-CLIENT
refs/heads/master
/dpnclient/__init__.py
# Package dpnclient - A REST client for DPN. from . import const from . import util from .base_client import BaseClient from .client import Client
{"/dpnclient/test_util.py": ["/dpnclient/__init__.py"], "/xfer_test.py": ["/dpnclient/__init__.py"], "/dpnclient/test_client.py": ["/dpnclient/client.py"], "/dpnclient/client.py": ["/dpnclient/__init__.py", "/dpnclient/base_client.py"], "/dpnclient/test_base_client.py": ["/dpnclient/base_client.py"], "/dpnclient/util.p...
65,286
dpn-admin/DPN-PYTHON-CLIENT
refs/heads/master
/dpnclient/const.py
# Status STATUS_ACCEPTED = 'Accepted' STATUS_CONFIRMED = 'Confirmed' STATUS_CANCELLED = 'Cancelled' STATUS_FINISHED = 'Finished' STATUS_PREPARED = 'Prepared' STATUS_REQUESTED = 'Requested' STATUS_REJECTED = 'Rejected' STATUS_RECEIVED = 'Received' STATUSES = (STATUS_ACCEPTED, STATUS_CONFIRMED, STATUS_CANCELLED, ...
{"/dpnclient/test_util.py": ["/dpnclient/__init__.py"], "/xfer_test.py": ["/dpnclient/__init__.py"], "/dpnclient/test_client.py": ["/dpnclient/client.py"], "/dpnclient/client.py": ["/dpnclient/__init__.py", "/dpnclient/base_client.py"], "/dpnclient/test_base_client.py": ["/dpnclient/base_client.py"], "/dpnclient/util.p...
65,287
dpn-admin/DPN-PYTHON-CLIENT
refs/heads/master
/settings_template.py
# Fill out the following settings and save as dpn_rest_settings.py. # Don't check dpn_rest_settings.py into source control, since this # is a public repo and the settings file will have your API keys. # # Enter the URL (with port) and API key for *your own* DPN node. # The API key should be the key for a user on your o...
{"/dpnclient/test_util.py": ["/dpnclient/__init__.py"], "/xfer_test.py": ["/dpnclient/__init__.py"], "/dpnclient/test_client.py": ["/dpnclient/client.py"], "/dpnclient/client.py": ["/dpnclient/__init__.py", "/dpnclient/base_client.py"], "/dpnclient/test_base_client.py": ["/dpnclient/base_client.py"], "/dpnclient/util.p...
65,288
dpn-admin/DPN-PYTHON-CLIENT
refs/heads/master
/dpnclient/base_client.py
from . import const import json import requests from requests.exceptions import RequestException class BaseClient: """ Base client for DPN REST service. This client returns requests.Response objects that include the status code of the response, and the raw text and json data. For all of this class's li...
{"/dpnclient/test_util.py": ["/dpnclient/__init__.py"], "/xfer_test.py": ["/dpnclient/__init__.py"], "/dpnclient/test_client.py": ["/dpnclient/client.py"], "/dpnclient/client.py": ["/dpnclient/__init__.py", "/dpnclient/base_client.py"], "/dpnclient/test_base_client.py": ["/dpnclient/base_client.py"], "/dpnclient/util.p...
65,312
Alisax31/darkHorseRace
refs/heads/master
/sparepart/sp_data_module.py
import pandas as pd import copy from flask import Flask from flask import Blueprint from flask import request from flask import jsonify from sparepart import jobs from sparepart.util import util from sparepart.dao import dao from sparepart.data_model import model_fun from datetime import datetime from plotly import plo...
{"/sparepart/sp_data_module.py": ["/sparepart/__init__.py"], "/sparepart/jobs.py": ["/sparepart/__init__.py"], "/sparepart/manage.py": ["/sparepart/__init__.py"], "/sparepart/dao/dao.py": ["/sparepart/__init__.py"], "/sparepart/run.py": ["/sparepart/__init__.py"], "/sparepart/__init__.py": ["/sparepart/config.py"], "/s...
65,313
Alisax31/darkHorseRace
refs/heads/master
/sparepart/data_model/model_fun.py
import os os.environ['OMP_NUM_THREADS'] = "1" import numpy as np import pickle import statsmodels.api as sm import calendar import warnings warnings.filterwarnings("ignore") # import xgboost as xgb import pandas as pd import fbprophet from itertools import product from datetime import datetime, timedelta from sklearn.p...
{"/sparepart/sp_data_module.py": ["/sparepart/__init__.py"], "/sparepart/jobs.py": ["/sparepart/__init__.py"], "/sparepart/manage.py": ["/sparepart/__init__.py"], "/sparepart/dao/dao.py": ["/sparepart/__init__.py"], "/sparepart/run.py": ["/sparepart/__init__.py"], "/sparepart/__init__.py": ["/sparepart/config.py"], "/s...
65,314
Alisax31/darkHorseRace
refs/heads/master
/sparepart/util/util.py
import pandas as pd import numpy as np import sys import json from datetime import datetime as dt from dateutil.relativedelta import relativedelta def polar_data(): df = df_pre_dispose() dfn = df.groupby([df['o_warehouse_date'].apply(lambda x:x.year),'sno'], as_index=False).agg({'asset_no':pd.Series.nunique,'a...
{"/sparepart/sp_data_module.py": ["/sparepart/__init__.py"], "/sparepart/jobs.py": ["/sparepart/__init__.py"], "/sparepart/manage.py": ["/sparepart/__init__.py"], "/sparepart/dao/dao.py": ["/sparepart/__init__.py"], "/sparepart/run.py": ["/sparepart/__init__.py"], "/sparepart/__init__.py": ["/sparepart/config.py"], "/s...
65,315
Alisax31/darkHorseRace
refs/heads/master
/sparepart/config.py
from apscheduler.jobstores.sqlalchemy import SQLAlchemyJobStore class Config(object): # DEBUG = False # TSETING = False UPLOAD_SUCCESS_PATH = "/upload/uploaded/" UPLOAD_FAIL_PATH = "/upload/fail/" SQLALCHEMY_DATABASE_URI = "mysql+pymysql://spadmin:SPADMIN@localhost:3306/spadmin" SQLALCHEMY_TRA...
{"/sparepart/sp_data_module.py": ["/sparepart/__init__.py"], "/sparepart/jobs.py": ["/sparepart/__init__.py"], "/sparepart/manage.py": ["/sparepart/__init__.py"], "/sparepart/dao/dao.py": ["/sparepart/__init__.py"], "/sparepart/run.py": ["/sparepart/__init__.py"], "/sparepart/__init__.py": ["/sparepart/config.py"], "/s...
65,316
Alisax31/darkHorseRace
refs/heads/master
/sparepart/jobs.py
# from flask import current_app import pandas as pd import shutil from os import path from os import listdir from sparepart.dao import dao from sparepart import db from sparepart.util import util from datetime import datetime from flask import current_app def sp_job(): dao.add_msg("SV000048预测数据") def sno_month_...
{"/sparepart/sp_data_module.py": ["/sparepart/__init__.py"], "/sparepart/jobs.py": ["/sparepart/__init__.py"], "/sparepart/manage.py": ["/sparepart/__init__.py"], "/sparepart/dao/dao.py": ["/sparepart/__init__.py"], "/sparepart/run.py": ["/sparepart/__init__.py"], "/sparepart/__init__.py": ["/sparepart/config.py"], "/s...
65,317
Alisax31/darkHorseRace
refs/heads/master
/sparepart/manage.py
from flask import Blueprint from flask import current_app from flask import jsonify from flask import request from sparepart import jobs from sparepart.models import models from sparepart.dao import dao from os import path from datetime import datetime from werkzeug.utils import secure_filename from sparepart import co...
{"/sparepart/sp_data_module.py": ["/sparepart/__init__.py"], "/sparepart/jobs.py": ["/sparepart/__init__.py"], "/sparepart/manage.py": ["/sparepart/__init__.py"], "/sparepart/dao/dao.py": ["/sparepart/__init__.py"], "/sparepart/run.py": ["/sparepart/__init__.py"], "/sparepart/__init__.py": ["/sparepart/config.py"], "/s...
65,318
Alisax31/darkHorseRace
refs/heads/master
/sparepart/dao/dao.py
import pandas as pd import datetime from sparepart import db from sparepart.models import models from sqlalchemy import func from sqlalchemy import desc from sqlalchemy import extract from sqlalchemy import distinct from sqlalchemy import text # def get_sno_month_analysis_data(): # SMA = models.SnoMonthAnalysis # ...
{"/sparepart/sp_data_module.py": ["/sparepart/__init__.py"], "/sparepart/jobs.py": ["/sparepart/__init__.py"], "/sparepart/manage.py": ["/sparepart/__init__.py"], "/sparepart/dao/dao.py": ["/sparepart/__init__.py"], "/sparepart/run.py": ["/sparepart/__init__.py"], "/sparepart/__init__.py": ["/sparepart/config.py"], "/s...
65,319
Alisax31/darkHorseRace
refs/heads/master
/sparepart/data_model/spmain.py
import pandas as pd import numpy as np import sp_module as spm from matplotlib import pyplot as plt from sklearn.preprocessing import LabelEncoder from sklearn.preprocessing import StandardScaler from sklearn.model_selection import train_test_split from model_fun import xgBoostReg def import_csv(path): df = pd.rea...
{"/sparepart/sp_data_module.py": ["/sparepart/__init__.py"], "/sparepart/jobs.py": ["/sparepart/__init__.py"], "/sparepart/manage.py": ["/sparepart/__init__.py"], "/sparepart/dao/dao.py": ["/sparepart/__init__.py"], "/sparepart/run.py": ["/sparepart/__init__.py"], "/sparepart/__init__.py": ["/sparepart/config.py"], "/s...
65,320
Alisax31/darkHorseRace
refs/heads/master
/sparepart/login.py
from flask import Flask from flask import Blueprint from flask import request from sparepart.models import models # from flask import render_template bp = Blueprint('login', __name__) @bp.route('/login', methods=['POST']) def loginValid(): if request.method == 'POST': username = request.form['username'] ...
{"/sparepart/sp_data_module.py": ["/sparepart/__init__.py"], "/sparepart/jobs.py": ["/sparepart/__init__.py"], "/sparepart/manage.py": ["/sparepart/__init__.py"], "/sparepart/dao/dao.py": ["/sparepart/__init__.py"], "/sparepart/run.py": ["/sparepart/__init__.py"], "/sparepart/__init__.py": ["/sparepart/config.py"], "/s...
65,321
Alisax31/darkHorseRace
refs/heads/master
/sparepart/run.py
from sparepart import create_app from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy() app = create_app() if __name__ == "__main__": app.run(host='127.0.0.1', port='5000')
{"/sparepart/sp_data_module.py": ["/sparepart/__init__.py"], "/sparepart/jobs.py": ["/sparepart/__init__.py"], "/sparepart/manage.py": ["/sparepart/__init__.py"], "/sparepart/dao/dao.py": ["/sparepart/__init__.py"], "/sparepart/run.py": ["/sparepart/__init__.py"], "/sparepart/__init__.py": ["/sparepart/config.py"], "/s...
65,322
Alisax31/darkHorseRace
refs/heads/master
/sparepart/settings/config_dev.py
from apscheduler.jobstores.sqlalchemy import SQLAlchemyJobStore DEBUG = True UPLOAD_SUCCESS_PATH = "/upload/uploaded/" UPLOAD_FAIL_PATH = "/upload/fail/" SQLALCHEMY_DATABASE_URI = "mysql+pymysql://spadmin:SPADMIN@localhost:3306/spadmin" SQLALCHEMY_TRACK_MODIFICATIONS = False SCHEDULER_API_ENABLED = True SCHEDULER_TIM...
{"/sparepart/sp_data_module.py": ["/sparepart/__init__.py"], "/sparepart/jobs.py": ["/sparepart/__init__.py"], "/sparepart/manage.py": ["/sparepart/__init__.py"], "/sparepart/dao/dao.py": ["/sparepart/__init__.py"], "/sparepart/run.py": ["/sparepart/__init__.py"], "/sparepart/__init__.py": ["/sparepart/config.py"], "/s...
65,323
Alisax31/darkHorseRace
refs/heads/master
/sparepart/__init__.py
from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy() import os from flask import Flask from flask_apscheduler import APScheduler from apscheduler.jobstores.sqlalchemy import SQLAlchemyJobStore from . import login from . import manage from . import sp_data_module from sparepart.config import Config def create_ap...
{"/sparepart/sp_data_module.py": ["/sparepart/__init__.py"], "/sparepart/jobs.py": ["/sparepart/__init__.py"], "/sparepart/manage.py": ["/sparepart/__init__.py"], "/sparepart/dao/dao.py": ["/sparepart/__init__.py"], "/sparepart/run.py": ["/sparepart/__init__.py"], "/sparepart/__init__.py": ["/sparepart/config.py"], "/s...
65,324
Alisax31/darkHorseRace
refs/heads/master
/sparepart/models/models.py
from sparepart import db from datetime import datetime class EntityBase(object): def to_json(self): fields = self.__dict__ if "_sa_instance_state" in fields: del fields["_sa_instance_state"] return fields class TmHoliday(db.Model, EntityBase): __tablename__ = 'tm_holiday' ...
{"/sparepart/sp_data_module.py": ["/sparepart/__init__.py"], "/sparepart/jobs.py": ["/sparepart/__init__.py"], "/sparepart/manage.py": ["/sparepart/__init__.py"], "/sparepart/dao/dao.py": ["/sparepart/__init__.py"], "/sparepart/run.py": ["/sparepart/__init__.py"], "/sparepart/__init__.py": ["/sparepart/config.py"], "/s...