index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
97,505
wuningxi/LexSim
refs/heads/master
/src/evaluation/plot_attention_matrices.py
import tensorflow as tf from tensorflow.python.framework import ops from src.evaluation.visualise_attention import plot_affinity_matrix from src.loaders.load_data import load_data from src.logs.training_logs import read_all_training_logs, find_entry from src.models.save_load import load_model_and_graph, get_model_dir,...
{"/src/loaders/Semeval/build.py": ["/src/loaders/Semeval/helper.py"], "/src/loaders/STS/build.py": ["/src/loaders/Semeval/helper.py"], "/src/evaluation/plot_attention_matrices.py": ["/src/loaders/load_data.py", "/src/logs/training_logs.py", "/src/models/save_load.py", "/src/preprocessing/Preprocessor.py"], "/src/evalua...
97,506
wuningxi/LexSim
refs/heads/master
/src/evaluation/metrics/lexical_similarity.py
import matplotlib.pyplot as plt from src.evaluation.metrics.js_div import calculate_js_div from src.evaluation.metrics.dice import calculate_dice_sim from src.evaluation.metrics.jaccard import calculate_jaccard_index from src.loaders.load_data import load_data import numpy as np def plt_hist(axis, data, hatch, label, ...
{"/src/loaders/Semeval/build.py": ["/src/loaders/Semeval/helper.py"], "/src/loaders/STS/build.py": ["/src/loaders/Semeval/helper.py"], "/src/evaluation/plot_attention_matrices.py": ["/src/loaders/load_data.py", "/src/logs/training_logs.py", "/src/models/save_load.py", "/src/preprocessing/Preprocessor.py"], "/src/evalua...
97,507
wuningxi/LexSim
refs/heads/master
/src/logs/tf_event_logs.py
import tensorflow as tf import os def read_previous_performance_from_tfevent(model_id,epoch,split='dev',metric='Accuracy'): # get name of file in TF log dir tf_log_dir = 'data/models/model_{}/{}/'.format(model_id,split) eventfile = os.listdir(tf_log_dir) assert len(eventfile)==1 for summary in tf.t...
{"/src/loaders/Semeval/build.py": ["/src/loaders/Semeval/helper.py"], "/src/loaders/STS/build.py": ["/src/loaders/Semeval/helper.py"], "/src/evaluation/plot_attention_matrices.py": ["/src/loaders/load_data.py", "/src/logs/training_logs.py", "/src/models/save_load.py", "/src/preprocessing/Preprocessor.py"], "/src/evalua...
97,508
wuningxi/LexSim
refs/heads/master
/src/logs/training_logs.py
import json from os import listdir from os.path import isfile, join from sklearn.model_selection import ParameterGrid from datetime import datetime import time import git # read and write log # ###################### def get_git_sha(): ''' Get current git hash for code version :return: ''' # pip...
{"/src/loaders/Semeval/build.py": ["/src/loaders/Semeval/helper.py"], "/src/loaders/STS/build.py": ["/src/loaders/Semeval/helper.py"], "/src/evaluation/plot_attention_matrices.py": ["/src/loaders/load_data.py", "/src/logs/training_logs.py", "/src/models/save_load.py", "/src/preprocessing/Preprocessor.py"], "/src/evalua...
97,509
wuningxi/LexSim
refs/heads/master
/src/evaluation/metrics/js_div.py
import scipy import numpy as np from src.loaders.load_data import load_data import re, math, collections from nltk.corpus import stopwords def js(p, q, print_dist=False): # _p = p / norm(p, ord=1) # _q = q / norm(q, ord=1) _p = p/p.sum() _q = q/q.sum() _m = (_p + _q) / 2 if print_dist: ...
{"/src/loaders/Semeval/build.py": ["/src/loaders/Semeval/helper.py"], "/src/loaders/STS/build.py": ["/src/loaders/Semeval/helper.py"], "/src/evaluation/plot_attention_matrices.py": ["/src/loaders/load_data.py", "/src/logs/training_logs.py", "/src/models/save_load.py", "/src/preprocessing/Preprocessor.py"], "/src/evalua...
97,510
wuningxi/LexSim
refs/heads/master
/src/loaders/Semeval/helper.py
# adapted from https://github.com/whiskeyromeo/CommunityQuestionAnswering import xml.etree.ElementTree as ElementTree import sys from collections import OrderedDict # preexisting def getargvalue(name, required): output = False for arg in sys.argv: if arg[2:len(name)+2] == name: output = a...
{"/src/loaders/Semeval/build.py": ["/src/loaders/Semeval/helper.py"], "/src/loaders/STS/build.py": ["/src/loaders/Semeval/helper.py"], "/src/evaluation/plot_attention_matrices.py": ["/src/loaders/load_data.py", "/src/logs/training_logs.py", "/src/models/save_load.py", "/src/preprocessing/Preprocessor.py"], "/src/evalua...
97,511
wuningxi/LexSim
refs/heads/master
/src/evaluation/evaluate.py
from src.models.save_load import get_model_dir import csv import numpy as np import tensorflow as tf import pandas as pd from src.loaders.load_data import load_data def activations_to_labels(activations): return tf.argmax(activations, 1) def get_confidence_scores(Z3,normalised=False): if normalised: ...
{"/src/loaders/Semeval/build.py": ["/src/loaders/Semeval/helper.py"], "/src/loaders/STS/build.py": ["/src/loaders/Semeval/helper.py"], "/src/evaluation/plot_attention_matrices.py": ["/src/loaders/load_data.py", "/src/logs/training_logs.py", "/src/models/save_load.py", "/src/preprocessing/Preprocessor.py"], "/src/evalua...
97,512
wuningxi/LexSim
refs/heads/master
/src/loaders/augment_data.py
import os def create_large_train(): ''' Create large training set for each task based on Deriu 2017 ''' from src.loaders.load_data import get_filepath, load_file print('Creating large training set...') for t in ['A','B','C']: opt = {'dataset': 'Semeval', 'datapath': 'data/', ...
{"/src/loaders/Semeval/build.py": ["/src/loaders/Semeval/helper.py"], "/src/loaders/STS/build.py": ["/src/loaders/Semeval/helper.py"], "/src/evaluation/plot_attention_matrices.py": ["/src/loaders/load_data.py", "/src/logs/training_logs.py", "/src/models/save_load.py", "/src/preprocessing/Preprocessor.py"], "/src/evalua...
97,513
wuningxi/LexSim
refs/heads/master
/src/evaluation/word_overlap.py
import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns from src.evaluation.difficulty.difficulty_cases import load_subset_pred_overlap from src.loaders.load_data import load_data from src.models.save_load import get_model_dir def calculate_word_overlap_ratio(opt): ''' Lo...
{"/src/loaders/Semeval/build.py": ["/src/loaders/Semeval/helper.py"], "/src/loaders/STS/build.py": ["/src/loaders/Semeval/helper.py"], "/src/evaluation/plot_attention_matrices.py": ["/src/loaders/load_data.py", "/src/logs/training_logs.py", "/src/models/save_load.py", "/src/preprocessing/Preprocessor.py"], "/src/evalua...
97,514
wuningxi/LexSim
refs/heads/master
/src/preprocessing/word_vectors.py
from gensim.models import KeyedVectors,Word2Vec import numpy as np import time import os import pickle def load_vectors(filename, word2id, limit, return_model=False, dim=300,padding_tokens=0,unk_tokens=0): print('Loading pretrained embeddings from file...') # initialise random emb divident = 1.0 n = l...
{"/src/loaders/Semeval/build.py": ["/src/loaders/Semeval/helper.py"], "/src/loaders/STS/build.py": ["/src/loaders/Semeval/helper.py"], "/src/evaluation/plot_attention_matrices.py": ["/src/loaders/load_data.py", "/src/logs/training_logs.py", "/src/models/save_load.py", "/src/preprocessing/Preprocessor.py"], "/src/evalua...
97,515
wuningxi/LexSim
refs/heads/master
/src/evaluation/difficulty/difficulty_metrics.py
def count_tp_tn_fp_fn(split_df,case=None): if case is None: tp = len(split_df.loc[(split_df['gold_label']==1) & (split_df['pred_label']==1)]) tn = len(split_df.loc[(split_df['gold_label']==0) & (split_df['pred_label']==0)]) fp = len(split_df.loc[(split_df['gold_label']==0) & (split_df['pred_...
{"/src/loaders/Semeval/build.py": ["/src/loaders/Semeval/helper.py"], "/src/loaders/STS/build.py": ["/src/loaders/Semeval/helper.py"], "/src/evaluation/plot_attention_matrices.py": ["/src/loaders/load_data.py", "/src/logs/training_logs.py", "/src/models/save_load.py", "/src/preprocessing/Preprocessor.py"], "/src/evalua...
97,516
wuningxi/LexSim
refs/heads/master
/src/evaluation/metrics/dice.py
def dice_similarity(list1, list2, print_intersection=False): ''' Calculates Dice Coefficient between two lists of words ''' set1 = set(list1) set2 = set(list2) intersection = len(list(set1.intersection(list2))) if print_intersection: print(list(set1.intersection(list2))) # union ...
{"/src/loaders/Semeval/build.py": ["/src/loaders/Semeval/helper.py"], "/src/loaders/STS/build.py": ["/src/loaders/Semeval/helper.py"], "/src/evaluation/plot_attention_matrices.py": ["/src/loaders/load_data.py", "/src/logs/training_logs.py", "/src/models/save_load.py", "/src/preprocessing/Preprocessor.py"], "/src/evalua...
97,517
wuningxi/LexSim
refs/heads/master
/src/evaluation/difficulty/difficulty_cases.py
import pandas as pd from src.evaluation.evaluate import read_predictions, read_original_data from src.evaluation.evaluate import read_original_data from src.logs.training_logs import read_all_training_logs,find_entry from src.evaluation.difficulty.difficulty_metrics import * def annotate_difficulty_case(test_df, metr...
{"/src/loaders/Semeval/build.py": ["/src/loaders/Semeval/helper.py"], "/src/loaders/STS/build.py": ["/src/loaders/Semeval/helper.py"], "/src/evaluation/plot_attention_matrices.py": ["/src/loaders/load_data.py", "/src/logs/training_logs.py", "/src/models/save_load.py", "/src/preprocessing/Preprocessor.py"], "/src/evalua...
97,518
wuningxi/LexSim
refs/heads/master
/src/loaders/task_list.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. """This file contains a lis...
{"/src/loaders/Semeval/build.py": ["/src/loaders/Semeval/helper.py"], "/src/loaders/STS/build.py": ["/src/loaders/Semeval/helper.py"], "/src/evaluation/plot_attention_matrices.py": ["/src/loaders/load_data.py", "/src/logs/training_logs.py", "/src/models/save_load.py", "/src/preprocessing/Preprocessor.py"], "/src/evalua...
97,519
wuningxi/LexSim
refs/heads/master
/src/loaders/Quora/build.py
import src.loaders.build_data as build_data import os from src.loaders.Semeval.helper import Loader import csv import random files = ['q_train','q_dev','q_test'] def reformat_original(outpath, inpath): random.seed(1) print('reformatting:' + inpath) # randomly split in train and test set with open(os....
{"/src/loaders/Semeval/build.py": ["/src/loaders/Semeval/helper.py"], "/src/loaders/STS/build.py": ["/src/loaders/Semeval/helper.py"], "/src/evaluation/plot_attention_matrices.py": ["/src/loaders/load_data.py", "/src/logs/training_logs.py", "/src/models/save_load.py", "/src/preprocessing/Preprocessor.py"], "/src/evalua...
97,520
wuningxi/LexSim
refs/heads/master
/src/loaders/load_data.py
import importlib import os import pickle import numpy as np from src.loaders.Quora.build import build from src.loaders.augment_data import create_large_train, double_task_training_data from src.preprocessing.Preprocessor import Preprocessor def get_filenames(opt): filenames = [] for s in opt['subsets']: ...
{"/src/loaders/Semeval/build.py": ["/src/loaders/Semeval/helper.py"], "/src/loaders/STS/build.py": ["/src/loaders/Semeval/helper.py"], "/src/evaluation/plot_attention_matrices.py": ["/src/loaders/load_data.py", "/src/logs/training_logs.py", "/src/models/save_load.py", "/src/preprocessing/Preprocessor.py"], "/src/evalua...
97,529
stheartsachu/Eventlee
refs/heads/master
/ApplicationUsers/form.py
from django import forms from ApplicationUsers.models import users class ApplicationuserForm(forms.ModelForm): class Meta(): model = users exclude = ['first_name', 'last_name', 'status', 'email', 'password' ]
{"/ApplicationUsers/form.py": ["/ApplicationUsers/models.py"], "/ApplicationAdmin/views.py": ["/ApplicationAdmin/form.py"], "/ApplicationUsers/views.py": ["/ApplicationUsers/form.py", "/ApplicationUsers/models.py"], "/ApplicationAdmin/form.py": ["/ApplicationAdmin/models.py"]}
97,530
stheartsachu/Eventlee
refs/heads/master
/ApplicationAdmin/views.py
from django.shortcuts import render,HttpResponse from ApplicationAdmin.form import ApplicationAdminForm # Create your views here. def eventregister(request): if request.method == 'POST': form = ApplicationAdminForm(request.POST) f = form.save(commit=False) f.eventname = request.POST['eventn...
{"/ApplicationUsers/form.py": ["/ApplicationUsers/models.py"], "/ApplicationAdmin/views.py": ["/ApplicationAdmin/form.py"], "/ApplicationUsers/views.py": ["/ApplicationUsers/form.py", "/ApplicationUsers/models.py"], "/ApplicationAdmin/form.py": ["/ApplicationAdmin/models.py"]}
97,531
stheartsachu/Eventlee
refs/heads/master
/ApplicationAdmin/migrations/0001_initial.py
# Generated by Django 2.0.6 on 2020-06-30 03:18 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Events', fields=[ ('eventid', models.AutoFi...
{"/ApplicationUsers/form.py": ["/ApplicationUsers/models.py"], "/ApplicationAdmin/views.py": ["/ApplicationAdmin/form.py"], "/ApplicationUsers/views.py": ["/ApplicationUsers/form.py", "/ApplicationUsers/models.py"], "/ApplicationAdmin/form.py": ["/ApplicationAdmin/models.py"]}
97,532
stheartsachu/Eventlee
refs/heads/master
/ApplicationAdmin/models.py
from django.db import models # Create your models here. class Events(models.Model): eventid = models.AutoField(primary_key=True) eventname = models.CharField(max_length=30,null=True) eventcategory = models.CharField(max_length=30,null=True) eventdescription = models.TextField(null=True) eventdate =...
{"/ApplicationUsers/form.py": ["/ApplicationUsers/models.py"], "/ApplicationAdmin/views.py": ["/ApplicationAdmin/form.py"], "/ApplicationUsers/views.py": ["/ApplicationUsers/form.py", "/ApplicationUsers/models.py"], "/ApplicationAdmin/form.py": ["/ApplicationAdmin/models.py"]}
97,533
stheartsachu/Eventlee
refs/heads/master
/ApplicationUsers/models.py
from django.db import models # Create your models here. class users(models.Model): user_id = models.AutoField(primary_key=True) first_name = models.CharField(max_length=30) last_name = models.CharField(max_length=30) status = models.BooleanField(default=False) email = models.CharField(unique=True, ...
{"/ApplicationUsers/form.py": ["/ApplicationUsers/models.py"], "/ApplicationAdmin/views.py": ["/ApplicationAdmin/form.py"], "/ApplicationUsers/views.py": ["/ApplicationUsers/form.py", "/ApplicationUsers/models.py"], "/ApplicationAdmin/form.py": ["/ApplicationAdmin/models.py"]}
97,534
stheartsachu/Eventlee
refs/heads/master
/ApplicationAdmin/apps.py
from django.apps import AppConfig class ApplicationadminConfig(AppConfig): name = 'ApplicationAdmin'
{"/ApplicationUsers/form.py": ["/ApplicationUsers/models.py"], "/ApplicationAdmin/views.py": ["/ApplicationAdmin/form.py"], "/ApplicationUsers/views.py": ["/ApplicationUsers/form.py", "/ApplicationUsers/models.py"], "/ApplicationAdmin/form.py": ["/ApplicationAdmin/models.py"]}
97,535
stheartsachu/Eventlee
refs/heads/master
/ApplicationUsers/admin.py
from django.contrib import admin from django.contrib import admin from ApplicationUsers import models # Register your models here. admin.site.register(models.users) # Register your models here.
{"/ApplicationUsers/form.py": ["/ApplicationUsers/models.py"], "/ApplicationAdmin/views.py": ["/ApplicationAdmin/form.py"], "/ApplicationUsers/views.py": ["/ApplicationUsers/form.py", "/ApplicationUsers/models.py"], "/ApplicationAdmin/form.py": ["/ApplicationAdmin/models.py"]}
97,536
stheartsachu/Eventlee
refs/heads/master
/ApplicationUsers/views.py
from django.shortcuts import render,HttpResponse,redirect,HttpResponseRedirect from ApplicationUsers.form import ApplicationuserForm # Create your views here. from ApplicationUsers.models import users def home(request): return render(request,"index.html") def Contact(request): return render(request,"contact.htm...
{"/ApplicationUsers/form.py": ["/ApplicationUsers/models.py"], "/ApplicationAdmin/views.py": ["/ApplicationAdmin/form.py"], "/ApplicationUsers/views.py": ["/ApplicationUsers/form.py", "/ApplicationUsers/models.py"], "/ApplicationAdmin/form.py": ["/ApplicationAdmin/models.py"]}
97,537
stheartsachu/Eventlee
refs/heads/master
/ApplicationAdmin/form.py
from django import forms from ApplicationAdmin.models import Events class ApplicationAdminForm(forms.ModelForm): class Meta(): model = Events exclude = ['eventname', 'eventcategory', 'eventdescription', 'eventdate', 'eventtime', 'eventlocation' ]
{"/ApplicationUsers/form.py": ["/ApplicationUsers/models.py"], "/ApplicationAdmin/views.py": ["/ApplicationAdmin/form.py"], "/ApplicationUsers/views.py": ["/ApplicationUsers/form.py", "/ApplicationUsers/models.py"], "/ApplicationAdmin/form.py": ["/ApplicationAdmin/models.py"]}
97,544
emile-bernard/OpenCV-Mp4-HSV
refs/heads/master
/__init__.py
from videoCapture import VideoCapture from canvas import Canvas
{"/app.py": ["/slider.py"]}
97,545
emile-bernard/OpenCV-Mp4-HSV
refs/heads/master
/app.py
import cv2 import numpy as np import matplotlib.pyplot as plt from matplotlib import cm from matplotlib import colors from mpl_toolkits.mplot3d import Axes3D import time import tkinter as tk import PIL.Image, PIL.ImageTk from videoCapture import VideoCapture from canvas import Canvas from slider import Slider class A...
{"/app.py": ["/slider.py"]}
97,546
emile-bernard/OpenCV-Mp4-HSV
refs/heads/master
/slider.py
import tkinter as tk class Slider: def __init__(self, parent, text, defaultValue, lowerBound, upperBound): self.label = tk.Label(parent, text = text) self.value = tk.DoubleVar() self.slider = tk.Scale(parent, variable = self.value, from_ = lowerBound, to = upperBound, resolution = 1, orien...
{"/app.py": ["/slider.py"]}
97,549
py93/Skillenza_MS_Hackathon_1_0
refs/heads/master
/DbMapper.py
class DbMapper(): def __init__(self, line): s = line.split(",") self.headerToIndexMap = {} i = 0 for val in s: self.headerToIndexMap[val.strip().lower()] = i i += 1 def getValue(self, content, column): cells = content.split(",") key = c...
{"/ModelRESTServer.py": ["/DbMapper.py"]}
97,550
py93/Skillenza_MS_Hackathon_1_0
refs/heads/master
/ModelRESTServer.py
import tensorflow tensorflow.logging.set_verbosity(tensorflow.logging.ERROR) import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '5' from flask import Flask, request, jsonify # loading in Flask from flask_cors import CORS from ludwig.api import LudwigModel # loading in Ludwig import pandas as pd # loading pandas for read...
{"/ModelRESTServer.py": ["/DbMapper.py"]}
97,551
Enirsa/QueueingSystem
refs/heads/master
/main.py
from simulation import Simulation if __name__ == '__main__': s = Simulation( number_of_workers=3, queue_length=4, avg_arrivals_per_minute=12, avg_worker_throughput_per_minute=5, ) for _ in range(5000): s.advance_time() print( f'\nSimulation finished. R...
{"/main.py": ["/simulation.py"]}
97,552
Enirsa/QueueingSystem
refs/heads/master
/simulation.py
import numpy as np class Simulation: def __init__( self, *, number_of_workers: int, queue_length: int, avg_arrivals_per_minute: float, avg_worker_throughput_per_minute: float ): self.number_of_workers = number_of_workers s...
{"/main.py": ["/simulation.py"]}
97,561
myKFF/isms105_classwork
refs/heads/master
/social_auth/facebook/authentication.py
def test_function(): return "You have succesfully called facebook authentication test_function" def login (username,password): return 'The username entered is ' + username +' and password entered is' + password
{"/test/social_auth_test2.py": ["/social_auth/facebook/authentication.py"]}
97,562
myKFF/isms105_classwork
refs/heads/master
/test/social_auth_test.py
import social_auth.facebook.authentication username=raw_input('Enter Username:') password=raw_input('Enter password:') login=social_auth.facebook.authentication.login(username,password) print login
{"/test/social_auth_test2.py": ["/social_auth/facebook/authentication.py"]}
97,563
myKFF/isms105_classwork
refs/heads/master
/test/social_auth_test2.py
from social_auth.facebook.authentication import login username=raw_input('Enter Username:') password=raw_input('Enter password:') login(username,password)
{"/test/social_auth_test2.py": ["/social_auth/facebook/authentication.py"]}
97,565
Anemone95/CVEScanner
refs/heads/master
/database/create_database.py
#!/usr/bin/env python # -*- coding=utf-8 -*- # https://nvd.nist.gov/vuln/data-feeds#JSON_FEED import time from pymongo import MongoClient import json import pathlib import shutil import os import _thread as thread conn = MongoClient('127.0.0.1', 27017) db = conn.cve cveitems = db["cveItems"] def add_one(file): ...
{"/controllers/core.py": ["/controllers/search.py", "/controllers/taskinfo.py"]}
97,566
Anemone95/CVEScanner
refs/heads/master
/mt_console.py
#!/usr/bin/env python # -*- coding=utf-8 -*- """Usage: mt_console start -F <jar_file> [-v] [-t <thread_num>] [--mongodb=<ip:port>] mt_console stop mt_console bash mt_console (-h|--help) Options: -h --help Show this screen. start: Start a scan. -v Verbose log. -d ...
{"/controllers/core.py": ["/controllers/search.py", "/controllers/taskinfo.py"]}
97,567
Anemone95/CVEScanner
refs/heads/master
/controllers/core.py
#!/usr/bin/env python # -*- coding=utf-8 -*- import logging import zipfile import pathlib import re import json import time import shutil from multiprocessing.dummy import Pool #多线程 from contextlib import closing from controllers.search import fetch from controllers.taskinfo import TaskInfo REPORT=[] TASK = None...
{"/controllers/core.py": ["/controllers/search.py", "/controllers/taskinfo.py"]}
97,568
Anemone95/CVEScanner
refs/heads/master
/controllers/search.py
#!/usr/bin/env python # -*- coding=utf-8 -*- import requests import logging from lxml import etree from pymongo import MongoClient import re def fetch(name, version, ip=None, port=None): return fetch_from_mongo(name, version, ip, port) def fetch_from_mongo(name, version, ip, port): conn = MongoClient(ip, p...
{"/controllers/core.py": ["/controllers/search.py", "/controllers/taskinfo.py"]}
97,569
Anemone95/CVEScanner
refs/heads/master
/controllers/vulnerability.py
#!/usr/bin/env python # -*- coding=utf-8 -*- import time from enum import unique, Enum @unique class RISK(Enum): INFO = 0 LOW = 1 MEDIUM = 2 HIGH = 3 class Reference(object): def __init__(self, location="", detail=""): self.location = location self.detail = detai...
{"/controllers/core.py": ["/controllers/search.py", "/controllers/taskinfo.py"]}
97,570
Anemone95/CVEScanner
refs/heads/master
/controllers/taskinfo.py
#!/usr/bin/env python # -*- coding=utf-8 -*- import os class TaskInfo(object): def __init__(self, zip_path=None): self.__work_path = None self.__zip_path = None self.tool_path = os.path.join(os.path.split(os.path.realpath(__file__))[0], '..') self.mongodb=None if zip_path: ...
{"/controllers/core.py": ["/controllers/search.py", "/controllers/taskinfo.py"]}
97,575
mybui/eloqua-integration
refs/heads/master
/eloqua_client.py
from datetime import datetime, timedelta from dea.bulk.api import BulkClient from dea.bulk.definitions import ExportDefinition from dea.rest.api.cdo import RestCdoClient from requests.auth import HTTPBasicAuth import config from logging_config import setup_logging logger = setup_logging(__name__) class ElqClient: ...
{"/eloqua_client.py": ["/config.py", "/logging_config.py"], "/database.py": ["/logging_config.py"], "/export_db.py": ["/settings.py", "/app.py", "/database.py", "/eloqua_client.py", "/logging_config.py"], "/app.py": ["/settings.py", "/database.py", "/eloqua_client.py", "/logging_config.py", "/schema_validator.py"], "/i...
97,576
mybui/eloqua-integration
refs/heads/master
/logging_config.py
import json import logging.config # Global private-ish flag for logging setup. _IS_LOGGING_SET_UP = False def setup_logging(logger_name, logging_config="logging.json"): global _IS_LOGGING_SET_UP # Load the logger configuration only once. if not _IS_LOGGING_SET_UP: with open(logging_config, "r") ...
{"/eloqua_client.py": ["/config.py", "/logging_config.py"], "/database.py": ["/logging_config.py"], "/export_db.py": ["/settings.py", "/app.py", "/database.py", "/eloqua_client.py", "/logging_config.py"], "/app.py": ["/settings.py", "/database.py", "/eloqua_client.py", "/logging_config.py", "/schema_validator.py"], "/i...
97,577
mybui/eloqua-integration
refs/heads/master
/database.py
from flask import g, current_app from pymongo import MongoClient from logging_config import setup_logging from datetime import datetime, timedelta logger = setup_logging(__name__) def get_db(): if "db" not in g: g.db = Database() return g.db class Database: def __init__(self): self._c...
{"/eloqua_client.py": ["/config.py", "/logging_config.py"], "/database.py": ["/logging_config.py"], "/export_db.py": ["/settings.py", "/app.py", "/database.py", "/eloqua_client.py", "/logging_config.py"], "/app.py": ["/settings.py", "/database.py", "/eloqua_client.py", "/logging_config.py", "/schema_validator.py"], "/i...
97,578
mybui/eloqua-integration
refs/heads/master
/config.py
from dea.bulk.eml import eml activity_cdo_id = "46" institution_cdo_id = "45" activity_import_def = { "Meeting_Type": "{{CustomObject[46].Field[587]}}", "Meeting_SubType": "{{CustomObject[46].Field[588]}}", "Meeting_ID": "{{CustomObject[46].Field[585]}}", "Start_Time": "{{CustomObject[46].Field[589]}...
{"/eloqua_client.py": ["/config.py", "/logging_config.py"], "/database.py": ["/logging_config.py"], "/export_db.py": ["/settings.py", "/app.py", "/database.py", "/eloqua_client.py", "/logging_config.py"], "/app.py": ["/settings.py", "/database.py", "/eloqua_client.py", "/logging_config.py", "/schema_validator.py"], "/i...
97,579
mybui/eloqua-integration
refs/heads/master
/settings.py
from environs import Env env = Env() env.read_env() ELQ_USER = env("ELQ_USER") ELQ_PASSWORD = env("ELQ_PASSWORD") ELQ_BASE_URL = env("ELQ_BASE_URL") CLOUD_APP_DB_NAME = "eloqua-app-db" DB_USER = env("DB_USER") DB_PASSWORD = env("DB_PASSWORD")
{"/eloqua_client.py": ["/config.py", "/logging_config.py"], "/database.py": ["/logging_config.py"], "/export_db.py": ["/settings.py", "/app.py", "/database.py", "/eloqua_client.py", "/logging_config.py"], "/app.py": ["/settings.py", "/database.py", "/eloqua_client.py", "/logging_config.py", "/schema_validator.py"], "/i...
97,580
mybui/eloqua-integration
refs/heads/master
/export_db.py
import settings from app import app from database import get_db from eloqua_client import ElqClient from logging_config import setup_logging import argparse logger = setup_logging(__name__) def import_to_db(first_run): with app.app_context(): db = get_db() client = ElqClient(username=settings.EL...
{"/eloqua_client.py": ["/config.py", "/logging_config.py"], "/database.py": ["/logging_config.py"], "/export_db.py": ["/settings.py", "/app.py", "/database.py", "/eloqua_client.py", "/logging_config.py"], "/app.py": ["/settings.py", "/database.py", "/eloqua_client.py", "/logging_config.py", "/schema_validator.py"], "/i...
97,581
mybui/eloqua-integration
refs/heads/master
/app.py
from flask import Flask, jsonify, request from flask_httpauth import HTTPBasicAuth import settings from database import get_db from eloqua_client import ElqClient from logging_config import setup_logging from schema_validator import check_data_schema, activity_fields, institution_fields, person_activity_fields, \ ...
{"/eloqua_client.py": ["/config.py", "/logging_config.py"], "/database.py": ["/logging_config.py"], "/export_db.py": ["/settings.py", "/app.py", "/database.py", "/eloqua_client.py", "/logging_config.py"], "/app.py": ["/settings.py", "/database.py", "/eloqua_client.py", "/logging_config.py", "/schema_validator.py"], "/i...
97,582
mybui/eloqua-integration
refs/heads/master
/import_eloqua.py
import math import sys from dea import BulkClient from dea.bulk import CdoImportDefinition, ImportDefinition from dea.bulk.api.cdo import BulkCdoClient from dea.bulk.definitions import MapDataCardsConfig from dea.bulk.eml import eml from requests.auth import HTTPBasicAuth import config import settings from app import...
{"/eloqua_client.py": ["/config.py", "/logging_config.py"], "/database.py": ["/logging_config.py"], "/export_db.py": ["/settings.py", "/app.py", "/database.py", "/eloqua_client.py", "/logging_config.py"], "/app.py": ["/settings.py", "/database.py", "/eloqua_client.py", "/logging_config.py", "/schema_validator.py"], "/i...
97,583
mybui/eloqua-integration
refs/heads/master
/schema_validator.py
from logging_config import setup_logging import re logger = setup_logging(__name__) contact_fields = ["C_Firstname", "C_Lastname", "C_MobilePhone", "C_EmailAddress", "C_Salutation", "C_Country", "C_IM_CRM_Status1", "C_IM_CRM_Contact_ID1", "C_IM_CRM_Institution_ID1", "C_Company", "I...
{"/eloqua_client.py": ["/config.py", "/logging_config.py"], "/database.py": ["/logging_config.py"], "/export_db.py": ["/settings.py", "/app.py", "/database.py", "/eloqua_client.py", "/logging_config.py"], "/app.py": ["/settings.py", "/database.py", "/eloqua_client.py", "/logging_config.py", "/schema_validator.py"], "/i...
97,588
PaulinaMurzanska/Salon_kosmetyczny_heroku_version
refs/heads/master
/bookings/urls.py
from . import views from django.urls import path app_name = "bookings" urlpatterns = [ path("", views.MainPage.as_view(), name="main_page"), path("reservations", views.IndexView.as_view(), name="index"), path("<int:year>/<int:month>/<int:day>/", views.IndexView.as_view(), name="index"), path("add/", vi...
{"/bookings/forms.py": ["/bookings/models.py"], "/bookings/views.py": ["/bookings/forms.py", "/bookings/models.py"], "/bookings/admin.py": ["/bookings/models.py"]}
97,589
PaulinaMurzanska/Salon_kosmetyczny_heroku_version
refs/heads/master
/bookings/migrations/0002_auto_20201212_1227.py
# Generated by Django 3.1.4 on 2020-12-12 11:27 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('bookings', '0001_initial'), ] operations = [ migrations.AlterField( model_name='reservation', name='code', ...
{"/bookings/forms.py": ["/bookings/models.py"], "/bookings/views.py": ["/bookings/forms.py", "/bookings/models.py"], "/bookings/admin.py": ["/bookings/models.py"]}
97,590
PaulinaMurzanska/Salon_kosmetyczny_heroku_version
refs/heads/master
/bookings/models.py
from django.db import models import string import random from django.contrib.auth.models import User from datetime import timedelta # Create your models here. class Service(models.Model): name = models.CharField(max_length=150) description = models.CharField(max_length=300) duration = models.DurationFiel...
{"/bookings/forms.py": ["/bookings/models.py"], "/bookings/views.py": ["/bookings/forms.py", "/bookings/models.py"], "/bookings/admin.py": ["/bookings/models.py"]}
97,591
PaulinaMurzanska/Salon_kosmetyczny_heroku_version
refs/heads/master
/bookings/migrations/0003_auto_20210425_1042.py
# Generated by Django 3.1.4 on 2021-04-25 08:42 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('bookings', '0002_auto_20201212_1227'), ] operations = [ migrations.AlterField( model_name='reservation', name='statu...
{"/bookings/forms.py": ["/bookings/models.py"], "/bookings/views.py": ["/bookings/forms.py", "/bookings/models.py"], "/bookings/admin.py": ["/bookings/models.py"]}
97,592
PaulinaMurzanska/Salon_kosmetyczny_heroku_version
refs/heads/master
/bookings/migrations/0001_initial.py
# Generated by Django 3.1.4 on 2020-12-05 14:25 import datetime from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL)...
{"/bookings/forms.py": ["/bookings/models.py"], "/bookings/views.py": ["/bookings/forms.py", "/bookings/models.py"], "/bookings/admin.py": ["/bookings/models.py"]}
97,593
PaulinaMurzanska/Salon_kosmetyczny_heroku_version
refs/heads/master
/bookings/forms.py
from datetime import time from django import forms from django.contrib.auth.models import User from django.forms import ValidationError from .models import Service, Reservation class BaseReservationForm(forms.Form): timestamp = forms.DateTimeField() service = forms.ModelChoiceField(Service.objects.all()) ...
{"/bookings/forms.py": ["/bookings/models.py"], "/bookings/views.py": ["/bookings/forms.py", "/bookings/models.py"], "/bookings/admin.py": ["/bookings/models.py"]}
97,594
PaulinaMurzanska/Salon_kosmetyczny_heroku_version
refs/heads/master
/bookings/context_processors.py
from django.conf import settings def site_name(request): return { "site_name": settings.SITE_NAME, }
{"/bookings/forms.py": ["/bookings/models.py"], "/bookings/views.py": ["/bookings/forms.py", "/bookings/models.py"], "/bookings/admin.py": ["/bookings/models.py"]}
97,595
PaulinaMurzanska/Salon_kosmetyczny_heroku_version
refs/heads/master
/bookings/views.py
from datetime import datetime, timedelta, timezone, date from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib.auth.models import User from django.http import Http404 from django.shortcuts import render from django.views.generic import ListView, CreateView, DetailView, TemplateView from django....
{"/bookings/forms.py": ["/bookings/models.py"], "/bookings/views.py": ["/bookings/forms.py", "/bookings/models.py"], "/bookings/admin.py": ["/bookings/models.py"]}
97,596
PaulinaMurzanska/Salon_kosmetyczny_heroku_version
refs/heads/master
/bookings/admin.py
from django.contrib import admin from .models import Service, Reservation # Register your models here. class ServiceAdmin(admin.ModelAdmin): list_display = ["name", "duration", "price"] list_filter = ["name", "duration", "price"] search_fields = ["name", "duration", "description", "price"] class Reser...
{"/bookings/forms.py": ["/bookings/models.py"], "/bookings/views.py": ["/bookings/forms.py", "/bookings/models.py"], "/bookings/admin.py": ["/bookings/models.py"]}
97,656
susansfy/apitest
refs/heads/master
/ddttest1.py
#coding:utf-8 import unittest from ddt import ddt,data,file_data,unpack @ddt class FooTest(unittest.TestCase): @file_data('test_dict.json') def test_file_data_json_dict(self,start,end,value): print "this is start" print start print "this is end" print end print "t...
{"/casetest2.py": ["/readExcel.py", "/sendRequest.py"], "/sendRequest.py": ["/readExcel.py"], "/run_main.py": ["/casetest2.py"]}
97,657
susansfy/apitest
refs/heads/master
/casetest2.py
#coding:utf-8 ''' Created on 2018年12月27日 @author: susan ''' import unittest import requests from ddt import ddt,data,unpack import os import json from readExcel import ReadExcel from sendRequest import SendRequest import string filename = "D:\\learn\\Python\\codetest\\ddttest\\ddttest1.xlsx" sheetna...
{"/casetest2.py": ["/readExcel.py", "/sendRequest.py"], "/sendRequest.py": ["/readExcel.py"], "/run_main.py": ["/casetest2.py"]}
97,658
susansfy/apitest
refs/heads/master
/sendRequest.py
#coding:utf-8 from readExcel import ReadExcel import requests import json class SendRequest(): """docstring for SendRequest""" def sendRequests(self,s,apiData): try: method = apiData["method"] url = apiData["url"] if apiData["params"] == "": par = None else: par = eval(apiData...
{"/casetest2.py": ["/readExcel.py", "/sendRequest.py"], "/sendRequest.py": ["/readExcel.py"], "/run_main.py": ["/casetest2.py"]}
97,659
susansfy/apitest
refs/heads/master
/run_main.py
#! /usr/bin/env python ??? #coding:utf-8 ''' Created on 2019年1月4日 @author: susan ''' import unittest import time import os from casetest2 import Test1 import HTMLTestRunner report_path = "D:\\learn\\Python\\codetest\\ddttest\\report\\" if __name__ == '__main__': # suite = unittest.TestSuite() # suite.addTes...
{"/casetest2.py": ["/readExcel.py", "/sendRequest.py"], "/sendRequest.py": ["/readExcel.py"], "/run_main.py": ["/casetest2.py"]}
97,660
susansfy/apitest
refs/heads/master
/readExcel.py
#coding:utf-8 import xlrd class ReadExcel(): def __init__(self,fileName,SheetName="Sheet1"): self.data = xlrd.open_workbook(fileName) self.table = self.data.sheet_by_name(SheetName) #获取总行数、列数 self.nrows = self.table.nrows self.ncols = self.table.ncols def readExcel(self): if s...
{"/casetest2.py": ["/readExcel.py", "/sendRequest.py"], "/sendRequest.py": ["/readExcel.py"], "/run_main.py": ["/casetest2.py"]}
97,685
abikonya/logistic-bot
refs/heads/master
/bot_app/examples_req.py
from bot_app import api_func import requests import json from bot_app import localization from vedis import Vedis from bot_app import tech_info from logistic_bot import settings # a = api_func.Api() # # a.set_user_id(telegram_id='test', user_id='D87hd487ft4') # a.set_zipcode('test', 33815) # print(a.return_param('test...
{"/bot_app/urls.py": ["/bot_app/views.py"], "/statistic_site/views.py": ["/bot_app/api_func.py", "/bot_app/models.py", "/bot_app/dbworker.py", "/bot_app/config.py"], "/bot_app/views.py": ["/bot_app/models.py", "/bot_app/dbworker.py"], "/statistic_site/admin.py": ["/bot_app/models.py", "/statistic_site/models.py"], "/bo...
97,686
abikonya/logistic-bot
refs/heads/master
/bot_app/urls.py
from django.conf.urls import url from .views import UpdateBot app_name = 'bot_app' urlpatterns = [ url(r'^827637721:AAHZAkFOMR3bSdLWhMvRktHvzR738zj2qdM/', UpdateBot.as_view(), name='update'), ]
{"/bot_app/urls.py": ["/bot_app/views.py"], "/statistic_site/views.py": ["/bot_app/api_func.py", "/bot_app/models.py", "/bot_app/dbworker.py", "/bot_app/config.py"], "/bot_app/views.py": ["/bot_app/models.py", "/bot_app/dbworker.py"], "/statistic_site/admin.py": ["/bot_app/models.py", "/statistic_site/models.py"], "/bo...
97,687
abikonya/logistic-bot
refs/heads/master
/logistic_bot/gunicorn.conf.py
command = '/root/logistic-bot/venv/bin/gunicorn' pythonpath = '/root/logistic-bot' bind = '127.0.0.1:8000' workers = 3
{"/bot_app/urls.py": ["/bot_app/views.py"], "/statistic_site/views.py": ["/bot_app/api_func.py", "/bot_app/models.py", "/bot_app/dbworker.py", "/bot_app/config.py"], "/bot_app/views.py": ["/bot_app/models.py", "/bot_app/dbworker.py"], "/statistic_site/admin.py": ["/bot_app/models.py", "/statistic_site/models.py"], "/bo...
97,688
abikonya/logistic-bot
refs/heads/master
/statistic_site/views.py
from django.shortcuts import render from django.http import HttpResponseRedirect, HttpResponse, HttpRequest from django.views.generic import TemplateView, View from django.views.generic.edit import FormView from django.contrib.auth.forms import AuthenticationForm from django.contrib.auth import login, logout from bot_a...
{"/bot_app/urls.py": ["/bot_app/views.py"], "/statistic_site/views.py": ["/bot_app/api_func.py", "/bot_app/models.py", "/bot_app/dbworker.py", "/bot_app/config.py"], "/bot_app/views.py": ["/bot_app/models.py", "/bot_app/dbworker.py"], "/statistic_site/admin.py": ["/bot_app/models.py", "/statistic_site/models.py"], "/bo...
97,689
abikonya/logistic-bot
refs/heads/master
/bot_app/views.py
import re import time import telebot from rest_framework.response import Response from rest_framework.views import APIView from telebot import types from bot_app import api_func from bot_app import config from bot_app import localization from bot_app import tech_info from .models import AuthorizedCustomers from .dbwo...
{"/bot_app/urls.py": ["/bot_app/views.py"], "/statistic_site/views.py": ["/bot_app/api_func.py", "/bot_app/models.py", "/bot_app/dbworker.py", "/bot_app/config.py"], "/bot_app/views.py": ["/bot_app/models.py", "/bot_app/dbworker.py"], "/statistic_site/admin.py": ["/bot_app/models.py", "/statistic_site/models.py"], "/bo...
97,690
abikonya/logistic-bot
refs/heads/master
/logistic_bot/test.py
# import requests # import json # from datetime import datetime # # from bot_app.models import ConnectedApi # # # # # # def api_checker(api_address, zip, tuser, a='fnc.api.zip.getdistance'): # # # # # # # # # url = '{api_address}?a={a}&zip={zip}&tuser={tuser}'.format(api_address=api_address, a=a, zip=zip, tuser=tus...
{"/bot_app/urls.py": ["/bot_app/views.py"], "/statistic_site/views.py": ["/bot_app/api_func.py", "/bot_app/models.py", "/bot_app/dbworker.py", "/bot_app/config.py"], "/bot_app/views.py": ["/bot_app/models.py", "/bot_app/dbworker.py"], "/statistic_site/admin.py": ["/bot_app/models.py", "/statistic_site/models.py"], "/bo...
97,691
abikonya/logistic-bot
refs/heads/master
/bot_app/config.py
''' Файл конфигурационных переменных ''' #telegram bots_site = 'https://myculinary.ru/bot/827637721:AAHZAkFOMR3bSdLWhMvRktHvzR738zj2qdM' token = '827637721:AAHZAkFOMR3bSdLWhMvRktHvzR738zj2qdM' #bitcoin wallet_id = 'fde7f71c-3c5b-45ad-bf60-8736d92e3ae6' wallet_pass = 'lkebalsdu771WJndssR0!nccvLhG' host = 'http://l...
{"/bot_app/urls.py": ["/bot_app/views.py"], "/statistic_site/views.py": ["/bot_app/api_func.py", "/bot_app/models.py", "/bot_app/dbworker.py", "/bot_app/config.py"], "/bot_app/views.py": ["/bot_app/models.py", "/bot_app/dbworker.py"], "/statistic_site/admin.py": ["/bot_app/models.py", "/statistic_site/models.py"], "/bo...
97,692
abikonya/logistic-bot
refs/heads/master
/statistic_site/urls.py
from django.conf.urls import url from statistic_site import views app_name = 'statistic_site' urlpatterns = [ url(r'^$', views.MainView.as_view(), name='main'), url(r'^login/$', views.LoginFormView.as_view(), name='login'), url(r'^logout/$', views.LogoutView.as_view(), name='logout'), url(r'^getWallet...
{"/bot_app/urls.py": ["/bot_app/views.py"], "/statistic_site/views.py": ["/bot_app/api_func.py", "/bot_app/models.py", "/bot_app/dbworker.py", "/bot_app/config.py"], "/bot_app/views.py": ["/bot_app/models.py", "/bot_app/dbworker.py"], "/statistic_site/admin.py": ["/bot_app/models.py", "/statistic_site/models.py"], "/bo...
97,693
abikonya/logistic-bot
refs/heads/master
/statistic_site/admin.py
from django.contrib import admin from bot_app.models import User, Statuses, Products, Payments from statistic_site.models import Statistic from django.conf.urls import url from django.template.response import TemplateResponse from django.http import HttpResponseRedirect from django.db.models import Sum class Statisti...
{"/bot_app/urls.py": ["/bot_app/views.py"], "/statistic_site/views.py": ["/bot_app/api_func.py", "/bot_app/models.py", "/bot_app/dbworker.py", "/bot_app/config.py"], "/bot_app/views.py": ["/bot_app/models.py", "/bot_app/dbworker.py"], "/statistic_site/admin.py": ["/bot_app/models.py", "/statistic_site/models.py"], "/bo...
97,694
abikonya/logistic-bot
refs/heads/master
/bot_app/api_func.py
import requests import json from vedis import Vedis import os from bot_app.models import ConnectedApi base_dir = os.path.dirname(os.path.abspath(__file__)) os.path.join(base_dir, 'accounts_info.vdb') def set_api_address(telegram_id, api_address, get_distance, get_all, add_data, get_category, get_items, get_status, p...
{"/bot_app/urls.py": ["/bot_app/views.py"], "/statistic_site/views.py": ["/bot_app/api_func.py", "/bot_app/models.py", "/bot_app/dbworker.py", "/bot_app/config.py"], "/bot_app/views.py": ["/bot_app/models.py", "/bot_app/dbworker.py"], "/statistic_site/admin.py": ["/bot_app/models.py", "/statistic_site/models.py"], "/bo...
97,695
abikonya/logistic-bot
refs/heads/master
/bot_app/localization.py
''' Файл переводов. Translations file. ''' from vedis import Vedis import os base_dir = os.path.dirname(os.path.abspath(__file__)) def add_translation(name, language, translation): with Vedis(os.path.join(base_dir, 'localization.vdb')) as db: try: position = db.Hash(name) pos...
{"/bot_app/urls.py": ["/bot_app/views.py"], "/statistic_site/views.py": ["/bot_app/api_func.py", "/bot_app/models.py", "/bot_app/dbworker.py", "/bot_app/config.py"], "/bot_app/views.py": ["/bot_app/models.py", "/bot_app/dbworker.py"], "/statistic_site/admin.py": ["/bot_app/models.py", "/statistic_site/models.py"], "/bo...
97,696
abikonya/logistic-bot
refs/heads/master
/bot_app/admin.py
from django.contrib import admin from bot_app.models import AuthorizedCustomers, Products, Statuses, Payments, ConnectedApi, Tickets from bot_app.models import (User as MyUser) from django.utils.translation import ugettext_lazy as _ from django import forms from django.contrib.auth.admin import UserAdmin as BaseUserAdm...
{"/bot_app/urls.py": ["/bot_app/views.py"], "/statistic_site/views.py": ["/bot_app/api_func.py", "/bot_app/models.py", "/bot_app/dbworker.py", "/bot_app/config.py"], "/bot_app/views.py": ["/bot_app/models.py", "/bot_app/dbworker.py"], "/statistic_site/admin.py": ["/bot_app/models.py", "/statistic_site/models.py"], "/bo...
97,697
abikonya/logistic-bot
refs/heads/master
/statistic_site/apps.py
from django.apps import AppConfig class StatisticSiteConfig(AppConfig): name = 'statistic_site'
{"/bot_app/urls.py": ["/bot_app/views.py"], "/statistic_site/views.py": ["/bot_app/api_func.py", "/bot_app/models.py", "/bot_app/dbworker.py", "/bot_app/config.py"], "/bot_app/views.py": ["/bot_app/models.py", "/bot_app/dbworker.py"], "/statistic_site/admin.py": ["/bot_app/models.py", "/statistic_site/models.py"], "/bo...
97,698
abikonya/logistic-bot
refs/heads/master
/bot_app/models.py
from django.db import models from django.contrib.auth.base_user import AbstractBaseUser from django.contrib.auth.base_user import AbstractBaseUser from django.contrib.auth.models import PermissionsMixin, UnicodeUsernameValidator, UserManager from django.utils.translation import ugettext_lazy as _ from django.utils impo...
{"/bot_app/urls.py": ["/bot_app/views.py"], "/statistic_site/views.py": ["/bot_app/api_func.py", "/bot_app/models.py", "/bot_app/dbworker.py", "/bot_app/config.py"], "/bot_app/views.py": ["/bot_app/models.py", "/bot_app/dbworker.py"], "/statistic_site/admin.py": ["/bot_app/models.py", "/statistic_site/models.py"], "/bo...
97,699
abikonya/logistic-bot
refs/heads/master
/bot_app/tech_info.py
''' Файл хранения технической информации (выбранный язык, позиция, оффсет и кол-во страниц ответа). Technical information file (language, position, offset and pages of answer). ''' from vedis import Vedis import os base_dir = os.path.dirname(os.path.abspath(__file__)) def set_language(telegram_id, language): ...
{"/bot_app/urls.py": ["/bot_app/views.py"], "/statistic_site/views.py": ["/bot_app/api_func.py", "/bot_app/models.py", "/bot_app/dbworker.py", "/bot_app/config.py"], "/bot_app/views.py": ["/bot_app/models.py", "/bot_app/dbworker.py"], "/statistic_site/admin.py": ["/bot_app/models.py", "/statistic_site/models.py"], "/bo...
97,700
abikonya/logistic-bot
refs/heads/master
/statistic_site/models.py
from django.db import models from bot_app.models import User class Statistic(models.Model): user = models.CharField(max_length=64, verbose_name='Имя пользователя') canceled = models.IntegerField(verbose_name='Отменено') process = models.IntegerField(verbose_name='В процессе') confirm = models.Integer...
{"/bot_app/urls.py": ["/bot_app/views.py"], "/statistic_site/views.py": ["/bot_app/api_func.py", "/bot_app/models.py", "/bot_app/dbworker.py", "/bot_app/config.py"], "/bot_app/views.py": ["/bot_app/models.py", "/bot_app/dbworker.py"], "/statistic_site/admin.py": ["/bot_app/models.py", "/statistic_site/models.py"], "/bo...
97,701
abikonya/logistic-bot
refs/heads/master
/bot_app/dbworker.py
from .models import Products, Statuses, Payments from . import api_func import requests import json import math currency_url = 'https://blockchain.info/ticker' currency = requests.get(currency_url) currency_to_usd = json.loads(currency.text)['USD'] def add_product(telegram_id): query = Products(api=api_func.re...
{"/bot_app/urls.py": ["/bot_app/views.py"], "/statistic_site/views.py": ["/bot_app/api_func.py", "/bot_app/models.py", "/bot_app/dbworker.py", "/bot_app/config.py"], "/bot_app/views.py": ["/bot_app/models.py", "/bot_app/dbworker.py"], "/statistic_site/admin.py": ["/bot_app/models.py", "/statistic_site/models.py"], "/bo...
97,764
natan04/winrmlib
refs/heads/master
/winrmlib/shell.py
# (c) 2015, Ian Clegg <ian.clegg@sourcewarp.com> # # winrmlib is 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 l...
{"/winrmlib/shell.py": ["/winrmlib/api/session.py", "/winrmlib/api/resourcelocator.py"], "/winrmlib/tests/test_shell.py": ["/winrmlib/shell.py"], "/winrmlib/api/session.py": ["/winrmlib/api/service.py", "/winrmlib/api/resourcelocator.py"], "/winrmlib/client.py": ["/winrmlib/shell.py"], "/winrmlib/api/service.py": ["/wi...
97,765
natan04/winrmlib
refs/heads/master
/winrmlib/api/resourcelocator.py
# (c) 2015, Ian Clegg <ian.clegg@sourcewarp.com> # # winrmlib is 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 l...
{"/winrmlib/shell.py": ["/winrmlib/api/session.py", "/winrmlib/api/resourcelocator.py"], "/winrmlib/tests/test_shell.py": ["/winrmlib/shell.py"], "/winrmlib/api/session.py": ["/winrmlib/api/service.py", "/winrmlib/api/resourcelocator.py"], "/winrmlib/client.py": ["/winrmlib/shell.py"], "/winrmlib/api/service.py": ["/wi...
97,766
natan04/winrmlib
refs/heads/master
/winrmlib/tests/test_shell.py
# (c) 2015, Ian Clegg <ian.clegg@sourcewarp.com> # # winrmlib is 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 l...
{"/winrmlib/shell.py": ["/winrmlib/api/session.py", "/winrmlib/api/resourcelocator.py"], "/winrmlib/tests/test_shell.py": ["/winrmlib/shell.py"], "/winrmlib/api/session.py": ["/winrmlib/api/service.py", "/winrmlib/api/resourcelocator.py"], "/winrmlib/client.py": ["/winrmlib/shell.py"], "/winrmlib/api/service.py": ["/wi...
97,767
natan04/winrmlib
refs/heads/master
/winrmlib/api/session.py
# (c) 2015, Ian Clegg <ian.clegg@sourcewarp.com> # # winrmlib is 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 l...
{"/winrmlib/shell.py": ["/winrmlib/api/session.py", "/winrmlib/api/resourcelocator.py"], "/winrmlib/tests/test_shell.py": ["/winrmlib/shell.py"], "/winrmlib/api/session.py": ["/winrmlib/api/service.py", "/winrmlib/api/resourcelocator.py"], "/winrmlib/client.py": ["/winrmlib/shell.py"], "/winrmlib/api/service.py": ["/wi...
97,768
natan04/winrmlib
refs/heads/master
/winrmlib/client.py
# (c) 2015, Ian Clegg <ian.clegg@sourcewarp.com> # # winrmlib is 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 l...
{"/winrmlib/shell.py": ["/winrmlib/api/session.py", "/winrmlib/api/resourcelocator.py"], "/winrmlib/tests/test_shell.py": ["/winrmlib/shell.py"], "/winrmlib/api/session.py": ["/winrmlib/api/service.py", "/winrmlib/api/resourcelocator.py"], "/winrmlib/client.py": ["/winrmlib/shell.py"], "/winrmlib/api/service.py": ["/wi...
97,769
natan04/winrmlib
refs/heads/master
/winrmlib/api/authentication.py
# (c) 2015, Ian Clegg <ian.clegg@sourcewarp.com> # # winrmlib is 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 l...
{"/winrmlib/shell.py": ["/winrmlib/api/session.py", "/winrmlib/api/resourcelocator.py"], "/winrmlib/tests/test_shell.py": ["/winrmlib/shell.py"], "/winrmlib/api/session.py": ["/winrmlib/api/service.py", "/winrmlib/api/resourcelocator.py"], "/winrmlib/client.py": ["/winrmlib/shell.py"], "/winrmlib/api/service.py": ["/wi...
97,770
natan04/winrmlib
refs/heads/master
/winrmlib/api/service.py
# (c) 2015, Ian Clegg <ian.clegg@sourcewarp.com> # # winrmlib is 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 l...
{"/winrmlib/shell.py": ["/winrmlib/api/session.py", "/winrmlib/api/resourcelocator.py"], "/winrmlib/tests/test_shell.py": ["/winrmlib/shell.py"], "/winrmlib/api/session.py": ["/winrmlib/api/service.py", "/winrmlib/api/resourcelocator.py"], "/winrmlib/client.py": ["/winrmlib/shell.py"], "/winrmlib/api/service.py": ["/wi...
97,771
natan04/winrmlib
refs/heads/master
/winrmlib/tests/test_service.py
# (c) 2015, Ian Clegg <ian.clegg@sourcewarp.com> # # winrmlib is 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 l...
{"/winrmlib/shell.py": ["/winrmlib/api/session.py", "/winrmlib/api/resourcelocator.py"], "/winrmlib/tests/test_shell.py": ["/winrmlib/shell.py"], "/winrmlib/api/session.py": ["/winrmlib/api/service.py", "/winrmlib/api/resourcelocator.py"], "/winrmlib/client.py": ["/winrmlib/shell.py"], "/winrmlib/api/service.py": ["/wi...
97,772
natan04/winrmlib
refs/heads/master
/winrmlib/api/compression.py
# (c) 2015, Ian Clegg <ian.clegg@sourcewarp.com> # # winrmlib is 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 l...
{"/winrmlib/shell.py": ["/winrmlib/api/session.py", "/winrmlib/api/resourcelocator.py"], "/winrmlib/tests/test_shell.py": ["/winrmlib/shell.py"], "/winrmlib/api/session.py": ["/winrmlib/api/service.py", "/winrmlib/api/resourcelocator.py"], "/winrmlib/client.py": ["/winrmlib/shell.py"], "/winrmlib/api/service.py": ["/wi...
97,773
natan04/winrmlib
refs/heads/master
/winrmlib/api/kerberoshandler.py
# import suds.transport.https # import suds.transport.http # # #!/usr/bin/python # # # urllib2 GSS-API (SPNEGO) using PyKerberos # # # 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 # # ...
{"/winrmlib/shell.py": ["/winrmlib/api/session.py", "/winrmlib/api/resourcelocator.py"], "/winrmlib/tests/test_shell.py": ["/winrmlib/shell.py"], "/winrmlib/api/session.py": ["/winrmlib/api/service.py", "/winrmlib/api/resourcelocator.py"], "/winrmlib/client.py": ["/winrmlib/shell.py"], "/winrmlib/api/service.py": ["/wi...
97,837
WhoIsAA/RaspberryPi
refs/heads/master
/car/CarControl.py
import curses import json import atexit from RPi import GPIO from car.smartcar import SmartCar # 初始化GPIO GPIO.setwarnings(False) GPIO.setmode(GPIO.BOARD) atexit.register(GPIO.cleanup) red_left = 13 red_right = 12 GPIO.setup((red_left, red_right), GPIO.IN) # 读取配置文件 with open("config.json") as file: config = json....
{"/car/CarControl.py": ["/car/smartcar.py"], "/url.py": ["/handler/index.py", "/handler/car.py"], "/handler/car.py": ["/car/smartcar.py", "/handler/base.py"], "/handler/index.py": ["/handler/base.py"], "/test.py": ["/handler/base.py", "/car/smartcar.py"], "/car/CarControlTest.py": ["/car/smartcar.py"], "/server.py": ["...
97,838
WhoIsAA/RaspberryPi
refs/heads/master
/methods/qiniu.py
#!/usr/bin/env python3 # coding=utf-8 import hashlib import json import os import requests import MySQLdb from qiniu import Auth, put_file, etag, BucketManager class Qiniu: def __init__(self): self._bucket_url = "" self._access_key = "" self._secret_key = "" self._bucket_name = ""...
{"/car/CarControl.py": ["/car/smartcar.py"], "/url.py": ["/handler/index.py", "/handler/car.py"], "/handler/car.py": ["/car/smartcar.py", "/handler/base.py"], "/handler/index.py": ["/handler/base.py"], "/test.py": ["/handler/base.py", "/car/smartcar.py"], "/car/CarControlTest.py": ["/car/smartcar.py"], "/server.py": ["...
97,839
WhoIsAA/RaspberryPi
refs/heads/master
/url.py
#!/usr/bin/env python3 # coding=utf-8 from handler.index import IndexHandler from handler.car import ConnectTestHandler, CarControlHandler, ServoControlHandler, CameraControlHandler url = [ (r'/', IndexHandler), (r'/carpi/connect_test', ConnectTestHandler), (r'/carpi/car', CarControlHandler), (r'/carp...
{"/car/CarControl.py": ["/car/smartcar.py"], "/url.py": ["/handler/index.py", "/handler/car.py"], "/handler/car.py": ["/car/smartcar.py", "/handler/base.py"], "/handler/index.py": ["/handler/base.py"], "/test.py": ["/handler/base.py", "/car/smartcar.py"], "/car/CarControlTest.py": ["/car/smartcar.py"], "/server.py": ["...
97,840
WhoIsAA/RaspberryPi
refs/heads/master
/handler/car.py
#!/usr/bin/env python3 # coding=utf-8 import atexit import json from RPi import GPIO from car.smartcar import SmartCar from handler.base import BaseHandler # 初始化GPIO GPIO.setwarnings(False) GPIO.setmode(GPIO.BOARD) atexit.register(GPIO.cleanup) # 打开配置文件,初始化小车实例 with open("./static/config.json") as file: config = j...
{"/car/CarControl.py": ["/car/smartcar.py"], "/url.py": ["/handler/index.py", "/handler/car.py"], "/handler/car.py": ["/car/smartcar.py", "/handler/base.py"], "/handler/index.py": ["/handler/base.py"], "/test.py": ["/handler/base.py", "/car/smartcar.py"], "/car/CarControlTest.py": ["/car/smartcar.py"], "/server.py": ["...
97,841
WhoIsAA/RaspberryPi
refs/heads/master
/handler/index.py
#!/usr/bin/env python3 # coding=utf-8 from handler.base import BaseHandler class IndexHandler(BaseHandler): def get(self, *args, **kwargs): self.render("index.html") def post(self, *args, **kwargs): self.write(self.error_json("To be completed"))
{"/car/CarControl.py": ["/car/smartcar.py"], "/url.py": ["/handler/index.py", "/handler/car.py"], "/handler/car.py": ["/car/smartcar.py", "/handler/base.py"], "/handler/index.py": ["/handler/base.py"], "/test.py": ["/handler/base.py", "/car/smartcar.py"], "/car/CarControlTest.py": ["/car/smartcar.py"], "/server.py": ["...
97,842
WhoIsAA/RaspberryPi
refs/heads/master
/car/smartcar.py
import atexit from RPi import GPIO from car.module import SG90, Infrared, L298N, Camera class SmartCar(object): def __init__(self, config): GPIO.setwarnings(False) GPIO.setmode(GPIO.BOARD) atexit.register(GPIO.cleanup) self.init_l298n(config["l298n"]) self.init_sg90(confi...
{"/car/CarControl.py": ["/car/smartcar.py"], "/url.py": ["/handler/index.py", "/handler/car.py"], "/handler/car.py": ["/car/smartcar.py", "/handler/base.py"], "/handler/index.py": ["/handler/base.py"], "/test.py": ["/handler/base.py", "/car/smartcar.py"], "/car/CarControlTest.py": ["/car/smartcar.py"], "/server.py": ["...
97,843
WhoIsAA/RaspberryPi
refs/heads/master
/test.py
#!/usr/bin/env python3 # coding=utf-8 import json import threading from time import sleep from handler.base import BaseHandler from car.smartcar import SmartCar class CarHandler(BaseHandler): def __init__(self, application, request, **kwargs): super().__init__(application, request, **kwargs) self...
{"/car/CarControl.py": ["/car/smartcar.py"], "/url.py": ["/handler/index.py", "/handler/car.py"], "/handler/car.py": ["/car/smartcar.py", "/handler/base.py"], "/handler/index.py": ["/handler/base.py"], "/test.py": ["/handler/base.py", "/car/smartcar.py"], "/car/CarControlTest.py": ["/car/smartcar.py"], "/server.py": ["...
97,844
WhoIsAA/RaspberryPi
refs/heads/master
/car/module/SG90.py
from RPi import GPIO from time import sleep class SG90: def __init__(self, config): GPIO.setup(config["pin"], GPIO.OUT, initial=GPIO.LOW) self.servo = GPIO.PWM(config["pin"], 50) self.servo.start(0) self.current_angle = config["angle"] self.init_angle = self.current_angle ...
{"/car/CarControl.py": ["/car/smartcar.py"], "/url.py": ["/handler/index.py", "/handler/car.py"], "/handler/car.py": ["/car/smartcar.py", "/handler/base.py"], "/handler/index.py": ["/handler/base.py"], "/test.py": ["/handler/base.py", "/car/smartcar.py"], "/car/CarControlTest.py": ["/car/smartcar.py"], "/server.py": ["...
97,845
WhoIsAA/RaspberryPi
refs/heads/master
/car/module/L298N.py
from RPi import GPIO from time import sleep class L298N: # 右轮 # in1 = 31 # in2 = 33 # 左轮 # in3 = 35 # in4 = 37 def __init__(self, config): self.pinlist = config["pin"] GPIO.setwarnings(False) GPIO.setmode(GPIO.BOARD) GPIO.setup(self.pinlist, GPIO.OUT, initi...
{"/car/CarControl.py": ["/car/smartcar.py"], "/url.py": ["/handler/index.py", "/handler/car.py"], "/handler/car.py": ["/car/smartcar.py", "/handler/base.py"], "/handler/index.py": ["/handler/base.py"], "/test.py": ["/handler/base.py", "/car/smartcar.py"], "/car/CarControlTest.py": ["/car/smartcar.py"], "/server.py": ["...