blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 281 | content_id stringlengths 40 40 | detected_licenses listlengths 0 57 | license_type stringclasses 2
values | repo_name stringlengths 6 116 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 313
values | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 18.2k 668M ⌀ | star_events_count int64 0 102k | fork_events_count int64 0 38.2k | gha_license_id stringclasses 17
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 107
values | src_encoding stringclasses 20
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 4 6.02M | extension stringclasses 78
values | content stringlengths 2 6.02M | authors listlengths 1 1 | author stringlengths 0 175 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c7f70e919cbf31fc8d0beceb8386c655cbb780d7 | b9eecbf0d77a3535d72d57508102ccd1ca311b07 | /HESCIprob3.py | c65142ae40966e5cc1d8b5fa741d04fecf866e05 | [] | no_license | bmk15897/Practice | fb0be0990f553737602468230f760475b19477c1 | 389bad063e664bf71cfd4f7f6ec2546893d4a8e9 | refs/heads/master | 2021-08-16T05:13:50.978586 | 2017-11-19T02:31:36 | 2017-11-19T02:31:36 | 109,554,146 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,898 | py | # str=input()
# size=10**5
#
# dict = {}
# for s in str:
# if s in dict:
# dict[s]+=1
# else:
# dict[s]=1
#
# import operator
# sorted_dict = sorted(dict.items(), key=operator.itemgetter(1))
# sorted_dict.reverse()
#
# keyboard = [[0 for x in range(21)] for y in range(3)]
#
# j=0
# k=0
# cnt = 0... | [
"bmk15897@gmail.com"
] | bmk15897@gmail.com |
a978baec01d1f3a08d63ee49e3005cdf728891a7 | 93a432bd2dc8eb8fee05fb28fd1b74bb122c3916 | /CompanyPython_DailyTest/day_test/test5.py | cb683cf6e0a345a0496e84a54d6c504bc79ba3f3 | [] | no_license | cyx2048/CompanyPython | 9258a6bd24adc3c104419093623e33fee790263a | 14eebae33cc9d74927b20988286aa8baa2bd09b1 | refs/heads/master | 2023-03-31T17:40:40.817326 | 2021-03-30T05:34:55 | 2021-03-30T05:34:55 | 344,019,264 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 813 | py | """
定义至少有两个方法的类:
get string:从控制台输入获取字符串
print string:以大写形式打印字符串。
也请包含简单的测试函数来测试类方法。
"""
"""方法1"""
class test1():
def input(self): #类方法里面必须有self参数
self.i=input("input the string:")
def up(self):
self.j=self.i.upper()
def out(self):
print(self.j)
x=test1()
x.in... | [
"1029633194@qq.com"
] | 1029633194@qq.com |
ae3ba7a38e4a37cd933e19299786aae3b8188cd9 | b534a9609ab5d6be408e36ba7c35d42fc2443719 | /feature_matching/feature_matching.py | b835d591dba2afcea5c4d85846f7793276d3b2e3 | [] | no_license | aeppler/CV_Andreas | 179a6e3b224361f10fcacb9462ae4198ed6cd4a3 | 39b8a162527f2dc712854c7f8e9dd62ed244ad1a | refs/heads/master | 2020-04-07T12:37:04.742985 | 2018-12-06T07:51:31 | 2018-12-06T07:51:31 | 158,374,546 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,626 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on Thu Nov 8 09:20:50 2018
@author: aeppler
"""
import sys
import cv2
import numpy as np
from imutils.object_detection import non_max_suppression
import numpy as np
import pytesseract
import argparse
def caption(name, displayBuf):
font = cv2.FO... | [
"andy@eppleronline.de"
] | andy@eppleronline.de |
fb36cd05b6361a3f9f436df9ce58b2fe61c1a176 | afdb4ab980b78a887677e7ea26aa0cbbc406a38c | /strike.py | 12dcd901cb910e0194e1a3decc7e3a8a11405e80 | [] | no_license | shnikisme/pyhton-codes | c54940d4866a5edce7bdfce387c242132a171f79 | 8cfbd8be5d2ca093c0cf53eccfd0634748a036ae | refs/heads/master | 2020-03-26T19:44:20.508140 | 2018-08-19T07:51:00 | 2018-08-19T07:51:00 | 145,283,392 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 357 | py | T=input()
T=int(T)
i=0
while i<T:
N=input()
N=int(N)
if N%2==0:
P=1
Q=10**(N/2)
print(P,end=' ')
print(Q)
else:
P=1
Q=10**((N-1)/2)
print(P,end=' ')
... | [
"noreply@github.com"
] | noreply@github.com |
a81c0e6a7079d5dd32ce742a9c6bfbf13640748a | 29009c9854996b58f5778c88e42ca92dc192ac47 | /Task3.py | bef92b700b117347aaa95d05bde6b6e5cc741191 | [] | no_license | b-ark/lesson_6 | 58e50a7520bf0fb925e1e33af6f3c6c8678afee3 | 85d463403fbd73a2e96b3fe8fdedbdaea220f755 | refs/heads/master | 2023-05-31T06:38:53.845656 | 2021-06-05T10:46:09 | 2021-06-05T10:46:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 555 | py | # Use a list comprehension to make a list containing tuples (i, j)
# where `i` goes from 1 to 10 and `j` is corresponding to `i` squared.
# первый вариант, сделал его до того как проходил тест
range_list = [x for x in range(1, 11)]
squared_list = [x ** 2 for x in range(1, 11)]
final_list = [(range_list[x], squared_lis... | [
"mvbarkov2@gmail.com"
] | mvbarkov2@gmail.com |
510fd0a5a23b90f6f58ffba283b7d3c732f89837 | e206e3405bcda2464d36a4a14d9c319dcc9d11bb | /library/library_interface.py | 25b74594b51f7e67c43fb4a654dfc878c65b787e | [] | no_license | nstrashevskii/PY111_prac | 75ba02c1b734c6b89cb550b230fce2975cfd5d1b | 167052720212773555f8c24059118117a46dcf04 | refs/heads/master | 2023-02-22T16:09:38.374622 | 2021-01-27T16:45:35 | 2021-01-27T16:45:35 | 322,017,153 | 0 | 0 | null | 2021-01-27T16:45:36 | 2020-12-16T15:04:56 | Python | UTF-8 | Python | false | false | 5,881 | py | import re
from library.library_functions import del_book, library_load_from_json, library_load_to_json, search_book, edit_book
def menu():
print(f'Выберете дествие\n')
print(f'1) Добавить книгу\n')
print(f'2) Удалить книгу\n')
print(f'3) Найти книгу\n')
print(f'4) Редактировать книгу\n')
def men... | [
"strashevskiynn@g,ail.com"
] | strashevskiynn@g,ail.com |
54f47f7b3fcff0c6c915ff9b52268b7569f4ae3e | 1f40e8c6ecd80587b41fde6bc69bda4bef181125 | /LoadFromOracleSaveCSV.py | 5238471457ceb383a82a63b289b862d0eac2e5b7 | [] | no_license | AlexGruPerm/FortsNN | 9b892ec052199c63ef5c11296c98414c90ce7eb3 | d625271de3becc9ba468eba445217a1f04fa9a8d | refs/heads/master | 2021-08-26T04:40:58.607504 | 2017-11-21T15:34:08 | 2017-11-21T15:34:08 | 111,565,039 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,066 | py | import cx_Oracle
import matplotlib.pyplot as plt
print(cx_Oracle.version) #http://www.oracle.com/technetwork/articles/dsl/python-091105.html
con = cx_Oracle.connect('FUT_MTS/FUT_MTS@gdev-pk/MTS')
print(con.version)
cur = con.cursor()
l_sql = 'select row_number() over(order by t.ora_datetime) as x, ' \
't.la... | [
"ugr@bk.ru"
] | ugr@bk.ru |
a79fb69dbccaad3aef9adf2d32588187a602bff5 | 77e1ac1e958e677dc954c4fe889f58df2bdb9a92 | /2-mtime/时光电影id.py | 2ec63ad2de7c91d0638fe21a2d7a716c096936a2 | [] | no_license | MOOCXINGSH/FilmReptile | d1fe96b43333e441658343d7f1142fc6ef4d1dd8 | 4b723effc885731e2df1ac22d24c8e164efaebb0 | refs/heads/master | 2020-05-24T07:14:47.526299 | 2019-05-31T08:39:37 | 2019-05-31T08:39:37 | 187,155,990 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 915 | py | import requests
from bs4 import BeautifulSoup
import Agent
import re
def openWeb():
#修改url
url = "http://www.mtime.com/top/movie/top100_chinese/index-10.html"
headers = {'User-Agent':'Mozilla/5.0 (Macintosh; \Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safar... | [
"noreply@github.com"
] | noreply@github.com |
a439223a06d02e7d8088ceb8471a3751f271d18a | 2e0e549394fefc3e7332170603f0be3b96fcb8f5 | /src/compas_ghpython/artists/lineartist.py | e6f8a82ad85c337d0de61df00022aa80fe98d0ce | [
"MIT"
] | permissive | irfanirw/compas | 02f6f15dc2e20de886faf5d77420fd55f6a03c4e | 41048e71610c3e063e3e9085440b3cba0a00b603 | refs/heads/master | 2022-11-29T18:59:18.344232 | 2020-08-17T19:04:14 | 2020-08-17T19:04:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,093 | py | from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
import compas_ghpython
from compas_ghpython.artists.primitiveartist import PrimitiveArtist
__all__ = ['LineArtist']
class LineArtist(PrimitiveArtist):
"""Artist for drawing lines.
Parameters
--... | [
"vanmelet@ethz.ch"
] | vanmelet@ethz.ch |
2d024da87c14371a4474e848cdf934f3eee9643c | d3cf02f04e235113f4e55b95341c2ca0a48d7e6e | /dissertation_code/cnn_image/metrice_model.py | f269d5d6d7eaa1ed8c237ac0159577c660407c75 | [] | no_license | 19090418G/dissertation_deep_learning | a8c1905a790b149f7e67f716ff64fb22308a2235 | 778a1b822b6d42d2eabd3fd72cfbe27db2c85795 | refs/heads/master | 2022-12-15T15:46:16.580835 | 2020-09-11T17:23:04 | 2020-09-11T17:23:04 | 294,641,515 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,200 | py | import os
import pandas as pd
import numpy as np
from dataset import DataGenerator
from keras.models import load_model
from keras.applications.mobilenet import relu6, DepthwiseConv2D
from sklearn.metrics import roc_auc_score, classification_report, accuracy_score, roc_curve
model = load_model('model.h5', custom_obje... | [
"454212374@qq.com"
] | 454212374@qq.com |
d81cd81ca542814be0d04be87321bfbc309e26f7 | 39d40245e4b4cec16d6d750bf97bfecd790aa381 | /testscrapy/items.py | 79ab3fc3506faf7adf059af7f7407e3e86017d0d | [] | no_license | wangzheng62/testscrapy | 45c6f3fed78f9be65a549539fcbf86ef18a8de38 | 3e3de492ceb0794f9ea511639ec5aa5912d64536 | refs/heads/master | 2020-06-06T07:34:58.501934 | 2019-06-19T07:19:06 | 2019-06-19T07:19:06 | 192,679,317 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,080 | py | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# https://doc.scrapy.org/en/latest/topics/items.html
import scrapy
class TestscrapyItem(scrapy.Item):
# define the fields for your item here like:
# name = scrapy.Field()
pass
#
from scrapy.loader.processo... | [
"363579018@qq.com"
] | 363579018@qq.com |
daa02487a4b856cd89ba75d0a1cee27334110d94 | 4b42d35f9a3192250658225332df286df04514e3 | /stockscreener/alpaca/config.py | 0e27315047660dbf1a36056514728bfd39788eeb | [] | no_license | webclinic017/equity_trading_bot | 63b380b6076666fe392c9175f56eac8a4132bf77 | 231857d5bb60641ad5429605f29b0f24dd968d07 | refs/heads/master | 2023-02-13T03:02:33.934430 | 2021-01-19T22:17:54 | 2021-01-19T22:17:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 347 | py | PAPER_API_KEY = 'PKGAQA9BLKLTEMWJ6QC2'
PAPER_SECRET_KEY = 'kHfgzBMhMwK2SZAjIYUs2f5EW9irw8y8qXoPn9qU'
PAPER_BASE_URL = 'https://paper-api.alpaca.markets'
MARKET_API = 'AKFFMQ91534QD8UC80GZ'
MARKET_SECRET_KEY = 'u3gIMKl5oVRB6UmMxBmxEq08WodSAxzmK1bVlkXo'
MARKET_BASE_URL = 'https://api.alpaca.markets'
ws_url = 'w... | [
"bojrick@gmail.com"
] | bojrick@gmail.com |
6d1d49e1a8481b9d3acab52fb3809e556adfff82 | ee545c7f893115d991d3f7d2c20c9eecf15197a5 | /ComputeLibrary/examples/SConscript | 3bd42250b482e3a842744d24fd7535099022d909 | [
"MIT",
"LicenseRef-scancode-dco-1.1"
] | permissive | nesl/arm-nn-secure-library | 52ed650d63669c6fa0b7977fa6769b6a70aeff7c | 457de96f7feb9a9beed8aa3453514b4a407f9dfc | refs/heads/master | 2022-04-15T17:17:08.562516 | 2020-03-13T23:01:46 | 2020-03-13T23:01:46 | 223,302,939 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,041 | # Copyright (c) 2017 ARM Limited.
#
# SPDX-License-Identifier: MIT
#
# 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 to use, cop... | [
"i.am.renju.liu@gmail.com"
] | i.am.renju.liu@gmail.com | |
2b324e3cef939f47f55816a09454e27a4563ac43 | 5dafc7b7546d484be62610f260615aafa96a7b2a | /src/bepasty/tests/screenshots.py | 9e0cca524e3f89e961c5bc1ea59c418951359063 | [
"BSD-2-Clause"
] | permissive | Digital-Botschafter-und-mehr/bepasty-server | 0d989d5d60bf254cd62617189e06f995901bb96d | 0bc3e8f1976e4522f08aee76c1f757bb66b19941 | refs/heads/master | 2023-02-28T09:15:05.070823 | 2021-02-05T16:26:47 | 2021-02-05T16:26:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,729 | py | from selenium.webdriver import Firefox
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions
from selenium.webdriver.support.ui import WebDriverWait
from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import ElementNotInteractabl... | [
"hirofumi@mail.parknet.co.jp"
] | hirofumi@mail.parknet.co.jp |
1cd28de78638902637db44ea6be07c7c2d9e77a1 | 22953bd63194fa379901388081f6d7d5400d9dab | /participar/admin.py | c8bd3942493e88e4c96a3ad8766a609d16d6c9f6 | [
"MIT"
] | permissive | leugimkm/torneosPokemonGO | 4e0db3b6743b737a981a0db38895dc75ceb8c6ac | 2457f4eb7582cf7c7578d392f0e29f2650ec3aa2 | refs/heads/master | 2023-06-18T20:01:20.324995 | 2021-07-23T16:26:36 | 2021-07-23T16:26:36 | 171,986,435 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 127 | py | from django.contrib import admin
from .models import Participar
# Register your models here.
admin.site.register(Participar) | [
"noreply@github.com"
] | noreply@github.com |
fd304391159224f16dfd6bf6c415f5bd31d3739d | ed53315e303c7a593ff64dba84011e776c41a672 | /Summitive_Veer.py | 5db609a8f80a2bdb84e0da954be081209c4805ed | [] | no_license | VeerAgrawal/U1_CC3_VeerAgrawal | 195fe433eccdebdbcc969b4310bed4c1dd9047a0 | e9ae8108c18122f9de2c518ada82778c03fd57d4 | refs/heads/master | 2020-08-01T16:11:44.741500 | 2019-10-08T05:51:19 | 2019-10-08T05:51:19 | 211,042,848 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,843 | py | from bs4 import BeautifulSoup
import requests as req
url = req.get("https://www.statsheep.com/p/Top-Video-Views?page=1")
source = url.content
soup = BeautifulSoup(source, 'lxml')
links = soup.find_all("a")
page = []
page2 = []
page3 = []
#Change dataQuantity for the number of youtubers(max = 100)
#The more the dataQ... | [
"agrawalv@asbindia.org"
] | agrawalv@asbindia.org |
426d85f1ce723195a925a195736d903d53875bad | 2351ca6879ef3c0611c39d026ffeb53ab3e0eca1 | /sample5.py | f4163f6ee994c3bc62f1425ddd6f60852c0d9fcd | [] | no_license | swaroop1995/basics | bce8520848d24ac824b1eba69c8d3a9d0703d1df | fae1fc698d1a251763e2c64dc3f216746b13eb77 | refs/heads/master | 2020-04-11T09:18:54.775786 | 2018-12-13T17:35:22 | 2018-12-13T17:35:22 | 161,673,235 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 69 | py | from modules import sample as sa
print(sa.a)
sa.fun1()
sa.fun2()
| [
"noreply@github.com"
] | noreply@github.com |
c9f7b1e389e6caf4952c016a6ee0e8fd7e1c3021 | ec39196e2688365a2f9ce0ac359e0b989cf67358 | /mypackage/__init__.py | 7d51464f02f4460db584fa399ec36adf73b3069a | [] | no_license | gzy0718/vip10test | 6470df1524c1cc13d8ea80f92e4492b69b43f018 | e3fc924205e0dd462e9403cf21c96d2872453d0f | refs/heads/main | 2023-06-14T20:48:48.277079 | 2021-05-17T16:59:34 | 2021-05-17T16:59:34 | 358,773,180 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 27 | py | __all__ = ['test1','test2'] | [
"18612863544@163.com"
] | 18612863544@163.com |
b124149598b75875c924a95d429ff80af9708bdd | c9bae3b822cf8c098e656486d455d88646d1712b | /starnavi_task/settings.py | db077ea080b9e03e959ce8620862d8c3de3557a8 | [] | no_license | sergiy-chumachenko/starnavi | f9967eeeec8803b58ecb0bdab28063431afc9cc7 | 1aa901ba42be1ef4322c9766ec58edecca07ce74 | refs/heads/master | 2022-12-10T20:25:46.923932 | 2020-07-18T17:22:07 | 2020-07-18T17:22:07 | 172,897,429 | 2 | 0 | null | 2022-12-08T01:39:44 | 2019-02-27T10:49:10 | Python | UTF-8 | Python | false | false | 5,260 | py | """
Django settings for starnavi_task project.
Generated by 'django-admin startproject' using Django 2.1.7.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
import... | [
"chumachenko.sergiy@gmail.com"
] | chumachenko.sergiy@gmail.com |
ea3d094af244feeae51dab0940abc122c67c80f2 | 51290cfa282166bc06f4fbdcce050bbea2183a67 | /dragracer.py | 8237c9778b9c924293fc4433ec83aff23ac3ad43 | [] | no_license | tweirtx/freshmancs-ev3-python | d6e7cc88c0a18f9b66da57f5248c544ddfe810e8 | 5142885e93407372efff6ad6e0135743ba23cbed | refs/heads/master | 2021-03-24T09:19:49.308468 | 2018-04-29T17:31:15 | 2018-04-29T17:31:15 | 116,987,981 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 748 | py | print("Initializing...")
from ev3dev import ev3
from time import sleep
motor1 = ev3.LargeMotor('outA')
motor2 = ev3.LargeMotor('outC')
motor3 = ev3.LargeMotor('outD')
print("Initialization complete!")
input("Press enter to start")
ramp_up_speed = 300
motor1.run_forever(speed_sp=ramp_up_speed)
motor2.run_forever(sp... | [
"tweirtx@gmail.com"
] | tweirtx@gmail.com |
136b2f9e3e17bc561e83721532cb29926c62d2d5 | 5d657a3dea1fbf2569e6ecc814baf2fddf6df1f6 | /rnn.py | a68964ea1d9435f5a000339cfdf829e005bbbad6 | [
"MIT"
] | permissive | freesia-sherry/neuralkanren | 8a8b42b1a96f6ee75e5e2c3ffaaabdf38da24556 | 7684e4191e22adc236f6d67f742893b7788417c8 | refs/heads/master | 2021-10-09T15:06:12.674309 | 2018-12-30T03:36:29 | 2018-12-30T03:36:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,309 | py | """For using a Recurrent Neural Network (RNN) to guide miniKanren"""
from __future__ import print_function
import sys
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence
from collections import... | [
"lisa@polychart.com"
] | lisa@polychart.com |
e0b43fafb06539c14b29c5d552aae26cbe37619b | fdb430060b7bc14c99afb426cf7495b14a286d6e | /Seccion 5- Ejercicios Simples/MetroAPieYPulgada.py | 9a189725af24323306d26a7dffa34430c28ce6bf | [] | no_license | Dany0321/Taller-Modelos-de-Programacion-ll | 947c5e5ea9c8a4b866b3c28199b0807cde04f214 | bd12d292c2a425f9ae1660ba8ebc73fed78624cb | refs/heads/master | 2021-01-15T02:31:48.736690 | 2020-02-24T21:40:46 | 2020-02-24T21:40:46 | 242,849,039 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 194 | py | m = input("Ingrese una distancia en metros: ")
m = float(m)
#print(m)
i = 39.27*m
#print(i)
print ("La distancia en pulgadas es: "+ str(i))
f = i/12
print ("La distancia en pies es: "+str(f))
| [
"noreply@github.com"
] | noreply@github.com |
7b862d7e6c412b675d05052a831d4097628b6fef | de907f4116cb8d0e4994061c10e69e7317277abd | /vgg16.py | 2c8d4cef65fed6e2846af147049904e6b13b495f | [
"MIT"
] | permissive | its-dron/AppraisalNet | c149d50c54290a70a4b9fa709b0bf79e4c37edfd | 9c158dfeaae5979c15385b3ef2d3b412e2c9a536 | refs/heads/master | 2021-06-15T19:55:08.496237 | 2017-04-30T21:43:58 | 2017-04-30T21:43:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,515 | py | # Based on code writted by Davi Frossard, 2016
import tensorflow as tf
import numpy as np
import layers
FLAGS = tf.app.flags.FLAGS
class vgg16:
'''
VGG16 Model with ImageNet pretrained weight loader method
Weights can be downloaded from:
https://www.cs.toronto.edu/~frossard/vgg16/vgg16_weights.npz
... | [
"bnp117@gmail.com"
] | bnp117@gmail.com |
e76a57551d81a6271b7c5fa8396a47b474218e4a | 432c55838cad26bb6233a799e35e9187a3451434 | /q2_diversity/tests/test_beta_correlation.py | f511afbe0c9ea946466122955ad84cfb567a9924 | [
"BSD-3-Clause"
] | permissive | wasade/q2-diversity | 5a46d7a34bfae05d26fd285f2bfd180e55d58f2a | cdcf24c551a8ca4246dce658fd6b608b174e224d | refs/heads/master | 2023-06-27T19:16:48.985517 | 2018-08-31T21:56:10 | 2018-08-31T21:56:10 | 150,510,254 | 0 | 0 | BSD-3-Clause | 2018-09-27T01:19:35 | 2018-09-27T01:19:35 | null | UTF-8 | Python | false | false | 1,744 | py | # ----------------------------------------------------------------------------
# Copyright (c) 2016-2018, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | [
"matthewrdillon@gmail.com"
] | matthewrdillon@gmail.com |
b16cb1361b4001f60a90b6454da97882fb58d05b | 6974c27606cb57a0dba69cefa9a5d2ab719fbbe9 | /record_store/record_store_client.py | 67903f1e7ca87d34856477cf5b32dfbdf5727fc6 | [] | no_license | jhassler1031/record-store | cbe387ef484aa03e7cb57c10e56f27a2846301d3 | 5d1a9cad379f8b96e38ff48daea4aeca398b5c47 | refs/heads/master | 2020-03-20T06:29:14.300360 | 2018-06-18T18:31:33 | 2018-06-18T18:31:33 | 137,250,376 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,801 | py | #API CLI client for record store
import requests
url = "http://localhost:8000/"
#Start Functions
# Login/logout ========================================================================
def login(url):
username = input("Username: ")
password = input("Password: ")
auth_token = requests.post(url + "auth/tok... | [
"jhassler1031@gmail.com"
] | jhassler1031@gmail.com |
f59b3577b280e77e01de5f4b1a661591fa9d69c2 | 8d23f941ade6e18df9094760c4e3ad5676e96fef | /advanced/05/05pymsql.py | f0982c9fb3bf720ae5266437de8f47d03b214b74 | [] | no_license | asdwsxzc123/python | 95c7b6ed39d47a48e5a2630a3f221c20a8347764 | b2422a7c6b62d4bfa9d1488a6dff322a57ba4c48 | refs/heads/master | 2020-04-03T14:34:06.299282 | 2019-02-05T13:14:16 | 2019-02-05T13:14:16 | 155,326,540 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 547 | py | from pymysql import connect
# 链接数据库
conn = connect(host='172.16.20.46', port=3306, user='root', password='123456', database='jing_dong', charset='utf8')
# 获取cursor对象
cs1 = conn.cursor()
# sql注入
# # 执行select语句
# cs1.execute('select * from goods;')
# # print(row)
# for row in cs1.fetchall():
# print(row)
# 插入数据
... | [
"sbfgeyygy@126.com"
] | sbfgeyygy@126.com |
ddbedb9961f05627dcdc40f9668733b593051ada | e7190289cea8006fb99a54347a57439cdd7047b8 | /stock/industry/tonghuashun_industry-master/industry_current.py | 3100023a4c07be3e3a7b23b8aae3a3b4853d9479 | [] | no_license | hong0396/start_up_git | 282fe3845ad4c81ee7b23785a73052e3a5749fea | a6f9fa2da126382577e05869ff5a2fc98e29a7fb | refs/heads/master | 2021-07-09T06:16:16.955217 | 2019-03-30T13:43:13 | 2019-03-30T13:43:13 | 119,171,188 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,030 | py | #coding:utf-8
from requests.exceptions import RequestException
from bs4 import BeautifulSoup
from selenium import webdriver
from sqlalchemy import create_engine
import datetime
import pymysql
import requests
import pandas as pd
import time
import random
import re
#获取动态cookies
def get_cookie():
options = webdri... | [
"hong0396@126.com"
] | hong0396@126.com |
702859cce44fbf4a013b5a5c0b706465f139db70 | 2ed3677fe58f110a025228679d2db7dc751c7f1c | /faq/models.py | db5870414156f95afee6a9b3c22661b676201172 | [] | permissive | Azelphur-Servers/game.azelphur.com | 15916298cd81976a9ebcff811734de3d2c1daa41 | d2410cb7b044c980d56151b9ce19442433fd8ac8 | refs/heads/master | 2022-12-10T20:07:15.490399 | 2018-01-31T01:52:27 | 2018-01-31T01:52:27 | 49,220,601 | 1 | 5 | BSD-3-Clause | 2022-11-22T02:14:17 | 2016-01-07T17:50:50 | HTML | UTF-8 | Python | false | false | 447 | py | from django.db import models
from markdown import markdown
class FAQ(models.Model):
title = models.CharField(max_length=200)
body = models.TextField()
body_html = models.TextField(
editable=False,
blank=True,
null=True
)
def __unicode__(self):
return self.title
... | [
"support@azelphur.com"
] | support@azelphur.com |
f0eb93788821d074784c29b88e667723b67a6989 | 10d17864a685c025bb77959545f74b797f1d6077 | /capitulo 02/02.22.py | bbe2a8217430cbaaf8609a9daa1183c8464aeb0a | [] | no_license | jcicerof/IntroducaoPython | 02178d2dfcaa014587edbd3090c517089ccef7c2 | 02e619c7c17e74acdc3268fbfae9ab624a3601dd | refs/heads/master | 2020-04-24T18:12:21.422079 | 2019-02-23T05:14:43 | 2019-02-23T05:14:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 632 | py | ##############################################################################
# Parte do livro Introdução à Programação com Python
# Autor: Nilo Ney Coutinho Menezes
# Editora Novatec (c) 2010-2019
# Primeira edição - Novembro/2010 - ISBN 978-85-7522-250-8
# Segunda edição - Junho/2014 - ISBN 978-85-7522-408-3
# Terce... | [
"jose.cicero@gmail.com"
] | jose.cicero@gmail.com |
1b185f68bd117dbd36f56f53bb64319b0b1072cf | f8580d2c963b6a3c34e918e0743d0a503a9584bd | /unittests/test_dcDrawLists.py | f72721a02be41c67ddfde98034ae0e79396d6ec2 | [] | no_license | pypy/wxpython-cffi | f59c3faeed26e6a26d0c87f4f659f93e5366af28 | 877b7e6c1b5880517456f1960db370e4bb7f5c90 | refs/heads/master | 2023-07-08T21:13:22.765786 | 2016-12-02T22:10:45 | 2016-12-02T22:10:45 | 397,124,697 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,196 | py | import imp_unittest, unittest
import wtc
import wx
import random
try:
import numpy as np
haveNumpy = True
except ImportError:
haveNumpy = False
#---------------------------------------------------------------------------
w = 600
h = 400
num = 500
colornames = ["BLACK",
"BLUE",
"BLUE... | [
"wayedt@gmail.com"
] | wayedt@gmail.com |
782748f07fbd02bf69c854b3f5d825b6bc541b6e | 430cde03baf12c800122925640621e7f27fff43d | /components/equippable.py | 48d8ff43b9ad31b14eb70c9917be57403cf53574 | [] | no_license | Shoes01/7DRL-2019 | 754cf1e425e4b114a67d943e1d24e86f6923c2e0 | 3a5b8352f0e924696585bf7c1e16fb89ad671695 | refs/heads/master | 2020-04-26T20:01:42.043695 | 2019-03-09T18:55:57 | 2019-03-09T18:55:57 | 173,795,254 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,845 | py | def example_profile():
return {
'ATK': {
'ATK': 0.0,
'DEF': 0.0,
'MAG': 0.0,
'RES': 0.0,
'SPD': 0.0,
'HP' : 0.0
},
'DEF': {
'ATK... | [
"0jason.gilbert@gmail.com"
] | 0jason.gilbert@gmail.com |
4639ef7defd68902fe0f0066714d7f4650e09881 | 9e6f26036eab72601b0ce1a29786cb88ba9370ab | /fetch_api/request/coba_request/apps.py | c8142727c1c0ab35f6e7cc2f8d37f747cea97ea2 | [] | no_license | adamfahmil96/rest_api_django | f15af541898208f804fc5e9b43c9a5707daefd4b | 5644f83dfa4e13e83c421016a7855084f900f170 | refs/heads/master | 2022-12-11T06:07:17.430506 | 2020-10-19T14:37:33 | 2020-10-19T14:37:33 | 224,957,114 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 98 | py | from django.apps import AppConfig
class CobaRequestConfig(AppConfig):
name = 'coba_request'
| [
"adamfahmil020@gmail.com"
] | adamfahmil020@gmail.com |
8d845742a07fa0f49373360b28b2465c7c513850 | 76de11180ad9efb39b1939c6ecd8c4c474b9674d | /punto2.py | f70993cc41f4550bc6969360b8b006fe6c4315fe | [] | no_license | ray530/Tarea2MetodosComp | a332b028325cfa47d1a84f186d541e9e30e74165 | 19f315c14262961e5614c86711455e0674839866 | refs/heads/main | 2023-03-30T17:23:40.837379 | 2021-04-07T03:42:46 | 2021-04-07T03:42:46 | 346,382,865 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,078 | py | import matplotlib.pyplot as plt
import numpy as np
from tqdm import tqdm
from mpl_toolkits.mplot3d import axes3d
r1 = []
def CreateSphere(Npoints, R):
X = []
Y = []
Z = []
r = 0.
theta = 0.
phi = 0.
for i in range(Npoints):
... | [
"noreply@github.com"
] | noreply@github.com |
f3236cc72ea946e09fc74a24675c576e532a1711 | a66c5eade61d7ffce9bb0e446ac2dc39526b7cd1 | /KlasifikacijaNaDokumenti/tf-idf_kolkvium2018.py | b963c3a3c784c5e74d378d9eb0b168438f0fbc10 | [] | no_license | Tolgi/SZN | b5db947eaef57c4457ce0ec9e666d2a2a63a3594 | 908c695964f58d80b6977f202f55b56894e4d033 | refs/heads/master | 2020-04-28T13:35:19.274502 | 2019-03-12T23:15:47 | 2019-03-12T23:15:47 | 175,310,121 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,118 | py | # coding: utf-8
# In[29]:
train_data=[
("""What Are We Searching for on Mars?
Martians terrified me growing up. I remember watching the 1996 movie Mars Attacks! and fearing that the Red Planet harbored hostile alien neighbors. Though I was only 6 at the time, I was convinced life on Mars meant little green men wield... | [
"vvstojanova@gmail.com"
] | vvstojanova@gmail.com |
2add4c73c5a93b903dfff4143f161f491da2c38d | 680234e0959cbe3af5b55d03ab70b00b4bc03e81 | /todo_list/models.py | c13d6ef94e516157e7260ccf6e2ac17c59fba551 | [
"MIT"
] | permissive | rafathossain/Todo_Web_Application | 5dab4baa9bb414ee14c16be009ac452f60c203b3 | 38b893e4720fdab6705374bfa1831bc21b76a09d | refs/heads/master | 2022-05-27T01:19:31.136871 | 2022-04-30T06:10:49 | 2022-04-30T06:10:49 | 201,891,277 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 227 | py | from django.db import models
# Create your models here.
class TODO(models.Model):
text = models.CharField(max_length=40)
complete = models.BooleanField(default=False)
def __str__(self):
return self.text
| [
"rafathossain96@gmail.com"
] | rafathossain96@gmail.com |
ad2108a5bc4185f0afbe77fce4eb630667b8cf49 | 152825e65e8cf9a9a7a3f3be18e49cdb3355dfb6 | /code_liecn/ultrasound.py | 70b5cb0a88cbdf03129060082294beb535c8c437 | [] | no_license | oxthdox/moral | db4f36eeb6927672b25d5424c38e375239ff9653 | 049ecfc322a00f6f9732a3387b4f81c0b41fd104 | refs/heads/master | 2020-03-18T00:17:37.111395 | 2018-05-20T08:53:34 | 2018-05-20T08:53:34 | 134,086,799 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 656 | py | #! /usr/bin/python
# -*- coding:utf-8 -*-
import RPi.GPIO as GPIO
import time
Trig_Pin =20
Echo_Pin =21
GPIO.setmode(GPIO.BCM)
GPIO.setup(Trig_Pin, GPIO.OUT, initial = GPIO.LOW)
GPIO.setup(Echo_Pin, GPIO.IN)
print ('test')
time.sleep(2)
def checkdist():
GPIO.output(Trig_Pin, GPIO.HIGH)
time.sleep(0.00015)
... | [
"noreply@github.com"
] | noreply@github.com |
2de17e6ec5cb7e0e21df9ed21c32a934c7112429 | 959a91be355f8cf641c7eb32992acec60d46bba9 | /video/videocontroller.py | d0cff085a49c42a035774c52a4be755a4839c2f4 | [
"MIT"
] | permissive | SuborbitalPigeon/fyp | 4061dbaade324a4c8abcedad88ca5a08665db186 | dd589f4e32d48548d331f56a257948d424328229 | refs/heads/master | 2021-01-10T18:32:07.774089 | 2019-06-18T22:15:15 | 2019-06-18T22:24:36 | 139,327,117 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 824 | py | FILE_PATTERN = "images/image%05d.png"
import cv2
class VideoController(object):
def __init__(self):
super().__init__()
self._cap = cv2.VideoCapture(FILE_PATTERN)
self._paused = True
ret, frame = self._cap.read()
self._saved_frame = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
... | [
"bruce@bcowan.me.uk"
] | bruce@bcowan.me.uk |
d44f3f5615c0b6bc2247a055da2a4883e8b12e51 | 4ccbf3588c6bcd5d21e9df52358c871a9dcab7aa | /test/apis/grpc/iris-classifier-sklearn/test_proto/iris_classifier_pb2_grpc.py | d321782257a90249ab5d64a8eef15554e4853991 | [
"Apache-2.0"
] | permissive | Dana7k/cortex | 4ea92b6d27f31116cf5cd982e0a7722626ed5215 | 6ca17086cf7019d2ba8e233f3beb5ab6e1ab073f | refs/heads/master | 2023-05-10T23:43:59.174627 | 2021-05-22T22:14:49 | 2021-05-22T22:14:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,475 | py | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
import iris_classifier_pb2 as iris__classifier__pb2
class HandlerStub(object):
"""Missing associated documentation comment in .proto file."""
def __in... | [
"noreply@github.com"
] | noreply@github.com |
1062b147c6fb2ccb653f8cf9c85961d730859c9f | d2986842693c56e99d5139f3e998422a414e3b0f | /mend/generators/template.py | 1cb1345eea001e39e27aac6e35273ad0fd9f0e3b | [
"MIT"
] | permissive | jessemyers/mend | caf92c6c7c78ccd04d050dd442ecffeb4d26e989 | 5c071e65c0ece958dd3a0a3e29ad81087f377cc7 | refs/heads/main | 2023-06-20T03:55:26.057364 | 2021-07-08T00:29:50 | 2021-07-08T00:31:44 | 383,285,700 | 0 | 0 | MIT | 2021-07-08T00:24:09 | 2021-07-05T23:21:40 | Python | UTF-8 | Python | false | false | 864 | py | from dataclasses import dataclass, field
from typing import Any
from jinja2 import BaseLoader, Environment, StrictUndefined
from mend.protocols import Generator, Tree
from mend.templates import TemplateTree
@dataclass(frozen=True)
class TemplateGenerator(Generator):
"""
Generate from templates.
"""
... | [
"jesse.myers@gmail.com"
] | jesse.myers@gmail.com |
a261886aca07d88d6966966422b1150391eadd32 | 7cffa2f4a8fc2271289ea4b902fb2fb8c3a9e076 | /iris.py | 5634ce6b62d42d41bf6942c518d4a31f01f349e5 | [] | no_license | Alisha-Paul/IrisDataAnalysis | 8c07aaca05ea728085348fa1a528d20eeb8e0004 | 46c7defe160aa8c16e16f2106f701e6296a88f24 | refs/heads/master | 2021-09-09T18:00:30.098817 | 2018-03-18T20:43:57 | 2018-03-18T20:43:57 | 124,790,632 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 514 | py | from sklearn import datasets
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from pandas.plotting import scatter_matrix
plt.style.use('ggplot')
iris = datasets.load_iris()
#print(type(iris))
#print(iris.keys())
#print(type(iris.data), type(iris.target))
#print(iris.data.shape)
#print... | [
"noreply@github.com"
] | noreply@github.com |
a1b87bd771986de8c4ca5699dd616ad53ea93522 | bb65416ca58582b8d0c67926868ef26c65dbd44d | /queryIndex.py | b983d64007d364fd879d544f993d5d8c49520082 | [] | no_license | yamini16/Inverted-Index | d590135b7b2e2a2f2de2f89d275b3400d71a64f2 | 73312b46232f6523578bb47bdef478508a86c8c3 | refs/heads/master | 2020-12-24T06:51:32.229903 | 2016-06-08T05:11:18 | 2016-06-08T05:11:18 | 60,670,010 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,633 | py | '''
Author: Yamini Joshi
'''
#!/usr/bin/env python
import sys
import re
from porterStemmer import PorterStemmer
import copy
from infixtopostfix import Stack, infixToPostfix
from collections import defaultdict
import time
porter=PorterStemmer()
class QueryIndex:
def __init__(self):
self.index={}
... | [
"yamini.1691@gmail.com"
] | yamini.1691@gmail.com |
098ae90ce313fee02732d80a34711e14978b0f72 | ba357ee9e7e037d7ff37288cd1b63dbdb421c555 | /papers/word2vec.py | fd268fd08d3b426f3c8320343c8e88b210038610 | [] | no_license | 43reyerhrstj/nlp_store | 9189ab88dc95b0019b0673269c4a18d5c48c8033 | e41b10ee42eb435e665abde4c62d13f5f3c10c5c | refs/heads/master | 2023-05-12T00:23:15.960901 | 2021-05-24T03:03:40 | 2021-05-24T03:03:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 24,636 | py | """
> 论文标题:Efficient Estimation of Word Representations in Vector Space
> 论文链接:https://arxiv.org/pdf/1301.3781.pdf
word2vec的复现,前向传播与反向传播都是使用的tensorflow2
可参考https://zhuanlan.zhihu.com/p/330583437
本文实现了:
1、CBOW与SG两种结构
2、huffman树与负采样两种加速方式
3、将huffman树压缩为数组
训练:SGD,考虑到每个样本、每个标签在huffman树上的编码不同,所以每次只训练了一个样本(可以通过... | [
"huilin.xu@ifchange.com"
] | huilin.xu@ifchange.com |
c444b785879294ca96cc74283fcd59db158fba19 | 3c4400efa431dbce85fea0d783d0b28a91b09cf3 | /Chapter13Assignment/src/person.py | ea1caf5a16319f1e2c29ff55321f3b609246126a | [] | no_license | SpoonsTheUtensil/College-Python-Academic-Projects | 1f7f40dd1795f84ebf242821638b1e83733c3790 | e60012932b9b71d11229d719dff97d74cbc5a46a | refs/heads/master | 2022-12-23T23:52:59.669745 | 2020-09-22T00:03:10 | 2020-09-22T00:03:10 | 297,488,412 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 717 | py | '''
Created on Nov 11, 2019
@author: 16368
'''
class person:
def __init__(self, firstname, lastname, dob, address1, city, personState, zip):
self._firstname = firstname
self._lastname = lastname
self._dob = dob
self._address1 = address1
self._city = city
... | [
"noreply@github.com"
] | noreply@github.com |
89c85c2b92a03f11a867462b3566a17e3f627f9f | 5f1d80030d0bd82053cefb584ee3ec74c1c41d9e | /Softwares/ladder_maker_allOS_107a/program/hexmaker.py | f80ab7006485ac494d60239eca53aa5a567ff773 | [] | no_license | yisea123/OpenPLC-1 | 0f2f373631b4c593e77f592a3d62b5d9db79b64d | 3f5c25144be391417024ed40d5e985f35a87e4e8 | refs/heads/master | 2020-06-29T17:01:35.798313 | 2016-04-22T12:10:36 | 2016-04-22T12:10:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,324 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Waltech Ladder Maker is distributed under the MIT License.
Copyright (c) 2014 Karl Walter. karl (at) waltech.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to de... | [
"fossee@fossee-Dell.(none)"
] | fossee@fossee-Dell.(none) |
98bb03bffd0925bfa26da5513acfa31ed0e0ab70 | 7876c9a143cd255b77114aeada4c8eed32bb5794 | /visualize.py | cd0c58fe33a1cfa8883b2330b1ec823be3a43098 | [] | no_license | mjdistributed/traffic | 8b5ff1a51177fa045c7e36da9de36af127e5e1d4 | 7e0b351a31e806052629b2ae45efc7a9cfe4c1b4 | refs/heads/master | 2021-10-06T13:23:49.011316 | 2013-07-28T02:04:15 | 2013-07-28T02:04:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,997 | py | class Visualize:
def draw(self, traffic_graph, square_size, open_file = None):
mat = [[] for i in range(square_size+1)]
for i in range(square_size + 1):
for j in range(square_size + 1):
mat[i].append("")
for car in traffic_graph.cars:
row = 0
column = 0
if(get_orientation(car.road_segment) == ... | [
"mmjbot@gmail.com"
] | mmjbot@gmail.com |
ff8606dfb3d8cd23838a9482ff0fc9e21357326e | aa19504ce32774080f22a45168330070c0c99d1e | /KNN_imdb.py | a3ccc25adfa22255744862a41c3f7e08e61add60 | [] | no_license | PUlanowski/Python_Machine_Learning | 14cebf35a9978fae3a6c9848a3bc7b35ae78eddd | 058b96cf74b2354382ea118dee75af2e84d6e014 | refs/heads/main | 2023-03-31T16:00:16.982192 | 2021-04-08T20:02:39 | 2021-04-08T20:02:39 | 356,033,140 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,989 | py | # -*- coding: utf-8 -*-
"""
Created on Wed Mar 25 19:11:59 2020
@author: pit
"""
import numpy as np
import pandas as pd
file = 'D:\MachineLearningPandaIT\Materials\imdb.csv'
###############################################################################
def data_preproc(file):
try:
df = pd.... | [
"noreply@github.com"
] | noreply@github.com |
9061a8446b430d608a4cab7867f06179ed62a610 | 65f5a6e6455cc76558dfcc95a9b2a42aeb3f4205 | /add_contextual_info.py | d525a56fa2fb24b5f5497ae7a2d20d022a748ab8 | [
"MIT"
] | permissive | robertdstein/millipede_parser | af84b3bd650215e09d200bff67fea11cc52cd031 | 7f3ad22aea3eca6385e55fd084ce43b2d7000f92 | refs/heads/master | 2020-08-12T19:12:59.643359 | 2020-01-06T16:01:40 | 2020-01-06T16:01:40 | 214,826,592 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 6,639 | py | import pickle
import os
import numpy as np
from astropy.io import fits
from astropy.time import Time
import argparse
from parse_archival_scan import get_v0_output_dir
from contextual_info import archival_data
import healpy as hp
import logging
import requests
def extract_az_zen(nside, index):
return hp.pix2ang(nsi... | [
"robert.stein@desy.de"
] | robert.stein@desy.de |
29e2a906697315b14f561d3c31d7b5fd877e97ac | eeaecb14db87b1c80cd988a7cfad0d2e3ace3660 | /cases/Web_API.py | 5cd82a90111cab610b6dbb302411a2596d06cf90 | [] | no_license | hongweifuture/HwUnittestFrameworkPy2 | 66960bb7b5426c9c36640c92ae43c43765be338c | 53b4e62f5ee709e68c29bd142cc03e66ab1597d2 | refs/heads/master | 2020-04-02T12:49:03.959523 | 2018-10-24T08:08:38 | 2018-10-24T08:08:38 | 154,453,166 | 3 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,167 | py | #!/usr/bin/python
# coding=utf-8
# Created by zhaohongwei on 2016-11-03
# Blog: http://blog.csdn.net/z_johnny
import unittest
class WebTest(unittest.TestCase):
'''Web Test'''
def setUp(self):
print 'one'
def tearDown(self):
'''If setUp() succeeded, the tearDown() method will be run whethe... | [
"noreply@github.com"
] | noreply@github.com |
6a598ec973d39b8857bf8e4b3513591117312264 | c036befbd9a4b81c0f082273dd0eb007e7f9582d | /dort-core/util/ints.py | fae6a3dcebe1b48a086026ebb082e01903b1f5c2 | [
"Apache-2.0"
] | permissive | Dortchain/dort-blockchian | 889f52f36dcdeffe0f852b413cdd32879741462f | 14f16e321a60f9d70f849f58e4e9964fa337a084 | refs/heads/main | 2023-06-16T01:31:30.718415 | 2021-07-11T03:03:12 | 2021-07-11T03:03:12 | 384,694,718 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,995 | py | from typing import Any, BinaryIO
from Dort.util.struct_stream import StructStream
class int8(StructStream):
PACK = "!b"
class uint8(StructStream):
PACK = "!B"
class int16(StructStream):
PACK = "!h"
class uint16(StructStream):
PACK = "!H"
class int32(StructStream):
PACK = "!l"
class uint... | [
"welllinks@outlook.com"
] | welllinks@outlook.com |
2c670e2c618585fe2c07abb53840938ec793387c | 6c96da96e1ae673166ddfa6ccd4d278c838aea87 | /src/StudentNode.py | 645133ba1094d18a5e31a7ed1ffd300d17eb4b20 | [
"MIT"
] | permissive | sam-xif/Schedule-IP | 06c925c727e0fe263d786ab9229630e256e0399b | c0459cd295a765991e5d35613cb7ea938a2bbb9c | refs/heads/master | 2021-10-23T20:22:05.750577 | 2019-02-26T02:57:31 | 2019-02-26T02:57:31 | 103,140,770 | 2 | 0 | null | 2019-02-26T02:55:46 | 2017-09-11T13:41:42 | Python | UTF-8 | Python | false | false | 221 | py | class StudentNode(object):
"""description of class"""
def __init__(self, requestObj, studentObj, period):
self.requestObj = requestObj
self.studentObj = studentObj
self.period = period
| [
"s.xifaras999@gmail.com"
] | s.xifaras999@gmail.com |
469fae8f801c56420d304c6ed7018880246cc6c6 | c2d6f7b6d07b837a25faaf6e42dd1f374cb0988e | /manage.py | 0ede792a5865d4514138701b6c83bbb642abcbda | [
"LicenseRef-scancode-other-permissive",
"MIT"
] | permissive | cheruden/My-Blog | ea4932fbe2388e2379baffa899a60a890b5dace0 | 7f47c70b30c12716db8a5b7398b3a29952be14be | refs/heads/master | 2023-06-05T04:42:05.657945 | 2021-06-21T11:49:24 | 2021-06-21T11:49:24 | 378,090,040 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 704 | py | from app import create_app,db
from flask_script import Manager,Server
from app.models import Blogs,User,Role
from flask_migrate import Migrate, MigrateCommand
# Creating app instance
app = create_app('production')
# app = create_app('development')
manager = Manager(app)
manager.add_command('server',Server)
@manage... | [
"cheruden25@gmail.com"
] | cheruden25@gmail.com |
cef5808654534a15ef0a4e3ba135226e3804acb4 | 3e4a80ba93eca11365e2016ceb117f55cc5be3e7 | /oldspeak/console/__init__.py | 60dd3c6dc6960edb3e1b13cbe8c13a41322c3c82 | [] | no_license | 0rbitAeolian/OldSpeak | 37c8264d26b2b905c2fc90d8e7d67a22fa4500f3 | 56f396ad36ecbcd099ac3d6d5ae82c63d0979343 | refs/heads/master | 2021-05-01T13:54:39.710161 | 2017-02-22T02:56:30 | 2017-02-22T02:56:30 | 79,626,893 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 154 | py | # -*- coding: utf-8 -*-
"""
oldspeak.console
this package is a namespace for the command-line handlers.
check out the main.py file for more details
"""
| [
"d1551d3n7@protonmail.ch"
] | d1551d3n7@protonmail.ch |
9f64a365bde9696c6c69e3407535f92e61ff3e93 | 0c629631d071838b9621065e8ea65a0deeefeecd | /back_end/ocr3.py | 370257478c25db690bdcefc51afc6647ce89dbb4 | [] | no_license | PriyanshuRj/MEDEX | e3fd3957a27d3242f2f210ab520b937d9d2ddae7 | f7b6bdc149ef0e14c4a6c23e5e8dd704e9a110cb | refs/heads/master | 2023-08-26T10:10:26.780949 | 2021-11-03T16:26:16 | 2021-11-03T16:26:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,315 | py | #importing the libraries
from imutils.object_detection import non_max_suppression
import cv2
import numpy as np
import argparse
import time
# construct the argument parser
ap = argparse.ArgumentParser()
ap.add_argument("-i", "--image", type=str,
help="path to input image")
ap.add_argument("-east", "--east", type=str... | [
"priyanshurajput0071109@gmail.com"
] | priyanshurajput0071109@gmail.com |
221b3f687c962dfdad26902aaab6ea7207f0a7f4 | 3f16e66b33b39df8866947fcf1d8249476725c03 | /mymodule/main2.py | d795c5f9a1a68ab6babb2f8a5d75a813193cacd7 | [] | no_license | VadimVolynkin/learning_python3 | ea3559e0f01b4c9e09ae82b76ca315de8e41ecc4 | 872f0a2ac296ec3242ac9b81f63a29f09bc614fa | refs/heads/main | 2023-08-10T05:39:04.376172 | 2021-09-07T14:44:20 | 2021-09-07T14:44:20 | 339,133,214 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 25 | py |
m2 = 'hello from m2'
| [
"71ooo@mail.ru"
] | 71ooo@mail.ru |
e5e84a9f0303be70cd69044c5e7069c56306c90f | 29bd2e0d549a71be3c2219b760b0fd60622cb108 | /limbo/plugins/jenkins.py | 27f08e11a363a9059255f67f9f043e0ac723cd4d | [
"MIT"
] | permissive | rifkichaplin/slackbot-raspbian | fafc1b6bccd6a0f48137fd32493b2cd2391ba1d2 | 30de84e2cb2d059a699c9adf58bb141fc9fb2b83 | refs/heads/master | 2022-12-10T07:31:35.172347 | 2018-02-05T16:41:47 | 2018-02-05T16:41:47 | 116,692,292 | 0 | 0 | MIT | 2022-12-07T23:56:24 | 2018-01-08T15:14:55 | Python | UTF-8 | Python | false | false | 2,027 | py | import re
import requests
from subprocess import call, PIPE, Popen
import os
import jenkins
import random
import socket
from urllib.parse import urlparse
import sys
jenkinsurl=os.environ["SLACK_JENKINS_URL"]
jenkinsusername=os.environ["SLACK_JENKINS_USERNAME"]
jenkinspassword=os.environ["SLACK_JENKINS_PASSWORD"]
serv... | [
"rifkichaplin@gmail.com"
] | rifkichaplin@gmail.com |
f79f0f482acf2693c92d8264d1e254113b04cb1a | 268a635f6c553e214b09b5673049f2681683f129 | /setup.py | 64916c3fc3f5df32d5d6cf4d4cdb63db1af68b7f | [
"MIT"
] | permissive | IlyaKostogrud/TextDatasetCleaner | 44c12eb12d579d62278be554c18a243622a758eb | df1acb96d0ace75cabcd262265e23866bee36f27 | refs/heads/master | 2023-02-21T15:59:31.030646 | 2021-01-23T21:13:25 | 2021-01-23T21:13:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,999 | py | from setuptools import find_packages, setup
def file_read(path: str) -> str:
with open(path, encoding='utf-8') as fd:
return fd.read()
setup(
name='textdatasetcleaner',
version='0.0.5',
author='Denis Veselov',
description='Pipeline for cleaning (preprocessing/normalizing) text datasets',... | [
"noreply@github.com"
] | noreply@github.com |
48fa8d2e0ea8bb9d65ab82b01db7bab8b5d6fe5c | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /HXkpnCxJgxkFwaReT_10.py | 0ac63cec767a5f117ae4d9a6bd8853f9c41acfad | [] | no_license | daniel-reich/turbo-robot | feda6c0523bb83ab8954b6d06302bfec5b16ebdf | a7a25c63097674c0a81675eed7e6b763785f1c41 | refs/heads/main | 2023-03-26T01:55:14.210264 | 2021-03-23T16:08:01 | 2021-03-23T16:08:01 | 350,773,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,039 | py | """
Given a function that accepts **unlimited** arguments, check and count how
many data types are in those arguments. Finally return the total in a list.
List order is:
[int, str, bool, list, tuple, dictionary]
### Examples
count_datatypes(1, 45, "Hi", False) ➞ [2, 1, 1, 0, 0, 0]
count_datatype... | [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
7ad2bb45907155ae10077225b8f04b9f98927054 | e8b44cd22ac42f0810bcb0088507c52c09636313 | /pelican/bin/rst2pseudoxml.py | 773c0da129109c1d78324e343a4e053182a628c2 | [] | no_license | paulamib123/Chess | ad7690134847d46d44666ae93b5fd73edc6f1fd5 | 21e409d956bd4ed6c417ff22d4cc5ba3d0bfcc68 | refs/heads/master | 2022-12-14T16:18:13.140464 | 2020-09-13T08:42:21 | 2020-09-13T08:42:21 | 295,111,063 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 630 | py | #!/Users/paulamibhattacharya/pelican/bin/python
# $Id: rst2pseudoxml.py 4564 2006-05-21 20:44:42Z wiemann $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
A minimal front end to the Docutils Publisher, producing pseudo-XML.
"""
try:
import locale
... | [
"paulamixbhattacharya@gmail.com"
] | paulamixbhattacharya@gmail.com |
fa7115c784e5243a246bf64867c180a8a5507ebe | 37bb5c2574d90b5e5b22a3cab95490d996e2abd9 | /demo11/users/urls.py | febc883e9c0e97be0f6f61866ff775fe53b7696b | [] | no_license | Krishna-ux-rgb/demo2 | 5d7886189c2bc2d02a80a1cbabc09dd9a40b7e48 | 3a2e337559d78237a63e2bf980123d00ed78cf57 | refs/heads/master | 2023-03-02T02:55:55.847588 | 2021-02-14T17:51:36 | 2021-02-14T17:51:36 | 338,851,396 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 122 | py | from django.urls import path, include
from . import views
urlpatterns = [
path('' , views.index , name = 'index')
]
| [
"krishnadhiman782@gmail.com"
] | krishnadhiman782@gmail.com |
a2362cb34e09ef826741a6f8d2d7b8a79a4c9fc5 | 801714c9ba4f617732d46304ff915ee884c3f262 | /utils/decompress_gz_to_json.py | 01de93cc01e93ba0250a3e2becff8b0167586038 | [
"MIT"
] | permissive | avenchen/BRON | 80c9531fce9695db4787e6258dba4545aee74ea1 | 68448a5d6be3143fa900c617193ed58210c62204 | refs/heads/master | 2023-08-22T20:36:48.846404 | 2021-10-04T14:43:14 | 2021-10-04T14:43:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 820 | py | import json
import gzip
import argparse
"""
Decompresses GZ file to JSON file
"""
def decompress_gz_to_json(gz_path, save_path):
with gzip.open(gz_path, "rt", encoding="utf-8") as f:
decompressed = json.load(f)
with open(save_path, 'w') as f:
f.write(json.dumps(decompressed, indent=4, sort_k... | [
"38595657+k8xu@users.noreply.github.com"
] | 38595657+k8xu@users.noreply.github.com |
ce3232048c74c022e0561a6b1008e1c9bbedd00f | 5b66b2830a78453790be411b8f5cc661c4f7abab | /examples/repos-mgmt/config2_bursty.py | e283119e690cc5f5ec5d3232549c83deea4e0a9b | [
"MIT"
] | permissive | Chrisys93/IcarusRepoSEND | e4c2f77118c1bfcb21006effd2c260034aaf33b8 | 6fb53e8f50de0841ae15a22b66abc8707612ce72 | refs/heads/master | 2023-04-08T01:31:46.917447 | 2023-04-03T15:51:52 | 2023-04-03T15:51:52 | 279,598,200 | 6 | 2 | null | null | null | null | UTF-8 | Python | false | false | 11,135 | py | # -*- codi# -*- coding: utf-8 -*-
"""This module contains all configuration information used to run simulations
"""
from multiprocessing import cpu_count
from collections import deque
import copy
import os
from math import pow
from icarus.util import Tree
# GENERAL SETTINGS
# Level of logging output
# Available optio... | [
"nicolaescu3@yahoo.com"
] | nicolaescu3@yahoo.com |
d05dac4736b2f7e39e4e4a2c3cb7572dafb176b5 | 74bca11e8f02f8826e822d4c95468be64656affd | /agent/run_daemon.py | 60f203c6796af59a5e513b2a82c9000684d6b298 | [
"Apache-2.0"
] | permissive | siemon2008/simpleMon | f0a6a69a51cabe5cb9236d441929f60085957581 | d933358ee25cef002af290932d3909cb6b181037 | refs/heads/master | 2021-01-18T08:53:35.414862 | 2015-02-07T08:53:50 | 2015-02-07T08:53:50 | 46,840,510 | 0 | 1 | null | 2015-11-25T05:51:52 | 2015-11-25T05:51:50 | JavaScript | UTF-8 | Python | false | false | 738 | py | #!/usr/bin/env python
import Queue
import threading
import sys, time
import urllib2
import json
import framework
from moniItems import mon
from daemon import Daemon
class MyDaemon(Daemon):
def run(self):
print 'start'
framework.startTh()
print 'stop2'
if __name__ == "__main__":
daemon... | [
"pengcheng.wang@corp.elong.com"
] | pengcheng.wang@corp.elong.com |
ce1d97165a437e65a390a9c4ca74a812bbedf161 | ba269f7c2fdd7d0cfee6185eea15024992bd4d91 | /fun2-dictdatatype.py | ba0bd3a3bd49b138157a9edab1ba3d3c2a0d09ed | [] | no_license | angkasatech/prep.proj01 | 60a69d8a027085fe4b01a71a1a2647aa0b600750 | ac0b64ac7bcfb0c350ea5fe3538e97c02b40c892 | refs/heads/main | 2022-12-31T05:10:07.209183 | 2020-10-17T15:51:06 | 2020-10-17T15:51:06 | 304,891,191 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,060 | py | """
Tipe data dictionary sekedar menghubungkan antara KEY dan Value
KVP = Key Value Pair
dictionary ~ kamus
"""
kamus_id_en = {}
kamus_id_en['anak'] = 'son'
kamus_id_en['ibu'] = 'mother'
kamus_id_en['bapak'] = 'father'
# kamus_id_en = {'anak': 'son', 'ibu': 'mother', 'bapak': 'father'} #sama seperti diatas lebih simpe... | [
"ramadhanadiputra1@gmail.com"
] | ramadhanadiputra1@gmail.com |
edf379c10f675e099454b2d435a488a2e6e722b9 | 65d11427a3289a1019f7cb38d5f292aed3b4d6cb | /host.py | af73bdebd16685d0dfda5096e3ebc56e27ccbd79 | [] | no_license | walterby/yydxt | c010ed01f99fa0b0716c9c5f38dcbbd2405da1a8 | cc0e3d292a2f73673103aeec42d15cf7ce7591bc | refs/heads/master | 2023-02-17T21:25:55.990852 | 2021-01-22T08:35:20 | 2021-01-22T08:35:20 | 331,863,067 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 980 | py | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
from zbxapi import *
import json
import xlrd
def excel_info():
data = xlrd.open_workbook("zabbix.xlsx")
data.sheet_names()
table = data.sheets()[0]
nrows = table.nrows - 1
print(table.nrows)
hosts = []
for i in range(nrows):
host = {}
location = table.cell(i+1,... | [
"walterby303@163.com"
] | walterby303@163.com |
5d320986dd085725dc650962cd1f747e44418703 | 2cb4b622cb390267f0deaee72e6b4dcb7da43d29 | /weightsplates/supplements/admin.py | 8ddc270c439dbb6958e643591a422530755f4530 | [] | no_license | ssgsj-carranza/Weights-Plates_backend | fe71f82baaa10ae775fb7c29db0bf97141dfd445 | 5309782585705d5c558abe5ef8bb17bcc5fd9140 | refs/heads/main | 2023-05-11T05:52:03.538363 | 2021-06-07T14:18:09 | 2021-06-07T14:18:09 | 370,762,094 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 128 | py | from django.contrib import admin
from .models import Supplements
# Register your models here.
admin.site.register(Supplements)
| [
"ssgsj.carranza@gmail.com"
] | ssgsj.carranza@gmail.com |
8888162efa48c3b16541f45d0afbca742d5c9197 | f504253210cec1c4ec6c3ea50a45564db7d6cd7f | /prettyqt/custom_widgets/adjustingboxlayoutdockwidget.py | 35beb69676ef4e03eeb813230ff08764a12d6637 | [
"MIT"
] | permissive | phil65/PrettyQt | b1150cb4dce982b9b8d62f38f56694959b720a3e | f00500d992d1befb0f2c2ae62fd2a8aafba7fd45 | refs/heads/master | 2023-08-30T21:00:08.905444 | 2023-08-17T12:24:45 | 2023-08-17T12:24:45 | 177,451,205 | 17 | 5 | MIT | 2020-08-15T22:21:18 | 2019-03-24T18:10:21 | Python | UTF-8 | Python | false | false | 2,620 | py | from __future__ import annotations
from prettyqt import constants, widgets
DockWidgetArea = constants.DockWidgetArea
class AdjustingBoxLayoutDockWidget(widgets.DockWidget):
"""DockWidget adjusting its child widget QBoxLayout direction.
The child widget layout direction is set according to dock widget area... | [
"philipptemminghoff@googlemail.com"
] | philipptemminghoff@googlemail.com |
c95ff0ea213f72ba08dca8053a412519590fdd91 | c89543dd926c1787c40616ed174a3d1371c54449 | /superset/views/users/api.py | 675b918847c461140578a642453c1a429f620198 | [
"Apache-2.0",
"OFL-1.1"
] | permissive | j420247/incubator-superset | 7c7bff330393f0e91f5e67782f35efe8c735250a | c9b9b7404a2440a4c9d3173f0c494ed40f7fa2bd | refs/heads/master | 2023-03-11T21:53:16.827919 | 2023-02-03T19:04:17 | 2023-02-03T19:04:17 | 157,780,350 | 1 | 1 | Apache-2.0 | 2023-03-07T00:14:51 | 2018-11-15T22:24:29 | TypeScript | UTF-8 | Python | false | false | 3,465 | 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 u... | [
"noreply@github.com"
] | noreply@github.com |
acdada999a4f3ef22e4174f6ff32373b7a62d7b7 | 697f9bbb47254853783c60de7ffc8d5fb411e73d | /evo_gym/wrappers/test_pixel_observation.py | 16b293e07d5bdee6630a48ef4c2e55dcbe954964 | [
"MIT"
] | permissive | SamuelSchmidgall/EvolutionarySelfReplication | d27389191435ab679199fa06d59f15aef155cd8a | 1a6f8225378b59423a97b439b56710bbed2754e9 | refs/heads/main | 2023-07-30T12:34:27.720041 | 2021-09-29T18:49:16 | 2021-09-29T18:49:16 | 366,845,417 | 14 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,237 | py | """Tests for the pixel observation wrapper."""
import pytest
import numpy as np
import evo_gym
from evo_gym import spaces
from evo_gym.wrappers.pixel_observation import PixelObservationWrapper, STATE_KEY
class FakeEnvironment(evo_gym.Env):
def __init__(self):
self.action_space = spaces.Box(
... | [
"sschmidg@gmu.edu"
] | sschmidg@gmu.edu |
1e5dcdafc81108f3fb37b11cec35bc770127293c | 7deb340b1e03fea38c259e37396b1d422da8a610 | /Window_Style/colorDialog.py | 1232a3fd780b38f5de7963934d1053c906ba53c5 | [] | no_license | NewStart2019/Use_PyQt5 | 18125f5e983c1e96bb549d0bc1d2db1dbce96e36 | 233dce364458a4bf4be580d173585911e55d973e | refs/heads/master | 2020-06-10T15:26:13.149156 | 2019-06-25T08:02:17 | 2019-06-25T08:02:17 | 193,662,355 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,078 | py | # -*- coding: utf-8 -*-
from PyQt5.QtWidgets import QApplication, QPushButton, QColorDialog , QWidget
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QColor,QIcon
import sys
class ColorDialog ( QWidget):
def __init__(self ):
super().__init__()
color = QColor(0, 0, 0)
self.setGeometry(300, 300, 350, 28... | [
"2855942332@qq.com"
] | 2855942332@qq.com |
169ed28cb2528b9ecbe4428f6c388734c0b768ac | b3ac60a2e7e048c210de2590626a1cfd5e737e96 | /PyWebApp/PyWebApp/urls.py | 1ab3d6a55f7ac0d76f8f56d0569f416fbb4ce2cc | [] | no_license | 20170945/Final-CSTI-1730-6050 | aed51534af9d09c19277fb6c3383040cb0fd68a7 | 33a65651f3f4573b190f1ccd87a1092fc07e5a0a | refs/heads/master | 2022-04-15T21:12:46.922888 | 2020-04-13T21:54:55 | 2020-04-13T21:54:55 | 250,009,408 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 831 | py | """PyWebApp URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-base... | [
"20170945@ce.pucmm.edu.do"
] | 20170945@ce.pucmm.edu.do |
60787e35c12e9351b883adeaa0b1c438f24fc49f | 38d331c46be60bc06f58971ab1128d717bbc0340 | /2Practical project/01飞机大战/01创建窗口.py | a21c93ba6b2e5f65428dcb2bcaeb965e154ccafb | [] | no_license | yeLer/pythonLearning | 7ea28c999ee1db7ba8556952da335e062ed44029 | 39bd876e02cb3e4c22f6707671fe398b3fe96c5a | refs/heads/master | 2021-09-11T14:00:09.884735 | 2018-04-08T13:44:05 | 2018-04-08T13:44:05 | 110,349,316 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 762 | py | #coding:utf-8
import pygame as pg
'''
搭建界面 用于完成窗口和背景的显示
'''
def main():
#1、创建一个窗口,用来显示内容 480*852的分辨率
screen = pg.display.set_mode((480, 852), 0, 32)
#2、创建一个和窗口大小一致的图片,用来充当背景
background = pg.image.load("./feiji/background.png")
#3、把背景图片放入到窗口中去显示
while True:
#设定需要显示的背景图
screen... | [
"1750112338@qq.com"
] | 1750112338@qq.com |
b1829480c172b556ccbc674d9d10d08e4ada3989 | 0d5f1ff7562787d917267ec4da42c74fbaf5a3e8 | /client.py | 70d25381be57c12fec183c1bc8c2223b2e4c62d5 | [] | no_license | jvanelteren/asyncio | c0b57dd949ebce7bf88724faa61aed79e777b9fd | 68cdc3fa93709f5def8cf292b20faba629fc0b4b | refs/heads/master | 2023-06-03T10:47:35.709596 | 2021-06-15T06:55:24 | 2021-06-15T06:55:24 | 377,065,881 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 510 | py | # from future import __annotations__
from typing import *
import asyncio
import sys
async def send_file(file):
reader, writer = await asyncio.open_connection('localhost', 8888)
for message in file:
writer.write(message.encode())
await writer.drain()
data = await reader.read(100)
... | [
"jvanelteren@gmail.com"
] | jvanelteren@gmail.com |
715651fb3db0cf699d68d033c0188c829fb5d7bc | 8b713697ba8c40179393e069f07d750480c21d4a | /django_tutorial/test.py | 21287d83ef06d9670784440e3ce3f515b7d1db5c | [] | no_license | navill/pytest_tutorial | ca24bcd742d5f8c7273694ebf0a0dd38af095bdb | 27b4d163abe8581996503c851949c9f75aebb786 | refs/heads/master | 2023-02-02T03:06:11.784673 | 2020-12-23T04:53:16 | 2020-12-23T04:53:16 | 323,780,460 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 889 | py | import pytest
from django.test import TestCase
from django.contrib.auth.models import Group, User
class MyTest(TestCase):
fixtures = ['group.json', 'user.json']
def test_should_create_group(self):
group = Group.objects.get(pk=1)
self.assertEqual(group.name, 'appusers')
def test_should_cr... | [
"blue_jihoon@naver.com"
] | blue_jihoon@naver.com |
0325fa1080c27994e0fa2c8ee857985828ccad3d | 5c72a7214bcf1d0cf185bce57393b201cf1b9dd9 | /pyigm/surveys/tests/test_llssurvey.py | 4545d6d8d0a006e1798263ad87f132c1a49e6145 | [] | no_license | JianiDing/pyigm | 6e9b960a0e8617e8861f45b0699f5e1847b5aff8 | d72f84a27fb25386aab8035bd49b21b37008f0af | refs/heads/master | 2021-08-24T09:06:49.810451 | 2017-12-07T01:17:53 | 2017-12-07T01:17:53 | 110,727,652 | 1 | 0 | null | 2017-12-09T00:00:27 | 2017-11-14T18:18:43 | Python | UTF-8 | Python | false | false | 2,416 | py | # Module to run tests on initializing AbsSurvey
# TEST_UNICODE_LITERALS
import numpy as np
import glob, os, imp, pdb
import pytest
from pyigm.surveys.llssurvey import LLSSurvey
from ..lls_literature import load_lls_lit
remote_data = pytest.mark.remote_data
lt_path = imp.find_module('linetools')[1]
'''
def data_pa... | [
"xavier@ucolick.org"
] | xavier@ucolick.org |
85a78addea5cf8602e9d24f7b245d047ef43da44 | 79b9fc3eb9837387050c25fd9ef26155d7554446 | /my_quant_platform/basic_util/db_conn.py | 62b87fad506c0681533620f9765d55ed4f1147ef | [] | no_license | Tigerno1/quant_trade_platform | d76ad6c3fd3ed76d39249bb47d3c6f7adc4b6724 | 31d4a0a508bcc71f9ad1adf53be406b825161fd0 | refs/heads/master | 2021-01-27T06:57:43.452634 | 2020-03-07T12:44:41 | 2020-03-07T12:44:41 | 243,475,069 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,075 | py |
import sys, os
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from settings.my_quant_platform_conf import CONFIG
from error_handler import CollectionConnectionError
from pymongo import MongoClient
class DbConn:
def __init__(self):
self.DATABASE = CONFIG.DATABASE
self... | [
"yh.zhang.tiger@gmail.com"
] | yh.zhang.tiger@gmail.com |
2a3dc6cc6b41070d0e01e8233bab293502eb6ded | bba17cea9710e30db8f2c5b5ee326358e5ea2bab | /Catalog/urls.py | 6bb0e4fb5e2312a6c4c8f444adea9c7ec29230ad | [] | no_license | aksamidiel/Django_shop | e805e89c866d8858ed307a6cff9771f8d7dac28e | b7e671b060b2c4fb88d7b9ca9e7ff7ed4317ea49 | refs/heads/master | 2020-05-04T23:31:19.410821 | 2019-05-02T18:28:32 | 2019-05-02T18:28:32 | 179,546,204 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,966 | py | from django.urls import path
from .views import *
urlpatterns = [
path('author/<int:pk>', AuthorDetail.as_view(), name='author_detail'),
path('binding/<int:pk>', BindingDetail.as_view(), name='binding_detail'),
path('format/<int:pk>', FormatDetail.as_view(), name='format_detail'),
path('genre/<int:pk>'... | [
"38276155+aksamidiel@users.noreply.github.com"
] | 38276155+aksamidiel@users.noreply.github.com |
378cc150999cc84951d73b387ac569b654386205 | e9c077bc3eacd277adfa786a1c479df87bbb6038 | /pages/deliveryMethodPage.py | d9823e0aa4eae640da4cae449d5f77d420647091 | [] | no_license | reyadrianreyes/Snapmart | 9702f2cd979ea61d57b1137d74ce690a03222d88 | f4b5b22ec634a3dcb9ee2b81f677c61b78519073 | refs/heads/master | 2023-05-15T03:40:37.262730 | 2021-06-03T17:07:57 | 2021-06-03T17:07:57 | 373,582,095 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 576 | py | import time
from locators.locators import Locators
class DeliveryMethodPage():
def __init__(self, driver):
self.driver = driver
self.one_day_delivery_radiobutton_xpath = Locators.one_day_delivery_radiobutton_xpath
self.continue_button_xpath = Locators.delivery_continue_button_xpath
d... | [
"reyadrianreyes@gmail.com"
] | reyadrianreyes@gmail.com |
6707141a302ed93cafaf82cad187723588c435d7 | 769d4ba08db6ad3707d8435b2d6ec3ca7fbf4a5d | /blender/arm/lib/make_datas.py | 9b55b2ad2b1abb6ce38c1f0db1a1ca12ec5f1e2f | [
"GPL-2.0-only",
"Zlib"
] | permissive | Leonix/armory | 9f2eee057f2fa66efc306e9e832806aa6ea124ba | 3eaf2dc569d7caf4a7a7c928575d45cbb9aa3c14 | refs/heads/master | 2020-04-15T11:45:55.385644 | 2019-01-07T14:41:06 | 2019-01-07T14:41:06 | 164,643,287 | 0 | 0 | Zlib | 2019-01-08T12:22:26 | 2019-01-08T12:22:25 | null | UTF-8 | Python | false | false | 10,943 | py | import os
import arm.utils
import arm.assets as assets
def parse_context(c, sres, asset, defs, vert=None, frag=None):
con = {}
sres['contexts'].append(con)
con['name'] = c['name']
con['constants'] = []
con['texture_units'] = []
con['vertex_elements'] = []
# Names
con['vertex_shader'] =... | [
"lubos.lenco@gmail.com"
] | lubos.lenco@gmail.com |
cec6f67f3c1e134b430ee71d62e1521e5f4d6b4d | 32bcc316dc18152588e1dc0e98ecdbe5f52dae06 | /lib/logger.py | 9c964dd2f7aedad559e1919113153d857bfb8549 | [] | no_license | dragonflylxp/msg-delivery | d1699bb7d69126ffba0dcc0f91940a06b29593bc | b2d395a5795d042528ce901ae264e18526bca10f | refs/heads/master | 2021-01-21T11:10:57.498163 | 2017-03-16T17:28:50 | 2017-03-16T17:28:50 | 24,223,446 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 668 | py | # coding: utf-8
import logging.config
import logging
import time
class Log():
logger = None
@classmethod
def set_up(cls, logfile, logger):
logging.config.fileConfig(logfile)
Log.logger = logging.getLogger(logger)
def getLog(self):
if Log.logger == None:
Log.logger... | [
"dragonflylxp@gmail.com"
] | dragonflylxp@gmail.com |
f9711b9a7161f2a33552f8a6b450529b5083bc2f | 032369c2fb0d441234955fa05ae578bf37d9cc2f | /Python_Crash_Course_2e_Solutions/ch06/Person.py | a53567adeed565f5abf7d5cd0f585479d1b2ebb5 | [] | no_license | duochen/Python-Beginner | 87b68ca5cd4dde6299174e6702ac775e51adaa93 | 8585b8065841b1465b23e46b504da681ab136926 | refs/heads/master | 2023-04-29T16:38:03.047585 | 2022-08-22T12:45:04 | 2022-08-22T12:45:04 | 163,430,002 | 1 | 2 | null | 2023-04-21T20:36:09 | 2018-12-28T16:35:46 | HTML | UTF-8 | Python | false | false | 205 | py | person = {
'first_name': 'eric',
'last_name': 'matthes',
'age': 43,
'city': 'sitka',
}
print(person['first_name'])
print(person['last_name'])
print(person['age'])
print(person['city']) | [
"dchen@slb.com"
] | dchen@slb.com |
f7a4ceae9be0677a9d7c43d574dbb721e9efbe82 | 52ba0511e188a289f73a226f616d0f34bd96ebdb | /blog/models.py | 9a2f84d21a454b24a62e1c3f0bc9a3f456aa58db | [] | no_license | Tyaro2/my-first-blog | a4d96e33481e3a5a4373b41c4e5099f2c9561837 | 7d3139a010be719d96b4e94f9439c083078ff1c3 | refs/heads/master | 2023-04-04T05:12:03.278013 | 2021-04-06T09:36:29 | 2021-04-06T09:36:29 | 339,306,261 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,338 | py | from django.conf import settings
from django.db import models
from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
from django.contrib.auth.models import PermissionsMixin
from django.utils import timezone
from django.utils.translation import gettext_lazy as _
from django.contrib.auth import get_u... | [
"you@example.com"
] | you@example.com |
f93bf97b8484eb58dc74fc5c8ceb7111889b380d | 857a474b7b70562a9377d95791975fdf01019fac | /Sentiment_Analyzer_Design_v8.py | 2b3fa3790e358a7890a183200a5c0baaed7addd7 | [] | no_license | Sourindu/Youtube-Sentiment-Analysis-Using-Python | b69cd87fd9ddd0bfbe4ca55d1a216e1818b04f16 | 8b864b98e468e3669fcb9799599f6fcff5d295ab | refs/heads/master | 2021-05-14T04:54:30.758985 | 2018-01-08T09:09:01 | 2018-01-08T09:09:01 | 116,654,520 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,932 | py | import nltk, random, getpass, os, pickle;
from nltk.corpus import nps_chat;
from nltk.corpus import brown;
from nltk import word_tokenize;
from nltk.corpus import movie_reviews as movies
default_sentence_set = [];
new_sentence_set = [];
Is_Classifier_TrainingRequired = "N";
classifier_training=[];
posts = nltk.corpu... | [
"sourindu@gmail.com"
] | sourindu@gmail.com |
0ccb07124ff63c02af9834e1208ceaaae9ccb04e | e440d40f27f05a04c5834c1f26ae87158adbb6f4 | /app/markov_gen_two.py | 18f02b74496da170471d8e74231d3e76a6632fe2 | [] | no_license | raghavan-arvind/HackUTD | ec15d8ccbcff1848b2965ffcf46ec35b9e65c25b | a4dd76eff235005c97ef926c70ac69acb97c9f2b | refs/heads/master | 2022-12-14T01:39:18.012257 | 2018-03-16T19:12:47 | 2018-03-16T19:12:47 | 122,717,576 | 0 | 1 | null | 2021-06-01T21:52:16 | 2018-02-24T07:56:40 | Python | UTF-8 | Python | false | false | 5,465 | py | import markovify
import pickle
import pronouncing as p
import config
import os, sys
import random
random.seed(1)
input_file = "raps_all.txt"
LINE_LENGTH = [6, 9]
# prints verbose error messages
def debug(line):
if config.verbose:
sys.stdout.write(line)
sys.stdout.flush()
class RapIndex:
de... | [
"raghavan@wireless-10-148-91-148.public.utexas.edu"
] | raghavan@wireless-10-148-91-148.public.utexas.edu |
eb168e082a1c257936435eeb67d9c064e467bb5a | bac504a6a8a625869d78922862008454e162d416 | /Mypractice/MultiThreadingExamples3.py | 893dd83b0406dcdfb0215a0093349e08f881782d | [] | no_license | Eshwar-n-kumar/Eshwar-n-kumar | 09d837f2b533c537bca240de985175b3cc7812af | 0f33910b23ef1c8eb5becf420d150ae27189f4ad | refs/heads/1111 | 2022-12-28T22:31:15.973748 | 2019-04-06T16:40:30 | 2019-04-06T16:40:30 | 179,860,271 | 0 | 1 | null | 2022-12-09T22:32:05 | 2019-04-06T16:46:27 | Python | UTF-8 | Python | false | false | 1,310 | py | '''Normal Example without using threads'''
# import time
# def doubles(numbers):
# for i in numbers:
# time.sleep(1)
# print("The double:", 2*i)
# def squares(numbers):
# for j in numbers:
# time.sleep(1)
# print("The squares:", j*j)
# numbers = [1,2,3,4,5,6]
# begintime = time.t... | [
"eskumar@cisco.com"
] | eskumar@cisco.com |
11465b5b97e1db0d850bb05e9a72d69ab7a6968f | 62fe739a9485a2bf547b6d96777f6a01c32dd2f5 | /tarefas/forms.py | 8b1285266859e81df676add9789352e1a9f79d9d | [] | no_license | jgjefersonluis/pdmytest1 | 950c84016a153e931f49b47a7366d7677dfeb62d | 7bb3b377af1fdffe2ad307352a82e2f39005b909 | refs/heads/master | 2023-06-16T14:36:01.388219 | 2021-06-29T05:27:51 | 2021-06-29T05:27:51 | 380,875,827 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 171 | py | from django import forms
from tarefas.models import Tarefas
class TarefasModelForms(forms.ModelForm):
class Meta:
model = Tarefas
fields = '__all__' | [
"jgjefersonluis@gmail.com"
] | jgjefersonluis@gmail.com |
8c68a5907b798fbc88de11c624c0c63918f8322b | 46d13216824f95f29da7672bf83ae1128a835a97 | /tests/unittests/test_user.py | 4a07b07fb597d183b4ae04f5c989e43c5abc6294 | [] | no_license | lucascandidoff/crudzin | 0a426b754d925e2990dd60cdd9cf2f90424c68b6 | bad721c62fa5f7f9905724838dbc61113ccc25ec | refs/heads/master | 2022-11-27T22:03:45.185391 | 2020-08-01T12:40:51 | 2020-08-01T12:40:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 929 | py | from flask import url_for
from flask_base_tests_cases import TestFlaskBase
class TestUserBP(TestFlaskBase):
def test_api_deve_registrar_usuario_na_base(self):
user = {
'username': 'test',
'password': '1234'
}
esperado = {
'id': '1',
'usernam... | [
"mendesxeduardo@gmail.com"
] | mendesxeduardo@gmail.com |
48e393af800848b52785853cb11c00be95dd9ad3 | 2fef1fbde0a2a6df15bda8093654be2620307e73 | /practice/app.py | 6a06301a5678a593f14e9d524ec92cd2ae187848 | [] | no_license | iamlekh/Streamlit_exp | a2fc0f40be73e9e939b7345334c12d7c589ff31d | 13a6e5a9d1428836c4542ec27e46a9401ae3ece7 | refs/heads/main | 2023-01-13T01:51:07.789935 | 2020-11-05T17:09:35 | 2020-11-05T17:09:35 | 310,366,842 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,993 | py | import pandas as pd
import streamlit as st
import plotly.express as px
import numpy as np
import pydeck as pdk
import time
my_bar = st.progress(0)
for percent_complete in range(100):
time.sleep(0.01)
my_bar.progress(percent_complete + 1)
@st.cache
def get_data():
url = "listings.csv"
return pd.read_... | [
"darpanlekharu@gmail.com"
] | darpanlekharu@gmail.com |
8577788cb4cf8d4a41065be74a795abd8f80d5cf | fc30a1bb883891257d703807f1c88995245429d2 | /Lorenzo/tableromovimiento.py | f33abb597c5b9c7a864118942b3ed3ab2c39a9ac | [] | no_license | LorenCode/CASINO | a76abd0f39ccee7094d02ec0041edfa1c7e61b65 | 3f81bbeaed6d87061c8b06555aa501e195b34245 | refs/heads/main | 2023-04-11T17:44:18.517845 | 2021-05-07T22:00:22 | 2021-05-07T22:00:22 | 362,407,632 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 29,101 | py | from time import sleep
import os
from pynput.keyboard import Listener
from colorama import init, Fore, Back, Style
from random import choice
import movimiento_ruleta
import ganar
import perder
import playsound
import vlc
clear = lambda: os.system('cls')
# Resultado aleatoria
l_random = [i for i in range(37)]
#Int... | [
"lorenzocastellanolorenzo@gmail.com"
] | lorenzocastellanolorenzo@gmail.com |
117d079ed37845edbeb098e4e4257bb6044dda54 | 05f06a1b104526c5262289e663df855e1335f32a | /User/views.py | 682030b507801c942c3b37a8305cfb6ddf3afb55 | [] | no_license | Harshvartak/E-commerce-DRF | 784ebecce95730996a9553fef1f3a9218e942749 | b2eea09d7f965b8e8c9397f636c7ea8703813539 | refs/heads/master | 2022-12-13T11:39:11.854643 | 2020-01-03T07:54:41 | 2020-01-03T07:54:41 | 229,832,815 | 0 | 0 | null | 2022-11-22T04:19:28 | 2019-12-23T22:41:40 | JavaScript | UTF-8 | Python | false | false | 714 | py | from django.shortcuts import render
from rest_framework import status
from rest_framework.response import Response
from rest_framework.decorators import api_view
from rest_framework.authtoken.models import Token
from .serializers import RegistrationSerializer
@api_view(['POST', ])
def registration_view(request):
... | [
"vartak.harsh@gmail.com"
] | vartak.harsh@gmail.com |
3c05348a597fa1614f6195a6d29dd92648eb1134 | f4a024d939c72c80dbb23ca0e250060440a53b10 | /airi_pic/settings.py | 3442338b1f33ba41830e16593a9e39b960bd9d13 | [] | no_license | Acorn2/airi_pic | 08600a2cb570afe9a77f129e53b01ca83e3923e1 | 9d0acecff9a02c8603bd05cdc8e81b17c0cf406b | refs/heads/master | 2020-06-05T17:45:50.934233 | 2019-06-18T08:46:28 | 2019-06-18T08:46:28 | 192,501,586 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,392 | py | # -*- coding: utf-8 -*-
# Scrapy settings for airi_pic project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# https://doc.scrapy.org/en/latest/topics/settings.html
# https://doc.scrapy.org/en/latest/topi... | [
"hkyy521@163.com"
] | hkyy521@163.com |
fee43461178cdcedd067276d30e87473a14dc34a | 29ddbc17d436ec8c6d1daac34de0f86191eafa86 | /useful_links.py | 5b7e65c31639cb969366714e75daa2acd62d6794 | [
"MIT"
] | permissive | hibididibidi/usd_cad_NN | a885ba2f20d4afbb59ebaf2407619fc9c4968dfc | 084503928848e129057a8f97893342e8c7639fd0 | refs/heads/master | 2021-05-14T17:50:49.342922 | 2018-03-19T15:38:57 | 2018-03-19T15:38:57 | 116,056,690 | 0 | 0 | MIT | 2018-03-16T18:59:55 | 2018-01-02T21:00:30 | Python | UTF-8 | Python | false | false | 374 | py |
import urllib.request
import
from bs4 import BeautifulSoup
# Ignore SSL certificate errors
ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE
#US nonfarm payroll and unemployment
url=urllib.request.urlopen('https://www.bls.gov/news.release/empsit.nr0.htm', context=ctx).read()... | [
"noreply@github.com"
] | noreply@github.com |
1042aaa1c6f6bf9a4efa1ab59bfe4a30cd1d0f49 | 6babe66cd338b9643ca5140c801c529a3df84b88 | /qr/qr_simulation.py | 0e60d37851708ff0f0d4e1daa885fb053f1148c5 | [] | no_license | GurayKilinc/inventory-systems | 7910b2cc425472b5eb290d9e542637d62ecfbfec | bb13c0ae00b04b275eacc9f258256b38c814b48e | refs/heads/master | 2020-07-05T22:01:31.801465 | 2018-01-27T07:10:09 | 2018-01-27T07:10:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,936 | py | """
A Simulation of the Q,r Inventory Policy
==========================================
we simulate a periodic-review inventory process subjected to the
Q,r policy.
Model
--------------
Orders arrive according to a Poisson process with rate \mu at
an inventory. We assume that orders are accepted in accordance to t... | [
"vanforeest@gmail.com"
] | vanforeest@gmail.com |
737252ca9ba41c369ac7335e2c5f7e8fcb7042d2 | 1721445a6635af8604a1f2693660bb0c4ae88ca8 | /6/dest.py | 4eec336a4587bfb3fd4f69becc8e2938e75848a9 | [] | no_license | nelhage/aoc2018 | fdc01f557f9d9b82b533decaff64ebbe1909f9ba | c42a44ea2f86bf42ab4a0c9034f75a6827daf69e | refs/heads/master | 2020-04-13T06:50:10.134072 | 2018-12-25T18:07:31 | 2018-12-25T18:07:31 | 163,032,184 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 993 | py | import numpy as np
import sys
coords = [list(map(int, line.rstrip().split(", "))) for line in sys.stdin]
xs = np.array([x for (x, y) in coords])
ys = np.array([y for (x, y) in coords])
def closest(x, y):
ds = np.abs(xs - x) + np.abs(ys - y)
m = np.argmin(ds)
if np.sum(ds == ds[m]) == 1:
return m
return No... | [
"nelhage@nelhage.com"
] | nelhage@nelhage.com |
5942e6245a766d064f39710b3b5645d9d1f90318 | d653e2c30ea2e55e17a9e08a9a1fd487fc796950 | /opencensus/trace/ext/pymongo_tornado/trace.py | 8c153a38c72eba67ffd915d69b04210b38fa59d9 | [
"Apache-2.0"
] | permissive | dronedeploy/opencensus-python | ff5b9e05946e8b7b193d04f452c75cb25deccc6d | 486263621373a0b2cce601a86cb89d43bd8c16a3 | refs/heads/master | 2020-04-13T06:22:05.989023 | 2019-08-12T18:57:13 | 2019-08-12T18:57:13 | 163,018,381 | 1 | 0 | Apache-2.0 | 2019-09-23T21:08:24 | 2018-12-24T19:21:58 | Python | UTF-8 | Python | false | false | 2,779 | py | import logging
from concurrent import futures
from pymongo import monitoring
from opencensus.trace import execution_context, tracer
from opencensus.trace.ext.pymongo.trace import CommandTracer
from opencensus.trace.propagation import binary_format
from opencensus.trace.tracers.noop_tracer import NoopTracer
log = log... | [
"ewhauser@gmail.com"
] | ewhauser@gmail.com |
e21ca73ec16947c376cbdcd12134cd9dab226bcb | 7e44c942b0dcf38ba20f7d56cc826e6bf1bcb830 | /demo1.py | 26c606440ec5be55d9e62401f7737c6f36d218ef | [] | no_license | jdj0603/robot | 79e453e41cdaa39236d672cf624ede324f5fcb8e | c46e7d59faf815a769ea03d99e94ddc6c820b0d1 | refs/heads/master | 2016-08-10T18:42:43.246298 | 2016-04-09T13:44:22 | 2016-04-09T13:44:22 | 55,827,366 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,431 | py | #!/usr/bin/python
import os
import socket
import struct
import argparse
import tools as t
p = 'v:\\'
g_cmd = ''
while g_cmd:
g_cmd = raw_input('>')
gp = t.get_cmd_group(g_cmd)
if gp[0] == 'ls':
a1 = os.listdir(p)
for i in a1:
print i
elif gp[0] == 'del':
pp = p +... | [
"jdj0603@163.com"
] | jdj0603@163.com |
7e539a9efa9026a14bd5bab19690d3be70235f37 | 951e433b25a25afeea4d9b45994a57e0a6044144 | /NowCoder/百度_二叉树深度.py | d30d251bea18bf6991eba6cc5047bd36ce19bac8 | [] | no_license | EricaEmmm/CodePython | 7c401073e0a9b7cd15f9f4a553f0aa3db1a951a3 | d52aa2a0bf71b5e7934ee7bff70d593a41b7e644 | refs/heads/master | 2020-05-31T14:00:34.266117 | 2019-09-22T09:48:23 | 2019-09-22T09:48:23 | 190,318,878 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 665 | py | from tool import TreeNode
def depth(root):
# 递归
if not root:
return 0
return max(depth(root.left), depth(root.right)) + 1
def depth1(root):
# 层次遍历:队列
depth = 0
tmp = []
tmp.append(root)
while tmp:
depth += 1
for i in range(len(tmp)):
new = tmp[0]
... | [
"1016920795@qq.com"
] | 1016920795@qq.com |
6c203c23872fd9403e5721dceda83094ceaaadda | 9e5b565dbd7ffdfb1bd82129b4be8f0993323c4c | /01a_testes_iniciais.py | 4f4575e8b4c7e84d6eb3a5d611698c837bae335e | [] | no_license | niltonmalves/Microcontroladores | 15095931acc535ce32f7fad0f0f33ceac7befe5d | 8cd2e6b7ae8f321428121ebecbb5870bf1f734c1 | refs/heads/master | 2022-12-15T14:38:52.726491 | 2020-09-03T10:33:41 | 2020-09-03T10:33:41 | 292,538,531 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,193 | py | from extra.aula import rodar
from Adafruit_CharLCD import Adafruit_CharLCD
@rodar
def programa():
# importação de bibliotecas
from gpiozero import LED
from gpiozero import Button
from time import sleep
# definição de funções
def apertaELiga():
led.toggle()
return
de... | [
"noreply@github.com"
] | noreply@github.com |
c8bce0445132f3b7e1c81d437185459b3b2183dd | 1082b396e969056227a0a25298860e0752d87e6b | /svm/svmMLiA.py | 87eeecf3defcaf7e7ab87e8b26dda12ed8fb0917 | [] | no_license | tianke0711/deep_learning | 9006f936e6f69c3548b7111197f370a0beb12c63 | e8c5891f73150f8926cc6e8c9bb47fabc404f7bc | refs/heads/master | 2021-09-01T23:33:23.662670 | 2017-12-29T06:58:13 | 2017-12-29T06:58:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,193 | py | '''
Created on Jul 30, 2017
@author: max
'''
from numpy import *
def loadDataSet(filename):
dataMat = []
labelMat = []
fr = open(filename)
for line in fr.readlines():
lineArr = line.strip().split('\t')
dataMat.append([float(lineArr[0]),float(lineArr[1])])
labelMat.append(float... | [
"huzehua@outlook.com"
] | huzehua@outlook.com |
c986213dd133fac33e375d4a5cf5e7041c3ce9f6 | b7e8cbf8ab62ccf7d74e5a2f60b1456cacec0ed6 | /miscs/rawsend.py | 7083f272527a1eacec6811d3827742b493cc4b27 | [] | no_license | yyasuda/P4Runtime-nanoswitch | eacda39f625597f02dc82404c97b178319e5587f | c4a21eb5b4cfc70c5cd2606e0427e6a8ba10f88f | refs/heads/master | 2021-12-01T08:09:29.079665 | 2021-11-30T05:28:50 | 2021-11-30T05:28:50 | 253,800,539 | 7 | 4 | null | null | null | null | UTF-8 | Python | false | false | 417 | py | import socket
iface = 's1-eth1'
dstMac = b'\x01\x01\x01\x01\x01\x01'
srcMac = b'\x02\x02\x02\x02\x02\x02'
proto = b'\x88\xb5' # protocol type is IEEE Local Experimental
packet = dstMac + srcMac + proto + "012345678901234567890123456789012345678901234567890123456789"
s = socket.socket(socket.AF_PACKET, socket.SOCK_RAW, ... | [
"yasuda@cc.kyoto-su.ac.jp"
] | yasuda@cc.kyoto-su.ac.jp |
c6a65f5a53a29204372352da2ae26a5aa39b946b | 195b8d12796872c05d539aa9283fc3f407b8d8b5 | /python-cinderclient/tests/v1/fakes.py | ed0a640205d1db699fbed6ee2e955407cea334c1 | [
"BSD-3-Clause",
"Apache-2.0",
"BSD-2-Clause"
] | permissive | rvbelapure/openstack-nova-sched | afaa5928da3a8430b64bc23aedb251bae0e7d3ef | 325da0e08979d79b7470d7506ced1b4210e2b696 | refs/heads/master | 2021-01-17T05:28:44.474242 | 2013-04-20T21:18:35 | 2013-04-20T21:18:35 | 9,082,500 | 0 | 1 | null | 2021-09-07T08:33:18 | 2013-03-28T17:30:46 | Python | UTF-8 | Python | false | false | 10,355 | py | # Copyright (c) 2011 X.commerce, a business unit of eBay Inc.
# Copyright 2011 OpenStack, 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
#
... | [
"owlpostarun@gmail.com"
] | owlpostarun@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.