index int64 | repo_name string | branch_name string | path string | content string | import_graph string |
|---|---|---|---|---|---|
90,643 | wangzhefeng/pysci | refs/heads/master | /pydemo/demo_mltool/model_selection/params_grid.py | # -*- coding: utf-8 -*-
"""
@author:
@date:
"""
from sklearn.model_selection import ParameterGrid
def parameters(param_grid):
param_combine = ParameterGrid(param_grid)
param_combine_list = list(param_combine)
return param_combine, param_combine_list
| {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,644 | wangzhefeng/pysci | refs/heads/master | /src/pyexception/Traceback.py | # -*- coding: utf-8 -*-
# *********************************************
# * Author : zhefeng wang
# * Email : wangzhefengr@163.com
# * Date : 2021.11.06
# * Version : 1.0.0
# * Description : des
# * Link : link
# **********************************************
import traceba... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,645 | wangzhefeng/pysci | refs/heads/master | /pyvisual/utils/mathplotlib_utils.py | # -*- coding: utf-8 -*-
# ***************************************************
# * File : mathplotlib_utils.py
# * Author : Zhefeng Wang
# * Email : wangzhefengr@163.com
# * Date : 2023-07-11
# * Version : 0.1.071123
# * Description : description
# * Link : link
# * Requirement : 相关模... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,646 | wangzhefeng/pysci | refs/heads/master | /montecarlo/utils.py | # -*- coding: utf-8 -*-
# ***************************************************
# * File : utils.py
# * Author : Zhefeng Wang
# * Email : wangzhefengr@163.com
# * Date : 2023-07-23
# * Version : 0.1.072323
# * Description : description
# * Link : https://www.yanxishe.com/Text... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,647 | wangzhefeng/pysci | refs/heads/master | /src/pycli/sys_argv.py | # -*- coding: utf-8 -*-
# ***************************************************
# * File : sys_argv.py
# * Author : Zhefeng Wang
# * Email : wangzhefengr@163.com
# * Date : 2022-07-23
# * Version : 0.1.072301
# * Description : 向 Python 脚本传递参数, 通过 sys 模块访问参数
# * Link : link
# * Requir... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,648 | wangzhefeng/pysci | refs/heads/master | /src/python_design_pattern/StateModel/state_model_v2.py |
# -*- coding: utf-8 -*-
from abc import ABCMeta, abstractmethod
class Context(metaclass = ABCMeta):
"""
状态模式的上下文环境类
"""
def __init__(self):
self.__states = []
self.__curState = None
self.__stateInfo = 0
def addState(self, state):
if (state not in ... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,649 | wangzhefeng/pysci | refs/heads/master | /src/python_design_pattern/Visitor/visitor_model_1.py | # -*- coding: utf-8 -*-
from abc import ABCMeta, abstractmethod
from VisitorModel import DataNode, Visitor, ObjectStructure
"""
封装一些作用于某种数据结构中各元素的操作, 它可以在不改变数据结构的前提下定义作用于这些元素的新的操作.
访问模式的核心思想在于:
- 可以在不改变数据结构的前提下定义作用于这些元素的新操作
- 将数据结构和操作(或算法)进行解耦, 而且能更方便地拓展新的操作
"""
#TODO
class DesignPatternBo... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,650 | wangzhefeng/pysci | refs/heads/master | /pydemo/demo_mltool/data_import/read_mssql.py | # -*- coding: utf-8 -*-
import os
import pymssql
"""
input:
server
port
database
table
output:
"""
from sqlalchemy import create_engine
import pymssql
def get_engine(host, port, user, password, database):
db_info = {
"host": host,
"port": port,
"user": user,
... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,651 | wangzhefeng/pysci | refs/heads/master | /src/pybigdata/pydatabase/pymssql/pymssql_learn.py | # -*- coding: utf-8 -*-
# ***************************************************
# * File : pymssql_learn.py
# * Author : Zhefeng Wang
# * Email : wangzhefengr@163.com
# * Date : 2022-07-26
# * Version : 0.1.072621
# * Description : description
# * Link : link
# * Requireme... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,652 | wangzhefeng/pysci | refs/heads/master | /src/pid.py | # -*- coding: utf-8 -*-
# ***************************************************
# * File : pid.py
# * Author : Zhefeng Wang
# * Email : wangzhefengr@163.com
# * Date : 2023-06-07
# * Version : 0.1.060722
# * Description : description
# * Link : link
# * Requirement : 相关模块版本需求(例如: nump... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,653 | wangzhefeng/pysci | refs/heads/master | /pydemo/demo_project_py/sample/fib.py | # fib.py
import math
_SQRT_5 = math.sqrt(5)
_PHI = (1 + _SQRT_5) / 2
def approx_fib(n):
"""Approximate Fibonacci sequence
:param n: The place in Fibonacci sequence to approximate
:type n: int
:return: The approximate value in Fibonacci sequence
:rtype: float
"""
return round(_PHI ** (n +... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,654 | wangzhefeng/pysci | refs/heads/master | /pydemo/demo_mltool/model_visual/validation_curve.py | # -*- coding: utf-8 -*-
"""
@author:
@date:
"""
import numpy as np
import matplotlib.pyplot as plt
from sklearn.model_selection import validation_curve
def train_valid_scores(model, X, y, param_name, param_range, cv_method, scoring, n_jobs):
train_scores, valid_scores = validation_curve(estimator = model,
... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,655 | wangzhefeng/pysci | refs/heads/master | /src/python_design_pattern/StateModel/state_model_v1.py |
# -*- coding: utf-8 -*-
from abc import ABCMeta, abstractmethod
class Water:
"""
水(H2O)
"""
def __init__(self, state):
self.__temperature = 25 # 默认常温是25℃
self.__state = state
def setState(self, state):
self.__state = state
def changeState(self, st... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,656 | wangzhefeng/pysci | refs/heads/master | /src/pytype/python_voluptuous.py | """
pip install validators
"""
import traceback
from voluptuous import Schema, MultipleInvalid, Required
schema = Schema({
"q": str,
Required("per_page"): int,
"page": int,
})
data_1 = {
"q": "hello world",
"per_page": 20,
"page": 10,
}
data_2 = {
"q": "hello world... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,657 | wangzhefeng/pysci | refs/heads/master | /pyenv/env_var/get_env_variables.py | # -*- coding: utf-8 -*-
# *********************************************
# * Author : Zhefeng Wang
# * Email : wangzhefengr@163.com
# * Date : 2021.01.01
# * Version : 1.0.0
# * Description : Python 中的环境变量设置
# * Link : https://mp.weixin.qq.com/s?__biz=Mzg3MjU3NzU1OA==&mid=2247496302... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,658 | wangzhefeng/pysci | refs/heads/master | /src/file_util.py | # -*- coding: utf-8 -*-
# ***************************************************
# * File : file_util.py
# * Author : Zhefeng Wang
# * Email : wangzhefengr@163.com
# * Date : 2022-07-06
# * Version : 0.1.070622
# * Description : description
# * Link : link
# * Requirement :... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,659 | wangzhefeng/pysci | refs/heads/master | /src/pytype/typing_demo.py | # -*- coding: utf-8 -*-
# *********************************************
# * Author : Zhefeng Wang
# * Email : wangzhefengr@163.com
# * Date : 2021.01.01
# * Version : 1.0.0
# * Description : description
# * Link : link
# * Requirement : 相关模块版本需求(例如: numpy >= 2.1.0)
# **********... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,660 | wangzhefeng/pysci | refs/heads/master | /src/pycli/pysearch.py | # -*- coding: utf-8 -*-
# ***************************************************
# * File : file_glob_search.py
# * Author : Zhefeng Wang
# * Email : wangzhefengr@163.com
# * Date : 2022-07-23
# * Version : 0.1.072301
# * Description : description
# * Link : link
# * Requirement : 相关模... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,661 | wangzhefeng/pysci | refs/heads/master | /src/python_design_pattern/SingletonModel/singleton_model_template.py |
# -*- coding: utf-8 -*-
class Singleton1(object):
"""
单例实现方式一:
重写 __new__ 和 __init__ 方法
"""
__instance = None
__isFirstInit = False
def __new__(cls, name):
if not cls.__instance:
Singleton1.__instance = super().__new__(cls)
return cls.__ins... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,662 | wangzhefeng/pysci | refs/heads/master | /src/enum_demo.py | # -*- coding: utf-8 -*-
# *********************************************
# * Author : Zhefeng Wang
# * Email : wangzhefengr@163.com
# * Date : 2022.01.05
# * Version : 1.0.0
# * Description : description
# * Link : link
# * Requirement : 相关模块版本需求(例如: numpy >= 2.1.0)
# **********... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,663 | wangzhefeng/pysci | refs/heads/master | /src/pyalgorithms/encryption_algorithm/algorithm.py | # -*- coding: utf-8 -*-
# *********************************************
# * Author : zhefeng wang
# * Email : wangzhefengr@163.com
# * Date : 2021.11.06
# * Version : 1.0.0
# * Description : 摘要算法
# * hashlib.md5()
# * hashlib.sha1()
# * ... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,664 | wangzhefeng/pysci | refs/heads/master | /src/python_design_pattern/CloneModel/clone_model_v1.py | # -*- coding: utf-8 -*-
from copy import copy, deepcopy
# ----------------------------------------
#
# ----------------------------------------
class Person:
"""
人
"""
def __init__(self, name, age):
self.__name = name
self.__age = age
def showMyself(self):
... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,665 | wangzhefeng/pysci | refs/heads/master | /pydemo/demo_mltool/demo/my_proj/scripts/demo.py | # -*- coding: utf-8 -*-
"""
@author: wangzhefeng
@date: 20190130
"""
from dataImport.read_csv_excel import read_train_test
from dataExport.submission import submit
# =================================================================
# read train and test data
# ===================================================... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,666 | wangzhefeng/pysci | refs/heads/master | /pyvisual/charts/timeseries_plots.py | # -*- coding: utf-8 -*-
# ***************************************************
# * File : timeseries_plot.py
# * Author : Zhefeng Wang
# * Email : wangzhefengr@163.com
# * Date : 2023-07-21
# * Version : 0.1.072122
# * Description : description
# * Link : link
# * Requirement : 相关模块版... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,667 | wangzhefeng/pysci | refs/heads/master | /src/code_review/code_review.py | import os
import platform
import re
plat = platform.system().lower()
import getopt
import sys
from enum import Enum
import json
import time
import yaml
from code_review.basic_rule import *
# TODO 询问是否对单个脚本进行排查,如果不是,对全部脚本进行排查
dir_path = os.path.abspath("")
SINGLE_FILE_NAME_WITH_PATH = None
SCRIPT_METHO... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,668 | wangzhefeng/pysci | refs/heads/master | /pydemo/demo_project_py/setup.py | import setuptools
setuptools.setup(
name="fib",
version="2019.1.0",
description="Fibonacci",
py_modules=["fib"],
)
| {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,669 | wangzhefeng/pysci | refs/heads/master | /src/python_programming/HelloWorld_GUI.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import sys
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from tkinter import Label
#===========================================================
# codeing
#==========================================... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,670 | wangzhefeng/pysci | refs/heads/master | /pydemo/demo_mltool/model_visual/learning_curve.py | # -*- coding: utf-8 -*-
"""
@author:
@date:
"""
import numpy as np
import matplotlib.pyplot as plt
from sklearn.model_selection import learning_curve
def learningCurve(model, X, y,
train_sizes = np.array([0.1, 0.33, 0.55, 0.78, 1. ]),
cv_method = "warn", n_jobs = None):
train... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,671 | wangzhefeng/pysci | refs/heads/master | /montecarlo/house_always_win.py | # -*- coding: utf-8 -*-
# ***************************************************
# * File : house_always_win.py
# * Author : Zhefeng Wang
# * Email : wangzhefengr@163.com
# * Date : 2023-07-30
# * Version : 0.1.073019
# * Description : description
# * Link : link
# * Requirem... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,672 | wangzhefeng/pysci | refs/heads/master | /src/code_review/basci_backup.py | # -*- coding: utf-8 -*-
"""
@File : basic_rule.py
@Date : 2022-07-26
@Author : Bairui Zhan
@Contact : bairui.zhan@yo-i.net
@Version : 0.1.072614
@Description : description
@Requirement : 相关模块版本需求(例如: numpy >= 2.1.0)
"""
import traceback
from .config import input_c... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,673 | wangzhefeng/pysci | refs/heads/master | /src/pipe.py | # -*- coding: utf-8 -*-
# *********************************************
# * Author : Zhefeng Wang
# * Email : wangzhefengr@163.com
# * Date : 2021.01.01
# * Version : 1.0.0
# * Description : description
# * Link : link
# * Requirement : 相关模块版本需求(例如: numpy >= 2.1.0)
# ************... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,674 | wangzhefeng/pysci | refs/heads/master | /src/pytype/python_pydantic.py | import logging
from datetime import datetime
from typing import List, Optional
from pydantic import BaseModel
from pydantic import ValidationError
#------------- BaseModel --------------------
class User(BaseModel):
id: int
name = "John Doe"
singnup_ts: Optional[datetime] = None
friends: L... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,675 | wangzhefeng/pysci | refs/heads/master | /src/pydatetime/utils_time.py | # -*- coding: utf-8 -*-
# ***************************************************
# * File : utils_time.py
# * Author : Zhefeng Wang
# * Email : wangzhefengr@163.com
# * Date : 2022-07-06
# * Version : 0.1.070623
# * Description : description
# * Link : link
# * Requirement ... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,676 | wangzhefeng/pysci | refs/heads/master | /src/pybigdata/process_thread/threading_learn.py | import time
import threading
"""
Python 多线程编程
"""
def action_1(add):
"""
定义线程要调用的方法
"""
for arc in add:
# 调用 getName() 方法获取当前执行该程序的线程名
print(threading.current_thread().getName() + " " + arc)
def action_2(*add):
"""
定义线程要调用的方法
"""
for arc in add:
... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,677 | wangzhefeng/pysci | refs/heads/master | /src/python_design_pattern/CommandModel/command_model_template.py | #!/usr/bin/env Python
# -*- coding: utf-8 -*-
from abc import ABCMeta, abstractmethod
# 引入 ABCMeta 和 abstractmethod 来定义抽象类和抽象方法
class Command(meatclass = ABCMeta):
"""命令的抽象类"""
@abstractmethod
def execute(self):
pass
class CommandImpl(Command):
"""命令的具体实现类"""
def _... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,678 | wangzhefeng/pysci | refs/heads/master | /pyvisual/pyecharts_demo/script/Grid_test.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'wangzhefeng'
##################### download and install the library ######################
# $pip install pyecharts
# $ git clone --recursive https://github.com/chenjiandongx/pyecharts.git
# $ cd pyecharts
# $ python setup.py install
######################... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,679 | wangzhefeng/pysci | refs/heads/master | /src/pytype/python_typing.py | import typing
from typing import List, Dict, Tuple, Sequence
from typing import NewType
from typing import Callable
# 定义类型别名
Vector = List[float]
ConnectionOptions = Dict[str, str]
Address = Tuple[str, int]
Server = Tuple[Address, ConnectionOptions]
# 创建类型
UserId = NewType("UserId", int)
# 回调函数
... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,680 | wangzhefeng/pysci | refs/heads/master | /src/pyyaml/pyyaml.py | # -*- coding: utf-8 -*-
# ***************************************************
# * File : yaml_demo.py
# * Author : Zhefeng Wang
# * Email : wangzhefengr@163.com
# * Date : 2022-07-06
# * Version : 0.1.070623
# * Description : description
# * Link : link
# * Requirement : 相... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,681 | wangzhefeng/pysci | refs/heads/master | /pyvisual/utils/seaborn_utils.py | # -*- coding: utf-8 -*-
# ***************************************************
# * File : seaborn_utils.py
# * Author : Zhefeng Wang
# * Email : wangzhefengr@163.com
# * Date : 2023-07-11
# * Version : 0.1.071123
# * Description : description
# * Link : link
# * Requirement : 相关模块版本需... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,682 | wangzhefeng/pysci | refs/heads/master | /pyvisual/pyecharts_demo/script/pyecharts_example.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'wangzhefeng'
##################### download and install the library ######################
# $pip install pyecharts
# $ git clone --recursive https://github.com/chenjiandongx/pyecharts.git
# $ cd pyecharts
# $ python setup.py install
#####################... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,683 | wangzhefeng/pysci | refs/heads/master | /src/pybigdata/pydatabase/pymysqldb/MySQLdb.py | # -*- coding: utf-8 -*-
# ***************************************************
# * File : MySQLdb.py
# * Author : Zhefeng Wang
# * Email : wangzhefengr@163.com
# * Date : 2022-07-26
# * Version : 0.1.072621
# * Description : description
# * Link : link
# * Requirement : 相... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,684 | wangzhefeng/pysci | refs/heads/master | /src/pyoop/decorator/decorator0.py |
class tracer:
"""
统计被装饰函数的调用次数
"""
def __init__(self, func):
self.calls = 0
self.func = func
def __call__(self, *args, **kwargs):
self.calls += 1
print(f"call {self.calls} to {self.func.__name__}")
return self.func(*args, **kwargs)
... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,685 | wangzhefeng/pysci | refs/heads/master | /python_database/pymysql/pymysql_example.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pymysql
connection = pymysql.connect(host = 'localhost',
user = 'root',
password = '1234567',
db = 'tinker',
charset = 'utf8mb4',
... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,686 | wangzhefeng/pysci | refs/heads/master | /src/pylog/loguru_demo.py | # -*- coding: utf-8 -*-
# ***************************************************
# * File : loguru.py
# * Author : Zhefeng Wang
# * Email : wangzhefengr@163.com
# * Date : 2023-05-31
# * Version : 0.1.053109
# * Description : description
# * Link : link
# * Requirement : 相关模块版本需求(例如: n... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,687 | wangzhefeng/pysci | refs/heads/master | /pydemo/demo_project_py/log_test.py | import logging
from logging.config import fileConfig
fileConfig("logging_config.ini")
logger = logging.getLogger()
def main():
logger.debug(f"often makes a very good meal of {'visting tourists'}")
if __name__ == "__main__":
main() | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,688 | wangzhefeng/pysci | refs/heads/master | /python_database/MySQLdb.py | # -*- coding: utf-8 -*-
# ***************************************************
# * File : MySQLdb.py
# * Author : Zhefeng Wang
# * Email : wangzhefengr@163.com
# * Date : 2023-07-30
# * Version : 0.1.073015
# * Description : description
# * Link : link
# * Requirement : 相关模... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,689 | wangzhefeng/pysci | refs/heads/master | /pydemo/deom_project_ml/resource/__init__.py | # 存放第三方的包、图片资源、PDF文件等
| {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,690 | wangzhefeng/pysci | refs/heads/master | /src/pytype/python_mypy.py | # -*- coding: utf-8 -*-
# *********************************************
# * Author : Zhefeng Wang
# * Email : wangzhefengr@163.com
# * Date : 2021.01.01
# * Version : 1.0.0
# * Description : description
# * Link : link
# **********************************************
# pyth... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,691 | wangzhefeng/pysci | refs/heads/master | /src/pyoop/python_class.py | # -*- coding: utf-8 -*-
# *********************************************
# * Author : zhefeng wang
# * Email : wangzhefengr@163.com
# * Date : 2021.11.06
# * Version : 1.0.0
# * Description : 1.定义一个类
# * 2.类的实例化
# * 3.类的封装
# * 4.类的继承
# * ... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,692 | wangzhefeng/pysci | refs/heads/master | /src/python_programming/Char1/pickle_dir/make_db_pickle.py |
# -*- coding: utf-8 -*-
__author__ = "wangzhefeng"
from initdata import db
import pickle
dbfile = open('people-pickle', 'wb')
pickle.dump(db, dbfile)
dbfile.close() | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,693 | wangzhefeng/pysci | refs/heads/master | /src/python_leetcode/p007_ReverseInteger.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date : 2019-01-17 21:18:59
# @Author : Your Name (you@example.org)
# @Link : http://example.org
# @Version : $Id$
class Solution:
def reverse1(self, x):
"""
# method 1
:type x: int
:type: int
"""
intMax = 2 ** 31 - 1
intMin = -2 **... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,694 | wangzhefeng/pysci | refs/heads/master | /src/pylog/pysnooper.py | # -*- coding: utf-8 -*-
# ***************************************************
# * File : pysnooper.py
# * Author : Zhefeng Wang
# * Email : wangzhefengr@163.com
# * Date : 2022-06-30
# * Version : 0.1.063023
# * Description : description
# * Link : link
# * Requirement : 相关模块版本需求(例... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,695 | wangzhefeng/pysci | refs/heads/master | /src/py2so/script/main.py |
# -*- coding: utf-8 -*-
from TodayModule import Today
t = Today()
t.get_time()
t.say()
| {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,696 | wangzhefeng/pysci | refs/heads/master | /src/pyalgorithms/sort_algorithm/algorithm.py | # -*- coding: utf-8 -*-
def binary_search(List, item):
# low 和 high 用于跟踪要在其中查找的列表部分
low = 0
high = len(List) - 1
while low <= high:
mid = (low + high) // 2
guess = List[mid]
if guess == item:
return mid
elif guess > item:
high = mid ... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,697 | wangzhefeng/pysci | refs/heads/master | /pyvisual/charts/scatter_plots.py | # -*- coding: utf-8 -*-
# ***************************************************
# * File : scatter_plot.py
# * Author : Zhefeng Wang
# * Email : wangzhefengr@163.com
# * Date : 2023-07-21
# * Version : 0.1.072122
# * Description : description
# * Link : link
# * Requirement ... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,698 | wangzhefeng/pysci | refs/heads/master | /src/pyexcel/main.py | # -*- coding: utf-8 -*-
# ***************************************************
# * File : main.py
# * Author : Zhefeng Wang
# * Email : wangzhefengr@163.com
# * Date : 2022-07-07
# * Version : 0.1.070723
# * Description : description
# * Link : link
# * Requirement : 相关模块... | {"/src/code_review/basic_rule.py": ["/src/code_review/config.py"], "/src/code_review/basci_backup.py": ["/src/code_review/config.py"]} |
90,699 | valeLib/GeneticAlgorithm | refs/heads/master | /src/BitsGeneticAlgorithm.py | from src.Individual import Individual
class BitsGeneticAlgorithm():
def __init__(self, mutationRate, populationSize, numberOfGenes, pool, random):
self.mutationRate = mutationRate
self.populationSize = populationSize
self.numberOfGenes = numberOfGenes
self.poolList = list(pool)
... | {"/src/BitsGeneticAlgorithm.py": ["/src/Individual.py"], "/src/Experiment.py": ["/src/BitsGeneticAlgorithm.py", "/src/NQueenGeneticAlgorithm.py", "/src/StringGeneticAlgorithm.py"], "/src/mainNQueen.py": ["/src/NQueenGeneticAlgorithm.py"], "/src/NQueenGeneticAlgorithm.py": ["/src/BitsGeneticAlgorithm.py", "/src/Individu... |
90,700 | valeLib/GeneticAlgorithm | refs/heads/master | /src/Experiment.py | import random
import numpy as np
from src.BitsGeneticAlgorithm import BitsGeneticAlgorithm
from src.Charts import lineChart
from src.NQueenGeneticAlgorithm import NQueenGeneticAlgorithm
from src.StringGeneticAlgorithm import StringGeneticAlgorithm
mutationRate = 0.1
def main(algorithm, word):
algorithm.generate... | {"/src/BitsGeneticAlgorithm.py": ["/src/Individual.py"], "/src/Experiment.py": ["/src/BitsGeneticAlgorithm.py", "/src/NQueenGeneticAlgorithm.py", "/src/StringGeneticAlgorithm.py"], "/src/mainNQueen.py": ["/src/NQueenGeneticAlgorithm.py"], "/src/NQueenGeneticAlgorithm.py": ["/src/BitsGeneticAlgorithm.py", "/src/Individu... |
90,701 | valeLib/GeneticAlgorithm | refs/heads/master | /src/mainNQueen.py | import random
from src.Charts import lineChart
from src.NQueenGeneticAlgorithm import NQueenGeneticAlgorithm
if __name__ == '__main__':
mutationRate = 0.1
populationSize = 5000
numberOfGenes = 12
algorithm = NQueenGeneticAlgorithm(mutationRate, populationSize, numberOfGenes, None, random.Random())
... | {"/src/BitsGeneticAlgorithm.py": ["/src/Individual.py"], "/src/Experiment.py": ["/src/BitsGeneticAlgorithm.py", "/src/NQueenGeneticAlgorithm.py", "/src/StringGeneticAlgorithm.py"], "/src/mainNQueen.py": ["/src/NQueenGeneticAlgorithm.py"], "/src/NQueenGeneticAlgorithm.py": ["/src/BitsGeneticAlgorithm.py", "/src/Individu... |
90,702 | valeLib/GeneticAlgorithm | refs/heads/master | /src/Individual.py |
class Individual():
def __init__(self, genes):
self.genes = genes
self.score = 0
def __str__(self):
return str(self.genes) | {"/src/BitsGeneticAlgorithm.py": ["/src/Individual.py"], "/src/Experiment.py": ["/src/BitsGeneticAlgorithm.py", "/src/NQueenGeneticAlgorithm.py", "/src/StringGeneticAlgorithm.py"], "/src/mainNQueen.py": ["/src/NQueenGeneticAlgorithm.py"], "/src/NQueenGeneticAlgorithm.py": ["/src/BitsGeneticAlgorithm.py", "/src/Individu... |
90,703 | valeLib/GeneticAlgorithm | refs/heads/master | /src/NQueenGeneticAlgorithm.py | from src.BitsGeneticAlgorithm import BitsGeneticAlgorithm
from src.Individual import Individual
class NQueenGeneticAlgorithm(BitsGeneticAlgorithm):
def __init__(self, mutationRate, populationSize, numberOfGenes, pool, random):
pool = list(range(0, numberOfGenes))
super(NQueenGeneticAlgorithm, sel... | {"/src/BitsGeneticAlgorithm.py": ["/src/Individual.py"], "/src/Experiment.py": ["/src/BitsGeneticAlgorithm.py", "/src/NQueenGeneticAlgorithm.py", "/src/StringGeneticAlgorithm.py"], "/src/mainNQueen.py": ["/src/NQueenGeneticAlgorithm.py"], "/src/NQueenGeneticAlgorithm.py": ["/src/BitsGeneticAlgorithm.py", "/src/Individu... |
90,704 | valeLib/GeneticAlgorithm | refs/heads/master | /src/StringGeneticAlgorithm.py | from src.BitsGeneticAlgorithm import BitsGeneticAlgorithm
from src.Individual import Individual
class StringGeneticAlgorithm(BitsGeneticAlgorithm):
def reproduction(self):
newPopulation = []
for _ in range(self.populationSize):
a, b, *_ = self.random.choices(self.matingPool, k=2)
... | {"/src/BitsGeneticAlgorithm.py": ["/src/Individual.py"], "/src/Experiment.py": ["/src/BitsGeneticAlgorithm.py", "/src/NQueenGeneticAlgorithm.py", "/src/StringGeneticAlgorithm.py"], "/src/mainNQueen.py": ["/src/NQueenGeneticAlgorithm.py"], "/src/NQueenGeneticAlgorithm.py": ["/src/BitsGeneticAlgorithm.py", "/src/Individu... |
90,708 | dimajolkin/WebSocketServer | refs/heads/master | /server/listener/TaskListener.py | import logging
import threading
class TaskListener(threading.Thread):
users = None
def __init__(self, redis, channels):
"""
:type redis: redis.client.Redis
:type handler: WebSocketHandler
"""
self.redis = redis
threading.Thread.__init__(self)
self.pub... | {"/server/listener/NoticeListener.py": ["/server/UserCollection.py"]} |
90,709 | dimajolkin/WebSocketServer | refs/heads/master | /server/Server.py | import json
import logging
import os
import socket
import redis
import tornado.httpserver
import tornado.websocket
import tornado.ioloop
import tornado.web
# from server import Storage, User
import tornado
from server.UserCollection import UserCollection
from server.Storage import Storage
from server.handlers.UserHa... | {"/server/listener/NoticeListener.py": ["/server/UserCollection.py"]} |
90,710 | dimajolkin/WebSocketServer | refs/heads/master | /server/handlers/UserHandler.py | import logging
import tornado.httpserver
import tornado.websocket
import tornado.ioloop
import tornado.web
import json
from server import Storage
class UserHandler(tornado.websocket.WebSocketHandler):
storage = None
user_key = None
users_collection = None
def __init__(self, application, request, ... | {"/server/listener/NoticeListener.py": ["/server/UserCollection.py"]} |
90,711 | dimajolkin/WebSocketServer | refs/heads/master | /server/listener/NoticeListener.py | import threading
import logging
from server.UserCollection import UserCollection
class NoticeListener(threading.Thread):
users = None
def get_users(self):
""""
:return UserCollection
"""
if not isinstance(self.users, UserCollection):
raise Exception("NoticeListene... | {"/server/listener/NoticeListener.py": ["/server/UserCollection.py"]} |
90,712 | dimajolkin/WebSocketServer | refs/heads/master | /run.py | #!/usr/bin/python
import json
import os
import sys
from lib.daemon import Daemon
from server.Server import Server
class ServerDaemon(Daemon):
def run(self):
server = Server()
server.app()
if __name__ == "__main__":
# load config file
config_file_path = "{0}/config.json".format(os.getcw... | {"/server/listener/NoticeListener.py": ["/server/UserCollection.py"]} |
90,713 | dimajolkin/WebSocketServer | refs/heads/master | /web/WebHandler.py | import json
import os
import logging
import tornado.httpserver
import tornado.websocket
import tornado.ioloop
import tornado.web
import socket
import redis
import threading
class IndexHandler(tornado.web.RequestHandler):
@tornado.web.asynchronous
def get(self):
items = ["Item 1", "Item 2", "Item 3"]... | {"/server/listener/NoticeListener.py": ["/server/UserCollection.py"]} |
90,714 | dimajolkin/WebSocketServer | refs/heads/master | /server/Storage.py | class Storage:
def __init__(self, redis):
"""
:param redis.client.Redis redis :
"""
self.redis = redis
def pop(self, key):
"""
- get and delete key
:param str key:
:return:
"""
value = self.redis.get(key)
if value:
... | {"/server/listener/NoticeListener.py": ["/server/UserCollection.py"]} |
90,715 | dimajolkin/WebSocketServer | refs/heads/master | /simple/run.py | import json
import os
import logging
import tornado.httpserver
import tornado.websocket
import tornado.ioloop
import tornado.web
import socket
import redis
import threading
from redis.exceptions import ConnectionError
class NoticeListener(threading.Thread):
handlers = []
redis = None
def attach_handler(... | {"/server/listener/NoticeListener.py": ["/server/UserCollection.py"]} |
90,716 | dimajolkin/WebSocketServer | refs/heads/master | /test.py | import os, pwd
pw = pwd.getpwnam("nobody")
orig_uid = pw.pw_uid
orig_gid = pw.pw_gid
print os.getuid(), os.getgid(), os.geteuid(), os.getegid(), orig_uid, orig_gid
os.setgid(orig_gid)
os.setuid(orig_uid)
| {"/server/listener/NoticeListener.py": ["/server/UserCollection.py"]} |
90,717 | dimajolkin/WebSocketServer | refs/heads/master | /server/UserCollection.py | import json
from multiprocessing import synchronize
from server.handlers.UserHandler import UserHandler
import logging
class UserCollection:
def __init__(self):
self.users = []
pass
def status(self):
print "users count {0}".format(self.users.__len__())
def append(self, user):
... | {"/server/listener/NoticeListener.py": ["/server/UserCollection.py"]} |
90,733 | FTC-8856/trpo | refs/heads/main | /trpo/constants.py | env_name = 'InvertedPendulumBulletEnv-v0'
num_episodes = 1000
gamma = 0.995
lam = 0.98
kl_targ = 0.003
batch_size = 20
policy_hid_list = []
valfunc_hid_list = []
| {"/trpo/core.py": ["/trpo/constants.py", "/trpo/utils.py", "/trpo/value.py"], "/trpo/view.py": ["/trpo/constants.py", "/trpo/core.py", "/trpo/utils.py", "/trpo/value.py"], "/trpo/eval.py": ["/trpo/constants.py", "/trpo/core.py", "/trpo/utils.py", "/trpo/value.py"], "/trpo/train.py": ["/trpo/constants.py", "/trpo/core.p... |
90,734 | FTC-8856/trpo | refs/heads/main | /trpo/core.py | import argparse
import json
import os
import signal
from datetime import datetime
import gym
import jsonpickle
import numpy as np
import scipy.signal
from gym import wrappers
from trpo.constants import (batch_size, env_name, gamma, init_logvar, kl_targ, lam,
num_episodes, policy_hid_list, ... | {"/trpo/core.py": ["/trpo/constants.py", "/trpo/utils.py", "/trpo/value.py"], "/trpo/view.py": ["/trpo/constants.py", "/trpo/core.py", "/trpo/utils.py", "/trpo/value.py"], "/trpo/eval.py": ["/trpo/constants.py", "/trpo/core.py", "/trpo/utils.py", "/trpo/value.py"], "/trpo/train.py": ["/trpo/constants.py", "/trpo/core.p... |
90,735 | FTC-8856/trpo | refs/heads/main | /trpo/utils.py | import csv
import glob
import os
import shutil
import numpy as np
class Scaler(object):
def __init__(self, obs_dim):
self.vars = np.zeros(obs_dim)
self.means = np.zeros(obs_dim)
self.m = 0
self.n = 0
self.first_pass = True
def update(self, x):
if self.first_p... | {"/trpo/core.py": ["/trpo/constants.py", "/trpo/utils.py", "/trpo/value.py"], "/trpo/view.py": ["/trpo/constants.py", "/trpo/core.py", "/trpo/utils.py", "/trpo/value.py"], "/trpo/eval.py": ["/trpo/constants.py", "/trpo/core.py", "/trpo/utils.py", "/trpo/value.py"], "/trpo/train.py": ["/trpo/constants.py", "/trpo/core.p... |
90,736 | FTC-8856/trpo | refs/heads/main | /trpo/view.py |
import argparse
import os
import pickle
from datetime import datetime
from gym import wrappers
from trpo.constants import env_name
from trpo.core import (init_gym, load_model, make_model, run_episode, save_model,
train)
from trpo.policy import Policy
from trpo.utils import Scaler
from trpo.value im... | {"/trpo/core.py": ["/trpo/constants.py", "/trpo/utils.py", "/trpo/value.py"], "/trpo/view.py": ["/trpo/constants.py", "/trpo/core.py", "/trpo/utils.py", "/trpo/value.py"], "/trpo/eval.py": ["/trpo/constants.py", "/trpo/core.py", "/trpo/utils.py", "/trpo/value.py"], "/trpo/train.py": ["/trpo/constants.py", "/trpo/core.p... |
90,737 | FTC-8856/trpo | refs/heads/main | /trpo/eval.py |
import argparse
import os
import pickle
from datetime import datetime
from gym import wrappers
from trpo.constants import env_name
from trpo.core import evaluate, init_gym, load_model, make_model, save_model, train
from trpo.policy import Policy
from trpo.utils import Scaler
from trpo.value import NNValueFunction
im... | {"/trpo/core.py": ["/trpo/constants.py", "/trpo/utils.py", "/trpo/value.py"], "/trpo/view.py": ["/trpo/constants.py", "/trpo/core.py", "/trpo/utils.py", "/trpo/value.py"], "/trpo/eval.py": ["/trpo/constants.py", "/trpo/core.py", "/trpo/utils.py", "/trpo/value.py"], "/trpo/train.py": ["/trpo/constants.py", "/trpo/core.p... |
90,738 | FTC-8856/trpo | refs/heads/main | /trpo/train.py |
import argparse
import os
import pickle
from datetime import datetime
from gym import wrappers
from trpo.constants import env_name
from trpo.core import init_gym, load_model, make_model, save_model, train
from trpo.policy import Policy
from trpo.utils import Scaler
from trpo.value import NNValueFunction
import tempf... | {"/trpo/core.py": ["/trpo/constants.py", "/trpo/utils.py", "/trpo/value.py"], "/trpo/view.py": ["/trpo/constants.py", "/trpo/core.py", "/trpo/utils.py", "/trpo/value.py"], "/trpo/eval.py": ["/trpo/constants.py", "/trpo/core.py", "/trpo/utils.py", "/trpo/value.py"], "/trpo/train.py": ["/trpo/constants.py", "/trpo/core.p... |
90,739 | FTC-8856/trpo | refs/heads/main | /trpo/value.py | from random import shuffle
import numpy as np
import tensorflow as tf
from tensorflow.keras import Model
from tensorflow.keras.layers import Dense, Input
from tensorflow.keras.optimizers import Adam
class NNValueFunction(object):
def __init__(self, obs_dim, hid_list):
self.replay_buffer_x = None
... | {"/trpo/core.py": ["/trpo/constants.py", "/trpo/utils.py", "/trpo/value.py"], "/trpo/view.py": ["/trpo/constants.py", "/trpo/core.py", "/trpo/utils.py", "/trpo/value.py"], "/trpo/eval.py": ["/trpo/constants.py", "/trpo/core.py", "/trpo/utils.py", "/trpo/value.py"], "/trpo/train.py": ["/trpo/constants.py", "/trpo/core.p... |
90,743 | gwangju-ai-TRAIVEL-team/youtube_with_food | refs/heads/master | /project/main/migrations/0003_food.py | # Generated by Django 3.1.1 on 2020-09-24 19:30
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('main', '0002_youtube_recent'),
]
operations = [
migrations.CreateModel(
name='food',
fields=[
('id',... | {"/project/main/views.py": ["/project/main/models.py"], "/project/main/admin.py": ["/project/main/models.py"]} |
90,744 | gwangju-ai-TRAIVEL-team/youtube_with_food | refs/heads/master | /project/main/views.py | from django.shortcuts import render, redirect
from .models import youtube_recent, food
import pandas as pd
import random
import joblib
import gensim
# Create your views here.
ldamodel = joblib.load('ldamodel.pkl')
dictionary = joblib.load('dictionary.pkl')
# topictable dataframe 생성 함수
def make_topictable_per_doc(ldamo... | {"/project/main/views.py": ["/project/main/models.py"], "/project/main/admin.py": ["/project/main/models.py"]} |
90,745 | gwangju-ai-TRAIVEL-team/youtube_with_food | refs/heads/master | /project/main/models.py | from django.db import models
# Create your models here.
class youtube(models.Model) :
video_id = models.CharField(max_length=50)
title = models.CharField(max_length=50)
publishedAt = models.CharField(max_length=100)
channelId = models.CharField(max_length=50)
categoryId = models.CharField(max_leng... | {"/project/main/views.py": ["/project/main/models.py"], "/project/main/admin.py": ["/project/main/models.py"]} |
90,746 | gwangju-ai-TRAIVEL-team/youtube_with_food | refs/heads/master | /project/main/admin.py | from django.contrib import admin
from .models import youtube
# Register your models here.
admin.site.register(youtube) | {"/project/main/views.py": ["/project/main/models.py"], "/project/main/admin.py": ["/project/main/models.py"]} |
90,747 | gwangju-ai-TRAIVEL-team/youtube_with_food | refs/heads/master | /project/parser.py | # coding: utf-8
import csv
read_list = []
f = open('./food_topic.csv', 'r', encoding='utf-8-sig')
reader = csv.DictReader(f)
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings")
import django
django.setup()
from main.models import food
if __name__=='__main__':
for row in reader:
... | {"/project/main/views.py": ["/project/main/models.py"], "/project/main/admin.py": ["/project/main/models.py"]} |
90,748 | gwangju-ai-TRAIVEL-team/youtube_with_food | refs/heads/master | /project/main/urls.py | from django.urls import path
from . import views
app_name = 'main'
urlpatterns = [
path('list/', views.List, name='List'),
path('video/<int:video_id>', views.video, name='video'),
]
| {"/project/main/views.py": ["/project/main/models.py"], "/project/main/admin.py": ["/project/main/models.py"]} |
90,758 | srinivaslak/myrepo | refs/heads/master | /studentcontactproject/studentapp/views.py | from django.shortcuts import render
from .models import StudentData
from .forms import StudentForm
from django.http import HttpResponse
def Student_Views(request):
if request.method=='POST':
sform = StudentForm(request.POST)
if sform.is_valid():
sno1 = request.POST.get('sno')
... | {"/studentcontactproject/studentapp/views.py": ["/studentcontactproject/studentapp/forms.py"]} |
90,759 | srinivaslak/myrepo | refs/heads/master | /studentcontactproject/studentapp/admin.py | from django.contrib import admin
from .models import StudentData
class AdminStudentData(admin.ModelAdmin):
list_display = ['sno','sname','sfee']
admin.site.register(StudentData,AdminStudentData) | {"/studentcontactproject/studentapp/views.py": ["/studentcontactproject/studentapp/forms.py"]} |
90,760 | srinivaslak/myrepo | refs/heads/master | /studentcontactproject/studentapp/forms.py | from django import forms
class StudentForm(forms.Form):
sno = forms.IntegerField(
label='Enter Student Number',
widget=forms.NumberInput(
attrs={
'placeholder': 'Student Number',
'class': 'form-control',
}
)
)
sname = forms.Char... | {"/studentcontactproject/studentapp/views.py": ["/studentcontactproject/studentapp/forms.py"]} |
90,767 | flimshaw/RPrinter | refs/heads/master | /RPrinter/anyjson-0.2.0/setup.py | from setuptools import setup
import anyjson
author, email = anyjson.__author__[:-1].split(' <')
setup(name='anyjson',
version=anyjson.__version__,
description=anyjson.__doc__,
long_description=open("README").read(),
classifiers=[
'License :: OSI Approved :: BSD License',
... | {"/app.py": ["/RPrinter/printer.py"]} |
90,768 | flimshaw/RPrinter | refs/heads/master | /app.py | import tweetstream
import pystache
import RPrinter.printer as rp
import time
printer = rp.RPrinter()
stream = tweetstream.FilterStream("login", "password", track=["columbo"])
template = """
**{{ timestamp }}**
**{{ screen_name }}**: {{ tweet }}
"""
for tweet in stream:
if 'user' in tweet:
# format date... | {"/app.py": ["/RPrinter/printer.py"]} |
90,769 | flimshaw/RPrinter | refs/heads/master | /RPrinter/printer.py | #!/usr/bin/python
import serial
import textwrap
import markdown
import time
import re
DEVICE = "/dev/ttyAMA0"
SPEED = 19200
VERSION = "0.25 ALPHA"
DEBUG = True
# bytecodes for various printer commands, perhaps soon to be legacy
EMPHASIZE = 8
DOUBLEHEIGHT = 16
DOUBLEWIDTH = 32
CHAR_WIDTH = 30
class RPrinter:
... | {"/app.py": ["/RPrinter/printer.py"]} |
90,775 | kyroskoh/gitspatial | refs/heads/master | /gitspatial/user/tests.py | import json
import random
import string
from django.contrib.auth.models import User
from django.core.exceptions import PermissionDenied
from django.http import Http404
from django.test import TestCase
from django.test.client import RequestFactory
from ..models import Repo, FeatureSet
from .views import user_repo, use... | {"/gitspatial/user/tests.py": ["/gitspatial/models.py", "/gitspatial/user/views.py"], "/gitspatial/api/tests.py": ["/gitspatial/api/exceptions.py"], "/gitspatial/api/v1/views.py": ["/gitspatial/models.py", "/gitspatial/api/decorators.py", "/gitspatial/api/exceptions.py", "/gitspatial/tasks.py"], "/gitspatial/tests.py":... |
90,776 | kyroskoh/gitspatial | refs/heads/master | /gitspatial/views.py | import logging
from django.shortcuts import render, redirect
from django.contrib.auth import logout as auth_logout
logger = logging.getLogger(__name__)
def home(request):
"""
GET /
Show the home page
"""
if request.user.is_authenticated() and 'force_home' not in request.GET:
return red... | {"/gitspatial/user/tests.py": ["/gitspatial/models.py", "/gitspatial/user/views.py"], "/gitspatial/api/tests.py": ["/gitspatial/api/exceptions.py"], "/gitspatial/api/v1/views.py": ["/gitspatial/models.py", "/gitspatial/api/decorators.py", "/gitspatial/api/exceptions.py", "/gitspatial/tasks.py"], "/gitspatial/tests.py":... |
90,777 | kyroskoh/gitspatial | refs/heads/master | /gitspatial/api/v1/urls.py | from django.conf.urls import patterns, include, url
urlpatterns = patterns('gitspatial.api.v1.views',
url(r'^$', 'docs', name='v1_api_docs'),
url(r'^hooks/(?P<repo_id>\d+)$', 'repo_hook', name='v1_repo_hook'),
url(r'^(?P<user_name>[.a-zA-Z0-9_-]*)/(?P<repo_name>[.a-zA-Z0-9_-]*)/(?P<feature_set_name>.*)', '... | {"/gitspatial/user/tests.py": ["/gitspatial/models.py", "/gitspatial/user/views.py"], "/gitspatial/api/tests.py": ["/gitspatial/api/exceptions.py"], "/gitspatial/api/v1/views.py": ["/gitspatial/models.py", "/gitspatial/api/decorators.py", "/gitspatial/api/exceptions.py", "/gitspatial/tasks.py"], "/gitspatial/tests.py":... |
90,778 | kyroskoh/gitspatial | refs/heads/master | /gitspatial/api/tests.py | import json
import logging
from django.test import TestCase
from django.test.client import Client
from .exceptions import InvalidSpatialParameterException
from .helpers import query_args
# Simma down the logs during testing
logger = logging.getLogger('gitspatial.api.v1.views')
logger.setLevel(logging.ERROR)
class A... | {"/gitspatial/user/tests.py": ["/gitspatial/models.py", "/gitspatial/user/views.py"], "/gitspatial/api/tests.py": ["/gitspatial/api/exceptions.py"], "/gitspatial/api/v1/views.py": ["/gitspatial/models.py", "/gitspatial/api/decorators.py", "/gitspatial/api/exceptions.py", "/gitspatial/tasks.py"], "/gitspatial/tests.py":... |
90,779 | kyroskoh/gitspatial | refs/heads/master | /gitspatial/api/decorators.py | from functools import wraps
def jsonp(f):
@wraps(f)
def jsonp_wrapper(request, *args, **kwargs):
resp = f(request, *args, **kwargs)
#if resp.status_code != 200:
# return resp
if 'callback' in request.GET:
callback = request.GET['callback']
resp['Conte... | {"/gitspatial/user/tests.py": ["/gitspatial/models.py", "/gitspatial/user/views.py"], "/gitspatial/api/tests.py": ["/gitspatial/api/exceptions.py"], "/gitspatial/api/v1/views.py": ["/gitspatial/models.py", "/gitspatial/api/decorators.py", "/gitspatial/api/exceptions.py", "/gitspatial/tasks.py"], "/gitspatial/tests.py":... |
90,780 | kyroskoh/gitspatial | refs/heads/master | /gitspatial/templatetags/keyvalue.py | from django import template
register = template.Library()
@register.filter
def keyvalue(a_dict, key):
return a_dict.get(key)
| {"/gitspatial/user/tests.py": ["/gitspatial/models.py", "/gitspatial/user/views.py"], "/gitspatial/api/tests.py": ["/gitspatial/api/exceptions.py"], "/gitspatial/api/v1/views.py": ["/gitspatial/models.py", "/gitspatial/api/decorators.py", "/gitspatial/api/exceptions.py", "/gitspatial/tasks.py"], "/gitspatial/tests.py":... |
90,781 | kyroskoh/gitspatial | refs/heads/master | /gitspatial/api/v1/views.py | import json
import logging
from django.conf import settings
from django.http import Http404, HttpResponse, HttpResponseBadRequest
from django.shortcuts import render
from django.views.decorators.csrf import csrf_exempt
from django.views.decorators.http import require_GET, require_POST
from gitspatial.models import Re... | {"/gitspatial/user/tests.py": ["/gitspatial/models.py", "/gitspatial/user/views.py"], "/gitspatial/api/tests.py": ["/gitspatial/api/exceptions.py"], "/gitspatial/api/v1/views.py": ["/gitspatial/models.py", "/gitspatial/api/decorators.py", "/gitspatial/api/exceptions.py", "/gitspatial/tasks.py"], "/gitspatial/tests.py":... |
90,782 | kyroskoh/gitspatial | refs/heads/master | /gitspatial/tests.py | import logging
from django.contrib.auth.models import User
from django.test import TestCase
from django.test.client import Client, RequestFactory
from .views import home
from .models import FeatureSet, Repo, Feature
from .tasks import delete_feature_set_features, delete_repo_feature_sets
from .test_geojson import fea... | {"/gitspatial/user/tests.py": ["/gitspatial/models.py", "/gitspatial/user/views.py"], "/gitspatial/api/tests.py": ["/gitspatial/api/exceptions.py"], "/gitspatial/api/v1/views.py": ["/gitspatial/models.py", "/gitspatial/api/decorators.py", "/gitspatial/api/exceptions.py", "/gitspatial/tasks.py"], "/gitspatial/tests.py":... |
90,783 | kyroskoh/gitspatial | refs/heads/master | /gitspatial/behaviors.py | from django.db import models
class Timestampable(models.Model):
created_date = models.DateTimeField(auto_now_add=True)
updated_date = models.DateTimeField(auto_now=True)
class Meta:
abstract = True
class Syncable(models.Model):
NOT_SYNCED = 1
SYNCING = 2
SYNCED = 3
ERROR_SYNCING... | {"/gitspatial/user/tests.py": ["/gitspatial/models.py", "/gitspatial/user/views.py"], "/gitspatial/api/tests.py": ["/gitspatial/api/exceptions.py"], "/gitspatial/api/v1/views.py": ["/gitspatial/models.py", "/gitspatial/api/decorators.py", "/gitspatial/api/exceptions.py", "/gitspatial/tasks.py"], "/gitspatial/tests.py":... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.