index int64 | repo_name string | branch_name string | path string | content string | import_graph string |
|---|---|---|---|---|---|
40,462 | colobas/aics-shparam | refs/heads/main | /aicsshparam/shtools.py | import vtk
import pyshtools
import numpy as np
from typing import Tuple
from vtk.util import numpy_support
from skimage import transform as sktrans
from skimage import filters as skfilters
from skimage import morphology as skmorpho
from sklearn import decomposition as skdecomp
from scipy import interpolate as sciinterp... | {"/aicsshparam/shparam.py": ["/aicsshparam/__init__.py"]} |
40,463 | colobas/aics-shparam | refs/heads/main | /aicsshparam/tests/dummy_test.py | import numpy as np
def test_dummy():
a = np.ones((5, 5))
a[0, 0] = 2
assert np.any(a > 0)
| {"/aicsshparam/shparam.py": ["/aicsshparam/__init__.py"]} |
40,464 | colobas/aics-shparam | refs/heads/main | /aicsshparam/bin/__init__.py | # This is necessary here for packaging
| {"/aicsshparam/shparam.py": ["/aicsshparam/__init__.py"]} |
40,465 | colobas/aics-shparam | refs/heads/main | /aicsshparam/shparam.py | import warnings
import pyshtools
import numpy as np
from vtk.util import numpy_support
from skimage import transform as sktrans
from scipy import interpolate as spinterp
from . import shtools
def get_shcoeffs(
image: np.array,
lmax: int,
sigma: float = 0,
compute_lcc: bool = True,
alignment_2d: b... | {"/aicsshparam/shparam.py": ["/aicsshparam/__init__.py"]} |
40,466 | colobas/aics-shparam | refs/heads/main | /aicsshparam/__init__.py | # -*- coding: utf-8 -*-
"""Top-level package for aics-shparam."""
__author__ = "Matheus Viana"
__email__ = "matheus.viana@alleninstitute.org"
# Do not edit this string manually, always use bumpversion
# Details in CONTRIBUTING.md
__version__ = "0.1.1"
def get_module_version():
return __version__
| {"/aicsshparam/shparam.py": ["/aicsshparam/__init__.py"]} |
40,467 | fkchong/mydjsite02 | refs/heads/master | /empexp/apps.py | from django.apps import AppConfig
class EmpexpConfig(AppConfig):
name = 'empexp'
| {"/userprefbook/views.py": ["/userprefbook/forms.py", "/userprefbook/models.py"], "/empexp/models.py": ["/site02/models.py"], "/empexp/views.py": ["/empexp/forms.py"], "/userprefbook/admin.py": ["/userprefbook/models.py"], "/empexp/forms.py": ["/empexp/models.py"], "/userprefbook/forms.py": ["/userprefbook/models.py"]} |
40,468 | fkchong/mydjsite02 | refs/heads/master | /empexp/migrations/0002_auto_20210627_1310.py | # Generated by Django 3.1.12 on 2021-06-27 05:10
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('empexp', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='experience',
name='firstname',
),
... | {"/userprefbook/views.py": ["/userprefbook/forms.py", "/userprefbook/models.py"], "/empexp/models.py": ["/site02/models.py"], "/empexp/views.py": ["/empexp/forms.py"], "/userprefbook/admin.py": ["/userprefbook/models.py"], "/empexp/forms.py": ["/empexp/models.py"], "/userprefbook/forms.py": ["/userprefbook/models.py"]} |
40,469 | fkchong/mydjsite02 | refs/heads/master | /userprefbook/views.py | from django.shortcuts import render
from django.views.generic import FormView
from .forms import upbform, bookform
from .models import userprefbook
from django.contrib import messages
# Create your views here.
class upbformview(FormView):
model = userprefbook
form_class = upbform
template_name = "userprefb... | {"/userprefbook/views.py": ["/userprefbook/forms.py", "/userprefbook/models.py"], "/empexp/models.py": ["/site02/models.py"], "/empexp/views.py": ["/empexp/forms.py"], "/userprefbook/admin.py": ["/userprefbook/models.py"], "/empexp/forms.py": ["/empexp/models.py"], "/userprefbook/forms.py": ["/userprefbook/models.py"]} |
40,470 | fkchong/mydjsite02 | refs/heads/master | /empexp/models.py | from django.db import models
from django.contrib.auth.models import User
from site02.models import employee
# Create your models here.
class experience(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE)
employee = models.OneToOneField(employee, on_delete=models.CASCADE)
companyname = m... | {"/userprefbook/views.py": ["/userprefbook/forms.py", "/userprefbook/models.py"], "/empexp/models.py": ["/site02/models.py"], "/empexp/views.py": ["/empexp/forms.py"], "/userprefbook/admin.py": ["/userprefbook/models.py"], "/empexp/forms.py": ["/empexp/models.py"], "/userprefbook/forms.py": ["/userprefbook/models.py"]} |
40,471 | fkchong/mydjsite02 | refs/heads/master | /empexp/views.py | from django.shortcuts import render
from django.views.generic import FormView
from .forms import EmpExpModelForm
from django.contrib import messages
# Create your views here.
class MyEmpExpFormView(FormView):
form_class = EmpExpModelForm
template_name = "empexp/index.html"
def get_success_url(self):
... | {"/userprefbook/views.py": ["/userprefbook/forms.py", "/userprefbook/models.py"], "/empexp/models.py": ["/site02/models.py"], "/empexp/views.py": ["/empexp/forms.py"], "/userprefbook/admin.py": ["/userprefbook/models.py"], "/empexp/forms.py": ["/empexp/models.py"], "/userprefbook/forms.py": ["/userprefbook/models.py"]} |
40,472 | fkchong/mydjsite02 | refs/heads/master | /userprefbook/admin.py | from django.contrib import admin
from .models import book, userprefbook
# Register your models here.
admin.site.register(book)
admin.site.register(userprefbook) | {"/userprefbook/views.py": ["/userprefbook/forms.py", "/userprefbook/models.py"], "/empexp/models.py": ["/site02/models.py"], "/empexp/views.py": ["/empexp/forms.py"], "/userprefbook/admin.py": ["/userprefbook/models.py"], "/empexp/forms.py": ["/empexp/models.py"], "/userprefbook/forms.py": ["/userprefbook/models.py"]} |
40,473 | fkchong/mydjsite02 | refs/heads/master | /userprefbook/migrations/0001_initial.py | # Generated by Django 3.1.12 on 2021-06-29 01:17
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),
]
op... | {"/userprefbook/views.py": ["/userprefbook/forms.py", "/userprefbook/models.py"], "/empexp/models.py": ["/site02/models.py"], "/empexp/views.py": ["/empexp/forms.py"], "/userprefbook/admin.py": ["/userprefbook/models.py"], "/empexp/forms.py": ["/empexp/models.py"], "/userprefbook/forms.py": ["/userprefbook/models.py"]} |
40,474 | fkchong/mydjsite02 | refs/heads/master | /site02/models.py | from django.db import models
# Create your models here.
class employee(models.Model):
firstname = models.CharField(max_length=100)
lastname = models.CharField(max_length=100)
sex = models.CharField(max_length=20)
dob = models.DateField()
def __str__(self):
return f"{self.firstname}, {self.... | {"/userprefbook/views.py": ["/userprefbook/forms.py", "/userprefbook/models.py"], "/empexp/models.py": ["/site02/models.py"], "/empexp/views.py": ["/empexp/forms.py"], "/userprefbook/admin.py": ["/userprefbook/models.py"], "/empexp/forms.py": ["/empexp/models.py"], "/userprefbook/forms.py": ["/userprefbook/models.py"]} |
40,475 | fkchong/mydjsite02 | refs/heads/master | /empexp/forms.py | from django import forms
from .models import experience
from django.core.exceptions import ValidationError
class EmpExpModelForm(forms.ModelForm):
class Meta:
model = experience
fields = "__all__"
def clean_reasonofleaving(self):
reasonofleaving = self.cleaned_data.get('reasonofleaving... | {"/userprefbook/views.py": ["/userprefbook/forms.py", "/userprefbook/models.py"], "/empexp/models.py": ["/site02/models.py"], "/empexp/views.py": ["/empexp/forms.py"], "/userprefbook/admin.py": ["/userprefbook/models.py"], "/empexp/forms.py": ["/empexp/models.py"], "/userprefbook/forms.py": ["/userprefbook/models.py"]} |
40,476 | fkchong/mydjsite02 | refs/heads/master | /userprefbook/models.py | from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class book(models.Model):
name = models.CharField(max_length=200)
author = models.CharField(max_length=100)
publishyear = models.DateField()
def __str__(self):
return f"{self.name}, {self.author... | {"/userprefbook/views.py": ["/userprefbook/forms.py", "/userprefbook/models.py"], "/empexp/models.py": ["/site02/models.py"], "/empexp/views.py": ["/empexp/forms.py"], "/userprefbook/admin.py": ["/userprefbook/models.py"], "/empexp/forms.py": ["/empexp/models.py"], "/userprefbook/forms.py": ["/userprefbook/models.py"]} |
40,477 | fkchong/mydjsite02 | refs/heads/master | /site02/views.py | from django.shortcuts import render, HttpResponse
# Create your views here.
def appindex(request):
#return HttpResponse("This is app index page.")
progress = 'in progress'
value = 1999
context = {'status1':progress,'status2':value}
return render(request, 'app-about.html', context)
def aboutpost(re... | {"/userprefbook/views.py": ["/userprefbook/forms.py", "/userprefbook/models.py"], "/empexp/models.py": ["/site02/models.py"], "/empexp/views.py": ["/empexp/forms.py"], "/userprefbook/admin.py": ["/userprefbook/models.py"], "/empexp/forms.py": ["/empexp/models.py"], "/userprefbook/forms.py": ["/userprefbook/models.py"]} |
40,478 | fkchong/mydjsite02 | refs/heads/master | /userprefbook/apps.py | from django.apps import AppConfig
class UserprefbookConfig(AppConfig):
name = 'userprefbook'
| {"/userprefbook/views.py": ["/userprefbook/forms.py", "/userprefbook/models.py"], "/empexp/models.py": ["/site02/models.py"], "/empexp/views.py": ["/empexp/forms.py"], "/userprefbook/admin.py": ["/userprefbook/models.py"], "/empexp/forms.py": ["/empexp/models.py"], "/userprefbook/forms.py": ["/userprefbook/models.py"]} |
40,479 | fkchong/mydjsite02 | refs/heads/master | /site02/apps.py | from django.apps import AppConfig
class Site02Config(AppConfig):
name = 'site02'
| {"/userprefbook/views.py": ["/userprefbook/forms.py", "/userprefbook/models.py"], "/empexp/models.py": ["/site02/models.py"], "/empexp/views.py": ["/empexp/forms.py"], "/userprefbook/admin.py": ["/userprefbook/models.py"], "/empexp/forms.py": ["/empexp/models.py"], "/userprefbook/forms.py": ["/userprefbook/models.py"]} |
40,480 | fkchong/mydjsite02 | refs/heads/master | /userprefbook/forms.py | from django import forms
from .models import book, userprefbook
from django.core.exceptions import ValidationError
class bookform(forms.ModelForm):
class Meta:
model = book
fields = "__all__"
def clean_name(self):
name = self.cleaned_data.get('name')
if len(name) < 10:
... | {"/userprefbook/views.py": ["/userprefbook/forms.py", "/userprefbook/models.py"], "/empexp/models.py": ["/site02/models.py"], "/empexp/views.py": ["/empexp/forms.py"], "/userprefbook/admin.py": ["/userprefbook/models.py"], "/empexp/forms.py": ["/empexp/models.py"], "/userprefbook/forms.py": ["/userprefbook/models.py"]} |
40,481 | fkchong/mydjsite02 | refs/heads/master | /userprefbook/migrations/0003_userprefbook_remark.py | # Generated by Django 3.1.12 on 2021-06-29 05:40
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('userprefbook', '0002_remove_userprefbook_remark'),
]
operations = [
migrations.AddField(
model_name='userprefbook',
... | {"/userprefbook/views.py": ["/userprefbook/forms.py", "/userprefbook/models.py"], "/empexp/models.py": ["/site02/models.py"], "/empexp/views.py": ["/empexp/forms.py"], "/userprefbook/admin.py": ["/userprefbook/models.py"], "/empexp/forms.py": ["/empexp/models.py"], "/userprefbook/forms.py": ["/userprefbook/models.py"]} |
40,482 | fkchong/mydjsite02 | refs/heads/master | /userprefbook/migrations/0002_remove_userprefbook_remark.py | # Generated by Django 3.1.12 on 2021-06-29 05:37
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('userprefbook', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='userprefbook',
name='remark',
... | {"/userprefbook/views.py": ["/userprefbook/forms.py", "/userprefbook/models.py"], "/empexp/models.py": ["/site02/models.py"], "/empexp/views.py": ["/empexp/forms.py"], "/userprefbook/admin.py": ["/userprefbook/models.py"], "/empexp/forms.py": ["/empexp/models.py"], "/userprefbook/forms.py": ["/userprefbook/models.py"]} |
40,483 | IgorPodlawski/vending-machine-python | refs/heads/master | /Coin.py | class Coin:
symbol = ''
value = 0.00
def __init__(self, symbol: str, value: float):
self.symbol = symbol
self.value = value
| {"/VendingMachine.py": ["/Product.py", "/Coin.py"], "/main.py": ["/VendingMachine.py"], "/tests/test_machine.py": ["/Product.py", "/Coin.py", "/VendingMachine.py"]} |
40,484 | IgorPodlawski/vending-machine-python | refs/heads/master | /VendingMachine.py | from Product import Product
from Coin import Coin
import random
class VendingMachine:
name = ''
def __init__(self, name: str, **qwargs: dict):
self.name = name
self.insertedCoinsSum = 0.00
self.insertedCoins = []
self.slots = []
if qwargs.get('initialCash'):
self.cash = qwargs.get('... | {"/VendingMachine.py": ["/Product.py", "/Coin.py"], "/main.py": ["/VendingMachine.py"], "/tests/test_machine.py": ["/Product.py", "/Coin.py", "/VendingMachine.py"]} |
40,485 | IgorPodlawski/vending-machine-python | refs/heads/master | /main.py | from VendingMachine import VendingMachine
def loop():
print('press CTRL+C or CTLR+D to exit')
vm = VendingMachine('hospital', initialCash = 130)
vm.fill(32)
while True:
try:
data = input('MACHINE> ')
if (data == 'PRODUCTS'):
vm.productsList()
except (KeyboardInterrupt, EOFError):
... | {"/VendingMachine.py": ["/Product.py", "/Coin.py"], "/main.py": ["/VendingMachine.py"], "/tests/test_machine.py": ["/Product.py", "/Coin.py", "/VendingMachine.py"]} |
40,486 | IgorPodlawski/vending-machine-python | refs/heads/master | /Product.py | class Product:
name = ''
quantity = 0
price = 0.00
def __init__(self, name: str, quantity: int, price: float):
self.name = name
self.quantity = quantity
self.price = price
def increase(self):
self.quantity = self.quantity + 1
def decrease(self):
self.quantity = self.quantity - 1 | {"/VendingMachine.py": ["/Product.py", "/Coin.py"], "/main.py": ["/VendingMachine.py"], "/tests/test_machine.py": ["/Product.py", "/Coin.py", "/VendingMachine.py"]} |
40,487 | IgorPodlawski/vending-machine-python | refs/heads/master | /tests/test_machine.py | from Product import Product
from Coin import Coin
from VendingMachine import VendingMachine
def test_foo():
assert 2 + 2
def test_product_incease():
product = Product('Snickers', 0, 1.00)
product.increase()
assert 1 == product.quantity
def test_coin_defitinion():
dollar = Coin('DOLLAR', 1.00)
assert doll... | {"/VendingMachine.py": ["/Product.py", "/Coin.py"], "/main.py": ["/VendingMachine.py"], "/tests/test_machine.py": ["/Product.py", "/Coin.py", "/VendingMachine.py"]} |
40,509 | mg-blvd/Images-Website-HW4 | refs/heads/master | /txt_read_write_functions.py | '''Authors: Misael Guijarro && Jose Alfaro
Date: 04/02/2019
Class: CST 205
Teacher: Wes Modes
Description: Holds thst function that will write to the text file that keeps track
of the images we used in the last refresh.'''
# this function literally reads the names that are in former_images.txt
# it then 's... | {"/hw4.py": ["/txt_read_write_functions.py"]} |
40,510 | mg-blvd/Images-Website-HW4 | refs/heads/master | /hw4.py | '''Authors: Misael Guijarro && Jose Alfaro
Date: 04/02/2019
Class: CST 205
Teacher: Wes Modes
Description: The home page displays three randoms images. Once clicked they take you to
a separate page with the picture and a description of it.'''
from flask import Flask, render_template
from flask_bootstrap import Bootstra... | {"/hw4.py": ["/txt_read_write_functions.py"]} |
40,525 | SicParvisMagna95/rain_detection | refs/heads/master | /train.py | import model
import dataset
import torch
import torch.cuda as cuda
import torch.utils.data as Data
import torch.nn as nn
import torch.optim as Optim
import matplotlib.pyplot as plt
import os
from visdom import Visdom
import numpy as np
from loss import FocalLoss,FocalLoss_bce
# hyper-parameter
os.env... | {"/train.py": ["/model.py", "/dataset.py", "/loss.py"], "/main.py": ["/dataset.py", "/model.py"]} |
40,526 | SicParvisMagna95/rain_detection | refs/heads/master | /main.py | import torch
import dataset
import model
import cv2
import os
import torch.nn as nn
import numpy as np
import time
import torch.cuda as cuda
import glob
if __name__ == '__main__':
gpu_avail = cuda.is_available()
os.environ["CUDA_VISIBLE_DEVICES"] = "3"
scale = 0.8
img_dir = '/home/zh... | {"/train.py": ["/model.py", "/dataset.py", "/loss.py"], "/main.py": ["/dataset.py", "/model.py"]} |
40,527 | SicParvisMagna95/rain_detection | refs/heads/master | /model.py | import torch as torch
import torch.nn as nn
import torchvision
import torch.utils.model_zoo as model_zoo
__all__ = ['VGG', 'vgg11', 'vgg11_bn', 'vgg13', 'vgg13_bn', 'vgg16', 'vgg16_bn', 'vgg19_bn', 'vgg19',]
cfg = {
'A': [64, 'M', 128, 'M', 256, 256, 'M', 512, 512, 'M', 512, 512, 'M'],
'B': [64, 64, ... | {"/train.py": ["/model.py", "/dataset.py", "/loss.py"], "/main.py": ["/dataset.py", "/model.py"]} |
40,528 | SicParvisMagna95/rain_detection | refs/heads/master | /dataset.py | import torch
import torchvision.transforms as transforms
import torch.utils.data as Data
import os
import glob
import pickle
import numpy as np
class RainData(Data.Dataset):
def __init__(self, train=True):
super(RainData, self).__init__()
root = '/data/rain/rain_detection_train/cro... | {"/train.py": ["/model.py", "/dataset.py", "/loss.py"], "/main.py": ["/dataset.py", "/model.py"]} |
40,529 | SicParvisMagna95/rain_detection | refs/heads/master | /mess/test_time.py | import cv2
import torch
import time
import torch.cuda as cuda
import os
os.environ["CUDA_VISIBLE_DEVICES"] = "1"
gpu_avail = cuda.is_available()
if gpu_avail:
info = torch.load('./model_saved/accuracy_0.9762699947266655.pkl')
print('\nTest on gpu:')
else:
info = torch.load('./model_saved/accu... | {"/train.py": ["/model.py", "/dataset.py", "/loss.py"], "/main.py": ["/dataset.py", "/model.py"]} |
40,530 | SicParvisMagna95/rain_detection | refs/heads/master | /loss.py | import torch
import torch.nn as nn
import torch.nn.functional as F
# class FocalLoss(torch.nn.Module):
# def __init__(self, gamma=2):
# super().__init__()
# self.gamma = gamma
#
# def forward(self, log_pred_prob_onehot, target):
# pred_prob_oh = torch.exp(log_pred_prob_onehot)... | {"/train.py": ["/model.py", "/dataset.py", "/loss.py"], "/main.py": ["/dataset.py", "/model.py"]} |
40,531 | SicParvisMagna95/rain_detection | refs/heads/master | /mess/xml_jpg.py | import os
import xml.dom.minidom
import cv2
ImgPath = r'E:\data\rain_full\rain_imgs\match\img'
AnnoPath = r'E:\data\rain_full\rain_imgs\match\xml'
ImgLabelPath = r'E:\data\rain_full\rain_imgs\match\img_label'
imagelist = os.listdir(ImgPath)
for image in imagelist:
image_pre, ext = os.path.splitext(ima... | {"/train.py": ["/model.py", "/dataset.py", "/loss.py"], "/main.py": ["/dataset.py", "/model.py"]} |
40,532 | SicParvisMagna95/rain_detection | refs/heads/master | /mess/match.py | """match the jpg with annotation"""
import os
import glob
import shutil
test_dir = r'E:\data\rain_full\rain_imgs\test'
test_dir_list = glob.glob(os.path.join(test_dir,'*'))
annotation_dir = r'E:\data\rain_full\Annotation'
annotation_list = os.listdir(annotation_dir)
match = []
for test_path in test_dir_l... | {"/train.py": ["/model.py", "/dataset.py", "/loss.py"], "/main.py": ["/dataset.py", "/model.py"]} |
40,572 | loyalist16/components | refs/heads/master | /ttf_ocr/baidu_ocr.py | # -*- coding: utf-8 -*-
# @Time : 2021/2/23 11:45
# @Author : loyalist
# @Email : lzl0118@foxmail.com
# @File : baidu_ocr.py
# @Desc : 百度的OCR项目
from aip import AipOcr
APP_ID = '**'
API_KEY = '**'
SECRET_KEY = '**'
client = AipOcr(APP_ID, API_KEY, SECRET_KEY)
def accurate_ocr(file):
'''
通用文字识别(高精度版)
'''... | {"/proxy/adsl/dial.py": ["/proxy/dbConnect.py"], "/txhk/core.py": ["/txhk/gap.py"]} |
40,573 | loyalist16/components | refs/heads/master | /proxy/dbConnect.py | # -*- coding: utf-8 -*-
# @Time : 2021/1/29 9:33
# @Author : loyalist
# @Email : lzl0118@foxmail.com
# @File : dbConnect.py
# @Desc : 连接各种数据库
import redis
import random
from proxy import setting
class MyRedisClient:
"""
redis连接客户端
"""
def __init__(self, host=setting.REDIS_HOST, port=setting.REDIS_PO... | {"/proxy/adsl/dial.py": ["/proxy/dbConnect.py"], "/txhk/core.py": ["/txhk/gap.py"]} |
40,574 | loyalist16/components | refs/heads/master | /proxy/setting.py | # -*- coding: utf-8 -*-
# @Time : 2021/1/29 9:36
# @Author : loyalist
# @Email : lzl0118@foxmail.com
# @File : setting.py
# @Desc : 配置文件, 存储一些私密信息
# Redis 数据库 IP
REDIS_HOST = 'localhost'
# Redis 数据库密码,如无则填 None
REDIS_PASSWORD = None
# Redis 数据库端口
REDIS_PORT = 6379
# 代理池键名
PROXY_KEY = 'adsl'
| {"/proxy/adsl/dial.py": ["/proxy/dbConnect.py"], "/txhk/core.py": ["/txhk/gap.py"]} |
40,575 | loyalist16/components | refs/heads/master | /txhk/gap.py | # -*- coding: utf-8 -*-
# @Time : 2021/3/11 16:22
# @Author : loyalist
# @Email : lzl0118@foxmail.com
# @File : gap.py
# @Desc : 获取到缺口所在位置的左边距
from PIL import Image
def get_pixel_list(file_path):
"""
获取图片像素列表
:param file_path: 文件路径
:return: 图片像素列表
"""
img = Image.open(file_path)
img = img... | {"/proxy/adsl/dial.py": ["/proxy/dbConnect.py"], "/txhk/core.py": ["/txhk/gap.py"]} |
40,576 | loyalist16/components | refs/heads/master | /ttf_ocr/run.py | # -*- coding: utf-8 -*-
# @Time : 2021/3/1 17:35
# @Author : loyalist
# @Email : lzl0118@foxmail.com
# @File : run.py
# @Desc : 识别图片中的文字
from baidu_ocr import accurate_ocr
from ttf2img import ttf2img
from loguru import logger
def get_fontMap(fontPath):
"""
获取 编码:字符 映射表
:param str fontPath: 字体文件路径
:re... | {"/proxy/adsl/dial.py": ["/proxy/dbConnect.py"], "/txhk/core.py": ["/txhk/gap.py"]} |
40,577 | loyalist16/components | refs/heads/master | /proxy/adsl/dial.py | # -*- coding: utf-8 -*-
# @Time : 2021/1/29 10:20
# @Author : loyalist
# @Email : lzl0118@foxmail.com
# @File : dial.py
# @Desc : 定时拨号, 在服务器上运行
import re
import subprocess
import time
import requests
from proxy.dbConnect import MyRedisClient
from requests.exceptions import ConnectionError, ReadTimeout
# 拨号网卡
ADSL_IFN... | {"/proxy/adsl/dial.py": ["/proxy/dbConnect.py"], "/txhk/core.py": ["/txhk/gap.py"]} |
40,578 | loyalist16/components | refs/heads/master | /ttf_ocr/ttf2img.py | # -*- coding: utf-8 -*-
# @Time : 2021/2/23 11:00
# @Author : loyalist
# @Email : lzl0118@foxmail.com
# @File : ttf2img.py
# @Desc : 将ttf文件转为图片
from PIL import Image, ImageDraw, ImageFont
from fontTools.ttLib import TTFont
import numpy
def ttf2img(fontPath):
"""
字体文件转换为图片
:param str fontPath: 字体文件路径
... | {"/proxy/adsl/dial.py": ["/proxy/dbConnect.py"], "/txhk/core.py": ["/txhk/gap.py"]} |
40,579 | loyalist16/components | refs/heads/master | /txhk/core.py | # -*- coding: utf-8 -*-
# @Time : 2021/2/3 13:33
# @Author : loyalist
# @Email : lzl0118@foxmail.com
# @File : core.py
# @Desc : 腾讯滑块破解
import base64
import requests
import re
import time
import warnings
import execjs
from urllib.parse import quote
from txhk.gap import get_left_offset
from PIL import Image
warnings.fi... | {"/proxy/adsl/dial.py": ["/proxy/dbConnect.py"], "/txhk/core.py": ["/txhk/gap.py"]} |
40,761 | phillipboy07/cves | refs/heads/master | /cve_db_app/forms.py | from django.forms import ModelForm,forms
from django import forms
from cve_db_app.models import Scan
class ScanUploadForm(ModelForm,forms.Form):
file = forms.FileField(required=False, label="Scan in CSV format")
site = forms.CharField(required=True, label="Site Name that the Scan is based off of")
class Me... | {"/cve_db_app/forms.py": ["/cve_db_app/models.py"], "/cve_db_app/admin.py": ["/cve_db_app/models.py"], "/cve_db_app/views.py": ["/cve_db_app/forms.py", "/cve_db_app/models.py"]} |
40,762 | phillipboy07/cves | refs/heads/master | /cve_db_app/urls.py | from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name='index'),
path('upload_scan',views.upload_scan),
path('cve_search', views.cve_search),
path('ajax/get_cve_info/', views.ajax_get_cve_info),
]
| {"/cve_db_app/forms.py": ["/cve_db_app/models.py"], "/cve_db_app/admin.py": ["/cve_db_app/models.py"], "/cve_db_app/views.py": ["/cve_db_app/forms.py", "/cve_db_app/models.py"]} |
40,763 | phillipboy07/cves | refs/heads/master | /cve_db_app/OLD_models.py | from django.db import models
from django.contrib.postgres.fields import HStoreField
# Create your models here.
class Scan(models.Model):
scan_date = models.DateTimeField("scan date")
scan_results = HStoreField()
class Site(models.Model):
site_name = models.CharField(max_length=200)
class Device(model... | {"/cve_db_app/forms.py": ["/cve_db_app/models.py"], "/cve_db_app/admin.py": ["/cve_db_app/models.py"], "/cve_db_app/views.py": ["/cve_db_app/forms.py", "/cve_db_app/models.py"]} |
40,764 | phillipboy07/cves | refs/heads/master | /cve_db_app/apps.py | from django.apps import AppConfig
class CveDbAppConfig(AppConfig):
name = 'cve_db_app'
| {"/cve_db_app/forms.py": ["/cve_db_app/models.py"], "/cve_db_app/admin.py": ["/cve_db_app/models.py"], "/cve_db_app/views.py": ["/cve_db_app/forms.py", "/cve_db_app/models.py"]} |
40,765 | phillipboy07/cves | refs/heads/master | /cve_db_app/models.py | from django.db import models
from datetime import datetime
# Create your models here.
#constants
STATUS_CHOICES = (
('On', 'Online'),
('Off', 'Offline'),
)
class Scan(models.Model):
date = models.DateTimeField(blank=True)
name = models.CharField(max_length=200, blank=True)
class Site(models.Mode... | {"/cve_db_app/forms.py": ["/cve_db_app/models.py"], "/cve_db_app/admin.py": ["/cve_db_app/models.py"], "/cve_db_app/views.py": ["/cve_db_app/forms.py", "/cve_db_app/models.py"]} |
40,766 | phillipboy07/cves | refs/heads/master | /cve_db_app/admin.py | from django.contrib import admin
# Register your models here.
from .models import Site,Device,Scan,Vulnerability as Vuln
admin.site.register(Site)
admin.site.register(Scan)
admin.site.register(Vuln)
admin.site.register(Device) | {"/cve_db_app/forms.py": ["/cve_db_app/models.py"], "/cve_db_app/admin.py": ["/cve_db_app/models.py"], "/cve_db_app/views.py": ["/cve_db_app/forms.py", "/cve_db_app/models.py"]} |
40,767 | phillipboy07/cves | refs/heads/master | /cve_db_app/migrations/0002_auto_20180812_0323.py | # Generated by Django 2.0.6 on 2018-08-12 03:23
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('cve_db_app', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='vulnerability... | {"/cve_db_app/forms.py": ["/cve_db_app/models.py"], "/cve_db_app/admin.py": ["/cve_db_app/models.py"], "/cve_db_app/views.py": ["/cve_db_app/forms.py", "/cve_db_app/models.py"]} |
40,768 | phillipboy07/cves | refs/heads/master | /cve_db_app/migrations/0001_initial.py | # Generated by Django 2.0.6 on 2018-08-12 03:01
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Device',
fields=[
... | {"/cve_db_app/forms.py": ["/cve_db_app/models.py"], "/cve_db_app/admin.py": ["/cve_db_app/models.py"], "/cve_db_app/views.py": ["/cve_db_app/forms.py", "/cve_db_app/models.py"]} |
40,769 | phillipboy07/cves | refs/heads/master | /cve_db_app/views.py | from django.shortcuts import render,redirect
from django.http import HttpResponse
from django.http import JsonResponse
from django.template import loader
from django.utils import timezone
from cve_db_app.forms import ScanUploadForm
from cve_db_app.models import Scan, Device, Vulnerability, Site
#from django.contrib.au... | {"/cve_db_app/forms.py": ["/cve_db_app/models.py"], "/cve_db_app/admin.py": ["/cve_db_app/models.py"], "/cve_db_app/views.py": ["/cve_db_app/forms.py", "/cve_db_app/models.py"]} |
40,778 | Sanjivkumar100/i-30-workshop | refs/heads/main | /Pattern 3.py | row=int(input("Enter a row:"))
k=2*row-2
for i in range(0,row):
for j in range(0,k):
print(end=" ")
k-=1
for l in range(0,i+1):
print('*',end=' ')
print("\r")
| {"/todolist.py": ["/todolistpriorty.py"], "/rsptrial.py": ["/rstfunc.py"]} |
40,779 | Sanjivkumar100/i-30-workshop | refs/heads/main | /todolist.py | from todolistpriorty import hightask,lowtask,medtask,edithig,editlow,editmed,deletehig,deletelow,deletemed
def addtask():
add={1:hightask,2:medtask,3:lowtask}
print("Choose the priority level\n\tPress 1 High\n\tPress 2 Medium \n\tPress 3 Low ")
while True:
options=int(input("Enter your choice... | {"/todolist.py": ["/todolistpriorty.py"], "/rsptrial.py": ["/rstfunc.py"]} |
40,780 | Sanjivkumar100/i-30-workshop | refs/heads/main | /task 4 13.py | l1=[]
l2=[]
l3=[]
def fl(n):
print("elements for first list")
for i in range(1,n+1):
inp=int(input(f"Enter element {i}:"))
l1.extend([inp])
def sl(n):
print("elements for Second list")
for i in range(1,n+1):
inp=int(input(f"Enter element {i}:"))
l2.exte... | {"/todolist.py": ["/todolistpriorty.py"], "/rsptrial.py": ["/rstfunc.py"]} |
40,781 | Sanjivkumar100/i-30-workshop | refs/heads/main | /pattern 1.py | def plusrow():
print("+",end=' ')
for i in range(4):
print('-',end=' ')
print('+',end=' ')
for i in range(4):
print('-',end=' ')
print('+')
def otherrow():
print('|',end=' ')
for i in range(4):
print(' ',end=' ')
print('|',end=' ')
for i in rang... | {"/todolist.py": ["/todolistpriorty.py"], "/rsptrial.py": ["/rstfunc.py"]} |
40,782 | Sanjivkumar100/i-30-workshop | refs/heads/main | /task 4 6.py | c=str(input("Enter a character:"))
vowels=['A','a','E','e','I','i','o','O','u','U']
if c in vowels:
print("Vowel")
else:
print('Consonant')
| {"/todolist.py": ["/todolistpriorty.py"], "/rsptrial.py": ["/rstfunc.py"]} |
40,783 | Sanjivkumar100/i-30-workshop | refs/heads/main | /task 4 7.py | n=int(input("Enter range:"))
add=0
for i in range(1,n+1):
add=add+i
print(add)
| {"/todolist.py": ["/todolistpriorty.py"], "/rsptrial.py": ["/rstfunc.py"]} |
40,784 | Sanjivkumar100/i-30-workshop | refs/heads/main | /task 4 9.py |
def fact(n):
factorial=1
for i in range(1,n+1):
factorial*=i
print(f"factoial of {n}:{factorial}")
a=int(input("Enter a number:"))
fact(a)
| {"/todolist.py": ["/todolistpriorty.py"], "/rsptrial.py": ["/rstfunc.py"]} |
40,785 | Sanjivkumar100/i-30-workshop | refs/heads/main | /rstfunc.py | from random import randint
pscore=0
cscore=0
def maingame(n):
print("Enter rock or paper or scissors")
rounds=0
game=['rock','paper','scissors']
computer=game[randint(0,2)]
global pscore
global cscore
while(rounds!=n):
player=input("Player game:")
if player... | {"/todolist.py": ["/todolistpriorty.py"], "/rsptrial.py": ["/rstfunc.py"]} |
40,786 | Sanjivkumar100/i-30-workshop | refs/heads/main | /pattern 2.py | def starrow(n):
for i in range(n):
print('*',end='')
rows=int(input("Enter the numbers of rows:"))
for i in range(1,rows+1):
starrow(i)
print()
| {"/todolist.py": ["/todolistpriorty.py"], "/rsptrial.py": ["/rstfunc.py"]} |
40,787 | Sanjivkumar100/i-30-workshop | refs/heads/main | /task 4 2.py | a=int(input("Enter a number:"))
if a%2==0:
print("even");
else:
print(odd)
| {"/todolist.py": ["/todolistpriorty.py"], "/rsptrial.py": ["/rstfunc.py"]} |
40,788 | Sanjivkumar100/i-30-workshop | refs/heads/main | /task 5 1.py | def addcontact():
name=input('Enter name:')
phoneno=int(input("Enter phone number"))
contactbook[name]=phoneno
def deletecontact():
name=input("Enter the name to delete:")
del contactbook[name]
print(contactbook)
def editcontact():
name=input('Enter name:')
phoneno=int(input("E... | {"/todolist.py": ["/todolistpriorty.py"], "/rsptrial.py": ["/rstfunc.py"]} |
40,789 | Sanjivkumar100/i-30-workshop | refs/heads/main | /task 4 10.py | n=int(input("Enter range:"))
for i in range(1,n+1):
if (i%2!=0):
print(" ",i," ")
| {"/todolist.py": ["/todolistpriorty.py"], "/rsptrial.py": ["/rstfunc.py"]} |
40,790 | Sanjivkumar100/i-30-workshop | refs/heads/main | /task 4 14.py | l=[]
n=int(input("Enter range:"))
i=0
for i in range(i,n):
x= int(input("Enter a value: "))
l.append(x);
l.sort()
print(f"The second smallest number is {l[1]}")
| {"/todolist.py": ["/todolistpriorty.py"], "/rsptrial.py": ["/rstfunc.py"]} |
40,791 | Sanjivkumar100/i-30-workshop | refs/heads/main | /task 4 5.py | def SI(p,r,t):
si=(p*r*t)/100
print(f"Simple interest:{si}")
p=float(input("Enter principle:"))
r=float(input("Enter rate:"))
t=float(input("Enter time:"))
SI(p,r,t)
| {"/todolist.py": ["/todolistpriorty.py"], "/rsptrial.py": ["/rstfunc.py"]} |
40,792 | Sanjivkumar100/i-30-workshop | refs/heads/main | /Car.py | import turtle
bob=turtle.Turtle()
bob.color("black","red")
bob.begin_fill()
bob.forward(100)
bob.left(90)
bob.forward(100)
bob.right(90)
bob.forward(200)
bob.right(90)
bob.forward(100)
bob.left(90)
bob.forward(100)
bob.right(90)
bob.forward(100)
bob.right(90)
bob.forward(50)
bob.right(90)
bob.ci... | {"/todolist.py": ["/todolistpriorty.py"], "/rsptrial.py": ["/rstfunc.py"]} |
40,793 | Sanjivkumar100/i-30-workshop | refs/heads/main | /task 4 12.py | n=int(input("Enter a range:"))
even=[i for i in range(1,n+1) if i%2==0]
print(even)
| {"/todolist.py": ["/todolistpriorty.py"], "/rsptrial.py": ["/rstfunc.py"]} |
40,794 | Sanjivkumar100/i-30-workshop | refs/heads/main | /rsptrial.py | from rstfunc import maingame,score
print("Rock Paper & Scissors game")
n=int(input("Enter number of rounds:"))
maingame(n)
score()
| {"/todolist.py": ["/todolistpriorty.py"], "/rsptrial.py": ["/rstfunc.py"]} |
40,795 | Sanjivkumar100/i-30-workshop | refs/heads/main | /task 4 8.py | a=int(input("Start range:"))
b=int(input("End range:"))
add=0
for i in range(a,b+1):
add=add+i
print(add)
| {"/todolist.py": ["/todolistpriorty.py"], "/rsptrial.py": ["/rstfunc.py"]} |
40,796 | Sanjivkumar100/i-30-workshop | refs/heads/main | /task 4 1.py | a=int(input("Enter first number:"))
b=int(input("Enter second number:"))
if a>b:
print(f"{b} is smaller than {a}")
else:
print(f"{a} is smaller than {b}")
| {"/todolist.py": ["/todolistpriorty.py"], "/rsptrial.py": ["/rstfunc.py"]} |
40,797 | Sanjivkumar100/i-30-workshop | refs/heads/main | /task 4 4.py | marks=float(input("Enter student mark:"))
if marks>90:
print('grade:O')
elif marks>81 and marks<90:
print('grade:A')
elif marks>71and marks<80:
print('grade:B')
elif marks >61 and marks<70:
print('grade:C')
elif marks >51 and marks<60:
print('grade:D')
else:
print("U")
| {"/todolist.py": ["/todolistpriorty.py"], "/rsptrial.py": ["/rstfunc.py"]} |
40,798 | Sanjivkumar100/i-30-workshop | refs/heads/main | /todolistpriorty.py | todolisthig=[]
todolistmed=[]
todolistlow=[]
def hightask():
task=input("Enter the new task:")
todolisthig.append(task)
print(todolisthig)
def medtask():
task=input("Enter the new task:")
todolistmed.append(task)
print(todolistmed)
def lowtask():
task=input("Enter the new task:")... | {"/todolist.py": ["/todolistpriorty.py"], "/rsptrial.py": ["/rstfunc.py"]} |
40,807 | clairewangjia/Text-Sentiment-Analysis | refs/heads/master | /Step2_fused_analyzer.py | import os
import pandas as pd
import numpy as np
from sklearn.model_selection import KFold
from sklearn.naive_bayes import MultinomialNB
from sklearn.neighbors import KNeighborsClassifier
from sklearn.linear_model import LogisticRegression
from sklearn.linear_model import Lasso
from sklearn.ensemble import RandomForest... | {"/Step2_fused_analyzer.py": ["/hashtag.py"]} |
40,808 | clairewangjia/Text-Sentiment-Analysis | refs/heads/master | /Step1_social_hashtag_preprocess.py | # encoding=utf8
import sys
reload(sys)
sys.setdefaultencoding('utf8')
import os
import re
import nltk
# nltk.download()
from nltk.corpus import stopwords
import simplejson as json
import pickle
import numpy as np
import pandas as pd
def rm_html_tags(str):
html_prog = re.compile(r'<[^>]+>',re.S)
return html_p... | {"/Step2_fused_analyzer.py": ["/hashtag.py"]} |
40,809 | clairewangjia/Text-Sentiment-Analysis | refs/heads/master | /hashtag.py | import os
import numpy as np
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.model_selection import KFold
from sklearn.naive_bayes import MultinomialNB
from sklearn.neighbors import KNeighborsClassifier
from sklearn.linear_model import LogisticRegression
from sklearn.ensemble import RandomFores... | {"/Step2_fused_analyzer.py": ["/hashtag.py"]} |
40,813 | Chetan8462/hackowasp | refs/heads/main | /user/models.py | from django.db import models
from phonenumber_field.modelfields import PhoneNumberField
from django.contrib.auth.models import AbstractUser
from django.contrib.auth.base_user import BaseUserManager
from phonenumber_field.modelfields import PhoneNumberField
from home.models import *
class CustomUserManager(BaseUserMana... | {"/user/forms.py": ["/user/models.py"], "/user/views.py": ["/user/forms.py", "/user/models.py"]} |
40,814 | Chetan8462/hackowasp | refs/heads/main | /user/forms.py | from django import forms
from django.contrib.auth.forms import UserCreationForm
from phonenumber_field.formfields import PhoneNumberField
from django.db import transaction
from .models import User
from django.contrib.auth import get_user_model
User = get_user_model()
class RegistrationForm(UserCreationForm):
class Me... | {"/user/forms.py": ["/user/models.py"], "/user/views.py": ["/user/forms.py", "/user/models.py"]} |
40,815 | Chetan8462/hackowasp | refs/heads/main | /user/views.py | from django.shortcuts import render, redirect
from django.contrib.auth.forms import UserCreationForm
from .forms import RegistrationForm
from django.contrib import messages
from django.contrib.auth import get_user_model
from .models import User
User = get_user_model()
def register(request):
if request.method == ... | {"/user/forms.py": ["/user/models.py"], "/user/views.py": ["/user/forms.py", "/user/models.py"]} |
40,817 | raulium/jarvis | refs/heads/master | /vacation_mod.py | #!/usr/local/env python
# ============== CONFIG PARAMETERS
from config import SNOOZE_TIME, READING_TIME, BED_TIME
# ============== INTERNAL LIBRARIES
from timing_mod import snooze
from IFTTT_mod import IFTTT
from mac_mod import openApp, setLivingRoom, startRadio, setVolume, setDisplay, macTerm
# ============== EXTERNA... | {"/vacation_mod.py": ["/timing_mod.py", "/IFTTT_mod.py", "/mac_mod.py"], "/evening_mod.py": ["/interaction_mod.py", "/timing_mod.py", "/mac_mod.py", "/IFTTT_mod.py"], "/lab_mod.py": ["/web_mod.py"], "/math_mod.py": ["/interaction_mod.py"], "/interaction_mod.py": ["/gmail_mod.py", "/mac_mod.py"], "/main.py": ["/vacation... |
40,818 | raulium/jarvis | refs/heads/master | /gmail_mod.py | from __future__ import print_function
# ============== CONFIG PARAMETERS
from config import EMAIL, USERNAME
# ============== INTERNAL LIBRARIES
# ============== EXTERNAL LIBRARIES
import httplib2
import os
import base64
from apiclient import discovery, errors
from oauth2client import client
from oauth2client import to... | {"/vacation_mod.py": ["/timing_mod.py", "/IFTTT_mod.py", "/mac_mod.py"], "/evening_mod.py": ["/interaction_mod.py", "/timing_mod.py", "/mac_mod.py", "/IFTTT_mod.py"], "/lab_mod.py": ["/web_mod.py"], "/math_mod.py": ["/interaction_mod.py"], "/interaction_mod.py": ["/gmail_mod.py", "/mac_mod.py"], "/main.py": ["/vacation... |
40,819 | raulium/jarvis | refs/heads/master | /morning_mod.py | #!/usr/bin/python
# ============== EXTERNAL LIBRARIES
import time
import random
from datetime import datetime
from atd import atd
# ============== CONFIG PARAMETERS\
from config import DOW, NAME, SNOOZE_TIME, NORMAL_TIME
# ============== INTERNAL LIBRARIES
from interaction_mod import GREETING, WAKE, say, laboratoryOpt... | {"/vacation_mod.py": ["/timing_mod.py", "/IFTTT_mod.py", "/mac_mod.py"], "/evening_mod.py": ["/interaction_mod.py", "/timing_mod.py", "/mac_mod.py", "/IFTTT_mod.py"], "/lab_mod.py": ["/web_mod.py"], "/math_mod.py": ["/interaction_mod.py"], "/interaction_mod.py": ["/gmail_mod.py", "/mac_mod.py"], "/main.py": ["/vacation... |
40,820 | raulium/jarvis | refs/heads/master | /evening_mod.py | #!/usr/local/env python
# ============== CONFIG PARAMETERS
from config import READING_TIME, BED_TIME
# ============== INTERNAL LIBRARIES
from interaction_mod import WARN, saiff
from timing_mod import getCurrentTime, snooze, t_minus
from mac_mod import notification, setLivingRoom, setDisplay
from IFTTT_mod import IFTTT... | {"/vacation_mod.py": ["/timing_mod.py", "/IFTTT_mod.py", "/mac_mod.py"], "/evening_mod.py": ["/interaction_mod.py", "/timing_mod.py", "/mac_mod.py", "/IFTTT_mod.py"], "/lab_mod.py": ["/web_mod.py"], "/math_mod.py": ["/interaction_mod.py"], "/interaction_mod.py": ["/gmail_mod.py", "/mac_mod.py"], "/main.py": ["/vacation... |
40,821 | raulium/jarvis | refs/heads/master | /web_mod.py | #!/usr/local/env python
# ============== CONFIG PARAMETERS
# ============== INTERNAL LIBRARIES
# ============== EXTERNAL LIBRARIES
import re
import urllib
from BeautifulSoup import BeautifulSoup as bsp
class MyOpener(urllib.FancyURLopener):
version = 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like ... | {"/vacation_mod.py": ["/timing_mod.py", "/IFTTT_mod.py", "/mac_mod.py"], "/evening_mod.py": ["/interaction_mod.py", "/timing_mod.py", "/mac_mod.py", "/IFTTT_mod.py"], "/lab_mod.py": ["/web_mod.py"], "/math_mod.py": ["/interaction_mod.py"], "/interaction_mod.py": ["/gmail_mod.py", "/mac_mod.py"], "/main.py": ["/vacation... |
40,822 | raulium/jarvis | refs/heads/master | /lab_mod.py | #!/usr/local/env python
# ============== CONFIG PARAMETERS
# ============== INTERNAL LIBRARIES
from web_mod import ripText
# ============== EXTERNAL LIBRARIES
def labStatus():
"""Check status of the Laboratory, returning 0 if open & 1 if closed"""
statMSG = ripText("http://www.ll.mit.edu/status/index.html")... | {"/vacation_mod.py": ["/timing_mod.py", "/IFTTT_mod.py", "/mac_mod.py"], "/evening_mod.py": ["/interaction_mod.py", "/timing_mod.py", "/mac_mod.py", "/IFTTT_mod.py"], "/lab_mod.py": ["/web_mod.py"], "/math_mod.py": ["/interaction_mod.py"], "/interaction_mod.py": ["/gmail_mod.py", "/mac_mod.py"], "/main.py": ["/vacation... |
40,823 | raulium/jarvis | refs/heads/master | /math_mod.py | #!/usr/local/env python
# ============== EXTERNAL LIBRARIES
import random
from word2number import w2n
# ============== CONFIG PARAMETERS
# ============== INTERNAL LIBRARIES
from interaction_mod import POSITIVE, NEGATIVE, say, getReply
def do_math(): # COULD USE REWORK. WHAT HAPPENS IF YOU NEVER HEAR A REPLY? (BREAK... | {"/vacation_mod.py": ["/timing_mod.py", "/IFTTT_mod.py", "/mac_mod.py"], "/evening_mod.py": ["/interaction_mod.py", "/timing_mod.py", "/mac_mod.py", "/IFTTT_mod.py"], "/lab_mod.py": ["/web_mod.py"], "/math_mod.py": ["/interaction_mod.py"], "/interaction_mod.py": ["/gmail_mod.py", "/mac_mod.py"], "/main.py": ["/vacation... |
40,824 | raulium/jarvis | refs/heads/master | /interaction_mod.py | #!/usr/local/env python
# ============== EXTERNAL LIBRARIES
import random
import time
from subprocess import Popen
import speech_recognition as sr
from gmail_mod import sendGmail
# ============== CONFIG PARAMETERS
from config import NAME, WORK_LIST_STRING, ILL_MSG, WFH_MSG, VOLUNTEER_EMAIL, VOLUNTEER_ILL_MSG, VOLUNTEE... | {"/vacation_mod.py": ["/timing_mod.py", "/IFTTT_mod.py", "/mac_mod.py"], "/evening_mod.py": ["/interaction_mod.py", "/timing_mod.py", "/mac_mod.py", "/IFTTT_mod.py"], "/lab_mod.py": ["/web_mod.py"], "/math_mod.py": ["/interaction_mod.py"], "/interaction_mod.py": ["/gmail_mod.py", "/mac_mod.py"], "/main.py": ["/vacation... |
40,825 | raulium/jarvis | refs/heads/master | /timing_mod.py | #!/usr/local/env python
# ============== EXTERNAL LIBRARIES
from __future__ import print_function
import holidays
import time
from datetime import datetime, timedelta, date
# ============== INTERNAL LIBRARIES
# ============== CONFIG PARAMETERS
from config import MY_STATE
def getCurrentTime():
hour = datetime.now... | {"/vacation_mod.py": ["/timing_mod.py", "/IFTTT_mod.py", "/mac_mod.py"], "/evening_mod.py": ["/interaction_mod.py", "/timing_mod.py", "/mac_mod.py", "/IFTTT_mod.py"], "/lab_mod.py": ["/web_mod.py"], "/math_mod.py": ["/interaction_mod.py"], "/interaction_mod.py": ["/gmail_mod.py", "/mac_mod.py"], "/main.py": ["/vacation... |
40,826 | raulium/jarvis | refs/heads/master | /main.py | #!/usr/bin/python
# ============== CONFIG PARAMETERS
from config import MASTERKEY, HOST_IP, BASE_PATH
# ============== INTERNAL LIBRARIES
from vacation_mod import vMorningRoutine, vEveningRoutine, checkVacationStatus, setVacation, rmVacation
from interaction_mod import say, micTest
from mac_mod import startMusic, setL... | {"/vacation_mod.py": ["/timing_mod.py", "/IFTTT_mod.py", "/mac_mod.py"], "/evening_mod.py": ["/interaction_mod.py", "/timing_mod.py", "/mac_mod.py", "/IFTTT_mod.py"], "/lab_mod.py": ["/web_mod.py"], "/math_mod.py": ["/interaction_mod.py"], "/interaction_mod.py": ["/gmail_mod.py", "/mac_mod.py"], "/main.py": ["/vacation... |
40,827 | raulium/jarvis | refs/heads/master | /mac_mod.py | #!/usr/local/env python
# ============== CONFIG PARAMETERS
from __future__ import print_function
from config import BASE_PATH, EMAIL, ICLOUD, IPHONE_ID, HOME_COORD, USERNAME
# ============== INTERNAL LIBRARIES
# ============== EXTERNAL LIBRARIES
import time
import csv
from subprocess import Popen, PIPE
from pyicloud i... | {"/vacation_mod.py": ["/timing_mod.py", "/IFTTT_mod.py", "/mac_mod.py"], "/evening_mod.py": ["/interaction_mod.py", "/timing_mod.py", "/mac_mod.py", "/IFTTT_mod.py"], "/lab_mod.py": ["/web_mod.py"], "/math_mod.py": ["/interaction_mod.py"], "/interaction_mod.py": ["/gmail_mod.py", "/mac_mod.py"], "/main.py": ["/vacation... |
40,828 | raulium/jarvis | refs/heads/master | /IFTTT_mod.py | #!/usr/local/env python
# ============== CONFIG PARAMETERS
from config import IFTTT_KEY
# ============== INTERNAL LIBRARIES
# ============== EXTERNAL LIBRARIES
from subprocess import Popen
def IFTTT(EVENT):
url = 'https://maker.ifttt.com/trigger/' + EVENT + '/with/key/' + IFTTT_KEY
Popen(['curl', '-X', 'POST... | {"/vacation_mod.py": ["/timing_mod.py", "/IFTTT_mod.py", "/mac_mod.py"], "/evening_mod.py": ["/interaction_mod.py", "/timing_mod.py", "/mac_mod.py", "/IFTTT_mod.py"], "/lab_mod.py": ["/web_mod.py"], "/math_mod.py": ["/interaction_mod.py"], "/interaction_mod.py": ["/gmail_mod.py", "/mac_mod.py"], "/main.py": ["/vacation... |
40,829 | raulium/jarvis | refs/heads/master | /weather_mod.py | #!/usr/local/env python
# ============== EXTERNAL LIBRARIES
import email
import json
import math
import random
from datetime import datetime, timedelta
from web_mod import MyOpener
# ============== CONFIG PARAMETERS
from config import WUNDERGROUND_KEY
# ============== INTERNAL LIBRARIES
from interaction_mod import GRE... | {"/vacation_mod.py": ["/timing_mod.py", "/IFTTT_mod.py", "/mac_mod.py"], "/evening_mod.py": ["/interaction_mod.py", "/timing_mod.py", "/mac_mod.py", "/IFTTT_mod.py"], "/lab_mod.py": ["/web_mod.py"], "/math_mod.py": ["/interaction_mod.py"], "/interaction_mod.py": ["/gmail_mod.py", "/mac_mod.py"], "/main.py": ["/vacation... |
40,830 | raulium/jarvis | refs/heads/master | /yoga_mod.py | #!/usr/local/env python
# ============== EXTERNAL LIBRARIES
import random
import time
# ============== CONFIG PARAMETERS
from config import NAME
# ============== INTERNAL LIBRARIES
from interaction_mod import POSITIVE, say
from mac_mod import setVolume
def stretch_Spinal():
say('Sit cross-legged.')
time.sl... | {"/vacation_mod.py": ["/timing_mod.py", "/IFTTT_mod.py", "/mac_mod.py"], "/evening_mod.py": ["/interaction_mod.py", "/timing_mod.py", "/mac_mod.py", "/IFTTT_mod.py"], "/lab_mod.py": ["/web_mod.py"], "/math_mod.py": ["/interaction_mod.py"], "/interaction_mod.py": ["/gmail_mod.py", "/mac_mod.py"], "/main.py": ["/vacation... |
40,831 | raulium/jarvis | refs/heads/master | /motivation_mod.py | #!/usr/local/env python
# ============== EXTERNAL LIBRARIES
from random import choice
from math import floor
from datetime import datetime
# ============== CONFIG PARAMETERS
from config import NAME
# ============== INTERNAL LIBRARIES
#?
def daysToWeekend():
n = datetime.today().weekday()
if n < 5:
re... | {"/vacation_mod.py": ["/timing_mod.py", "/IFTTT_mod.py", "/mac_mod.py"], "/evening_mod.py": ["/interaction_mod.py", "/timing_mod.py", "/mac_mod.py", "/IFTTT_mod.py"], "/lab_mod.py": ["/web_mod.py"], "/math_mod.py": ["/interaction_mod.py"], "/interaction_mod.py": ["/gmail_mod.py", "/mac_mod.py"], "/main.py": ["/vacation... |
40,834 | simshadows/dpcutipy | refs/heads/master | /errors.py | """
errors.py
Author: simshadows
Defines errors for dpcutipy.
"""
from ctypes import c_int
# Error codes from dpcdefs.h revision 07/22/2004
_errors_src = """
const ERC ercNoError = 0;
const ERC ercConnReject = 3001;
const ERC ercConnType = 3002;
const ERC ercConnNoMode = 3003;
const ERC ercInvPa... | {"/testdpcutipy.py": ["/dpcutipy.py"], "/dpcutipy.py": ["/errors.py"]} |
40,835 | simshadows/dpcutipy | refs/heads/master | /testdpcutipy.py | """
testdpcutipy.py
Author: simshadows
A very simple test file that just writes to a register, then reads and prints it back.
This also provides a simple demonstration of the operation of the dpcutipy library.
"""
import os
import sys
import random
import traceback
from dpcutipy import dpcutipy
reg_id = random.ran... | {"/testdpcutipy.py": ["/dpcutipy.py"], "/dpcutipy.py": ["/errors.py"]} |
40,836 | simshadows/dpcutipy | refs/heads/master | /dpcutipy.py | """
dpcutipy.py
Author: simshadows
dpcutipy is a glue code module for dpcutil
Design documentation used to build this module:
https://reference.digilentinc.com/_media/dpcutil_programmers_reference_manual.pdf
http://hamsterworks.co.nz/mediawiki/index.php/Module_18
"""
import os
import sys
import traceback
import coll... | {"/testdpcutipy.py": ["/dpcutipy.py"], "/dpcutipy.py": ["/errors.py"]} |
40,883 | ErrorMakerqwq/EE308 | refs/heads/master | /main.py | '''
@Project :pythonProject1
@File :main.py
@Author :ErrorMaker
@Date :2021/9/21 22:21
'''
#ui
def ui():
# input data
path = input('请输入文件路径(默认路径为File.c):')
level = input('请输入运行等级:')
return path,level
#choosing
def chooseingFuction(path,level):
#level1
if(level=='1'):
counting... | {"/test_main.py": ["/main.py"]} |
40,884 | ErrorMakerqwq/EE308 | refs/heads/master | /test_main.py | import unittest
import main
class TestcountingKwords(unittest.TestCase):
def test_countingKwords(self):
self.assertEqual(len(main.countingKwords(path="File.c")), 35) # add assertion here
if __name__ == '__main__':
unittest.main()
| {"/test_main.py": ["/main.py"]} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.