blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 616 | content_id stringlengths 40 40 | detected_licenses listlengths 0 69 | license_type stringclasses 2
values | repo_name stringlengths 5 118 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 63 | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 2.91k 686M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 23
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 213
values | src_encoding stringclasses 30
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 2 10.3M | extension stringclasses 246
values | content stringlengths 2 10.3M | authors listlengths 1 1 | author_id stringlengths 0 212 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
30297a7a22cfaf814fcfd2898ec4e7c856b4fb52 | 90ae2d02ff9a4dc01fd50f5c5db64acab27529ea | /research.py | a2ada317de2e86aeec5aa8f66a7e4af06e829736 | [] | no_license | hearable-labs/v2prototype | 0fd28dafc92de036a7747c38ffbcca26a5ee1fb2 | 3b91b27397222a2b7695b3adaf591199de5d5391 | refs/heads/master | 2020-04-21T01:38:42.736345 | 2019-05-27T07:51:52 | 2019-05-27T07:51:52 | 169,229,798 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,895 | py | import fileinput
counter = 0
number_from = 0
def setVariableNull():
global counter
global number_from
counter = 0
number_from = 0
#replace the filepath by the corresponding path to the gain_live.cfg
def replace_gain(number_to):
global counter
global number_from
if... | [
"noreply@github.com"
] | hearable-labs.noreply@github.com |
3a7cd410882b4da4bea9fbdc498e9b1fb105d1e0 | 6548ed03a7c8f3110aabda75f0c725cecb0a03da | /Ex087-Matriz2.py | 3825344333684fe3f9daf2f47a35dda5874aa12d | [] | no_license | MurilloFagundesAS/Exercicios-Resolvidos-Curso-em-Video | ac328a7cdca4ff262ddc6c29342816afd93478a2 | d8ab260a8de62a975f9113877437cab785fa23db | refs/heads/master | 2023-01-21T11:14:21.597135 | 2020-12-04T19:51:25 | 2020-12-04T19:51:25 | 318,572,956 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 683 | py | lista = []
parte = []
par = 0
coluna3 = 0
count = 0
maior = 0
for i in range(0,3):
for j in range(0,3):
x = int(input(f'Digite um número da posição [{i},{j}]: '))
if x % 2 ==0:
par += x
if j == 2:
coluna3 += x
parte.append(x)
if count == 0:
maior ... | [
"mll-fag@hotmail.com"
] | mll-fag@hotmail.com |
80c0bbc4b4f1a69547dbd865963783e862ce8f3d | 09941ea4600314ed0381e123ffb9f851e34bade8 | /HackerEarth/Basic Programming/split_houses.py | bd54aa3276fa411e001cffc2729abbb4624dca4e | [] | no_license | piyushkumar102/Competitive-Programming | 208d2f59ab097e68e627d8cdb74189c4efa618a8 | 31025da6a055036d66c289d4a6f64ab756fcf1c6 | refs/heads/master | 2023-03-24T23:43:28.198318 | 2021-03-25T15:39:26 | 2021-03-25T15:39:26 | 351,489,431 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 133 | py | n = int(input())
grid = input()
grid = grid.replace('.', 'B')
if'HH' in grid:
print('NO')
else:
print('YES')
print(grid)
| [
"piyush.kumarmaloo@gmail.com"
] | piyush.kumarmaloo@gmail.com |
fbda68e6b6f7e3ff700522a92abb1b10d67623cd | 3c7f640afd9dde53ea0616c7d8a03186a80401a9 | /online_shop/main/migrations/0003_auto_20201129_2211.py | c30164ed8cf8d56a9c97a02fe815711a8bf4a521 | [] | no_license | meg97/django_projects | 12caeb81dab0b7bd9c5ce5f6180fd89d7b83b6d8 | f0a67588a3685ece28d6d1cdde63c590d08468aa | refs/heads/master | 2023-01-21T04:43:15.188741 | 2020-12-06T21:00:36 | 2020-12-06T21:00:36 | 310,807,694 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 421 | py | # Generated by Django 3.1.3 on 2020-11-29 18:11
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('main', '0002_auto_20201129_2158'),
]
operations = [
migrations.AlterField(
model_name='item',
name='item_image',
... | [
"maneyeganyan@yahoo.com"
] | maneyeganyan@yahoo.com |
c0a4368dee98e726b28341c966b671e8d8ecab94 | 6295d1d4b48cafe702a08efd270aea47f6122722 | /setup.py | dfc7e472398df49c5e01ff63b45c36ce99e0a948 | [
"MIT"
] | permissive | bipbopbot/radforest | 84736a16dd6df45723c9da373004b801e153c7a8 | fbccf2e13c58a320a7bf81bb72ad86963e0785bc | refs/heads/master | 2020-08-19T01:29:30.739011 | 2019-10-17T20:27:26 | 2019-10-17T20:27:26 | 215,858,926 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 320 | py | import setuptools
setuptools.setup(
name='radforest', # package name on PyPI
version='0.1.0',
description='A library of radiance forests.',
url='https://github.com/bipbopbot/radforest',
author='Loren Adams',
author_email='bipbopbot@gmail.com',
license='MIT',
packages=['radforest',]
)
| [
"bipbopbot@users.noreply.github.com"
] | bipbopbot@users.noreply.github.com |
0ec404b9b92a1950ead916d9356841cf3bb18eb4 | d7bf691c35d7bf2a5707e47d7aca98b509e02eb9 | /pddlstream/algorithms/algorithm.py | 7a29c0eba6f399ea3752c4684788b164a65873f9 | [
"MIT"
] | permissive | himanshisyadav/pddlstream | 7d43c16da903504a0232408a7d8077fd4da95d87 | 1038e702f1d4625791f1da7867d6226b02af8c3a | refs/heads/master | 2020-04-11T11:48:19.324553 | 2018-11-14T18:28:27 | 2018-11-14T18:28:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,291 | py | import time
from collections import OrderedDict, deque, namedtuple, Counter
from pddlstream.algorithms.downward import parse_domain, get_problem, task_from_domain_problem, \
parse_lisp, sas_from_pddl, parse_goal
from pddlstream.algorithms.search import abstrips_solve_from_task
from pddlstream.language.constants im... | [
"caelan@mit.edu"
] | caelan@mit.edu |
61105c7f5cc1fb8567c89d5cb17133852f50a7de | cbd33720c80ee2f7f0c846f966d00890a511728d | /User/migrations/0003_auto_20180518_1144.py | a9001f9602354a498d05276295e713df62cc1062 | [] | no_license | KyalSmith/Django_Auth_Project | a21f09965a47298b09e7f34c33b2c98f1a32114f | cdc209698c1260fba412c17d063dd9413352701b | refs/heads/master | 2020-03-12T17:34:19.926894 | 2018-05-22T18:17:52 | 2018-05-22T18:17:52 | 130,739,302 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 666 | py | # Generated by Django 2.0.5 on 2018-05-18 11:44
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('User', '0002_auto_20180517_1659'),
]
operations = [
migrations.RemoveField... | [
"kyal.smith@gmail.com"
] | kyal.smith@gmail.com |
e422554deab94dc0b4cbd8259b19d2efddecfe2b | bfc5eb03084f329755f40d54ebe2ce415c43ac88 | /Tk多窗口/myWindow.py | d7c4bb7fa545cfa61432cffa1de259cfddb9d7c6 | [] | no_license | KronosOceanus/python | 301d75ff161abd060faa552e48a08960eba22b51 | ff6c378a2327dc0b3e6cba7ec0bca25cd52010cd | refs/heads/master | 2023-03-04T02:48:46.286712 | 2021-02-15T11:10:43 | 2021-02-15T11:10:43 | 255,289,369 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 766 | py | # 窗口类
import tkinter as tk
from tkinter import messagebox
class myWindow:
def __init__(self,root,myTitle,flag):
# 创建窗口
self.top=tk.Toplevel(root,width=300,height=200)
# 设置窗口标题
self.top.title(myTitle)
# 顶端显示
self.top.attributes('-topmost',1)
# 根据不同... | [
"704690152@qq.com"
] | 704690152@qq.com |
0b09fac1656f2a6cd2b578afb6640cc93695b34a | 76776170a8fe1c065bce42b314e77018d7a127cb | /home/migrations/0001_initial.py | 65fda3fe9f85c2042cdae21d990004521914c034 | [] | no_license | himanshu98/sample-Django | d942e282d3ba16baeaad2e2eb54f594a4619c877 | f8556860d7de97685da303d7da35c000e2513b31 | refs/heads/master | 2022-11-28T12:59:37.885537 | 2020-08-13T19:20:22 | 2020-08-13T19:20:22 | 287,359,857 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 699 | py | # Generated by Django 3.1 on 2020-08-12 22:52
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Contact',
fields=[
('id', models.AutoField(au... | [
"tomarhimanshu98@gmail.com"
] | tomarhimanshu98@gmail.com |
ddd05ad17c156557bab875374be46009351bf83e | 560567db6f9805ee2bb715f550c88cfc6e4187cf | /CueCreator.py | 0d5ae722078ae4a15fe9aa8e38c0c4b6b031618f | [] | no_license | freerainx/CueCreator | a9007329d5e6b0125872541bb115c03c409e71fe | cfa6326052ac61fca3aafbc3c995829009b6aeb8 | refs/heads/main | 2023-04-09T06:21:19.013391 | 2021-04-25T17:41:38 | 2021-04-25T17:41:38 | 361,485,472 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,685 | py | import sys
from PyQt5 import QtWidgets, QtGui, QtCore
import PyQt5.sip
from PyQt5.QtWidgets import QApplication, QWidget, QLineEdit, QMessageBox, QGridLayout, QLabel, QPushButton, QFrame
from MainUI import Ui_Dialog
from Cue import cueFile
class mainWindow (QtWidgets.QWidget, Ui_Dialog):
CueDir ='F:\\Music\\Colle... | [
"freejxt@126"
] | freejxt@126 |
430a6533bd2d8961d48c25a18e940c170945ce5d | 5284385c49a2601655f08e7110f122f93c00c99b | /article/migrations/0009_alter_post_image.py | 268745fc6dc035b842c7a6336a2ab3d31b8774c4 | [] | no_license | riadelimemmedov/Sade-Sosial-media | 50964d3efc7e82b061882af1428a2a69930826a0 | a379c0a753c95d480e00ee0f6124f9f14547706b | refs/heads/master | 2023-08-14T02:26:50.828195 | 2021-09-21T04:17:01 | 2021-09-21T04:17:01 | 408,682,275 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 409 | py | # Generated by Django 3.2.4 on 2021-09-02 14:08
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('article', '0008_alter_post_image'),
]
operations = [
migrations.AlterField(
model_name='post',
name='image',
... | [
"riad.elimemmedov@mail.ru"
] | riad.elimemmedov@mail.ru |
d8ee391707950c00d257afd550aa1669106703ba | 66aecca0128d9823fd18e8840b8f341d028e7052 | /account/migrations/0003_auto_20181225_1816.py | 1f24da8d2a809860fa0d86bad72c5702b3e147ca | [] | no_license | maksimes/my-first-blog | a23b3db3f789273c58c91a9cdf9a36adc5749b1b | c57863490e1582fa840e66dfb0ce0b17dce4fcbb | refs/heads/master | 2020-04-05T12:14:31.286179 | 2019-04-03T19:46:36 | 2019-04-03T19:46:36 | 156,261,832 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 742 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2018-12-25 15:16
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('account', '0002_auto_20181225_0044'),
]
operations = [
migrations.AddField... | [
"maksimes@mail.ru"
] | maksimes@mail.ru |
5835bb5009219c382f7cf2d57f0cd5d74a3e5abd | 9d16bc0ff4d4554f6bd51718f145ab3d82467877 | /BubbleBuster.py | d933ffa7e70212cee0186be0dbbdd30678e3e69d | [] | no_license | Arisan39/BubbleBuster | 32a5475012cb7ddede272c662e00142a134cdf7c | 7b870c4be16f04efeee1a9c2de07a7385111b03b | refs/heads/master | 2020-12-15T21:23:33.158294 | 2020-01-21T04:51:07 | 2020-01-21T04:51:07 | 235,257,681 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,752 | py | import pygame
import sys
from pygame.locals import *
from Bubble import Bubble
from Player import Player
pygame.init()
screen= pygame.display.set_mode((640, 460))# add a screen & screen size
screen.fill((255, 255, 255))#this change the background's color
pygame.display.set_caption('Bubble Buster!')#add capt... | [
"noreply@github.com"
] | Arisan39.noreply@github.com |
9eaf1ce6cbbbcedac5832c605917bc09ed334036 | da154bed336f6806b3c916ba1c969099b55fcc2e | /Samples and Demos(For review)/basic_transmit.py | ab8674cd84e2272e5c8ccbb7bfc48916b4adaf02 | [] | no_license | utadahikaru/Self-CV-Practice | e3b7b3bda5f99335eb8f8dcf6e891a654e593ccb | ffc4ef3f9980f037ffb5344004752c7d43c1f13c | refs/heads/master | 2020-03-29T01:07:42.988699 | 2018-11-26T10:35:15 | 2018-11-26T10:35:15 | 149,372,440 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,979 | py | # coding:utf-8
# 0导入模块,生成模拟数据集。
import tensorflow as tf
import numpy as np
BATCH_SIZE = 8
SEED = 23455
# 基于seed产生随机数
rdm = np.random.RandomState(SEED)
# 随机数返回32行2列的矩阵 表示32组 体积和重量 作为输入数据集
X = rdm.rand(32, 2)
# 从X这个32行2列的矩阵中 取出一行 判断如果和小于1 给Y赋值1 如果和不小于1 给Y赋值0
# 作为输入数据集的标签(正确答案)
Y_ = [[int(x0 + x1 < 1)] for (x0, x1) in X... | [
"kanaliushijun@gmail.com"
] | kanaliushijun@gmail.com |
8aa68c99463545c8c82d13104e1a46c6ea0065c7 | 07e12ec5f9b8eb898c0c7c67d1e0a50ea66ca14d | /clear.py | 3b56cdcc871c022a6484c208bf29a9e8f90d1f20 | [] | no_license | EzAccount/LBM | d14566511800a330c076d2d4642e740d9a45e36f | 8fd36968646335e3ed6389e50cdf1e4399eb167b | refs/heads/master | 2022-04-18T19:32:41.252861 | 2020-03-03T20:18:35 | 2020-03-03T20:18:35 | 139,371,637 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 64 | py | #! /usr/bin/python
import os
os.system("rm -rf results/*.dat");
| [
"misha7322@hotmail.com"
] | misha7322@hotmail.com |
ee99cd3db0efef6feba5b3f967b69c3244f87446 | f6284c82a06e6a6037d7d6eb488337ce099f7566 | /geektrust_challenges/make_space/utils/constants.py | 8cbd4a9dde7f9d79cf613a0f6dcf7227c08aa1c0 | [] | no_license | kartiky9/machine_coding | 3677805c8836a6f8d32a7b2af283f3fa8ce090a5 | 30045db300a36564f6d27f002438059f329cb2e0 | refs/heads/main | 2023-07-27T08:03:56.576660 | 2021-09-09T07:27:32 | 2021-09-09T07:27:32 | 404,340,789 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 177 | py | class InputType:
BOOK = 'BOOK'
VACANCY = 'VACANCY'
class Output:
INCORRECT_INPUT = 'INCORRECT_INPUT'
NO_VACANT_ROOM = 'NO_VACANT_ROOM'
MINUTE_INTERVALS = 15
| [
"13693180+kartiky9@users.noreply.github.com"
] | 13693180+kartiky9@users.noreply.github.com |
8cf1337f8036de2054ba11a4c1ef5921ff9e2863 | 641f76328bfeb7e54f0793a18c5b7c00595b98fd | /apps/goods/migrations/0015_auto_20181019_1007.py | a9bf43d5073534905d8a89c4b1ee68ce1ac10451 | [
"Apache-2.0"
] | permissive | lianxiaopang/camel-store-api | 1d16060af92eb01607757c0423377a8c94c3a726 | b8021250bf3d8cf7adc566deebdba55225148316 | refs/heads/master | 2020-12-29T13:23:18.118617 | 2020-02-09T08:38:53 | 2020-02-09T08:38:53 | 238,621,246 | 0 | 0 | Apache-2.0 | 2020-02-07T14:28:35 | 2020-02-06T06:17:47 | Python | UTF-8 | Python | false | false | 1,439 | py | # Generated by Django 2.1.2 on 2018-10-19 02:07
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('goods', '0014_auto_20181011_1646'),
]
operations = [
migrations.AlterModelOptions(
name='goodscategory',
options={'o... | [
"lyh@gzqichang.com"
] | lyh@gzqichang.com |
a502baacd568f4ec8f715ef459a5d0689434064b | 5e557741c8867bca4c4bcf2d5e67409211d059a3 | /torch/distributed/elastic/agent/server/local_elastic_agent.py | c84df1a8e434267abf07aca90210e89b834c1b00 | [
"BSD-2-Clause",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"BSL-1.0",
"Apache-2.0"
] | permissive | Pandinosaurus/pytorch | a2bb724cfc548f0f2278b5af2fd8b1d2758adb76 | bb8978f605e203fbb780f03010fefbece35ac51c | refs/heads/master | 2023-05-02T20:07:23.577610 | 2021-11-05T14:01:30 | 2021-11-05T14:04:40 | 119,666,381 | 2 | 0 | NOASSERTION | 2021-11-05T19:55:56 | 2018-01-31T09:37:34 | C++ | UTF-8 | Python | false | false | 9,100 | py | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
import os
import shutil
import signal
import tempfile
from typing import Any, Dict, Opti... | [
"facebook-github-bot@users.noreply.github.com"
] | facebook-github-bot@users.noreply.github.com |
89043c094193f8acc281258306eb8f8f0765498e | 31766af2b2e0957e58078095d8822ffc760189ba | /baekjoon/Python/q1717.py | 562d7e9d57778af114df55ce84c6238c37ac3f20 | [] | no_license | ha-yujin/algorithm | 618d0c7c55dfee0a9b4f0ff15018feceb5f4d07f | 3318b5d7c703f5c3cb4a6475e04b2f0aaa7e7432 | refs/heads/master | 2023-01-18T16:30:28.628344 | 2020-11-30T14:14:56 | 2020-11-30T14:14:56 | 279,265,017 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 676 | py | # 집합의 표현 - Union Find
def find_parent(x):
if parent[x]==x:
return x
else:
parent[x]=find_parent(parent[x])
return parent[x]
def union(x,y):
r1 = find_parent(x)
r2=find_parent(y)
if r1 > r2:
parent[r1]=r2
else:
parent[r2]=r1
def check(x,y):
r1= fi... | [
"hoj2887@dongguk.edu"
] | hoj2887@dongguk.edu |
2445240430a4f61b9f76afca22102c4397f33bd7 | 6fcfb638fa725b6d21083ec54e3609fc1b287d9e | /python/gkioxari_RstarCNN/RstarCNN-master/lib/datasets/attr_bpad.py | 1d8c0fb80696afdd175613117b34dc6d6c4573fd | [] | no_license | LiuFang816/SALSTM_py_data | 6db258e51858aeff14af38898fef715b46980ac1 | d494b3041069d377d6a7a9c296a14334f2fa5acc | refs/heads/master | 2022-12-25T06:39:52.222097 | 2019-12-12T08:49:07 | 2019-12-12T08:49:07 | 227,546,525 | 10 | 7 | null | 2022-12-19T02:53:01 | 2019-12-12T07:29:39 | Python | UTF-8 | Python | false | false | 10,478 | py | # --------------------------------------------------------
# Fast R-CNN
# Copyright (c) Microsoft. All rights reserved.
# Written by Ross Girshick, 2015.
# Licensed under the BSD 2-clause "Simplified" license.
# See LICENSE in the project root for license information.
# -------------------------------------------------... | [
"659338505@qq.com"
] | 659338505@qq.com |
3330ec5ca7f6b0fb66c55b33c5965f82536c61ca | 72cbc497c1a36ad66cedaf6fd0a880ee331f11e7 | /uri-problem90-100.py | 2a28f871ddbca7d798ad7dff5b7bb15dfcbd4f3b | [] | no_license | Anik85/uri-begineer-solution-in-python | 9e53ce44109388f91596587f49a6c3657907c867 | 5b387c4efa007881dcc42e8bfd9e7974d2b123f3 | refs/heads/master | 2023-01-31T23:21:22.156292 | 2020-12-05T18:01:46 | 2020-12-05T18:01:46 | 291,981,824 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 595 | py | '''#just practice
digit={
"1": "one ",
"2": "two",
"3": "three",
"4": "four"
}
phone=input()
output=""
for ch in phone:
output += digit.get(ch,"!")+" "
print(output)
def function(N):
for i in range(1,N):
print(i,end=" ")
print(N)
N=int(input())
if 1<=N<=1000:
... | [
"noreply@github.com"
] | Anik85.noreply@github.com |
d01b1468d7aaf781d587e8b861611e92d26f28dd | e8f99a162207cba82d4e0f969d7bcdb2b9d8b522 | /imooc/python3_shizhan/ten/c1.py | 6a78a3e875eb35796ea35e07c606f9f44d0ef637 | [] | no_license | TesterCC/Python3Scripts | edb5446278ebf13edb64336001081941ca27d67d | 58be67e1ffc74ef50289a885aa4ad05f58e2c383 | refs/heads/master | 2023-08-30T21:16:38.328045 | 2023-08-17T11:23:08 | 2023-08-17T11:23:08 | 93,401,996 | 6 | 3 | null | null | null | null | UTF-8 | Python | false | false | 721 | py | #!/usr/bin/env python
# -*- coding:utf-8 -*-
__author__ = 'MFC'
__time__ = '18/5/2 21:48'
"""
第10章 正则表达式与JSON
正则表达式
JSON XML
正则表达式是一个特殊的字符序列,一个字符串是否与我们所设定的这样的字符序列相匹配。
快速检索文本、实现一些替换文本的操作
1.检查一串数字是否是电话号码
2.检测一个字符串是否符合email
3.把一个文本里指定的单词替换为另外一个单词
如果正则用的6,可以不用很多内置方法
"""
a = 'C|C++|Java|C#|Python|Javascript'
# Python... | [
"liyanxi07@gmail.com"
] | liyanxi07@gmail.com |
b07084a05c9106fed5e9f3fceaf902363990afb6 | 50c668e9e0c10c1bcfd093b824e58ab66867cf30 | /17-POO-constructor/main.py | 3127bcbe5c9a58779b831af0c6c681b5e346165c | [] | no_license | bthecs/Python | 1d4e9f424fce633c2fe50455654b21a1e56b3a19 | b587f67bc6f999de4e80ebb53982430e48a68242 | refs/heads/master | 2023-03-29T00:40:36.071294 | 2021-03-30T00:31:34 | 2021-03-30T00:31:34 | 352,788,286 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 468 | py | from coche import Coche
carro = Coche("Naranja","Gallardo","Ferrari",400,1000,2)
carro1 = Coche("Azul","Clio","Renault",400,1000,2)
carro2 = Coche("Blanco","Argo","Fiat",400,1000,2)
print(carro.getInfo())
print(carro1.getInfo())
print(carro2.getInfo())
#Detectar tipado
carro1 = "Perro"
if type(carro1) == Coche:
p... | [
"fl.gimenez@alumno.um.edu.ar"
] | fl.gimenez@alumno.um.edu.ar |
3b34003880bed4318fd90ace0533ced787c31225 | cc9405d9b7233b103e66660054db1f640ca6147a | /core/urls.py | 719d616cdf74716ca76d53fcf6f2864b82983328 | [] | no_license | devjass/WebPlayGround | d6f5f1704fffacfe6c2a683a533b24b20d07aaff | 8e8600078895d9e91847bcf5bb71f4bbc98ca082 | refs/heads/master | 2023-05-15T19:25:48.091753 | 2021-06-12T05:50:20 | 2021-06-12T05:50:20 | 376,207,388 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 206 | py | from django.urls import path
from .views import HomePageView,SamplePageView
urlpatterns = [
path('', HomePageView.as_view(), name="home"),
path('sample/', SamplePageView.as_view(), name="sample"),
] | [
"development.jass@gmail.com"
] | development.jass@gmail.com |
c38c19f67d976a9f4044f56d3cdcc1eb31710082 | c9cafe2123fd348174f36e110865dc7915c45a8f | /blog/models.py | 153ed935b43349f992606f862b716cf7eb37955c | [] | no_license | CESAREOMARIO/mi_segundo_blog | 899e11565d3f156a631e0f0de421ad476f1b2e7c | 229264b46435f20a9aa71ab17f73dd5f7ed9d44c | refs/heads/master | 2020-08-06T18:10:36.591464 | 2019-10-06T03:08:11 | 2019-10-06T03:08:11 | 213,102,410 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 521 | py | from django.db import models
from django.utils import timezone
# Create your models here.
class Post(models.Model):
author = models.ForeignKey('auth.User', on_delete=models.CASCADE)
title = models.CharField(max_length=200)
text = models.TextField()
created_date = models.DateTimeField(default=timezone.now)
publish... | [
"cguajardomur@gmail.com"
] | cguajardomur@gmail.com |
f6875d21a1e2ef9361652317b273c9e108e0d214 | e6452c8706e90638e31ad7d56e597d9ac51006ef | /urls.py | f75dab217c7b38fb7be8376d09d5fef5e4f01b74 | [] | no_license | gelliravi/Django-redis_auth | 23024602a3d45f48af6a8f4a96d7e1bc3e0a1ada | 93bf514613270565b35e01100e60ee46bf5bb5eb | refs/heads/master | 2021-01-01T19:56:21.890945 | 2012-04-20T00:13:44 | 2012-04-20T00:13:44 | 9,632,224 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 571 | py | from django.conf.urls.defaults import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'redis_auth.views.home', name='home'),
# url(r'^redis_auth/', include('redis_auth.foo.u... | [
"mark.vismonte@gmail.com"
] | mark.vismonte@gmail.com |
6e412c2830f0c0210c5542502eff73dfa2776a76 | 1b78ca7f3250ebed418717c6ea28b5a77367f1b8 | /411.minimum-unique-word-abbreviation/minimum-unique-word-abbreviation.py | 70887cecba089f780017d17a96ca6739c187979c | [] | no_license | JaniceLC/lc-all-solutions | ced854f31b94f44c0b03a0677988805e3b9ee718 | 3f2a4ee8c09a8890423c6a22c73f470eccf979a2 | refs/heads/master | 2020-04-05T19:53:31.307528 | 2018-11-12T04:18:45 | 2018-11-12T04:18:45 | 157,155,285 | 0 | 2 | null | 2018-11-12T04:13:22 | 2018-11-12T04:13:22 | null | UTF-8 | Python | false | false | 1,290 | py | class Solution(object):
def minAbbreviation(self, target, dictionary):
"""
:type target: str
:type dictionary: List[str]
:rtype: str
"""
def dfs(w, start, res):
res.append(w)
for i in xrange(start, len(w)):
for l in re... | [
"jedihy@yis-macbook-pro.local"
] | jedihy@yis-macbook-pro.local |
c2f1bce72a4047a4cf454934f74b03c2b20d0bdf | 8fd6ee528f4699559174b80fe88965486a669523 | /Futu/trade/kline2.py | 813aa85eefbb631fe887752e027290544a784de6 | [] | no_license | aptentity/futu_quoter | 60ce51616b0c93e06beca4ce59a2d86641b75a7a | 78c7df1b3de25d605415f01b5bb6cf3f235ba6df | refs/heads/master | 2023-03-27T14:40:45.853176 | 2021-03-18T07:04:27 | 2021-03-18T07:04:27 | 328,276,512 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,033 | py | # -*- coding: utf-8 -*-
from pyecharts import options as opts
from pyecharts.charts import Kline
data = [
[2320.26, 2320.26, 2287.3, 2362.94],
[2300, 2291.3, 2288.26, 2308.38],
[2295.35, 2346.5, 2295.35, 2345.92],
[2347.22, 2358.98, 2337.35, 2363.8],
[2360.75, 2382.48, 2347.89, 2383.76],
[2383.... | [
"aptentity@163.com"
] | aptentity@163.com |
b4e2926b4134199eaadf96a67e52631ed4a9bbce | 427200bdf814d859665f449542fe6c9c1de5a96c | /doc/source/conf.py | a9715d0ad0714672009bacc401a85b5984fd9da9 | [
"BSD-3-Clause"
] | permissive | giltis/pyRafters | c54f6c4c8f02370ad168a3c90d1ce490077b5d78 | 94bf0e1d671ce58f6cbc09600e99a6d2a4b0127c | refs/heads/master | 2021-01-22T13:22:19.768905 | 2014-03-28T13:40:24 | 2014-03-28T13:40:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,737 | py | # -*- coding: utf-8 -*-
#
# PyLight documentation build configuration file, created by
# sphinx-quickstart on Thu Jan 30 13:08:54 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# A... | [
"tcaswell@bnl.gov"
] | tcaswell@bnl.gov |
5920ba78e09eb4f5be44b465dda4879c3b817140 | 1bfebc7e1c95cd3c25024b6b1adbf518e55513bf | /src/pykit/strutil/test/test_hex.py | 111d8a160a9a91f0c53b0653ae2f85d8536d8489 | [
"MIT"
] | permissive | bsc-s2/ops | a9a217a47dad558285ca8064fa29fdff10ab4ad7 | 6fb8ad758b328a445005627ac1e5736f17088cee | refs/heads/master | 2021-06-24T09:32:49.057026 | 2020-11-02T06:50:01 | 2020-11-02T06:50:01 | 123,527,739 | 8 | 0 | MIT | 2020-09-03T04:58:26 | 2018-03-02T03:54:20 | Python | UTF-8 | Python | false | false | 5,256 | py | #!/usr/bin/env python2
# coding: utf-8
import os
import unittest
from pykit import strutil
from pykit.strutil import Hex
from pykit import ututil
from pykit import utfjson
dd = ututil.dd
class TestHex(unittest.TestCase):
def test_init(self):
byte_length = 3
cases = (
(0, 0),
... | [
"drdr.xp@gmail.com"
] | drdr.xp@gmail.com |
1175d5410bea7a625814a1ad364a134aea18001a | 64c491fbb983a2c35bc0a31e18b4797bf915525a | /search_folds.py | 59b231963c6acb5ad0e8e252a8fd773cfa350f26 | [
"MIT"
] | permissive | fabiohsmachado/bn_learning_milp | 75e7c9fd1486d46084c41db8bf11efb8650609da | 05ec0999969ac7c439c0cd881925399beef0613a | refs/heads/master | 2021-05-29T08:37:45.459331 | 2015-08-11T18:07:10 | 2015-08-11T18:07:10 | 33,931,330 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 507 | py | import sys
from milp import ComputeMILP
def SearchFold(scoreFile, treewidth):
print "Managing dataset ", scoreFile;
ComputeMILP(scoreFile, treewidth);
print "Finished managing dataset", scoreFile, "with time.\n";
def SearchFolds(fileList, treewidth):
for scoreFile in fileList:
SearchFold(scoreFile, treewidth);... | [
"fabiohsmachado@gmail.com"
] | fabiohsmachado@gmail.com |
a252840d3048e3d032bdb954edc31e7fcb80d614 | 4c444d7fd25c645cc48820fa103cad36ae963d81 | /django_demo/settings.py | 96a001869d4776c0b353dcde86f0a9a40cf8abc4 | [] | no_license | sanghee911/django-rest-api | 8fd1ecf95b0490244f9b09c61298e950f2af4696 | 1697b26abda0493383f19e69eff912c2d1eace48 | refs/heads/master | 2021-09-02T01:16:58.258065 | 2017-12-29T15:28:49 | 2017-12-29T15:28:49 | 113,106,162 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,970 | py | """
Django settings for django_demo project.
Generated by 'django-admin startproject' using Django 1.11.3.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
impor... | [
"sanghee911@hotmail.com"
] | sanghee911@hotmail.com |
28bae91f06a0f3667e8316de61e7ad47890a2a95 | 5000676812f8ede0beb861c185df67b862b5be55 | /src/get_reference_to_original_future_when_use_as_completed.py | 313c6d58c11264f80f3a58aa367e5972da4a74d1 | [] | no_license | oleyeye/python_code | 3cf3493dffcb23baa34deda083b488890e6cbf34 | 20ed14c5edfea4d156a5710f7f39bfdc10f2fdcc | refs/heads/master | 2020-04-17T10:41:16.573058 | 2019-01-19T05:51:54 | 2019-01-19T05:51:54 | 166,510,070 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 852 | py | import asyncio
async def coro(sec):
print(f'Coroutine {sec} is starting')
await asyncio.sleep(sec)
print(f'Coroutine {sec} is done')
return sec
async def main():
futures = {asyncio.ensure_future(coro(i)): f'item({i})' for i in range(1,5)}
for future in as_completed_hooked(futures.ke... | [
"tigerlee7@163.com"
] | tigerlee7@163.com |
197926393868d21e6ae154a9dd519b9c67bbad9c | cd014fae6791f51a9a382f34dbdcee6d61d84e30 | /64_eqf_fveqf_fvf_fvegf/64.py | 64fae91ef51cb384faf818ac502876f63733d358 | [
"Apache-2.0"
] | permissive | ckclark/Hackquest | 1505f50fc2c735db059205d1c9bbba1832cc5059 | 65ed5fd32e79906c0e36175bbd280d976c6134bd | refs/heads/master | 2021-01-16T19:32:29.434790 | 2015-09-29T13:39:04 | 2015-09-29T13:39:04 | 42,388,846 | 13 | 5 | null | null | null | null | UTF-8 | Python | false | false | 460 | py | lines = [x.strip() for x in open('64.txt').readlines()]
for shift in [16]: #range(len(lines[0])):
out_graph = []
for line in lines:
out_line = []
for i in range(len(line) - shift):
if line[i] == line[i + shift]:
out_line.append(' ')
else:
o... | [
"clark.ck@gmail.com"
] | clark.ck@gmail.com |
e5811eaa99eb0ea2a9e3f35b55128c42962f6ab6 | ffd1413f7ed9c78726addccb328a616e4c62a635 | /migrations/log_ignore.py | 53120ab5f78177fe275ba273fb81bd08b3a9d050 | [
"MIT"
] | permissive | NotSoPrivate/NotSoBot | 4be3fd33954830887e98f0abadb3df985f8ca917 | 75a30ead638f824035bc06d93a62ba726845ceaa | refs/heads/master | 2023-03-14T17:00:24.941399 | 2021-03-22T13:05:34 | 2021-03-22T13:05:34 | 350,292,977 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 959 | py | import pymysql
import datetime
connection = pymysql.connect(host='localhost',
user='discord',
password='q3cnvtvWIy62BQlx',
db='discord',
charset='utf8mb4',
cursorclass=pymysq... | [
"root@mods.nyc"
] | root@mods.nyc |
9ecc842f23895f3713c99a55702174b7192797fa | 31e7aa5176876e6caf7ff9b37336b39292c9dd5b | /selfdrive/controls/lib/pathplanner.py | de43c041805990c89541efeab04f50f6241ea132 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | avolmensky/openpilot | 02d822f7eb50bb74368c794a3d580f95a53c2ca4 | dc61915529aabfad62061e784f277af311013cf1 | refs/heads/devel | 2021-12-15T01:43:10.994332 | 2020-02-14T01:30:43 | 2020-02-14T02:33:40 | 191,065,999 | 2 | 9 | MIT | 2019-06-26T10:13:29 | 2019-06-09T23:32:13 | C | UTF-8 | Python | false | false | 9,158 | py | import os
import math
from common.realtime import sec_since_boot, DT_MDL
from selfdrive.swaglog import cloudlog
from selfdrive.controls.lib.lateral_mpc import libmpc_py
from selfdrive.controls.lib.drive_helpers import MPC_COST_LAT
from selfdrive.controls.lib.lane_planner import LanePlanner
from selfdrive.config import ... | [
"user@comma.ai"
] | user@comma.ai |
957a10da60dedb198e915925d91593a08f1c4fba | 67a94314b9a64078ac6463592555d80f1236a7e4 | /KNeighborsClassifier of my_eMeL/KNeighborsClassifier of my_eMeL.py | a60ed17817642c01e1f3e533f70f0e7254e4354c | [] | no_license | UlucFVardar/my_eMeL | b413b9171d7a599e358a16c836e7a4a2b05711e4 | 255fd6da0ff8ab3406af9b6bceecf746cc473f45 | refs/heads/master | 2020-04-23T12:32:36.667338 | 2019-03-01T21:07:21 | 2019-03-01T21:16:36 | 171,172,505 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,585 | py | #!/usr/bin/env python
# coding: utf-8
# ## Needed Libs
# For this lecture I started to develop a library.
# with using this lib all ML lecture can be coverted.
# with every assignment lib will grove
# In[1]:
import my_eMeL.my_eMeL as my_eMeL
import my_eMeL.data_loader as data_loader
# ### Reading data... | [
"ulucfurkanvardar@gmail.com"
] | ulucfurkanvardar@gmail.com |
b4b726de7dd2fe2197a67e6aa174fe63bd1eb9a1 | 1616557beba5f845fa909950f548254bb5e1a982 | /dictionary.py | 7ca13d0b34b96c4e7eb8940138988922fa388391 | [] | no_license | devendrasingh143/python | 8123a98b5bef93b53e4791a191eba25f4582d6a2 | 4ff6f30c48670dc96c73274615e0230cb7fbb49d | refs/heads/master | 2021-01-21T11:45:59.885607 | 2014-08-05T08:56:55 | 2014-08-05T08:56:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,394 | py | eng2sp = dict()
eng2sp['a', 's', 'd']=['z', 'x', 'c']
print(eng2sp)
eng2sp = dict()
eng2sp={'one': 'uno', 'two': 'dos', 'three': 'tres'}
print('\n')
print(eng2sp)
print(len(eng2sp)) #number of keys
print('one' in eng2sp) #it tells whether something appears as a key in the dictionary.
print('uno' in eng2sp)
vals = eng... | [
"deniedchrist.rathore5@gmail.com"
] | deniedchrist.rathore5@gmail.com |
8cb65e961c15c1d5dd99cefb8b667cdf46ad9471 | 8d2c2f2f80204c4d90ed691dc0c8ed148cbe20af | /code/defaults.py | 3d4f9dc1b8cfa1ce1bf13f88555bf351f55567d9 | [] | no_license | matttrd/information_sampler | 1dbf434622fd383a60b8f36a03a55c0681ef0cd2 | f2cdbd00a7828bdf526cf7b4869e0a899f559d2b | refs/heads/master | 2022-04-09T06:39:20.278305 | 2020-03-31T21:29:21 | 2020-03-31T21:29:21 | 176,366,532 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,526 | py |
SAVE_EPOCHS = [0,59,119,159]
TRAINING_DEFAULTS = {
'cifar10': {
#"epochs": 180,
#"b": 128,
"save_epochs" : SAVE_EPOCHS,
#"wd":5e-4,
#"lrs": '[[0,0.1],[60,0.02],[120,0.004],[160,0.0008]]'
},
'cifar100': {
"epochs": 180,
#"b": 128,
"save_epochs" ... | [
"matteoterzi.mt@gmail.com"
] | matteoterzi.mt@gmail.com |
d20052ac78b0218a2ba50a2894ff44eaf07bc208 | ec5b0e75b17489c264107ea5d9152ae3d2717a5b | /reconstructShamir.py | b7013b53463a4063bfd48e1614e7a31b49ab3ef1 | [] | no_license | taabishm2/Proactive-FDH-RSA-Signature | b3e571914bf22c6aa692f5ddd619fad4c54b96fe | 69f2889d4dc580b3a958dce75ff651f8cbb7c271 | refs/heads/master | 2020-05-07T18:46:21.694210 | 2019-07-24T15:23:14 | 2019-07-24T15:23:14 | 180,783,053 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 815 | py | import fileOp
import RSAFeldmanVSS
def reconstruct_shamir(shares,i,t=0): #Do we have to mention which additive share these backups belong to? i.e. need for 'i'?
'''Verify first using VSS and then reconstruct, i is index of the additive share for vss_p, etc'''
vss_q = fileOp.read_list("FvssQ")[0]
vss_p = f... | [
"taabishm2@gmail.com"
] | taabishm2@gmail.com |
f43198ced2fc10d9bb99c03a434993608a6a4df1 | e396c4a15caf661588cd73fdf1b46bfe7899d011 | /Machine_Learning/linear_regression.py | fa089096e9717dde9fea7985ea42bb99afd472d9 | [] | no_license | VictorGulart/DataScience | 42355bf7ce5b9e5e5f9d33238018b55a13620ceb | 62910b8b5f3651a2d5621767071dc1c388da0003 | refs/heads/master | 2023-08-12T13:27:07.552707 | 2021-10-13T18:01:14 | 2021-10-13T18:01:14 | 295,250,559 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,874 | py | import math
import numpy as np
from statistics import mean
import matplotlib.pyplot as plt
from matplotlib import style
style.use('fivethirtyeight')
'''
Defining my own liner regression algorithm
Linear Regression is basically the best fist line
-> applying linear algebra for Linear Regression
y = mx + b
m = ( ... | [
"aureumtempus@protonmail.com"
] | aureumtempus@protonmail.com |
b336e9d406c8e195778f6588752748e100d7e6b6 | 97445678c009b02a32975abd464ca03216d185ef | /django_practice_2/load_initial_data_2.py | 93e08008fda1d6c77d9d8b50739e4a48a14b268d | [] | no_license | jwinf843/wdc-django-practice-2 | edca54cf43c7f8926b85fddc867937acfafb68a7 | c26d9a1818a2b624e409b09f82cc29b24a300d3c | refs/heads/master | 2020-03-15T09:22:27.417114 | 2018-05-06T14:18:45 | 2018-05-06T14:18:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,180 | py | import django
def main():
django.setup()
from artists.models import Artist
from django.contrib.auth.models import User
User.objects.all().delete()
Artist.objects.all().delete()
User.objects.create_superuser(
username='admin', email='admin@example.com', password='admin')
ARTISTS... | [
"zugnoni.ivan@gmail.com"
] | zugnoni.ivan@gmail.com |
4325bb0a9a24eb4fd75d2dd52a78330a20b42d2b | 3ca599bf6998f36e283f2024e8869a233931a965 | /lib/output.py | 8b74b540821afbeabbb430a110794eb7ec52133f | [
"BSD-2-Clause"
] | permissive | johnjohnsp1/mesc | 6b23ba0b208c084cb926ff7631087afea825a24b | bfc3a0e5d710f586ea75a9d23a29cd8f2307d500 | refs/heads/master | 2020-12-25T23:46:51.436435 | 2014-11-13T21:53:03 | 2014-11-13T21:53:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,634 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__license__ = """
███╗ ███╗███████╗███████╗ ██████╗
████╗ ████║██╔════╝██╔════╝██╔════╝
██╔████╔██║█████╗ ███████╗██║
██║╚██╔╝██║██╔══╝ ╚════██║██║
██║ ╚═╝ ██║███████╗███████║╚██████╗
╚═╝ ╚═╝╚══════╝╚══════╝ ╚═════╝
MESC: Minimun Essential Security Checks
Author... | [
"miguel.morillo@gmail.com"
] | miguel.morillo@gmail.com |
b2fcdf4b6dc405488bfc98d9ae9b64c0609f42ae | 9668a304a46a77eef55a6fb6e2a097049f088a9e | /newBlog/models.py | 58a613aa551dc436b8574e7c5ffd461ca5c8c5a3 | [] | no_license | AineKiraboMbabazi/Blog-Django | ce030b1786905ef044bf10bf4922c1d600a54529 | 6d72aec43effd453d198c079b30afa670c7c1c97 | refs/heads/master | 2021-06-23T06:09:26.704381 | 2019-03-19T09:50:35 | 2019-03-19T09:50:35 | 176,450,991 | 0 | 0 | null | 2021-06-10T21:17:05 | 2019-03-19T07:29:20 | Python | UTF-8 | Python | false | false | 578 | py | from django.db import models
# Create your models here.
from django.db import models
from django.utils import timezone
class Post(models.Model):
author = models.ForeignKey('auth.User', on_delete=models.CASCADE)
title = models.CharField(max_length=200)
description = models.TextField()
creation_date = m... | [
"miraqomambasa@gmail.com"
] | miraqomambasa@gmail.com |
331c011eaa5c5078287cccdaa9759838135b7f83 | a81ab54706f673f17abaf979d30eff2c08b5cf7b | /scripts/handle_path.py | e87634523705da2bff9e20cb1f1fe90a8a8ddab7 | [] | no_license | yhusr/future | af1feff82dc70f904ee23590ebdc09a5801eeb85 | 250f6fa1817b3cbbf46672b629cd2b0c7d590692 | refs/heads/master | 2021-06-26T01:42:00.520164 | 2021-04-05T13:39:13 | 2021-04-05T13:39:13 | 225,109,578 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 872 | py | """
Time:2019/11/17 0017
"""
import os
# 获取根目录路径
BASEPATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# 获取配置文件目录
CONFIGPATH = os.path.join(BASEPATH, 'configs')
# 获取配置文件的具体路径
YAMLPATH = os.path.join(CONFIGPATH, 'casesconf.yaml')
# 获取excel的data路径
DATAPATH = os.path.join(BASEPATH, 'datas')
# 获取excel... | [
"904239064@qq.com"
] | 904239064@qq.com |
50b28d0ed7daa7be97decf477b846c80cd2df47e | 4f0385a90230c0fe808e8672bb5b8abcceb43783 | /框架/crawler/scrapy/scrapy_demo/scrapy_demo/spiders/quotes.py | 8c9928611b92d882b2c0eebf7d5163ee20e145da | [] | no_license | lincappu/pycharmlearningproject | 4084dab7adde01db9fa82a12769a67e8b26b3382 | b501523e417b61373688ba12f11b384166baf489 | refs/heads/master | 2023-07-10T05:21:15.163393 | 2023-06-29T14:02:35 | 2023-06-29T14:02:35 | 113,925,289 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,268 | py | # -*- coding: utf-8 -*-
import os
import sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
import scrapy
from scrapy_demo import items
from scrapy_demo import settings
import scrapy.settings
from scrapy.mail import MailSender
# 这是最普通的爬虫形式,
# class QuotesSpider... | [
"lincappu@163.com"
] | lincappu@163.com |
1f97596a4534396f4848c29caeee8100eb7f788e | de1abd0ebbb817aa5f23d369e7dda360fd6f1c32 | /chapter3/scrapy/wikiSpider/wikiSpider/settings.py | 9bf879252847b3f89efa7323e1c40f4f86ae3b30 | [] | no_license | CodedQuen/Web-Scraping-with-Python- | 33aaa2e3733aa1f2b8c7a533d74f5d08ac868197 | 67f2d5f57726d5a943f5f044480e68c36076965b | refs/heads/master | 2022-06-13T01:34:39.764531 | 2020-05-05T11:07:01 | 2020-05-05T11:07:01 | 261,435,932 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,258 | py | # -*- coding: utf-8 -*-
# Scrapy settings for wikiSpider project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# http://doc.scrapy.org/en/latest/topics/settings.html
# http://scrapy.readthedocs.or... | [
"noreply@github.com"
] | CodedQuen.noreply@github.com |
fde9e29a1d3f8167b29c9268be16769f23716b6f | d0c88770cac95cf837dc7ea33eb41c84588c5ee5 | /game/collision.py | 505730b4ac90102d2822809099a4ac2d83f0c024 | [] | no_license | bmaclean/ascii-zoo | bf671a49a529c9b5a57ca2710cbd3fc044d3b059 | 16e5a27f3a3d74a162b6cad2c01fff2a916444a3 | refs/heads/master | 2022-07-27T21:34:38.437654 | 2019-05-30T19:41:23 | 2019-05-30T19:41:23 | 159,284,851 | 0 | 0 | null | 2022-06-21T21:40:43 | 2018-11-27T06:08:58 | Python | UTF-8 | Python | false | false | 785 | py | import os
from app_config import root_dir
import pygame
class Collision:
sound_filepath = os.path.join(root_dir, 'assets/zapsplat_cartoon_punch_002_17900.wav')
sound = pygame.mixer.Sound(sound_filepath)
def __init__(self, animal1, animal2):
self.animal1 = animal1
self.animal2 = animal2
... | [
"brendan.maclean94@gmail.com"
] | brendan.maclean94@gmail.com |
531af58373c2595fa690550bdb0e1fe88237820e | 13c5a070c180a7cdac899ee40e094896694becfa | /employeeproject/employeeproject/settings.py | f0c7ff6f25cd46f51a6470d818e90333fa02f751 | [
"Apache-2.0"
] | permissive | cs-fullstack-2019-spring/django-formclassv2-cw-clyde5649 | 3a0c87be10b961b5c6b90759bfd65f1e1dc3be43 | 4986a3145c2b06d309ac9c2ebf9231b83bf3c279 | refs/heads/master | 2020-04-25T17:28:40.551451 | 2019-03-01T20:05:36 | 2019-03-01T20:05:36 | 172,949,627 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,130 | py | """
Django settings for employeeproject project.
Generated by 'django-admin startproject' using Django 2.0.6.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/ref/settings/
"""
impo... | [
"clyde.bledsoe@yahoo.com"
] | clyde.bledsoe@yahoo.com |
33570dc3d1b45740d29e24bcb7b74956bd79dec5 | fa5006f55b612d22e8d69a006065ac0eca8fccc6 | /track.py | dd87681e917f76cd260e82e9f6337a38c3a05d3d | [] | no_license | Arrowana/vroom | 3bbc7a00c1eccbd41c6a6813e862837342ee9289 | fb70b81e927373e96dd433718073044912eed3f1 | refs/heads/master | 2021-01-12T10:41:48.208368 | 2016-11-06T10:22:14 | 2016-11-06T10:22:14 | 72,621,878 | 0 | 0 | null | 2016-11-06T10:32:19 | 2016-11-02T09:00:37 | Python | UTF-8 | Python | false | false | 3,002 | py | from matplotlib import pyplot as plt
from random import random
import math
import numpy
import pdb
def convex_hull(points_input):
points = points_input[:]
points = sorted(points, key=lambda x: x[0])
print(points)
U=[]
L=[]
def cross_product(o, a, b):
return (a[0] - o[0])*(b[1] - o[1]... | [
"pierre.duval@gadz.org"
] | pierre.duval@gadz.org |
eee6d67932cc653ddbb810dc59c3e19fcdce12f3 | 8acb126606d430ae546fa13ebd3d6b8200b4a7d1 | /lib/modeling/DSN.py | e249291d12012b67211ec8f9a2dc6489dcc63073 | [
"MIT"
] | permissive | MeowMeowLady/InstanceSeg-Without-Voxelwise-Labeling | 7a3a65e2dc43d35655a1cd0bcc517038ace98923 | 5ac8ceb42d3c82b4c31871d14654e7444b3b1629 | refs/heads/master | 2020-08-22T06:44:16.602237 | 2020-04-20T15:07:53 | 2020-04-20T15:07:53 | 216,340,297 | 10 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,605 | py | # -*- coding: utf-8 -*-
"""
Created on 18-11-16 下午3:34
IDE PyCharm
@author: Meng Dong
"""
import torch
import torch.nn as nn
import torch.nn.functional as nnf
from core.config import cfg
class dsn_body(nn.Module):
def __init__(self):
super(dsn_body, self).__init__()
self.conv1a = nn.Conv3d(1, ... | [
"noreply@github.com"
] | MeowMeowLady.noreply@github.com |
d90bbf146be2cf8d882bcac5844e04533816c778 | 4b40d911e2b3109717463437c9740f06eea9f4ce | /weighted_lottery.py | 01696a38a194a2976223d334869a71cc1c683bf8 | [] | no_license | Code-JD/Python_Exercises_Notes | 94eaba8716306324ad424d085c072e2f278a0ddd | b83b8391375eea6e8ea0a9ed17a635b370c2054f | refs/heads/master | 2020-09-19T20:34:51.478650 | 2020-01-22T02:25:22 | 2020-01-22T02:25:22 | 224,291,170 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,485 | py | # import numpy as np
# def weighted_lottery(weights):
# container_list = []
# for (name, weight) in weights.items():
# for _ in range(weight):
# container_list.append(name)
# return np.random.choice(container_list)
# weights = {
# 'winning': 1,
# 'losing': 1000
# }
# print(weigh... | [
"jonathan.d.herring@gmail.com"
] | jonathan.d.herring@gmail.com |
b63224119f103400cd98d53d767ebf99d1f01f61 | ba921a5286df9a2d1c66f28a8bcdd6a60eb0eb0b | /organization/migrations/0001_initial.py | 8f3b08e33973e47dd94562ef85c7ef68c20e56ef | [] | no_license | Shaurya9923/Hackathon-Case-Management-System | 33b3ae97582f9553d11df1f11c2970d07d03f5c5 | 6eb782d6e665260cb2abb795370ea58b5764f0c3 | refs/heads/main | 2023-02-15T22:18:23.751424 | 2021-01-03T11:08:24 | 2021-01-03T11:08:24 | 326,386,294 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,376 | py | # Generated by Django 3.0.8 on 2020-07-24 14:13
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='organiation',
fields=[
... | [
"shauryamehta9923@gmail.com"
] | shauryamehta9923@gmail.com |
316dbf8c733316c4baf8d3471c2d9aaf98e2ff79 | 85fdf45f4047e78bc92818debd69c8795aa31ce9 | /home/api_1_0/verify_code.py | abb9d7a6647b5f23ba1b62116e8d98300e954f4c | [] | no_license | Lgvcc/iHome | 15cfe3891216f7c7b848e57f2a5c9a680df54024 | 71484600bb49459cf1fc79a8b87924ce9051b8f6 | refs/heads/master | 2020-06-15T22:44:30.206382 | 2019-07-09T15:44:18 | 2019-07-09T15:44:18 | 195,411,768 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,073 | py | # coding:utf-8
from flask import current_app, jsonify, make_response
from . import api
from home.utils.captcha import captcha
from home import redis_store
from home.constants import REDIS_IMAGE_CODE_EXPIRE
from home.utils.response_code import RET
@api.route('/image_codes/<image_code_id>')
def get_image_code(image_co... | [
"18790334713@163.com"
] | 18790334713@163.com |
fcd8de835cfb135f10a819e6fd43dbc457b9f1eb | 78c110eaf5b3b89a8d609e5b9d01aeec2c86d781 | /03_multidimensional_lists/2021.02_multidimensional_lists_lab/01_Sum Matrix Elements.py | 6036f2771433e15cbf45eff8c0a548d4da986bf4 | [] | no_license | NPencheva/Python_Advanced_Preparation | 08c42db6fdecae92b12c335d689433eaaa43e182 | beee92a4e39538e873936140840a09f770ae7aeb | refs/heads/master | 2023-03-02T16:35:05.045227 | 2021-02-10T21:35:29 | 2021-02-10T21:35:29 | 332,894,438 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 298 | py | number_of_rows, number_of_columns = [int(x) for x in input().split(", ")]
matrix = []
matrix_sum = 0
for row_index in range(number_of_rows):
row = [int(y) for y in input().split(", ")]
matrix.append(row)
for index in matrix:
matrix_sum += sum(index)
print(matrix_sum)
print(matrix)
| [
"nvpencheva@gmail.com"
] | nvpencheva@gmail.com |
ec31acbdb0cf41622d1a325d3f894382ad8fd78f | d4fa331d7d8a00865f99ee2c05ec8efc0468fb63 | /alg/remove_k_digits.py | f25427c08b7db78277402c25b6aa25fed1054238 | [] | no_license | nyannko/leetcode-python | 5342620c789a02c7ae3478d7ecf149b640779932 | f234bd7b62cb7bc2150faa764bf05a9095e19192 | refs/heads/master | 2021-08-11T04:11:00.715244 | 2019-02-05T15:26:43 | 2019-02-05T15:26:43 | 145,757,563 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 537 | py | class Solution(object):
def removeKdigits(self, num, k):
"""
:type num: str
:type k: int
:rtype: str
"""
if len(num) <= k:
return '0'
stack = []
for i in num:
while stack and k > 0 and stack[-1] > i:
stack.pop()... | [
"9638293+nyannko@users.noreply.github.com"
] | 9638293+nyannko@users.noreply.github.com |
ba1cba5c8a2a1b7898a46fb6a4abeebd84541336 | 51885da54b320351bfea42c7dd629f41985454cd | /abc075/c.py | 18f98c98169acb0c09d089c7c2b89ef4b8bc0bd0 | [] | no_license | mskt4440/AtCoder | dd266247205faeda468f911bff279a792eef5113 | f22702e3932e129a13f0683e91e5cc1a0a99c8d5 | refs/heads/master | 2021-12-15T10:21:31.036601 | 2021-12-14T08:19:11 | 2021-12-14T08:19:11 | 185,161,276 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,777 | py | #
# abc075 c
#
import sys
from io import StringIO
import unittest
from collections import deque
class TestClass(unittest.TestCase):
def assertIO(self, input, output):
stdout, stdin = sys.stdout, sys.stdin
sys.stdout, sys.stdin = StringIO(), StringIO(input)
resolve()
sys.stdout.seek... | [
"mskt4440@gmail.com"
] | mskt4440@gmail.com |
a334a0c204fac1c32004bf0b488df99ca06cd6c8 | fdb91a44b774edb78ec904e2a76edd60b3aac528 | /ex25.py | 6db1261d6f3604391723219fe40743dc1a5979f9 | [] | no_license | xia0m/LPTHW | 9447cdff2a84f2a867f34d6b3b2e9d4b46bf3c0a | 4f23b0e60d2e2e38d8f989a3a7f616c6c5e90c1d | refs/heads/master | 2020-05-14T14:26:36.742772 | 2019-04-22T06:12:09 | 2019-04-22T06:12:09 | 181,833,599 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,392 | py | def break_words(stuff):
"""This function will break up words for us."""
words = stuff.split(' ')
return words
def sort_words(words):
"""Worts the words."""
return sorted(words)
def print_first_word(words):
"""Prints the first word after popping it off."""
word = words.pop(0)
print(word)
def print_las... | [
"alexma325@gmail.com"
] | alexma325@gmail.com |
5a53f221c372ba4f516ce29fa0811152cfe05e26 | 7cbd54c390f57982bb0f81ae67351cf512f08ad1 | /Scripts/Sims/SLiM/PopExpansion/PopExpansionChangedRecRate/simulate_treeseqPopExpansionNeutral.py | dec79a1f2309f84c4393c9b714464ef20d8570d5 | [] | no_license | dortegadelv/HaplotypeDFEStandingVariation | ee9eaa9a44169523349bef09d836913221bf24cb | eb196acf6bbaa43f475f132b667f0f74b6f7cee4 | refs/heads/master | 2022-05-25T03:47:39.948444 | 2022-03-07T22:41:15 | 2022-03-07T22:41:15 | 108,029,910 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,624 | py | #! /usr/bin/env python3
import gzip
import numpy as np
import sys
import argparse
import os
def read_boundaries_as_dict():
bounds = gzip.open('./annotations/hg19.recomb.boundaries.txt.gz')
bounds = bounds.readlines()
bounds = [x.decode('utf_8').strip('\n').split(' ') for x in bounds]
bounds = [[x[0], ... | [
"gochambas@gmail.com"
] | gochambas@gmail.com |
2e520ceaa6db8cdadf3aa8bd40a79b659dd16308 | 2c318438747613034dfb4c3f9099fba1c3c98d30 | /run.py | f1a9f2fa006080e4b2d9a83ef9ff3e719c6e9bcf | [] | no_license | wycstar/bthub_all | 674e00239993b636c3af4d2937a73639c5859c38 | 96f1b2adc00e0515dedfe9f9b65624b0b5203ae4 | refs/heads/master | 2021-07-03T23:19:55.083423 | 2017-09-26T11:29:30 | 2017-09-26T11:29:30 | 103,232,485 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 462 | py | #!/usr/bin/env python
# -*-coding:utf-8 -*-
from spider import Master
from spider import DHTServer
from server import SITE, SERVER
from db import DataProcess
if __name__ == '__main__':
q = DataProcess()
q.start()
# master = Master()
# master.start()
# dht = DHTServer(master, "0.0.0.0", 6881, max_... | [
"wycstar@live.com"
] | wycstar@live.com |
ccf9c467b82d8823d29085edb6e3716535af8ad0 | 69f631bb9f2f1b48fd06eb57a6647dcc403addf2 | /Face_Mask_Model.py | 7815039579c6fbf18f26265e16a9eb544b1aee43 | [
"MIT"
] | permissive | Mridul20/Face-Mask-Detector | 75436c552acb35426360a56fbe108f805a061a51 | 3cc9b42fb2ced83710814334308c258e1bb04770 | refs/heads/main | 2023-02-02T10:15:30.694803 | 2020-12-19T18:53:52 | 2020-12-19T18:53:52 | 322,915,678 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,598 | py | #!/usr/bin/env python
# coding: utf-8
# <a href="https://colab.research.google.com/github/aarpit1010/Real-Time-Face-Mask-Detector/blob/master/Face_Mask_Model.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
# In[1]:
# IMPORTING THE REQUIRED LIBRAR... | [
"mridulmittal20@gmail.com"
] | mridulmittal20@gmail.com |
ea9891c42ef6fc7f1ca7896c9b1e6aadd4fe3db7 | 38221ca553059a83ed8f64e2cb25181ed88da275 | /deeppavlov/models/spelling_correction/levenstein/tabled_trie.py | 502376482ef26e8fc4feca5ddd880788e9dcc39f | [
"Apache-2.0",
"Python-2.0"
] | permissive | stenpiren/DeepPavlov | 7153ce828225d9d1fdf1c171794efe463f2e9dea | fe59facab4854f2fe56ed126e27eb9696ad6dfd8 | refs/heads/master | 2020-03-23T10:08:53.962961 | 2018-07-16T22:10:17 | 2018-07-16T22:10:17 | 141,427,836 | 1 | 0 | Apache-2.0 | 2018-07-18T11:50:30 | 2018-07-18T11:50:30 | null | UTF-8 | Python | false | false | 19,969 | py | import copy
from collections import defaultdict
import numpy as np
class Trie:
"""
Реализация префиксного бора (точнее, корневого направленного ациклического графа)
Атрибуты
--------
alphabet: list, алфавит
alphabet_codes: dict, словарь символ:код
compressed: bool, индикатор сжатия
c... | [
"seliverstov.a@gmail.com"
] | seliverstov.a@gmail.com |
e48c897fdb5024719e538c8eef85ba293d1b3b3b | 77c6d0e5a25eb7b16d8c6a843b9e9915d6f6afd7 | /apps/order/views.py | fc8724a12eaab415b3189f3403ae6c0a4a4dea0e | [] | no_license | zhangwei725/shop_projects | 28c794bcba6f79b4f017b17fc0942afb3ed5f2b1 | 24a98ae5ff4fb6552d3315f5b3690e3bc5b82ab6 | refs/heads/master | 2020-03-28T20:31:50.180680 | 2018-09-21T09:40:46 | 2018-09-21T09:40:46 | 149,079,157 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,585 | py | import datetime
import random
from decimal import Decimal
from django.http import HttpResponse
from django.shortcuts import render
from apps.home.models import ShopCar, Order, Shop
from django.db import transaction
"""
拿到所有被选中的购物车记录显示
#
# 第一个 选择地址
# 第二个 选择支付方式
# 第三个 配送方式
# 提交订单 操作订单表
# 1>生成订单号
# 2> 把商品的库存量减
... | [
"18614068889@163.com"
] | 18614068889@163.com |
90d662d9b82ee1a8490bdc09aa96fc25d2c0ce6e | 832852c679816673f708860929a36a20ca8d3e32 | /Configurations/HighMass/Full2017/configuration_mm.py | 1ee0bb7d5dbf9cfab8779a7973ed2065f8bd52d3 | [] | no_license | UniMiBAnalyses/PlotsConfigurations | c4ec7376e2757b838930dfb2615e1dc99a64e542 | 578fe518cfc608169d3418bcb63a8342d3a24390 | refs/heads/master | 2023-08-31T17:57:45.396325 | 2022-09-01T10:13:14 | 2022-09-01T10:13:14 | 172,092,793 | 0 | 13 | null | 2023-04-27T10:26:52 | 2019-02-22T15:52:44 | Python | UTF-8 | Python | false | false | 905 | py | # example of configuration file
treeName= 'Events'
tag = 'Full2017_mm'
# used by mkShape to define output directory for root files
outputDir = 'rootFile_'+tag
# file with TTree aliases
aliasesFile = 'aliases.py'
# file with list of variables
variablesFile = 'variables.py'
# file with list of cuts
cutsFile = 'cut... | [
"dennis.roy@cern.ch"
] | dennis.roy@cern.ch |
6127e057f7dff15cd81fd6834820cf5db6e6a872 | 5f123b35d63e60982b0d034c40614ea1d8f288a4 | /AndroidGuard/examples/omegacodee.py | addf94b6452ab83bbc81e581f64a8a6c0efe85a8 | [
"Apache-2.0"
] | permissive | Simplewyl2000/Similarity_Detection | 2f5d76d8b50474bb226a4ea524f97c504aa1b2ac | 9018c120cb4023a24de8032e8aa7d55cf42f2446 | refs/heads/master | 2020-05-22T23:37:39.885251 | 2019-05-10T03:13:29 | 2019-05-10T03:16:31 | 186,562,541 | 0 | 0 | null | 2019-05-14T06:52:18 | 2019-05-14T06:52:17 | null | UTF-8 | Python | false | false | 909 | py | import os
import numpy
file1="omegafrequency.txt"
file=open(file1,'r')
listomega=[]
listfrequency=[]
for eachline in file:
temp=eachline.strip('\n').strip("['").strip("]").split("',")
#print(temp)
listomega.append(int(temp[0]))
listfrequency.append(temp[1])
#print(istomega)
for j in listomega:
... | [
"734966463@qq.com"
] | 734966463@qq.com |
d6e82d1a43184d0b47aeb99ebe45b7630327dd6a | 28e0e93f853e4d7f99edbbb83ceb91e4e2b50256 | /src/rules.py | 41746d9b1dac61ea2264e997bbefbbd865e1579b | [
"MIT"
] | permissive | harry-124/sbsim-19 | fe2fbfa5cf84b1e75190d0f1213169d654289dcf | d70f3d0caa6daa1db038c83c03cea215b49afb98 | refs/heads/master | 2020-07-23T15:06:25.113554 | 2020-01-28T16:55:43 | 2020-01-28T16:55:43 | 207,603,896 | 0 | 0 | MIT | 2020-01-28T16:55:44 | 2019-09-10T16:04:04 | Python | UTF-8 | Python | false | false | 2,910 | py | #!/usr/bin/env python
import sys
import physics as p
import pygame as pg
import pid
import rospy
import math as m
from geometry_msgs.msg import Pose, Twist
from sbsim.msg import goalmsg
from sbsim.msg import dribble
import controller as c
from std_msgs.msg import Int32
from std_msgs.msg import Float64
r10 = Pose()
r11... | [
"srike27@gmail.com"
] | srike27@gmail.com |
190447cb8c2132b958f9feca6996e737c0772f08 | bb22780e26ec87baa3e9e61efe3dfc5b904f853f | /test.py | 50df2505fe1bc7715148f2e8f15e0b8398148365 | [] | no_license | evelinamorim/wordembedding | 12f0fb5b32c520b33c34283d6d23b83e831374d0 | 8ea8f483973781132e16d66a029f5c993d15e30b | refs/heads/master | 2016-09-06T19:42:00.262270 | 2015-08-06T21:34:05 | 2015-08-06T21:34:05 | 32,351,821 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,105 | py | import sys
import gensim
import time
class ReadCorpus:
"""
Read corpus for some tasks. Nowadays, there is only two corpus:
* MSR: research.microsoft.com/en-us/
projects/rnn/
* Google: code.google.com/p/word2vec/source/
browse/trunk/questions-words.txt
"""
def __init__(... | [
"evelin.amorim@hera.speed.dcc.ufmg.br"
] | evelin.amorim@hera.speed.dcc.ufmg.br |
cb7c05a54a44455c1eaa0a2c45bd633da858aa80 | 14bcdb37b818638fc9d6f2f4e4595c82685b8972 | /network_visualizer.py | 86481484d4093c96de66a95989456e0350b7778d | [] | no_license | shainesh77/Testing | 7e8b3cd135b722d8bff1ef29eedebfd862c954b5 | 45f593871657c57de4981512dcd2f6a841eb78d5 | refs/heads/main | 2023-07-13T23:56:10.835377 | 2021-08-18T12:19:35 | 2021-08-18T12:19:35 | 397,588,629 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,007 | py | import os
from keras.engine.topology import InputLayer
from keras.models import Model
from keras.layers import Conv2D
from flask import Flask, jsonify, send_from_directory
from src.game_environment import GameEnvironment
from src.state_machine_game_environment import StateMachineGameEnvironment
import src.model_util ... | [
"noreply@github.com"
] | shainesh77.noreply@github.com |
fc636c063c6ddb1fa97d59630f452e3e84f662d4 | b51fcf9d94ad483139d5e5f17785f7dcb39404ae | /mdl/Guideline36Spring/QSS/run.py | d214ff42afa470f3d1f0bc98d8708f2972f25000 | [] | no_license | NREL/SOEP-QSS-Test | 7d508f79dd3a49b609e6400b8c5a05757cb22928 | bd8e3c39d0a205b7b3cf3c64bc2c500e761a76e8 | refs/heads/main | 2023-08-30T21:23:53.766525 | 2023-08-30T03:02:11 | 2023-08-30T03:02:11 | 97,882,896 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 279 | py | #!/usr/bin/env python
import subprocess, sys
args = ' --zrFac=1000 --dtND=1e-4 --dtInf=0.001 --dtOut=100 --out=sSXL ' + ' '.join( sys.argv[1:] )
with open( 'run.log', 'w' ) as log:
subprocess.run( 'run_QSS.py' + args, stdout = log, stderr = subprocess.STDOUT, shell = True )
| [
"Stuart_Mentzer@objexx.com"
] | Stuart_Mentzer@objexx.com |
70e19baa27259958c38615665bee3f6c8ac77d48 | b8cc6d34ad44bf5c28fcca9e0df01d9ebe0ee339 | /入门学习/threading_dead_lock-eg.py | 277a2b79b337003460067bedae3cb0eeca00cd29 | [] | no_license | python-yc/pycharm_script | ae0e72898ef44a9de47e7548170a030c0a752eb5 | c8947849090c71e131df5dc32173ebe9754df951 | refs/heads/master | 2023-01-05T06:16:33.857668 | 2020-10-31T08:09:53 | 2020-10-31T08:09:53 | 296,778,670 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,591 | py | """
import threading
import time
lock_1 = threading.Lock()
lock_2 = threading.Lock()
def func_1():
print("func_1 starting......")
lock_1.acquire()
print("func_1 申请了 lock 1 ......")
time.sleep(2)
print("func_1 等待 lock_2 .......")
lock_2.acquire()
print("func_1 申请了 lock 2 ......")
lock_... | [
"15655982512.com"
] | 15655982512.com |
a56a7a18cf5105747b45d3be8f72ba207bc8a2d8 | eb7e4b062b7fc9c6434bed24f8f9c65c96df7914 | /filesort.py | bcaf483272d37b9eb192e993c56331c86ed47985 | [] | no_license | kitizl/FileSorterPy | 0ff545b32130e348be821263fae2613d58a753a4 | 5c386d40dff4ca3a2b0ef8009ae24c6874d1fa90 | refs/heads/master | 2020-03-27T13:23:18.384074 | 2018-08-29T17:04:39 | 2018-08-29T17:04:39 | 146,606,133 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,360 | py | #!python3
import os
import sys
import re
import glob
import shutil
START_FOLDER = os.getcwd()
def numToMonth(number):
return ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][number-1]
def getDate(filename):
# filename = yyyymmdd-nnnnnn
date = re.findall(r"(\d{4})(\d{2})(\d... | [
"nithesh.dragoon98@gmail.com"
] | nithesh.dragoon98@gmail.com |
e1c8772a70ff0b7a5ead0b6c73d8adda9807dd1a | 28c598bf75f3ab287697c7f0ff1fb13bebb7cf75 | /testgame.mmo/genesis/spawn/spawnmain.py | d1a6e96ee033931ad1e1cf4df3507ff6d4965fc9 | [] | no_license | keaysma/solinia_depreciated | 4cb8811df4427261960af375cf749903d0ca6bd1 | 4c265449a5e9ca91f7acf7ac05cd9ff2949214ac | refs/heads/master | 2020-03-25T13:08:33.913231 | 2014-09-12T08:23:26 | 2014-09-12T08:23:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 338 | py |
import races
import animal
import npc
"""
#Critter Pack
#http://www.mmoworkshop.com/trac/mom/wiki/Store
"""
#import critters
"""
#Monster Pack Examples
#http://www.mmoworkshop.com/trac/mom/wiki/Store
"""
#import monsters
"""
Mythical Creature Pack Examples
http://www.mmoworkshop.com/trac/mom/wiki/Store
"""
#im... | [
"mixxit@soliniaonline.com"
] | mixxit@soliniaonline.com |
8c693acb05745c20689b0a071a611d9b22ec6549 | fa60536fbc7c0d8a2a8f08f0a5b6351c77d08054 | /3]. Competitive Programming/03]. HackerRank/1]. Practice/12]. 10 Days of Statistics/Day_5.py | 9205935baf59949bf266af43020d1b9d8c2f88cf | [
"MIT"
] | permissive | poojitha2002/The-Complete-FAANG-Preparation | 15cad1f9fb0371d15acc0fb541a79593e0605c4c | 7910c846252d3f1a66f92af3b7d9fb9ad1f86999 | refs/heads/master | 2023-07-17T20:24:19.161348 | 2021-08-28T11:39:48 | 2021-08-28T11:39:48 | 400,784,346 | 5 | 2 | MIT | 2021-08-28T12:14:35 | 2021-08-28T12:14:34 | null | UTF-8 | Python | false | false | 864 | py | # 1st Solution---------------------------------------
from math import factorial, exp
f = float(input())
i = int(input())
eq = ((f**i) * exp(-f))/factorial(i)
print('%.3f' %eq)
# 2nd Solution-------------------------------------------
x,y = [float(i) for i in input().split(" ")]
cx = 160 + 40*(x + x**2)
cy = 128 +... | [
"akashsingh27101998@gmai.com"
] | akashsingh27101998@gmai.com |
f0db0d024328299a986df6e4bece188d36f970c2 | 92f9fd4397d88619073c17174f3d52f5f489d4e4 | /contrib/devtools/fix-copyright-headers.py | b87a96eb6f4f577fc786621653ac85686017456e | [
"LicenseRef-scancode-other-permissive",
"MIT"
] | permissive | diablax2/bts | 380df7562d73a292e641faaff1b0d1e17a10f0a8 | fe3c727ce607e11bee64bb03afadb653e9bd23fd | refs/heads/master | 2020-04-24T21:57:40.173603 | 2019-02-25T06:33:48 | 2019-02-25T06:33:48 | 172,295,667 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,336 | py | #!/usr/bin/env python
'''
Run this script to update all the copyright headers of files
that were changed this year.
For example:
// Copyright (c) 2009-2012 The Bitcoin Core developers
it will change it to
// Copyright (c) 2009-2015 The Bitcoin Core developers
'''
import os
import time
import re
year = time.gmtime(... | [
"47169271+BitcoinSDN@users.noreply.github.com"
] | 47169271+BitcoinSDN@users.noreply.github.com |
0ce5054c29d7414e6c56e074af1b1ef1b32afe58 | f95e73867e4383784d6fdd6a1c9fe06cffbfd019 | /CheckIO/HOME/pawn_brotherhood.py | 4b0929a05d3c3562eadcb0a6374c8a5fdf00444c | [] | no_license | linxiaohui/CodeLibrary | da03a9ed631d1d44b098ae393b4bd9e378ab38d3 | 96a5d22a8c442c4aec8a064ce383aba8a7559b2c | refs/heads/master | 2021-01-18T03:42:39.536939 | 2018-12-11T06:47:15 | 2018-12-11T06:47:15 | 85,795,767 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 554 | py | #!/usr/bin/env python
# *-* coding:UTF-8 *-*
def safe_pawns(pawns):
cnt=0
for l in pawns:
col,row=l.lower()
if int(row)==1:
continue
if col>='b' and chr(ord(col)-1)+str(int(row)-1) in pawns or col<='g' and chr(ord(col)+1)+str(int(row)-1) in pawns:
cnt+=1
return cnt
if __name__ == '__main__... | [
"llinxiaohui@126.com"
] | llinxiaohui@126.com |
0f0de7f4f62d5363e19ca6ac55276c6a92bce3dc | d16292aad097ee66c356093731132ca148a39df2 | /LeetCode_Python/Test205.py | 4556c0f9c5a13095b83d22700504649331877601 | [] | no_license | zhuyingtao/leetcode | 702189a521506b1d651f75e604aa98105ef7580c | b7c520e3fb4e487ed625733bea373f2429c217c9 | refs/heads/master | 2021-01-14T13:21:50.277663 | 2020-03-08T16:09:42 | 2020-03-08T16:09:42 | 39,811,678 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 676 | py | __author__ = 'zyt'
class Solution:
# @param {string} s
# @param {string} t
# @return {boolean}
def isIsomorphic(self, s, t):
# ds = {} # can't ds=dt={}
# dt = {}
# cs = ct = 0
# for i in range(len(s)):
# if s[i] not in ds:
# ds[s[i]] = cs
... | [
"yingtao.zhu@foxmail.com"
] | yingtao.zhu@foxmail.com |
6fef01c2498c9a9b7a52d8a294080b7fe61d6627 | 487ce91881032c1de16e35ed8bc187d6034205f7 | /codes/CodeJamCrawler/CJ/16_2_1_Dom_ju.py | c726b4de6450f76ad915989d09c20461a1c9a8cd | [] | no_license | DaHuO/Supergraph | 9cd26d8c5a081803015d93cf5f2674009e92ef7e | c88059dc66297af577ad2b8afa4e0ac0ad622915 | refs/heads/master | 2021-06-14T16:07:52.405091 | 2016-08-21T13:39:13 | 2016-08-21T13:39:13 | 49,829,508 | 2 | 0 | null | 2021-03-19T21:55:46 | 2016-01-17T18:23:00 | Python | UTF-8 | Python | false | false | 538 | py | DOWNLOAD_DIR = "/Users/Dom/Downloads/"
def jopen( filename ):
return open( DOWNLOAD_DIR+filename+".in", "r")
def jout( filename, results, linebreaks=False ):
f = open(DOWNLOAD_DIR+filename+".out","w")
for n in range(len(results)):
f.write( "Case #" + str(n+1) + ": " )
if isinstance(n, list... | [
"[dhuo@tcd.ie]"
] | [dhuo@tcd.ie] |
41e4fc4f2a66d20510bcfed184eb34f465362860 | d1a7dcd0ffacd057dc09b19766d96db8d54334bf | /HW2/code/linear_regression/main_poly_model_selection.py | a37292c5e3221848fe63f402a6a816fb0d8bdd2e | [] | no_license | brg3n3r/ComputationalIntelligenceUE | d64ff3435258a085dacbd6bbbe90ee6abfea8d6a | 86db363d8132ceea30a696abc6e28983f8556927 | refs/heads/master | 2021-05-24T14:06:50.633304 | 2020-06-30T14:55:54 | 2020-06-30T14:55:54 | 253,597,174 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,741 | py | #!/usr/bin/env python
import numpy as np
import json
import matplotlib.pyplot as plt
from plot_poly import plot_poly, plot_errors
import poly
#!!! import os
"""
Assignment: Linear and Logistic Regression
Section: Linear Regression with polynomial features
This file:
1) loads the data from 'data_linreg.... | [
"maxbuergener@me.com"
] | maxbuergener@me.com |
be9ff97e74554405f78e2ae14f59d41d20871ca0 | fd5de9c7489f38eae683582b0476a7685b09540a | /config.py | 5c7740e6edfd8adda65027b1b6ac8137b8a88701 | [] | no_license | FrankArchive/ICPC_Challenges | 8cdf979909014345c9e1198e82fce55eaa65a186 | 366c631c3464f4348c4cb07c4ff425640f84fe71 | refs/heads/master | 2022-03-01T11:53:11.326549 | 2019-09-19T05:49:14 | 2019-09-19T05:49:14 | 201,845,208 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 193 | py | import os
JUDGE_ADDR = os.getenv('JUDGE_ADDR') or 'localhost'
JUDGE_PORT = os.getenv('JUDGE_PORT') or '5000'
JUDGE_PORT = int(JUDGE_PORT)
JUDGE_TOKEN = os.getenv('JUDGE_TOKEN') or 'set_token'
| [
"frankli0324@hotmail.com"
] | frankli0324@hotmail.com |
d99c9108d337ed703b7f5b6063ed0429bfb22b1c | ecf52346badfccf15a8959cb36618ce1edbdec6d | /libs/utils.py | 5d66b20503b295a01c43ec2b0d2dda2b54316f4d | [
"BSD-2-Clause"
] | permissive | aoxiangzhang/tuxiangshijue | 3571279296bce17b2a896d4512d594fabfb2f490 | 4b9541f64bf6e4c8e1b6b1ce8be141aaf8c67dae | refs/heads/master | 2023-01-23T06:33:57.810171 | 2020-11-26T08:07:34 | 2020-11-26T08:07:34 | 316,161,258 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,966 | py | from __future__ import division
import os
import cv2
import time
import torch
import scipy.misc
import numpy as np
import scipy.sparse
from PIL import Image
import scipy.sparse.linalg
from cv2.ximgproc import jointBilateralFilter
from torch.utils.serialization import load_lua
from numpy.lib.stride_tricks import as_stri... | [
"zhang_ax@qq.com"
] | zhang_ax@qq.com |
a3719f7dffa582ca17d74a9984494b0a1d048e71 | 499f2596cd40ad5ae8510d735f1d6c699b044050 | /GlibcGenerator.py | bc0d0d4fdf577902720693075822b021bdfc4344 | [] | no_license | alicja-michniewicz/crypto-break-lcg | bdaab30c15a6938aed180f33402613ad59cc4f61 | 4ba9139faa7904db7f9cbff74b05974998b67bbd | refs/heads/master | 2021-01-24T02:53:37.931661 | 2018-03-11T12:11:58 | 2018-03-11T12:11:58 | 122,865,781 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 299 | py | import random
class GlibcGenerator:
def __init__(self, seed_int:int) -> None:
super().__init__()
self.gen = random.glibc_prng(seed_int)
def generate(self):
return next(self.gen)
def generate_n(self, n):
return list([self.generate() for i in range(n)]) | [
"alicjamichniewicz@gmail.com"
] | alicjamichniewicz@gmail.com |
1e4f57cb7ae54552f4520fc68b828043c2167752 | e41c10e0b17265509fd460f860306784522eedc3 | /basic_config.py | 8e0791dbf7f899d792c04ef3414e39b0ef1d7b41 | [
"CC0-1.0"
] | permissive | hyyc116/research_paradigm_changing | c77ecf2533a6b2e2cd3f74fc3d3073454bffc55c | eac69c45a7a17eb70ace185fa22831ac785e504e | refs/heads/master | 2020-11-24T05:48:07.973347 | 2019-12-18T12:17:02 | 2019-12-18T12:17:02 | 227,992,284 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,102 | py | #coding:utf-8
import os
import sys
import json
from collections import defaultdict
from collections import Counter
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from scipy.optimize import curve_fit
from sklearn.metrics import r2_score
import math
import numpy as np
import random
import logging... | [
"hyyc116@gmail.com"
] | hyyc116@gmail.com |
8aa44c49b1ccdc0c8d55e6211a30bda0f2a9ade8 | a0458c27f9f0f946b0071c7c8bf5dbbb3bde96f3 | /src/settings.py | a3ce8e9248c34ed356b6eac5ad2b84d0d8566348 | [
"MIT"
] | permissive | sergachev/litex-template | b10175fe98e723539ff108f2db322b21cc3910ad | 00c7b36b8f9b380bc509b76a44f3885ffa2a932d | refs/heads/main | 2023-08-03T16:05:45.258246 | 2022-12-11T20:32:32 | 2022-12-11T20:32:32 | 214,885,817 | 17 | 3 | MIT | 2023-07-25T20:49:53 | 2019-10-13T20:04:27 | Python | UTF-8 | Python | false | false | 49 | py | device_model = "xc7a200tfbg484"
speed_grade = -1
| [
"ilia.sergachev@protonmail.ch"
] | ilia.sergachev@protonmail.ch |
78792c4fe3cdb3800594e5d3efa5738bab851ebf | 7b1067f680621b84c28571ba8488308b00b055f0 | /week1/day4/test.py | 3b771e0ec6ddb33b587048b7691e0b8b24eff933 | [] | no_license | wangfei1000/python-study | ddf9149e42cff02c75bca036243b603e25188a30 | 781e9edeca1d956325e56858b4d484beff121bec | refs/heads/master | 2021-09-02T16:11:01.271486 | 2018-01-03T15:05:37 | 2018-01-03T15:05:37 | 116,148,771 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,105 | py | #!/usr/bin/env python
#-*- coding:utf-8 -*-
# Authour wangfei
# def f1():
# return a1+100
#
# f2 = 100+1
#
#
# print(callable(f2))
# print(chr(65))
# print(ord("a"))
# LIST = []
# import random
# for line in range(6):
# num = random.randrange(9)
# if num == 3 or num == 5 or num == 1:
# # num = ... | [
"wangfei1000@yeah.net"
] | wangfei1000@yeah.net |
c5a5fa1f10d00e0b202512be63246adc05209344 | 73079120d673a9ff71128049cf3d661409fc8870 | /levelupapi/models/__init__.py | 2ad4244c97a2ca116ea243496a11cd5a73a087f5 | [] | no_license | ConnorBlakeney/levelup-server | 3974e80e0846e160c0fac34ca89c91ca9575a693 | 2488e03b0bae920c17f0a3ac85e97e91ceb78a59 | refs/heads/main | 2023-01-19T20:14:57.841307 | 2020-12-01T20:26:45 | 2020-12-01T20:26:45 | 308,676,715 | 0 | 0 | null | 2020-10-30T15:52:32 | 2020-10-30T15:52:31 | null | UTF-8 | Python | false | false | 138 | py | from .gamer import Gamer
from .event import Event
from .eventgamer import EventGamer
from .gametype import GameType
from .game import Game | [
"connorblakeney@yahoo.com"
] | connorblakeney@yahoo.com |
595c27d7b42568980e69f0ab516589558e4603c5 | 82a682480d6ab5d082360b08a158bda42ae571b8 | /music/migrations/0001_initial.py | dcd4ade0bb2e2454ba30be663909dd324eebd60c | [
"MIT"
] | permissive | saddhu1005/Viberr | a19edd8e71503793f6035ce06f5827bf175ef746 | f0847d479bce72b5da593d63848ae0fa79c3165a | refs/heads/master | 2021-06-24T06:13:51.838927 | 2019-07-26T19:33:50 | 2019-07-26T19:33:50 | 172,378,410 | 0 | 0 | MIT | 2021-06-10T21:16:36 | 2019-02-24T19:08:36 | HTML | UTF-8 | Python | false | false | 1,173 | py | # Generated by Django 2.1.7 on 2019-02-24 13:43
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Album',
fields=[
... | [
"saddhu1005@gmail.com"
] | saddhu1005@gmail.com |
cd11eb32fe2a2e38bf7f9c2a3c02bd747ddd5eaa | ec4a98a487a07568dcc7e19fa36e1e2c4973b3f1 | /convertToSameImage.py | 1a559ce4f4e9446123e660ac84e0b1e9e89a8e18 | [] | no_license | jackellis98/pytorch-small-dataset-image-generation | eebf883a0a59f15ba80d9ae1d5ecca93309d1c0d | 90495a6c8d290f120abe85be19050c47ce614663 | refs/heads/master | 2020-05-24T01:12:27.813635 | 2019-05-22T17:52:54 | 2019-05-22T17:52:54 | 187,030,482 | 0 | 0 | null | 2019-05-16T13:10:03 | 2019-05-16T13:10:02 | null | UTF-8 | Python | false | false | 597 | py | import os
import cv2
import matplotlib.pyplot as plt
old_dir = 'data\cloud1'
new_dir = 'data\cloud2'
filename1 = 'pic0.png'
filename2 = 'pic3.png'
for i in range(len(os.listdir(old_dir))):
if i<25:
path = os.path.join(old_dir,filename1)
im = cv2.imread(path,cv2.IMREAD_UNCHANGED)
newPath = ... | [
"jackellis.home@gmail.com"
] | jackellis.home@gmail.com |
fc9e559deb7f5bddce6f8748ac93e3cc190dfb31 | 0130533e0f40a0f1cf476f519a3673b10ceabff3 | /teste/maximo.py | b0fd9c6f4d4edd354a14ef1c57bb97f12fe9654e | [] | no_license | danielcanuto/revisao_python | d79c8fbf475e1cea12ca9719d02868666e0591db | 3dbd2af74c7cc94f8e1962acb4069f40d0e71772 | refs/heads/main | 2023-03-02T04:37:30.777336 | 2021-02-11T11:16:54 | 2021-02-11T11:16:54 | 337,031,753 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 141 | py | def maior(x, y):
if x > y:
return x
else:
return y
def maximo(x, y, z):
a = maior(x, y)
return maior(a, z)
| [
"danielpscanuto83@gmail.com"
] | danielpscanuto83@gmail.com |
c20f62c857e46f2c593a8ca4715ae05c5d55b16e | 0b448e2f8dc5f6637f1689ed9c3f122604ec50d5 | /PyPoll/main.py | b881853c53ca1dd296e4abbbce958fa4f48aa595 | [] | no_license | mounicapokala/Python-challange | 00b3f88683738b360b844f2e1f0c5ab8b4f54179 | 30e71cf2a9057390a0b3bc46f455ecc5baba226c | refs/heads/master | 2020-04-04T21:02:24.749417 | 2019-03-13T16:48:16 | 2019-03-13T16:48:16 | 156,270,775 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,584 | py | import os
import csv
import operator
csv_path="/Users/mouni/Documents/GitHub/election/UTAUS201810DATA2/Python/Homework/Instructions/PyPoll/Resources/election_data.csv"
output_path="/Users/mouni/Documents/GitHub/Python-challange/PyPoll/PyPoll.txt"
with open(csv_path) as csvfile:
csv_reader=csv.reader(csvfile,delimit... | [
"mounicadona@gmail.com"
] | mounicadona@gmail.com |
b551aaf1cc0ed4d622b9137b4fb432ed71cb4f6b | 88095fb5174ae3b0d15aa4ee56ceebe2411e8fb7 | /dive-into-deep-learning-pytorch/3.3_linear-regression.py | 01843a802551610d98c5b1b9fac8fd3fc5845791 | [
"Apache-2.0"
] | permissive | taotao1234abcd/machine-learning-and-artificial-intelligence-python | a5c04973767851ed7cef1187be50334f0326a8e3 | 04095d03a9bbe6b6189824a6a0f63b939ea04b65 | refs/heads/master | 2021-07-07T20:25:19.301573 | 2020-09-14T03:36:46 | 2020-09-14T03:36:46 | 180,847,509 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,352 | py |
import numpy as np
import matplotlib.pyplot as plt
import torch
from torch import nn
import torch.utils.data as Data
torch.manual_seed(1)
print(torch.__version__)
torch.set_default_tensor_type('torch.FloatTensor')
num_inputs = 1
num_examples = 2000
true_w = 2.5
true_b = 4.2
features = torch.tensor(np.random.normal... | [
"49369890+taotao1234abcd@users.noreply.github.com"
] | 49369890+taotao1234abcd@users.noreply.github.com |
d2ba7f08e6dd720ddd8de76660a048f88cc8e038 | 622be10edbbab2c932c7c37ef63b6c3d88c9ed10 | /rest/migrations/0001_initial.py | 81bea894bbff28b14bb084c6232a6bd8d10fe9f2 | [] | no_license | Joycewaithaka/Framework | 38ef8c872317c78175a9b774da789cb5ee10073c | 9831b205011166b960a0773e95b34453b5d868ad | refs/heads/master | 2021-07-01T05:17:08.170456 | 2017-09-22T06:32:36 | 2017-09-22T06:32:36 | 104,442,664 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 679 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-09-21 09:37
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Studen... | [
"joycewanjiruwaithaka@gmail.com"
] | joycewanjiruwaithaka@gmail.com |
a7c910acf371d992b72da6e4efb6e5bbfc6eb773 | 875304da764ebd3d27491fd50852f7be5e9233b6 | /Distance_Between_Points.py | 3c9e45f089eb9d661861614cd3b031d327bca65a | [] | no_license | IvetaY/PythonFundamentals | 9ace0aaeddfc7e61f27fd3308e643627cd280875 | cf0bb87ba399a697be335f8979d7284c8be15246 | refs/heads/master | 2022-01-26T00:43:00.627871 | 2019-08-14T19:13:32 | 2019-08-14T19:13:32 | 119,277,342 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 986 | py | from math import sqrt
class Point:
def __init__(self, x, y):
self.x = x
self.y = y
def read_point():
liniq = input()
tokens = [float(num) for num in liniq.split(' ')]
x, y = tokens
point = Point(x, y)
return point
def distance_between_points(point1, point2)... | [
"noreply@github.com"
] | IvetaY.noreply@github.com |
e1c50ce55b94d0b8974045c6d12124d2db102332 | 21b39d50e4df56ea01453001845d1580729af1df | /jdcloud_sdk/services/redis/apis/DescribeClientListRequest.py | 450146bb94baa2db571d11a497779f82c80cb4ac | [
"Apache-2.0"
] | permissive | Tanc009/jdcloud-sdk-python | ef46eac7731aa8a1839b1fc1efd93249b7a977f0 | 8b045c99bc5b73ca7348e950b6f01e03a27982f5 | refs/heads/master | 2021-08-09T14:49:16.177709 | 2021-06-25T02:38:41 | 2021-06-25T02:38:41 | 141,714,695 | 0 | 0 | Apache-2.0 | 2018-07-20T13:21:17 | 2018-07-20T13:21:16 | null | UTF-8 | Python | false | false | 1,572 | py | # coding=utf8
# Copyright 2018 JDCLOUD.COM
#
# 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 ... | [
"tancong@jd.com"
] | tancong@jd.com |
dbd63181e26bf71a1fa5f35c11a8f3a74f5dc202 | c25a6a30dcb773590669f5c5698547e9a550c460 | /trace_gen.py | 326d3e8c5e7d8b1bf1708489f232bd81378eea78 | [] | no_license | crusader2000/lrc_coding | f68eb621383399d980975f67568535d8b2ceb183 | 887fc27b72980381b27c52371ac716df9242331b | refs/heads/main | 2023-07-11T02:02:44.995285 | 2021-08-12T16:10:28 | 2021-08-12T16:10:28 | 377,253,638 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,560 | py | import csv
import requests
import re
import hashlib
import os
def cheaphash(string,length=6):
if length<len(hashlib.sha256(string).hexdigest()):
return hashlib.sha256(string).hexdigest()[:length]
else:
raise Exception("Length too long. Length of {y} when hash length is {x}.".format(x=str(len(ha... | [
"ansh.puvvada@students.iiit.ac.in"
] | ansh.puvvada@students.iiit.ac.in |
9765259fe66a9c580fb6bcac5113e9f6a5e872f3 | 2376dcbb96c9fca65c10c8f8db66822ba01d6a6a | /src/api2db/ingest/api2pandas.py | 9ac5015ae0e4c0caa29bf211e20968b32de46e20 | [
"MIT"
] | permissive | TristenHarr/api2db | 054443456b0b07e047216142d74eb2dc30dabe15 | 8c8b14280441f5153ff146c23359a0eb91022ddb | refs/heads/main | 2023-05-12T07:47:17.462089 | 2021-06-02T20:32:24 | 2021-06-02T20:32:24 | 364,407,770 | 46 | 3 | null | null | null | null | UTF-8 | Python | false | false | 3,808 | py | # -*- coding: utf-8 -*-
"""
Contains the Api2Pandas class
=============================
"""
from ..app.log import get_logger
from .api_form import ApiForm
import pandas as pd
import os
from typing import Union, Callable
class Api2Pandas(object):
"""Used to extract incoming data from an API into a pandas DataFrame... | [
"tjhm9c@mail.missouri.edu"
] | tjhm9c@mail.missouri.edu |
a1ff43af09345e62519dc8bc4ca87bc75b6d115a | 0de0f7a797738387118ac8aecdf31a696c8800d1 | /sampler.py | 860c54b97697144bda1bb1ce910b9cb1aaf25d00 | [] | no_license | hyzcn/metriclearningbench | f4aa56849e9ae19a2f2298167ae7f76727cd0e30 | 79320fdfcdce2f9e65c9ecb39c14fbce8bf8b6ab | refs/heads/master | 2021-06-20T12:23:06.208100 | 2017-07-17T14:16:15 | 2017-07-17T14:16:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,786 | py | import random
import itertools
def index_dataset(dataset):
return {c : [example_idx for example_idx, (image_file_name, class_label_ind) in enumerate(dataset.imgs) if class_label_ind == c] for c in set(dict(dataset.imgs).values())}
def sample_from_class(images_by_class, class_label_ind):
return images_by_class[class... | [
"vadimkantorov@gmail.com"
] | vadimkantorov@gmail.com |
425bbfbbe5ae1399dac988c42a53fa836aa09111 | cbfddfdf5c7fa8354162efe50b41f84e55aff118 | /venv/lib/python3.7/site-packages/nltk/tokenize/punkt.py | f0dcaca359521808d4344948c5389317ab0fdec1 | [
"MIT",
"Apache-2.0"
] | permissive | tclerico/SAAC | 8d2245221dd135aea67c5e079ac7eaf542b25e2f | 2f52007ae8043096662e76da828a84e87f71091e | refs/heads/master | 2022-12-09T21:56:33.430404 | 2019-02-20T14:23:51 | 2019-02-20T14:23:51 | 153,152,229 | 3 | 0 | MIT | 2022-09-16T17:52:47 | 2018-10-15T17:13:29 | Python | UTF-8 | Python | false | false | 62,162 | py | # Natural Language Toolkit: Punkt sentence tokenizer
#
# Copyright (C) 2001-2018 NLTK Project
# Algorithm: Kiss & Strunk (2006)
# Author: Willy <willy@csse.unimelb.edu.au> (original Python port)
# Steven Bird <stevenbird1@gmail.com> (additions)
# Edward Loper <edloper@gmail.com> (rewrite)
# Joel... | [
"timclerico@gmail.com"
] | timclerico@gmail.com |
abcfc7f85883e49ffa5113a31431886ddf533f5c | 5b1b478b0e7b8069762855baa8a2a4f6ff48ebf4 | /src/reviews/forms.py | bf83b29d371abc3b2b2686430c5fe69d7b383f5e | [
"MIT"
] | permissive | junaidq1/greendot | 9e4a0402fcee7182ca7531a0dd4a48edb43f79c5 | cd9e7791523317d759e0f5f9cf544deff34a8c79 | refs/heads/master | 2020-04-06T06:54:07.994376 | 2016-09-11T18:33:15 | 2016-09-11T18:33:15 | 61,906,579 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,047 | py | from django import forms
from .models import Review, Employee
from registration.forms import RegistrationFormUniqueEmail #this is to edit the registration redux form
# class ReviewForm(forms.ModelForm):
# class Meta:
# model = Review
# fields = [
# "content",
# "employee",
# "work_again",
# ]
#actual rev... | [
"junaidq1@gmail.com"
] | junaidq1@gmail.com |
e03dfaabbfac03e7cdeb9ee8fedae62f5be8c5fa | 49b7e9fe956a400d6901aaf1e6fa7b74c69001c5 | /tools/eval_metrics.py | 502cca3b3f9b32ce83d66c483cbfb142f55db2cd | [
"MIT"
] | permissive | xujinglin/AutoLoc | 4e718bf748f03a5f1c440826e83e496fa11b917c | 82c7e51a28eb740a8f002a460ce5c918fc61731b | refs/heads/master | 2022-03-22T19:37:39.561780 | 2019-10-31T23:20:47 | 2019-10-31T23:20:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,221 | py | """
Script entry for evaluation of training & testing results.
Usage:
1. $ mkdir exp/<DATASET>/<EXPNAME>
2. Setup configuration in `config.yml`
3. Setup proto template in `solver.tpl` and `train.tpl`
4. $ python tools/eval_metrics.py --phase <PHASE> --dataset <DATASET> \
--expname <EXPNAME> --rs... | [
"zs2262@columbia.edu"
] | zs2262@columbia.edu |
1b4ab7cf2f915702b202e3a75ac79732075f6950 | 2746d27fa7c6669e7782527f010c514c6ba17058 | /Django/timetable/env/lib/python3.6/os.py | 4614206a11b2a35caec1cb3a51a04e40fb2fbeaa | [] | no_license | samoyl11/TimeTable_optimizer | 4dd86f31cf9b9f7413e73dc0af60211efcb96d57 | ddbf908121792a2335c9ecd0f8ee2bc783c44a1b | refs/heads/master | 2020-05-25T17:56:54.566081 | 2019-05-21T19:21:03 | 2019-05-21T19:21:03 | 187,918,798 | 2 | 0 | null | 2019-05-21T21:53:58 | 2019-05-21T21:53:57 | null | UTF-8 | Python | false | false | 42 | py | /Users/bulat/anaconda3/lib/python3.6/os.py | [
"bulatuseinov@gmail.com"
] | bulatuseinov@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.