blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 5 283 | content_id stringlengths 40 40 | detected_licenses listlengths 0 41 | license_type stringclasses 2
values | repo_name stringlengths 7 96 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 58
values | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 12.7k 662M ⌀ | star_events_count int64 0 35.5k | fork_events_count int64 0 20.6k | gha_license_id stringclasses 11
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 43
values | src_encoding stringclasses 9
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 7 5.88M | extension stringclasses 30
values | content stringlengths 7 5.88M | authors listlengths 1 1 | author stringlengths 0 73 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2e3fd258d656b4aae266bf98af8ec3d8ea66dd36 | 7891b57b0f65181bbbfbf69abbd6a86d9e293459 | /programs/tic_tac_toe.py | ec5f4964fc0be3040ae71f7c99d38aa86a5cdaee | [] | no_license | NIKsaurabh/python_programs1 | 79a465c2bad8c29c21e470e035ef571ae84199a9 | 29db29763f9b70ed20f562a9b1514b5f90d685e1 | refs/heads/master | 2020-06-04T18:45:23.052348 | 2019-06-23T11:02:12 | 2019-06-23T11:02:12 | 192,149,972 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,720 | py | import numpy
board=numpy.array([['_','_','_'],['_','_','_'],['_','_','_']])
p1s='X'
p2s='O'
def check_rows(symbol):
for r in range(3):
count=0
for c in range(3):
if board[r][c]==symbol:
count=count+1
if count==3:
print(symbol, " won")
return... | [
"noreply@github.com"
] | noreply@github.com |
9c09878a0a534b65405d82807aec9244664c52db | ec8a3782ba4b625626dc8e205209ff6576cb6d26 | /gtex_analysis.py | 994738733257dd69bd3b2a3da19f9ef3d2ebf948 | [
"MIT"
] | permissive | joan-smith/covid19 | 04c3d08a36a966e430552353ad3bd8d4b09bba2d | fef22a26cb2354cbe791f674c578fc2c35630a2a | refs/heads/master | 2021-05-17T17:03:18.041609 | 2020-05-11T02:32:55 | 2020-05-11T02:32:55 | 250,886,925 | 5 | 3 | MIT | 2020-05-11T02:32:57 | 2020-03-28T20:26:38 | Python | UTF-8 | Python | false | false | 3,277 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Mar 21 19:26:43 2020
@author: Joan Smith
"""
#%%
import pandas as pd
from matplotlib import pyplot as plt
import numpy as np
gtex = pd.read_csv("data/raw-data/GTEX/GTEx_Analysis_2017-06-05_v8_RNASeQCv1.1.9_gene_tpm.gct", sep="\t", header=2, index_col=... | [
"joans@alum.mit.edu"
] | joans@alum.mit.edu |
a1998a2770535081f87356b6c61202ca5dfedb68 | f70da40112a40431a579c2512f4697f9f77b9b5b | /ALDS1/ALDS1_4_C.py | ce35334aefd168ad81273518b7eba233323ee6d0 | [] | no_license | ushiko/AOJ | cc5572cf6ce8d56eeb84973d72e43dc564541a39 | 24b26e1e6094a654d152247043e7907e365a8793 | refs/heads/master | 2020-04-04T16:19:32.868570 | 2018-12-15T01:29:04 | 2018-12-15T01:29:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 603 | py | # http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_4_B&lang=jp
# Binary Search : python3
# 2018.12.08 yonezawa
#from collections import deque
#import sys
#input = sys.stdin.readline
#import cProfile
def main():
dic = {}
for i in range(int(input())):
l = list(map(str,input().split()))
... | [
"ynzwtks@gmail.com"
] | ynzwtks@gmail.com |
b4c87370b54e8398f6c23424e37dce01724410c3 | 31d7fb05f94decc77b388d6e0acc17666920b263 | /ximalayapy/ximalaya.py | 4e311b2ae27bacb376d2621c599ae2fc241cafb2 | [] | no_license | skygongque/login-ximalaya | 0842a93ae699f64d9e2c0a347014c32de9d0b050 | ad00a9f2177e906bf4cef2d934cb388736c84da7 | refs/heads/master | 2023-06-01T01:17:41.452836 | 2020-07-22T06:09:06 | 2020-07-22T06:09:06 | 241,030,534 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,210 | py | import requests
from get_captcha import Captcha
import execjs
from Crypto.PublicKey import RSA
from Crypto.Cipher import PKCS1_v1_5
import base64
import hashlib
import json
import time
requests.packages.urllib3.disable_warnings()
def get_sessionId():
jstext = """
function get_sessionId(){
va... | [
"noreply@github.com"
] | noreply@github.com |
db7606a7fccbd613232e00a03aa0db37b1915dbd | 125a328f222e5dab133c5819913728c6e2f94b3e | /core02/student.py | 3e1d1becb88c188ef8cf2aa99b82a980c4e04fa7 | [] | no_license | nbwuwei/itany-python | be1fb948cf55ef6328657cee65d07087780e22fa | 762bece0c2e7b0ecd39f78048fa43b6ae2547695 | refs/heads/master | 2021-01-25T13:10:58.284397 | 2018-03-01T02:55:59 | 2018-03-01T02:55:59 | 123,535,559 | 1 | 0 | null | 2018-03-02T05:40:27 | 2018-03-02T05:40:27 | null | UTF-8 | Python | false | false | 1,322 | py | class Student:
# 类的静态属性
some_static_attr = 1
# 是类的构造方法
# 方法名__init__(self)
# self 是this对象
# self 名称可以改变 但是不建议修改
# !!! 一个类中所有成员方法的第一个参数都是self
# 但是,在调用类中的方法的时候,不需要为self传值,由Python解释器传值
# Python的成员属性,不需要声明在类中
# 直接在init方法中使用self.属性名 声明成员属性
def __init__(self,name="",age="")... | [
"cuiyi@itany.com"
] | cuiyi@itany.com |
b1319b3f4d9e59d7f6923b1bb1c3a7a3441f32f9 | eb58833180d76311876c5d1f6d086d5f4d11ad94 | /blog/migrations/0002_auto_20190410_1846.py | 9e67bf531e92799e5e13b5f1fb8d35c12b0dcfff | [] | no_license | alchupin/django_s_1 | 9ac61a02de997857f6e947ea6af5768975304a7f | 0331a4ff5cfd420a7a695b174fafcf0ac02b358d | refs/heads/master | 2020-05-14T00:44:52.484383 | 2019-04-30T13:45:55 | 2019-04-30T13:45:55 | 181,681,149 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 739 | py | # Generated by Django 2.2 on 2019-04-10 18:46
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('blog', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Tag',
fields=[
('id', models.Au... | [
"ximikk@mail.ru"
] | ximikk@mail.ru |
5ee926f717a43257bc8e159cccb1a427dae87f2a | bba4887f2a2a8e672fd4ec7ced8109a2762230ef | /app/models.py | 6e7ad97a7ffa5e438e89a4e1907ed96941910052 | [] | no_license | cadyherron/microblog | a5f621ea8a43f2de4d704ce36bdbb7578ce393c4 | 5a5727acbb4da1ecaeff0ce5c7b83c10a52d3384 | refs/heads/master | 2021-01-20T18:07:43.466141 | 2016-06-06T16:25:28 | 2016-06-06T16:25:28 | 60,217,965 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,272 | py | from app import db, app
from hashlib import md5
# this table only has foreign keys, so let's create it using SQLAlchemy API:
followers = db.Table('followers',
db.Column('follower_id', db.Integer, db.ForeignKey('user.id')),
db.Column('followed_id', db.Integer, db.ForeignKey('u... | [
"julia.herron@locusenergy.com"
] | julia.herron@locusenergy.com |
2fe822f0708c0a3845e8e05bab744214f00e7eab | 72fcac20e1d55d59e50fa6a552dceea1246114e7 | /comments/comments_page/models.py | 5f93874ee1ef80655c412555a439688d212d2a79 | [] | no_license | NataliaPlatova/Comments | 45f1471191c635ebaf9b3e29f0f84599263e71a7 | 41e7a7e4f329a2a1501292459320f53faa8209fc | refs/heads/master | 2023-04-27T09:06:28.417830 | 2019-08-15T12:57:49 | 2019-08-15T12:57:49 | 202,290,088 | 0 | 0 | null | 2022-04-22T22:10:20 | 2019-08-14T06:39:22 | Python | UTF-8 | Python | false | false | 398 | py | from django.db import models
class Review(models.Model):
"""Model for book reviews"""
my_email = models.CharField(max_length=40)
books_name = models.CharField(max_length=80)
rating = models.IntegerField(default=1)
comment = models.TextField(max_length=1000)
pub_date = models.DateField... | [
"n.platova@hotmail.com"
] | n.platova@hotmail.com |
35725d3eedf167d9a9ccd076852853f75d9cfdcf | 7491ff06e0245ab23eab524fc241ddece4e7b2c7 | /env/bin/gunicorn | 4b2b98b8846aa58741b28f0cbd50f770fcb2c215 | [] | no_license | ekiprop/switchapi | 1694cedc7b01de07f9fc3367c3651b94918c15da | dd257be3e4655b3e1dd1ce196425aa0c7031a6c9 | refs/heads/master | 2021-09-26T11:18:50.387737 | 2020-03-21T20:10:43 | 2020-03-21T20:10:43 | 244,697,740 | 0 | 0 | null | 2021-09-22T18:46:41 | 2020-03-03T17:21:57 | Python | UTF-8 | Python | false | false | 248 | #!/home/ekiprop/kip_code/switchapi/env/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from gunicorn.app.wsgiapp import run
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(run())
| [
"evanskiprop1@gmail.com"
] | evanskiprop1@gmail.com | |
eccc81b6d956eeebf8723b42d9e32e1425e4d0c5 | c16ab81defbeb82c1edec880fe3dc48cbf5e4b68 | /databases2019/orders/views.py | 96e6d180ba74c3e2f6f5b17ba3ff0214931f7d85 | [] | no_license | korneliakli/Bazy-danych | d68a16528531343915d314c5d76d7b9671182d30 | 73f8835b33655a4ec16d21c6ab216c9ff048e79d | refs/heads/master | 2020-12-14T11:14:40.295407 | 2020-01-18T14:41:24 | 2020-01-18T14:41:24 | 234,724,375 | 1 | 1 | null | 2020-01-18T14:46:14 | 2020-01-18T11:26:28 | Python | UTF-8 | Python | false | false | 3,967 | py | from django.shortcuts import render
from django.shortcuts import get_object_or_404, render, redirect
from django.http import HttpResponse
from django.urls import reverse
from django.views import generic
from django.forms import formset_factory, inlineformset_factory
from django.db.models import Sum
from northwin... | [
"noreply@github.com"
] | noreply@github.com |
03687a1d41829240c683f48a9856d079e26b5cc2 | a3abf65332e356c7ec19b7c5ca777d755951fbfc | /meiduo_mall/meiduo_mall/apps/contents/urls.py | 5caecb69e5fcd8e5b10cd46bb5e756187cbfcfd0 | [
"MIT"
] | permissive | YangJaZeng/meiduo_probject | 55cbacb05de34134f017f016fa5be289278fc840 | 7daf305e70ec9d64c896c23a53b52ad2231c85ce | refs/heads/master | 2020-05-23T10:27:17.157774 | 2019-06-02T11:26:51 | 2019-06-02T11:26:51 | 186,719,640 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 127 | py | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$',views.IndexView.as_view(), name="index")
] | [
"xwp_fullstack@163.com"
] | xwp_fullstack@163.com |
fc4949f67fbe412b180ea9333641ba6fa1ddf3ba | 2bbd384b83f1cf4bb654573622ad1b7aea305d6c | /04.py | 935f270f0d64041b229f488580e45ec148729ae3 | [] | no_license | kennygao/adventofcode2020 | f90156edf41becce51beb1eae42118af3b04f962 | d9c2a0ed59652a66ef0747cbba53b3df80c6659f | refs/heads/master | 2023-02-02T00:47:25.870120 | 2020-12-17T00:47:48 | 2020-12-17T00:47:48 | 317,445,469 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,034 | py | import re
with open("input/04.txt") as f:
passports = [
dict(field.split(":") for field in passport.split())
for passport in f.read().split("\n\n")
]
def valid1(passport):
return {"byr", "iyr", "eyr", "hgt", "hcl", "ecl", "pid"} <= set(passport.keys())
def valid2(passport):
return v... | [
"kennygao@users.noreply.github.com"
] | kennygao@users.noreply.github.com |
c709311188ed27d6fd515437e9b1b352de597ad1 | 3c000380cbb7e8deb6abf9c6f3e29e8e89784830 | /venv/Lib/site-packages/cobra/modelimpl/infra/aeppd.py | 4983bd5d01de03dfb0cf643882482f48d1314385 | [] | no_license | bkhoward/aciDOM | 91b0406f00da7aac413a81c8db2129b4bfc5497b | f2674456ecb19cf7299ef0c5a0887560b8b315d0 | refs/heads/master | 2023-03-27T23:37:02.836904 | 2021-03-26T22:07:54 | 2021-03-26T22:07:54 | 351,855,399 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 16,904 | py | # coding=UTF-8
# **********************************************************************
# Copyright (c) 2013-2020 Cisco Systems, Inc. All rights reserved
# written by zen warriors, do not modify!
# **********************************************************************
from cobra.mit.meta import ClassMeta
from cobra.m... | [
"bkhoward@live.com"
] | bkhoward@live.com |
828f6140088a8bd190c9d6b11508434f7467f36e | 99b99a4e4ff98df47badf26065f5fda22b756820 | /classes.py | 14a8e07aa5a8a49af785e8cba7f0ace52c7356d3 | [] | no_license | witcold/project-freecell | 962dbc655acd906f72a341d88245c4858c2ad299 | 80661fe5b7ffb68661d40dffb91b6ca278cab2f5 | refs/heads/master | 2021-01-10T02:21:18.582453 | 2016-01-31T13:35:56 | 2016-01-31T13:35:56 | 43,798,596 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,371 | py | # coding=utf-8
from enum import Enum
from random import shuffle
class Suit(Enum):
__order__ = 'SPADES CLUBS DIAMONDS HEARTS'
SPADES = '♠'
CLUBS = '♣'
DIAMONDS = '♦'
HEARTS = '♥'
class Value(Enum):
__order__ = 'ACE TWO THREE FOUR FIVE SIX SEVEN EIGHT NINE TEN JACK QUEEN KING'
ACE = 'A'
... | [
"wmescheryakov@gmail.com"
] | wmescheryakov@gmail.com |
b44f2d6b782d7a4ace7de749cdf7a45ce0e5a286 | 54a0b86d4c3f731487ad4470fb365907970472e6 | /P1/studentparameters/Project1_Parameters_pd.py | a43613ec4d1fccd11ba26156898bdb1308d827dc | [] | no_license | samiurrahman98/ece458-computer-security | 26aa46e174b0bf77f748e6451dd2e0e4183feebd | cf79430b98e3679ffcd687a0c96b5e979187e1e3 | refs/heads/master | 2022-11-25T01:26:36.874094 | 2020-07-31T21:24:53 | 2020-07-31T21:24:53 | 280,979,038 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,770 | py | # Select the file name that matches your first two letters of your last name on Learn
# Read those parameters as your ECE458 project 1 parameters
# p,q,g are DSA domain parameters, sk_i (secret keys) are used in each signature and verification
p=16158504202402426253991131950366800551482053399193655122805051657629706040... | [
"S72RAHMA@uwaterloo.ca"
] | S72RAHMA@uwaterloo.ca |
82c650b0ac290467d3a50aad83b7ccd4abe4d061 | 6b6cebb1708f4666f39052f5ae70bf87b27117d8 | /Exercicios/ex109_files/moeda.py | 3c8941f9e182416e66c985a1badd1643787f4cf9 | [] | no_license | claudiodornelles/CursoEmVideo-Python | 04abc7d3ab819c77be4e8f3c059af9df351beda7 | 7a80129d4ac90a9ea45720ff0ce80a0c83311cb4 | refs/heads/master | 2023-06-02T17:40:43.765928 | 2021-06-15T20:11:57 | 2021-06-15T20:11:57 | 360,858,753 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 641 | py | def moeda(valor = 0):
return (f'R${valor:.2f}')
def aumentar(valor = 0, taxa = 0, formatar = False):
valor *= 1 + (taxa / 100)
if formatar:
return moeda(valor)
else:
return valor
def diminuir(valor = 0, taxa = 0, formatar = False):
valor *= 1 - (taxa / 100)
if formatar:
... | [
"82041667+claudiodornelles@users.noreply.github.com"
] | 82041667+claudiodornelles@users.noreply.github.com |
7fcff98621381339d39981dd8216bbb9fb3ad8b0 | 39d4504ec1da8975fac526d6801b94f4348b6b61 | /research/syntaxnet/dragnn/tools/model_trainer.py | fe0d0f73b9e6cdd9d9a49cc855a774796908a6d2 | [
"Apache-2.0"
] | permissive | vincentcheny/models | fe0ff5888e6ee00a0d4fa5ee14154acdbeebe7ad | afb1a59fc1bc792ac72d1a3e22e2469020529788 | refs/heads/master | 2020-07-23T21:38:24.559521 | 2019-11-15T07:50:11 | 2019-11-15T07:50:11 | 207,712,649 | 1 | 0 | Apache-2.0 | 2019-09-11T03:12:31 | 2019-09-11T03:12:31 | null | UTF-8 | Python | false | false | 8,218 | py | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | [
"1155107977@link.cuhk.edu.hk"
] | 1155107977@link.cuhk.edu.hk |
74824ac6e1e4b41330a99318321da4dd36121cd9 | e3cd564e2be64cfc767438bcba47aa403a15d97c | /Problem47.py | 9e4b74a7768d12ed16ca7b3f86d575f40d0f4761 | [] | no_license | NiltonGMJunior/project-euler | 1058826f6f52b7cdb7f83b283ba70399a82da15f | 91d82dbfdf1a65e0d1e9c93040c875aec4fb736d | refs/heads/master | 2020-03-25T03:12:33.349969 | 2018-11-10T22:45:12 | 2018-11-10T22:45:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 645 | py | def isPrime(n):
if n < 2:
return False
elif (n == 2) or (n == 3):
return True
elif n % 2 == 0:
return False
k = 3
while k < n:
if n % k == 0:
return False
k += 2
return True
def primeDiv(n):
div = []
tf1, tf2 = True, True
ref = n
while tf1 == True:
if ref % 2 == 0:
ref /= 2
div.a... | [
"nilton.junior51@hotmail.com"
] | nilton.junior51@hotmail.com |
bbe57d763b216dbe2a08f88b6f8dae07b110d804 | 66ca8f005d89257269aafcae8a26b75d530d59b2 | /unittests/test_osrelease.py | 441955e7e98a3b89173b55e4847e45f40fa65677 | [
"MIT"
] | permissive | eccles/lnxproc | dea935a732e571a8a237f7ab96f044d5565712d2 | f9d9a75a0a233d2def76b150784108dc453ad9ad | refs/heads/master | 2023-06-08T04:16:35.018369 | 2023-05-29T09:24:48 | 2023-05-29T09:24:48 | 6,925,816 | 1 | 0 | MIT | 2023-05-29T09:24:50 | 2012-11-29T17:53:31 | Python | UTF-8 | Python | false | false | 336 | py | '''
Test OSrelease()
'''
from lnxproc import osrelease
from .basetestcase import BaseTestCase
class TestOSrelease(BaseTestCase):
'''
Test OSrelease class
'''
key = 'OSrelease'
module = osrelease
def test_osrelease(self):
'''
Test normal instantiation
'''
self... | [
"paulhewlett@gmail.com"
] | paulhewlett@gmail.com |
a724e6f175e77b719ff3ed3648565d8808140b6e | 866e1e9816301baefc2e178c1eeabc2ff2942781 | /django_learnit/views/detail.py | df8b93ce5599854ea8b413d39a57e9e1764a6c51 | [] | no_license | florianpaquet/django-learnit | b89f0d24014bd7435c861b73a0d44c4ec81d183f | e7713cf11e5af23e28dadd9aff226ea7c14de36b | refs/heads/master | 2020-12-01T04:08:29.212629 | 2016-09-08T20:32:08 | 2016-09-08T20:32:08 | 67,214,135 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,210 | py | from django.views.generic import TemplateView
from .base import LearningModelMixin
class LearningModelDetailView(LearningModelMixin, TemplateView):
"""
LearningModel detail view
"""
def get(self, *args, **kwargs):
self.learning_model = self.get_learning_model()
return super(LearningM... | [
"contact@florianpaquet.com"
] | contact@florianpaquet.com |
611246ab14211021ee7f0fa861fcdc92c2c37b1c | 5ddc9fc8e2b078f94e18db5cb3dc00a988470fa8 | /plotserver.py | 4566b8aa4c2c4c14ab746e085893fd4b07630256 | [
"MIT"
] | permissive | cpthackray/source-receptor-vis | 0d41418869920519c51d509bf4a4db6a2999cd84 | 2cdb905dbaf2a625e92a883b0abdcf1d19115192 | refs/heads/main | 2023-06-18T00:37:50.008747 | 2021-07-15T18:36:35 | 2021-07-15T18:36:35 | 317,356,961 | 0 | 0 | MIT | 2021-07-15T18:36:35 | 2020-11-30T22:02:11 | Python | UTF-8 | Python | false | false | 3,309 | py | """
Docstring
"""
import matplotlib.pyplot as plt
import numpy as np
import io
from flask import Flask, send_file, make_response, request
from flask_restful import Resource, Api
from wtforms import StringField, SubmitField, SelectField, FormField
from flask_wtf import FlaskForm
from wtforms.validators import DataRequ... | [
"thackray@seas.harvard.edu"
] | thackray@seas.harvard.edu |
d63386cf5630ec5d7cdb3ba25e51403aaddd35ff | c7ce0a2a6b203fc97447e272fb4426f998d96e34 | /11/WebScrapingExercise_6.py | 5db1a17fa34af320808ef32080e5210cf09864ae | [] | no_license | vasiliv/MoshHamedaniPython | 5eac1fa8a000a63590899438f14f341e27d14804 | 41dd14c7b88365ededeb142ed21a843553252066 | refs/heads/master | 2023-01-18T18:25:45.931350 | 2020-12-03T14:37:38 | 2020-12-03T14:37:38 | 316,267,305 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 346 | py | #https://www.w3resource.com/python-exercises/web-scraping/index.php
#Write a Python program to extract h1 tag from example.com
import requests
from bs4 import BeautifulSoup
url = "http://example.com/"
page = requests.get(url, "html.parser")
#print(page.status_code)
soup = BeautifulSoup(page.content, 'html.parser')
pr... | [
"ggo24@yahoo.com"
] | ggo24@yahoo.com |
79699dd691887e6258b00716f2abc1b190890f0e | 6bc44b7c93c354311eb76924c987a79b6722cad5 | /a_726.py | 9b501c314d4ca70c62280f580e529a0103349d3b | [] | no_license | sun510001/leetcode_jianzhi_offer_2 | a15d032491ed711ee280e1107c9322e9b91fd213 | b1680014ce3f55ba952a1e64241c0cbb783cc436 | refs/heads/master | 2023-06-06T21:31:18.292362 | 2021-07-09T01:16:36 | 2021-07-09T01:16:36 | 351,375,291 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,758 | py | # -*- coding:utf-8 -*-
"""
726. 原子的数量
给定一个化学式formula(作为字符串),返回每种原子的数量。
原子总是以一个大写字母开始,接着跟随0个或任意个小写字母,表示原子的名字。
如果数量大于 1,原子后会跟着数字表示原子的数量。如果数量等于 1 则不会跟数字。
例如,H2O 和 H2O2 是可行的,但 H1O2 这个表达是不可行的。
两个化学式连在一起是新的化学式。例如 H2O2He3Mg4 也是化学式。
一个括号中的化学式和数字(可选择性添加)也是化学式。例如 (H2O2) 和 (H2O2)3 是化学式。
给定一个化学式 formula ,返回所有原子的数量。格式为:第一个(按字典序)原子的... | [
"sqf121@gmail.com"
] | sqf121@gmail.com |
d1932ac69b4c613b0286ed22ed76ab3836f4e473 | 3f470f62f7cb4bc383f44ab33557aa3e6174649b | /app.py | ff6627bd2f51f004a411569d2f50aae9b8139360 | [] | no_license | reinev/image-style-transform | ddfb014ddde332f9eeaf3614a9ff2805a14decca | c9e06ea8c32711227cdd64b2672e455bb08fb284 | refs/heads/master | 2020-04-19T16:15:46.022836 | 2019-01-30T08:48:53 | 2019-01-30T08:48:53 | 168,298,958 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,442 | py | from __future__ import print_function
import os
import time, datetime
import tensorflow as tf
from flask import Flask, render_template, request, send_from_directory
import model
import reader
from preprocessing import preprocessing_factory
app = Flask(__name__)
app.config['SECRET_KEY'] = '123456'
app.static_folder ... | [
"noreply@github.com"
] | noreply@github.com |
7c033e6ea087f5ce359b4191ed726cd49b7ac9b0 | c28a9c55042a1fe7cae3b5f210594c9de1438fe5 | /players/randomPlayer/player.py | 9a9f2c5a8236fe52b769aed90f0046aa91f68ddf | [] | no_license | mehtank/dinoparmfish | afbb2a389c652139c74104270d4a12c4e856e73c | 3a66bfb7245ec6f2bd39e835e1847aa7d0c8597b | refs/heads/master | 2020-05-18T16:29:06.210912 | 2011-06-27T23:33:41 | 2011-06-27T23:33:41 | 1,823,807 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,050 | py | import random
from ..engine import card
class Player:
def output(self, s):
if not self.debug:
return
print "Player " + repr(self.index) + ": ",
print s
def __init__(self, debug=False):
self.debug = debug
def setup(self, index, handSizes, hand):
self.index = index
self.numPlayers =... | [
"moomoo@berkeley.edu"
] | moomoo@berkeley.edu |
d896bd55a2384700f3317a027172df79bff3c361 | 0fc6502b33ad94418980b15036743e672e57628f | /todo/migrations/0001_initial.py | bdeadddd0761ca4c280f022089f12e2e47e3041b | [] | no_license | laltman/pomodoro | 6bcc841ce94318a02fd92d9caee9ca6bb4290a7f | 0da13103bb2bc78a702d234e76859b03dc5a5611 | refs/heads/master | 2020-12-24T20:25:00.020631 | 2016-05-15T22:04:18 | 2016-05-15T22:04:18 | 58,744,591 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 996 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-05-10 20:37
from __future__ import unicode_literals
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
... | [
"lauren_altman@brown.edu"
] | lauren_altman@brown.edu |
ec203b96221cca0904285fe6bd03f1a909039e94 | 90a9e36d7ad6ab97a3e0a38b00942917c9168d04 | /on_demanded_service/doAugment.py | a821ff90795668b8452b3e6fbc5819f4d56dccbb | [] | no_license | oryondark/CloudAug | 6bf8b10310759e8b9fb954ae00c29fcf6e04f90e | 05d35c6057626b02e2eed91cb9e097051305361a | refs/heads/master | 2020-12-12T23:26:42.624064 | 2020-04-17T14:12:03 | 2020-04-17T14:12:03 | 234,256,165 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,398 | py | from generateKeyPair import PrepareKeyPairItemUsingRanges
from cacheService import PrePareCacheService
from threading import Thread
import boto3
import json
import numpy as np
import os, sys
import time
def do_augmentation(Host='aws.elasticache.endpoint:11211', Train_on=True, invocation_name="lambda", r=3):
'''
... | [
"k2i2m2@gimhyeonjun-ui-MacBook-Pro.local"
] | k2i2m2@gimhyeonjun-ui-MacBook-Pro.local |
f66209a409797209c65861ee637738fb6f00d6d1 | a61ebd1507eeaa334aff44800b022ef0a258752a | /Code/CodeChef/CQ1LSTR.py | e9652c5d38e46c48dbe9296ec2be369ebacbefb0 | [
"MIT"
] | permissive | Jimut123/competitive_programming | 14ce0ab65414e6086763519f95487cddc91205a9 | b4cdebaceee719c1a256921829ebafda11c515f5 | refs/heads/master | 2023-03-05T15:42:57.194176 | 2022-04-08T08:53:26 | 2022-04-08T08:53:26 | 156,541,142 | 1 | 0 | null | 2019-05-29T17:10:28 | 2018-11-07T12:09:55 | C++ | UTF-8 | Python | false | false | 326 | py | T = int(input())
for i in range(T):
m_str = input()
s_str = input()
num = int(input())
lis_ = list(s_str)
k = 0
for item in lis_:
if item not in m_str:
k += 1
#print(item)
if int(len(s_str) - k) >=num:
print("Yes")
else:
print("No")
... | [
"jimutbahanpal@yahoo.com"
] | jimutbahanpal@yahoo.com |
2dd418cdd638fc975092d42d9c2aa1ea285f844d | 0b179d9d210d2ba5a3300f1c5584a5671abf1736 | /Mizhiwu/apps/ss/migrations/0002_auto_20180216_2029.py | c44a45364082b4f851fef59ad48d4d21a912a7a5 | [] | no_license | sjl421/django-practices | 72bd451b2ab182c83c8337801059743482426359 | e1ccb1cd6832cddd39d4b3f4d91db507c2e591ac | refs/heads/master | 2020-03-18T05:32:15.830284 | 2018-02-18T06:23:48 | 2018-02-18T06:23:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 437 | py | # Generated by Django 2.0.1 on 2018-02-16 20:29
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('ss', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='node',
name='show',
field=mode... | [
"zh19960202@gmail.com"
] | zh19960202@gmail.com |
9dde29e9014c7175238d9605c834650b0e9601fd | 6e8089c9ab0b6f233e3455b087546159a41aeaeb | /daffydav/vfs/__init__.py | 0e6a7752ad47a634c9383ca128eac1aa2c110501 | [] | no_license | mtpi/daffydav | 761d6fe824a1f43922f5514750dcde7ab42212eb | 25e5aff972d9c0131c749f350d35d569c5a3bdb8 | refs/heads/master | 2021-01-25T10:00:08.918311 | 2009-10-30T23:17:56 | 2009-10-30T23:17:56 | 39,693,128 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,971 | py | #!/usr/bin/env python
# encoding: utf-8
"""
Virtual File System backends
Created by Matteo Pillon on 2009-07-26.
Copyright (c) 2009 Matteo Pillon. All rights reserved.
"""
from fs.base import FSError
from webob import exc
from daffydav.lib.registry import authenticator, vfs
def check_if_forbidden(path, raise_error=T... | [
"matteo.pillon@6251b506-c5a9-11de-b12b-e93134c88cf6"
] | matteo.pillon@6251b506-c5a9-11de-b12b-e93134c88cf6 |
cb5c227562ff575532899df08a9b6d72398d0922 | 17be80a5a40d6989ff11fa46947eec2cc73fcec0 | /src/0217/0217.py | 68d5964b9105d000404fa15ea2abd9319a68dd17 | [] | no_license | zhangjiahuan17/LeetCode | 61cd1997cb9805a1d5a29c97cadfc29da7bc7b0e | cbc22a6826755ffb5a8b7048b964c19682703a40 | refs/heads/master | 2020-05-14T17:28:25.159743 | 2018-12-05T13:40:18 | 2018-12-05T13:40:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 295 | py | class Solution(object):
def containsDuplicate(self, nums):
"""
:type nums: List[int]
:rtype: bool
"""
nums_len = len(nums)
set_len = len(set(nums))
if nums_len == set_len:
return False
else:
return True
| [
"liuhan0122@shu.edu.cn"
] | liuhan0122@shu.edu.cn |
d7dfed4644f708677c8364f5fbed726502e8096e | e904230b361c4f2e6ecfaa9212ad91622d7ce0b8 | /args.py | b335c1bcb11e60c8938ff6057c9fbaea1373b7bd | [] | no_license | nikhildoifode/NLP_project | 7d3dc2fe4883aa9c89876a26425b44375ff397e8 | c75be46f9c015739e345b220ff7bc270f42d72bd | refs/heads/master | 2023-01-25T05:09:03.054356 | 2020-12-10T04:21:49 | 2020-12-10T04:21:49 | 319,818,569 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,464 | py | from argparse import ArgumentParser
def get_args():
parser = ArgumentParser(description="Soccer chatbot")
parser.add_argument('--no_cuda', action='store_false', help='do not use cuda', dest='cuda')
parser.add_argument('--gpu', type=bool, default=False)
parser.add_argument('--epochs', type=int, default=... | [
"nikhildoifode200@gmail.com"
] | nikhildoifode200@gmail.com |
1f1a20a963607910d43b55ae44763850b0c35aa9 | 6d865b4912db4daed5797279c8d14827332c3fbd | /treat/mesh/cuts.py | a0f7ebc34f0149743a142ca5cb1822b2396aeda2 | [
"MIT"
] | permissive | tjlaboss/tasty_treat | e098acfbf42321612066de539cb3edc26aa434e2 | 5a137b49c6648eda6500025de8bab9c8dcc78d45 | refs/heads/master | 2020-04-07T14:08:37.291156 | 2019-10-18T22:47:15 | 2019-10-18T22:47:15 | 158,435,237 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 729 | py | # Mesh Cuts
#
# Replicate the mesh cuts from the Serpent model
import sys; sys.path.append("..")
import numpy as np
# Height of layers (cm)
layers = np.array(
[3.486, 27, 22.68875, 8.89, 0.762, 20, 31.59375, 5, 5, 39.37375, 20, 0.762, 22.06625, 13.64, 27, 8.02675])
# Number of axial slices per layer
n_cuts = np.arra... | [
"travis@ktc-technology.com"
] | travis@ktc-technology.com |
06ea5fb7b529ff59dde0b93d3270b96300c2905c | b9475a49c9aedbc9ce93b61fb30454a9ebd95ff5 | /CRM/views/teacher.py | f40b685f79bfa386d1e667190480c07ecfea8601 | [] | no_license | lckazml/NB | 25cc88f05ed69c1f3ec3820cef7d8ac12e376e67 | be45e364ff66e07b1bc348ab6a8f63b3fa4663dd | refs/heads/master | 2020-09-01T13:11:19.478292 | 2019-11-29T08:22:58 | 2019-11-29T08:22:58 | 218,965,213 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,142 | py | from django.shortcuts import render, redirect, reverse, HttpResponse
from django.contrib import auth
from CRM import models
from CRM.forms import *
from utils.pagination import Pagination
from django.views import View
from django.db.models import Q
from django.db import transaction
from django.http import Query... | [
"noreply@github.com"
] | noreply@github.com |
dbcd951d31bdb7c7e00f78dd5992a719fb268dcb | 256471532845a6957beeb49c4d621358fd4b0d79 | /interactive_plot.py | 0ad852c046b09d3da1c05dec3cde90f50a21de23 | [] | no_license | davircarvalho/audio_cluster_visualization | d6baaf06c73ce8f02ab0463514436f151814e8c7 | 9a2a9f539a2f8de2e81d025e6c1a2b897e450197 | refs/heads/main | 2023-06-14T13:33:01.534844 | 2021-07-06T18:04:31 | 2021-07-06T18:04:31 | 383,550,476 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,558 | py | import matplotlib.pyplot as plt
import numpy as np
from operator import itemgetter
import sounddevice as sd
class interactive_plot:
def __init__(self, x, y, data, sr):
self.x = x # List of x coordinates of clustered samples
self.y = y # List of y coordinates of clustered ... | [
"r.davicarvalho@gmail.com"
] | r.davicarvalho@gmail.com |
9b95cebffda23c9711f94813b003775f3884d499 | aa4267505a69f53622adf37c9995b343d62e1493 | /test_lib.py | 1058dc2c5a00644f43b3357d0d25dd366479e59b | [] | no_license | codesavvysoftware/PyScripts_2016 | 370be41d63480f99d68dfdc780e7d25135556e54 | f854e9ee61b6d0ec33ff85aad747f87d6901c218 | refs/heads/master | 2021-01-10T13:04:49.984584 | 2016-02-01T17:28:49 | 2016-02-01T17:28:49 | 50,857,315 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 125 | py | class SomeClass:
def __init__(self):
self.var = "A Test \\n"
def PrintIt(self) :
print(self.var)
| [
"tomhaley2015@gmail.com"
] | tomhaley2015@gmail.com |
ad571803df4c1a17e6d465eb085f43593a66e67f | 5daf87eed9b4f006eb07e2ec87f3834f205cb47d | /djangoapp/form.py | 006ba831a8f1d95b7d55a51947de73d2adeae8f9 | [] | no_license | kundankumardec16/Implementing-Django | bb08fe8f400a559af5c0bfea0c3b39abc2dc8230 | c1c8872c351383bc37137f91cd01157224292e65 | refs/heads/master | 2023-04-01T17:37:31.762286 | 2021-04-04T17:28:49 | 2021-04-04T17:28:49 | 324,736,410 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,549 | py | from djangoapp.models import Student
from django import forms
from djangoapp.models import UserData
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm
class StudentForm(forms.ModelForm):
class Meta:
model=Student
fields="__all__"
class TestForm(forms... | [
"kundankumardec16@gmail.com"
] | kundankumardec16@gmail.com |
4734e6f9df0fd9f283d16cf3ed4a4b420d9ac1ab | 4ce4ff000a96cf76eb72260e3f7d3ba1e7708439 | /coregionalised.py | d82fc553bad6cf0b42b791989be8624ee3a0daa6 | [
"Apache-2.0"
] | permissive | thomaspinder/Doubly-Stochastic-GPs | 78e32002fece804bbd56da0aad830c95d19c0990 | 65b04d5e0a9e37b9b517a0d5c27039754b82c4ff | refs/heads/master | 2020-06-13T13:17:08.145999 | 2019-09-18T17:05:49 | 2019-09-18T17:05:49 | 194,668,260 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,862 | py | import numpy as np
from sklearn.model_selection import train_test_split
import pandas as pd
import tensorflow as tf
import time
import matplotlib.pyplot as plt
import gpflow
from scipy.cluster.vq import kmeans2
from sklearn.model_selection import train_test_split
import string
import random
from itertools import produc... | [
"tompinder@live.co.uk"
] | tompinder@live.co.uk |
693f92797a3c8c943e5f2b837b2ef4b60fca743e | 4f425dba6784cabe2a65de577b16fcca4462084c | /preprocessing/population_price.py | 94f8dfa819787d3c8a08454e9366c256b5192563 | [] | no_license | konrini/real_estate_project | 0b849706abe83af3893f08887c81d4a562542451 | 62e84d9fe25976437f27273c6fd82b49428b8a08 | refs/heads/main | 2023-08-06T20:36:50.032265 | 2021-10-08T04:14:05 | 2021-10-08T04:14:05 | 387,817,843 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,246 | py | # from matplotlib import font_manager
#
# for font in font_manager.fontManager.ttflist:
# print(font.name, font.fname)
import pandas as pd
import matplotlib.pyplot as plt
from datetime import datetime
from matplotlib import font_manager, rc
font_path = "C:/Windows/Fonts/malgunbd.ttf"
font_name = font_manager.FontP... | [
"migon99@naver.com"
] | migon99@naver.com |
a5797c6b65a6488b9a36676a3bf368350ea200a5 | d6b37b5ef96c188e2041d3ef84510c17ff7a6d37 | /automated_git/auto_git.py | 3e47804ac3b4de59f6b7409f349d18400d070aaf | [] | no_license | 99ashr/ashr_with_coffee | 256c9d6a4b0f2e8c01b6420fd3190334dffdfeb2 | ba8d63826beaa5c281036b2125bdb0ac89c1c218 | refs/heads/master | 2023-03-01T10:25:21.153209 | 2021-02-07T23:59:53 | 2021-02-07T23:59:53 | 266,193,047 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,303 | py | import os
import emoji
import pickle
import pyttsx3
# &Create Object and Set voice
engine = pyttsx3.init()
voices = engine.getProperty('voices') # getting details of current voice
# changing index, changes voices. o for male
# engine.setProperty('voice', voices[0].id)
# changing index, changes voices. 1 f... | [
"gaurashish99@gmail.com"
] | gaurashish99@gmail.com |
79fa2fe849f31d2c7294d65bafd0d07e87afe8d4 | a12c1fd7e29891192f295f21823b90b10dc08885 | /Backend/SwiftlyAPI/SwiftlyAPI/API/migrations/0015_orders_items.py | f41eb7335b35997161f08ac70de4f1bb4e034a93 | [] | no_license | DaVinciTachyon/Swiftly | 35bb892550c43a9f1df800680956b15451e720c6 | f815bbb75e72aad14ac73abf87eeda85aecf7ca8 | refs/heads/master | 2020-04-21T02:26:05.065838 | 2019-04-12T10:06:31 | 2019-04-12T10:06:31 | 169,254,430 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 475 | py | # Generated by Django 2.1.7 on 2019-03-24 13:19
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('API', '0014_user_availability'),
]
operations = [
migrations.AddField(
model_name='orders',
... | [
"davincitachyon@github.com"
] | davincitachyon@github.com |
e1800351b23fa656e8bf4456cf029b65829b9017 | 5f4dc868dea01acaf073e04e3f73ee4cabb475d5 | /kubernetes/client/apis/apps_v1_api.py | bde7903fe2a3bddf873ddfe3514509d80b43aa40 | [
"Apache-2.0"
] | permissive | oyesam7/python-3 | dd77d856246e15a6daf4f1ba09d10aba82d7ac21 | 8414f258ad7d55c6b5ab6cb98add170e2b4239f7 | refs/heads/master | 2020-08-15T11:07:41.379059 | 2019-10-15T15:25:32 | 2019-10-15T15:25:32 | 215,330,850 | 1 | 0 | Apache-2.0 | 2019-10-15T15:18:22 | 2019-10-15T15:18:21 | null | UTF-8 | Python | false | false | 502,920 | py | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.14.4
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import sys
import os
i... | [
"haoweic@google.com"
] | haoweic@google.com |
c63eb3925367b61baa0f103283c8a73ca70d1c11 | 3f9e0b03c86fa4f4e28b5e28bcb9bb2e737fe7e1 | /env/Lib/site-packages/pip/_internal/index/collector.py | 14d745eefbb4c0c959c6f856a8147047578851cd | [
"Apache-2.0"
] | permissive | sinha-debojyoti/Ookla-Speedtest.net-Crawler | 58c5b9d535b9f10f54eecbc656a6d62c50cc19b7 | 02e54f5679de74f732a34a37fac260d2ac34eb12 | refs/heads/master | 2022-07-18T10:27:35.020386 | 2022-07-03T03:53:11 | 2022-07-03T03:53:11 | 218,542,102 | 17 | 33 | Apache-2.0 | 2022-07-03T03:55:41 | 2019-10-30T14:08:16 | Python | UTF-8 | Python | false | false | 17,645 | py | """
The main purpose of this module is to expose LinkCollector.collect_sources().
"""
import cgi
import collections
import functools
import html
import itertools
import logging
import os
import re
import urllib.parse
import urllib.request
import xml.etree.ElementTree
from optparse import Values
from typing import (
... | [
"92641125+RoyCoding8@users.noreply.github.com"
] | 92641125+RoyCoding8@users.noreply.github.com |
fe92f12313b60ba841ba3465d1b194b44aa39da8 | cfca97ea412ac367adf5807ab8391afb4ba38b81 | /products/forms.py | 3a8c438ab736a0c0e3be8b8d41a277b3aac4aaef | [] | no_license | Feitsarenko/steel_kiwi_task | 6063a050a1e1e0cdff26db0d37a2e8281fe8012e | 2fd4cbe54cfc893bff84e62172cfd61bdb874ad8 | refs/heads/master | 2020-04-17T05:03:41.634098 | 2019-02-19T01:18:53 | 2019-02-19T01:18:53 | 166,249,884 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 519 | py | from django import forms
from .models import Comment, Product
from tinymce.widgets import TinyMCE
class CommentForm(forms.ModelForm):
class Meta:
model = Comment
fields = ['text', ]
class ProductForm(forms.ModelForm):
description = forms.CharField(widget=TinyMCE(mce_attrs={'cols': 160, 'row... | [
"feitsarenkok@gmail.com"
] | feitsarenkok@gmail.com |
f423b1a76188b4de151f95e2a00eb45fe76ebc02 | 3ab8d53f4ec6ace0f568e184ef49e5a9108e7f49 | /v1/final/main_runner.py | 68288328c6d15f530764afcab2ed9b5455bbf619 | [] | no_license | ikashilov/INF-3200 | ccfddd2bbcc28db5e92b7db4ee8b7a9c8d75c4c4 | fb0bdbc95d89893ad39fd71baa3e95753e592d4d | refs/heads/master | 2021-06-29T03:14:51.852590 | 2021-01-18T10:10:06 | 2021-01-18T10:10:06 | 211,906,245 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,836 | py | import os
import math
import json
import socket
import hashlib
import argparse
import threading
DEF_PORT = 5000 # default number of port
DEF_WORKERS = 8 # default number of nodes in chain
DEF_IP = socket.gethostname()
# These are not actual keys. These are key ids for allocation. We use hex string... | [
"noreply@github.com"
] | noreply@github.com |
5ff9a344e68b77e768b170d2cf0fecbcfecb9d32 | 7d09c12042280c81562f94a3148db34a10368263 | /ud120/choose_your_own/your_algorithm.py | 61a9db3606807673b19ca95606c9090e894c4000 | [] | no_license | prasannavarshan/Udacity-Machine-Learning | 3e708c4f284c1857490952786920e07a9ba84ca2 | c1d74756a5b87c3c5aa8bed7109e4d77970e4dc5 | refs/heads/master | 2020-04-13T13:37:15.197134 | 2018-06-04T16:39:08 | 2018-06-04T16:39:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,797 | py | #!/usr/bin/python
import matplotlib.pyplot as plt
from prep_terrain_data import makeTerrainData
from class_vis import prettyPicture
features_train, labels_train, features_test, labels_test = makeTerrainData()
### the training data (features_train, labels_train) have both "fast" and "slow"
### points mixed together--... | [
"526161421@qq.com"
] | 526161421@qq.com |
07cbe0bd1a2b160a107b9c7c726ccdf8a7a0b468 | 81409c89796e630edb93625340b21b881822099b | /cycles/demo_muscle.py | 9b63b06bbee4d9f7cdbcae05ba59eafedcbeafec | [
"Apache-2.0"
] | permissive | em-yu/BlenderToolbox | f8d1f829b8c224ac69e17845f107720ff61d550b | ac9da757c8c372237458467aa6663bcdbb86b803 | refs/heads/master | 2022-12-09T04:35:30.990704 | 2020-06-28T02:52:20 | 2020-06-28T02:52:20 | 291,939,154 | 0 | 0 | Apache-2.0 | 2020-09-01T08:19:51 | 2020-09-01T08:19:50 | null | UTF-8 | Python | false | false | 1,865 | py | import sys
sys.path.append('/Users/hsuehtil/Dropbox/BlenderToolbox/cycles')
from include import *
import bpy
outputPath = './results/demo_muscle.png'
# # init blender
imgRes_x = 720 # increase this for paper figures
imgRes_y = 720 # increase this for paper figures
numSamples = 50 # usually increase it to >200 for p... | [
"hsuehtil@cs.toronto.edu"
] | hsuehtil@cs.toronto.edu |
acdd6e2c79fe6e2c0ad382632c952baaaf3223d2 | ea83e60e2be606813005081a9f1b9516de018c7d | /language/casper/evaluate/top_metrics.py | 590fcb6a4500098a18732c84de66406ebe5697bd | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] | permissive | optimopium/language | 1562a1f150cf4374cf8d2e6a0b7ab4a44c5b8961 | bcc90d312aa355f507ed128e39b7f6ea4b709537 | refs/heads/master | 2022-04-03T03:51:28.831387 | 2022-03-16T21:41:17 | 2022-03-16T22:50:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,005 | py | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors.
#
# 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 ... | [
"kentonl@google.com"
] | kentonl@google.com |
bbd6d443e8b1b97a890296c60a912bbcc9f365db | f6a5b5180762b25b556145d0d8e77c4f0347dce1 | /Uri/URI_1078.py | 7aeb12cc96f8f592b809e99e59fbfabae509570e | [] | no_license | DarlanNoetzold/URI_Python | 9864f3f75ce372f99e0df650c4e7450f107fa73d | a7b3201273d8f2cd9d9e4cdbfd53652bbe66d01e | refs/heads/master | 2023-08-17T03:44:09.944136 | 2021-10-02T18:00:28 | 2021-10-02T18:00:28 | 284,829,292 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 88 | py | n = int(input())
for i in range(1, 11):
print('{} x {} = {}'.format(i , n , i * n)) | [
"41628589+DarlanNoetzold@users.noreply.github.com"
] | 41628589+DarlanNoetzold@users.noreply.github.com |
35b543f03ab298a2ea557d017de132c0badfff58 | fc1aed46f5fc2fd742ccacd8fb95b080aaf4aa60 | /src/BEA_Algorithm/BEA.py | 88b64e05e0c4593f2871d186f9cb853bb05954e4 | [] | no_license | toan207/DistributeDatabaseProject | 20b0a8c35eb3219a01e9b60fbd10a2e367839167 | 7939355f0549115289f334f79905abfdb8b600c9 | refs/heads/main | 2023-05-26T19:24:47.698295 | 2021-06-14T17:03:17 | 2021-06-14T17:03:17 | 376,887,387 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,477 | py | from math import inf
s = [[3,3,7],
[0,9,3],
[8,1,9]]
aff = [sum(i) for i in s]
mx = [
[1,0,1,1,1],
[1,0,0,1,1],
[1,0,0,1,1]]
fo = open("test.txt", "r")
n = int(fo.readline())
mx = []
s = []
for i in range(n):
mx.append(list(map(int, fo.readline().split())))
m = int(fo.readline())
for i in r... | [
"blcat9x@gmail.com"
] | blcat9x@gmail.com |
3ec194341e228ccc5a47c0ec5c399d759e6710e2 | e543efeae918579a04b2f8f99ca5654efa4db94d | /2020/Day 5/1.py | 9b11f59e23ee4c539d8efed568c7a0f26098aed6 | [] | no_license | Matthias1590/Advent-of-Code | f5800f2090315eba06f2ed0c75503b51c3bec404 | 000ccf2bade9464c95af909b5c4d7355c43ac0cf | refs/heads/master | 2023-01-30T12:39:46.536505 | 2020-12-08T20:31:34 | 2020-12-08T20:31:34 | 318,288,777 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 605 | py | with open("Day 5/input.txt", "r") as inputFile:
puzzleInput = inputFile.readlines(); seats =[]
for seat in puzzleInput:
seat = seat.strip(); row = range(128)
for char in seat[0:7]:
if char == "F":
row = row[:int(len(row)/2)]
elif char == "B":
row = row[int(len(row)/2)... | [
"matthiasx95@gmail.com"
] | matthiasx95@gmail.com |
da7e952a94a1d21c81cb6fafdf8a4fa0298e86c0 | 26d2584e3f51c77e2967ec48a7189413c1ffbfd9 | /apps/invoice/views/__init__.py | 77447bbf50822c65b3a12e82dbb6a78046efd700 | [] | no_license | classSaltyFish/invoiceRecognition | 9a0c1dc9ac19293c502abf92f8c61263896609a2 | fa20bc8d6c82d167189f5c80a2012b995e7c7005 | refs/heads/master | 2022-12-17T00:02:55.159891 | 2020-02-28T09:01:23 | 2020-02-28T09:01:23 | 241,006,548 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 146 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time : 2020/2/19 13:51
# @Author : coldsun
# @File : __init__.py.py
# @Software: PyCharm
| [
"2679618366@qq.com"
] | 2679618366@qq.com |
2e89c3bb1577035563a3974bfab97259ab5d7d06 | cbaa8c30fb4352c241dc81c1c6cc5079aad2526b | /trees/getExterior.py | db607a9513b8a6267e760fc142a4b70268678399 | [] | no_license | Fatou1993/interviews-preparation | 68b7f870a4a0e93717f97ec1a4e1438bbb2a3410 | 1b733a79007362a4816a896ebd6c199b4098af36 | refs/heads/master | 2021-05-04T00:47:16.363097 | 2018-02-05T19:29:53 | 2018-02-05T19:29:53 | 120,351,309 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,589 | py | class TreeNode:
def __init__(self, val, left=None, right=None):
self.val = val
self.left = left
self.right = right
def printRoot(self):
if self.val:
print self.val,
if self.left :
self.left.printRoot()
if self.right:
self.right... | [
"ndeye-fatou.diop@polytechnique.edu"
] | ndeye-fatou.diop@polytechnique.edu |
45bac4dab50cbe817b140adfe75e19d24aa25990 | 57e1b81bcdd545ba5f592c37834ef2c4cf475ddc | /backend/s_ash_official_app_20896/urls.py | 18c2b429f66f35c5c029dcbf04ab23010411c5d0 | [] | no_license | crowdbotics-apps/s-ash-official-app-20896 | 87bfa8565c04b944faa1445798570eb767d07c14 | f86ae73e7b2af0af7ef8acf8ef6395d0e731f124 | refs/heads/master | 2022-12-23T13:24:37.113975 | 2020-09-30T18:29:04 | 2020-09-30T18:29:04 | 300,015,860 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,979 | py | """s_ash_official_app_20896 URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/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='h... | [
"team@crowdbotics.com"
] | team@crowdbotics.com |
a37917a25a315482846d92c6aab56aa177ed98eb | 991da28acff0100caded971893b9412f98be8825 | /ck_project/ck_project/urls.py | 01d07a49fb60592cb2d8444a92d6ad5c022ed031 | [] | no_license | baidai/Django-Rest-Frame-Work-Web-Crawler | 682043a6708dddc5923a2bd28f9f5f2219c3332f | 6c5e727d90a5c36d9ca6db447d328e5f3585adf2 | refs/heads/master | 2020-05-04T18:07:35.818572 | 2019-04-03T17:54:06 | 2019-04-03T17:54:06 | 179,340,434 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 821 | py | """ck_project URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.1/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')
... | [
"noreply@github.com"
] | noreply@github.com |
470d17a803eda4f88639ad4196594c54374cf9a7 | 3962320a58004aa7f4670e2a5e7c3ed7466b1fbc | /scripts/MiniDemo.py | 9a6d64324e81d59767b281d852092be9352b0a23 | [] | no_license | xochilt/protoboard | 6b401b5fef8163678be9d4b2bafd2d2ca249619a | 5b86872cda0f2a72e97a49e0ebc9abae39802e88 | refs/heads/master | 2021-01-16T21:54:37.657287 | 2015-09-28T21:03:46 | 2015-09-28T21:03:46 | 43,321,397 | 0 | 0 | null | 2015-09-28T19:15:26 | 2015-09-28T19:15:26 | null | UTF-8 | Python | false | false | 7,213 | py | # -*- coding: utf-8 -*-
__author__ = 'mario'
if __name__ == "__main__":
import os
from django.core.wsgi import get_wsgi_application
print "####### DJANGO SETTINGS"
os.environ['DJANGO_SETTINGS_MODULE'] = "protoboard.settings"
application = get_wsgi_application()
from activitytree.models import ... | [
"mariosky@gmail.com"
] | mariosky@gmail.com |
d5a28461b8b1471cb66c036a2c61e6d7cb6f9e3d | 1284718203be50b23dcd1f6159746cfa42a04163 | /tensorflow_data/gdn/startgoalhardthres_highthresh_flowpenal/conf.py | ec97502a7db25b911d795bc532aa4155a7045770 | [] | no_license | febert/robustness_via_retrying | 8fe4106d7705228ff339f9643518a80c0a243d36 | 1def282dc22f24b72c51ff1ef9ea1a7a83291369 | refs/heads/master | 2020-03-31T19:33:39.664525 | 2018-11-07T21:52:56 | 2018-11-07T21:52:56 | 152,502,702 | 17 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,096 | py | import python_visual_mpc
base_dir = python_visual_mpc.__file__
base_dir = '/'.join(str.split(base_dir, '/')[:-2])
# tf record data location:
DATA_DIR = base_dir + '/pushing_data/cartgripper_startgoal_4step/train'
import os
current_dir = os.path.dirname(os.path.realpath(__file__))
# local output directory
OUT_DIR = ... | [
"sdasari@berkeley.edu"
] | sdasari@berkeley.edu |
a7e3a1788811eecdecc95edf3667ea9760163274 | 47227a083fa428f357d8dbf91e4b4c7294503ab1 | /基础篇/第8章-类与对象/8.4类关联结构/一对多关联结构.py | 4a0c2418e92c62b53ebb76099663f5f1f91e0990 | [] | no_license | kongziqing/Python-2lever | 9a7b890126711e609a681fceb5a90f1f87d60d54 | bbbd57d3685b6430392f044c6c079dc52ac96003 | refs/heads/master | 2022-12-10T06:43:37.913315 | 2020-09-14T04:04:14 | 2020-09-14T04:04:14 | 285,441,207 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,301 | py | """
在进行一对一类关联的基础上,结合序列结构的使用,就可以实现一对多的关联,
在进行类引用关联的操作之中,一对多的关联结构是一种较为常见的形式,例如,假设要描述这样一种关联,一个部门
有多为部门员工,为了方便部门管理,每个部门应设置一位正领导和一位副领导,
"""
# coding : utf-8
class Dept: # 定义部门类
def __init__(self, **kwargs): # 构造方法
self.__dname = kwargs.get("dname") # dname属性初始化
self.__loc = kwargs.get("loc")... | [
"406805342@qq.com"
] | 406805342@qq.com |
60e40d8069fd7ee2df3209dbe6f1987e15dbb7c8 | 6def13753e8278b38eaca2a5d3c65cb2d504671b | /Length of Last Word.py | 17f5b624ba14be7673cc83c640cfb69e067284f2 | [] | no_license | rundongliu/leetcode-python | 46fad4ca426ec7825286f35d7500486166588827 | dac2699b49a7eb5a4ae705ffa0ff2245fa7435c2 | refs/heads/master | 2021-01-17T14:47:19.769829 | 2015-02-04T19:47:00 | 2015-02-04T19:47:00 | 29,038,822 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 519 | py | class Solution:
# @param s, a string
# @return an integer
def lengthOfLastWord(self, s):
flag = 0
count = 0
for c in reversed(s):
if ord('a')<=ord(c)<=ord('z') or ord('A')<=ord(c)<=ord('Z'):
if flag==0:
flag = 1
coun... | [
"liurd91@gmail.com"
] | liurd91@gmail.com |
d2c0e9a8b234d337660dc36ed01f6277cad62565 | 959f7fc2ba6d07ff314b06bbbc46e42ba68b89bb | /venv/Scripts/django-admin.py | 7675565d802bf1515a9e4dad97eb8c2cc6c06fe1 | [] | no_license | fengbin311/my_blog | 9dedc4e291d0f7bd089a41463f44322e107c9ba8 | f88cd225d87d681856eee61f0edb970e7d3e5795 | refs/heads/master | 2022-10-31T23:53:58.975924 | 2018-02-23T14:43:13 | 2018-02-23T14:43:13 | 122,431,473 | 0 | 1 | null | 2022-10-02T04:55:33 | 2018-02-22T04:40:03 | Python | UTF-8 | Python | false | false | 150 | py | #!F:\Python\my_blog\venv\Scripts\python.exe
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
| [
"fengbin.dev@outlook.com"
] | fengbin.dev@outlook.com |
632851cbc1a2300e2011879f89b8d669e61b09b0 | 5e1959f251f42238456be6367eadbbec108852ec | /create_corpus.py | c9ff528ee4e34ffa6d700e8d6fdba47ffd522ce5 | [] | no_license | undertheseanlp/restore_diacritics | 82613fce05b5c04180a5cbf44474eec373ce4138 | 7f2b6e1b655d023728c74034e3d9ebc93b28cd00 | refs/heads/master | 2020-06-04T19:48:47.061828 | 2019-07-07T15:49:46 | 2019-07-07T15:49:46 | 192,168,360 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,795 | py | import unidecode
from sklearn.base import TransformerMixin
from sklearn.feature_extraction.text import HashingVectorizer
from sklearn.linear_model import SGDClassifier
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import LabelEncoder
from sklearn.svm import LinearSVC
from underthesea.w... | [
"anhv.ict91@gmail.com"
] | anhv.ict91@gmail.com |
5df44887d2e523c9b80e9fe5e8a140381a77ea5c | fade4e5eb42c54a5fc89090740eafb8fd757a309 | /spark_coreset-master/run_k_segment/Coreset.py | 596ce2e1c66dda31ba277d202d84bdecbd800d98 | [] | no_license | vkhakham/k-segment | 6e7d8a6e49388338fcd6b1ec81f255bb93cfef40 | 0527a19e172f428381681fc9e1dd6c0aeb48d597 | refs/heads/master | 2020-04-06T05:55:45.469433 | 2017-08-18T09:30:24 | 2017-08-18T09:30:24 | 51,445,147 | 0 | 4 | null | 2019-05-17T22:57:26 | 2016-02-10T14:14:09 | Python | UTF-8 | Python | false | false | 6,166 | py | import numpy as np
import math
import utils
class OneSegCoreset:
def __init__(self, repPoints, weight, SVt):
self.repPoints = repPoints
self.weight = weight
self.SVt = SVt
class coreset:
def __init__(self, C, g, b, e):
self.C = C # 1-segment coreset
self.g = g # bes... | [
"vadim.khakham@gmail.com"
] | vadim.khakham@gmail.com |
fb76b3246a5781390679ffa00f39d53a3e825249 | 2ca26905ed33823f8dd5ce41404ace463a744b02 | /functional_tests/base.py | b379ba24365aa3570d86ea3f9a491804f36b41fa | [] | no_license | calimat/tourngen20 | 08a958b9a5e9415300fc98f0c9ca37e1defd2cb8 | ecf6e43fd0371fbb79143043beae329c651bb1c0 | refs/heads/master | 2021-01-22T11:58:24.160881 | 2015-07-08T03:11:47 | 2015-07-08T03:11:47 | 33,584,094 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,170 | py | from selenium import webdriver
import unittest
from unittest import skip
from selenium.webdriver.common.keys import Keys
from django.contrib.staticfiles.testing import StaticLiveServerTestCase
import sys
class FunctionalTest(StaticLiveServerTestCase):
@classmethod
def setUpClass(cls): #1
for arg in sy... | [
"rherrerapetit@gmail.com"
] | rherrerapetit@gmail.com |
00993f7fd4364f888367ce596cfb6fabf4940944 | 36032e368a48369cc75103448e71159057de6b2f | /bubble_sort.py | cc0c41c975f0fdc169ed906d9268f6fb52340cb0 | [] | no_license | payalgupta1204/Data_Structure_Algorithms | 8cbb838241c4495707a7b61d89de5bc4cef8229b | 3bf97a22ae8a6dc6fec68189607b681aceaf8485 | refs/heads/master | 2020-04-05T21:36:58.005197 | 2018-11-12T14:26:29 | 2018-11-12T14:26:29 | 157,226,735 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 795 | py | import numpy as np
def inputnumber(message):
while True:
try:
userInput = int(input(message))
except ValueError:
print("Not an integer, enter int value")
continue
else:
return userInput
n = inputnumber("enter number of elements in array:")... | [
"pgupta@ntu.edu.sg"
] | pgupta@ntu.edu.sg |
f97077ffdde8834fd332eb04ca18f4e4c80941e4 | d9adfb4e45c5cb38f5c2a079363067aae7656311 | /test/DBSCAN.py | 93c1d4c11c04245f908fe93da2a3d3b51cd03051 | [] | no_license | jiashuowang/airCustomer | 0ecf62b0470e2abc607600a1ea9c6764874ea247 | b1d981bba2d3b3c14325117d4c6326657060633f | refs/heads/master | 2022-09-22T06:57:43.852651 | 2020-06-01T06:33:08 | 2020-06-01T06:33:58 | 265,795,927 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,811 | py |
import pandas as pd
import os
import numpy as np # 数据结构
import sklearn.cluster as skc # 密度聚类
from sklearn import metrics # 评估模型
import matplotlib.pyplot as plt
from sklearn.decomposition import PCA
excelPath = os.getcwd() + '/out' + os.sep + 'std_result.xls'
excelFile = pd.ExcelFile(excelPath)
data = excelFile.p... | [
"eternity00002@gmail.com"
] | eternity00002@gmail.com |
5dba968a269457eb7dd0457a9c86c419e3247d63 | 7be3faf7b3149f111c8dd3c5af7bd3679acd0552 | /quarters/quarters/scm.py | 473a42399847398fca4752928754bd59ba062961 | [] | no_license | ChristianSP/sandbox | f01ccfd54ee87773a22378507d313375bd599de8 | 631ebfccb17bcc1fd1509ded910d38de7a434ddf | refs/heads/master | 2021-01-24T14:18:24.478757 | 2013-08-09T17:26:41 | 2013-08-09T17:26:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,725 | py | '''
Reads the upstream scm.
'''
import os
import sys
import subprocess
class ArchSVN:
'''
Reads SVN repos.
'''
def __init__(self, opts):
'''
Pass the options structure, we want those in here.
'''
self.opts = opts
self.svn_repos = self.__gen_svn_repos()
... | [
"thatch45@gmail.com"
] | thatch45@gmail.com |
93e361c40527c88fb15b682de99f4dd25e0494c1 | 23345cb27e6a8310001dd367c87b6c59af0b5931 | /Practice2/StringIntDividation.py | 9026d6f3ddae5a1f38a3f16ee20fa6042ab09b26 | [] | no_license | ccsandhanshive/Practics-Code | 20840423385e7cd26672236cfbb565ff432af4cb | 048f2d2cd4bd76391e4578c18f20467f4526d137 | refs/heads/master | 2021-04-23T17:44:15.003384 | 2020-04-16T07:06:54 | 2020-04-16T07:06:54 | 249,952,409 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 716 | py | upper=[]
lower=[]
even=[]
odd=[]
def divide(InputString):
#print("0")
if InputString.isalpha():
#print("00")
if InputString.isupper():
#print("000")
upper.append(InputString)
else:
#print("001")
lower.append(InputString)
e... | [
"noreply@github.com"
] | noreply@github.com |
2c4a4f9f3bee1e1db55af2d6b5b8128094f1e187 | 0e10fb66cc795d888ac2c18eebd05cd3963f1389 | /python/max_subarray_sum.py | d6756b2bf92da5122d9b932a410e2655030327f0 | [
"MIT"
] | permissive | mohamedabdelbary/algo-exercises | f12bf721ff584de14a11cecca424f7535eb54938 | 3b2b700453c010f61c0d4099762727e988e2b124 | refs/heads/master | 2023-04-14T22:14:03.648514 | 2021-05-01T14:56:05 | 2021-05-01T14:56:05 | 326,254,025 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,416 | py | def max_subarray_sum(a):
"""
Given an array of integers a, find the consecutive subarray with the maximum sum in a
e.g. a = [13, -3, -25, 20, -3, -16, -23, 18, 20, -7, 12, -5, -22, 15, -4, 7]
should return a sum of 43 ([18, 20, -7, 12])
e.g., given the array [34, -50, 42, 14, -5, 86], the maximum s... | [
"mohamed.abdelbary@duedil.com"
] | mohamed.abdelbary@duedil.com |
7413beb29c82e7d9e80a34670df812e8442a6d6b | b7d4fea220a65e56b20a2073d719faeffb1f06e2 | /xavier_vendor/ee/profile/profile.py | 1b36edd643a968ab2fb92cf32248fb45c9c3ebdd | [] | no_license | CaiJianLee/Xavie_V5 | aad59118711de0f2823d5ac7bcd3ac4e683bfc06 | 68f1a95a38f4629b9f5fb01d2f3e033aab7dffab | refs/heads/master | 2020-03-27T08:30:27.844829 | 2018-08-27T07:46:50 | 2018-08-27T07:46:50 | 146,261,964 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,648 | py | __author__='Mingcheng'
from collections import OrderedDict
from ee.eedispatcher import EEDispatcher
class Profile():
_base_board_name=None
'''
example of _exendio
{
"base_board_id":{
"cp1": {"partno": "CAT9555", "bus": "/dev/i2c-0", "addr": 0x00, "switch_channel": "none"},
... | [
"849384970@qq.com"
] | 849384970@qq.com |
2872eb328a95f0324b95c797601043cfaf190efa | 1391e4ae9ac5cebb0ecaaa8485ab98c39a8a1b35 | /tests/test__replacing.py | 1184ed1b2ce4f8b447f4d7dc0fa91de3521ec1b9 | [] | no_license | sagivmalihi/pyforge | bff9859cfbee53ef14d8ace860e870d950f7b85b | 9830bf090d8c828d06292cc852150d1cf6c65b11 | refs/heads/master | 2021-01-16T17:48:27.757949 | 2010-12-13T09:30:40 | 2010-12-13T09:30:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,725 | py | import types
from ut_utils import ForgeTestCase
from forge.stub import FunctionStub
from forge.class_mock import ClassMockObject
import time
orig_time_sleep = time.sleep
import os
orig_os_path_join = os.path.join
class NewStyleClass(object):
def method(self, a, b, c):
raise NotImplementedError()
@prope... | [
"vmalloc@gmail.com"
] | vmalloc@gmail.com |
5d69865ad17d1b1417deb0ffe1502367ba84927e | 9329b45dab94acc5a9e022c821251526cd5a89d8 | /Inicial/miprograma1.py | 3db08a81ad8c63a52a6397276b222e8f909a7e7b | [] | no_license | CamilaBernales/DataScienceInitial | 832428d5a74a7ad2840a986c6d85f54cd7393860 | 8c6d4966f11e5f9cfaea93d6d5c642e0854a4121 | refs/heads/master | 2023-01-19T06:27:14.195532 | 2020-11-24T08:16:28 | 2020-11-24T08:16:28 | 286,147,236 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 169 | py | import modulo1
coche1 = modulo1.Coche("fiat", "blanco", "diesel", "1.5")
print(coche1.mostrar())
media = modulo1.media(4, 8, 9)
print(f"nuestra nota media es {media}") | [
"camilabernales09@gmail.com"
] | camilabernales09@gmail.com |
7dbf6cea64115083ef6ee401aaddf28d95f0f443 | c3bf3e8c3a4205dc23fb5f723a29b74c83f6047a | /pyk8055/k8055testm.py | a20dc303ff7ec0f133f4540291ebdba32b52b8c7 | [] | no_license | jeremyz/k8055 | 807d90986d6fd77cf2566ad22191055cf81da9be | 46cf3ce29caeb7efe865ce684b629299ab6c51e6 | refs/heads/master | 2020-06-01T07:21:30.717005 | 2020-04-20T13:32:49 | 2020-04-20T13:32:49 | 2,293,405 | 6 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,370 | py | #!/usr/bin/env python
# $Id: k8055testm.py,v 1.1 2007/03/28 10:10:32 pjetur Exp $
#
# Sample pyton test program for pyk8055 wrapper
# Scanning and testing multiple boards
#
from time import sleep
from pyk8055 import *
try:
K8055_devices =[]
BMask = SearchDevices()
if not BMask:
print "No K8055 devices found"
ex... | [
"jeremy@asynk.ch"
] | jeremy@asynk.ch |
506609114cac1e89bffb81bc8fe5b9e533ddfd02 | 88cc9b43de3becfef313a965acd4950423a85999 | /textGeneration.py | e456f5e1203674764e4512b492c46a2bdb1428bd | [] | no_license | landjbs/Translation | 15e31c90e41080ddc302873f641d4103a9c86f5d | f19f22a60fad52dd74025bdbd4c08d65327dee1d | refs/heads/master | 2020-07-09T20:57:52.697171 | 2019-10-14T01:43:20 | 2019-10-14T01:43:20 | 204,082,105 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,392 | py | import keras
import numpy as np
from tqdm import tqdm
from nltk.tokenize import word_tokenize
from bert_serving.client import BertClient
SEQ_SIZE = 100
BERT_PATH = '/Users/landonsmith/Desktop/shortBert'
TEXT_PATH = 'gatsby.txt'
# configure BERT client
bc = BertClient(check_length=True)
bertLaunch = f'bert-serving-st... | [
"landjbs@gmail.com"
] | landjbs@gmail.com |
9a111f06491634bb0ef150b9279b992270319ca3 | 3010e6db2bb39a904ea288fe9135c787a08c5f64 | /read_image_createcsv.py | b139d7754ccf19d0a56a8ed83a88909705160dd8 | [] | no_license | Aayushktyagi/Utility | cc270151e56e3698fb6975b0d6306d3c5525aea6 | 3a49a5686422f13495235b1aaf4f97ea643de55f | refs/heads/master | 2023-02-27T04:46:13.648594 | 2021-01-29T11:15:27 | 2021-01-29T11:15:27 | 256,270,123 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,361 | py | '''
Read images from multiple sub-folders(ex:0,1,2,3,....)
create a csv file with format filename , label
filenmae being name of image and label being folder name
move images to folder names as destination folder
max 200 images from each folder can be added
images added will me moved to destination folder specified wi... | [
"noreply@github.com"
] | noreply@github.com |
396cce06d609f118e60e05c2de9bb1b16030805f | 95eb485d9430cad805ad17a0424c13024c68fcc8 | /lesson_3/random_example.py | 0a26032c19847b8923360e275076e5efc1ee2ca7 | [] | no_license | antonplkv/itea_base_april | 54dbe7f4d71ac3ef5afe6e20c0369ed28f6fa2c2 | 6ef15c5e4e625f8f222f51e8b2c22667afda4075 | refs/heads/master | 2022-09-01T04:10:51.653031 | 2020-05-27T20:11:38 | 2020-05-27T20:11:38 | 260,017,616 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 142 | py | import random
a = [1, 100, 3]
my_random = random.randint(50, 100)
print(my_random)
random_number = random.choice(a)
print(random_number)
| [
"polyakov.anton@ukr.net"
] | polyakov.anton@ukr.net |
b6bd7ca966221d80004fc733a00f569eac83fd91 | c61984aa217723621a0c65e2c4e673dd4d54d518 | /home/utils.py | a052f95a2830e17642be904dd0c05b9dce43c9e0 | [
"MIT"
] | permissive | twitterdev/tweet-search | 19aebd23cdbbd7f64b46de5397b042bbe2d95582 | 983de3165f6fc09bb1d8f348db1a1cb06b824a12 | refs/heads/master | 2021-06-28T16:13:55.469187 | 2019-07-01T16:49:06 | 2019-07-01T16:49:06 | 31,343,706 | 55 | 22 | MIT | 2021-06-10T17:45:04 | 2015-02-26T00:49:51 | JavaScript | UTF-8 | Python | false | false | 668 | py | import json
from django.http import HttpResponse
from django.conf import settings
from gnip_search.gnip_search_api import GnipSearchAPI
def get_gnip(paged=False):
"""
Returns Gnip Search API
"""
g = GnipSearchAPI(settings.GNIP_USERNAME,
settings.GNIP_PASSWORD,
settings.GNIP_SEARCH_END... | [
"ryan.choi@gmail.com"
] | ryan.choi@gmail.com |
7309533f6e324077857a089c0c3d29bc43d1d7a8 | 0e39c0fc70b529e8d1d86f9b076d08b0cea28c7e | /NTC_503_3950.py | cba3c3f954ada852c563bd7805c9fb294f765a5c | [] | no_license | russot/ADS | da1fe9566efad17a703ba69eeee58e36ab1a0fea | 0e26a9e3fdadda581001196b39ba16b82c9e9f03 | refs/heads/master | 2021-01-16T18:57:04.783684 | 2015-05-14T22:39:24 | 2015-05-14T22:39:24 | 21,374,618 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,956 | py | NTC_503_3950 =(
(-55,5443.210),
(-54,4953.700),
(-53,4517.540),
(-52,4127.930),
(-51,3779.060),
(-50,3465.930),
(-49,3184.230),
(-48,2930.270),
(-47,2700.830),
(-46,2493.110),
(-45,2304.710),
(-44,2133.490),
(-43,1977.610),
(-42,1835.440),
(-41,1705.570),
(-40,1586.730),
(-39,1477.820),
(-38,1377.860)... | [
"SZ0016@sz0016.evoc.local"
] | SZ0016@sz0016.evoc.local |
5b4558e27e94f093fd4109b06de784cbda195d8a | 65db19a5914e9e10889da4d750280c826f7dd758 | /app.py | 60bea856b818967c9d0cbfd4998775df1aa7b037 | [
"Apache-2.0"
] | permissive | shrikrishnaholla/delta-server | 02cc7789b66947b9ecd14b07917689a21708f355 | eccbc32864d3b7bd4b577b4288043dc9b1e25c61 | refs/heads/master | 2021-01-23T18:12:20.573461 | 2014-10-11T21:55:08 | 2014-10-11T21:55:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,944 | py | from flask import Flask, request
from flask.ext import restful
from flask.ext.restful import reqparse
import redis
import json
import ast
app = Flask(__name__)
api = restful.Api(app)
def json_type(json_str):
try:
s = json.loads(json_str)
return True
except Exception, e:
raise Exception... | [
"pg@getsigneasy.com"
] | pg@getsigneasy.com |
5366c3e95f92aeaefc37b6796093fd3244d74dc9 | b2c3e3ca64502b32fdc9073633da25fc1f418c4c | /left_rotation.py | a94338d319ce0a61fddbe91f9796e6e34b590a9b | [] | no_license | LipsaMishra19/Hackerrank-Challenges | 5e3dca6cffefc77738bc124236c2a7cfd59ee190 | 4d69a722577e69c53d0e1ff44839ea451b5b3166 | refs/heads/master | 2020-12-06T13:11:18.431062 | 2020-01-08T05:07:12 | 2020-01-08T05:07:12 | 232,471,205 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 459 | py | #!/bin/python3
import math
import os
import random
import re
import sys
# Complete the rotLeft function below.
def rotLeft(a, d):
return(a[d:]+a[:d])
if __name__ == '__main__':
fptr = open(os.environ['OUTPUT_PATH'], 'w')
nd = input().split()
n = int(nd[0])
d = int(nd[1])
a = list(map(int,... | [
"noreply@github.com"
] | noreply@github.com |
b1f8418acbaad694286eb2a9bc612d3eb52e30f5 | cb5411e97d2d94f3f95c4df568addfa203ffd7ed | /test_screen_shot.py | 57de65d4a324a6ff25ef96a7bc2bb249a8e54f1b | [] | no_license | Remoterwls/pytest_exercise | 886dbfd318fbceaed10721e1ceb6b0e72f37fa34 | ed75e70934fe38a068e3c5b7c38d1541fba2fe86 | refs/heads/master | 2023-01-03T11:46:27.575795 | 2020-10-24T13:41:33 | 2020-10-24T13:41:33 | 304,717,397 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,067 | py | #!usr/bin/env python
# encoding:utf-8
'''
__Author__: Jack Wu
__function__:
'''
from selenium.webdriver import Chrome
# with Chrome() as driver:
# driver.get('http://www.baidu.com')
# ele = driver.find_elements_by_css_selector('[title="点击一下,了解更多"]')
# ele.screenshot('./image.png')
from selenium.webdriver... | [
"10520426632qq.com"
] | 10520426632qq.com |
998f68f20166111794e3b7c2074b0d04adebef4c | 54b7b01d861280690111df7f3c66ec88f61914a3 | /002_even.py | 4641d89e2973f7432de61905ebb4d44c2ab63c70 | [] | no_license | anjan111/001_Pallavi | 7cbd27cd05dac8f0b1b8f0b48a93b9a100a7a8d9 | 01a2a9bd26180b6aab34ef19be7409fd20014124 | refs/heads/master | 2022-11-26T03:34:44.347613 | 2020-08-05T02:20:19 | 2020-08-05T02:20:19 | 263,794,844 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 119 | py | #wap find the given number even or not
num = input("enter num : ")
rem = num % 2
print num," is even : ",rem == 0
| [
"noreply@github.com"
] | noreply@github.com |
23c490c1528adcc673b757d246e358d60a407abc | 7cf06162efb87c19db2d04f23518e33b14015876 | /04/task/venv/bin/pip3 | fc7500fdc037a5a7aad7f7f7c2d8f95087d3ff8a | [] | no_license | ivanmolchanov1988/client-server | d5fdfadcd6d6463f5787db5282b825d7b95b1127 | 58bf488df6e5a758adffffd6065eb480a336f15f | refs/heads/main | 2023-06-03T12:05:14.246932 | 2021-05-26T09:06:22 | 2021-05-26T09:06:22 | 362,454,753 | 0 | 0 | null | 2021-05-27T10:28:21 | 2021-04-28T12:12:01 | Python | UTF-8 | Python | false | false | 281 | #!/home/ivan/py/geekbrains/client-server/client-server/04/task/venv/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from pip._internal.cli.main import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
| [
"silencer1588@yandex.ru"
] | silencer1588@yandex.ru | |
4660826660c29044651dd56c2532aeee21028b81 | 63c1e51a5ddbcac2643a3dd2b539e3228b0b57fe | /hashTable.py | 108edade73d4dd2d316c70f38d04eeb754e1303c | [] | no_license | seanjedi/Practice_Problems | efd139440bae19bed305d02b90e3cd1f8cd42d5d | c4c27a21d50c529d7f71a377459526dad89222e4 | refs/heads/master | 2020-05-02T11:11:34.985558 | 2019-06-14T06:04:58 | 2019-06-14T06:04:58 | 177,921,205 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,830 | py | import random
import copy
import time
random.seed(200)
class Node:
"This is a data node for the linkedList"
def __init__(self, Key = None, Data = None):
self.__data = Data
self.__key = Key
self.__next = None
def setNext(self, Next):
self.__next = Next
def getNext(s... | [
"spmalloy@ucdavis.edu"
] | spmalloy@ucdavis.edu |
9c4263c2823396be4e6cb0c384d34eb4fc0afe80 | 0fccee4c738449f5e0a8f52ea5acabf51db0e910 | /genfragments/EightTeV/TprimeTprime/TprimeTprimeToTHTHinc_M_1000_TuneZ2star_8TeV-madgraph_cff.py | ab60a5b19dbddf127b5071564d6d82d1a104780f | [] | no_license | cms-sw/genproductions | f308ffaf3586c19b29853db40e6d662e937940ff | dd3d3a3826343d4f75ec36b4662b6e9ff1f270f4 | refs/heads/master | 2023-08-30T17:26:02.581596 | 2023-08-29T14:53:43 | 2023-08-29T14:53:43 | 11,424,867 | 69 | 987 | null | 2023-09-14T12:41:28 | 2013-07-15T14:18:33 | Python | UTF-8 | Python | false | false | 5,117 | py | import FWCore.ParameterSet.Config as cms
#from Configuration.Generator.PythiaUEZ2Settings_cfi import *
from Configuration.Generator.PythiaUEZ2starSettings_cfi import *
generator = cms.EDFilter("Pythia6HadronizerFilter",
pythiaHepMCVerbosity = cms.untracked.bool(False),
maxEventsToPrint = cms.untracked.int32(0)... | [
"sha1-5c9a4926c1ea08b633689ec734e2440da58b8c56@cern.ch"
] | sha1-5c9a4926c1ea08b633689ec734e2440da58b8c56@cern.ch |
ef0f5fbc2cd53cd2b199a530b0d1f3a4b1ad1db0 | 4ec239aba047d0ff36348bea2e59595b9fb845ac | /Intro_to_encryption_safari/py3/symmetric.py | 22d632b57ffb25a9cbdb22168cc27a10a1556122 | [
"Apache-2.0"
] | permissive | Dmdv/PythonPlayground | eff8e6fa374ec04a0f4dcff4334a855428bd3f21 | f730c43dad69c746ce1c4ff7374af4ec933aef19 | refs/heads/master | 2018-11-16T17:26:07.479095 | 2018-09-02T18:26:36 | 2018-09-02T18:26:36 | 107,284,522 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,947 | py | """ Symmetric Cryptography Exercise
In this exercise you will use AES to encrypt and decrypt some messages. AES can be
applied in a number of modes. These include Electronic Code Book (ECB), cipher block
chaining (CBC) and counter mode (CTR).
Tasks:
1) Use AES-CBC to encrypt then decrypt a single block of data... | [
"dmdv@yandex.ru"
] | dmdv@yandex.ru |
9104bdacbb3e1bed271093270648f77d93e87665 | 4e5b20fdcca20f458322f0a8cd11bbdacb6fb3e5 | /app.py | 651d1f8222de485005a20c3c1f65be3a7ef0af9e | [] | no_license | shijingyu/sunningAPI | 241f33b0660dc84635ce39688fed499f5c57a5da | 4a3b2ef7f9bdc4707d1eaff185bc7eb636fe90d5 | refs/heads/master | 2020-04-24T22:15:11.584028 | 2019-02-24T06:41:20 | 2019-02-24T06:41:20 | 172,305,179 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 713 | py | from flask import Flask
from socket import *
app = Flask(__name__)
import suning.api
@app.route('/')
def hello_world():
return 'Hello World!'
@app.route('/suning/swap', methods=['GET'])
def sn_swap():
request = suning.api.CustompromotionurlQueryRequest()
request.adBookId = "195296"
request.visitUrl ... | [
"945090896@qq.com"
] | 945090896@qq.com |
b9bc390702534d4d5fa1c3abcbd877f62252a082 | 190463e2cdab595b530661889b7f65a66943ee7d | /interventions.py | 6dbcca36e53245a8efc1f3e5e5def0947a3dfc20 | [] | no_license | xiscosc/migrator_mundiagua | a6f8f57541cee7da6d2b5cdb3cc7667013efce31 | 98c630bc1e6e05dcd31c913cb914cd626a444646 | refs/heads/master | 2021-01-19T00:17:17.975610 | 2016-08-04T23:03:53 | 2016-08-04T23:03:53 | 64,950,444 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,673 | py | from utils import make_connection_postgres, make_connection_mysql, close_connection_postgres, close_connection_mysql
def migrate_interventions():
print("MIGRATING INTERVENTIONS...")
cnx_m, cursor_m = make_connection_mysql()
cnx_p, cursor_p = make_connection_postgres()
query = "SELECT a_id, a_d_id, a_... | [
"xiscosastre@gmail.com"
] | xiscosastre@gmail.com |
3ac6b5be460582651d6ba14c649f93eb8b63fdf4 | 03638440d9b6a11fd5adcc90abd826108c514d7e | /adversarialnlp/commands/test_install.py | 823cbfc127d099fb7d631f802477f6fd7f68b892 | [] | no_license | greydoubt/adversarialnlp | 843a00df0539eaff6e59da3f28b043df2968af04 | 543c02111c57bf245f2aa145c0e5a4879d151001 | refs/heads/master | 2023-05-23T01:10:27.765430 | 2018-10-26T09:24:50 | 2018-10-26T09:24:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,459 | py | """
The ``test-install`` subcommand verifies
an installation by running the unit tests.
.. code-block:: bash
$ adversarialnlp test-install --help
usage: adversarialnlp test-install [-h] [--run-all]
[--include-package INCLUDE_PACKAGE]
Test that installation works by running t... | [
"thomwolf@gmail.com"
] | thomwolf@gmail.com |
bf9f6c7fa8cce067d73d8950c1e6e677c288ade0 | 643ffef18a6d026648a10bd79bda2fa52f342512 | /SpiderRequests/02_Spider_Jiexi/02_xpath_methods.py | 6c44f0603df4001b53fd2cef05eecd2546b64125 | [] | no_license | ZhaoJiePG/PyScrapy | ba5c4199c867a2e879cb9f5aa1dd8a866d0f4e26 | a013bb6c46a3f0dff1072e662f028b7e17d0289d | refs/heads/master | 2022-12-10T05:27:37.054110 | 2021-03-15T05:50:39 | 2021-03-15T05:50:39 | 181,261,266 | 0 | 0 | null | 2022-12-08T02:35:48 | 2019-04-14T04:43:51 | HTML | UTF-8 | Python | false | false | 1,448 | py | # Author:Aliex ZJ
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
import re
import requests
from lxml import etree
url = 'http://news.baidu.com/'
headers = {
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36'
}
res = requests.get(... | [
"1186388488@qq.com"
] | 1186388488@qq.com |
5e1f2af91e94223d6648d955153a9cc44fc7f112 | 6c22354f6b977762b02cb12752614dddcdef67d2 | /reconcile/test/test_terraform_repo.py | a32593823c199255df8fd91ee3f6bea8b89b9a02 | [
"Apache-2.0"
] | permissive | app-sre/qontract-reconcile | 266a284b96fd4876305b3c76887e982f40a065bd | 91734756b84d646ac1e4b5c4d8de2cc812ea6e46 | refs/heads/master | 2023-08-31T11:30:35.103253 | 2023-08-30T15:05:45 | 2023-08-30T15:05:45 | 157,718,650 | 33 | 72 | Apache-2.0 | 2023-09-14T12:00:01 | 2018-11-15T13:47:25 | Python | UTF-8 | Python | false | false | 7,014 | py | from unittest.mock import MagicMock
import pytest
from reconcile.gql_definitions.fragments.vault_secret import VaultSecret
from reconcile.gql_definitions.terraform_repo.terraform_repo import (
AWSAccountV1,
TerraformRepoV1,
)
from reconcile.terraform_repo import (
TerraformRepoIntegration,
TerraformRe... | [
"noreply@github.com"
] | noreply@github.com |
beda0013e67c007b612cb17d4abdc746145d1673 | dde6b373a87501c04b203708a45f080c949aab16 | /tests/test_iters.py | 4311101a7866cf383f5c01d8642ae6b0f31b3d6f | [
"MIT"
] | permissive | alexandershov/mess | 7c7f1cb8f85ff0aefe98878bf180dff8c3e190c6 | 7b0d956c1fd39cca2e4adcd5dc35952ec3ed3fd5 | refs/heads/master | 2021-01-21T23:37:56.397941 | 2015-05-03T14:12:38 | 2015-05-03T14:12:38 | 34,716,058 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 783 | py | from mess import iters
def test_pairs():
assert list(iters.pairs([1, 2, 3, 4])) == [(1, 2), (2, 3), (3, 4)]
def test_pairs_empty():
assert list(iters.pairs([])) == []
def test_pairs_not_enough_items():
assert list(iters.pairs([1])) == []
def test_lines():
assert list(iters.lines(['a\n', 'b\n', '... | [
"codumentary.com@gmail.com"
] | codumentary.com@gmail.com |
36147e1d160595d505898d0c444e90bddf155132 | 7cbc9c284b2dd4569a59fe1c8db681a5810d739a | /test/constraint_test.py | 91a2ae59dd34c796a1530e85e1c4397dfbe32f53 | [] | no_license | emkor/n-queen-problem | 755e8040339d9f2110aae8df855041a2dc2f5253 | e6f9de66a13a563f2cb87924fcf912ddb6d6b0a7 | refs/heads/master | 2021-05-01T17:40:17.353498 | 2016-11-18T14:53:52 | 2016-11-18T14:53:52 | 73,830,248 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,590 | py | import unittest
from constraint import SameColumnConstraint, SameRowConstraint, SameDiagonalConstraint
from model import Chessboard, Queen
class ConstraintTest(unittest.TestCase):
def setUp(self):
self.same_column_constraint = SameColumnConstraint()
self.same_row_constraint = SameRowConstraint()
... | [
"mateusz.korzeniowski@nokia.com"
] | mateusz.korzeniowski@nokia.com |
3ac1f4ec3427ddd692f5ddd077650da8bf334f4f | 36add5afc63ec09d63b8a877c29c17391938ee5c | /.history/speech_sentiment_20201118101212.py | 3a31838199995c72518c7341918baad7cc2681f7 | [] | no_license | E-STAT/sentiment_api | e84eb04a9f21c7368ca20bdb97436ffea9f65f25 | bd9ee0d78d9eac8b6448b96c2560611a64f7b79d | refs/heads/master | 2023-01-12T13:06:14.654883 | 2020-11-20T11:30:22 | 2020-11-20T11:30:22 | 314,534,974 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 145 | py | from speech_helpers import convert_to_wav, show_pydub_stats, transcribe_audio
from nltk.sentiment.vader import SentimentIntensityAnalyzer
sid = | [
"owojori.tolulope@gmail.com"
] | owojori.tolulope@gmail.com |
a5ac43b495073b76d4593f738e88ffc420fd3db4 | 44791db4d9825835a120538e166e5d83d00344a0 | /commands/modlitwa.py | 5ea292ee5b0b4131ec576cdc7419f844d4f1cb9f | [] | no_license | asdfMaciej/fb-message-bot | 5245c7938ffd34c340ab36a2d996aa6f03855b52 | cf7b7260a102656a4c567a366853eac6f79f5280 | refs/heads/master | 2020-12-02T23:58:36.796423 | 2017-07-04T04:59:49 | 2017-07-04T04:59:49 | 95,969,034 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 645 | py | import requests
from bs4 import BeautifulSoup
from random import randint
class Command:
command_names = [
'.modlitwa', '.deusvult', '.avemaria', '.maria',
'.jezus', '.jesus', '.psalm', '.psalmy', '.biblia'
]
admin_only = False
description = "Losowa modlitwa."
@staticmethod
def run(self, params_d):
url = ... | [
"maciej.kaszkowiak@gmail.com"
] | maciej.kaszkowiak@gmail.com |
3a7f9e20b8446ba5bc8290e1f3ba4b7f4a7b16ce | c7badb87d60a543de6464a843e8c119edf312a04 | /natas26.py | e14992867a1b2e227c394a386bc0262ebc3e812e | [] | no_license | mikelty/otw-natas-python3 | ec4915c0c7a676b2518b7a9387e9bf9bf409505b | d1f448f4f43c9ab0bd1180a8dc76c5e2a22c9f1f | refs/heads/master | 2020-12-07T14:56:48.470448 | 2020-01-09T06:59:35 | 2020-01-09T06:59:35 | 232,741,989 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 653 | py | import requests, re
import base64
import urllib
u='natas26'
p='oGgWAJ7zcGT28vYazGo4rkhOPDhBu34T'
l=f'http://{u}.natas.labs.overthewire.org/'
sess=requests.Session()
resp=sess.get(l,auth=(u, p))
#print(base64.b64decode(requests.utils.unquote(drawing)))
sess.cookies['drawing']='Tzo2OiJMb2dnZXIiOjM6e3M6MTU6IgBMb2dnZXIAbG9... | [
"michaellty2520@gmail.com"
] | michaellty2520@gmail.com |
10c2d2784238c53c2afed1b904c7e067ec9cdd2b | c9abbbfd1ccdbdf75c5b35b28c841b6fc8165ee6 | /AtCoder/ABC B/141.py | d46b6287572a8ee7ee04cc3197cd653e9fb7af55 | [] | no_license | kanade9/kyopro | 8d9b12a4da2353595836cf68066e2b425379990b | 3b5d998b99603c4473dc22e62252a2dd5ba143c2 | refs/heads/master | 2023-04-20T15:18:37.199790 | 2021-05-19T17:49:16 | 2021-05-19T17:49:16 | 175,988,232 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 290 | py | s = input()
odd = ['R', 'U', 'D']
even = ['L', 'U', 'D']
for i in range(len(s)):
# print(s[i])
if (i+1) % 2 == 0:
if s[i] not in even:
print('No')
exit()
else:
if s[i] not in odd:
print('No')
exit()
print('Yes')
| [
"maronkazu94@gmail.com"
] | maronkazu94@gmail.com |
970b56b389bc16aa5b0aa25d8f0b0c21fe60b45a | 4af090efabd08ef73c411a00ce4972a1c6f30a22 | /python_100days/9day/game_01.py | a0a84bc845979886d6284387f96bae8696de9d51 | [] | no_license | predatory123/byhytest | e52bca664f9461c9309aaa9bf779c02368ed937c | 578206c9ec9253d0d9325e72cdc13dde6eeb2fc1 | refs/heads/master | 2023-04-26T13:33:14.462408 | 2021-05-20T13:33:37 | 2021-05-20T14:26:22 | 369,213,148 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,189 | py | # 扑克游戏
import random
class Card(object):
"""一张牌"""
def __init__(self,face):
self._face = face
@property
def face(self):
return self._face
def __str__(self):
if self._face == 1:
face_str = 'A'
elif self._face == 11:
face_str = 'J'
... | [
"13310948808@163.com"
] | 13310948808@163.com |
082ea7fa18bb8e8f00914925ed266d3cc7310486 | 0db1fbcb86deacc3b59a2f0b9c1a4ae619a2c17a | /periodic_table.py | 2f59a7738cac5882df29b9e1449fe4fd4ca6b745 | [
"BSD-3-Clause"
] | permissive | jmwoll/isocalc | 5c79888974925500fbff87ced7815020ed39250b | cf2cdeefbac5d7ace7c8be14067dbb2f2d8e7ec8 | refs/heads/master | 2021-04-28T18:13:06.567865 | 2018-02-17T16:22:08 | 2018-02-17T16:22:08 | 121,868,115 | 4 | 3 | null | null | null | null | UTF-8 | Python | false | false | 34,578 | py | # This file is licensed under the BSD 3-Clause License.
#
# Copyright (c) 2018, Jan Wollschläger
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain th... | [
"jm.wollschlaeger@gmail.com"
] | jm.wollschlaeger@gmail.com |
8e6a009c884e11c31cb6f6416fe15a0a4a1b9a55 | 70450f0c551adf47b450468e424f4f90bebfb58d | /dataclasses/resources/test/test_I3FlasherInfo.py | 5b4c4106c5f255593ca07e39f455cbf31358221e | [
"MIT"
] | permissive | hschwane/offline_production | ebd878c5ac45221b0631a78d9e996dea3909bacb | e14a6493782f613b8bbe64217559765d5213dc1e | refs/heads/master | 2023-03-23T11:22:43.118222 | 2021-03-16T13:11:22 | 2021-03-16T13:11:22 | 280,381,714 | 0 | 0 | MIT | 2020-07-17T09:20:29 | 2020-07-17T09:20:29 | null | UTF-8 | Python | false | false | 1,673 | py | #!/usr/bin/env python
import unittest
from icecube import dataclasses
from icecube import icetray
from icecube.icetray import OMKey
class TestI3FlasherInfo(unittest.TestCase):
def test_I3FlasherInfo_equality(self):
fi1 = dataclasses.I3FlasherInfo()
fi2 = dataclasses.I3FlasherInfo()
fi1... | [
"aolivas@umd.edu"
] | aolivas@umd.edu |
ac87b06fcf8526dff1c8c6cea683f676c0773626 | 725f172aae1d97ee6b33734843bbe670644dec65 | /train_mtcnn_LPR/24train_wm_lpr/gen_data_shuffle宽高非比例.py | a6e350acd8894d689c5311ebee8efadd54a599a0 | [] | no_license | xingguoliang/License-Plate-Detect-Recognition-via-Deep-Neural-Networks-accuracy-up-to-99.9 | 377004c0129d8dad3f70a36c2cda05ce878d83ef | a2cf438a8d2df7b3a55f869fb01f5410741aae5e | refs/heads/master | 2023-07-07T19:18:15.437859 | 2020-06-30T04:45:18 | 2020-06-30T04:45:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,228 | py | # -*- coding: utf-8 -*-
"""
descriptor: generate mtcnn training data from source image and convert it into the lmdb database
author: Aliang 2018-01-12
"""
import numpy as np
import cv2
import lmdb
import numpy.random as npr
import data_tran_tool
import caffe
from caffe.proto import caffe_pb2
from utils import IoU
an... | [
"37825535+zhubenfu@users.noreply.github.com"
] | 37825535+zhubenfu@users.noreply.github.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.