blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 616 | content_id stringlengths 40 40 | detected_licenses listlengths 0 69 | license_type stringclasses 2
values | repo_name stringlengths 5 118 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 63 | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 2.91k 686M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 23
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 213
values | src_encoding stringclasses 30
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 2 10.3M | extension stringclasses 246
values | content stringlengths 2 10.3M | authors listlengths 1 1 | author_id stringlengths 0 212 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1a2b977db98452df079d888fe65e02cf758fd88d | 203e1581f9838c7e253befd9965ad087263d8127 | /dashboard/myutils/__init__.py | 3f0611c2e422ac50fb42140c2b12ba398e609c13 | [] | no_license | magnito2/clownbot | a52a9ffbb79831ba8e96adae52651b384aa29303 | f54d26a1714a6215a3da492853e085064d9938f4 | refs/heads/master | 2022-12-10T18:34:47.811637 | 2020-01-30T13:54:39 | 2020-01-30T13:54:39 | 233,408,628 | 3 | 4 | null | 2022-12-08T05:25:35 | 2020-01-12T14:51:54 | JavaScript | UTF-8 | Python | false | false | 3,688 | py | import requests
from flask_security.signals import password_reset, reset_password_instructions_sent
from flask_security.utils import config_value, get_token_status, hash_data, hash_password, \
url_for_security, verify_hash
from flask_security.recoverable import generate_reset_password_token, send_password_reset_not... | [
"magnusotwani@gmail.com"
] | magnusotwani@gmail.com |
68d8c35e5fbad07bc4f7755a167a5ce85247e30e | 3ce592352627591346ea33ea0c2665ad879414e2 | /References/search/3-3.soduku.py | 8c6629c01cce7fc88632fdba5af2f6689c63a47c | [
"MIT"
] | permissive | royqh1979/python_libs_usage | 113df732ef106f4a5faae1343493756fd703c8c0 | 57546d5648d8a6b7aca7d7ff9481aa7cd4d8f511 | refs/heads/master | 2021-04-16T18:14:43.835482 | 2021-01-11T03:55:25 | 2021-01-11T03:55:25 | 249,374,754 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,139 | py | """
数独求解
使用简化的启发式回溯搜索
使用递归实现
每次优先尝试填写可行数字最少的格子
"""
import numpy as np
from easygraphics import *
from dataclasses import dataclass
import copy
from typing import Set
FONT_WIDTH = 30
BOARD_TOP = 10
BOARD_LEFT = 10
SQUARE_WIDTH = 50
SPEED = 100
# 棋盘,为了方便定义为[10][10],实际只用[1][1]-[9][9]
board = np.zeros((10, 10),dtype... | [
"royqh1979@gmail.com"
] | royqh1979@gmail.com |
85a2de9a877a4f50a4bde42d98b1125658915379 | 38cbe2cb35157d0feb7fc879405eafb8622404af | /string_reverse.py | dd251421d6ef28c8d196b0b3b2e56b854ab92b4b | [] | no_license | Ankita-githubFW/python_basics_files | 0258709415b668f32bfa42d0263956febe81408a | fb4f70b9cfdebbd65f94a7ce204a891bcf67597a | refs/heads/master | 2023-08-11T16:13:39.288451 | 2021-10-07T10:00:49 | 2021-10-07T10:00:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 146 | py | s = 'NOOR BASHA WELCOME TO CODING'
result = s[::-1]
print(f"The reversed string is {result}")
print("The reversed string is {}".format(result))
| [
"noreply@github.com"
] | Ankita-githubFW.noreply@github.com |
0ece535aff6154c0f5fee45c1a1815526bd3cc9b | b8ae3ca933727784afb031938a799401ff0c545c | /etl_fact/etl_fact_draw/transform.py | 27192872698faa95654dfd77465e1ac32734df20 | [] | no_license | zhangguo7/data_warehouse | 9a772e4b3bbbecd9ffc276b8491a55e36577819b | 6af7d9d574df7f0e1fd7317cf855fd341d153988 | refs/heads/master | 2021-01-20T00:56:22.056135 | 2017-07-07T05:46:11 | 2017-07-07T05:46:11 | 89,213,214 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,704 | py | # -*- coding:utf-8 -*-
"""
绘图事实表的数据转换模块
定义了一个class Transform
用于完成对fact_draw表的数据转换与清理
内部构建了一个 transform_main 方法
以及其他内部调用方法:
行业提取 _filter_ind1_ind2
行业并入 _merge_ind_draw
转换经营状态 _deal_operatingState
增加日期和时间键 _trans_DT
拼接电话和手机 _concat_tel
删除多余的变量 _del_unnecessary_vars
重命名 _rename
"""
import re
import sys
sys.path.append('... | [
"zhangguo7@aliyun.com"
] | zhangguo7@aliyun.com |
7b0b902873182939175a307b409a94677e9c5ceb | f2b18dad16af5785267cf17e907b217622383f95 | /application.py | 8345815413695aaa3cd062c4be5b1deb66b0840b | [] | no_license | dxz6160/sensetime_project | cfb8e1a5dbe9e8e896b70d4df9b9302c2968fc55 | 66e84b5c2af37c051074d8329dceef2c68b94105 | refs/heads/master | 2022-12-30T18:21:56.917165 | 2020-10-20T08:36:19 | 2020-10-20T08:36:19 | 286,803,599 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 594 | py | import tornado.web
from views import sensetime
import config
import os
class Application(tornado.web.Application):
def __init__(self):
handlers = [
(r'/home', sensetime.HomeHandler),
(r'/post_pic', sensetime.PicHandler),
(r'/post_video', sensetime.VideoHandler),
... | [
"1957769588@qq.com"
] | 1957769588@qq.com |
4eb90f5b339b74d2768d5d7d268b6d412f8d1798 | f1330ad06f86455a6b7ae61f5617f78a4647cb18 | /dailyfresh/utils/encryption.py | 15dbce8ded86218c2b569f416821693b607c3a3b | [] | no_license | pythonchuang/dailyfresh | 0d37c2a4db53527b9e2e2b7988be1bc8427440d7 | 64720733c14d845a89624169c263e4e8902df68b | refs/heads/dev | 2021-07-03T13:34:53.967419 | 2017-09-24T10:14:39 | 2017-09-24T10:14:39 | 104,314,992 | 0 | 1 | null | 2017-09-24T10:14:40 | 2017-09-21T07:20:43 | HTML | UTF-8 | Python | false | false | 192 | py | import hashlib
class Encrytion(object):
def sha1(text):
return hashlib.sha1(text.encode('utf-8')).hexdigest()
if __name__ == '__main__':
print(Encrytion.sha1('aaskdjfh'))
| [
"786355997@qq.com"
] | 786355997@qq.com |
3ae2079875387f561dad5fbc4ea251ed85ed9d12 | fcef3602a044a82b75eb1bdee87a5eb347a56769 | /recolo/tests/test_coordinate_solver.py | d18af8c84528da0a59395aaf2880b71ea511ddb3 | [
"MIT"
] | permissive | PolymerGuy/recolo | 5cb9c6b01d7eeb4108710606341518aa13efc1d1 | 05b14f0834fa675579eabdf43fac046259df19bb | refs/heads/master | 2023-04-12T00:17:50.150126 | 2022-03-11T12:42:44 | 2022-03-11T12:42:44 | 343,329,602 | 4 | 1 | MIT | 2022-03-05T08:04:49 | 2021-03-01T07:39:40 | Python | UTF-8 | Python | false | false | 3,877 | py | from unittest import TestCase
from recolo.artificial_grid_deformation import find_coords_in_undef_conf, interpolated_disp_field
import numpy as np
def rms_diff(array1, array2):
return np.sqrt(np.nanmean((array1 - array2) ** 2.))
def biharmonic_disp_field(x, y, amp_scale=0.5):
return (amp_scale * 0.4 * np.co... | [
"sindre.n.olufsen@ntnu.no"
] | sindre.n.olufsen@ntnu.no |
30139ce10e0c04c0fc06066ee31e202cfe7665db | 36e51e49d7b56d66ea6eeff437309623bb409bdf | /part9/if_elif_else.py | f759ee1ce2403195322b11286560276f40ce35ab | [] | no_license | dhananjayharel/mark_trego_python_beginners | 2b236e22efeabc7ad848d110081dda487c8bf21b | 2c4d046c21da8b69a643be62dbbf684489caef76 | refs/heads/master | 2020-09-09T11:20:45.609867 | 2019-12-14T14:25:58 | 2019-12-14T14:25:58 | 221,433,398 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 206 | py | x = 3
y = 7
z = 10
if x < y and x > z:
print('something here was the case')
elif x < z:
print(x,'is less than',z)
elif y < z:
print(y,'is less than',z)
else:
print('nothing was the case')
| [
"harel.dhananjay@gmail.com"
] | harel.dhananjay@gmail.com |
6531ca24dc8b784514654a38e162071710663772 | 5bdaea14397df8fcb07a98f82450d81cdd5d778b | /src/service/statistics/score_statistics_service.py | 0d1929c8ce9a233e5a1ec1ee856aa7fdb882dfa5 | [] | no_license | RodrigoDeRosa/ConectarSaludServer | 5b30c90487a767de122f94e6b81934e7fd641378 | 8d2602dc22143e85fdfbfcbd883d33c18164cfb4 | refs/heads/master | 2022-11-20T13:57:42.317373 | 2020-07-12T18:41:05 | 2020-07-12T18:41:05 | 258,001,795 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,154 | py | from datetime import datetime
from src.database.daos.consultation_dao import ConsultationDAO
class ScoreStatisticsService:
@classmethod
async def get_statistics(cls, doctor_id: str, from_date: datetime, to_date: datetime, specialty: str):
""" Retrieve scoring statistics and adapt for response. """
... | [
"rodrigo.derosa@despegar.com"
] | rodrigo.derosa@despegar.com |
ee70005f6474b587eee09a190290dc11f5c5439e | 4d7b2858eb43506f822e1c3c906bee287186b2a9 | /pizza_project/lib/__init__.py | f0acbff325741a8764e1c8595c7766f74b4ceaf7 | [] | no_license | byt3-m3/da_pizza_house | c4d98b1c3246aa48256b368a69fad4046bf19691 | 01d163b511428b442e8d8f97bc4408e6060851db | refs/heads/master | 2022-12-08T03:52:02.487557 | 2020-09-01T21:06:32 | 2020-09-01T21:06:32 | 292,047,731 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 79 | py | from pizza_project.lib.inventory import *
from pizza_project.lib.store import * | [
"cbaxtertech@gmail.com"
] | cbaxtertech@gmail.com |
87442be8bbbe2a7b6035dd33438de37687bad316 | 6cd4c07bedc38cb289dd565f414d2a3baa71c8c3 | /configs/wfcos/wfcos_hrnet_coco.py | 8b9c817f48dc30bd8755c6a8b03580c2994e2a08 | [
"Apache-2.0"
] | permissive | tuggeluk/mmdetection | 4516cc0f70d8f8ff244e1eb4d8b6589d83c67c8a | 669a535c944628a3ab43330cae5c77b643e13a4b | refs/heads/master | 2021-07-01T00:51:23.272205 | 2021-06-18T08:12:55 | 2021-06-18T08:12:55 | 196,585,169 | 2 | 2 | Apache-2.0 | 2020-10-06T13:46:25 | 2019-07-12T13:35:50 | Python | UTF-8 | Python | false | false | 4,876 | py | # model settings
model = dict(
type='WFCOS',
pretrained='open-mmlab://msra/hrnetv2_w32',
backbone=dict(
type='HRNet',
extra=dict(
stage1=dict(
num_modules=1,
num_branches=1,
block='BOTTLENECK',
num_blocks=(4, ),
... | [
"y_satyawan@hotmail.com"
] | y_satyawan@hotmail.com |
c1abf839a8e2b0961c4bf36e6da588e937b240ab | f9ef267bf703783d95b188ff29fd2a5fc686c926 | /Basik_Tutorial/__basik__/record.py | 06b3d1314b26cabd76d0744d56548b70745bfe63 | [] | no_license | dylansolms/TrafficSimulator | 34e2643ac74a235278c7aec1103fe0c3c46b0a08 | 6ef19e76aad6ff4470d864db9b35c734ded36660 | refs/heads/master | 2022-11-26T15:45:13.832385 | 2020-07-17T12:54:03 | 2020-07-17T12:54:03 | 280,400,653 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,549 | py |
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from .node import Node
from .source import Source
from .VehicleObject.vehicle import Vehicle
import warnings
from .utils import unique_legend
try:
import cPickle as pickle
except ImportError or ModuleNotFoundError:
import pickle
#-------... | [
"afrozoolander@gmail.com"
] | afrozoolander@gmail.com |
35e69a6e70d95cbb060ad0ce9122bcdba0e15a07 | 36b81a830b04542383adf40b47894960f65bdec6 | /chemtools/calculators/dalton.py | 1161ca0f8e692918bca26808c0105b1448b4f261 | [
"MIT"
] | permissive | lmmentel/chemtools | c3f8f26b3e4baca89988a5f414e33364a09394bc | 6d395063a332d76a44919b6b4cf558b8178091dc | refs/heads/master | 2023-08-25T12:46:16.500358 | 2023-08-07T15:47:45 | 2023-08-07T15:47:45 | 245,623,218 | 13 | 8 | MIT | 2023-08-30T00:19:17 | 2020-03-07T11:49:57 | Python | UTF-8 | Python | false | false | 6,528 | py | # -*- coding: utf-8 -*-
#The MIT License (MIT)
#
#Copyright (c) 2014 Lukasz Mentel
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights... | [
"lmmentel@gmail.com"
] | lmmentel@gmail.com |
99fc086a4b21a32651d739916b777c4fb89ede9e | aa6bfa0ded0d1df8b364938342a94215ec7b3aea | /commons/redis_server.py | 8c8de4d3139f7811cccb25ec695fe8804d413901 | [] | no_license | bobowang2017/miaosha | 48bcc3fca753d9bac7d627c5e548e0aae8e44cb9 | 80d7bbc74407de451f27033febfacfca81c79ab8 | refs/heads/master | 2020-04-13T17:42:12.625287 | 2019-01-11T03:41:20 | 2019-01-11T03:41:20 | 163,354,827 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,619 | py | # coding: utf-8
import redis
from miaosha.settings import REDIS_CONFIG
redis_valid_time = 60 * 60
class RedisClient:
@property
def redis_client(self):
pool = redis.ConnectionPool(host=REDIS_CONFIG['host'], port=REDIS_CONFIG['port'])
client = redis.Redis(connection_pool=pool)
return c... | [
"anini456123"
] | anini456123 |
2ba398639002ee6e73bb66baf9147410fb204a72 | d03c99cf4e11775ea7c0391623ebf4bba1e9963f | /week4/mostFrequentVisitors.py | c672781de863a6967cc6b81b2ef0ba3d1f8dc11e | [
"MIT"
] | permissive | avinashsc/w261 | ce939155bc7662594a5d17129ed96840d251f287 | fb0cf538015093496f87f0c07ecdb63db93d0094 | refs/heads/master | 2020-04-21T19:45:07.023063 | 2016-12-08T01:48:38 | 2016-12-08T01:48:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,756 | py | #!/usr/bin/python
from mrjob.job import MRJob
from mrjob.step import MRStep
from mrjob.protocol import RawValueProtocol
import re
import operator
class mostFrequentVisitors(MRJob):
OUTPUT_PROTOCOL = RawValueProtocol
URLs = {}
def steps(self):
return [MRStep(
mapper =... | [
"jason.sanchez@blueowl.xyz"
] | jason.sanchez@blueowl.xyz |
2504fde740ea6ec4311efc8b5ea73256cae6680b | 0961b605531fa73cb88640b5978572217bdb6554 | /combinationSum.py | 178da555738c081ee937891c539841ec56526b69 | [] | no_license | LYoung-Hub/Algorithm-Data-Structure | e01d8b72c4026d9d4b9788016ca54c4e359e80ba | e42ec45d98f990d446bbf4f1a568b70855af5380 | refs/heads/master | 2020-07-13T17:17:42.897244 | 2019-11-11T06:15:59 | 2019-11-11T06:15:59 | 205,121,630 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 786 | py | class Solution(object):
ans = []
def combinationSum(self, candidates, target):
"""
:type candidates: List[int]
:type target: int
:rtype: List[List[int]]
"""
length = len(candidates)
if length == 0:
return []
self.ans = []
com... | [
"yangliu2@caltech.edu"
] | yangliu2@caltech.edu |
216caab0b5058a6593ec79eaea114a1cd0914296 | 33334ad1f60c4a87603e7540925295592a83d936 | /devel/_setup_util.py | 0a9748349517f3448bae0a7e728ddd41ed0316f3 | [] | no_license | ChristianBachla/Mini2 | 4a1db3061252dbc8ec615c558ceba0631805709e | 8b33c7f6979595a34d5131d0a4d24cee1a01a531 | refs/heads/master | 2020-05-02T05:26:35.978532 | 2019-03-27T11:54:53 | 2019-03-27T11:54:53 | 177,771,744 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 87 | py | /home/hellden/car_tracker_workspace/devel/.private/catkin_tools_prebuild/_setup_util.py | [
"bjarkehellden@gmail.com"
] | bjarkehellden@gmail.com |
db860d3e1bb35d91e4c7bfda9a9b157a682e6979 | f4cab8397849c2972c76d258f81041ef650de472 | /blog/migrations/0001_initial.py | b35df6ce2593128dc315f01e4e2d0d8af358fa64 | [] | no_license | paner28/mysite | 964a8510d15347227ed53309ca0423762764b458 | 6aa58933dd4ca2821bd5ca602f29bf139997d1cd | refs/heads/main | 2023-03-27T13:20:52.620308 | 2021-03-26T06:35:37 | 2021-03-26T06:35:37 | 351,673,700 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,597 | py | # Generated by Django 3.1.7 on 2021-03-26 05:40
from django.db import migrations, models
import mdeditor.fields
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='AnimeModel',
fields=[
... | [
"toshi23masa@gmail.com"
] | toshi23masa@gmail.com |
092ad3e710de8763f9af7ca100f888acc1cc9d24 | 5303252c8d570844d71fe374d6c78eb6f14aebb6 | /iosgames/spiders/iosgamesbot.py | 48d4b32f85b44053b2b71c180e4a2ac2db15c308 | [] | no_license | vin-say/web-scraping | 7cff35f73980cbce49a5b5d70cb35b04b350c333 | be3b529d485e1330a8189692f1bf9720ff23b4ec | refs/heads/master | 2020-08-04T15:39:13.923213 | 2020-01-04T03:40:26 | 2020-01-04T03:40:26 | 212,187,615 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,707 | py | # -*- coding: utf-8 -*-
import scrapy
from ..items import GameItemLoader, Game
class Iosgamesbot(scrapy.Spider):
name = 'iosgamesbot'
allowed_domains = ['apps.apple.com/us/app/simcity-buildit/id913292932']
start_urls = ['http://apps.apple.com/us/app/simcity-buildit/id913292932/']
def parse(self, ... | [
"vincent.sayseng@gmail.com"
] | vincent.sayseng@gmail.com |
48dee7176bb8171d5e34ce3b814a3824745949bb | 974c5a4f101d0e6f4dfa5fc2f7c641c9d2bd8184 | /sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/operations/_dedicated_hosts_operations.py | 51cb4faf00fcd17afa1aa62853dffed3a1b72cf3 | [
"LicenseRef-scancode-generic-cla",
"MIT",
"LGPL-2.1-or-later"
] | permissive | gaoyp830/azure-sdk-for-python | 4816f04c554dcffb7510a6b7044b0c86a2dd32e1 | 1c66defa502b754abcc9e5afa444ca03c609342f | refs/heads/master | 2022-10-20T21:33:44.281041 | 2022-09-29T17:03:13 | 2022-09-29T17:03:13 | 250,355,505 | 0 | 0 | MIT | 2020-03-26T19:42:13 | 2020-03-26T19:42:12 | null | UTF-8 | Python | false | false | 44,268 | py | # pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRe... | [
"noreply@github.com"
] | gaoyp830.noreply@github.com |
bb34326efa7e8876f71ebe51e16711253c542128 | d925859a64460fb73a065cefe4601701c4858178 | /lib/generator/providers/football.py | 5c3b5b388e47b51a89451f0c54fb519435e7a079 | [
"MIT"
] | permissive | vikkio88/pyDsManager | 6493ffe481f5ce2ffc11376cfb3c52195637f4b6 | 018e08f7db0852f4653c4da6db851551783584a1 | refs/heads/master | 2021-01-10T01:27:20.853049 | 2015-12-21T19:14:45 | 2015-12-21T19:14:45 | 47,927,280 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 167 | py | football = {
'clubs': [
'Football Club',
'Sporting',
'FC',
'United',
'Sport',
'Soccer',
'Football'
]
}
| [
"vincenzo.ciaccio@timesofmalta.com"
] | vincenzo.ciaccio@timesofmalta.com |
45bb8fa9ff7cac2a617fde9225c823719d4b209b | 467c8b99507ccabd0d89042fb0510af88d387ec3 | /test/1.createShortcut/src/createShortcut.py | 21d3f05d98922c6071fe048b7a2fc3c39182bbeb | [] | no_license | Kosuke-Tomita/python | 5f5741a59ec097922a3d17decee4012578628dff | 8ffad74c912a2a08fe94947e29dee6434d6a1c03 | refs/heads/master | 2020-07-21T15:47:41.166210 | 2019-09-08T01:47:38 | 2019-09-08T01:47:38 | 206,912,586 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,717 | py | import tkinter
from tkinter import messagebox as tkMessageBox
from tkinter import filedialog as tkFileDialog
import os
import sys
from pathlib import Path
import os.path
import win32com.client
import datetime
class FolderDialog:
def __init__(self):
pass
def showFD(self):
root=tkinter.Tk()
... | [
"54474920+Kosuke-Tomita@users.noreply.github.com"
] | 54474920+Kosuke-Tomita@users.noreply.github.com |
5e53ab4f41caab7253868ca8b0b46d897ca04b95 | a6588f6e38e90286549851bf38c76339d98d5d1e | /PythonOOP/basic07.py | 248f5c9337e90b6db4f73aaac06cbaa3a4734f62 | [] | no_license | Kamonphet/BasicPython | 6c5213d7ec265e000370bb6b13eea8c2a84825ee | aa99bcbf0cf69dd61d7495a6e5f9ba608814a8cb | refs/heads/main | 2023-07-24T00:35:01.916593 | 2021-09-09T13:23:06 | 2021-09-09T13:23:06 | 403,143,794 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,479 | py | # Inheritance การสืบทอดคุณสมบัติ => การสร้างสิ่งใหม่ขึ้นด้วยการสืบทอดหรือรับเอา
# คุณสมบัติบางอย่างมากจากสิ่งเดิมที่มีอยู่แล้วโดยการสร้างเพิ่มเิมจากสิ่งที่มีอยู่แล้ว
# แบ่งเป็น superclass และ subclass
# superclass
# super() => เรียกใช้งานคุณสมบัติในsuperclass
# class Employee:
class Employee:
#class variab... | [
"noreply@github.com"
] | Kamonphet.noreply@github.com |
7765cc67a607b9556d7c75470b892c02b3fe5707 | f208676788a901f4b66fa0a5809ef5563c1d5471 | /classy_vision/hooks/classy_hook.py | ad5c0a900f8643ca8ed1f247fd4a4e113ac37853 | [
"MIT"
] | permissive | cwb96/ClassyVision | 10e47703ec3989260840efe22db94720122f9e66 | 597a929b820efdd914cd21672d3947fa9c26d55e | refs/heads/master | 2021-02-18T03:35:51.520837 | 2020-03-05T05:41:24 | 2020-03-05T05:43:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,321 | py | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from abc import ABC, abstractmethod
from typing import Any, Dict
from classy_vision import tasks
class ClassyHookSta... | [
"facebook-github-bot@users.noreply.github.com"
] | facebook-github-bot@users.noreply.github.com |
bf020a5eba52f22d341b35e48d8b8451ab99b48b | 977724d5e811c5b54963908022752e3e3517d30e | /main.py | abc855110c8863f56aa8d3ef9792b6d1d220de75 | [] | no_license | naem1023/CNN_DS | 5f7ec702a3aebbf0866f73eb3995825a0ca7b528 | 5a686efa3858346339d5d6c5c0cb930a8fc498a3 | refs/heads/master | 2023-03-28T11:24:05.523790 | 2021-04-01T10:20:31 | 2021-04-01T10:20:31 | 322,156,987 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,585 | py | import read_train_file
import model
import numpy as np
import matplotlib.pyplot as plt
import os
import cv2
import pandas as pd
import time
from multiprocessing import Process, Lock, Queue, Pool
import multiprocessing
from tqdm import tqdm
from tqdm import trange
import tensorflow as tf
from tensorflow.keras.models... | [
"relilau00@gmail.com"
] | relilau00@gmail.com |
e3ba9166ff9f094c8ede9e3c3756bb8117241c50 | 3cae667175b2d6aac6d7f3d8189e9a02c38ea1cf | /AOJ/ITP1/python/ITP1_1_D_Watch.py | c0a07556a3ffec6f81a94127a026e1a802c5a520 | [] | no_license | kokorinosoba/contests | 3ee14acf729eda872ebec9ec7fe3431f50ae23c2 | 6e0dcd7c8ee086650d89fc65616981361b9b20b9 | refs/heads/master | 2022-08-04T13:45:29.722075 | 2022-07-24T08:50:11 | 2022-07-24T08:50:11 | 149,092,111 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 130 | py | s=int(input())
print(s//3600,s//60%60,s%60,sep=':')
"""
S=int(input())
m,s=divmod(S,60)
h,m=divmod(m,60)
print(h,m,s,sep=":")
"""
| [
"34607448+kokorinosoba@users.noreply.github.com"
] | 34607448+kokorinosoba@users.noreply.github.com |
366b74b3e20dae7c6b4d55ed70cd676b8ed2c615 | 7a3ac2f27b2afb16d7e872d07d019b81be597417 | /NonAdditivePartition.py | f564c2f374087a55d26293fe03c95accefa7333b | [] | no_license | TropicalMaster/Master | 8519cc555a87ef5a9d1076ae3cd987e791215c6e | eb682eff7e13e967ad7a37f5c145895a96da4396 | refs/heads/main | 2023-04-13T14:35:55.910513 | 2021-04-18T20:23:14 | 2021-04-18T20:23:14 | 359,234,494 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,038 | py | from sympy import *
from math import *
import copy
from finiteField import *
from random import randint
class PartitionCodes():
def __init__(self, n, k, s, FF):
self.n = n
self.k = k
self.s = s
self.FF = FF
self.q = FF.q
self.p = FF.p
... | [
"noreply@github.com"
] | TropicalMaster.noreply@github.com |
9a0a73a49aa62ab13967f5685b520d1fdb27dd8c | 50bc7a7bc9fc742e1d5a992c785b45c9129172ee | /app/__init__.py | 02b0e68b481784669fa7d7892f5de93758728073 | [] | no_license | spark0119/silvi | 8bc1da68dcb18bd4907954ea02a16c840a149d16 | 57397bbb5232fb07e50ba74a5df7debd922d347d | refs/heads/master | 2022-12-10T13:59:56.832818 | 2019-11-20T14:31:28 | 2019-11-20T14:31:28 | 212,820,403 | 0 | 1 | null | 2022-12-08T06:54:47 | 2019-10-04T13:24:06 | Python | UTF-8 | Python | false | false | 1,597 | py | from flask import Flask
from config import Config
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
from flask_login import LoginManager
import logging
from logging.handlers import SMTPHandler, RotatingFileHandler
import os
app = Flask(__name__)
app.config.from_object(Config)
db = SQLAlchemy(ap... | [
"sean@groupraise.com"
] | sean@groupraise.com |
b83067167ec0f4fa218892d23cdf72fb3e4791d4 | bf92c350a1799ac463bad046e8eea3271aeb7b15 | /3ds/tests/screen-metrics.py | 2ffeb6e74a166976529130f118d5f1990d13fa5c | [
"MIT"
] | permissive | ObsidianX/3ds_monty | 72065dbdfe9890c1a02bb0988aa0a5dd591a8cc6 | 8dc10ca4874175dffcb9c95d1e294c74f3c47ee2 | refs/heads/master | 2021-09-24T18:12:10.556030 | 2021-09-18T10:32:51 | 2021-09-18T10:32:51 | 56,961,916 | 20 | 6 | MIT | 2021-09-18T10:32:52 | 2016-04-24T08:30:45 | C | UTF-8 | Python | false | false | 742 | py | from citrus import *
import sf2d
gfx.init_default()
top = console.PrintConsole(gfx.SCREEN_TOP, window=(2, 2, 46, 26))
metrics = {
"top_width": sf2d.screen['top']['width'],
"top_height": sf2d.screen['top']['height'],
"bot_width": sf2d.screen['bottom']['width'],
"bot_height": sf2d.screen['bottom']['heig... | [
"obsidianx@gmail.com"
] | obsidianx@gmail.com |
4ba29b5b0658607d45ec4cddc703e57f647803a2 | ee81efa621f8a18569d8ac00e5176aff1a736d86 | /kornislav.py | 37758a2ea9cf0c8c91688ee2dd1fcffcb9de4eeb | [] | no_license | renaldyresa/Kattis | c8b29f40a84f4161f49c6247abf10ec2ecc14810 | e504f54602b054eeffaac48b43e70beb976ca94c | refs/heads/master | 2021-12-01T14:57:57.614911 | 2021-11-29T07:44:43 | 2021-11-29T07:44:43 | 182,920,692 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 74 | py | data = list(map(int, input().split()))
data.sort()
print(data[0]*data[2])
| [
"noreply@github.com"
] | renaldyresa.noreply@github.com |
610f110f48d5d27f54a0bc5be7c5258c9bb94d12 | ddddc401695a23f595e42e25abfb16baa3da82ba | /educode/apps.py | bda8e94ca6e930c4de9057d5acc31779b253fc79 | [
"BSD-3-Clause"
] | permissive | harshavardhan26082001/MovieApp | bf6a60dd03b0101ec7d0104414270bec610fff04 | cc0e9b743b3f73322af93997901c3c24265ec870 | refs/heads/main | 2023-05-07T19:03:53.862739 | 2021-05-27T05:52:42 | 2021-05-27T05:52:42 | 370,947,037 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 146 | py | from django.apps import AppConfig
class EducodeConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'educode'
| [
"harsha26082001@gmail.com"
] | harsha26082001@gmail.com |
33c45d1bea515ce8e7487f1aaae7632a3290ea23 | 7266cf77381267869aa39b6345666d148793f153 | /THETA/run_0.8tZ_0.2bW_0.0tH.py | 783200ff41e1e95fad152beac8cafdd97d339b2f | [] | no_license | justinrpilot/VLQAnalysis | 8a0ff20f96be58d5613dc1eec308e43d0a931f96 | 99d6295ef985ebdd8a66820b024750b890ab4aff | refs/heads/master | 2020-05-03T06:17:42.717548 | 2019-06-04T20:16:16 | 2019-06-04T20:16:16 | 178,469,791 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,000 | py | import json
def allhadfilter(hname):
#print hname
names = hname.split("__")
channel = names[0]
process = names[1]
#if ("tprime" not in process):
# return hname
keep = True
if (("sig800" in channel) and ("tprime800" not in process)):
keep = False
if (("sig1000" in chan... | [
"pilot@Justins-MacBook-Air-4.local"
] | pilot@Justins-MacBook-Air-4.local |
a78e5ff716f3fa6d77eaee943d3c3d68e344c53d | 3b6bf30cd6ef7f770faa84852515af3255e217af | /douban_spider/douban/spiders/doubancomics.py | fc1a15fc2e58abb8096312ed464f891339bdef4e | [] | no_license | lemonround1995/Douban_Spider | ae8e6a9f5e907e0bcbfc026e5f0acfe1325647eb | 162adc5af31e425a3dd091fb255b758c63c62cb1 | refs/heads/master | 2020-04-13T01:07:07.304265 | 2018-12-23T05:35:46 | 2018-12-23T05:35:46 | 162,864,760 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,274 | py | # -*- coding: utf-8 -*-
import scrapy
from scrapy.http import Request
from ..items import DoubanItem
class DoubancomicsSpider(scrapy.Spider):
name = "doubancomics"
allowed_domains = ["douban.com"]
start_urls = ['https://book.douban.com/tag/%E6%BC%AB%E7%94%BB?start=0&type=T']
def parse(self, response)... | [
"noreply@github.com"
] | lemonround1995.noreply@github.com |
fcf69ccc998f4adb76624b38832b6312065d0673 | d1160216bfbeb13a0f8356d5fcf70a6588be0d2b | /server.py | 3b1c24fb2388ddabcc729992f682dcea6bc679ac | [] | no_license | afabijan/hypflask | e32770d036385aec096c7567a48a551e3df45354 | d4a292361a98b83f78ee579a32dada34abd18dc7 | refs/heads/master | 2021-01-10T14:56:18.854402 | 2015-06-05T13:50:30 | 2015-06-05T13:50:30 | 36,935,283 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 645 | py | from flask import Flask, render_template, request
import mymodule
app = Flask(__name__)
app.debug = True
@app.route("/")
def index():
name="Aleksander"
return render_template('index.html',name=name)
#retunrs all data
@app.route("/data/")
def alldata():
return mymodule.process()
#an example of 1 paramt... | [
"aleksander.fabijan@me.com"
] | aleksander.fabijan@me.com |
d71cabbf96f5623e576964651f4821ca2a0f0d60 | 89ed212f9fc3554b70e8785d7230d0835f47e68d | /unorganized_code/kp_single_molecule.py | c8a3a7bd60c98d8a195232e346fecf043f5f6d16 | [
"MIT"
] | permissive | rganti/Channel_Capacity_T_Cell | b2499fe62631aae9e4fdd7cd2d0382fb1180ed33 | 62b9cba7a4248287598d06c010dcfcc4601a7006 | refs/heads/master | 2023-03-29T15:10:36.609260 | 2021-04-01T16:18:43 | 2021-04-01T16:18:43 | 275,271,929 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,800 | py | import argparse
from realistic_network import TcrCycleSelfWithForeign, KPRealistic, make_and_cd
from simulation_parameters import MembraneBindingParameters
from ssc_tcr_membrane import MembraneSharedCommands
class SingleMoleculeKprLs(TcrCycleSelfWithForeign):
def __init__(self, arguments=None):
TcrCycle... | [
"rg468@cam.ac.uk"
] | rg468@cam.ac.uk |
55e3891a2fa5e9360b2ff65099e45176087373ca | d8ec14c780f7536a099b6c4f03461ac546d54d6c | /helga_excuses.py | 6f6e408b60364668e4888aac2a13ec87064d9e81 | [] | no_license | alfredodeza/helga-excuses | bdcc0621a505fc9abd2cdc79c020bd7aa694c5a9 | 251c155affaf7d3412a65fe1cb572e6e565d8864 | refs/heads/master | 2021-01-10T19:11:16.352300 | 2013-12-10T23:48:43 | 2013-12-10T23:48:43 | 14,873,521 | 1 | 0 | null | 2013-12-10T23:48:44 | 2013-12-02T20:15:25 | Python | UTF-8 | Python | false | false | 416 | py | import requests
from BeautifulSoup import BeautifulSoup
from helga.plugins import command
@command('excuses', aliases=['excuse'],
help='Show something from developer excuses. Usage: helga (excuses|excuse)')
def excuses(client, channel, nick, message, cmd, args):
response = requests.get('http://developer... | [
"shaun.duncan@gmail.com"
] | shaun.duncan@gmail.com |
55f4a31aab12f7a1297431badf330562a268656e | 1d2e8da3aa4aa845dfd246adf1fb16568c6e21fe | /bakery/venv/bin/pip2 | b35d65ae05505ed7d6725acf4252ae497a18b037 | [] | no_license | stanislaw-rzewuski/REST-automation-demo | 732e5fb846c8ae1d0ba9b5ca0462f96fc33828ef | 00842d798c211f5eec11fd2dc9642d6cc0ac7a97 | refs/heads/master | 2020-07-02T13:32:17.956593 | 2019-09-01T23:45:26 | 2019-09-01T23:45:26 | 201,534,799 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 262 | #!/home/stan/repos/REST-automation-demo/bakery/venv/bin/python2.7
# -*- coding: utf-8 -*-
import re
import sys
from pip._internal import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(main())
| [
"stanislaw.rzewuski@gmail.com"
] | stanislaw.rzewuski@gmail.com | |
6a12d1accfa480e4b12e2edf24372e30ecff77b8 | 7775d1f4db482114f734645f23a64fef1ef7e724 | /model/ESTRNN.py | 7ac59c92438ab761b5fd37a87b2257adbba998d8 | [
"MIT"
] | permissive | RunqiuBao/Event_ESTRNN | f325820413cfc938cec420a7c88123b605e9e1e7 | 6d156cc42a3a33bd0b4b7c4c4be98f943ff53acb | refs/heads/master | 2023-06-16T20:21:04.992942 | 2021-07-11T02:26:12 | 2021-07-11T02:26:12 | 360,787,970 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,918 | py | import torch
import torch.nn as nn
import torch.nn.functional as F
from thop import profile
from .arches import conv1x1, conv3x3, conv5x5, actFunc
# Dense layer
class dense_layer(nn.Module):
def __init__(self, in_channels, growthRate, activation='relu'):
super(dense_layer, self).__init__()
... | [
"zzh.tech@gmail.com"
] | zzh.tech@gmail.com |
73720836ac4d19c75a01a8faa535d62cefe97bf7 | 58399ec14cef82b023fb9eb83188cd3f4f5f8c20 | /timeexample.py | 8247868e85c8c924d2d8e0e61bab5da117fab710 | [] | no_license | Venky9791/Venky_Geekexample | 0baf4262c05cfa1db4e2b2dfa57f05a2297b11da | 02d0389949d7add55a115ee9c02e064688706a9e | refs/heads/master | 2020-06-26T19:08:01.335717 | 2019-08-04T22:22:45 | 2019-08-04T22:22:45 | 199,725,955 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 665 | py | import time
from time import perf_counter as mytimer
import random
import tkinter
print (tkinter.TkVersion)
print (tkinter.TclVersion)
mainwindow = tkinter.Tk()
mainwindow.title = "My First Example GUI"
mainwindow.geometry('640*640+8+400')
mainwindow.mainloop()
# input("Press enter to Start the timeer")
# waittime= ra... | [
"bharthivenky76@gmail.com"
] | bharthivenky76@gmail.com |
7570d43bec14a9efea7e4ecd9455860a4ec6ea78 | 3666c88c1bb764e3d98bbfd56205c8b988a254f1 | /ALDS1_9_D.py | f4e5af35a7d7b51efe204e2705e5f166427ace50 | [] | no_license | shi-mo/aoj | 538b97e7d56136df0197ad015cc85c5aa9501ca5 | b058e77a53163a0ada1425d3966b45b2619e275c | refs/heads/master | 2023-04-02T18:33:43.783422 | 2023-03-20T12:20:37 | 2023-03-20T12:20:37 | 6,807,323 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 429 | py | def unshift(a, i):
while 1 < i:
tmp = a[i]
a[i] = a[i//2]
a[i//2] = tmp
i = i//2
def reverse_heap_sort(a):
n = len(a)
a = [None] + a
hsize = 1
while hsize < n:
unshift(a, hsize)
hsize += 1
tmp = a[1]
a[1] = a[hsize]
a[hsize] = ... | [
"yoshifumi.shimono@gmail.com"
] | yoshifumi.shimono@gmail.com |
067f9f37e818e5bb7b065854d145ba1f603166aa | 9680c83911441f9e796a8c87a38f060756911552 | /git_trojan.py | 4eb5f066268b109f3909c0c1962f4a578339fd7d | [] | no_license | qk13warcraft/chapter7 | bdf69b5ecd47ff7888e87a3ec9026fa6291a41f4 | e1300162725b1b61b530bfaf7bafa534da04f564 | refs/heads/master | 2021-01-21T21:04:58.298208 | 2017-05-25T14:54:55 | 2017-05-25T14:54:55 | 92,299,812 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,610 | py | # -*- coding: utf-8 -*-
import json
import base64
import sys
import time
import imp
import random
import threading
import Queue
import os
from github3 import login
"""
木马主体框架,从GitHub上下载配置选项和运行的模块代码
ttp://github3py.readthedocs.io/en/master/repos.html#github3.repos.branch.Branch
"""
trojan_id = "abc" #唯一标识了木马文件
tr... | [
"qk13warcraft@163.com"
] | qk13warcraft@163.com |
587c4dfea6b066d51ee614baaa03ef70152816ab | 6fdb4a1a7ecb68dcddce8b03cb325578aaef3b33 | /2013-02-02/home/atm.py | d7b8635cc00d58365fe6db7df244a1ab52bd9edc | [] | no_license | lowrey/checkio | 19e62bf9383bb21a069bc782a99bbe0e2dcf09d2 | be0090a4d444648b2295ee088bce0c0e2b4e190d | refs/heads/master | 2021-01-23T12:05:17.214951 | 2014-06-09T03:34:50 | 2014-06-09T03:34:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,183 | py | # Withdraw without any incident
# 120 - 10 - 0.5 - 1% = floor(109.4) = 109
# 109 - 20 - 0.5 - 1% = floor(88.3) = 88
# 88 - 30 - 0.5 - 1% = floor(57.2) = 57
def withdraw(balance, amount):
result = balance - amount
one_percent = .01 * amount
result -= (.5 + one_percent)
return int(result)
def check... | [
"lowrey@server.fake"
] | lowrey@server.fake |
74d21d6d9cafd0126d88ab224385192c6153a0aa | 15e820be4636b1f95c962ed5d63d52d4abacc8dc | /Tutorial/Flask/4_CameraStreaming/camera.py | 4aba9a540cb41e882da9d45986107c480c032966 | [] | no_license | hashimotodaisuke/PlantFactoryTutorial | c2accab8c9fc6e618b2b10d475f5867db3a4996d | cb1dfb99929a44d97c251fa3682890e815372b3d | refs/heads/master | 2023-05-31T01:28:31.963952 | 2021-07-05T00:19:13 | 2021-07-05T00:19:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,191 | py | import cv2
class VideoCamera(object):
def __init__(self):
self.video = cv2.VideoCapture(0)
# Opencvのカメラをセットします。(0)はノートパソコンならば組み込まれているカメラ
def __del__(self):
self.video.release()
def get_frame(self):
# read()は、二つの値を返すので、success, imageの2つ変数で受けています。
# OpencVはデフォルトでは r... | [
"hashi.uniden@gmail.com"
] | hashi.uniden@gmail.com |
3cfa851500fb84c304d21eae3159205368643a00 | d54afd55df19afffa98dd767b812f24d204e9d1b | /Querying SQLite from Python-256.py | 6d038843eb0505f231aed39453320b21ab9c8ce2 | [] | no_license | nemkothari/Sql-Fundamentals | b7666a8ff64525a8cb02afccede2aa47178c7eb3 | 99bc7be798bbe88eef2af12eea5a9851d9e38914 | refs/heads/master | 2020-04-10T15:39:40.572504 | 2018-12-10T04:39:59 | 2018-12-10T04:39:59 | 161,117,632 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 805 | py | ## 3. Connecting to the Database ##
import sqlite3
conn = sqlite3.connect('jobs.db')
## 6. Creating a Cursor and Running a Query ##
import sqlite3
conn = sqlite3.connect("jobs.db")
cursor = conn.cursor()
query = "select Major from recent_grads;"
cursor.execute(query)
majors = cursor.fetchall()
print(majors[0:2])
... | [
"noreply@github.com"
] | nemkothari.noreply@github.com |
c4116cf331ef22b2e9039e73422782228e1bf95c | e4f2374a50cfdc674ba8e97fa6616b2fb11f40d0 | /function_store.py | 6284927d14856e44faba396c172a1075b3202852 | [] | no_license | flying-pi/functionPatching | 9eabc7613dabc8537a8bc3386750014859ac29ff | b488b9ab9f43d6a2715dd24aec652bf582f0ffd3 | refs/heads/master | 2021-05-15T17:01:38.550572 | 2017-10-19T15:59:13 | 2017-10-19T15:59:13 | 107,568,028 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 86 | py | from peta_module import peta_function
def adder(a):
return peta_function(a, 10)
| [
"yura.braiko@raccoongang.com"
] | yura.braiko@raccoongang.com |
c86e24d69cca136581dc75c9b380027f59bfa8d9 | 9b82603adcd8f5ffa9cc9a89b1cc5626ae0c671d | /pan5.py | be25fcb069f2b94db60e56db9513304f6515f444 | [] | no_license | googlelxhgithub/testgit | 101c2511610d5db9c1e83536c4098984b5624d3a | d371d0e7e03c4b6276e5af245f9b0ffbdb0f4d90 | refs/heads/master | 2023-08-17T08:14:08.780942 | 2021-09-27T23:04:38 | 2021-09-27T23:04:38 | 283,491,195 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,072 | py | # “倒计时”在我们日常生活中随处可见,
# 比如:交通标志、开工仪式、庆祝活动、 火箭升空。
# 但最戏剧化的还是电影 007 中定时炸弹的倒计时,还有《三体》中的倒计时信号。
# 今天的问题是:输入一个目标时间(包括年、月、日、时、分、秒),
# 如何写出从当前时间开始到目标时间的倒计时?
from datetime import datetime
import os
import time
DDay = input("目标日期(格式:YY/MM/DD HH:MM:SS) ")
# 把输入的日期打印出来,此时是字符形式。
print(DDay)
# 把字符形式转化为日期格式
DDay = datetime.strptime... | [
"googlelxh@foxmail.com"
] | googlelxh@foxmail.com |
52c940283704d2f43f630be09f5c5b68923fc333 | 7032fd0d1652cc1bec1bff053af4f486a5704cd5 | /old/OpenExrId_1.0-beta.17/conanfile.py | dcb74bafee3fb8349547a73fae2331e0d04f1a9f | [] | no_license | MercenariesEngineering/conan_recipes | c8f11ddb3bd3eee048dfd476cdba1ef84b85af5e | 514007facbd1777799d17d041fc34dffef61eff8 | refs/heads/master | 2023-07-09T08:10:35.941112 | 2023-04-19T13:36:38 | 2023-04-19T13:36:38 | 169,575,224 | 7 | 1 | null | 2023-04-19T14:11:35 | 2019-02-07T13:23:02 | C++ | UTF-8 | Python | false | false | 2,256 | py | from conans import ConanFile, CMake, tools
import os, shutil
#conan remote add conan-transit https://api.bintray.com/conan/conan/conan-transit
#conan remote add hulud https://api.bintray.com/conan/hulud/libs
#conan remote add pierousseau https://api.bintray.com/conan/pierousseau/libs
class OpenEXRIdConan(ConanFile):
... | [
"rousseau@mercenaries-engineering.com"
] | rousseau@mercenaries-engineering.com |
b30f5537526f3f947a1bf63a0c422307f10c78e4 | 8b495f11fe76002342304092bd04338dcdee2378 | /tests/metasploit/test.py | 6e78227fc7040098fcb7e69447004d7b61e0a6b4 | [
"BSD-3-Clause"
] | permissive | cacalote/ptp | bd88c6ba253f4fb8d4a339730cda41f7b29ade39 | 720e9f8b33a15eb9ff88f858a68c99f30e37982e | refs/heads/master | 2020-09-15T13:29:49.671521 | 2015-05-20T15:41:02 | 2015-05-20T15:41:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,644 | py | from __future__ import print_function
import os
import traceback
from ptp import PTP
from ptp.libptp.constants import UNKNOWN, INFO, LOW, MEDIUM, HIGH
__testname__ = 'metasploit'
REPORTS = {
# Scanner
'auxiliary/scanner/ftp/anonymous': {
'report_low.txt': LOW,
'report_high.txt': HIGH,
... | [
"sauvage.tao@gmail.com"
] | sauvage.tao@gmail.com |
220274ef4a9b4c4918eadc9760519ac1b39963d8 | 3cd18a3e789d3a0739768f1ae848d9f74b9dbbe7 | /mounth001/day21/exercise03.py | fe9a7a38bb1bfcf3fe7454d21909dc564595ee5d | [] | no_license | Molly-l/66 | 4bfe2f93e726d3cc059222c93a2bb3460b21ad78 | fae24a968f590060522d30f1b278fcfcdab8b36f | refs/heads/master | 2020-09-28T12:50:18.590794 | 2019-11-27T04:42:28 | 2019-11-27T04:42:28 | 226,782,243 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 773 | py | """
lstack.py 栈的链式结构
重点代码
思路:
1. 源于节点存储数据,建立节点关联
2. 封装方法 入栈 出栈 栈空 栈顶元素
3. 链表的开头作为栈顶(不需要每次遍历)
"""
# 自定义异常
class StackError(Exception):
pass
# 创建节点类
class Node:
def __init__(self,val,next=None):
self.val = val # 有用数据
self.next = next # 节点关系
# 链式栈
class LStack:
def __init__(self):
... | [
"769358744@qq.com"
] | 769358744@qq.com |
942d5f383fb074463bde66060a1faedb97568626 | 1033c93917117f462771571c29dd046954582bd8 | /revscores/features/proportion_of_symbolic_added.py | 2eeae56295eca238e2c206c786853e46201b8d7b | [
"MIT"
] | permissive | jonasagx/Revision-Scoring | d4e3e892ac5de3a7f3032ef2b4fcc7b6efb20330 | dfacba014e30d49577aa1a56aab13393ecede9d5 | refs/heads/master | 2021-01-17T11:57:39.393734 | 2015-01-10T19:13:02 | 2015-01-10T19:13:02 | 29,064,762 | 0 | 1 | null | 2015-01-10T19:13:03 | 2015-01-10T17:25:22 | Python | UTF-8 | Python | false | false | 501 | py |
from .chars_added import chars_added
from .feature import Feature
from .symbolic_chars_added import symbolic_chars_added
def process(chars_added, symbolic_chars_added):
return symbolic_chars_added/(chars_added or 1)
proportion_of_symbolic_added = Feature("proportion_of_symbolic_added", process,
... | [
"aaron.halfaker@gmail.com"
] | aaron.halfaker@gmail.com |
987986c93691efd140bd8faaf1832769a486b00e | 0116525d908fd3a604dfe6a4da4ffc455d5f7d40 | /arraymin.py | 963aa15c0df1484c57d06914d65f53f3e30a5e6d | [] | no_license | Krithikasri/set3beginner | c9a18cf20087b72a5aab27c6ba7427a4e05bfb64 | 2d6269605a48905923d428e1717575759dd5a6ad | refs/heads/master | 2020-04-22T03:27:12.009941 | 2019-02-14T05:48:26 | 2019-02-14T05:48:26 | 170,087,158 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 62 | py | N=int(input())
k=list(map(int,input().split()))
print(min(k))
| [
"noreply@github.com"
] | Krithikasri.noreply@github.com |
c7741bf2134b8580c0fa764a5a86ef149790da35 | 1e39e416db368a47c2cfe5eadf797abe2bf3ad4a | /model.py | e70d5dcc2dc4fda4425423d78f294e093224f0f4 | [] | no_license | r00t4/dog | 5846ddf52e0fda1ab30c4c7a027f87f1339f8d48 | 1c99dcd08d9610609efa4e558d4b2e4737e32de2 | refs/heads/master | 2020-09-09T15:19:35.323134 | 2019-11-13T13:56:28 | 2019-11-13T13:56:28 | 221,471,170 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,198 | py | import torch
import torch.nn as nn
import torch.nn.functional as F
class NeuralNetwork(nn.Module):
def __init__(self):
super(NeuralNetwork, self).__init__()
self.conv1 = nn.Conv2d(3, 16, 3, padding=1)
self.conv2 = nn.Conv2d(16, 32, 3, padding=1)
self.conv3 = nn.Conv2d(32, 64, 3, pa... | [
"kborash@dar.kz"
] | kborash@dar.kz |
4668b524700dbf55e3711938e6cfd959affaa864 | 57ddfddd1e11db649536a8ed6e19bf5312d82d71 | /AtCoder/ABC1/ABC123/ABC123-A.py | 04402036b76e6ab088ca47d8dcc146c57c639e4d | [] | no_license | pgDora56/ProgrammingContest | f9e7f4bb77714dc5088c2287e641c0aa760d0f04 | fdf1ac5d1ad655c73208d98712110a3896b1683d | refs/heads/master | 2023-08-11T12:10:40.750151 | 2021-09-23T11:13:27 | 2021-09-23T11:13:27 | 139,927,108 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 191 | py | sm = float('inf')
bi = - float('inf')
for _ in range(5):
v = int(input())
if v < sm: sm = v
if v > bi: bi = v
if bi - sm > int(input()): print(':(')
else: print('Yay!')
| [
"doradora.prog@gmail.com"
] | doradora.prog@gmail.com |
b4f4e6f565e7d55f59c7f5d9117c3a4e0ea4a4ae | 53f733c092e24610d864fa66a2741311b3b31209 | /google/cloud/security/common/data_access/forseti_system_dao.py | 56807d33a930a37da8a06da90dcb1256c46fbd86 | [
"Apache-2.0"
] | permissive | shimizu19691210/forseti-security | a4860e30aa8a097b23d262d7a82fe2bca951a955 | a6a1aa7464cda2ad5948e3e8876eb8dded5e2514 | refs/heads/master | 2021-04-15T06:07:42.110629 | 2018-03-21T21:40:05 | 2018-03-21T21:40:05 | 126,314,876 | 1 | 0 | Apache-2.0 | 2018-03-22T09:57:54 | 2018-03-22T09:57:53 | null | UTF-8 | Python | false | false | 2,279 | py | # Copyright 2017 The Forseti Security Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... | [
"henryc@google.com"
] | henryc@google.com |
143a773bbbec049d6b12a6406b50a9fce3cdd585 | 26dec2f8f87a187119336b09d90182d532e9add8 | /mcod/resources/documents.py | da3e92fb9c8f6d9a843336fb6541b7e1b3f9d460 | [] | no_license | olekstomek/mcod-backend-dane.gov.pl | 7008bcd2dbd0dbada7fe535536b02cf27f3fe4fd | 090dbf82c57633de9d53530f0c93dddf6b43a23b | refs/heads/source-with-hitory-from-gitlab | 2022-09-14T08:09:45.213971 | 2019-05-31T06:22:11 | 2019-05-31T06:22:11 | 242,246,709 | 0 | 1 | null | 2020-02-24T22:39:26 | 2020-02-21T23:11:50 | Python | UTF-8 | Python | false | false | 2,197 | py | from django.apps import apps
from django_elasticsearch_dsl import DocType, Index, fields
from mcod import settings
from mcod.lib.search.fields import TranslatedTextField
Resource = apps.get_model('resources', 'Resource')
Dataset = apps.get_model('datasets', 'Dataset')
TaskResult = apps.get_model('django_celery_result... | [
"piotr.zientarski@britenet.com.pl"
] | piotr.zientarski@britenet.com.pl |
8c36fc26a272f071d2585e8f26ae41f860d794bf | 85381529f7a09d11b2e2491671c2d5e965467ac6 | /OJ/Leetcode/Algorithm/54. Spiral Matrix.py | 877d512e72cd9a17631f7f49ff7225fae0269c52 | [] | no_license | Mr-Phoebe/ACM-ICPC | 862a06666d9db622a8eded7607be5eec1b1a4055 | baf6b1b7ce3ad1592208377a13f8153a8b942e91 | refs/heads/master | 2023-04-07T03:46:03.631407 | 2023-03-19T03:41:05 | 2023-03-19T03:41:05 | 46,262,661 | 19 | 3 | null | null | null | null | UTF-8 | Python | false | false | 688 | py | # -*- coding: utf-8 -*-
# @Author: HaonanWu
# @Date: 2017-03-03 10:57:26
# @Last Modified by: HaonanWu
# @Last Modified time: 2017-03-03 11:01:34
class Solution(object):
def spiralOrder(self, matrix):
"""
:type matrix: List[List[int]]
:rtype: List[int]
"""
ret = []
... | [
"whn289467822@outlook.com"
] | whn289467822@outlook.com |
55095ee0ea77fe40bd4ed68f53cd486d3d782b2d | fb235cccecab5368074bc43ed8677025f925dceb | /notebooks/westgrid/cffi_practice/__init__.py | 6a5ba61abdb1177997fc7a77bffbd803fbab65cb | [] | no_license | sbowman-mitre/parallel_python_course | 88a5f767de2f0f630d48faf94983fad51ecbe50f | 85b03809c9725c38df85b0ac1e9b34cc50c0dc54 | refs/heads/master | 2022-01-04T18:29:12.443568 | 2019-11-29T16:08:06 | 2019-11-29T16:08:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,313 | py | # import version for use by setup.py
from ._version import version_info, __version__ # noqa: F401 imported but unused
from pathlib import Path
import pdb
import os
import pdb
def get_paths(*args, **kwargs):
binpath=Path(os.environ['CONDA_PREFIX'])
<<<<<<< HEAD
libfile= binpath / Path('lib/libcffi_funs.so')
... | [
"paustin@eos.ubc.ca"
] | paustin@eos.ubc.ca |
d8cd32918e0332ff185300fa7e171a9a68f0cdd3 | 7ce076dd764fe4b5c7881734f157bc6f77a99ead | /tests/providers/exasol/operators/test_exasol.py | 68e3d121b48bccf3971c3dd9c3a0247ac1f8a694 | [
"Apache-2.0",
"BSD-3-Clause",
"MIT",
"Python-2.0"
] | permissive | kaxil/airflow | db31c98e23f2e0d869d857484e56a7c58acef231 | 42f1da179db00491610946a0b089dd82269adc74 | refs/heads/master | 2023-04-28T04:46:38.478352 | 2020-09-28T20:51:16 | 2020-09-28T20:51:16 | 112,322,392 | 1 | 1 | Apache-2.0 | 2020-08-27T20:15:22 | 2017-11-28T10:42:19 | Python | UTF-8 | Python | false | false | 1,922 | py | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | [
"noreply@github.com"
] | kaxil.noreply@github.com |
8e324a32f92a18daf3d929c2bada111d0e6ec1de | 89d7bd51638bb3e8ca588062af1a3ec4870efd55 | /Tasks/DmitryKozhemyachenok/classwork1/sam.py | 67d9756d85b736503f30c388de6595853f0e1a1b | [] | no_license | Kori3a/M-PT1-38-21 | 9aae9a0dba9c3d1e218ade99f7e969239f33fbd4 | 2a08cc4ca6166540dc282ffc6103fb7144b1a0cb | refs/heads/main | 2023-07-09T20:21:32.146456 | 2021-08-19T17:49:12 | 2021-08-19T17:49:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 785 | py | import itertools
r={"zero": 0, "one": 1, "two": 2, "three": 3, "four": 4, "five": 5, "six": 6,
"seven": 7, "eight": 8, "nine": 9, "ten": 10, "eleven": 11, "twelve": 12, "thirteen": 13,
"fourteen": 14, "fifteen": 15, "sixteen": 16, "seventeen": 17, "eighteen":18, "nineteen": 19, "twenty": 20}
r=[r[i] for i in input().... | [
"dmitriikozhemyachenok@mail.ru"
] | dmitriikozhemyachenok@mail.ru |
aea3a266f96e0e510e291772736803d003de39c4 | 08c4415606e2a06593c8d837c746d79f6e2645a9 | /heart-disease.py | efc62dbf34d98220f689e6ce4b503bd804b3bd26 | [] | no_license | vanphuoc9/heart-disease | 2f018074f8f7f177f0a125f79af03f70d61d1c6c | 713efcfbd1e41ec29364d5e5889da98d76fd5101 | refs/heads/master | 2020-03-26T11:39:01.224150 | 2018-09-03T04:26:52 | 2018-09-03T04:26:52 | 144,852,615 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,988 | py | import pandas as pd
import numpy as np
import sklearn
from sklearn.preprocessing import Imputer
#Tao ra mo hinh xac suat Bayes thong qua thu vien
from sklearn.metrics import accuracy_score
from sklearn.model_selection import train_test_split
# #Tao ra mo hinh xac suat Bayes thong qua thu vien
from sklearn.naive_bayes ... | [
"thaiphuoc1997@gmail.com"
] | thaiphuoc1997@gmail.com |
b2d1398b1871c9a27671f1b06ceffc99159ba998 | 21a5a58e19a989a7301c3d658c707608071725b2 | /train.py | 42396ce06a89820b1dfd94fcc756b4ecc3f91125 | [] | no_license | Meneville/fast-weights-test | 0787c40de1144166dfab84aecc4f289a1acb984a | 1a3e04d504b379263235a8a805dd7049b0a0406a | refs/heads/main | 2023-05-31T02:30:37.208511 | 2021-07-09T12:57:06 | 2021-07-09T12:57:06 | 384,435,172 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,189 | py | # ---------------------------------------------------------------------------
# 0. import
# ---------------------------------------------------------------------------
import tensorflow as tf
import numpy as np
import _pickle as pickle
from dataset import DataGenerator
from model import fw_rnn_model
from utils import *... | [
"chen_qh@zju.edu.cn"
] | chen_qh@zju.edu.cn |
34bfcc6b015aa99b68b4193b7ac4abc2d22eca43 | 46304762aa4dea478008545fcecff88dd56df13e | /build/lib/A22DSE/Parameters/Par_Class_All.py | 1dea22730931f0c10b07e4f0c9252d0577681645 | [] | no_license | ThomasRV/A22CERES | 12551a00be887a68e744523a4c7b548405346b3a | 21c1d1889ef402bd23668493a1a4c6acec344f58 | refs/heads/master | 2020-05-31T11:44:38.858255 | 2019-06-04T15:00:50 | 2019-06-04T15:00:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,375 | py | # -*- coding: utf-8 -*-
"""
Created on Mon May 13 11:37:54 2019
@author: hksam
"""
#import sys
#sys.path.append('../../')
#from A22DSE.Models.AnFP.Current.InitialSizing.AnFP_Exec_initsizing import WSandTW
#from A22DSE.Models.POPS.Current.cruisecalculations import CruiseRange, CruiseTime
#from A22DSE.Models.POPS.Curren... | [
"noutvdbos@gmail.com"
] | noutvdbos@gmail.com |
76f4330d8dd21990e81c8fffc080ff973d8ca274 | fbb2ff6d6734e02b24d9eef2a16ebba58c755a1b | /wx_event_propagate.py | bb82371c56ce8e78e08839ab3bdfb4977fd6db15 | [] | no_license | brainliubo/wxpython_project | a29fe18eb14c20bc1c348c724460d17d7967dee9 | 98edc15be6c16b7e413027231b4a512bd37343ee | refs/heads/master | 2020-03-24T21:06:09.994644 | 2019-01-02T11:47:08 | 2019-01-02T11:47:08 | 143,013,605 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,261 | py | '''
event.Skip() 方法是将event 继续往上一级进行传递的重要方法,如果不调用,则该event只要被catch 一次,就不进行传递了
'''
import wx
ID_BUTTON1 = wx.NewId() # 生成2个ID
ID_BUTTON2 = wx.NewId()
class MyApp(wx.App):
def OnInit(self):
#app 上添加frame
self.frame = MyFrame(None, title="Event Propagation")
self.SetTopWindow(self.frame)
... | [
"clairlb@163.com"
] | clairlb@163.com |
26c80160665467234f7e9f9bac615e1f9a40f3ec | 4cc2b3ba7d7b87a57ba1d4c5532426d5c6676bf1 | /product/migrations/0002_auto_20210609_1621.py | c9e0653bfda3267fe361ec7c2eeed7d81838c27c | [] | no_license | Bhavesh852/Order | 5cba5bb4a02db9fd9d7d2f681bcaa2126c82a3ac | 92383e555f5b3fac4549e45ba1510c8355d6e621 | refs/heads/master | 2023-05-15T05:16:47.297902 | 2021-06-09T14:11:05 | 2021-06-09T14:11:05 | 375,373,577 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 981 | py | # Generated by Django 3.0.8 on 2021-06-09 10:51
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('product', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='order',
... | [
"bchandora60@gmail.com"
] | bchandora60@gmail.com |
7d7e17f1be39a1bce373f6aa4892368c83bdc96a | 693ae5945a34ac9487e40c478a1cabb6f4ef7eb6 | /quantum/tests/unit/test_routerserviceinsertion.py | 633629f27ecdfca8ce29f30623a22f723f39806d | [
"Apache-2.0"
] | permissive | yy2008/quantum | 292f7a5cc1c78ce97ba8b5e6211f7bd6dad2a46a | b590f9dd560978ab8cee2da7bee96f29e2f307f7 | refs/heads/master | 2021-01-24T00:54:11.916086 | 2013-02-22T06:16:42 | 2013-02-22T06:16:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 16,397 | py | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 VMware, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/lice... | [
"fank@vmware.com"
] | fank@vmware.com |
6f233f3437f6dad2837d92f9c1bdd17ab312e768 | b32ab366f637cf28c7235905affb10ef1831472e | /Project_Part2/train.py | 067ad4dd1aef1dafd55ccbb244b50318b9be1928 | [] | no_license | miloooooz/Information_Retrieval_and_Web_Search | 523eaadddb40d060a2384cce2a8819bff9985a2d | a8070d3ac84d095a2c3f61fcc6b204aba3add1a3 | refs/heads/master | 2021-03-07T02:20:41.758503 | 2020-03-10T10:46:06 | 2020-03-10T10:46:06 | 246,239,799 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,451 | py | ## Import Necessary Modules...
import pickle
from pprint import pprint
import project_part2_redo as project_part2
## Read the data sets...
### Read the Training Data
train_file = './Data/train.pickle'
train_mentions = pickle.load(open(train_file, 'rb'))
### Read the Training Labels...
train_label_file = './Data/trai... | [
"zhouruijun0510@hotmail.com"
] | zhouruijun0510@hotmail.com |
c2191030e2543c62287b31ad7e253f8767252f1c | 9ae6ce54bf9a2a86201961fdbd5e7b0ec913ff56 | /google/ads/googleads/v9/enums/types/feed_item_quality_approval_status.py | 2b7fc3c81f16e8f0168b1a99e3484c10977c937b | [
"Apache-2.0"
] | permissive | GerhardusM/google-ads-python | 73b275a06e5401e6b951a6cd99af98c247e34aa3 | 676ac5fcb5bec0d9b5897f4c950049dac5647555 | refs/heads/master | 2022-07-06T19:05:50.932553 | 2022-06-17T20:41:17 | 2022-06-17T20:41:17 | 207,535,443 | 0 | 0 | Apache-2.0 | 2019-09-10T10:58:55 | 2019-09-10T10:58:55 | null | UTF-8 | Python | false | false | 1,260 | py | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | [
"noreply@github.com"
] | GerhardusM.noreply@github.com |
a3c0fbf2706cd04d397ed4f4e27f4e86f007625e | d302dc1cdb3f514d08cc812529b542da4ec7c2ae | /Prime.py | c48ea98bcbac66c0ea23679b9a4fadf13cb4320c | [] | no_license | Rahan13/CODE_KATA_PLAYER | 8f5bcdb429a484e951a11a257139709b8926ae10 | 7f1e40214a344cc4416f092959f6a7fa514d23fb | refs/heads/master | 2020-06-05T10:28:51.237104 | 2019-07-11T03:23:10 | 2019-07-11T03:23:10 | 192,409,548 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 144 | py | num = int(input())
a = True
for i in range(2,num):
if num%i ==0:
a = False
print("yes")
break
if a:
print("no")
| [
"noreply@github.com"
] | Rahan13.noreply@github.com |
c412835e863548366c31fa22434e45e614059113 | 56278a6e508ce1a282270f90f1cd9984edd14965 | /tests/test_validation/_test_utils.py | ae430d81167f643c218fc773e99d0fc4cf3c2974 | [
"MIT"
] | permissive | gc-ss/py-gql | 3d5707938e503dc26addc6340be330c1aeb2aa76 | 5a2d180537218e1c30c65b2a933fb4fe197785ae | refs/heads/master | 2023-04-10T05:21:24.086980 | 2020-04-01T14:18:20 | 2020-04-01T14:18:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,463 | py | # -*- coding: utf-8 -*-
from py_gql._string_utils import dedent
from py_gql.lang import parse
from py_gql.validation import validate_ast
from py_gql.validation.validate import SPECIFIED_RULES, default_validator
def _ensure_list(value):
if isinstance(value, list):
return value
else:
return [va... | [
"c.lirsac@gmail.com"
] | c.lirsac@gmail.com |
8986dc358b507dacb7c4a4416d0697035d394d40 | 9c51b666e9c6db491af0fe67b58dd1335f77088e | /tools/markdownlint-fixer.py | 05d0e8bcb4f9d491480e15c28ff52a5a5084255f | [
"CC-BY-4.0"
] | permissive | undergroundwires/Azure-in-bullet-points | aa15ee480d6fe5a7f057fda03e454e70e5118154 | 9743b1d81a49fa7c28d93a4ced21db30cef28765 | refs/heads/master | 2023-08-31T23:38:30.500859 | 2023-08-18T13:41:37 | 2023-08-18T13:41:37 | 175,283,225 | 1,052 | 470 | CC-BY-4.0 | 2023-08-18T13:41:39 | 2019-03-12T19:31:20 | Python | UTF-8 | Python | false | false | 2,781 | py | '''
Not tested for generic usage. It fixes following lint issues in md files:
MD007 - Unordered list indentation
MD009 - No trailing whitespaces
MD004 - Unordered list style
MD002 - Headings should be surruonded by blank lines
'''
import math, os.path, sys, argparse
parser = argparse.ArgumentParser(des... | [
"undergroundwires@users.noreply.github.com"
] | undergroundwires@users.noreply.github.com |
d30b2d899932c4a3c83284b2c6de91a631b995de | 7f52cfb2fb4f09a14ada450862bab25af19cb151 | /merge_data.py | 5b5b6fcc24e023f854acf30ff74bba31ba11acc2 | [] | no_license | shahumang19/Periocular-Recognition | e63d33e3c3393ba42f9342f6ed0729b1595aedfd | 640b82d31dc79e7bbb46c88433c6561c0f011fa5 | refs/heads/master | 2022-12-17T23:04:33.959009 | 2020-08-11T06:59:50 | 2020-08-11T06:59:50 | 285,555,399 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 735 | py | import os, pickle
import numpy as np
F1 = "data\\leye_features1.pkl"
F2 = "data\\leye_features2.pkl"
F3 = "data\\reye_features1.pkl"
F4 = "data\\reye_features2.pkl"
FILES = [F1, F2, F3, F4]
features, labels = None, None
for file1 in FILES:
with open(file1, "rb") as f1:
data = pickle.load(f1)
if ... | [
"shahumang19@gmail.com"
] | shahumang19@gmail.com |
c1a8889953ba8a96272a8c3b6ed202d72807d980 | 53365da025bf6a2b0b9dda4554836836409f65fc | /django_fullstack/semi_restful_tv_shows/main/views.py | 6a2ecdecc361fa3dee8684b594a136391e8c51fb | [] | no_license | jdinthetrees/pythonstack | d837d2cc173cd3f3a3bf6daf984ae0672d7f86e4 | e41ac65ea34a0296260b338d3928f1d81b3725a7 | refs/heads/master | 2023-02-12T06:45:18.486565 | 2021-01-12T21:24:41 | 2021-01-12T21:24:41 | 329,112,787 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,307 | py | from django.shortcuts import render, HttpResponse, redirect
from django.contrib import messages
from .models import Show
def index(request):
print(Show.objects.get(id=6).__dict__)
for show in Show.objects.all():
context = {
'all_the_shows': Show.objects.all(),
}
return render(request, ... | [
"jollyjohndang@gmail.com"
] | jollyjohndang@gmail.com |
fe3c331699a0e001fa186a6177c1df7612b048b4 | 0b64d153144478bc87c8e187c54de2faeb660641 | /env/Lib/site-packages/autobahn/websocket/compress_snappy.py | cee3d60ccdb0ca60fe4d33a7ec7db60622e4bcb3 | [
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-other-copyleft",
"GPL-1.0-or-later",
"bzip2-1.0.6",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-newlib-historical",
"OpenSSL",
"Python-2.0",
"TCL",
"LicenseRef-scancode-python-... | permissive | YUND4/smartlights | db4d102fd983db355941431553818f243ffd682f | a86d5e68b4e3c72b133a6853ebd4a1ed0f2623d4 | refs/heads/master | 2022-12-24T11:38:06.669241 | 2019-07-12T16:55:01 | 2019-07-12T16:55:01 | 196,614,236 | 0 | 1 | MIT | 2022-12-11T22:42:03 | 2019-07-12T16:52:16 | HTML | UTF-8 | Python | false | false | 16,978 | py | ###############################################################################
#
# The MIT License (MIT)
#
# Copyright (c) Crossbar.io Technologies GmbH
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in ... | [
"syundarivera@gmail.com"
] | syundarivera@gmail.com |
cfdbb2f58717e16d81d08e87d8d9d40cf2a66e9c | a8e5e85cd1d3210f3e404faa35654e02ba52a7af | /py作业/serv/course_actions.py | a7d8fdd99701f1c1546574c2baed2d51e36addc4 | [] | no_license | Lizhupu-0802/gradesystem | 6b56299642d819139bc3a3c9415adbc764cd89d5 | 9c57d112fb840379a91236a278fcbe829609ec61 | refs/heads/main | 2023-02-01T21:44:59.597086 | 2020-12-19T05:47:44 | 2020-12-19T05:47:44 | 321,072,394 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,308 | py | from aiohttp import web
import psycopg2.errors
from urllib.parse import urlencode
from .config import db_block, web_routes
@web_routes.post('/action/course/add')
async def action_course_add(request):
params = await request.post()
param_fields = ['no', 'name', 'score', 'attr', ]
param_values = {field: para... | [
"noreply@github.com"
] | Lizhupu-0802.noreply@github.com |
a3441c62140e4ceb7659e27c0851434d9ba88215 | 2272c4d8b34807da78ed419c53bf4325ad8ca289 | /Bariera.py | 93dd573c989711a63be80a2867949c7d4b793f58 | [] | no_license | Konradox/Barrier | c5a26745f909763d364f0edec2cb329ba55e38ff | 015f0bef411a73eb561475960e8100751fbc6c30 | refs/heads/master | 2020-03-27T19:31:16.561492 | 2015-02-10T21:24:01 | 2015-02-10T21:24:01 | 30,615,254 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,624 | py | # -*- coding: utf-8 -*-
__author__ = 'Konrad'
import threading
import time
class myThread(threading.Thread):
threadCounter = 0
barrierCounter = 0
exitCounter = 0
lock = threading.Lock()
cv = threading.Condition(lock)
def __enter__(self):
return self
def __init__(self, threadID, ... | [
"xkonradox@gmail.com"
] | xkonradox@gmail.com |
b81fbe136d30d1cc561a5d652413f0cc5ab24af0 | 48828cdb69093b261f134c664cad7bdb1bf01b10 | /_config/hash.py | 324c90cd5ea71c75011d82a92978cef837f32323 | [] | no_license | 404neko/PageCat | cb2178efee7f09d5f8d412f42810b4d4a006f559 | 1deda59694624b3048754fdc76aeae286cd8a679 | refs/heads/master | 2021-01-17T17:35:26.372506 | 2016-05-02T10:56:13 | 2016-05-02T10:56:13 | 52,928,350 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 203 | py | import hashlib
flask_secret_key = '233'
salt = '2333'
def uhash(password,salt):
pre_hash = password[0]+salt+password[1:]
Hash=hashlib.md5()
Hash.update(pre_hash)
return Hash.hexdigest() | [
"404neko@gmail.com"
] | 404neko@gmail.com |
4c9659fd162014d48f2f652a5dcc598705d45fbb | 3c56f54ec7e6cade93b5c988cba531e8a2edd453 | /Day5/SF21-Flask-Advanced/wtforms/forms.py | 51a054063629ee6fc5e406bb584f9f4a84aca901 | [
"MIT"
] | permissive | JuJu2181/Learning_Flask | ae6addeedea29df0d19ed272d68f37d945bda6e4 | f9f46cac743323a1821ed214dd512ef337a804f1 | refs/heads/master | 2023-08-25T21:44:41.931317 | 2021-07-15T07:55:07 | 2021-07-15T07:55:07 | 383,996,071 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 646 | py | from flask_wtf import FlaskForm
from wtforms import IntegerField, StringField, SubmitField
from wtforms.validators import InputRequired, NumberRange
class NameForm(FlaskForm):
name = StringField("Full Name",validators=[InputRequired("Please Add a Name")]) # add validation here
submit = SubmitField("Submit")... | [
"anishshilpakar8@gmail.com"
] | anishshilpakar8@gmail.com |
a583ce9389fd5048cc2a217b72beb330eb02d48b | c6e042536814dadf338fb9e68246f6c17f1c4cfa | /FourierMy.py | cbf2bbeaadf8ff8e07f0a2d327d3b265dcb58f48 | [] | no_license | NazarovDevelopment/Laba | 0576ed2945ce486e32843f7b25d8afe2683248a8 | 036f2d473673edb6ad5754dc6408b4112d1b045e | refs/heads/master | 2020-04-06T03:35:03.188331 | 2015-04-21T19:42:31 | 2015-04-21T19:42:31 | 33,953,662 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 138 | py | __author__ = 'Alexey'
import numpy as np
def forwardfourier(data):
newfftdata = np.fft.fft(data)
print(data)
return newfftdata | [
"anazarov94@gmail.com"
] | anazarov94@gmail.com |
a30f1f5184e240fdb168d288874791f7260c7029 | cdbb11473dc8d34767a5916f9f85cb68eb2ca3f2 | /core/helpers.py | a9cf1b2ad8c669f8aac1b940187d7a46adde3660 | [] | no_license | skyride/evestats | fb2a1a248952771731dcfecadab7d02b1f08cd4b | 4bd2153f65c084b478272513733dcc78f9a0ef98 | refs/heads/master | 2020-03-23T13:50:19.216870 | 2018-08-05T19:19:47 | 2018-08-05T19:19:47 | 141,640,834 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 578 | py | from sde.models import Type
def generate_breadcrumb_trail(marketgroup):
def recurse(node):
"""Return an list containing the path to this trail"""
if isinstance(node, dict):
return []
elif isinstance(node, Type):
return [*recurse(node.market_group), node]
... | [
"adam.findlay@mercurytide.co.uk"
] | adam.findlay@mercurytide.co.uk |
5cace677c0248096c96561d057f04dc8d7c24177 | c96f37e005b5dc6ef96ef871222a36c6920102e6 | /MotionFunctions.py | d720bf1a8499891d8b35362de3a874f4f0573848 | [] | no_license | shrutisub/robot | eef31ba3c1d396e699ce37fecd45fa1a74859739 | a70e246a078c02d8085b9eed7d8d45acb5a5351f | refs/heads/master | 2021-08-30T07:23:14.971463 | 2017-12-16T18:15:29 | 2017-12-16T18:15:29 | 114,481,019 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,045 | py | import numpy as np
import time
def PTPtoConfiguration(start_cfg, target_cfg, motiontype):
"""PTP path planning
:param start_cfg: Current axis angle of the robot
:type start_cfg: array of floats
:param target_cfg: Target angle of the robot
:type target_cfg: array of floats
:param motiontype... | [
"noreply@github.com"
] | shrutisub.noreply@github.com |
5b625b525d193a50347763599fcc98a42ce55dcc | 732c63fef3f138d22eb3c39dff6bdbd797a9bf75 | /insertion-del-traversing.py | 15ad98a768c0f436b7c666c69d05efbe0005dcce | [] | no_license | yagavardhini/class-and-objects | 8bb2c69f35553635c05a74c8b1ab5057bd7c8ee7 | 4235a45c985272cbdc1456c033551e0c77b46a2a | refs/heads/master | 2020-07-02T03:49:23.553965 | 2019-08-15T08:53:37 | 2019-08-15T08:53:37 | 201,407,418 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 837 | py | class Node:
def __init__(self,data):
self.data=data
self.nextt=None
class SLL:
def __init__(self):
self.head=None
def insertAtBeg(self,data):
temp=Node(data)
temp.nextt=self.head
self.head=temp
def delAtBeg(self):
temp=self.head
self.head=self.head.nextt
temp.nextt=None
... | [
"noreply@github.com"
] | yagavardhini.noreply@github.com |
7824a3129a4b0602e416b5f8eb4533f577abb87f | 74b2f9658f3fd47aaf255febf2852263c6ec19e0 | /takerest/src/helpers/test-data-gen/src/lib/vendors/pairs/main/pairwisepy/__init__.py | 388cb2859d0ac5d57e2ce7a71e3661e25c431ed3 | [] | no_license | upworka0/restio | bf47db136e884c72b061962e3973546a4bdd78c7 | 9f22fc6513fefd6c98738b0ea016abfec7c437cb | refs/heads/master | 2023-03-05T00:23:12.243382 | 2021-10-01T01:49:01 | 2021-10-01T01:49:01 | 203,429,128 | 1 | 0 | null | 2023-03-01T19:12:22 | 2019-08-20T18:07:32 | JavaScript | UTF-8 | Python | false | false | 65 | py | # Author: Nagaraj
# Date: 6/5/18
from .pairwise import AllPairs
| [
"upworka0@gmail.com"
] | upworka0@gmail.com |
913f443dfbaa96309422d8d52d60c558de4b9c33 | 2f1ac001742fa3e117e1b900a26ac0afb97f8967 | /app.py | 6654b10d9a5d022143a5903a8806571608b92145 | [] | no_license | debugDoug/carrier_limit_dash | f67411df48c24bdb609211542146dfd936800138 | 348830bbb4c4e7f9043008f8b946f97084501830 | refs/heads/master | 2022-11-11T01:11:24.206897 | 2020-06-25T21:45:59 | 2020-06-25T21:45:59 | 275,017,556 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 16,081 | py | # -*- coding: utf-8 -*-
"""
Created on Sun Jun 21 08:11:43 2020
@author: 1197058
"""
import dash
from dash.dependencies import Input, Output
import dash_core_components as dcc
import dash_html_components as html
import pandas as pd
import numpy as np
import dash_table
import plotly.express as px
#hey... | [
"noreply@github.com"
] | debugDoug.noreply@github.com |
7046f96277b3a24fa4c120d9e42ebb229ccaad4a | fe7763e194be94c402482619c0111fcaca1ef7f6 | /tutorial/snippets/permissions.py | a42b29204436ae53823a6a8aff8bf895527515ec | [
"MIT"
] | permissive | antoniocarlosortiz/django-rest-framework-sample | 1fc8b11af2aa1cacfbbc2c3363e097262eec7aee | 45ff0213b4a74566c8571c498c67adf66b420d3e | refs/heads/master | 2021-01-01T05:18:51.457373 | 2016-04-23T18:28:12 | 2016-04-23T18:28:12 | 56,934,397 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 474 | py | from rest_framework import permissions
class IsOwnerOrReadOnly(permissions.BasePermission):
"""
Custom permission to only allow owners of an object to edit it.
"""
def has_object_permission(self, request, view, obj):
# Read permissions are allowed to any request.
# so we'll always allo... | [
"ortizantoniocarlos@gmail.com"
] | ortizantoniocarlos@gmail.com |
1024bc3664adf719b87b2553b88c5466abfc7d84 | a2311e330da598bca3a38a543f0dc7e1a3656edd | /genetic_algorithm/hw2/run_once.py | 1e5c307bddcc06b217c6658072550eb6fd27f435 | [] | no_license | hw5773/study | 9c980390e814110bef4f4760d40ef0a491758f61 | 973b5a9d99538ee03c8fcaaa3448e761b13fbc99 | refs/heads/master | 2020-04-12T02:30:36.379631 | 2019-11-02T04:01:21 | 2019-11-02T04:01:21 | 55,757,394 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,747 | py | import os
import sys
graph_type = ["maxcut50.txt", "maxcut100.txt", "maxcut500.txt"]
g = graph_type[int(sys.argv[2])]
graph = "../graph/" + g
representation = ["chromosome.o"]
selection = ["tornament_selection.o"]
crossover = ["reverse_crossover.o"]
mutation = ["general_mutation.o"]
replacement = ["general_replacement... | [
"hw5773@gmail.com"
] | hw5773@gmail.com |
fa3e65432481dc50669a709c3740fc9753628e14 | 8f0524fc0171e27a15f4cf5fb3fe48ef2053b40e | /leetcode/DP/edit_distance_formula.py | e9141de529dbc4bde7fdefe5cc4713fae1837147 | [] | no_license | MohammedAlewi/competitive-programming | 51514fa04ba03d14f8e00031ee413d6d74df971f | 960da78bfa956cb1cf79a0cd19553af97a2aa0f3 | refs/heads/master | 2023-02-08T20:25:58.279241 | 2023-02-02T00:11:23 | 2023-02-02T00:11:23 | 222,710,225 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 275 | py | def edit_str(s1,s2,n,m):
if n<0 or m<0:
return max(m,n)+1
elif s1[n]==s2[m]:
return edit_str(s1,s2,n-1,m-1)
else:
return min(edit_str(s1,s2,n-1,m-1),edit_str(s1,s2,n,m-1),edit_str(s1,s2,n-1,m)) +1
print(edit_str("kitten","sitting",5,6)) | [
"rofyalewi@gmail.com"
] | rofyalewi@gmail.com |
9fa46ad09d0359bf5046afbe894f2fc153a4e49b | a9de0373f6275a9d6c74701f43306842c1cab60e | /singleInstance.py | 325394d63a31d04aa4713cf79e8e8993ed9f4c31 | [] | no_license | carrotshub/ExDemo | 3bf0c2f82192186a81643232457e4b9776c1ed9a | 00a12dac0175726078e78f9868f98391eaf7fb6c | refs/heads/master | 2020-04-13T01:22:08.152531 | 2019-01-09T13:10:39 | 2019-01-09T13:10:39 | 162,871,886 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 751 | py | # -*- coding: utf8 -*-
# 使用装饰器实现单例模式
# 第一种方法类作为装饰器
class Single(object):
def __init__(self,cls):
self._cls = cls
self._instances = None
def __call__(self, *args, **kwargs):
if not self._instances:
self._instances = self._cls(*args)
return self._instances
@Single
class A(object):
def __init__(self,nam... | [
"1398141580@qq.com"
] | 1398141580@qq.com |
68f4d4b54fede867afc44c57daef7f694fc1ae4f | 6777c78344998500252845572da51a7ddaaf40da | /script/minist_SVM_self.py | 082490901d04fd4bd71ca124f6bc0d1f103d8cbe | [] | no_license | Chokurei/Kajima | 2e1bfd74d997aba5d5218f10bce4655ccec7b5eb | 4d5dd3bd56fe41473b4edb8836cb93d19a02bd9c | refs/heads/master | 2021-04-06T20:18:52.624283 | 2018-03-15T17:47:31 | 2018-03-15T17:47:31 | 125,337,676 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,403 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Mar 2 11:39:49 2018
@author: kaku
"""
print(__doc__)
import matplotlib.pyplot as plt
from sklearn import datasets, svm, metrics
digits = datasets.load_digits()
images_and_labels = list(zip(digits.images, digits.target))
for index, (image, label) in... | [
"guozhilingty@gmail.com"
] | guozhilingty@gmail.com |
ec45d45f973e36dc0e484153ced1934b3170084f | c672f9ba29546468beccbda2aaf892af41dd453a | /tcp.py | b3e26c6d05b61cc89f9c44ee33749872165b9fb8 | [] | no_license | ArthonKorea/artchatbot | 70773c9064f414f24a4cf34ac5270c60dee03fc8 | e2dcb82b18b202ad33cda8fe49b1079eafee74ef | refs/heads/master | 2021-01-01T06:01:37.182985 | 2017-07-18T13:19:40 | 2017-07-18T13:19:40 | 97,331,990 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 901 | py | import socket
import chatbot
def Main():
host = "localhost"
port = 8000
mySocket = socket.socket()
mySocket.bind((host, port))
mySocket.listen(1)
conn, addr = mySocket.accept()
print("Connection from: " + str(addr))
while True:
data = conn.recv(1024).decode()
if not dat... | [
"skawls5028@gmail.com"
] | skawls5028@gmail.com |
8c7ec1217dd7bc22b88439c1f406972e4f2a9006 | 3bae1ed6460064f997264091aca0f37ac31c1a77 | /apps/cloud_api_generator/generatedServer/tasklets/rack/create/rack_create.py | 3e407f24ace515e0974c5621850b08fc380425ff | [] | no_license | racktivity/ext-pylabs-core | 04d96b80ac1942754257d59e91460c3a141f0a32 | 53d349fa6bee0ccead29afd6676979b44c109a61 | refs/heads/master | 2021-01-22T10:33:18.523799 | 2017-06-08T09:09:28 | 2017-06-08T09:09:28 | 54,314,984 | 0 | 0 | null | 2017-06-08T09:09:29 | 2016-03-20T11:55:01 | Python | UTF-8 | Python | false | false | 174 | py | __author__ = 'aserver'
__tags__ = 'rack', 'create'
__priority__= 3
def main(q, i, params, tags):
params['result'] = ''
def match(q, i, params, tags):
return True
| [
"devnull@localhost"
] | devnull@localhost |
7e0089c1234ae3609da6e14a0889584df5f17339 | 0f1b763baa14a13f91c4d1a56f0b9bea27320aeb | /venv/Lib/site-packages/sqlpharmacy/column_types.py | 0ef7bd3abb5454f6e126aeb1ee0bde14410d3680 | [] | no_license | tangleibest/untitled | 9c775ddf35e34815f0b3d305c42915804e10470c | 6672699da1ad897a660098d07f7ea4c9a70126bd | refs/heads/master | 2020-04-19T02:04:04.740292 | 2019-01-28T03:29:07 | 2019-01-28T03:29:07 | 167,891,262 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 885 | py | # encoding=utf-8
"""
sqlpharmacy.column_types
~~~~~~~~~~~~~~~~~~~~~~
More database column types
"""
import json
from sqlalchemy.types import TypeDecorator, String
class JsonType(TypeDecorator):
'''Dumps simple python data structures to json format and stores them as string
Convert the data back to ... | [
"1220149242@qq.com"
] | 1220149242@qq.com |
c45249ab30242a6a3642d0f3e42f0ce53576fc53 | 22d8b1250e0b5178e03ff4843e1f79243d35821e | /areaTools.py | 0f984d5166bd8f3ce473a566711fdfec02894819 | [] | no_license | kmcquighan/Calc-II-Numerical-Methods | 98350b76973cf44d481353cfc981efc8b6875a9c | d22a4eabd327f516308093ffa93701de2bdf8042 | refs/heads/master | 2020-05-27T21:10:54.887481 | 2017-03-24T15:42:07 | 2017-03-24T15:42:07 | 83,606,852 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 12,176 | py | # -*- coding: utf-8 -*-
"""
by Kelly McQuighan 2017
These tools can be used to visualize different numerical integration schemes,
and to compute the associated error. They can also be used to find the order of
various numerical schemes.
"""
from matplotlib import pyplot as plt
from numpy import *
import numpy as np
i... | [
"noreply@github.com"
] | kmcquighan.noreply@github.com |
0ea60583881a8cf87ab67946e182928fa337e2f7 | e2a465c3fd63519a68d2515e6460e8e7179365ca | /models/Generator/modules.py | cf3282ce178d5f58948d96a16d8b7ac55810324a | [] | no_license | dongyyyyy/Contrast_enhanced_GAN | 4c621aaec5faf280fcd4cd7900e1780892e26f77 | bfa4906441b0799ae3e2490ff763260b191de794 | refs/heads/master | 2023-08-03T13:03:30.997329 | 2021-09-13T10:53:23 | 2021-09-13T10:53:23 | 403,494,868 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,145 | py | import torch.nn as nn
class ResidualBlock(nn.Module):
def __init__(self,in_features,norm_layer='instance',kernel_size=3,dropout_p=0.,use_bias=False,padding_type ='reflect'):
super(ResidualBlock,self).__init__()
self.conv = self.make_blocks(kernel_size=kernel_size,in_features=in_features,padding_ty... | [
"dongyoung0218@gmail.com"
] | dongyoung0218@gmail.com |
31f85f215a9f769b8f6cf5f1c88dce4b0be8c037 | 4f0f411d8d9abe3d520a962d30da67959e6bff2f | /tests/sequence/test_phylo.py | d40dbd398c6fe4c8b0188a102157cb630725e1f8 | [
"BSD-3-Clause"
] | permissive | ajshedivy/biotite | 685f196416cc7be74d299a13f23947f85eb5825e | 15fe39de165aba6e8bd6376fa8f8ddf069718fb5 | refs/heads/master | 2023-08-24T14:45:25.239920 | 2021-10-06T14:32:40 | 2021-10-06T14:32:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,165 | py | # This source code is part of the Biotite package and is distributed
# under the 3-Clause BSD License. Please see 'LICENSE.rst' for further
# information.
from os.path import join
import numpy as np
import pytest
import biotite
import biotite.sequence.phylo as phylo
from ..util import data_dir
@pytest.fixture
def di... | [
"patrick.kunzm@gmail.com"
] | patrick.kunzm@gmail.com |
7bde798354f8a27458cd2bd430e193c4242bee55 | 554635c28263a16ae538887187e447e476e09aea | /Node.py | ce1933a2bedb237200b118369ba13e6a1b343484 | [] | no_license | Horofic/AI | 1264fae7401392b2deb885f74dbba8bbb31fbe6c | ecc812956aed4c1bfaa2d876a23bde446b2dbc5e | refs/heads/master | 2021-08-19T21:46:14.047244 | 2017-11-27T13:40:25 | 2017-11-27T13:40:25 | 112,200,500 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 351 | py | from Link import Link
class Node:
def __init__(self, linkedNodes):
self.links = []
self.value = 0
for node in linkedNodes:
self.links.append(Link(1.0, node, self))
def calculate(self):
self.value = 0
for link in self.links:
self.value += link.s... | [
"ikweetnie123@hotmail.com"
] | ikweetnie123@hotmail.com |
bb6643f96de8854e77e2affffa552d014fb97e44 | 0d0d63e25b9afbf5b45880c747d758763829d01a | /ramseymodel.py | 51d66cf8b5baed520aeea68bfcd78191a038d54a | [] | no_license | ecotyper/Ramseymodel | 4056867ed0b887d0a434d20a6e35b29f7acff391 | cf4e212df70dd36eb3d31187df3442ef3173c48d | refs/heads/master | 2023-04-27T02:40:35.289041 | 2018-06-18T22:55:59 | 2018-06-18T22:55:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,400 | py | import numpy as np
import matplotlib.pyplot as plt
#パラメータ設定
a = 0.3
b = 0.99
d = 0.25
At = 1.0
numer = eval("(1/b+d-1)") #分子
denom = eval("a*At") #分母
exp = eval("1/(a-1)") #指数
#Δk=0軌跡の式
K = np.arange(0, 4, 0.01)
def Ct(K):
Ct = At * K**a - d * K
return Ct
#Δc=0軌跡の式
Kt = (numer/denom)**exp
... | [
"noreply@github.com"
] | ecotyper.noreply@github.com |
2f85952fcbe3b65f4c744f4e3bb7f9549a012652 | cb4cfcece4bc14f591b038adbc7fadccaf447a1d | /ELEVSTRS.py | d84b11ce6e30ca754fe1115b5248d18d884db818 | [] | no_license | psycho-pomp/CodeChef | ba88cc8e15b3e87d39ad0c4665c6892620c09d22 | 881edddded0bc8820d22f42b94b9959fd6912c88 | refs/heads/master | 2023-03-21T06:46:14.455055 | 2021-03-11T12:07:48 | 2021-03-11T12:07:48 | 275,214,989 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 224 | py | # cook your dish here
from math import sqrt
t=int(input())
for _ in range(t):
n,v1,v2=map(int,input().split())
t1=n/v1
t2=(sqrt(2)*n)/v2
if t2>=t1:
print("Stairs")
else:
print("Elevator")
| [
"noreply@github.com"
] | psycho-pomp.noreply@github.com |
aae84273d14923a5fb83bf35b9b0e6a31ea3d1af | a6270537b5c6d924fa6353a8f0328e07c71a0366 | /numbasltiprovider/urls.py | c12994c32a9c81f0df352e00b8c9d1aa5310f5c7 | [
"Apache-2.0"
] | permissive | oscarsiles/numbas-lti-provider | 9b993175a6b6463a974373c7bdb2c9f38b057b89 | ef7080a2593a800a1b9630c746e4f8667e2ec42d | refs/heads/master | 2020-08-20T03:47:54.399198 | 2020-08-05T13:44:16 | 2020-08-05T13:44:16 | 215,979,486 | 0 | 0 | NOASSERTION | 2019-10-18T08:39:09 | 2019-10-18T08:39:09 | null | UTF-8 | Python | false | false | 519 | py | from django.conf import settings
from django.conf.urls import url, include
from django.conf.urls.static import static
from django.contrib import admin
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^', include('numbas_lti.urls')),
]+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
if se... | [
"christianperfect@gmail.com"
] | christianperfect@gmail.com |
2fb33dbd42a0f97323aa597b2052a24849bb55e3 | 9eb4ce67a7b7be515972be3149de488e6e78a4a7 | /Protótipos/python/Movement (fluid)/game.py | 6e61723e7a2420395fce5b4f3f0837f474af9372 | [] | no_license | wellingtonraam/projetos-jogos | 987f83da0ac82dc7ce6e4575feb7abba141aa939 | 3f76a8fb40d6bc9ca0954e80f225a83fa7c734dd | refs/heads/master | 2020-04-18T10:11:55.729549 | 2020-03-21T16:00:47 | 2020-03-21T16:00:47 | 167,459,892 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,331 | py | import sys, pygame
### author: Wellington Ramos || email: wellingtonraam@gmail.com
### Inicialize the game ###
pygame.init()
### screen size and name ###
size = width, height = 640, 480
screen = pygame.display.set_mode(size)
pygame.display.set_caption("Character movement")
### fps ###
clock = pygame.time.Clock()
... | [
"wellingtonraam@gmail.com"
] | wellingtonraam@gmail.com |
1f354f1fd00dbff2a1beb175a30347ca857e0aa0 | 1f944a64873109fdc56627f5d82e8ac179f7ca83 | /inti_experiment.py | a1eaef52f47377bc58d162432c32edeb26cb7fe4 | [] | no_license | cqu-bdsc/probability-based-best-response-algorithm | 420fe8375f2be1fb84b79d5add625e150e33a318 | 82884e8f1af2c89c09ba25b6d823b64d97e47e02 | refs/heads/master | 2022-12-04T12:07:45.928258 | 2020-07-29T13:11:09 | 2020-07-29T13:11:09 | 285,524,488 | 0 | 1 | null | 2020-08-06T09:06:27 | 2020-08-06T09:06:26 | null | UTF-8 | Python | false | false | 5,880 | py | #!./venv python
# -*- encoding: utf-8 -*-
"""
@File : inti_experiment.py
@Contact : neard.ws@gmail.com
@Github : neardws
@Modify Time @Author @Version @Desciption
------------ ------- -------- -----------
2020/7/29 下午4:04 neardws 1.0 None
"""
from config import setti... | [
"singleangel@vip.qq.com"
] | singleangel@vip.qq.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.