blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 283 | content_id stringlengths 40 40 | detected_licenses listlengths 0 91 | license_type stringclasses 2
values | repo_name stringlengths 3 135 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 68 | visit_date timestamp[ns]date 2015-07-25 20:53:29 2023-09-06 10:46:05 | revision_date timestamp[ns]date 1970-01-01 00:00:00 2037-05-03 13:00:00 | committer_date timestamp[ns]date 1970-01-01 00:00:00 2036-02-09 17:40:36 | github_id int64 1.61k 691M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 24
values | gha_event_created_at timestamp[ns]date 2012-06-03 10:21:33 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[ns]date 2008-03-27 23:40:48 2023-09-13 22:40:33 ⌀ | gha_language stringclasses 250
values | src_encoding stringclasses 27
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 6 10M | extension stringclasses 289
values | filename stringlengths 1 218 | content stringlengths 6 10M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
555f4e41661ff4cbf4b9d72feab41ca8b7da2d5f | 1797de6ae7c53b77afef17debe6f747a22ac84db | /26oktSamenVoeg/CSVhandler.py | 1e575d21a3c02a41526e58603116a27d357e9848 | [] | no_license | A-meerdervan/A3CcapitaSelectaRarm | 7c14921a69b2a280909cfc9a7c6566cc2e8ad179 | 0d96df58aeb227d034e99f20acb18dce987785c0 | refs/heads/master | 2020-04-01T00:48:33.006228 | 2019-01-13T10:05:23 | 2019-01-13T10:05:23 | 152,714,295 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 230 | py | CSVhandler.py | # -*- coding: utf-8 -*-
"""
Created on Sun Jan 28 12:54:27 2018
@author: Alex
"""
import numpy as np
def saveListToCSV(filepath, _list):
with open(filepath,'ab') as f:
np.savetxt(f, [_list], delimiter=',', fmt='%f') |
81f5753e8d0004244b4ee8e26895cb2b38fbb8b6 | b929cc4333c763776d9bdc1606e5155f5120659b | /Test/Os/os05_shutil.py | 31f0dbead45606611cc16301afdcfcb47f38f01d | [] | no_license | eternaltc/test | cab1047b396748ac467d2f9608d9799aefddafe6 | 1be1a48091a9612820ba441bb00acfc1a11fbedb | refs/heads/master | 2021-04-20T08:42:34.953928 | 2020-03-24T09:51:37 | 2020-03-24T09:51:37 | 249,669,795 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 544 | py | os05_shutil.py | #coding=utf-8
import shutil
import zipfile
# shutil.copyfile("file03.txt","file05.txt") #拷贝
# shutil.copytree("movie/大陆","电影") #拷贝文件夹
#忽略不需要拷贝的文件
# shutil.copytree("movie/大陆","电影",ignore=shutil.ignore_patterns("*.txt","*.html"))
#压缩和解压缩
# shutil.make_archive("电影/压缩","zip","movie/大陆")
z1 = zipfile.ZipFile("a.z... |
ea2e9399a8384600d8457a9de3f263db44dc883d | 3e87e034d67f3dfb7a2e720cf02d499ad9a6a1dd | /preprocessing/join_cctv.py | 60c89d12176f264c90e4dd7f303261e992f42907 | [] | no_license | Nhiemth1985/AI_REAL_ESTATE_AGENCY | 94561bb328015ddda144a77b6d0389ae8eab53a8 | e4362f35f755df1baae279fe9710919651200d36 | refs/heads/main | 2023-04-13T16:27:51.613341 | 2021-04-16T02:49:39 | 2021-04-16T02:49:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,279 | py | join_cctv.py | import pandas as pd
# 데이터 로드
train_data = pd.read_csv('./dataset/train_park_daycare.csv')
cctv = pd.read_csv("./dataset/cctv_origin.csv", encoding="EUC-KR")
## 데이터 전처리
# 데이터 추출
cctv = cctv.iloc[1:, :2]
# 구 매핑
gu_dict_num = {'용산구': 0, '양천구': 1, '강동구': 2, '관악구': 3, '노원구': 4, '영등포': 5, '영등포구': 5, '마포구': 6, '서초구': 7, '성... |
86d42716e05155f9e659b22c42635a8f5b8c4a60 | 5b8e66512e4599448d6195e71cdbd4c68acfd33f | /fracture_detection/model/generate.py | 4f92a0994ce4a33ce3867d69085bf5330c606b2c | [] | no_license | turing-usp/Deteccao-Fraturas | 38f20198f6b3f24efce31825ccd614507552b3fb | 2130769a2bdcdfed7e81e22b2f419f86770f0ac3 | refs/heads/main | 2023-04-06T00:47:17.039220 | 2021-05-01T19:59:26 | 2021-05-01T19:59:26 | 358,963,585 | 0 | 0 | null | 2021-05-01T19:59:27 | 2021-04-17T19:20:12 | Python | UTF-8 | Python | false | false | 2,079 | py | generate.py | import tensorflow as tf
from typing import Optional, Tuple, Union, Callable
_data_augmentation = tf.keras.Sequential(
[
tf.keras.layers.experimental.preprocessing.RandomFlip("horizontal"),
tf.keras.layers.experimental.preprocessing.RandomRotation(0.2),
]
)
def _freeze_model(
model: tf.ker... |
cac9d84f20a79b115c84ff4fe8cf4640182a42d7 | 53bf7992ed948da8add0548f3cf0db4473999c5b | /Test/Tester/Core.py | 73153359f5544643f2d6bab66c37944ac252eab8 | [
"Apache-2.0"
] | permissive | paul-ollis/cleversheep3 | 1cd68cc62c79db37badebb9f57cb7b6e5a7ff375 | 86e6ca76ea4e8524f16e2348d38484dcfafb07d0 | refs/heads/master | 2023-03-13T10:08:39.113557 | 2021-03-08T11:43:31 | 2021-03-08T11:43:31 | 298,663,351 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 25,928 | py | Core.py | """Those things that are core to tests.
This module provides the most fundamental test entities, which include such
things as:
- Tests
- Suites
- Test states
"""
from __future__ import print_function
__docformat__ = "restructuredtext"
import os
import textwrap
import time
import weakref
import inspect
from clevers... |
7b1c7228c1fc9501ab857cba62a7e073691e75c9 | 5a8cc38e805b70f221ded16808b2ec62d52457f6 | /test/call_test.py | ba24fb0fc99ffb7e0dc08c0ea1ec4334a8e93e5f | [
"MIT"
] | permissive | HuangCongQing/pytorch | fedb0da3a19e8cf221c09bc8f4b4117c6e0566e2 | 83f3442f4c6afa82f4f4be6e52778a20e6fc78b1 | refs/heads/master | 2023-04-07T19:15:33.229073 | 2023-03-23T07:31:47 | 2023-03-23T07:31:47 | 173,421,636 | 14 | 7 | null | null | null | null | UTF-8 | Python | false | false | 520 | py | call_test.py | """
@Description:
@Author : HCQ
@Contact_1: 1756260160@qq.com
@Project : pytorch
@File : call_test
@Time : 2022/5/24 下午10:19
@Last Modify Time @Version @Desciption
-------------------- -------- -----------
2022/5/24 下午10:19 1.0 None
"""
class Person():
def __cal... |
6a7e5a78f516cecf083ca3900bdaaf427bedd497 | e871a31c32a57b551e2ba56be52b29dbfb7b1bdc | /test_statistics.py | b07bc7236c2d9f9a9b9661bcaf952e695f764b7f | [] | no_license | WeiyuLee/TB-ETF | 5a1819fd4bbd179484501360508a767db8e6e890 | c5b3f0a09e43c4f926c04c6e2a86cadb3d786aa5 | refs/heads/master | 2020-03-10T04:12:17.542734 | 2018-05-23T10:12:27 | 2018-05-23T10:12:27 | 129,185,864 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,348 | py | test_statistics.py | # -*- coding: utf-8 -*-
"""
Created on Tue May 22 15:01:21 2018
@author: Weiyu_Lee
"""
import numpy as np
import pandas as pd
import pickle
import matplotlib.pyplot as plt
from datetime import datetime, timedelta
import config as conf
def get_stock_time_series(data_df, stock_id):
curr_ID_dat... |
5a33aeffa740a41bd0bd1d80f45796ae37377a4c | bf4bfc9c55f1b9380cba0e4309b999bf50d3958d | /core/models.py | bfc6d1dcb98225318652b0a283df0f8295ac448e | [] | no_license | JasurbekNURBOYEV/cloudy | 4c19c4aa082cd23535cd6ba4cd785fc2792500e8 | 3370946019b982722132c90e8fda8f5d62f53f83 | refs/heads/main | 2023-05-11T18:55:58.418049 | 2021-06-03T11:17:09 | 2021-06-03T11:17:09 | 373,393,053 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,969 | py | models.py | from django.contrib.postgres.fields import JSONField
from django.db import models
from core.utils.time import get_now
class BaseManager(models.Manager):
"""
Our basic manager is used to order all child models of AbstractLayer
by created time (descending), therefore it creates a LIFO order,
causing th... |
5cfd7744f98c80483cb4dd318c17a7cd83ed3ae3 | 5d48aba44824ff9b9ae7e3616df10aad323c260e | /array/442.find_all_duplicates_in_an_array.py | 8b7f7d8cf09cadec286b8b12a981424124c568a8 | [] | no_license | eric496/leetcode.py | 37eab98a68d6d3417780230f4b5a840f6d4bd2a6 | 32a76cf4ced6ed5f89b5fc98af4695b8a81b9f17 | refs/heads/master | 2021-07-25T11:08:36.776720 | 2021-07-01T15:49:31 | 2021-07-01T15:49:31 | 139,770,188 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 909 | py | 442.find_all_duplicates_in_an_array.py | """
Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once.
Find all the elements that appear twice in this array.
Could you do it without extra space and in O(n) runtime?
Example:
Input:
[4,3,2,7,8,2,3,1]
Output:
[2,3]
"""
# O(n) TC and SC
class Solution:
... |
cfa862988edf9d70aa5e975cca58b4e61a4de847 | 6f21e0469bd966a137b8352b7abf94b8d5b23930 | /setup.py | 7f7821eabe242bb6fcfc158c0860bf1497d14fc1 | [] | no_license | ilyasku/gromacsplotter | 9451f35279b6e71616227a63deb650c0568bbcff | 6d64fb267f837a0099d540707753b8eeff956284 | refs/heads/master | 2020-12-02T16:26:49.433847 | 2017-07-11T10:54:20 | 2017-07-11T10:54:20 | 96,553,790 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 847 | py | setup.py | """
USAGE:
o install in develop mode: navigate to the folder containing this file,
and type 'python setup.py develop --user'.
(ommit '--user' if you want to install for
all users)
"""
from setupt... |
0f9e03df0519b7040c13398b58198c8dfbe38622 | 96bf5ab0c128cb27d8773e8831a48d82fdd678f1 | /script/assembler.py | 7462b8cc9e82040f051558f286ef286ffa78c85f | [] | no_license | Aimini/8bitcpu | 791e35b1292205e6596096df3d509667e417ab3e | 23acf173fbfa05da94bbdd55c039d4ce65e95e87 | refs/heads/master | 2020-09-10T05:02:25.335307 | 2019-11-16T04:05:36 | 2019-11-16T04:05:36 | 221,654,814 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,802 | py | assembler.py | from io import StringIO
import re
import enum
import pathlib
import sys
"""
1. read all line and strip blank char at line head and end
2. tokenize all line, evaluate all integer value
3. iter each line's token,
* assign label's address
* generate ram data
* generate instruction
- for instruction w... |
15ed626b01f0fceafa8414b5f9dc8ca0ea6f8e0f | 9146c2b7494b0d4e6a981e0ad1e175f7a86e063d | /task1/deap_specialist_controller.py | 6b2d44cd72bd6ab081d76d9c239686223fcce34a | [] | no_license | wkokgit/evoman_framework_assignment_vu | 6ae19ef5b303dfe00429b8ce10734551b504e08c | 9d58af57a5407422ab30a34c33b888c550a1f1a7 | refs/heads/master | 2023-03-17T19:38:31.124990 | 2021-03-01T10:29:38 | 2021-03-01T10:29:38 | 292,201,049 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,947 | py | deap_specialist_controller.py | ################################
# EvoMan FrameWork - V1.0 2016 #
# Author: Karine Miras #
# karine.smiras@gmail.com #
################################
# imports framework
import sys, os
sys.path.insert(0, "evoman")
import random
from deap import base
from deap import creator
from deap import tools
impo... |
a9b443fd0f2e781a1c90b3b0906673a657fdb5ff | b4776512598925029ed2784a016f748955318bea | /tests/api_tests/test_api_language.py | 0c921cd2c60f1804ed2f5df6ad80453222219b9c | [
"Apache-2.0"
] | permissive | kvtb/dedoc | e95f1b3968c2c1f8cad5a3e015af33c725b7348f | 34e4f7011cdcc58bcf37ec90ef07c4841d43b841 | refs/heads/master | 2023-06-16T19:05:56.134453 | 2021-07-15T15:11:58 | 2021-07-15T15:11:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,359 | py | test_api_language.py | from tests.api_tests.abstrac_api_test import AbstractTestApiDocReader
class TestApiDocReader(AbstractTestApiDocReader):
def test_en_doc(self):
file_name = "english_doc.doc"
result = self._send_request(file_name, dict(language="eng", structure_type="tree"))
content = result["content"]
... |
f6ade30a43877e2636308ad682b191d801fb0336 | 599b28d9bf0c26123acd24ccb54649d43fe90a21 | /app/app.py | dba4793e969598dd4aa32d1b4cfa661c83ced78f | [] | no_license | ashwin-srdy/University-admit-eligibility-predictor | df49cc6e22cd5e5a99919d81c3b8942ceb29a276 | 4997ddbac4fea998e25bf47bf79c16ddcc473f3f | refs/heads/main | 2023-08-07T08:22:37.753188 | 2021-10-12T16:27:30 | 2021-10-12T16:27:30 | 374,606,283 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,000 | py | app.py | import pickle
from flask import Flask , request, render_template
from math import ceil
app = Flask(__name__)
model = pickle.load(open("model.pkl","rb"))
@app.route('/')
def index():
return render_template('index.html')
@app.route('/predict',methods = ['GET','POST'])
def admin():
gre=(eval(request.for... |
0267915c95574ade272ec586828fe9cad5c06925 | 8ecd899a8558ad0a644ecefa28faf93e0710f6fb | /other_practices/DPL_1_B.py | 5906fa6005e11d73f04ad4454b39e6706d4fb5fb | [] | no_license | yut-inoue/AtCoder_ABC | b93885547049788d452e86b442a4a9f5ee191b0e | 3d2c4b2b2f8871c75f86040ad07ccd7736ad3dbe | refs/heads/master | 2021-07-03T09:09:20.478613 | 2021-02-21T13:20:31 | 2021-02-21T13:20:31 | 227,140,718 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 495 | py | DPL_1_B.py | #n = int(input())
import copy
n, w = map(int, input().split())
#al = list(map(int, input().split()))
#al=[list(input()) for i in range(n)]
vl = [0]*n
wl = [0]*n
for i in range(n):
vl[i], wl[i] = map(int, input().split())
temp = [0]*(w+1)
dp = [copy.deepcopy(temp) for _ in range(n+1)]
for i in range(1, n+1):
fo... |
48524730b667fa9e0554b9b2f8f173c67a322de9 | 8824b7af8b41f681bbd00e8f3e98891c0ddab774 | /TOC-Project-2020/utils.py | 2f4a1401013b92a51df8d3d0e934595554eed82e | [] | no_license | yihsin0/line_bot | 5605af5685ff8018a4fc4a69d90aded6c3fa608c | 7d5ce2b2f487ec586e4963ec29ec2ff2139c3a67 | refs/heads/master | 2022-12-18T04:42:21.873605 | 2019-12-11T14:30:12 | 2019-12-11T14:30:12 | 226,048,600 | 0 | 1 | null | 2021-06-02T01:07:36 | 2019-12-05T08:06:02 | Python | UTF-8 | Python | false | false | 1,396 | py | utils.py | import os
from linebot import LineBotApi, WebhookParser
from linebot.models import MessageEvent, TextMessage, TextSendMessage, ImageSendMessage
"""import requests
from bs4 import BeautifulSoup
from urllib.request import urlretrieve"""
channel_access_token = os.getenv("LINE_CHANNEL_ACCESS_TOKEN", None)
... |
c55cc750989257ea431434092c7968998a4a44d4 | c49881dc3015c3f4f6e74d680a8b97220a9b91d0 | /src/harness/reference_models/common/data.py | 2bfda957e946c7606b9666c6520305569ffa520d | [
"Apache-2.0"
] | permissive | Wireless-Innovation-Forum/Spectrum-Access-System | d980893a5ec1c1f67aa02515b0161be563afb321 | 19f2ae9c1a1844e2f2ca2ceddd07f392249741e6 | refs/heads/master | 2023-04-05T16:36:56.490601 | 2022-01-05T15:13:00 | 2022-01-05T15:13:00 | 38,059,331 | 64 | 53 | Apache-2.0 | 2023-03-20T15:28:31 | 2015-06-25T16:00:15 | Python | UTF-8 | Python | false | false | 12,446 | py | data.py | # Copyright 2018 SAS Project 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 requ... |
3bea463f6996a5c410d8b633219387a988f3d73b | 8c4a5b892841b02f20ab8f4de967d6d4d000595d | /NeuralNode.py | a34671e52ce0d1242a5c6cb8797a765d03f76ff3 | [] | no_license | ccprominent/SimpleNeuralNetwork | dfd3ef624271a0d3a11d86a7769d5f0e2d9abba0 | b7e5cda4efb87edc437eba0dee402a40f775b046 | refs/heads/master | 2022-04-07T00:00:06.754751 | 2017-04-17T02:05:16 | 2017-04-17T02:05:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,747 | py | NeuralNode.py | #!/usr/bin/python
# -*- coding: UTF-8 -*-
# author: wangyao_bupt@hotmail.com
import numpy as np
class NeuralNode:
def __init__(self, inputDim):
#当前结点与前一级的连接数目
self.iDims = inputDim
#权重向量,Shape = (iDims, )
self.weight = np.random.rand(self.iDims)
#self.weight = np.ones(self.iDims)... |
630be7574a75ddd514ade4af78812df90324e58b | 5900dd8b0df3638bf640b6fea45989dada97cdb2 | /AI/2048/PlayerAI.py | 318d8f2ff7c0975b58465415411d8636940dac2b | [] | no_license | PaulMatthias/Projects | a274e1ffc732a8d30a897a44b66047e13711dd6b | 68fdaf76e179613232cf55ec53275f8eaaae6314 | refs/heads/master | 2020-04-12T07:23:35.557542 | 2017-02-20T15:58:00 | 2017-02-20T15:58:00 | 55,418,266 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,501 | py | PlayerAI.py | from BaseAI import BaseAI
import timeit
import copy
def heur_order(grid):
val=0
tmp=0
for i in xrange(0,grid.size):
for j in xrange(0,grid.size-1):
if grid.map[i][j+1]:
tmp=grid.map[i][j+1]-grid.map[i][j]
else:
tmp=-grid.map[i][j]
... |
9f1be05cdbbfa972cf64848f1b845ea0d29728a7 | 3f29390bebafc165aefb2d74121eb5ab2530b952 | /backend/serverless-users/post_user_profile.py | 84509aba0c9e0fc0956216a845aefd4e03ec42c6 | [] | no_license | IlmariKu/kydi | 256556a0ed692caaa66b1926e52648a6d5971113 | 60ab7db1f09594b0d69168b003c11086fcf84f6d | refs/heads/master | 2022-12-15T23:09:32.631962 | 2020-09-11T14:12:45 | 2020-09-11T14:12:45 | 294,692,217 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,426 | py | post_user_profile.py | import boto3
import json
import logging
import ast
from dynamo_functions import write_to_db, query_db
logger = logging.getLogger()
logger.setLevel(logging.INFO)
def handler(event, context):
"""
Update user profile with new data. Makes query for existing data and combines it with new data.
"""
log... |
6183c8027520246286a93522ab829cd343a41272 | a84b83c67afdbfaaec28c016de536d39daa8b225 | /tests/SimpleMatrixOps (Single Node Dense)/src/tf_matrix_ops.py | 35343e6f8555abc4418e470f292c2e065ea74052 | [
"Apache-2.0"
] | permissive | ADALabUCSD/SLAB | c8c9c4bd5f53bc832346ba39f31fef3eabb50f98 | 86d71b345c50b3a73eefcad3da39dc8d919d9652 | refs/heads/master | 2021-05-04T22:25:36.420182 | 2018-06-17T02:24:40 | 2018-06-17T02:24:40 | 120,035,753 | 2 | 2 | null | null | null | null | UTF-8 | Python | false | false | 3,386 | py | tf_matrix_ops.py | # Copyright 2018 Anthony H Thomas and Arun Kumar
# 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 agreed t... |
b0d6187a63bdef7b615c030a1ed0fc7ae17a2a90 | 4d194c5819e3d022ec9d3cb83ebd50401775e609 | /control_led.py | 52b26c08af6aaab3a9d60cc6109c440fe64679cc | [] | no_license | cozytk/42hackathon_coalcat | 3638fff50788d09a223014e9633f32b3d2b44fd9 | ae869a9e273ee07668a420d6145e1395c7b75ce4 | refs/heads/master | 2023-01-30T15:25:45.664178 | 2020-12-17T19:24:55 | 2020-12-17T19:24:55 | 322,389,927 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 632 | py | control_led.py | import RPi.GPIO as GPIO
import time
def turn_on_red_led():
GPIO.setmode(GPIO.BCM)
pin = 16
t = 1
GPIO.setup(pin, GPIO.OUT)
GPIO.output(pin, True)
time.sleep(t)
def turn_off_red_led():
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BCM)
pin = 16
GPIO.setup(pin, GPIO.OUT)
GPIO.c... |
f6e0cf0989c903468f3ab23cf1644340a4b6fd4a | af8adcdab990ad84f5ac88b321c0e3fc03ddb247 | /042_Trapping_Rain_Water.py | 21315655b332fc956d2856a91de4b8eb9d8c9a0a | [] | no_license | xudong-sun/leetcode | eafe8bf0336cf3766a0e49230881bae24f8dbb6f | 6f41bc3915881e3c0431550f497b297b7b5a38fa | refs/heads/master | 2023-06-12T16:48:57.449716 | 2023-06-08T06:05:31 | 2023-06-08T06:05:31 | 88,631,317 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,095 | py | 042_Trapping_Rain_Water.py | '''
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.
For example,
Given [0,1,0,2,1,0,1,3,2,1,2,1], return 6.
'''
'''
# Solution 1: O(n), 79ms
# pass 1: calc h[i], which is max{height[i] .. height[-1]}
# pass 2: scan... |
c4ecb1211cffc95c6392762b5afe551001392c94 | 6d46250210809e11a44037ff83e9d8e7d3186038 | /python/code_challenges/get_edge/get_edge.py | cc84b41587353d4446c98b984cf6c46c21f50011 | [
"MIT"
] | permissive | paul-leonard/data-structures-and-algorithms | 91a43dbd1fe3fbe5e470a97b525bf04127ef7a0f | 783d2450d2cafcb507fefd79dc02c4819aebb312 | refs/heads/master | 2023-02-17T12:37:13.120391 | 2021-01-13T17:22:30 | 2021-01-13T17:22:30 | 292,965,588 | 1 | 0 | MIT | 2021-01-14T08:20:50 | 2020-09-04T23:29:09 | JavaScript | UTF-8 | Python | false | false | 1,120 | py | get_edge.py | '''
Required Features:
- [x] Write a function which takes in a graph, and an array of city names. Without utilizing any of the built-in methods available to your language, return whether the full trip is possible with direct flights, and how much it would cost.
'''
#might not need these, delete if don't
from stacks_an... |
512343bb093db74f89b2b02fb558a9f7b3ef5ce3 | b37af4357aa5479bb4296e83978f548eeb131b3a | /files/problems/ccc17s3/genr.py | 7b61740b62b0449a99bd9f0826993f340580e794 | [
"MIT"
] | permissive | hyper-neutrino/wcics-grader | 778e48c165a90006c3351943b673d4f2dd8f4dca | 723489b02e3e01d89796cb259f2a24886f90671c | refs/heads/master | 2020-03-11T09:37:27.942090 | 2018-06-19T17:52:45 | 2018-06-19T17:52:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 463 | py | genr.py | from random import randint as rand
N = rand(1, [1000, 100000][int(input())])
x = rand(1, N) * (rand(0, 10) == 0)
print(N)
a = []
b = []
A = 0
B = 0
for _ in range(x):
__ = rand(0, 100); a.append(__); A += __
__ = rand(0, 100); b.append(__); B += __
if A > B: a.append(1); b.append(A - B + 1)
elif A < B: b.... |
565f8a415b6848bfa9c0324741214736b66388dc | 92a6c8b10cca01ed2028d7073e8a3538246579ff | /InterfaceAutomation/Practice/05-06/test04.py | dcc310bd2ce780fcb0da2febb1ae1e2b7e029e88 | [] | no_license | pp0221qq/testproject | 3373f7340bf74817c4303e39bcff656456bfe2f3 | bdeed5cc4dc513496fbde59d6666b28c9e40e3dd | refs/heads/master | 2020-03-24T04:54:20.676883 | 2018-07-26T16:47:01 | 2018-07-26T16:47:01 | 142,468,546 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 221 | py | test04.py | # -*- coding:utf-8 -*-
# @Author : Emma
import requests
import urllib3
urllib3.disable_warnings()
url = "https://www.baidu.com/"
r = requests.get(url,verify=False) # verify=False 不校验证书
print(r.status_code)
|
f10eb1fbc56b196f174caf6452c9520ce7252ba9 | 5c511c34d327097c57837e10834fe96c0bec9d04 | /Lecture 14 - Series.py | eb4b7771dbab15a0dc0280b4bcd917b3673d0cbd | [] | no_license | jorelllinsangan/UdemyDataMining | aa1b577fd43f24fce78c2a6e6d597e0a91c19436 | 86a212edadcd4f9fef15d9bc05e6379b50483a01 | refs/heads/master | 2021-01-10T09:59:15.280795 | 2015-12-12T17:37:52 | 2015-12-12T17:37:52 | 46,820,326 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 740 | py | Lecture 14 - Series.py | import numpy as np
import pandas as pd
from pandas import Series, DataFrame
obj = Series([3,6,9,12])
print obj.index
ww2_cas = Series([8700000,4300000, 3000000, 2100000, 400000], index = ['USSR', 'Germany', 'China', 'Japan', 'USA'])
print ww2_cas
print ww2_cas['USA']
#Check which countries had casulaties gr... |
52a34e53c89d63da77e776a18d3c29aeea5409b5 | e3446a7055602640fd3149073eed63367dda6ad8 | /examples/02_packages/02_compas_fofin/compas_fofin/src/compas_fofin/fofin/shell_equilibrium_numpy.py | 831b703db9e8dc0b335972f1e5c236d6e3b5df14 | [
"MIT"
] | permissive | compas-Workshops/WS_chalmers | 3961ff3796401a791c9c21c3e6425bb706d8d820 | 5eeb14f2eed6780064c0b1c30f51f66068689e07 | refs/heads/master | 2020-05-17T20:20:02.336115 | 2019-12-19T10:45:24 | 2019-12-19T10:45:24 | 183,942,073 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,030 | py | shell_equilibrium_numpy.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import compas
try:
from numpy import array
from numpy import float64
from scipy.sparse import diags
from scipy.sparse.linalg import spsolve
except ImportError:
compas.raise_if_not_ironpyth... |
394f6964e3fe2204450839bb85c1fd4502e04b61 | 6935dc6ec893a5e22b8274cf0419b91d1fbf18c3 | /training/dataset.py | c0a5f3295d8dd114cf3ca9257221dd5a9ccd38bc | [] | no_license | Manato1fg/AmazingCamera | 91dd7db09f2bbfec55a2fdc1811d6ba674bb96ff | 1cce0fa2c16461b1cb1948d1af403ec3610e2432 | refs/heads/master | 2020-04-14T01:39:13.336019 | 2019-01-12T07:44:54 | 2019-01-12T07:44:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,634 | py | dataset.py | from PIL import Image
import glob
import argparse
import os
import random
import numpy as np
import pickle
### utils ###
# add / if there's not.
# @args
# pathName: str => path
#
# @return string
#
# example:
# input: ./path/to/hoge
# output: ./path/to/hoge/
def addLastSlash(pathName):
if not pathName.endswith(... |
fcf684b3d17e423fe1a1a0f04e859a8972958147 | fac38855ea51b82b4399f7a8af34c162b5500301 | /xlnet/main_tf_estimator_org.py | 8927e5c099d9a654aae4eccc8a7706952884b625 | [
"BSD-3-Clause",
"MIT"
] | permissive | zkn1163691192/DAPPLE | 45f42fe4f149416890ea0e6f4196a278ae7c1987 | b2d2ceda90f6033b316f672ec05f45123234f130 | refs/heads/master | 2022-10-11T15:40:41.908014 | 2020-06-10T02:43:10 | 2020-06-10T02:43:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,173 | py | main_tf_estimator_org.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
from datasets.squad_tfrecords import input_fn_builder
from models.xlnet import build_xlnet_for_tf_estimator
from utils import create_optimizer, init_from_checkpoint
from utils import ge... |
a25546c809501a97b8be243af8fdeda077d22c67 | ed5795fb105c3c55eb6770fb356456900f446e04 | /survey/migrations/0005_auto_20210804_1432.py | 89e27e37d0cc56de1b1c3d6708dfc32c0d983da6 | [] | no_license | jihoon416/djangosurvey | 3da236fc1761171450c6df2047bbb6c48c0e9678 | 2535799d7daf42fbc8465a65d1594f01bfcab99d | refs/heads/main | 2023-06-29T16:29:40.430374 | 2021-08-04T19:08:43 | 2021-08-04T19:08:43 | 392,798,805 | 0 | 0 | null | 2021-08-04T19:08:44 | 2021-08-04T19:02:36 | Python | UTF-8 | Python | false | false | 2,369 | py | 0005_auto_20210804_1432.py | # Generated by Django 3.2.6 on 2021-08-04 14:32
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('survey', '0004_option'),
]
operations = [
migrations.CreateModel(
name='SurveyQuestionResponse'... |
5f7fdda21613a33ba4ed034f16bc0866b8be90cf | d31e57bcb5eedd349566f31e930fe92beeef58f4 | /database/database_manager.py | 57739bf78dc6967df4fc1e78a0fced440e873b11 | [] | no_license | vinhphucit/Udacity-FSND-03-Logs-Analysis | 2414af2e1be676ebe9200a2b94148135af9b7f2d | 16703212d00c9fa8ad77baf0c40a51591f6a1e2d | refs/heads/master | 2021-01-02T09:46:11.461802 | 2017-08-04T23:57:27 | 2017-08-04T23:57:27 | 99,295,856 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,003 | py | database_manager.py | import psycopg2
class DatabaseManager:
""" This class contains methods used for getting connection and getting data """
DATABASE_NAME = "news"
DATABASE_USER = "vagrant"
DATABASE_PASSWORD = "root"
QUERY_POPULAR_THREE_ARTICLES = "select a.title, ratingtable.total from articles a join (select a.s... |
982bb60295cdd4acafa85ad6f6ff64e186a48814 | 0a7c527ac2f115d571ceaf83fbd95315769d9bb5 | /ResNet.py | e768091c89e8ac89ba2bce104455e86e75426ea9 | [] | no_license | HEBUT-ZM/SSCL | deba4576ca27de7e95b867e858983105d8d6e5ed | 6fd407069d661ecf7891dfa36c89842ffad21e8e | refs/heads/master | 2021-02-06T14:20:38.724967 | 2020-04-25T08:27:49 | 2020-04-25T08:27:49 | 258,718,209 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,189 | py | ResNet.py | import tensorflow as tf
import numpy as np
from tensorflow.python.ops import control_flow_ops
from tensorflow.python.training import moving_averages
from sklearn.cluster import k_means
NUM_BLOCKS = {
50: [3, 4, 6, 3],
101: [3, 4, 23, 3],
152: [3, 8, 36, 3]
}
CONV_WEIGHT_DECAY = 0.00004
CONV_WEIG... |
d7530521dac5a25d4633eedc5ee692b92ce42256 | 139c00744e53c7e2e95de00aad83c3f7a8fef7ad | /scraper_proxy/proxy_test.py | 2f4cfcc1b0b9b6c2c12e1fa5ff6d2d2b4c6459f9 | [] | no_license | RNogales94/xbot-main | 8a717685ded8339b4be66b457f3610264ae350d9 | 91040d2f9f6c68bd8fb08fdd5fb9934f3d81fe4a | refs/heads/master | 2021-07-25T12:50:58.065555 | 2021-07-07T01:20:55 | 2021-07-07T01:20:55 | 214,618,242 | 0 | 0 | null | 2019-11-04T17:52:30 | 2019-10-12T09:25:10 | Python | UTF-8 | Python | false | false | 2,228 | py | proxy_test.py | from scraper_proxy.proxy import Proxy
import requests
message = "https://www.amazon.es/Russell-Hobbs-20562-56-SteamGlide-Professional/dp/B00F9SUKE4/"
# def test_fixture(requests_mock):
# requests_mock.get("http://123-fake-api.com", text="Hello!")
# response = requests.get("http://123-fake-api.com")
#
# a... |
ed1e14bc371e36cfaf77cd4ae14225c9bd283a0b | 2eaa8f05aa27414959a2b03f009bb67ca00a19f2 | /okscraper_django/admin.py | 6bfbc7f3ca7f5b8df3ac997955be3d6be6a37029 | [] | no_license | hasadna/okscraper-django | 20056d8f0eb112921b211211549685bc36ba14ae | 661b7cdffd226941090bf05d22e48bc3fec02d33 | refs/heads/master | 2020-06-02T05:34:19.852125 | 2016-01-17T20:06:09 | 2016-01-17T20:06:09 | 16,925,592 | 0 | 1 | null | 2015-08-21T18:51:53 | 2014-02-17T20:27:23 | Python | UTF-8 | Python | false | false | 389 | py | admin.py | # encoding: utf-8
from django.contrib import admin
from models import ScraperRun
class ScraperRunAdmin(admin.ModelAdmin):
readonly_fields = ScraperRun._meta.get_all_field_names()
def has_add_permission(self, request, obj=None):
return False
def has_delete_permission(self, request, obj=None):
... |
4be5857906b45628cbc7fb7bacf096642db0b3a1 | 00bad50352394157a533752008288cf5f82d5d8b | /04/03set.py | 0c7386356a1579eb3b47501c4eaccdd6b27f4a64 | [] | no_license | persiandog/notes_codeme | 471d29c215d2c164c0bbee74a49770b3d13e0e19 | f89c9f5d2fc1318d251c3d6f969fdf641e436591 | refs/heads/master | 2021-02-11T03:41:16.928293 | 2020-05-12T21:47:52 | 2020-05-12T21:47:52 | 244,449,444 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 151 | py | 03set.py | tuple_1 = ("a", "b", "c", "d")
tuple_2 = (1, 1, 3, 4, 5, 6, 1, 1, 1, 1)
result = list(tuple_1[::2] + tuple_2[1::2])
result = set(result)
print(result) |
95286f9d390b49dc95e5a513153c4eb8c758e9ad | 6aca64ac450d2ce546cbedfbf56625d092e6bcbe | /ApiPython-Back-end/check_doc_content.py | d7b22cf13dd5c98902c86f4c6bb93d4a64436125 | [] | no_license | ThaisBitencourt/Topicos-Avancados-em-Banco-de-Dados | 43387d53f6853676c1acc0e26449fee855cd9e7d | e9b97faee132cf17635bdd301d06406291727899 | refs/heads/main | 2023-05-31T01:59:39.893050 | 2021-06-08T00:45:12 | 2021-06-08T00:45:12 | 342,421,408 | 4 | 2 | null | 2021-06-07T02:29:21 | 2021-02-26T00:54:43 | TSQL | UTF-8 | Python | false | false | 4,192 | py | check_doc_content.py | # -*- coding: utf-8 -*-
"""Check-doc-content.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1b9PlOG9cYDp_cd26JIMdjrgcNfHsP8Bg
"""
from validate_docbr import CPF, CNH, CNPJ, PIS, TituloEleitoral
import docx2txt
import re
import pycep_correios
im... |
2530e63a93c3b9448cd7513805c704b224f22948 | 61a4829e30f5cc893fc84f5d58e5de4dd84b3b0c | /Juchno Dungeon Escape (Final Project).py | 72e44d5246d21fab9eb71e6161b224c1a5b2ee5b | [] | no_license | juchnoe/final-project | cee88028a8e40883d98a3a61c939aec472acc39a | 411f17875d808f98c16f4eb0510977a14dfe8ec9 | refs/heads/main | 2023-04-17T06:17:40.262339 | 2021-04-26T19:13:22 | 2021-04-26T19:13:22 | 354,369,187 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 51,179 | py | Juchno Dungeon Escape (Final Project).py | import turtle as d
def waking_up():
print("You awake in a dark room, locked behind bars. Find a way out.")
print("You look around, and examine your options:")
while True:
response = input("1. Try to open door\n2. Check the floor of the room\n3. Call for help\n4. Go back to sleep\n")
... |
7bfd984d71ec32ba254268e32f3cbd4a7e467a0c | 1932c04c3eda350132567a96394d464d1d5c1915 | /utils/events/threed_todo.py | 1f491047b619ac5fe4c4529a7123322ba6720ebc | [] | no_license | andy2804/transfer-learner | bcc7639ba1bc9ff0fc7b849035e5c1d21b3ff2ee | 617053f127bb11147a888afddb7b66cf718a6925 | refs/heads/master | 2020-04-28T01:21:45.861388 | 2020-01-21T14:44:09 | 2020-01-21T14:44:09 | 174,852,725 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,973 | py | threed_todo.py | from objdetection.meta.utils_events.events_transform import EventsTransform
class ThreeD(EventsTransform):
def __init__(self, time_window=0.05):
super().__init__(time_window)
# todo input for network(this is only for plotting)
def crop_and_format_events(self, events_d, frame_ts, previous_ts,
... |
cfb9e0ac495af6f95483ddf0d361093441a462ee | deaf3b6c4da6b00b45dd4e56afa9605cbc01a991 | /django_alexa/alexa_app_setting.py | ccb2f30d1b5afa9e9ed96736048831fecbcb4d0a | [] | no_license | topsai/Arduino | 9c7ec4a4964658d9003861406dd41df8183fc8eb | f9267e5091d5588af1d96a7910c919045e888416 | refs/heads/master | 2021-01-16T18:32:56.942056 | 2017-09-06T09:21:06 | 2017-09-06T09:21:06 | 100,088,684 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 521 | py | alexa_app_setting.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django_alexa.internal.intents_schema import IntentsSchema
ALEXA_APP_ID_DEFAULT = "amzn1.ask.skill.c916f111-fe9e-4b9a-9fe4-33ea7b30eeb9"
ALEXA_APP_ID_OTHER = "light" # "Your Amazon Alexa App ID OTHER" # for each app
ALEXA_REQUEST_VERIFICATON = False # Enables/Disa... |
3150db4ba6e5942f7ec54341fc9adabc6d35c370 | 86f725b8c2d5be364c70ee959215d7dd7a904767 | /SMTP_Subaddress/xx2.py | 0b1a9a928decc95e391b36fb1c464e40ba4b46e3 | [] | no_license | whsasf/python | 676a917835d94eb577e6313a56594e761e79f84f | 98344ee5afc4ef92022c36943e08361a241b2c9e | refs/heads/master | 2021-01-24T23:24:05.120031 | 2018-07-18T05:33:45 | 2018-07-18T05:33:45 | 123,283,171 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,147 | py | xx2.py | #!/usr/bin/env python3
from modules.sendmails import send_mail
from modules.remote_operations import remote_operation
import time
#reate summary file and debug files:
#sumfile = 'sumary.log'
#dbgfile = 'debug.log'
#with open(sumfile, 'a') as file_object:
# file_object.write(attdata)
mtahost = '10.49.58.239'
mtapor... |
c4bacda72bd718b172a5db57b082066c20c241ec | 94a32d404bd9addf552610aa9bceb2d7dd6dc3ef | /tests/unit/test_basic_visitor.py | 5c96947e60eefb66e9518d7be0d21fbb6f3556fc | [
"MIT"
] | permissive | globocom/tapioca | 7016c0b35356a186bb58a4ac9c2352abc6c16da4 | dbe87f93937fc17994053e936cf2e6f2fc542f48 | refs/heads/master | 2021-01-10T19:53:37.192190 | 2018-10-12T15:58:28 | 2018-10-31T19:17:51 | 6,228,019 | 43 | 7 | NOASSERTION | 2019-10-24T01:37:42 | 2012-10-15T14:09:47 | Python | UTF-8 | Python | false | false | 2,181 | py | test_basic_visitor.py | from unittest import TestCase
from tapioca.visitor import SimpleVisitor
class VisitorTestCase(TestCase):
FOO = "foo"
BAR = "bar"
SUCESS = "sucess"
NONE = "{NONE}"
def test_basic_visitor(self):
class A(object):
pass
class BasicVisitor(SimpleVisitor):
def __init__(s... |
4a7676c95a209118c56722db82c19c480998b64f | 7dc24cc18c3f76c4ebbfa929a3991f35974f1ccb | /test.py | 6b945ad20db39d6c76e86ae5c078fe3571760eec | [] | no_license | Tomkess/football-match-winner-prediction | 04ebaccba14535c576e4ece1b00abdf39dddbc5f | 18a1e5f249adfac600dcdf9eca51722d9d327a7d | refs/heads/master | 2023-03-18T07:39:08.868014 | 2018-12-31T19:33:41 | 2018-12-31T19:33:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,653 | py | test.py | import sys
import xlrd
import xlwt
from featureComp import *
from createmat import *
def findRank(path2):
for i in range(1,39):
path3=path2+"/Match"+str(i)+'.xlsx'
matchday= xlrd.open_workbook(path3)
sheet1=matchday.sheet_by_index(0)
#print path3,'\n'
for j in range(1,21):
team_rank[sheet1.cell(j,2).va... |
bbfaf72074eaabf13120ccc21db0e74480d3479b | 13d0b21d0c1edfb8b4bda8395ceb4ecd7d0cb88e | /algorithms/DIPLDP.py | 7b07d202d96b2a8c8ff9adfd5a5cc9c239edfbeb | [] | no_license | SuperyyRan/DynamicEC2 | 61d1cb16de81b68e96e021ce83470299546a0df7 | 6480b71e5e691377a9d797bb628e00fcf55c7d3b | refs/heads/master | 2021-03-12T19:53:24.656826 | 2015-05-29T05:10:48 | 2015-05-29T05:10:48 | 34,196,210 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,965 | py | DIPLDP.py | #!/usr/bin/env python
# -*- coding:utf-8 -*-
##################################################################################
#
# Copyright 2015-2016 University Of Science and Technology of China (USTC)
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in comp... |
cdc1cd80c4b0cc035cda58c8d4e4d91a1bd1335b | 6de5a28c2b3fee3b5f6158b40f805cc96fe4877e | /野球チーム得点表/baseball_team.py | a17c9bc86f144f2d3ce66e44a95a71e4d7b19480 | [] | no_license | T-DY/Python | 330a2b508c20f28548b979347889e0219c0aba86 | f6983feaf272a37a26f204ede839385ba275ec3e | refs/heads/master | 2023-04-08T00:30:08.185050 | 2021-04-14T16:07:23 | 2021-04-14T16:07:23 | 352,339,587 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 385 | py | baseball_team.py | class Baseball_Team:
def __init__(self,name,win,lose,draw):
self.name = name
self.win = win
self.lose = lose
self.draw = draw
def calc_win_rate(self):
return self.win / (self.win + self.lose)
def show_team_result(self):
print(f"{self.name:8s} {self.win:3... |
b6aa273d81bf0277eb2666e355077c429849ed3c | a8529f7d30b261ab14fb309eb540af6f60087ceb | /attendance/urls.py | 6f71a7381e2e2a5dd56dda9b52ffcbf9096acd03 | [] | no_license | sahilss1499/smart-o-class | b67ebace45769de8c0930821fa0beb1aeeca5ee5 | 0ba779ae33f713a8e89ac859671aa66af983dba6 | refs/heads/main | 2023-04-18T03:37:20.849146 | 2021-05-09T12:28:37 | 2021-05-09T12:28:37 | 365,356,937 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 903 | py | urls.py | from django.urls import include, path, register_converter
from .views import *
class DateConverter:
regex = '\d{4}-\d{2}-\d{2}'
def to_python(self, value):
return datetime.strptime(value, '%Y-%m-%d')
def to_url(self, value):
return value
register_converter(DateConverter, 'yyyy')
urlpatt... |
2f05f2079ed059c47860644d992bc16562fea292 | d8422247ecbe450c75df45dcf2c92fb4438b65af | /horizon/openstack_dashboard/dashboards/project/cdn/middware.py | 987f2711e594e7e690dba8bdea96dc740be89b6b | [
"Apache-2.0"
] | permissive | yianjiajia/openstack_horizon | deb9beca534b494b587ae401904c84ddbed64c4a | 9e36a4c3648ef29d0df6912d990465f51d6124a6 | refs/heads/master | 2016-09-12T21:34:25.718377 | 2016-04-28T05:29:56 | 2016-04-28T05:29:56 | 57,273,157 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 17,060 | py | middware.py | # -*- coding: utf-8 -*-
'''
Created on 2015-6-16
@author: yanjj@syscloud.cn
@version: 1.0
@功能:
1.加速域名所有权校验
2.加速域名删除确认校验,短信及邮件方式
3 .手机短信验证
'''
from __future__ import division
import urllib2
import sys
from openstack_dashboard.api.cdn.api import domainApi
from openstack_dashboard.api.cdn.api import purgeApi
from openstac... |
caa8bf238857522fe367d4716db671bc875deeb7 | 5a62247121600fc12fe1ef0b03349f948c4ec8f1 | /hw2/hw2.py | 0cddab07adb0a26424668fae718babfb0400c7d9 | [] | no_license | KimNamjoon/repmon | a175257219d3269747a09857c5b85b062c6d238a | e7ffbf0eeca8e1444b998e6a73641417be78b552 | refs/heads/master | 2018-09-07T15:56:17.076407 | 2018-06-19T09:40:56 | 2018-06-19T09:40:56 | 103,241,551 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 273 | py | hw2.py | s = input()
for i, letter in enumerate(s): #Нумеруем буквы в слове
if i % 2 == 0 and letter in 'опе' :#Остаток от деления на два нужен, т.к. нумерация идет с нуля в строке
print(letter)
|
ccf50507afaa7aed7e017f47f77b6e9e188c3a77 | f0d2dcaab2d3bfb653c07e5c2a0283b1f2ad9339 | /selim/datasets/simple_ds.py | c39a59a23eb4c5d2b5b14087065f277f4957034f | [
"MIT"
] | permissive | tilacyn/dsb2018_topcoders | e7bc2bcc6e7fa3cad06da057dda5a2bcc5352174 | e0f95ef70bc062d4dea321d2aa73231a9538cd63 | refs/heads/master | 2021-04-18T05:26:02.515613 | 2020-06-26T21:47:42 | 2020-06-26T21:47:42 | 249,508,548 | 0 | 0 | MIT | 2020-03-23T18:12:25 | 2020-03-23T18:12:24 | null | UTF-8 | Python | false | false | 400 | py | simple_ds.py | import numpy as np
from tensorflow.keras.preprocessing.image import Iterator
import time
import os
class SimpleDatasetIterator(Iterator):
def __init__(self):
seed = np.uint32(time.time() * 1000)
super().__init__(100, 5, False, seed)
def _get_batches_of_transformed_samples(self, index_array):
... |
883c6aa0d82055cde2e12809605f5363130ecaf2 | ac051e0c75ffdc23e212f9c7f8fe55eb62c7abe4 | /backend/ComputeEmailerScores.py | 28b8c4266cd1c13c45f62f264c639d1ce6f400bb | [] | no_license | zischwartz/riskyListy | 8af3a64cf222c0928159e2d19ea4fbfe387cc479 | a44bf508eb5f4d3980dc18c8a73f7a6502aff32b | refs/heads/master | 2021-01-19T20:14:52.457244 | 2015-02-12T22:00:29 | 2015-02-12T22:00:29 | 3,719,964 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,789 | py | ComputeEmailerScores.py | import re
import yaml
from datetime import timedelta, datetime
import time
import sys
import sqlite3
config = yaml.load(file("config.yaml"))
conn = sqlite3.connect(config["sqlite_db"])
### fetch emails ###
c = conn.cursor()
c.execute("select timestamp, awardTo, category, points from email_points order by timestamp"... |
4540e16a12a3f5ac4697d7fbf943111ae7bf8d1a | 25279384025751b3b400aea006f164d66c167104 | /Python/多进程/装饰器.py | d3bb0383cdfee0bb9731ddc96bae973a51a65005 | [] | no_license | linruohan/my_study | 6fda0b49f4c671919ec7a7fc6ba596b49ec66e59 | 7666f93259495b6928751d50eb1bab114e118038 | refs/heads/master | 2020-03-28T18:26:47.776943 | 2018-09-17T05:52:17 | 2018-09-17T05:52:17 | 148,882,060 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 269 | py | 装饰器.py | from functools import wraps
def f(func):
caches = {}
@wraps(func)
def wrap(*args):
if args not in caches:
caches[args] = func(*args)
return caches[args]
return wrap
@f
def s(m):
print('1222',m)
return m**2
print(s(3)) |
194158d21a45aa16d4a449e19b6083a926ca7be5 | 10b41ce192cda30df9a15250ec560d43aed17068 | /asyncio/aioconsumer.py | 69c0f5a608afb49db04af0e0e62be83723f5074a | [] | no_license | yyyIce/py_exercise | 5347f888e3a443ba2c4f86a0846c170e8cbf32ec | 0950799fa34540ca30037992427f42f9b5b98fb6 | refs/heads/main | 2023-02-12T02:47:09.006444 | 2020-12-31T06:37:55 | 2020-12-31T06:37:55 | 322,234,793 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 928 | py | aioconsumer.py | #!/usr/bin/python
#encoding:utf-8
from aiokafka import AIOKafkaConsumer
import asyncio
import json
async def consume(loop):
consumer = AIOKafkaConsumer(
'test3',
loop=loop, bootstrap_servers='localhost:9092',
auto_offset_reset='earliest',
value_deserializer=lambda m: js... |
a035054d758ce1aebd702fa6627538bf7b3bfd97 | 52f4b3e57c659b74d8d235319e0f9a98b238f648 | /homework.py | ce3b22e8c6897dd5dccef682cf3a515f0fb1c281 | [] | no_license | boyekeem/Clouding | 68e06f80c027fae0f4d9603cea39765da4cdb247 | 3b4453d396a092a31c75bc69e0d6380efd90c2c9 | refs/heads/master | 2021-01-01T04:51:23.728413 | 2016-05-02T11:55:01 | 2016-05-02T11:55:01 | 57,885,194 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 245 | py | homework.py | import threading
class Kayode(threading.Thread):
def run(self):
for _ in range(120):
print(threading.currentThread().getName())
a=Kayode(name='first chat\n')
b=Kayode(name='second chatt\n')
a.start()
b.start() |
21fe54b94c5e5b3cd05505d1e5b489b734e9a820 | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/helpers/typeshed/stubs/setuptools/setuptools/_distutils/archive_util.pyi | 38458fc0e00349e77ebf105fdf5a52e850bc9e25 | [
"Apache-2.0",
"MIT"
] | permissive | JetBrains/intellij-community | 2ed226e200ecc17c037dcddd4a006de56cd43941 | 05dbd4575d01a213f3f4d69aa4968473f2536142 | refs/heads/master | 2023-09-03T17:06:37.560889 | 2023-09-03T11:51:00 | 2023-09-03T12:12:27 | 2,489,216 | 16,288 | 6,635 | Apache-2.0 | 2023-09-12T07:41:58 | 2011-09-30T13:33:05 | null | UTF-8 | Python | false | false | 548 | pyi | archive_util.pyi | def make_archive(
base_name: str,
format: str,
root_dir: str | None = ...,
base_dir: str | None = ...,
verbose: int = ...,
dry_run: int = ...,
owner: str | None = ...,
group: str | None = ...,
) -> str: ...
def make_tarball(
base_name: str,
base_dir: str,
compress: str | None... |
2f24930653e6670deaeae74d4c57ca51f493e730 | e706b10a30274e5df2fd93b48130f3d272f5fa60 | /admin.py | 9f55bbf5cbc9842f131ef986df25837d98614086 | [] | no_license | whipermr5/countmeinbot | 44e372044059087b7743c9c45cb89b9343106c2c | ce9f48e328205d3eb068f6fc950da6c49c6dfc6b | refs/heads/master | 2020-05-21T19:43:13.524099 | 2019-06-07T14:02:39 | 2019-06-07T14:02:39 | 60,370,808 | 14 | 9 | null | 2017-12-27T05:05:21 | 2016-06-03T18:54:53 | Python | UTF-8 | Python | false | false | 1,585 | py | admin.py | """Handlers for admin features"""
from model import Poll
import webapp2
from google.appengine.ext.ndb.query import Cursor
from google.appengine.api.datastore_errors import BadValueError
class MigratePage(webapp2.RequestHandler):
def get(self):
self.response.headers['Content-Type'] = 'text/plain'
... |
6f411ad78200968f87483b75cf34d541d5d57904 | ade047677ca695a8d27ff50645f1afe8cd1463df | /bug/Maps/mapBase.py | 557ffcfa5d2639d72b1aa5f6edd8c639afe1b811 | [] | no_license | xuzhuo77/WorkSpace-FrameWork | 677f02eead801fb48e60d0411ea4dc5aa516af57 | 109c691c270020ef20f36f625c31166c49386351 | refs/heads/master | 2023-03-06T13:02:28.528231 | 2021-02-21T23:01:08 | 2021-02-21T23:01:08 | 337,577,954 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 215 | py | mapBase.py |
m=[[1,0],[0,1]]
d=[]
for row in m:
d.append(row)
d.append(row)
print(d)
md = {0: " ",
1: "##",
2: "XX"}
for row in d:
s = ''
for entry in row:
s += md[entry]
print(s) |
b798f357f3a82296038f1d2f50e40116d271d381 | 6611634d9d5ed27af78739ec731737943b61b734 | /seleniumManager/utils/discord_login.py | 4939982800a80d62c1ab4c22f07492508a54670e | [] | no_license | fcouste/epicRPGPlayer | bdbb558f54df71796667e4d5ffdc4931a277c906 | 1164999c88854037f79932fb2b4ec9ef9ee7fa3f | refs/heads/master | 2023-06-30T21:03:24.514679 | 2021-08-08T03:26:33 | 2021-08-08T03:26:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 457 | py | discord_login.py | import os
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
def login(driver):
email_element = driver.find_element_by_name("email")
email_element.clear()
email_element.send_keys(os.getenv('discord_user_email'))
password_element = driver.find_element_by_name("password")
... |
0eaf42044641de61735e2602074fe9d84a33f388 | fb12b2068641f7f341a1439e430c335e092b08b7 | /ITS_18/LESSON/decorators/second_try_decorators.py | 35bfe00a4559a06ee2a00762cc0622087cbbec45 | [] | no_license | yura-seredyuk/ItStep | b0499a421ac51b5dbb01d8b731d287867c68bb9e | 51b9d751cd252fd7000b6b248880197ce561caa5 | refs/heads/master | 2023-05-25T04:42:41.490051 | 2021-06-09T21:28:38 | 2021-06-09T21:28:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 666 | py | second_try_decorators.py | from time import time
def timeit_decorator(func):
def wrapper(*args, **kwargs):
start_time = time()
func(*args, **kwargs)
end_time = time()
print(f'Function {func} was working for: {end_time-start_time}')
return wrapper
def validate_numbers(func):
def wrapper(value):
... |
80ab7edfa755071663e449143a74692949c1ee6c | 7584372f28ce3b7337de570277ac743f047a0095 | /crawler/plugins/applications/nginx/nginx_container_crawler.py | f666b2eef533f663ed53f11f23ac9f4b4ffc10fc | [
"Apache-2.0"
] | permissive | maheshbabugorantla/agentless-system-crawler | c87f35830024db3e274ad9340fbe1e4f31921cf7 | 376cc211b0037f4e2a9cc7df39127325dae4e39e | refs/heads/master | 2020-09-13T07:56:35.664099 | 2019-07-15T20:16:32 | 2019-07-15T20:16:32 | 222,702,730 | 0 | 0 | Apache-2.0 | 2019-11-19T13:28:49 | 2019-11-19T13:28:48 | null | UTF-8 | Python | false | false | 2,034 | py | nginx_container_crawler.py | import logging
import dockercontainer
from icrawl_plugin import IContainerCrawler
from plugins.applications.nginx import nginx_crawler
from utils.namespace import run_as_another_namespace
from requests.exceptions import ConnectionError
import json
import utils.misc
logger = logging.getLogger('crawlutils')
class Ngin... |
e50ad914694edde126d41b86b48641909f1a453c | bc58fd050de0e88c9480651bc9ce85d38ded704e | /zcm/api/clone.py | 9719277cb5d0c97f83a57d4798344020a14ec12e | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | guillermomolina/zfs-clone-manager | 6c5a1f83a0804a25a20d896b48e043cd5a58fecb | 65c6155adee78dc37780d16323da4bf7910248f3 | refs/heads/main | 2023-03-13T08:54:02.748622 | 2021-03-05T10:02:41 | 2021-03-05T10:02:41 | 338,339,650 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,245 | py | clone.py | # Copyright 2021, Guillermo Adrián Molina
#
# 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 agreed to in ... |
7b9660bba6fcb8c725251971f3733a1cc915c0e7 | a39a610f5d8c8cef147efb48abe00b1c22a32eee | /CIS 211 - CS II/Proj 1 - Rects-master/rects.py | 0538bbee7626d6453f7dc59920ff2304fd8bea78 | [] | no_license | noahtigner/UO-ComputerScience-DataScience | 34e50c7298261dce774997083080e24d030c6c7f | 559f81086bd3495348aa605da66117cb0fbc7277 | refs/heads/master | 2023-07-09T11:04:09.196879 | 2023-06-22T02:08:43 | 2023-06-22T02:08:43 | 241,751,814 | 3 | 0 | null | 2023-06-22T02:09:07 | 2020-02-19T23:46:24 | Python | UTF-8 | Python | false | false | 3,143 | py | rects.py | """
Rectangles: Compute overlapping region of two rectangles.
Point(x: number, y: number): Cartesian coordinate pair
Rect(ll: Point, ur: Point): A rectangle defined by lower left
and upper right coordinates
Rect.overlaps(other: Rect) -> boolean: True if non-empty overlap
Rect.intersect(other: Rect... |
f25351a3cb7bf583152baa8e7ec47b0f2161cb9c | afed8b1a319ab15adbc05631e9b35f90ac2cbd12 | /crabapple/notifier/notifier.py | 7d0e946b5b4c52b0be8645290d4942a4a4004d65 | [
"BSD-3-Clause"
] | permissive | ZichooleLongGui/crabapple | 45e729827ceba012da400ba2facdc447e98acc3b | bf90b960aa78974be30bceeb17fe6717760bff41 | refs/heads/master | 2020-05-07T13:48:17.904359 | 2015-01-21T10:47:47 | 2015-01-21T10:47:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 402 | py | notifier.py | # Copyright 2014 The crabapple Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
import abc
class Notifier(object):
__metaclass__ = abc.ABCMeta
def __init__(self):
pass
@abc.abstractmethod
def config(self, kwa... |
d0eb6ea2e816ac59ae93684edb38ff3a49909633 | f07a42f652f46106dee4749277d41c302e2b7406 | /Data Set/bug-fixing-4/f477a1dccf1f522640a2afd00e11ba41b9d17bf9-<usage_list>-fix.py | 9c007ea64766cfb7d05e11ec20c17a5fe9ed6a09 | [] | no_license | wsgan001/PyFPattern | e0fe06341cc5d51b3ad0fe29b84098d140ed54d1 | cc347e32745f99c0cd95e79a18ddacc4574d7faa | refs/heads/main | 2023-08-25T23:48:26.112133 | 2021-10-23T14:11:22 | 2021-10-23T14:11:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 581 | py | f477a1dccf1f522640a2afd00e11ba41b9d17bf9-<usage_list>-fix.py | def usage_list(self):
print('Available modules')
print('=================')
for module in sorted(self.list()):
if ('module' not in self.mods[module]):
self.import_module(module)
if (not self.mods[module]['module'].__doc__):
continue
text = self.mods[module]['m... |
f3329962004a4454c04327da56d8dd1d0f1d45e7 | 33b42731826cd531abdda0740a840e20e137f719 | /www/volby-2017-simple/hithit.py | e2ec84c1055a151bc73f9eed6c23f083c0b914e0 | [] | no_license | KohoVolit/vaa2012-2 | 5fd67ac1d358ea51b8ef69d56a7fa29b1652855b | ccc04bb0ce2345b4cb95e2ac29d68bac317825b7 | refs/heads/master | 2023-03-09T04:13:21.820376 | 2022-08-30T16:50:26 | 2022-08-30T16:50:26 | 5,830,482 | 4 | 12 | null | 2023-03-06T09:53:39 | 2012-09-16T15:37:46 | HTML | UTF-8 | Python | false | false | 730 | py | hithit.py | import csv
import datetime
import json
import re
import requests
import os
r = requests.get("https://www.hithit.com/cs/project/4067/volebni-kalkulacka-on-steroids")
path = os.path.dirname(os.path.realpath(__file__)) + "/"
if r.status_code == 200:
text = r.text
pattern = 'Přispěvatel'
m = re.search(patter... |
2c505f3f1dfdefae8edbea0916873229bcda901f | c01784d8eb44023d205f3026f967dad7d7ccb9c3 | /libs/nestable_blueprint.py | 3fe80845c07a52a42d26c2ecb2a82bb0c840e7f8 | [] | no_license | steveyang687/GoFitness-backend | 0368d77b9859ace97719070072e04cb497ff5fd6 | 0f3c1eb545411190a9a2331149ede489b782ac80 | refs/heads/master | 2023-03-29T15:20:40.235012 | 2021-04-05T13:15:37 | 2021-04-05T13:15:37 | 349,355,298 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 614 | py | nestable_blueprint.py | from flask import Blueprint
class NestableBlueprint(Blueprint):
def register_blueprint(self, blueprint, **options):
def deferred(state):
# state.url_prefix => 自己url前缀 + blueprint.url_prefix => /v3/api/cmdb/
url_prefix = (state.url_prefix or u"") + (options.get('url_prefix', bluepri... |
5721786b61cf8706b1d401a46d06f2d32153df8b | 3a96d7a0d6a72a704e339852226d4e3b0acc4abb | /perfect.py | e3ff8dac1a614bcd5ba9bad3f6920c195c6b822d | [] | no_license | rahul148/PythonTraining | 2a02398b6a7e9d1727c490e852897ec2226f0a50 | 9dd5b1048133fde5873506906cd79824233b2709 | refs/heads/master | 2020-06-22T11:01:41.677244 | 2019-07-22T02:30:33 | 2019-07-22T02:30:33 | 197,703,320 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 186 | py | perfect.py | n=int(input("enter the number\n"))
sum=0
for i in range(1,n-1):
rem=n%i
if(rem==0):
sum=sum+i
if(sum==n):
print("the number is perfect")
else:
print("not prime")
|
24f87bd6aab0ff65cf2153e27df31122818ad0ac | dd693fd9fb2277aed3df8cc60ac2c45c41dd1b04 | /t/14-colgroup.py | 6d1bd7139c1c0bbe21f0032cb8e640eb36c26ab9 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | jeffa/Spreadsheet-HTML-python | 5ddf47e0125840312d1a6367a1f03325e0ab8a1b | 9bf28a0c9fcbdad28238ab0adbb3cdd327d572a9 | refs/heads/master | 2022-01-13T22:29:48.267011 | 2022-01-07T19:11:38 | 2022-01-07T19:11:38 | 69,527,707 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,380 | py | 14-colgroup.py | import unittest
from Spreadsheet.HTML import Table
class TestColGroup(unittest.TestCase):
def test_colgroup(self):
return
data = [
['a','b','c'],
[1,2,3],
[4,5,6],
]
gen = Table( { 'data': data, 'colgroup': { 'span': 3, 'width': 100 }, 'attr_so... |
2a0172641c48c47f048bf5e9f1889b29abbb0b7c | e240ef430b3e4296236f93e8ed3ff1c627a2ec63 | /FTRL/runCv.py | f49d7b4ff6aa914c5e3ad6d7b45c497c456923be | [] | no_license | zgcgreat/outBrain | a9f5e250078932a8f62634f2ee6f2361131101f0 | 6505b782d958c853aa3836a5d5dbab8694c590bc | refs/heads/master | 2021-06-09T13:29:17.715276 | 2017-01-11T15:37:31 | 2017-01-11T15:37:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 910 | py | runCv.py | #!/usr/bin/env python3
#coding=utf8
from __future__ import (division,absolute_import,print_function,unicode_literals)
import argparse, csv, sys,subprocess,time
NR_THREAD=20
def shell(cmd):
subprocess.call(cmd,shell=True)
print("Done! {0}.".format(cmd))
start=time.time()
cmd = 'mkdir FTRL/tmp -p'
shell(cmd)
... |
eab5bf4776582349615ad56ee1ed93bc8f868565 | b84dbc9d3daa66cfd3dac484c4e2e546367e32f8 | /communication.py | 2bcfc018bedffa4de37f5b8f8c44ca397b712ed9 | [] | no_license | DpEpsilon/sprint | f937c14d1c4c6b7ea9893ec63ed4fead562ce827 | 4b34f6804d255cce0e464001b1531e290ead4a7e | refs/heads/master | 2021-01-16T22:07:28.222387 | 2013-02-04T10:53:12 | 2013-02-04T10:53:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,163 | py | communication.py | from common import *
import serial
CMD_BAUD = chr(129)
BAUD_RATES = [300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 28800, 38400, 57600, 115200]
class Communication(Module):
def __init__(self, parent, port_name, baud_rate):
self.parent = parent
if not isinstance(port_name, str):
ra... |
abbad57e945d2195021948a0e0838c6bfd9c6a1e | 8231402a5f2f100723686ed91299f750f837d207 | /intro-CS/connect4_JayNa.py | d9a2df51298b83e29b0b873639be4b886ad54326 | [] | no_license | 20jna/jayna-projects | aab33a66800a8b47af9addc1beb64a41c41b293f | acdbc95cb152777f274e6482b788941ffd2510a5 | refs/heads/master | 2021-02-06T14:54:13.491196 | 2020-04-10T20:22:13 | 2020-04-10T20:22:13 | 243,923,452 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,674 | py | connect4_JayNa.py | #connect4_JayNa.py
#Jay Na
#CS111 Spring 2018
#This file creates a version of the game Connect4, where the user plays against an AI
from graphics import *
import random
class ConnectWindow:
def __init__(self):
self.window = GraphWin("Connect Four", 690, 590)
self.window.setMouseHandler(self.handleClick)
self.... |
75ab5146e8a7e33ef8c41cc92d7bc74b432223e9 | 0aa0d816319e90b7f373494a4c3043ea54a981fe | /given.py | 909b1fdd2a28c2d4eef1638d1df076236d58f735 | [] | no_license | delzadbamji/Test_COVID_Risk_wrt_Weather | 735484d4e8d03086ecfb4668523f55609615df88 | 9da2af368716a14d572aae436eda6405e2450057 | refs/heads/master | 2023-05-01T05:24:24.986144 | 2021-05-24T19:40:10 | 2021-05-24T19:40:10 | 359,355,585 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,061 | py | given.py | import pandas as pd
import math
import statsmodels.api as sm
from scipy.stats import pearsonr
import numpy as np
import os
# import pandas as pd
import os
import seaborn as sns
import matplotlib.pyplot as plt
from matplotlib import rcParams
def get_corr(df2):
# print(df2.info())
c = df2.corr()
c[:] = np.w... |
941684913127c514b7057cd9c1bb469ecb5ba3f5 | e96d4446dbb4b81b0ad17f9a9ce34660bd41155f | /stubs/QuantConnect/Orders/Fills.py | a99d8a9546942300048549c41ce9c1f0f551211e | [] | no_license | JoeYuZhou/QuantConnectStubs | 14205ba341d16e3fe30b62c218c289e861d430c1 | b2a69a96e6ca09cc0a984682e39dffc1db45f0a0 | refs/heads/master | 2022-11-20T20:24:07.189921 | 2020-07-27T18:58:39 | 2020-07-27T18:58:39 | 282,825,126 | 2 | 3 | null | null | null | null | UTF-8 | Python | false | false | 11,468 | py | Fills.py | # encoding: utf-8
# module QuantConnect.Orders.Fills calls itself Fills
# from QuantConnect.Common, Version=2.4.0.0, Culture=neutral, PublicKeyToken=null
# by generator 1.145
# no doc
# no imports
# no functions
# classes
class Fill(object):
"""
Defines the result for QuantConnect.Orders.Fills.IFi... |
520908eacf1b36373b91d4834aaad105e569d3a8 | ac33a2a5c86634ccc987b1650aab282ecaeaa7a5 | /setup.py | ee74f2acec80008408d97f24eb8a9e38b45bc436 | [
"Apache-2.0"
] | permissive | ezbake/ezbake-infrastructure-ssl-socket | 8c8480c3affd7b490e355c1827583cea5b928f31 | f0fe1d573a17cb2fb3546fb208a235faca96f9b7 | refs/heads/master | 2021-01-22T11:38:05.157556 | 2014-12-22T21:09:00 | 2014-12-22T21:09:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,125 | py | setup.py | #!/usr/bin/env python
# Copyright (C) 2013-2014 Computer Sciences Corporation
#
# 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
#
# ... |
a00b2019f11131259995d3c94c2f8c1b0f88bbe3 | 376add4f0e44a49327797db7346a33d67d9c4f93 | /tests/test_wave.py | 46216d972fcc013f159659401733507b891bea24 | [
"MIT"
] | permissive | t-onoz/igorwriter | c66167e1197cc70d4186aa07ac61d8115b77bcfe | 70d4c579445a0bccab931131a4b7194024f8fc84 | refs/heads/master | 2023-07-08T12:56:45.648767 | 2023-07-08T09:35:28 | 2023-07-08T09:35:28 | 113,955,508 | 5 | 1 | null | null | null | null | UTF-8 | Python | false | false | 17,584 | py | test_wave.py | import unittest
import os
from pathlib import Path
import numpy as np
import igorwriter.errors
from igorwriter import IgorWave
from igorwriter.errors import TypeConversionWarning, StrippedSeriesIndexWarning
OUTDIR = Path(os.path.dirname(os.path.abspath(__file__))) / 'out'
ENCODING = "utf-8"
class WaveTestCase(unit... |
fea1184bb8639a8226830959191e3476f83f1281 | da601516d431e69fafac09cf55d0c4c685c03f05 | /testbed2gff.py | fef6b7a77073c054fab8ab372fa2e3088f9fa778 | [] | no_license | icefoxx/python-codes-for-RNAseq | 5a3ce9be78410e49c779df1481bbd2f1c7f190f8 | 5079d35c07e25e21487271e9a0f5a5f6591c4c9e | refs/heads/master | 2021-01-16T21:06:59.209887 | 2011-09-30T14:56:43 | 2011-09-30T14:56:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,228 | py | testbed2gff.py | import sys
import unittest
import bed2gff
'''Transcript Features
1.Start Codon
2.Stop Codon
3.Strand
4.Transcript name
5. Chromosome
6. Gene name
7. Chromosome start
8. Chrosome end
9. Exons Starts
10. Exon Sizes
'''
class TestParseBed(unittest.TestCase):
def setUp(self):
self.row = ['chr1',
... |
d9c92a8d60267fdee1a2fa6b3d6ab2555b349f55 | 9a73ef8c21c6d66813368d5cbb1c1528b67535f1 | /meiduo_mall/meiduo_mall/apps/contents/views.py | e9f40f8360db75c1f42af24c2e9f5a89c8b839bf | [] | no_license | yi0506/meiduo | 6503132b8ac1c00ff5567239c233d68515332900 | e3976cbb9e96a1558f4e00abed1c61d887f915b1 | refs/heads/main | 2023-04-04T04:19:11.250296 | 2021-04-05T14:56:42 | 2021-04-05T14:56:42 | 312,161,481 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,249 | py | views.py | from django.shortcuts import render, redirect
from django.views import View
from django.contrib.staticfiles.storage import staticfiles_storage
from collections import OrderedDict
from contents.models import ContentCategory
from meiduo_mall.utils.method_package import get_categories
class IndexView(View):
"""首页广告... |
ea8708350cb60f3c8d4b6fb1db2ea3289a071cb5 | 791aeac40500f61a1f8a1a976423644b184f62f9 | /fpa_io.py | 81efd139961edf3ee522261aece8d9174882df11 | [
"BSD-3-Clause"
] | permissive | jjhw/VQ-VAE | 96495763d8b7d7de9f87a3c8a45bc136a1c78104 | d533c47d10d8b2fa2c9e971fcf1a45a0d5faa1f3 | refs/heads/master | 2023-06-04T12:22:30.102495 | 2018-11-15T15:44:46 | 2018-11-15T15:44:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,797 | py | fpa_io.py | import numpy as np
import io_image
import os
import pickle
import util
from eulerangles import euler2mat, mat2euler
num_joints = 21
class GTSkeleton:
def __init__(self, filepath, action, frame_num, joints):
self.filepath = filepath
self.action = action
self.frame_num = frame_num
se... |
92e17e62b4bd97e2f8ec50aa24a8b89ad4722e5e | 87e9869c9d8565933f17ea4eb8d011aee97bbeb6 | /week01/day-2/Lists/compare_length.py | 6f7051fe98bcd5854eb988500fcec4263aafe309 | [] | no_license | green-fox-academy/sara2585 | 62838819be4f659c2cc49d2ed8e2bf4bde3a7876 | 476b3a4bf8ff90486f8d584b910a14f2716b2e58 | refs/heads/master | 2020-05-19T20:50:44.646186 | 2019-06-21T09:34:43 | 2019-06-21T09:34:43 | 185,209,486 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 405 | py | compare_length.py | # - Create a variable named `p1`
# with the following content: `[1, 2, 3]`
# - Create a variable named `p2`
# with the following content: `[4, 5]`
# - Print "p2 is longer" if `p2` has more elements than `p1`
p1 = [1, 2, 3]
p2 = [4, 5]
lenp1 = len(p1)
lenp2 = len(p2)
if lenp1 < lenp2:
print("p2 is longer")
e... |
4b5b79f43e737ae68ebd98b9d83ce6203883e269 | 53bd492b8a1d28ae0068748451b1ad1ce7d77a80 | /interview_practice_questions/picking_numbers.py | 0ab8d745ca2c4b2509dea955be58994456281a6d | [] | no_license | thekevinsmith/hackerrank | c918ad229d8bb2ccc81f9ce5d0a14ec0f1987c43 | a8042b436cf52a1f61184f67bb4542645651f490 | refs/heads/master | 2023-07-05T22:35:03.296978 | 2020-07-20T20:53:01 | 2020-07-20T20:53:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 660 | py | picking_numbers.py | def picking_numbers(arr):
ll = []
cl = []
arr.sort()
for i in range(0, len(arr)):
if len(cl) == 0:
cl.append(arr[i])
elif abs(arr[i] - cl[0]) <= 1:
cl.append(arr[i])
else:
if len(ll) < len(cl):
ll = []
ll = ll... |
ceaed53a69d1c7152bf1cda39abf7ad735cefa1a | 4f1abb285b875dd5f5bfb2d4b900fb6585a83bc4 | /test/testchint/zichan.py | 1e29ff9179e89136872f860c89d6176a25b9f49f | [] | no_license | zhatianbang/Python_automationframework | c0ba3609c3dfabc61763488906f75fa45a7022b2 | 4d93662366f3b4c4e630096fc9e056da5ef0ac71 | refs/heads/master | 2022-11-03T15:45:48.877694 | 2020-06-17T01:02:23 | 2020-06-17T01:02:23 | 272,624,692 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,532 | py | zichan.py | #coding:utf8
from selenium import webdriver
import time,os
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome(executable_path='../... |
79fc6535c68dab2f10a746a4a3dcbfdb5332de0d | b74bab8917657ed2384b9b419d450b4cb84d450a | /setup.py | e6446121060cb6dda4d2f4d0533e158afdee8f24 | [
"MIT"
] | permissive | FaustineLi/Variational-Autoencoders | 5ae1f2a17344f7a406c09698f7cdd1d9a15b9ff8 | f39e808ec1eeef6d9ef937799dc6fb0959183bec | refs/heads/master | 2021-09-05T20:40:52.528709 | 2018-01-30T21:51:35 | 2018-01-30T21:51:35 | 87,357,783 | 4 | 4 | null | null | null | null | UTF-8 | Python | false | false | 246 | py | setup.py | from setuptools import setup
setup(
name='vae',
version='0.1',
description='Variational Autoencoders',
author='Faustine',
license='MIT',
packages=['vae'],
install_requires=[
'numpy>=1.9.1',
]
) |
104b6e3d3250d0b83bce995fe0c1eceb20a0c455 | 924d48a3eedc86ba58716ca8c66733ca123431d0 | /dir_load2vmd.py | bb85b47c27f30f1d083ac2d0a97306099a28b3f5 | [] | no_license | dmkilburg/biophysLabScripts | 57d7be3e55fcfc44235789af5cff23baf7a933ee | 0614f37571dea99be9d11eda4c09666e3d88f7b0 | refs/heads/master | 2020-03-17T06:51:45.234512 | 2018-05-14T14:23:02 | 2018-05-14T14:23:02 | 133,372,694 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 490 | py | dir_load2vmd.py | #!/usr/bi/python
"""
This is a quick script to load the current directory's lig.dms files in time
order to vmd.
"""
import os
import re
import sys
def main():
directory = os.getcwd()
name = sys.argv[1]
num_cycles = sys.argv[2]
command = 'vmd -f '
for i in range(1,int(num_cycles)):
d... |
e7ef16546f9fffadd568ca82e545b105a60cbfd4 | 12451405137d3539b77f14073759fe93a21df6e8 | /Maincode.py | 0989b8d15b61ab661d67356357faef2eb2363d49 | [] | no_license | l-ogan/Voice-_interface_Tic-Tac-Toe_game | a721f708582a8ca587616dcac0bfc3390e6ac74f | 60463c04f33448754883e01bd25c9b3c41c9c0bd | refs/heads/master | 2022-11-13T10:57:43.324271 | 2020-06-26T08:39:45 | 2020-06-26T08:39:45 | 275,108,551 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,699 | py | Maincode.py | #Tic tac toe game with voice interface
import random
import pyaudio
from gtts import gTTS
import playsound
import os
def speak(text):
tts=gTTS(text=text,lang="en")
r=random.randint(1,100000)
filename="aud"+str(r)+".mp3"
tts.save(filename)
playsound.playsound(filename)
os.remove(filename)
... |
ba4019fdb5a614b9a8589e98e7e247277a3607e8 | 559a454d8d2d0f3952f63253cbb0b857110681b7 | /A2/A2_Hilscher.py | d9c31df32757aa294df31d1dea8cae29d46a1fee | [] | no_license | christianhilscher/CompM | 15d8d23138da795637821242d66078ee84f2d4e2 | be4993a8a72ec85d4684a946532171a0e1ed4263 | refs/heads/main | 2023-05-08T15:19:12.412723 | 2021-05-10T07:16:38 | 2021-05-10T07:16:38 | 324,723,155 | 0 | 0 | null | 2021-05-10T07:16:39 | 2020-12-27T08:58:56 | Python | UTF-8 | Python | false | false | 6,002 | py | A2_Hilscher.py | """
04.01.2021
Christian Hilscher
UniMA Matr. #: 1570550
UniHD #: 6000506
Final version of solving Assignment 2 which is to be handed in
First the individual functions are defined
At the end there is a function called "run_A2()" which also contains the solutions
as comments.
"""
from pathlib import Path
import nump... |
d8fc7e02a9226efe27f5a36a8447d73ce818eae2 | a314e91c67b83b17c2e6668cafde46ef4dcd3688 | /2013/Qualification/d.py | 4fa51d6c805f70ede3a7af5c63a0fb241b3c12f8 | [
"MIT"
] | permissive | mnleod/google-codejam | 3eef7a6f93b5a6574bbc87f5ac2594e878186b9e | 45cd7dc9e61f814f37e8060f50ea72e2478709c5 | refs/heads/master | 2021-01-23T15:41:32.790097 | 2013-12-16T04:33:58 | 2013-12-16T04:33:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,023 | py | d.py | #!/usr/bin/env python
# encoding: utf-8
"""
d.py
Created by Yue Zhang on 2013-09-28.
Copyright (c) 2013 __MyCompanyName__. All rights reserved.
"""
import sys
import os
from collections import Counter
# For some test cases there are not sufficient keys present in the
# problem to unlock all of the chests. This can ... |
a29987b2b5d20af8ecef1a40092bc9f6dff2c477 | c1e7f831bb3d602720320bbfe2e494b40b29fadf | /selectiveCopy.py | 7b4e76844a582050cdc7478b8ec63cea1429d381 | [] | no_license | Kenny1G/automateBoringStuffWithPython | 67be921503dba96a7aeccefe5dc805c62d31969e | abb577867d44d59855abc411447056801b02ecd5 | refs/heads/master | 2020-05-04T19:22:18.094980 | 2019-04-04T00:11:17 | 2019-04-04T00:11:17 | 179,389,635 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 514 | py | selectiveCopy.py | import re,os,shutil
regex = re.compile(r'.*jpg|.*pdf')
folder = 'C:\\Users\\osele\\Pictures\\wallpapers'
for folderName, subFolders,filenames in os.walk(folder):
for filename in filenames:
if regex.findall(filename) != []:
os.chdir(folder)
file = os.path.abspath(filename)
... |
5717d0b6aa73807b65481cde18e9467a17a7ea45 | 239d06aa8e0b0e6286738e0ab03c53223de69073 | /Fishmart/website/admin.py | c085272f455780879d963c41c314c913c866d503 | [] | no_license | raniag0916/PythonProject | aef53f6a210d53b19bf1ddf5ef159a8229e87522 | 0bd007e1a894b8069d56ba9bf516c75b17bd4a4e | refs/heads/master | 2023-05-05T01:11:10.571705 | 2021-05-07T10:20:41 | 2021-05-07T10:20:41 | 363,842,371 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 244 | py | admin.py | from django.contrib import admin
from website.models import RegisterUser, Cart, Order, Message
# Register your models here.
admin.site.register(RegisterUser)
admin.site.register(Cart)
admin.site.register(Order)
admin.site.register(Message)
|
7e3df20b94aa2715fc67c829e10f55fa2c84ca4f | f864d5d8fcf944a8a7243ea8ea72766a8a256fb4 | /packages/pyright-internal/src/tests/samples/typeAlias7.py | 58124d8c67ef7600ef1cfd94dc74e57cf4a8c1b7 | [
"LicenseRef-scancode-generic-cla",
"MIT"
] | permissive | Eshan-dev/pyright | 50105defca2c4cdeaf79899c90d16e0551e3196f | e767a42334f1a04a1e46d5bb3d0ba2a29bb76bf2 | refs/heads/master | 2022-12-24T20:29:32.920899 | 2020-10-01T05:36:18 | 2020-10-01T05:36:18 | 300,157,569 | 0 | 0 | NOASSERTION | 2020-10-01T05:37:56 | 2020-10-01T05:33:56 | TypeScript | UTF-8 | Python | false | false | 599 | py | typeAlias7.py | # This sample tests Pyright's handling of recursive type aliases
# that are also generic.
from typing import List, TypeVar, Union
_T2 = TypeVar("_T2", str, int)
GenericTypeAlias1 = List[Union["GenericTypeAlias1", _T2]]
SpecializedTypeAlias1 = GenericTypeAlias1[str]
a1: SpecializedTypeAlias1 = ["hi", ["hi", "hi"]]
... |
27654e515d04f1ac0cace1f5211ddd20d7194494 | f53e31cb4e93859dfe3dedb8d992879dde1d7f08 | /src/alphabet_learner/menu.py | ddd495d0f6039784b5be0ccf56a1fc323d911619 | [
"MIT"
] | permissive | Peilonrayz/alphabet_learner | ef4213ad2284c4db005010aae9fcfb1f767c18dd | 13229e53215e3c050f106e00e34f90ca2d6fa256 | refs/heads/master | 2021-01-09T13:30:19.253121 | 2020-08-18T21:00:16 | 2020-08-18T21:00:16 | 242,319,157 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,894 | py | menu.py | import collections
import itertools
import random
import string
import unicodedata
from getpass import getpass
from colorama import Fore, Style, init
from . import _weights
from .alphabets import ALPHABETS
from .ansi import ANSI, BAD, GOOD, RESET
from .console import console
from .get_char import GetChar... |
c0794dab49da63cf7fa8a29ec8d49507fe939870 | 7a225c3f76a58498f7e2eb89d78273fc5eaf763d | /funciones/lambda.py | 419bec24e4f1d4f67cfbe1f9114bd33c9cc6ebeb | [] | no_license | janerleonardo/Python3CodigoFacilito | 0c990f20bce87dabf5380603ac74e7bbb7610499 | b4445bc4048003e5d5da736a20fc3d410d04e16e | refs/heads/master | 2022-12-30T15:49:20.183965 | 2020-10-13T19:28:12 | 2020-10-13T19:28:12 | 271,296,802 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 860 | py | lambda.py | """
La funciones lambda son funciones expresadas en una solo licea de codigo, para crear una funcion de este tipo
se debe utilizar la palabra reservada lambda seguido de los parametros qe puede tener default, : (Dos puntos)
lo que quereos quee haga la funcion, todas la fucionees lambdas retornan un valor
"""
my_f... |
07fd9058176af35fae5651e92439b33225c1cb28 | 0f6d8b0864d01c1e97bf9852fcf35866adfe0606 | /DeepLearning-Actions/model_deploy/torchserve_dep_model.py | bf39eb1e2f9688a067ff3abcbe043ad08fab3f94 | [] | no_license | NicholasZXT/DataAnalysis | afe94d0cf200911ffcab133912774255a589547f | 0c3d8f872cc8db45bf5b36423bea7fc35de27a3e | refs/heads/master | 2023-08-16T19:39:56.000845 | 2023-08-10T09:07:11 | 2023-08-10T09:07:11 | 214,614,649 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,034 | py | torchserve_dep_model.py | import os
import torch
from torch import nn
class MyModel(nn.Module):
def __init__(self):
super().__init__()
self.linear = nn.Linear(3, 2)
self.activate = nn.ReLU()
self.output = nn.Linear(2, 1)
def forward(self, X):
mid = self.activate(self.linear(X))
out = sel... |
890ea8ec47aee78ed6089f81f7ea50290ceff360 | 4662a4f0af562f3fb38ebaad9c5f00f507a6e573 | /vou_viajar/excursao/apps.py | cb46c784a5dd341321a7e3413e6bbf806107091b | [] | no_license | mikefarias/vou_viajar_django | 462a5a5866ad80f29e6aa9babf1cb70bb7727fcc | 0e0dc35a20572159f67e3a46a221542f7810b3ba | refs/heads/master | 2022-04-21T16:49:46.188275 | 2020-04-21T11:15:36 | 2020-04-21T11:15:36 | 164,842,877 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 91 | py | apps.py | from django.apps import AppConfig
class ExcursaoConfig(AppConfig):
name = 'excursao'
|
3a2b03ac0d959fed08fe21a83cc142a9806e3b95 | 94bcd7183296ba2516eb2445c0cad8142272c36d | /OSC-Processing-Python/send_receive.py | afb5c15f634df4d0784a03e7b4d93d603f84efb9 | [] | no_license | robcanningCU/hacklab | 09eb8cda62aba8b39c5fba46f141462ed9e1bf47 | e65a7815835a3e9797819dfa2ced162f41cb6cf2 | refs/heads/master | 2020-12-30T11:39:15.462576 | 2017-05-25T21:24:03 | 2017-05-25T21:24:03 | 91,579,161 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 423 | py | send_receive.py | #!/usr/bin/python
# simple OSC send script to test processing OSC receive
import OSC # we need to install this OSC library sudo pip install pyosc
c = OSC.OSCClient()
# c.connect(('169.254.89.184', 57120)) # localhost, port 57120
c.connect(('127.0.0.1', 12000)) # localhost, port 57120
oscmsg = OSC.OSCMessage()
os... |
8b2ea59e10c3892eeb996ae4cb6acb8102703707 | 81075af42ae63dbd1635022e2c2c9ad1b11bdf7f | /api/views/message/message.py | 57f679bfad4b0dc410139d33e594a1a3748487eb | [] | no_license | yuhey/se_hub_api | 8158a65bacda0dc6791a49d31c0c934686f94ad5 | c0fa5f801384ee260f492ca69bc1734a6a39451b | refs/heads/master | 2023-03-29T05:56:04.226502 | 2021-04-02T08:25:58 | 2021-04-02T08:25:58 | 310,790,178 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,985 | py | message.py | import json
from django.core.mail import send_mail
from rest_framework import status
from rest_framework.response import Response
from rest_framework.views import APIView
from django.utils import timezone
from api.models.disclosure import Disclosure
from api.models.message import Message
from api.models.room import ... |
7d197e9b234b2cca280f601ce9a2d366e75aa756 | d8c4324ad76a4f59e28d2d9f47a5d180ff40c9b3 | /main.py | 517fc87d204e14f00157a6eef9ed6b09394f8e15 | [] | no_license | limiteddata/GTAV_Casino_Roulette_Autobet | 3578d0de134674a73bce6ae5fd953119a5111a81 | ef1d6948dd8092a7eae419ba268b025563b006f6 | refs/heads/master | 2022-11-27T20:54:53.089637 | 2020-03-01T03:30:29 | 2020-03-01T03:30:29 | 244,077,530 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,102 | py | main.py | from time import sleep
from win32 import win32gui
import pytesseract
import numpy as np
import threading
from pynput.keyboard import Key, Controller, Listener
from PIL import ImageGrab,Image, ImageOps,ImageEnhance,ImageFilter
from directkeys import pressKey,releaseKey,DIK_E,DIK_ARROW_UP,DIK_ARROW_DOWN,DIK_PAGE_UP
impor... |
ca256f93340bb2e5a264401dd5eb94881b8f3657 | 011f3156307ac9e65ba77285226176480ba19069 | /app/form/auth.py | 4bdc3d81b1aa43a979a6f4e9f6de1d1221db1091 | [] | no_license | COWARD52/filtering_voice | a167834039464b8c0893a94125117016975c74b3 | 78c4eadf00440744f10f217a40ea221941267e8c | refs/heads/master | 2023-03-18T17:15:17.642020 | 2021-03-15T14:22:42 | 2021-03-15T14:22:42 | 347,996,044 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,420 | py | auth.py | from wtforms import Form, StringField, PasswordField, ValidationError, IntegerField
from wtforms.validators import Length, NumberRange, DataRequired
from app.db.Consumer import Consumer
from app.db.User import User
class Loginform(Form):
phone = StringField(validators=[DataRequired('phone cannot null'), Length(1... |
21c26bbcd4e9ddd21acf776aa2d6ed494288617c | 4f4097bea5f3bf04844c75c9ff398cb7fe64fc45 | /scouting.py | d986bc650f6dc95ba3afbc76b7f05a1bf3dd98ff | [] | no_license | kli512/VRC-Scouting | e2a3ed93ead444247a038f760ff53c9a4e5cdad5 | 8461deec87fe36a69381129ec6857914da18eee3 | refs/heads/master | 2020-04-01T22:19:48.008728 | 2019-01-24T00:36:37 | 2019-01-24T00:36:37 | 153,702,341 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,118 | py | scouting.py | #!/usr/bin/python
#Usage: python this_file scouting_data_file
"""
To-Do:
- Keep Track of Each Team's Autonomous Abiltiy, Issues, and Notes
"""
import sys
import numpy
import operator
from decimal import *
import subprocess
#import os
#import errno
from turtle import Turtle
#statistics
averageConeVals = {} #values f... |
5b94a9d2e5d40b96c8477c77d38acc4b9b3dd630 | be8112d14884ce4e50aeb0cdc15cac4e459a04a1 | /backend/eye_detect_recog_final.py | d273ee47c9689cd6e47161abf2fe04b81cf2ab88 | [] | no_license | apalmk/SLAC | b0a348bd7b26e2388dcdc8b89cc5abe389a778c2 | 66a3e9091368f0b5e49a6f4fb5f0f083394d4e39 | refs/heads/master | 2020-12-09T03:05:39.657209 | 2020-01-29T22:46:12 | 2020-01-29T22:46:12 | 233,172,649 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,723 | py | eye_detect_recog_final.py | import cv2
import math
import numpy as np
import time
from keras.models import load_model
# start=time.time()
# imagesloc = "E:\\projectImplementation\\projectFiles\\frames\\nface2_eye"
# eye_cascade = cv2.CascadeClassifier("E:\\projectImplementation\\projectFiles\\eye.xml")
# eye_cascade_right= cv2.CascadeClassifie... |
8e5bb6301b4262f0f6b8788b0c22a6b5a33e679c | 008754238c6b872569ff469bdb54645bb0e90a12 | /euler4.py | 2ceeb888b8d2a8d54c7b5ac67051d7c86c0cda5a | [] | no_license | nigeld3v/projectEuler_python | dcd2be79c7994a7f1d87e8e760892badcbebe049 | ba21a26f79dd7449a02040cffe67b98faf383565 | refs/heads/master | 2020-05-16T21:38:55.075546 | 2019-04-24T21:52:43 | 2019-04-24T21:52:43 | 183,311,798 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 745 | py | euler4.py | #!/usr/bin/env python
""" This doc to accompany Project Euler Problem 4, Completed 190421
- https://projecteuler.net/problem=4
A palindromic number reads the same both ways. The largest palindrome made
from the product of two 2-digit numbers is 9009 = 91 × 99.
Find the largest palindrome made from the product of... |
5f426c04522f62968f862f07b50595e8ec340128 | 1c588e85bcaa270b777ad1d1a71ca86e79027c4b | /djackets/product/views.py | af44315f01f60b80eadde4fe236889348e08cb30 | [] | no_license | d782/django_vueJS_ecommerce | 6f0a01d4a2c48f61486f6cda6759f1da9cae62d9 | 5467b6186f0a78b75f48701ed8c4284f8aadcb5a | refs/heads/master | 2023-07-16T20:56:11.481723 | 2021-08-28T03:33:13 | 2021-08-28T03:33:13 | 400,690,655 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,815 | py | views.py | from django.shortcuts import render
from rest_framework.views import APIView
from rest_framework.response import Response
from .models import Category, Product
from .serializers import ProductSerializer,CategorySerializer
from django.http import Http404
from rest_framework.decorators import api_view
from django.db.mod... |