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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0d4b5e31db05f369c213e720e112388382249eb1 | 30eae4e521c282fb026147cf41d730f993996df0 | /tests/test_connection.py | ae0172357678d943262e7c9b56c869b2134a562a | [
"MIT",
"Apache-2.0"
] | permissive | trhowe/pycassa | 7a98034304817fa46b2ea05179f55bf5dc374940 | b4025cd7aea9454d10cc405010dee5fd7cc4e4b6 | refs/heads/master | 2021-01-15T15:55:37.976410 | 2010-11-24T18:48:52 | 2010-11-24T18:48:52 | 1,109,975 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 762 | py | import threading
import unittest
from nose.tools import assert_raises
import pycassa
from pycassa.cassandra.ttypes import CfDef, KsDef, InvalidRequestException
class ConnectionCase(unittest.TestCase):
def test_api_version_check(self):
original_ver = pycassa.connection.LOWEST_COMPATIBLE_VERSION
co... | [
"tyler@riptano.com"
] | tyler@riptano.com |
485a2e80602b51c08c20a4246f4b8d553f5b11ae | 865559fc533655bfc24838871458c890a62a0b56 | /scripts/fault_inject/io_bottleneck.py | bffc448cb2af9dad5e673fb5fc376fd103c12aef | [] | no_license | LearningOS/Performance-Anomaly-Detection | fdf16af268630a51ee3e9d443acd76cae67ec7a0 | 772be444c42c5a1656e193150ef89e74c9c5eedb | refs/heads/master | 2021-01-15T21:30:44.363761 | 2017-06-12T01:18:11 | 2017-06-12T01:18:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 642 | py | import os
import time
import random
import argparse
import setproctitle
def main():
setproctitle.setproctitle('io_reader')
parser = argparse.ArgumentParser(description='')
parser.add_argument('--dir', type=str, required=True, help='the input dir')
args = parser.parse_args()
random.seed(os.urando... | [
"hqythu@gmail.com"
] | hqythu@gmail.com |
83905bcfa2f64c6ad760e2709e617474b1151839 | 1d8a255507ae42b4d1fd891dd6cb6dedee175a3e | /hekrapi/types.py | f48043a49b33052ac460458bf04514b3fcdf8abd | [
"MIT"
] | permissive | alryaz/hekrapi-python | 2478230748d93c21f7f2ca4600f3ea30a9422e50 | 4674e74ec5bace6c7f1f82be93edc22682e1d5b3 | refs/heads/master | 2023-02-13T01:19:40.109845 | 2023-01-30T21:18:14 | 2023-01-30T21:18:14 | 224,899,839 | 11 | 4 | null | null | null | null | UTF-8 | Python | false | false | 894 | py | """Types for Hekr API project."""
from typing import Tuple, Dict, Any, Union, Optional, Callable, TYPE_CHECKING
from .const import DeviceResponseState
if TYPE_CHECKING:
# noinspection PyUnresolvedReferences
from .command import Command
# noinspection PyUnresolvedReferences
from .device import Device
... | [
"alryaz@xavux.com"
] | alryaz@xavux.com |
4fd5356f20891d2b0e5f8d6b00d1af0d9f7be823 | 1d16e9f9a75f8980dd9a6ac07d7b50d0ab4dc259 | /day4_me/sieve.py | 29a81c590431bf7b3ba064c3fb10d24afa3c90bb | [
"MIT"
] | permissive | stoneand2/python-washu-2014 | 285c8aea0b80f8c0487da41db9beaef4fde066b5 | a488aa3a4df02c6512869c07751f66c716b82ca0 | refs/heads/master | 2020-12-25T09:48:01.289330 | 2014-08-23T16:49:19 | 2014-08-23T16:49:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,204 | py | global big_list # works with very specific parameters only
global new_list
big_list = []
new_list = list(range(3,122))
def sieve(prime):
big_list.append(prime)
while len(new_list) >= 1:
big_list.append(prime)
for number in new_list:
if (number % prime) == 0 and number != prime:
new_list.remove(n... | [
"stoneand2@users.noreply.github.com"
] | stoneand2@users.noreply.github.com |
1533db14daa2d37a9f2be50a66fbffba59243413 | 6e063122527f12c354b467eed9e2f992c41706ee | /QuickSort.py | a302ae5e9b4c9a2350139e0c8b96c6290d8e5055 | [] | no_license | tianhaomin/algorithm4 | 2b6411f14e9f34088563ebd20dd1af3444c7333b | 95b6490da65144fb2a5a16a0e35815e3a189afa9 | refs/heads/master | 2021-05-10T16:33:31.794252 | 2018-01-23T08:55:31 | 2018-01-23T08:55:31 | 118,581,710 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 783 | py | #!/usr/bin/python
# -*- coding: UTF-8 -*-
#用两种方法实现一种正常一种递归
#lalala
def exch(a,i,j):
temp = a[j]
a[j] = a[i]
a[i] = temp
def subnum(j):
j -= 1
return j
def addnum(i):
i += 1
return i
def partition(a,lo,hi):
v = a[lo]
i = lo
j = hi+1
while True:
i += ... | [
"noreply@github.com"
] | tianhaomin.noreply@github.com |
6ff09683a65fd90486c1e9e867d292a34c30a5d2 | 18ca2e0f98b98941ff9d9e098e0be89166c8b87c | /Abp/Cp7/c7_18_1_checkPassword.py | 44139200105bd8848776e24d165b4cbbaa750ff7 | [] | no_license | masa-k0101/Self-Study_python | f20526a9cd9914c9906059678554285bfda0c932 | 72b364ad4da8485a201ebdaaa430fd2e95681b0a | refs/heads/master | 2023-03-07T07:38:27.559606 | 2021-02-22T16:24:47 | 2021-02-22T16:24:47 | 263,381,292 | 1 | 0 | null | 2020-06-09T17:32:06 | 2020-05-12T15:47:48 | Python | UTF-8 | Python | false | false | 1,304 | py | # -*- coding: utf-8 -*-
# 演習プロジェクト 7.18.1
import re
# 強いパスワードならTrue、そうでなければFalseを返す
def check_password(password):
if len(password) < 8: #8文字以上
return False
if not re.search(r'[a-z]', password): #小文字を含む
return False
if not re.search(r'[A-Z]', password): #大文字を含む
retur... | [
"noreply@github.com"
] | masa-k0101.noreply@github.com |
de6a7dea3250609edf9110de417155b0b2ddc5b1 | 4b30aeffb63b10868fbfceab86bc60240f095513 | /master modulde/kite_statemaster/__init__.py | 016473ffd7b3008f083e8aea8ac3b3430f9871ed | [] | no_license | gsaran49/PurchaseOrderAndInventory | fd3710dd6800e1dbe072ee69b31a00edf90c844b | 1b7fb12dcb3bf7d0f3c6cfa02cceb9a0d113587b | refs/heads/master | 2021-09-09T11:00:03.958465 | 2018-03-15T10:53:21 | 2018-03-15T10:53:21 | 114,107,758 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 24 | py | import kite_statemaster
| [
"gsaran49@gmail.com"
] | gsaran49@gmail.com |
62c644ca475e7661286befbef03030f82e7319a9 | 5c74741969998b17bb2eb89dfdf5dce203d1cadf | /cython/perf/compute_threaded.py | 1c0dbf528035569aeaf3876766f00fb0e8e0ab5d | [
"MIT"
] | permissive | vromanuk/async_techniques | c21484e14fc8792ba835ae6cb45176c2be9124b6 | 7e1c6efcd4c81c322002eb3002d5bb929c5bc623 | refs/heads/master | 2020-06-20T02:39:18.632214 | 2019-11-09T15:46:03 | 2019-11-09T15:46:03 | 196,962,930 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 969 | py | import math
import datetime
import threading
import multiprocessing
def main():
do_math(1)
t0 = datetime.datetime.now()
# do_math(num=30000000)
processor_count = multiprocessing.cpu_count()
print('Doing math on {:,} processors.'.format(multiprocessing.cpu_count()))
threads = []
for n in r... | [
"romanuk_vlad@ukr.net"
] | romanuk_vlad@ukr.net |
a06d6bdecd0bcaaed6199eecdc4a5e280cf4f953 | 5f176b4d5f7bf567e1f4941aa8f43ac8fc6ee509 | /Assignment_3/q2_rnn_cell.py | 6c4da9ce2568e993769316bdcef0cd76e537eaa8 | [] | no_license | hncpr1992/stanford_cs224n_NLP | a2a219e389a358654e6d23ae1ea29f01c0182174 | 2ea464b521ffbf5cf3f0ef33df8ce02d8df8a434 | refs/heads/master | 2021-01-20T15:13:40.188528 | 2017-06-29T04:10:23 | 2017-06-29T04:10:23 | 90,741,160 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,117 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Q2(c): Recurrent neural nets for NER
"""
from __future__ import absolute_import
from __future__ import division
import argparse
import logging
import sys
import tensorflow as tf
import numpy as np
logger = logging.getLogger("hw3.q2.1")
logger.setLevel(logging.DEBUG... | [
"noreply@github.com"
] | hncpr1992.noreply@github.com |
6ee39c46d0f28cf3bb1b5e87f00d043999b5ca81 | e54e4f7dc62a539ff3a4ddf0826b40387052a00f | /redisearch/_util.py | d29e8d01b1f32cfd4ed23dfb8a2f1adb21902289 | [
"BSD-2-Clause"
] | permissive | surajptl/redisearch-py | 305708dd8549f0d8ca84fbb36b789f5b0351000d | 9ac3f2c18b9f3574df78e90dae6be199e2eeaade | refs/heads/master | 2022-12-28T22:48:44.960041 | 2020-08-04T07:46:16 | 2020-08-04T07:46:16 | 287,507,232 | 0 | 0 | BSD-2-Clause | 2020-08-14T10:30:01 | 2020-08-14T10:30:00 | null | UTF-8 | Python | false | false | 218 | py | import six
def to_string(s):
if isinstance(s, six.string_types):
return s
elif isinstance(s, six.binary_type):
return s.decode('utf-8')
else:
return s # Not a string we care about
| [
"noreply@github.com"
] | surajptl.noreply@github.com |
27f1a5233f5fd1bd7b3d793c022586102443990a | 07ce1c95aacd19c5ffb4f604a107e669919d4abc | /KF5_Tmin_Elev_RF180.py | e0b9a49ea44cd5e93ec883f4c2d5ef8ca58aa836 | [] | no_license | ekourkchi/WildFire | 2f3577358844485640a5e58a25386bfb442ae18f | f0b849db7222db7c556b4694c02aca03cf4cff2c | refs/heads/main | 2023-05-01T23:15:17.817102 | 2021-05-17T09:19:15 | 2021-05-17T09:19:15 | 328,634,985 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,238 | py | from scipy.optimize import curve_fit
from sklearn.model_selection import KFold
from george import kernels
import george
from scipy.optimize import minimize
from sklearn.metrics import r2_score
from sklearn.metrics import mean_squared_error
from matplotlib.patches import Polygon
from mpl_toolkits.basemap import Basemap
... | [
"ekourkchi@gmail.com"
] | ekourkchi@gmail.com |
bde6956609aba68b342d015bc32186f5f5fb5f82 | dc940d7614c4cf55a3c61a1ad4ee48e4ea4e319d | /src/slurmify/__init__.py | cc723c570f8dfe66d10ec5ae27246ff2ea2a1250 | [
"MIT"
] | permissive | salotz/slurmify | b4c88e434c2814c71fcef9cd13ecd716163a75d8 | 4a6da629706621b9b2633d34e574b121a75a8f87 | refs/heads/master | 2020-04-28T23:22:10.227665 | 2019-10-08T01:37:33 | 2019-10-08T01:37:33 | 175,651,924 | 0 | 1 | MIT | 2020-12-01T07:43:57 | 2019-03-14T15:42:30 | Python | UTF-8 | Python | false | false | 312 | py | import pkg_resources
import os
import os.path as osp
TEMPLATES_PATH = pkg_resources.resource_filename('slurmify', 'templates')
TEMPLATE_FILENAMES = tuple(os.listdir(TEMPLATES_PATH))
TEMPLATE_FILEPATHS = tuple([osp.join(TEMPLATES_PATH, filename) for filename
in TEMPLATE_FILENAMES])
| [
"samuel.lotz@salotz.info"
] | samuel.lotz@salotz.info |
c562af65bec64fe2158eb72c157e4568b5af21b2 | e3365bc8fa7da2753c248c2b8a5c5e16aef84d9f | /indices/nnsearl.py | 071f353b10e248c72e5b480bf1d46a32b41166c8 | [] | no_license | psdh/WhatsintheVector | e8aabacc054a88b4cb25303548980af9a10c12a8 | a24168d068d9c69dc7a0fd13f606c080ae82e2a6 | refs/heads/master | 2021-01-25T10:34:22.651619 | 2015-09-23T11:54:06 | 2015-09-23T11:54:06 | 42,749,205 | 2 | 3 | null | 2015-09-23T11:54:07 | 2015-09-18T22:06:38 | Python | UTF-8 | Python | false | false | 44 | py | ii = [('FitzRNS.py', 1), ('MereHHB2.py', 1)] | [
"varunwachaspati@gmail.com"
] | varunwachaspati@gmail.com |
400c53c45a8fc1ed86885f16453368e4200bf90c | 1ffd5de413dc1ba5046ec668de4b597fd0b6d3e3 | /rsa_decode.py | c1b8a8bd8e200c97d4d1028201734fa5182bee1a | [] | no_license | chiseng/RSA-CTF | 9687895140749e564d666993944fbaddc7bcd2a8 | 38fb65218824c973287c229a7ef846aadf7d1f03 | refs/heads/master | 2020-06-01T16:01:30.973797 | 2019-07-25T01:20:32 | 2019-07-25T01:20:32 | 190,842,603 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 227 | py | from Crypto.PublicKey import RSA
import base64
f=open('encrypted.txt', 'rb')
message=base64.b64decode(f.read())
private_key = RSA.importKey(open("priv.pem").read())
text=private_key.decrypt(message)
print(text.decode('utf-8'))
| [
"chiseng_wong@mymail.sutd.edu.sg"
] | chiseng_wong@mymail.sutd.edu.sg |
01f9d2a30447deccb7faa6b5a84798147b35930d | 232ea06658ce3cafb03fc2b9567bfb0ba04e2f9c | /desafio/core/migrations/0002_phone.py | a5638a59ec597c118c61d95124554d58e2a5a4c6 | [] | no_license | TiagoLisboa/pitangagile-desafio | 6cd939da6820249147def6b8d7f5afaedcba7487 | 873c15626a791303a7deb9a356461b748884cb34 | refs/heads/master | 2023-07-02T07:39:20.674041 | 2021-08-01T22:47:37 | 2021-08-01T22:47:37 | 391,487,607 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,025 | py | # Generated by Django 3.2.5 on 2021-07-31 15:47
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0001_initial'),
]
operations = [
migrations.CreateModel(
... | [
"tiago.lisboa@devsquad.com"
] | tiago.lisboa@devsquad.com |
76bb321a415c79aeebadb80add405286f059d601 | e90d5f029db0f93cdee35693ffca529c3934b654 | /Pythonic/solneq/GaussSei.py | 56f5b6558fdc9e95d6d190c055eb4052a385064f | [] | no_license | TrigonaMinima/NumMets | c18c8a35101f4ffbd711bb27fae6b4898cc500a3 | fa57aca32968574144660ecd8fd13963508d2efd | refs/heads/master | 2021-01-20T09:12:52.031617 | 2014-05-26T13:04:47 | 2014-05-26T13:04:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 21 | py | # Gauss-Seidel method | [
"shivamrana95@yahoo.in"
] | shivamrana95@yahoo.in |
8c9807c3b0b1e321a9112b6b2106cf08c861c342 | 2004cfde7f0cb70d10ae045e0bab12afa0d18b35 | /etc/zipArchiveScript.py | 066c003ec67081617849dd62ea59551fd0834a76 | [] | no_license | erpost/python-beginnings | a51951eb9a3bfd58bfcabd60e5968cbd7d29bc1d | 8ef94a0ac077a463ecafbd085f8b79d78284a42a | refs/heads/master | 2023-02-05T08:29:32.101001 | 2023-01-27T18:29:27 | 2023-01-27T18:29:27 | 120,106,285 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,366 | py | import zipfile
import sys
import os
import logging
logging.basicConfig(filename='file_ex.log', level = logging.DEBUG)
logging.info("checking to see if the backup.zip file exists")
if os.path.exists("backup.zip"):
logging.info("it exists")
try:
zip_file = zipfile.ZipFile('backup.zip', ... | [
"25180070+erpost@users.noreply.github.com"
] | 25180070+erpost@users.noreply.github.com |
d52dee81c4ad7207d92e8ef6493d3f46d11f0b84 | 0bf0fafe2fb7ad48f012049bb005f7674d104d70 | /projects/02_trivia_api/starter/backend/env/bin/easy_install-3.8 | 63f2f9a577d62f40cb3638e9b787226b38b4d52e | [] | no_license | zziying/FSND | 054ce647388bde61f97ce6bb6552e816c09f7bd3 | 92355a6c7afb5781093b45baa69d63ea3a059132 | refs/heads/master | 2022-11-24T03:44:23.336897 | 2020-08-02T00:00:45 | 2020-08-02T00:00:45 | 280,506,485 | 0 | 0 | null | 2020-07-17T19:15:45 | 2020-07-17T19:15:44 | null | UTF-8 | Python | false | false | 307 | 8 | #!/Users/imirenee/Desktop/webdev/FSND/projects/02_trivia_api/starter/backend/env/bin/python3
# -*- coding: utf-8 -*-
import re
import sys
from setuptools.command.easy_install import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(main())
| [
"ziying612@berkeley.edu"
] | ziying612@berkeley.edu |
1038737295edc226bf1768c58329d2bf99823932 | c6fea702b817b719d9774b66d76c7cbaf1369d7d | /pythas-python3/day_06.py | b6fa1f942c5f98d8e1ea2e5564387889618a59ad | [] | no_license | piksel/advent_of_code_2016 | eae359228372b53f88430360b38e48210ac6da40 | 996fe2a999949fab420115474b32b40ed8ba8414 | refs/heads/master | 2021-01-12T10:12:19.865894 | 2016-12-18T16:55:58 | 2016-12-18T16:55:58 | 76,386,900 | 1 | 0 | null | 2016-12-13T18:29:15 | 2016-12-13T18:29:15 | null | UTF-8 | Python | false | false | 431 | py | import re, string
def solve(file):
lines = file.readlines()
lines = list(zip(*lines[::-1]))
message = ''
message2 = ''
for line in lines:
count = [(i, line.count(i)) for i in set(line)]
count.sort(key = lambda x: x[1], reverse=True)
message += count[0][0]
message2 +... | [
"pythas@gmail.com"
] | pythas@gmail.com |
821e61f7b33acd32ef5ac595ff87f80a93f1ec47 | c0a380876abb91564b408cf08cfc056600c86c1f | /app/core/management/commands/wait_for_db.py | cf643323890da02a4ef939daff39d78fc47fcfc5 | [
"MIT"
] | permissive | acrawford13/recipe-app-api | 8a5e28ea64fe9212d17308de29127d19670591e3 | ef66b489e3431ecb38fa9148b370013b0e2fe880 | refs/heads/master | 2020-12-05T17:49:52.032090 | 2020-02-15T10:22:57 | 2020-02-15T10:22:57 | 232,195,433 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 706 | py | import time
from django.db import connections
from django.db.utils import OperationalError
from django.core.management.base import BaseCommand
class Command(BaseCommand):
"""Django command to pause execution until database is available."""
def handle(self, *args, **options):
"""Handle the command"""... | [
"andrea.crawford13@gmail.com"
] | andrea.crawford13@gmail.com |
b0e8d7312ffef5f4698b8962c1b81f8ad0abde77 | 03362ece836f297df553cb639c98695a1b7864a1 | /portfolio/migrations/0002_auto_20210623_1935.py | ee4805230df4b7e1c1de580c97085f4def919167 | [] | no_license | purusottam234/My-Portfolio | 31fc099df0c420d8d9649e23ca1b7db0592452b4 | c26f36d7dc14d268b6d7ab350105528af3188e78 | refs/heads/main | 2023-05-31T01:19:29.296272 | 2021-06-24T04:52:50 | 2021-06-24T04:52:50 | 379,806,952 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 429 | py | # Generated by Django 3.1 on 2021-06-23 13:50
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('portfolio', '0001_initial'),
]
operations = [
migrations.DeleteModel(
name='Facts',
),
migrations.DeleteModel(
... | [
"purusottamadhikari234@gmail.com"
] | purusottamadhikari234@gmail.com |
0b2e2c1a54d147703b047fece5d909a80c7b07a7 | 43a27b80ce1a8cf422142f5a43044917ff17a7cf | /python/leetcode/Subset.py | a70f7d5e2ff7e78883e6096eebe8fea47352c999 | [] | no_license | bignamehyp/interview | 321cbe4c5763b2fc6d2ba31354d627af649fe4ed | 73c3a3e94c96994afdbc4236888456c8c08b6ee4 | refs/heads/master | 2021-01-25T08:49:30.249961 | 2015-03-07T07:34:00 | 2015-03-07T07:34:00 | 23,125,534 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 436 | py | class Solution:
# @param S, a list of integer
# @return a list of lists of integer
def subsets(self, S):
solns = []
S.sort()
N = 2**len(S)
for k in range(N):
soln = []
l = 0
while k > 0:
if k % 2 == 1:
so... | [
"huangyp@Huangyp-MBP-2.local"
] | huangyp@Huangyp-MBP-2.local |
6f72efc883c52be8b581a2cc97d5c28576f03fee | 429211c01057abcd51e5120d566c7daa0a8e2f33 | /database/parameter.py | 581791ded6c2a5fde41b1746da6f3682cb0c1746 | [] | no_license | LDZ-RGZN/b1804 | 2788c922a6d1a6dc11267920a90336d1df93a453 | c57f8b7cf14686036cae3c30a30f07514622b5ca | refs/heads/master | 2021-07-19T12:54:07.031858 | 2018-10-12T02:48:39 | 2018-10-12T02:48:39 | 133,500,880 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 626 | py | from pymysql import *
def main():
find_name = input('请输入物品名称:')
#创建Connection
conn = connect(host = 'localhost',
port = 3306,
user = 'root',
database = 'jing_dong',
password = '150136',
charset = 'utf8')
#获得Cursor对象
cs1 = conn.cursor()
... | [
"2654213432@qq.com"
] | 2654213432@qq.com |
7dcfcc439a594d1f9fae8d4214dcd3468575e9a7 | f5eecd96df0a682622bb2dd05521514f92171312 | /12/script.py | 5e5c46347c32c91064c52463e71a3ec43082ea59 | [
"MIT"
] | permissive | shreyansh26/Python-Challenge-Soutions | c112582fcb2e2aa24b62db34879043ba75e37c6d | 0aa288df9c0af719972a351dcc5142e398114564 | refs/heads/master | 2020-04-30T08:44:11.405473 | 2019-03-20T12:19:21 | 2019-03-20T12:19:21 | 176,725,986 | 0 | 0 | null | 2019-03-20T12:18:01 | 2019-03-20T12:12:53 | Python | UTF-8 | Python | false | false | 158 | py | from PIL import Image
file = open("evil2.gfx", "rb").read()
# print(len(file.read()))
for i in range(5):
f = open(str(i)+".jpg", "wb")
f.write(file[i::5])
| [
"shreyansh.pettswood@gmail.com"
] | shreyansh.pettswood@gmail.com |
eaa683de07295d6efbdff9b2f773447c411ec61c | 336a91fb67904c18a5dc88ab966a95a5eee84281 | /dev-env/bin/pilprint.py | 28e1afa1ba4c69dd78d58a61672c7b7e6ce1e012 | [] | no_license | toprasit2/POOL | 818335d45f387b2a1ed7530926f6a6d42df31552 | 528c576904f7c9bd3fc2b516a2cf58f7a3fcd50b | refs/heads/master | 2020-03-08T09:14:02.622041 | 2018-04-04T09:48:36 | 2018-04-04T09:48:36 | 128,041,993 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,627 | py | #!/home/thanaphon/projects/dev-env/bin/python3.6
#
# The Python Imaging Library.
# $Id$
#
# print image files to postscript printer
#
# History:
# 0.1 1996-04-20 fl Created
# 0.2 1996-10-04 fl Use draft mode when converting.
# 0.3 2003-05-06 fl Fixed a typo or two.
#
from __future__ import print_function
i... | [
"toprasit.gk@gmail.com"
] | toprasit.gk@gmail.com |
47f1dea90fb7fc8e9c825f6bdedfc73208d44f41 | e97c3bda61af3772f5e6e9816d27e12f8e3a8e50 | /B47.py | a72b1d9a46c46b5a76576ba8d6f184739ad47811 | [] | no_license | satizkumar32/sk | 54809f471687dbbff97e8cb0d1315e9923d9234f | 684b65445681cdbc67ee7c33fc1ce636d13c6ed0 | refs/heads/master | 2020-05-23T00:54:52.994397 | 2019-07-11T03:19:50 | 2019-07-11T03:19:50 | 186,579,250 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 90 | py | numb=int(input())
igs=list(map(int,input().split()))
gk=max(igs)
ik=min(igs)
print(ik,gk)
| [
"noreply@github.com"
] | satizkumar32.noreply@github.com |
666dbd7f475d486a05ca63ece8e76fa4ba1bc681 | 594d2af9bfe0ab8cc1b9df673d5405034ce277fc | /Programming Fundamentals/exam_preparation/01.secret_chat.py | 05f853d5e6e72deb2e947697b442830b90bd86a3 | [] | no_license | mi6eto/SoftUni | 7f7aa7419b5430b6bd0c908246c1604342eb605a | 56dc781fa3502bf250b47a52823de49bd2d85cb5 | refs/heads/main | 2023-02-12T11:43:47.997337 | 2021-01-16T19:00:00 | 2021-01-16T19:00:00 | 325,096,943 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 956 | py | message = input()
command = input()
encrypted_message = message
while not command == "Reveal":
command = command.split(":|:")
name = command[0]
move = command[1]
if name == "InsertSpace":
move = int(command[1])
encrypted_message = encrypted_message[:move] + " " + encrypted_message[move... | [
"mivanov0105@gmail.com"
] | mivanov0105@gmail.com |
70819d4f7a61a67beb08903256c9e261cfbe48c8 | 4e90d567a5bee2b40109091fc7f06e69550b8061 | /src/manage.py | d0871dfc59ef3944fd3edf8ae3c235c3e4263fd1 | [
"MIT"
] | permissive | jtrussell/swindle | cdd30c868a04e2b3b9bfa63b71971211a1d9c60c | 914f9ddc7b155cf895fc233b9f3f0c1804bf23e3 | refs/heads/main | 2023-04-23T03:22:05.483701 | 2021-05-10T02:01:36 | 2021-05-10T02:01:36 | 350,307,319 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 663 | py | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'swindle.settings')
try:
from django.core.management import execute_from_command_line
except Impo... | [
"jus.russell@gmail.com"
] | jus.russell@gmail.com |
5e8b02bdaf38c20d2f114f739a75378f121e5a59 | 6f6d884e8677f429a670de6cf44497720c53b0ab | /env/educa/bin/pilprint.py | aac0973cae03342b1a4ac244c2d8880bb4eb4daa | [] | no_license | luoshuitaotao/eLearningmy_own_part | 216c34557a28e4f9b0ebe9507a5ed052e46ce065 | a3009f56b657ee062265d07301cbaae329adc871 | refs/heads/master | 2021-05-15T21:46:18.236365 | 2017-10-15T04:27:11 | 2017-10-15T04:27:11 | 106,574,113 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,429 | py | #!/Users/cuijing/Desktop/test/env/educa/bin/python3.6
#
# The Python Imaging Library.
# $Id$
#
# print image files to postscript printer
#
# History:
# 0.1 1996-04-20 fl Created
# 0.2 1996-10-04 fl Use draft mode when converting.
# 0.3 2003-05-06 fl Fixed a typo or two.
#
from __future__ import print_funct... | [
"jcui@unomaha.edu"
] | jcui@unomaha.edu |
72aa26de7735743a4922927eb8c2510797d8c1fe | d515fc60d1ce2ad5b5f58f66ec89379dac370679 | /bot/Backtesting/Pairs.py | 348e33128995f58595d5150f6fc0af3d10a06a5e | [] | no_license | clinestanford/USUInvest18-19 | 49e69ff3991b087b57af84ebb079812cc076c973 | 641565e5710c42e671a05c6f41f03e2ee834bc5f | refs/heads/master | 2021-06-23T03:57:53.696389 | 2019-08-14T23:27:19 | 2019-08-14T23:27:19 | 148,672,229 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,222 | py |
import pandas as pd
import numpy as np
from statsmodels.tsa.stattools import adfuller
import matplotlib.pyplot as plt
PATH_TO_DATA = '../StockData/'
class Pair:
##window will be the number of days to look back
##in order to calculate the mean
def __init__(self, pair1, pair2, window, gap):
self.pair1 = pair1... | [
"clinestanford@gmail.com"
] | clinestanford@gmail.com |
79c8dcd5e4c88a73728513cb4df0880fed8d39ed | a1b649fcd0b6f6c51afb13f406f53d7d823847ca | /studies/migrations/0005_response_date_modified.py | bb8d219751306f22ed39ea102d80bdade3f9f49d | [
"MIT"
] | permissive | enrobyn/lookit-api | e79f0f5e7a4ef8d94e55b4be05bfacaccc246282 | 621fbb8b25100a21fd94721d39003b5d4f651dc5 | refs/heads/master | 2020-03-27T01:54:00.844971 | 2018-08-08T15:33:25 | 2018-08-08T15:33:25 | 145,752,095 | 0 | 0 | MIT | 2018-08-22T19:14:05 | 2018-08-22T19:14:04 | null | UTF-8 | Python | false | false | 462 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-07-05 15:31
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('studies', '0004_auto_20170616_0244'),
]
operations = [
migrations.AddField(... | [
"henriqueharman@gmail.com"
] | henriqueharman@gmail.com |
faf962ecb5afbe4c62cc1493d84e930af29eab6b | 9585322c6e129daf74b453e0ef47418f52ef10f7 | /lib_new/checkmat.py | 9f4eb34e9369ca03ccaf1af38c2978c112f9869f | [] | no_license | SIMEXP/GCN_fmri_decoding | 7399b3580a8d9b79a50d31e354ad97d559993d7a | 8850245458fa0976b3449e3eed529f702b1b6edb | refs/heads/master | 2021-07-13T10:45:12.541451 | 2021-03-25T04:37:42 | 2021-03-25T04:37:42 | 232,432,212 | 1 | 0 | null | 2020-11-02T01:27:02 | 2020-01-07T22:50:11 | null | UTF-8 | Python | false | false | 6,204 | py | import os
import glob
import json
import numpy as np
import tensorflow as tf
class BestCheckpointSaver(object):
"""Maintains a directory containing only the best n checkpoints
Inside the directory is a best_checkpoints JSON file containing a dictionary
mapping of the best checkpoint filepaths to the value... | [
"zhangyu2ustc@gmail.com"
] | zhangyu2ustc@gmail.com |
f578c13a1ecfd5199cfd7d828ac17dcf7795fa64 | 4a28265a41277f614c5574d750b11eb3b616e420 | /challenges/isAdmissibleOverpayment.py | f991c3034149bfe8c23d518b1655305180d3ec9c | [] | no_license | JorG96/CodingPractice | 8819937f0fbf1112e2969b55bb62b9700a450222 | c06d92079afe3a85e6c1748d86facd5fbfde8f71 | refs/heads/main | 2023-07-24T03:30:17.660260 | 2021-09-05T03:41:28 | 2021-09-05T03:41:28 | 398,324,832 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,300 | py | '''
After recently joining Instacart's beta testing developer group, you decide to experiment with their new API. You know that the API returns item-specific display-ready strings like 10.0% higher than in-store or 5.0% lower than in-store that inform users when the price of an item is different from the one in-store.... | [
"noreply@github.com"
] | JorG96.noreply@github.com |
d04f2054d41b54b3d9ec9a8cf5cfd3175fd904c2 | a1242d26f49a3f5825a476b47fb7d790c3f3a5ab | /normal_dataset.py | 60e055bddc8ffa3910eadfe439a0723c8fe02d3b | [] | no_license | biditdas18/Covid-19_Detection_from_X_ray_image | 85b42998012e99ce4899064625fd37a1d1e21c9b | 5c7c0b3b4b954d6b67ab867d09793133d582c786 | refs/heads/master | 2022-11-13T21:26:29.722192 | 2020-06-26T09:10:40 | 2020-06-26T09:10:40 | 275,111,975 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,003 | py | from imutils import paths
import argparse
import random
import os
import shutil
ap = argparse.ArgumentParser()
ap.add_argument('-n','--normal', required = True,
help = 'path to the base directory of normal xray dataset')
ap.add_argument('-o','--output', required = True,
help =... | [
"noreply@github.com"
] | biditdas18.noreply@github.com |
61a040429d1c3dd55166c7657efc5b4fbb53c03e | 507fb1ec490943034d8507fc69f4f63039232ec3 | /models/entities.py | 7739c0124db33f0a0a05ce57cafaa95a1657f321 | [] | no_license | kjanko/data-scrapping | 968ff800a27770241198f3b964b505f80bc633b6 | 709d538e45945344eb68900475da505d1c1457dc | refs/heads/master | 2020-09-26T17:42:17.406929 | 2019-12-06T10:39:07 | 2019-12-06T10:39:07 | 226,134,078 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 432 | py | from peewee import Model, CharField, ForeignKeyField
from models import database
class BaseModel(Model):
class Meta:
database = database
class Flight(BaseModel):
destination = CharField()
weather = CharField()
timestamp = CharField()
@property
def notes(self):
return self.n... | [
"kristijan.jankoski@netcetera.com"
] | kristijan.jankoski@netcetera.com |
1cf5ae3abf64cb0f896364d8cd5cb9ed3ea69664 | 40132307c631dccbf7aa341eb308f69389715c73 | /OLD/idmt/maya/Calimero/UnlockALL.py | b7d180408bf113df0b406b6af1cf6e6a88b352bf | [] | no_license | Bn-com/myProj_octv | be77613cebc450b1fd6487a6d7bac991e3388d3f | c11f715996a435396c28ffb4c20f11f8e3c1a681 | refs/heads/master | 2023-03-25T08:58:58.609869 | 2021-03-23T11:17:13 | 2021-03-23T11:17:13 | 348,676,742 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 570 | py | # --- Unlock transforms
import maya.cmds as mc
for sel in mc.ls(tr=True, l=True):
mc.setAttr(sel+'.translateX', l=False, k=True)
mc.setAttr(sel+'.translateY', l=False, k=True)
mc.setAttr(sel+'.translateZ', l=False, k=True)
mc.setAttr(sel+'.rotateX', l=False, k=True)
mc.setAttr(sel+'.rotateY', l=Fals... | [
"snakelonely@outlook.com"
] | snakelonely@outlook.com |
03078a67d75666352755db543548fc948c990a24 | ead9315c1cc9ac6da71985c84d35e3cde8abdeea | /MachineLearning/GD.py | 6865deaeacff305a44d134029f44f841f9b7e02c | [] | no_license | drivenow/MachineLearning | e2091d5c37fbaacca4377ffee0aac38188344fbc | f83ce40900adc43279c5af15058b6831ea4dc60f | refs/heads/master | 2021-05-16T09:27:28.361265 | 2017-09-22T07:52:35 | 2017-09-22T07:52:35 | 104,430,487 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,744 | py | # -*- coding: utf-8 -*-
"""
Created on Fri Dec 11 21:43:14 2015
@author: shenjunling
“””
本算法实现线性回归实验。
输入:年份(2000-2013),年份对应的房价
输出:年份—房价成线性相关的预测直线,损失函数的变化图
参数说明:
X : 年份,同减去2000以标准化
Y : 房价
Alpha :梯度下降法的步长
Theta :权重参数
Maxiter : 最大迭代次数
“””
"""
#%%
import numpy as np
import pylab as pl
import matplotlib.pyplot as plt
x=np.... | [
"1171935994@qq.com"
] | 1171935994@qq.com |
88478167a06dcdc3161b86f7e90b0fe4afef5f45 | ffc46e91f18e93c6dfe7a5fe64145d82f2857c16 | /alien.py | 4c40ffdae64542dc48398329e75d888df1239cc9 | [] | no_license | bmgreene19/alieninvasion | 79640d0da35e9855579add406d0386c543eee07a | 3233c3a14bc0bf5a4de9b601cfda1e4cceaf9fd5 | refs/heads/main | 2023-01-20T11:03:06.030931 | 2020-11-19T06:55:29 | 2020-11-19T06:55:29 | 314,161,666 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,164 | py | import pygame
from pygame.sprite import Sprite
class Alien(Sprite):
'''A class to represent a single alien in the fleet'''
def __init__(self, ai_game):
'''Initialize the alien and set its starting position'''
super().__init__()
self.screen = ai_game.screen
self.settin... | [
"noreply@github.com"
] | bmgreene19.noreply@github.com |
9ead7acdf2745df4f47c825cf56dab9abb9cbdd2 | 3b26427a5afe4bd4fa50875dbec7996a8c9d8f62 | /catkin_ws/devel/lib/python2.7/dist-packages/niryo_one_msgs/srv/_SetCalibrationCam.py | a3ab00279ce00b214a19c23af89ca4d155001ec9 | [] | no_license | Anton1B/Base_mobile_MaD | 26ca8854863fa30ef7db582aed4e62fb35409178 | 46a1cda6167e40c5203bb865802edcca1a4c8263 | refs/heads/main | 2023-08-14T21:07:48.631852 | 2021-09-13T12:50:19 | 2021-09-13T12:50:19 | 373,205,357 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 8,259 | py | # This Python file uses the following encoding: utf-8
"""autogenerated by genpy from niryo_one_msgs/SetCalibrationCamRequest.msg. Do not edit."""
import codecs
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct
class SetCalibrationCamRequest(genpy.Message):
_md5sum = "c1f... | [
"betaille.antonin@gmail.com"
] | betaille.antonin@gmail.com |
d26125814a10613abfecc0df6a4ed36751bd4ea9 | ad870203d61044a02c1bad8cdb8704846a192e23 | /MUNDO_01/Aula_11/Cores_no_terminal.py | d3e7f3e0ff8849b78f4a3074030cba99beaf55e0 | [] | no_license | gpreviatti/exercicios-python | ee3095677c8628c7dbeb6b3d8275dc12666fd602 | 72dd6a83891906a3e9eaa40c4a68d2422ee593cc | refs/heads/master | 2021-06-24T10:44:17.278772 | 2020-11-13T18:54:02 | 2020-11-13T18:54:02 | 166,492,391 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 936 | py | #Arquivo com demonstração das cores no terminal
#Codigo anci
# \033[STYLE(normal,negrito,sublinhado);TEXT(cor);BACKGROUND(cor do fundo)m
#ESTILO DO TEXTO
print('\033[1m Negrito')
print('\033[4m Sublinhado\n')
print('\033[7m Inversão de cores')
#TEXTO
print('\033[30m Branco')
print('\033[31m Vermelho')
pri... | [
"gpreviatt@gmail.com"
] | gpreviatt@gmail.com |
47b04892b221e164b29feeed52cc0d7f46750230 | 6eb4a6a795a935729e582b82a5a49c9645555099 | /src/dev/echo-client.py | 48fe19c550cfb747f3786a67ad97706bb7d9e96e | [] | no_license | yw6916/ASA | e7263f17bc90b7c583dba9dff5af3a34c0a52f67 | ca431c695c691fbf1c06b5f69aa6dbc637ea45d6 | refs/heads/master | 2020-04-24T12:34:30.565250 | 2019-02-21T18:35:18 | 2019-02-21T18:35:18 | 171,959,620 | 1 | 0 | null | 2019-02-21T23:13:20 | 2019-02-21T23:13:20 | null | UTF-8 | Python | false | false | 969 | py | #!/usr/bin/env python3
import socket
import struct
import argparse
def send_message(msg, HOST='127.0.0.1', PORT=65432):
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.connect((HOST, PORT))
s.sendall(msg)
data = s.recv(1024)
print('Received', repr(data))
return ... | [
"joearrowsmith98@gmail.com"
] | joearrowsmith98@gmail.com |
3817993a706e9bc126c553f35e7c7d3d592ba38f | 80f66a4d10b43cd28c7a49ff8ce829899b73173b | /Python Codes/correlation.py | 4ee1b979f6728a94db7130e9d4f616e007efee09 | [] | no_license | davidulicio/Rapa-Nui-s-soundings-analysis | 8ac30d4f5707b7217a68c224cfb2a6911d078d41 | dfd087b3cf6d2f7647445871e63d9e1c98475826 | refs/heads/master | 2021-06-23T20:33:43.100582 | 2019-09-21T03:05:54 | 2019-09-21T03:05:54 | 116,276,406 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 490 | py | # -*- coding: utf-8 -*-
"""
Correlation between ozone and VOCs
@author: DavidUlises
"""
import numpy as np
from Subplots_EIC import yearCO, yearCO2, yearP, yearNP, yearNB, yearE, yearMP, yearMB
from ozone import year
# Correlation coeficients
co = np.corrcoef(yearCO, year)
co2 = np.corrcoef(yearCO2, year)
p = np.corrc... | [
"30703946+davidulicio@users.noreply.github.com"
] | 30703946+davidulicio@users.noreply.github.com |
81289e1ac4431bee8a711cd0b2370d2c34425e7c | ee980aedb53d3e3cd03d4f55b2f6451eb9602218 | /result_dir.py | 6092fa8209982f69a95c1a34645d994fa618bed4 | [] | no_license | renatodmt/Auto-ML-Research-Project | 1004331bc217446be946d6b75679d9ba77ade3e0 | e633d46649c1c728d1d2289bed0ee89c4cc0518d | refs/heads/main | 2023-04-20T08:50:14.619230 | 2021-05-14T01:50:36 | 2021-05-14T01:50:36 | 351,396,712 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 147 | py | import os
def make_dir_if_not_exists(dir):
if os.path.exists(dir):
print(f'{dir} already exists!')
else:
os.makedirs(dir)
| [
"noreply@github.com"
] | renatodmt.noreply@github.com |
5266bd005817bd8e2d651a2454a37f7f848dd8eb | 65af3d50e34b0669c377cd59e4c175bd8639247d | /tests/reshape_2/generate_pb.py | 8b880dad445296192d50d0ffc1ff8de7ce4210dc | [
"Apache-2.0"
] | permissive | lzufalcon/utensor_cgen | 3688881706710a66f14e399463f705045f26fe10 | 1774f0dfc0eb98b274271e7a67457dc3593b2593 | refs/heads/master | 2020-03-22T14:28:07.393957 | 2018-04-06T15:40:30 | 2018-04-06T15:41:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,046 | py | # -*- coding: utf8 -*-
import os
from utensor_cgen.utils import save_consts, save_graph, save_idx
import numpy as np
import tensorflow as tf
def generate():
"""the reshape op will be used in this case since tensorflow will flatten
the input tensor and find the min/max value for quantized matmul
"""
test_dir ... | [
"qmalliao@gmail.com"
] | qmalliao@gmail.com |
038356119549e317713b53c56effec940daac268 | eae7786f204ff1329dc57bcf7dbec86459312ba3 | /igata/utils.py | 1c139fa5997b892d420765011f51aabd2642b785 | [
"BSD-2-Clause"
] | permissive | kiconiaworks/igata | a70285e9467b66325becbd60b29459f34bf67a69 | 29b854fb498b5eabf41465fcaaeb7c8059f944b0 | refs/heads/master | 2023-01-11T07:43:56.092988 | 2022-04-06T11:37:13 | 2022-04-06T11:37:13 | 211,023,674 | 1 | 0 | BSD-2-Clause | 2022-12-27T16:38:09 | 2019-09-26T07:09:01 | Python | UTF-8 | Python | false | false | 11,289 | py | import csv
import datetime
import json
import logging
import os
import time
import urllib
from collections.abc import Hashable
from decimal import Decimal
from gzip import GzipFile
from hashlib import md5
from io import BytesIO, StringIO
from pathlib import Path
from typing import Generator, List, Optional, Tuple, Unio... | [
"shane.cousins@gmail.com"
] | shane.cousins@gmail.com |
23498eed5e9a542ea41369a9e9a38d4bcb1a456e | 92b74258a1058e0d84f8f6e0b84cc1984d9f9d55 | /app/mlengine/encodings.py | 8071bbe5fb714ffabe4af21118c9e1c4f9b5b977 | [] | no_license | I-am-Cazza/group31-project | 56c053700e96ef1e8e56f4952fa2197843ba2ecc | c9ef41480b908ed95c36e08729f1021c8eaef0c5 | refs/heads/master | 2020-04-17T22:11:48.841577 | 2019-03-08T09:15:04 | 2019-03-08T09:15:04 | 166,984,094 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 230 | py | class Encodings:
custom_indices: dict
uni_encodings: dict
degree_encodings: dict
def __init__(self):
self.custom_indices = dict()
self.uni_encodings = dict()
self.degree_encodings = dict()
| [
"cameronhughes0@btinternet.com"
] | cameronhughes0@btinternet.com |
e6e73b43edec5b695bade6e9dff193fb728fcf53 | bd4e97350d455bb12bd8aa15366d00c89cb97d15 | /tut68.py | a437e07031102547cbe8f43f77fb092b95e8f728 | [] | no_license | summitkumarsharma/pythontutorials | a2f9ae2e112da223db4be3120bbed879df4a0609 | c4ab020ebd32ed8cd259602dec9b1b6ea33ff193 | refs/heads/master | 2022-11-07T10:24:16.223835 | 2020-06-25T18:08:46 | 2020-06-25T18:08:46 | 270,009,195 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 593 | py | # Abstract Base Class & @abstractmethod
# from abc import ABCMeta, abstractmethod
from abc import ABC, abstractmethod # we can import in this way also
# class Shape(metaclass=ABCMeta):
class Shape(ABC):
@abstractmethod
def print_area(self):
return 0
class Rectangle(Shape):
type = "rectangle"
... | [
"summitkumarsharma@gmail.com"
] | summitkumarsharma@gmail.com |
dc8d9542b83f65c6494bafe5bfbab2190b018152 | ac73a433b66695992a00cb26d572bc94b52576e5 | /code/featurization.py | a6c6a14c5516836104531287033e17f78acd70b9 | [] | no_license | yutaogura/MLtest | 54792065b6949a23d01cb71bf5ff604a4b2d514d | f69ee2731048529685e9e16fe2c1572d51124854 | refs/heads/master | 2020-03-11T06:54:41.218079 | 2018-04-17T08:23:27 | 2018-04-17T08:23:27 | 129,843,524 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,518 | py | import pandas as pd
import numpy as np
import scipy.sparse as sparse
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.feature_extraction.text import TfidfTransformer
import conf
try: import cPickle as pickle # python2
except: import pickle # python3
np.set_printoptions(suppress=True... | [
"6315026@ed.tus.ac.jp"
] | 6315026@ed.tus.ac.jp |
09941b0ce2af4d2a1e8dd0497661b07557f7cad4 | 26932deb5eb41825af699dd70369a590325489e4 | /news_site/wsgi.py | e79e006c565087ddf2379bcc79526647fb69e7e4 | [] | no_license | atleysayone/news_site | 73a728377b7aa520f391f4d655c9ec6a22e18695 | 65706de1d8d866276a0569891e113fb8b4914e4d | refs/heads/master | 2020-04-21T17:17:27.095940 | 2017-09-17T16:40:19 | 2017-09-17T16:40:19 | 169,730,927 | 0 | 0 | null | 2019-02-08T12:20:57 | 2019-02-08T12:20:56 | null | UTF-8 | Python | false | false | 489 | py | """
WSGI config for news_site project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
from whitenoise.django import Dja... | [
"atleyvarghese@gmail.com"
] | atleyvarghese@gmail.com |
4ded22392e891ed13facd308785a927b3fe64ccf | 94cf925fc46ea6428f62322c50f78c54c02d22a5 | /onlinesale/coments/admin.py | 46f7a2e36bcf168992de05daf04ae3959958cde9 | [] | no_license | blue-marker/Social-Site-Website-For-Movies-Using-Django | 73ed29adedfc6e51419a8aa667a255d1dc76c48e | 2c8aaf9c51e295b1ea6a4d909cbfaa42fc1a71b8 | refs/heads/master | 2022-04-19T12:54:22.064529 | 2020-04-18T07:12:36 | 2020-04-18T07:12:36 | 256,691,331 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 118 | py | from django.contrib import admin
from .models import Coment
# Register your models here.
admin.site.register(Coment) | [
"salianvarun30@gmail.com"
] | salianvarun30@gmail.com |
2f6f9316b76ea79538af8c9e1f6cd8f60f96e9b2 | 4bcc9806152542ab43fc2cf47c499424f200896c | /tensorflow/python/framework/python_api_info_test.py | 6522303b24f1e227e29cd64540b38538679e61ea | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla",
"BSD-2-Clause"
] | permissive | tensorflow/tensorflow | 906276dbafcc70a941026aa5dc50425ef71ee282 | a7f3934a67900720af3d3b15389551483bee50b8 | refs/heads/master | 2023-08-25T04:24:41.611870 | 2023-08-25T04:06:24 | 2023-08-25T04:14:08 | 45,717,250 | 208,740 | 109,943 | Apache-2.0 | 2023-09-14T20:55:50 | 2015-11-07T01:19:20 | C++ | UTF-8 | Python | false | false | 11,146 | py | # Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"gardener@tensorflow.org"
] | gardener@tensorflow.org |
f4e96334215c46f86777705be0337ab833f88b27 | fe6b475c6504d113a7742a5f46c695a21e777b59 | /layers/categorical_encoding/mutils.py | 2db7dc9620f2f044a708ac9d6e085ee86c0278f5 | [
"MIT"
] | permissive | achinta/CategoricalNF | eba5cadf3018edc5166d77e588f7e1c355efaec1 | d8717a037e8f13641e9d9a89abf66fba38e23f91 | refs/heads/master | 2023-02-19T20:21:12.934621 | 2021-01-19T18:41:38 | 2021-01-19T18:41:38 | 337,639,302 | 0 | 0 | MIT | 2021-02-10T06:39:36 | 2021-02-10T06:39:35 | null | UTF-8 | Python | false | false | 3,894 | py | import torch
import torch.nn as nn
import torch.nn.functional as F
import sys
sys.path.append("../../")
from general.mutils import get_param_val
from layers.categorical_encoding.variational_dequantization import VariationalDequantization
from layers.categorical_encoding.linear_encoding import LinearCategoricalEncodin... | [
"phillip.lippe@googlemail.com"
] | phillip.lippe@googlemail.com |
39eeee636ac00789623e040c9e5a29a90c083778 | b9c140b741d04e496159ab987d72e37b8c99f735 | /phonecode/apps.py | a9892d2dd6d05ff9364ff27da8b21afa30f603de | [
"MIT"
] | permissive | okchaty/django-country | 2d2ae8a418cbecdbf30ec298afa5ace3a6c4a75f | 740bc25956dc1b87f44486538a62037e0bd0ac94 | refs/heads/master | 2021-05-18T13:22:48.793505 | 2020-04-03T07:05:00 | 2020-04-03T07:05:00 | 251,260,881 | 1 | 0 | MIT | 2020-04-02T18:41:10 | 2020-03-30T09:36:07 | Python | UTF-8 | Python | false | false | 93 | py | from django.apps import AppConfig
class PhoneCodeConfig(AppConfig):
name = 'phonecode'
| [
"cristhian9bravo@gmail.com"
] | cristhian9bravo@gmail.com |
f0f3122abdc27a19f89ca90ea186ca899ff17a16 | 6a48403f9939e4ad74364250e90227a2698fecde | /scapy-test/AbnormalMessageDetection/IPprotocol/IP_Protocol.py | cfa5a128af4aedc621b6485136542c24b372bce0 | [] | no_license | pig98/DDOSAttack | 96438baedb0ae1c5de332323e483ab4ff6490640 | 11cac8cad6109332f51cc89abe7cc334e25fa887 | refs/heads/master | 2023-03-17T07:54:47.864460 | 2020-06-04T10:36:27 | 2020-06-04T10:36:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,117 | py | import scapy.all as scapy
import time
import os
def IP_Protocol():
clear = os.system('clear')
print("")
print("**************************************************************")
print("* Welcome to DDOS Attack system *")
print("********************************************************... | [
"root@localhost.localdomain"
] | root@localhost.localdomain |
69a90d67ae4e3fe3881282fd832445ae0b5d82b3 | e01883301bd2174babfca949517b06d70aaa7196 | /functional_tests/test_list_item_validation.py | a89f565f3f093c78b933f622b6358dc0ada631eb | [] | no_license | elihro/obey_testing_goat_superlists | c275a73ef2b64307ebe78f20f84c751609c27281 | 13a7867674841c4acfa94f0fb243600299f6b395 | refs/heads/master | 2020-07-02T11:48:12.440385 | 2019-09-20T20:23:15 | 2019-09-20T20:23:15 | 201,516,806 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,876 | py | from .base import FuncionalTest
from selenium.webdriver.common.keys import Keys
from unittest import skip
import time
class ItemValidationTest(FuncionalTest):
def get_error_element(self):
return self.browser.find_element_by_css_selector('.has-error')
def test_cannot_add_empty_list_items(self):
# Edith goes to... | [
"elihro.duarte@gmail.com"
] | elihro.duarte@gmail.com |
534d9e5e9a975e2165b2dd4c57e4f2705ae24d4b | 25c26a9d1752918dccbe9ff33b5e7e8b627c0951 | /test_journal.py | 2043e830495ee85b48e4613e90bd04457b940d5d | [
"MIT"
] | permissive | nbeck90/learning-journal | 01e1b4d1529fb8dc0ffb7f60e9c0180ea3b0da75 | 93755f0ba829382ec3ab55e1ab0f2ba94a405094 | refs/heads/master | 2021-01-20T17:20:36.777618 | 2017-05-18T22:08:48 | 2017-05-18T22:08:48 | 30,119,199 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,974 | py | from contextlib import closing
from pyramid import testing
from cryptacular.bcrypt import BCRYPTPasswordManager
import os
import pytest
import datetime
from journal import INSERT_ENTRY
from journal import connect_db
from journal import DB_SCHEMA
TEST_DSN = 'dbname=test_learning_journal user=nbeck'
def init_db(setti... | [
"nbeck90@uw.edu"
] | nbeck90@uw.edu |
66e49975c766d72936c157dd0bc2e21068ea656b | 3bfe35a518869c4354ab1f817fd2060f0446313e | /examples/core_display_callbacks.py | a8dbe0cb65622cf41e9ebe14f145a0a0adb8cfee | [] | no_license | tankvn/pythonocc-demos-with-thumb-preview | b16b6d00b6e14bda6e4b765a354691255a7d2d43 | 36746225ddd8406dcce9b12a9ccd6489aa281694 | refs/heads/master | 2023-04-26T16:43:30.377812 | 2021-05-04T06:12:36 | 2021-05-04T06:12:36 | 362,368,937 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,127 | py | ##Copyright 2010-2014 Thomas Paviot (tpaviot@gmail.com)
##
##This file is part of pythonOCC.
##
##pythonOCC is free software: you can redistribute it and/or modify
##it under the terms of the GNU Lesser General Public License as published by
##the Free Software Foundation, either version 3 of the License, or
##(at your... | [
"tpaviot@gmail.com"
] | tpaviot@gmail.com |
0df7d6c7aae8d0befd717b3de9078de48f6c71ec | c0af6f30e21cb27227037a7461c24d3187304a65 | /models/SortCont.py | 34b4afea33fe52157bc0de186fc6bbe4fc7c0a08 | [] | no_license | masl512/dabm2021 | 320d07dbe44577d8019953b413f6a20213ee1e77 | 613a61f4af2bc6d4fdfa3ad4236c2c37d39154b2 | refs/heads/master | 2023-04-21T23:28:49.306743 | 2021-05-20T06:59:57 | 2021-05-20T06:59:57 | 361,468,454 | 0 | 1 | null | 2021-05-18T07:01:20 | 2021-04-25T15:40:29 | Python | UTF-8 | Python | false | false | 1,083 | py | import cv2
import pandas as pd
def sortContours(cnts):
boundingBoxes = [cv2.boundingRect(c) for c in cnts]
# print(boundingBoxes)
df = pd.DataFrame(boundingBoxes, columns=['x','y','w','h'])
# print(df)
df.sort_values(by=['y','x'], inplace= True)
boundingBoxes = df.values.tolist()
# print(b... | [
"miguel.soler@mail.escuelaing.edu.co"
] | miguel.soler@mail.escuelaing.edu.co |
369cf4599d8f04b904158fb0b1611755ec90dc12 | 15215d0ccc0414e4d9e187109af11002cbc14453 | /node_modules/keccak/build/config.gypi | 6d26ffab9cabf16ec85f7d936c2ebd74410b5c4a | [
"MIT"
] | permissive | jsdelivrbot/VinylMarketplace | 752d34cf2b6c98e6f92ec44dacc9b302258b3cab | 508c4143e7f494fcbc0555af83343cda817c358f | refs/heads/master | 2020-04-10T08:10:46.394976 | 2018-12-08T01:51:27 | 2018-12-08T01:51:27 | 160,899,218 | 0 | 0 | null | 2018-12-08T03:13:02 | 2018-12-08T03:13:02 | null | UTF-8 | Python | false | false | 5,184 | gypi | # Do not edit. File was generated by node-gyp's "configure" step
{
"target_defaults": {
"cflags": [],
"default_configuration": "Release",
"defines": [],
"include_dirs": [],
"libraries": []
},
"variables": {
"asan": 0,
"coverage": "false",
"debug_devtools": "node",
"debug_http2"... | [
"surayashivji@gmail.com"
] | surayashivji@gmail.com |
945f36544dc449381c85c003cb56159906ef46ba | 6a7e952a99211b86ce1c43b0e12436faf7e794a8 | /2021/Python/Algorithms/ArrayNumAdder.py | 996e8cff368ec594d4b715178b918541e7735ab8 | [] | no_license | Lazeeez/hacktoberfest | 0ab7bcb3d5cb62a6cce03ada0b0a48360b07caea | 36e3d83a5ed94ee9a57a82aa7773e6e3b5589838 | refs/heads/master | 2023-08-27T06:32:48.993821 | 2021-10-30T09:46:06 | 2021-10-30T09:46:06 | 412,881,759 | 0 | 0 | null | 2021-10-30T11:52:52 | 2021-10-02T18:35:11 | Python | UTF-8 | Python | false | false | 229 | py | from functools import reduce # for reducing our code into 1 line
def ArrayNumAdder(numlist):
return reduce(lambda a,b: a+b, numlist)
if __name__ == '__main__':
mylist = [1,2,3,4,5]
print(ArrayNumAdder(mylist))
| [
"michaelmaranan030@gmail.com"
] | michaelmaranan030@gmail.com |
7a978563773c57d4437f81d9255dc645e1df02af | 60299298843d727d600a113904007339f1647f11 | /Django Project/mysite/demo/models.py | ead10f692b5dcdeb2076b07b2c283b386e25c8bb | [] | no_license | pntehan/Django- | fea530ba18ae267a4cc65887f8d11bb1a8dfe7c4 | 31ccbc3059a39d009aeaff661dfab1a9ae5aa79a | refs/heads/master | 2022-12-26T10:40:51.582732 | 2018-12-27T08:30:38 | 2018-12-27T08:41:39 | 163,253,318 | 0 | 1 | null | 2022-12-12T14:24:59 | 2018-12-27T05:56:48 | Python | UTF-8 | Python | false | false | 323 | py | from django.db import models
# Create your models here.
class LoginUser(models.Model):
name = models.CharField(max_length = 150)
password = models.CharField(max_length = 150)
account = models.CharField(max_length=150)
img = models.ImageField(upload_to='img')
data = models.FileField(upload_to='myfil... | [
"2390003207@qq.com"
] | 2390003207@qq.com |
c9c44164e3eebc4bd22437b21a345e6fe938101d | 9e786b81fea1f6001300fd2efe192d07e69a44f2 | /tetris/tetris_keypress.py | 815840847842b8f8813c22abc0eb07c8eb34d045 | [] | no_license | SebastianStaab/AEMLproject | 81e34dcf1774b8269e41791b1f96b5d6879e8a1c | d1015aa8bcc45c30d3571299fb0cc21adc2429c9 | refs/heads/master | 2022-12-14T20:53:26.239050 | 2020-08-30T13:23:17 | 2020-08-30T13:23:17 | 286,392,726 | 0 | 0 | null | 2020-08-10T06:19:17 | 2020-08-10T06:19:16 | null | UTF-8 | Python | false | false | 8,494 | py | from random import randrange as rand
import random
import pygame, sys
### CONFIGURATIONS ###
cell_size = 25
cols = 10
rows = 20
colors = [ (0, 0, 0), # color for background
(255, 0, 0),
(0, 255, 0),
(0, 0, 255),
(255, 255, 0),
(0, 255, 255),
(1... | [
"silkehusse@Silkes-MBP.fritz.box"
] | silkehusse@Silkes-MBP.fritz.box |
28680a676835b6a4686ce65756256a75cd8450d6 | 6041ed86c2a565af83c2b0a70ce62e390605e917 | /test/TargetTest.py | eacb4beded62606f31eaf5bcfd24cd568ab950a6 | [] | no_license | DiwakarRDivu7/ShellSummary | 97037e25f13b34fbd80c5ed35d078cdc4b5c4db1 | 706e895a1d96bd373c61cda85eee0fbce76a1e9c | refs/heads/master | 2020-09-21T23:05:48.342779 | 2020-01-30T11:33:32 | 2020-01-30T11:33:32 | 224,965,911 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,380 | py | """
"""
import unittest
from pyspark.sql import SparkSession
from connectors.TargetConnector import createDatasetFromAbbyXmlFile
import yaml
class Test(unittest.TestCase):
with open("/Users/diwr/PycharmProjects/ShellShipping/conf/shell_shipping_config.yaml") as file:
config = yaml.load(file, Loader=yam... | [
"46436050+DiwakarRogers@users.noreply.github.com"
] | 46436050+DiwakarRogers@users.noreply.github.com |
d792e0a3f05d142d434a25421734a42aef34b38e | fbcea84d30f2ab1778cff27e512acd562b651284 | /background.py | d30f143c00172c665efd27802d34720c2d8babf9 | [] | no_license | tidalvirus/bashup | 1f3e580775f23fa29bcfc94b9faae8fb46ff0898 | a917b4f6e6075a8e4b184f8549bc9dbb21d50a1f | refs/heads/master | 2023-08-03T10:07:51.614160 | 2023-07-24T11:53:03 | 2023-07-24T11:53:03 | 36,228,614 | 0 | 1 | null | 2023-07-24T11:53:04 | 2015-05-25T11:56:20 | Python | UTF-8 | Python | false | false | 2,432 | py | #!/usr/bin/env python
# Simple background colour changing program
# Slooooooow
# by Siraj 'Sid' Rakhada sid-git@mindless.co.uk
import random, sys, time, pygame
from pygame.locals import *
FPS = 30
WINDOWWIDTH = 0
WINDOWHEIGHT = 0
# R G B
WHITE = (255, 255, 255)
BLACK = ( 0, 0, ... | [
"sid-git@mindless.co.uk"
] | sid-git@mindless.co.uk |
0c948fa14d63d5ba7e3946aee79ad59819197e16 | 1db400c30c31dc1af32e3503b23776a2bea9d94f | /hcn/agents/hcn/utils.py | 9e8ed9aac229d321a73378822dd0802d65ec5d3f | [
"Apache-2.0"
] | permissive | wonyonyon/hcn-dialogue-manager | c1c3d6be2029e5923e409e46d682e611ba361d7f | 78da36ff6a20103c26fb5725973e694aef014c70 | refs/heads/master | 2020-03-16T21:00:48.437967 | 2018-01-22T15:21:07 | 2018-01-22T15:21:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,960 | py | """
Copyright 2017 Neural Networks and Deep Learning lab, MIPT
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 a... | [
"mary.vikhreva@gmail.com"
] | mary.vikhreva@gmail.com |
b50a9db416ad10d4ecc3f9fec05155cca9709ead | 0e531966f459388f080f6d3cb080d72d79d26cf2 | /app/dependencies/security.py | aafb7a6eb65a4253c4e8b5db5ef459ef1d2832ae | [
"MIT"
] | permissive | Luispapiernik/Guane-Inter-FastAPI | 508820926406349bc82c1858a3e20954950382c6 | e08d0d995a25ecc70d2cb5be7bca49b0703173c6 | refs/heads/main | 2023-02-24T05:46:26.044084 | 2021-01-25T10:46:43 | 2021-01-25T10:46:43 | 331,399,807 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,475 | py | from datetime import datetime, timedelta
from fastapi import Depends, HTTPException, status
from fastapi.security import OAuth2PasswordBearer
from jose import JWTError, jwt
from passlib.context import CryptContext
from ..logger import logger
from ..logs.security_messages import *
from ..models.security_models import *... | [
"lpapiernik24@gmail.com"
] | lpapiernik24@gmail.com |
67e29793a7af8e444a07aa860998d0ffcf73c7dc | 0cdf8b69725fe8135ac1484c77078541cd246d18 | /sampling_script.py | e44f139b514ef2e9071a15e7a820393d365ab7bc | [] | no_license | cassidyhhaas/NYC-Urban-Conditions | 644c12c646c94477161f59ab2eab7f38c35627c4 | 3ff8b6419b6fe89f76abd491000b72c10ff9ad13 | refs/heads/master | 2023-06-10T19:38:45.410629 | 2021-06-28T19:50:08 | 2021-06-28T19:50:08 | 115,288,300 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,365 | py | import argparse
import pymongo
from pymongo import MongoClient
import os
settings = {
'mongo_db_name': '311_mongo_import',
'mongo_collection_name': '311_mongo_import',
}
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Bootstrapping script")
parser.add_argument('--size',
... | [
"cassidyhhaas@gmail.com"
] | cassidyhhaas@gmail.com |
aa1893b22270efd12c7a77ba187a7159e426b639 | 748c936f204be73142928a7ab1d3eca03b8551df | /lineNewsBot.py | fee07b47190f4891786698a398d67df5fdce70d1 | [] | no_license | jeff3388/line_news | 992ed1eea11ec8c8e239bdeee74c533c63ad20f3 | 435d5dab6e1afa127f4c37b37d7e6ed046771689 | refs/heads/main | 2023-03-31T07:17:20.314238 | 2021-04-09T15:29:03 | 2021-04-09T15:29:03 | 356,316,657 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,544 | py | from selenium import webdriver
from bs4 import BeautifulSoup
import requests
import time
import re
class LineNewsCrawler:
driver = None
options = webdriver.ChromeOptions()
options.add_experimental_option("excludeSwitches", ["enable-automation"])
filter_source_keywords = ['中台灣生活網', 'LINE TV', 'LINE TODA... | [
"jaxlouder@gmail.com"
] | jaxlouder@gmail.com |
fbfa424ac510326cac597ac08784d5ed7fe0a3dd | 3b21e66188a646c2a876fc283a19265ef891e277 | /py/第二章:字符串和文本/2_4_字符串匹配和搜索.py | 7698ece043eee3a21f076e02f9a32c89508388fb | [] | no_license | Minsc016/ggstudy | f8139322d3f19b20fd39c43b972fe65d887592b4 | 00a75caad76eea213e7ece22f774ea4aace2bb13 | refs/heads/master | 2021-01-06T10:49:24.103229 | 2020-10-15T02:00:51 | 2020-10-15T02:00:51 | 241,302,831 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,848 | py | #########################################################################
# File Name: 2_4_字符串匹配和搜索.py
# Author: Crow
# mail:qnglsk@163.com
# Created Time: Tue Nov 5 11:18:53 2019
#########################################################################
#!/usr/bin/env python3
# 匹配字面字符串 只需 基本字符串方法:str.find() str.endsw... | [
"qnglsk0@gmail.com"
] | qnglsk0@gmail.com |
f2d692c8e9d9a1ead3d2b6676e2d7f18bd7b6515 | ca2f635faaaaf9426e438372613c2580b8e0ff5f | /scraping.py | a2abd23617fce59f40d8e440b7ab2cbe8d00cd32 | [] | no_license | fadlnabbouh/Mission-to-Mars | e5a2b40a513fa7b8d50bda44389e828d7b89828f | 1683d86304d5c58a9b748896ef92b68a4a923177 | refs/heads/main | 2023-06-07T02:08:21.611940 | 2021-07-04T00:23:31 | 2021-07-04T00:23:31 | 378,420,865 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,660 | py | # Import Splinter and BeautifulSoup
from splinter import Browser
from bs4 import BeautifulSoup as soup
from webdriver_manager.chrome import ChromeDriverManager
import pandas as pd
import datetime as dt
def scrape_all():
# Initiate headless driver for deployment
executable_path = {'executable_path': ChromeDrive... | [
"nabbouhf@gmail.com"
] | nabbouhf@gmail.com |
49f78666ab8c2fec997c6ce879bb4b3655237c73 | 9326df6f7c65afe55d82b8039542c38fb265a26e | /week007-008/SakeScraping/NihonsyudbScraping.py | fa4e3aa5b33b7601b263be48224b9470a1de387a | [] | no_license | masa116/homeworks | a984c6689ce4fa822796cff7291d3f10cc5b81e4 | c602096ccc864310eb5668adbee21fc114af4b91 | refs/heads/master | 2021-09-11T15:40:06.801979 | 2018-04-09T11:55:50 | 2018-04-09T11:55:50 | 115,341,049 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,435 | py | # -*- conding:utf8 -*-
import urllib.request
import codecs
import re
p = re.compile(r"<[^>]*?>")
from bs4 import BeautifulSoup
f = codecs.open('nihonsyudb.csv', 'w', 'utf-8')
f.write('id,sakecode,sakename,'+ "¥n")
headers = {
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.36 (KHT... | [
"masa@masa-MBP.local"
] | masa@masa-MBP.local |
50c27d4e89e096291c4b3770778e613828c12616 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02697/s973072904.py | e3e4aaf02e274ad4bf79dde736e315c2ed0abf14 | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 273 | py | N,M=map(int,input().split())
a,b=1,N//2
c,d=N//2+1,N
if N%2==0:
a+=1
i=0
while i<M:
if i<M:
print(c,d)
i+=1
c,d=c+1,d-1
else:
break
if i<M:
print(a,b)
a,b=a+1,b-1
i+=1
else:
break
| [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
1257e6eda6975b8181e621e61d214f62a80715e0 | 7329a11494b6ebac358ec9e74e028ebb1ee08ecf | /array/121/v1.py | c51550d2e784e70ddd0e3887365585bb0814cf53 | [] | no_license | EthanGe77/leetcode | 28ec2e353c0d2fddcb3bfb1e5a7eb2026b3ddf2c | 035bf3ce35db7c017d35af738051946d41d53bd6 | refs/heads/master | 2020-03-25T16:28:00.154603 | 2018-08-17T03:19:36 | 2018-08-17T03:19:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 405 | py | class Solution:
def maxProfit(self, prices):
"""
:type prices: List[int]
:rtype: int
"""
max_profit = 0
min_price = float('inf')
for price in prices:
min_price = min(price, min_price)
max_profit = max(price - min_price, max_profit)
... | [
"tiandi5001@gmail.com"
] | tiandi5001@gmail.com |
6ca2bbf6b78164b49efef1c8299f581a5cb27dc7 | d932ca0f4197aec1a8d3f5cbfb287e44f8d71d25 | /Ex1/IndexWriter2.py | 9a244d6572b70cb54580b900dd54da5d7b833faa | [] | no_license | roipk/InternetQueries | 7dee32f329359f14215cbd3cb4ee2efb13471556 | f674e04c5dbfce10edb17e8cb2261640e7023d2e | refs/heads/master | 2020-09-24T17:56:46.867439 | 2020-02-01T18:54:02 | 2020-02-01T18:54:02 | 225,812,357 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 23,343 | py | import os ,os.path
import operator
import re
import sys
import zlib
import shutil
import datetime
import glob
import bisect
from time import gmtime, asctime, time
import threading
class IndexWriter:
Term = ''
docId=0
indexer = []
f_tuple = []
# temp_indexer= []
maxread = 1000000000000
bl... | [
"roipk123@gmail.com"
] | roipk123@gmail.com |
81de9564e38b044ab6ab0eee03150a33f4699acb | 351d0d951dc1b1a0540f80ecf0c1b0f571f4b8e4 | /fb/subset2.py | c479c9e7b2656c47ce0a7a026b89be21c9519160 | [] | no_license | crystalbai/Algorithm | 90f5b60cce55a070feaf2657d2b344f2a1cf62c9 | 32bbf6ea81ad39a0496ca83049b72d749eda28dd | refs/heads/master | 2021-01-19T20:55:38.838001 | 2017-11-10T22:20:56 | 2017-11-10T22:26:31 | 101,240,259 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,085 | py | class Solution(object):
def subsetsWithDup(self, nums):
"""
:type nums: List[int]
:rtype: List[List[int]]
"""
res = []
stack = []
count = 0
nums = sorted(nums)
if nums == []:
return []
for idx, i in enumerate(nums):
... | [
"crystalbai1994@gmail.com"
] | crystalbai1994@gmail.com |
bdbb361b505221722ff6c13136870d6a8eb69f70 | c783b9fbefd42dbc4b466bd0b5d0fdcf3ad40a09 | /test/test_content.py | 6e04c6adf51b438d3de1fa1e0f9198051ca77eda | [
"Apache-2.0"
] | permissive | esper-io/esper-client-py | 5fb6c86e2d5fe538b6dc51a9c50f90f6fcd86623 | 76d42d8f90376c1fbfa85a10738aa47ecffcb43f | refs/heads/master | 2021-12-28T09:22:07.224763 | 2020-10-27T11:50:26 | 2020-10-27T11:50:26 | 178,143,868 | 8 | 6 | null | 2021-12-21T02:11:09 | 2019-03-28T06:51:27 | Python | UTF-8 | Python | false | false | 1,211 | py | # coding: utf-8
"""
ESPER API REFERENCE
OpenAPI spec version: 1.0.0
Contact: developer@esper.io
---------------------------------------------------------
Copyright 2019 Shoonya Enterprises Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the Li... | [
"travis@travis-ci.org"
] | travis@travis-ci.org |
e11afd3d83f7d4604abd7d1b30cda714dee6ced0 | a5a254450d21336176596a255b885d32ee7d5ccd | /小作业/新数码管.py | afabab95269835c8399d36577f6c12fd767905eb | [] | no_license | BrandonSherlocking/python_document | 1d072869ea4ef6da245ceb9fda0b39d5a0a045cd | 2a6e90a1266129cc497227ac035c1e649fd1cf2d | refs/heads/master | 2021-09-10T06:23:21.262776 | 2018-03-21T13:41:10 | 2018-03-21T13:41:10 | 114,750,483 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,642 | py | import turtle
import datetime
def drawGap(): # 绘制数码管间隔
turtle.penup()
turtle.fd(5)
def drawLine (draw): #绘制单条数码管
drawGap()
turtle.pendown() if draw else turtle.penup()
turtle.fd(40)
drawGap()
turtle.right(90)
def drawDigit(d): #根据数字绘制数码管
drawLine(True) if d in [2, 3, 4, 5, 6, 8,... | [
"32945389+BrandonSherlocking@users.noreply.github.com"
] | 32945389+BrandonSherlocking@users.noreply.github.com |
785f508bf9e774ea47eac235ca5f734b06f14816 | 0989fa233dcbf04eb43d64b697b63fd840fdbf1a | /challenge/users/apps.py | efa3316edae3374ddbeaf9f0a1cbdb34cfd6c2a3 | [
"MIT"
] | permissive | ramses132/spaceag-challenge | 5c52343d114be43db58d019a562089f7eedf29c3 | 88c7a13159a4990578f7f1f5922a7c92dfde5a30 | refs/heads/master | 2020-05-29T10:42:32.490612 | 2019-05-28T22:23:04 | 2019-05-28T22:23:04 | 189,100,194 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 316 | py | from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class UsersConfig(AppConfig):
name = "challenge.users"
verbose_name = _("Users")
def ready(self):
try:
import challenge.users.signals # noqa F401
except ImportError:
pass
| [
"yugo132@gmail.com"
] | yugo132@gmail.com |
47fad72d32586238467bdac82d38489bbc466204 | 140f9d56b61f2d4039b25c5dfdf2e12fbd0f63c7 | /index.py | e2548e3bc4165b3f7a466824f1d2a0bcc4986535 | [] | no_license | Daniel823/Curtain-Client-Service | 52c2398baf39c856af211387fbf09b90c100bfd2 | 6397e2f98b3ea08a6da5f28902cc5fa129affe59 | refs/heads/master | 2021-06-16T23:12:04.697834 | 2017-06-12T00:21:16 | 2017-06-12T00:21:16 | 78,909,034 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 934 | py | from flask import request
from flask_api import FlaskAPI, status, exceptions
import json
from modules import MicroController as mc
app = FlaskAPI(__name__)
@app.route("/state", methods=['GET'])
def get():
"""
GET : returns the item state with 2** status code
4**, 5** accordingly if MicroControll... | [
"dglownia222@gmail.com"
] | dglownia222@gmail.com |
09ca4311b850a02645ba1503d9cbaca749e9c2ea | 51aa2894c317f60726fe9a778999eb7851b6be3e | /140_gui/pyqt_pyside/examples/Advanced_Python_Scripting/012_Drag&Drop/dnd_widget4.py | 50f0cec7ae49887d6c1460a7af19a8b442432336 | [] | no_license | pranaymate/Python_Topics | dd7b288ab0f5bbee71d57080179d6481aae17304 | 33d29e0a5bf4cde104f9c7f0693cf9897f3f2101 | refs/heads/master | 2022-04-25T19:04:31.337737 | 2020-04-26T00:36:03 | 2020-04-26T00:36:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,005 | py | import sys
import os
from PySide.QtCore import *
from PySide.QtGui import *
class listWidgetClass(QListWidget):
def __init__(self):
super(listWidgetClass, self).__init__()
self.setWindowFlags(Qt.WindowStaysOnTopHint)
self.setDragDropMode(QAbstractItemView.DropOnly)
def dropEvent(self,... | [
"sergejyurskyj@yahoo.com"
] | sergejyurskyj@yahoo.com |
deab0f26117f1606730c127176a5eceee3776576 | 3d16202d11a98bd50d54ec8236ee0e079ec35da6 | /9-5 (extra).py | 10d7384336ae4a31b80c0022a21b8b80f8cccb43 | [] | no_license | jamanddounts/Python-answers | bb0da904ab57c488e3cf7cc54d8c123326f32bcf | fa0bce3d9651d9d9722ebc8fc02e2aa3278db9a9 | refs/heads/main | 2023-06-03T22:46:41.923420 | 2021-06-22T05:14:00 | 2021-06-22T05:14:00 | 376,573,705 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 78 | py | a = [5, 3, 12, 8, 2]
total = 0
for x in a:
total = total + x
print(total)
| [
"noreply@github.com"
] | jamanddounts.noreply@github.com |
39a26a47928be7c60e106a75ebbbc7a20eb8a1bb | d21ffb9b177488a95f3b4253960efcc17bcf987c | /scrapy_redis_cricket_data/scrapy_redis_cricket_data/spiders/scr.py | d73dc90efbb7b30ed91e088bc2f1b468cf6bbe9d | [] | no_license | syedissaq/scrapy-py | 28793c1b32c510032fb67090cd3716fd62aa6331 | 57efe69892a6d81b7fec1a90308b1de6b803159e | refs/heads/master | 2021-01-22T01:34:11.401885 | 2015-02-24T21:09:25 | 2015-02-24T21:09:25 | 31,256,826 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 16,415 | py | # -*- coding: utf-8 -*
import redis
pool = redis.ConnectionPool(host='localhost', port=6379, db=0)
r = redis.Redis(connection_pool=pool)
import scrapy
from scrapy_redis_cricket_data.items import CricketrecurItem
# result=r.lpop("url:l:1:day:cr")
# for i in range(0,3000):
# result=r.lpop("url:l:1:day:cr")
l=[]
for i... | [
"syed@trialx.com"
] | syed@trialx.com |
457e7c36a29b2a48a9368e843ecb6c32c5c017bc | 737005e8145d7aa961cb8012f0da3129ddf13907 | /venv/Scripts/easy_install-3.8-script.py | 9c68114b00924f9de03c46816d3396cc071492eb | [
"Apache-2.0"
] | permissive | Architect0711/rbWebCrawler | b61a53b6336ff77c203f781a1727187f49013e71 | f331ddfe8e8cc0ea7458a0e4fbcc9ca500ab4d02 | refs/heads/master | 2021-05-22T17:37:58.560070 | 2020-08-08T10:52:56 | 2020-08-08T10:52:56 | 253,024,317 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 458 | py | #!E:\Develop\Python\10_Work\rbWebCrawler\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==40.8.0','console_scripts','easy_install-3.8'
__requires__ = 'setuptools==40.8.0'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw... | [
"R.Bantele@live.de"
] | R.Bantele@live.de |
2f9976e9ae634c5d370e0a45e4484a9c63e7d363 | 1c81afc8e8eb19bd51114c87c0f15742861aa29f | /stack-and-queue/linked_list_stack.py | c948cea8162d782a4648555d38df23cc601a304d | [] | no_license | ShaneKoNaung/Python-practice | 4489b0dbf8b8146926bcdbbaa26b4149c24ed4dd | 9994644eebd0e2eb031c61ef8c0a592b65334f99 | refs/heads/master | 2020-03-12T10:30:06.778739 | 2018-11-10T18:22:02 | 2018-11-10T18:22:02 | 130,574,389 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,171 | py | ''' Implementation of stack using singly linked list '''
class LinkedListStack(object):
class Node(object):
def __init__(self, data, next=None):
self._data = data
self._next = next
def __init__(self):
''' create an empty stack '''
self._head = None
sel... | [
"shanekonaung@gmail.com"
] | shanekonaung@gmail.com |
f66d3100182358ac9c2158b8dc78e3cbc7e0093f | 39fa403d46a4456a07c761e1aaa8af2d418c5f87 | /kid_readout/roach/tests/test_roach1_baseband_loopback.py | e0c4ee787ddb500843be8ccc22da12ad8c68f502 | [
"BSD-2-Clause"
] | permissive | vapor36/kid_readout | 72d94d96e964d6a2eef3aa57ed6fc814946cfe46 | 07202090d468669200cab78297122880c1c03e87 | refs/heads/master | 2020-12-12T13:32:47.267337 | 2018-11-11T15:36:40 | 2018-11-11T15:36:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 787 | py | """
This module runs tests on the ROACH1 in baseband mode using loopback.
"""
from kid_readout.roach.baseband import RoachBaseband
from kid_readout.settings import ROACH1_IP, ROACH1_VALON, ROACH1_HOST_IP
from kid_readout.roach.tests.mixin import RoachMixin, Roach1Mixin, BasebandSoftwareMixin, BasebandHardwareMixin
# T... | [
"daniel.isaiah.flanigan@gmail.com"
] | daniel.isaiah.flanigan@gmail.com |
5e53b05ff14e2d58b75629214e71f2d22aff575e | a43dbdcf0b954b930df2a1145572b079841ff9e8 | /app/models/follow.py | 8d77e1a27d93c3d05f5f1ae05ca96a14d09e06fd | [] | no_license | geekhub-python/flask-geekhub-app | 134489351c4752bb448b62f18cf1353b1d1b9fa1 | fbfdba440fe5f27a44a4b87af35f0a5fc74c3752 | refs/heads/master | 2021-01-19T08:49:37.955233 | 2017-04-13T15:07:52 | 2017-04-13T15:07:52 | 80,143,711 | 0 | 0 | null | 2017-04-13T15:07:48 | 2017-01-26T18:45:48 | Python | UTF-8 | Python | false | false | 395 | py | from datetime import datetime
from app import db
class Follow(db.Model):
__tablename__ = 'follows'
follower_id = db.Column(db.Integer, db.ForeignKey('users.id'),
primary_key=True)
followed_id = db.Column(db.Integer, db.ForeignKey('users.id'),
primary... | [
"evgeniy.kostenko@ardas.biz"
] | evgeniy.kostenko@ardas.biz |
e12555003b1c9d9e87173316a47f5cf4d6169589 | a995a9ae2d3167aa1fbad7b811703c7face4f953 | /tests/cc-simple-status-test.py | bb45c5e3fb04493d2edc9f036f334d5a92d0a633 | [] | no_license | carlasouza/nimbus | 129ab3af1356b1dea022a557cdc199be9b53c628 | 73ffda057fec82d6220d3fda437ed2934c2c757a | refs/heads/master | 2021-01-17T16:18:22.995431 | 2011-08-08T13:23:09 | 2011-08-08T13:23:09 | 1,764,362 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,240 | py | #!/usr/bin/env python
import pexpect
import sys
import os
to=90
cc_home=os.environ['CLOUD_CLIENT_HOME']
logfile = sys.stdout
cmd = "%s/bin/cloud-client.sh --transfer --sourcefile /etc/group" % (cc_home)
(x, rc)=pexpect.run(cmd, withexitstatus=1)
cmd = "%s/bin/cloud-client.sh --run --name group --hours .25" % (cc_ho... | [
"bresnaha@mcs.anl.gov"
] | bresnaha@mcs.anl.gov |
53cf879fbec8518512026b768481999b0d969d96 | c10121b33f2c2e2f5abe1499691d5d0cb18219ba | /lessons/ex24.py | fd66509dedbaeb6456ecaa35f20fbb1543993e5f | [] | no_license | denver/learn_python | 9782b9d42c895b56700149574daba03719605148 | 7dfc21ca52e8dbfe1e588da84f63727ee29e3661 | refs/heads/master | 2020-04-10T10:04:20.324942 | 2015-10-17T18:46:25 | 2015-10-17T18:46:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 947 | py | print "Let's practice everything."
print 'You\'d need to know \'bout escapes with \\ that do \n newlines and \t tabs.'
poem = """
\tThe lovely world
with logic so firmly planted
cannot discern \n the needs of love
nor comprehend passion from intuition
and requires an explanation
\n\t\twhere there is none.
"""
print "... | [
"denver.peterson@gmail.com"
] | denver.peterson@gmail.com |
3377c6bcf64f155261ced7e78bdd30f65820bd87 | c8c8244540b38f1ece905ce3de3545f1d57b7959 | /genral_ledger/wizard.py | 688f372aa91563a8f3c3e44683f4f8738863da7d | [] | no_license | nayyabecube/naseem2 | e8e47f02db7ef3fd4d8add3e6d57b96ad1ba0e24 | f068b8c10e0fc6b3684df3fe30d90c1e61c3580c | refs/heads/master | 2020-03-13T21:48:07.940113 | 2018-05-21T06:45:38 | 2018-05-21T06:45:38 | 131,304,228 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,552 | py | # #-*- coding:utf-8 -*-
# ##############################################################################
# #
# # OpenERP, Open Source Management Solution
# # Copyright (C) 2011 OpenERP SA (<http://openerp.com>). All Rights Reserved
# #
# # This program is free software: you can redistribute it and/or modify
# ... | [
"nayyabzakir@yahoo.com"
] | nayyabzakir@yahoo.com |
6bc9dba587e6051b86abf1f854913e32e47c7c28 | 13fefcfe7a5630b8e932ae6753f5c03f8a74af0c | /projects/models.py | 3fc3ab45231bd9a8b0f41aa8be3b1b202c8e841d | [] | no_license | richardkefa/portfolio-v2 | 13d7a023a6234b40b40735f5d391c66036af5366 | d5deac021696818847e8cfabefcec40e2f9aea1e | refs/heads/master | 2023-01-08T08:23:26.221291 | 2020-11-04T18:47:59 | 2020-11-04T18:47:59 | 302,455,591 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 392 | py | from django.db import models
# Create your models here.
class Projects(models.Model):
project_name = models.CharField(max_length=50)
description = models.TextField()
live_link = models.CharField()
def __str__(self):
return self.project_name
def save_project(self):
self.save()
def get_... | [
"richardkefa@gmail.com"
] | richardkefa@gmail.com |
f56818e23f2bd45bc5839c78bc9674b23868bf08 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02266/s056648532.py | f2de9d1bca9251b46a0e6d7f9e65066fcf09a8b5 | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 842 | py | def Main():
cross = input().replace("\n", "")
S = list()
V = list()
ans = list()
for i in range(len(cross)):
r = cross[i]
if r == "\\":
S.append(i)
elif r == "/":
if len(S) > 0:
j = S.pop()
v = i - j
V... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
3e049f289d8410ab81abac59a1ecb1be149fb523 | 9432dcda5c6fd0571f74162fa5687be58a00a248 | /alpha_tictactoe/minmax.py | b2865bb60a794211e61eba7163b9ac2367d8f516 | [] | no_license | chickensouple/experiments | a6542fafbff342cd202ef96439236d50b39a9e0d | f991450cf50acc376d9d3eb17055c9c58302724b | refs/heads/master | 2023-01-06T22:00:02.766157 | 2022-12-31T04:18:26 | 2022-12-31T04:18:26 | 256,374,656 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,433 | py | import numpy as np
import copy
import time
from tree import Tree
from game_base import GameBase, GameActor
class MinMaxNodeState(object):
def __init__(self,
game_state,
minmax_value,
optimal_action):
self.game_state = game_state
self.minmax_value = minmax_value
self... | [
"clarkjzhang@gmail.com"
] | clarkjzhang@gmail.com |
c4279ed4636a7808995cb9c91e67c70e46376f65 | 827f75462d8f78abc416128e33ee25f278606e18 | /Program_Python_code/23-1.py | 267ca920e97863a62772af5da82284ce953d6b3e | [
"MIT"
] | permissive | skyhigh8591/VocationalTraining_LearningCode | 5a2573933a9a290195987b6580702105263cc67c | 5f3c0f11874618919002126863772e0dd06a1072 | refs/heads/master | 2022-12-13T20:14:28.316342 | 2020-09-09T02:15:14 | 2020-09-09T02:15:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 220 | py | #! /usr/bin/python
#coding=utf-8
#1+2+3+4+5
num = raw_input("enter your number")
num = int(num)
count = 0
i=0
while(i<num):
i=i+1
print "The number is:", i
count = count + i
print "the total is:", count
| [
"64904057+skyhigh8591@users.noreply.github.com"
] | 64904057+skyhigh8591@users.noreply.github.com |
3f1d6aa410869608d311f71a17fe4210bdfa1701 | bd33b915ef5fb5fbe02b87d66e0a1fe10646cdaf | /simplified_scrapy/core/mongo_urlstore.py | 29afa7919e966b89c2d36c986aa318b236e68e77 | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] | permissive | yiyedata/simplified-scrapy | 40bef5ce79b8984684c176a6c1f956d30992257b | ccfdc686c53b2da3dac733892d4f184f6293f002 | refs/heads/master | 2022-07-09T12:54:11.432652 | 2021-04-23T13:36:51 | 2021-04-23T13:36:51 | 201,045,344 | 9 | 5 | Apache-2.0 | 2022-06-24T14:23:17 | 2019-08-07T12:24:15 | Python | UTF-8 | Python | false | false | 3,944 | py | #!/usr/bin/python
#coding=utf-8
from pymongo import MongoClient
import json,random
import sys
from simplified_scrapy.core.utils import printInfo,convertUrl2Int,md5
from simplified_scrapy.core.urlstore_base import UrlStoreBase
class MongoUrlStore(UrlStoreBase):
_host = '127.0.0.1'
_port = 27017
_dbName = 'python_... | [
"3095069599@qq.com"
] | 3095069599@qq.com |
a64cef6dfb5dcbe9331ca1a2c6dc875356ae9737 | 3a0b8643b9156c843b88b43b8630ab0e8e634331 | /model/lstm_crf_cnn.py | a314065667294375bb357b0e68a3a5bdd24652a9 | [] | no_license | jmfveneroso/sequence_tagging | 643143135c36a2acce8331e69eb492c41d853c56 | c87d848497e2e914a7c61eba525f39c8b9891a4a | refs/heads/master | 2020-04-11T08:13:39.170501 | 2019-10-16T20:11:36 | 2019-10-16T20:11:36 | 161,636,116 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,239 | py | import numpy as np
from six.moves import reduce
import tensorflow as tf
def model_fn(features, labels, mode, params):
# For serving features are a bit different
if isinstance(features, dict):
features = ((features['words'], features['nwords']),
(features['chars'], features['nchars']))
# Re... | [
"jmfveneroso@gmail.com"
] | jmfveneroso@gmail.com |
fb025c93a260073eb1b4ac55ee12c39f2cdbd825 | eb2e28f145d468c5b021b98cf5b66da6ccb6aa96 | /cataclop/pmu/management/commands/parse.py | 82c17bc8407bd3a4303e5a7f818d8215d7697b0d | [] | no_license | pourquoi/cataclop | 7d746496c02d65616e23277b80b7e54286ef9100 | f2877cdd05447f35f14f13274ad35cc69a4cf743 | refs/heads/master | 2021-11-15T04:18:45.887279 | 2021-11-13T17:59:36 | 2021-11-13T17:59:36 | 131,906,757 | 2 | 0 | null | 2021-10-03T14:44:54 | 2018-05-02T21:16:09 | Jupyter Notebook | UTF-8 | Python | false | false | 1,714 | py | import json
import os
import datetime
import glob
from django.core.management.base import BaseCommand, CommandError
from cataclop.pmu.settings import SCRAP_DIR
from cataclop.pmu.parser import Parser
class Command(BaseCommand):
help = '''
Parse races json
eg. parse all January race from 2018:
parse "2018-01-*"
'... | [
"mathias.dusautoy@gmail.com"
] | mathias.dusautoy@gmail.com |
e013db38a0837bf7c595e87610026fddad637802 | a97db7d2f2e6de010db9bb70e4f85b76637ccfe6 | /leetcode/315-Count-of-Smaller-Numbers-After-Self.py | 31782c0230812c2c31407b198e544e68ea275922 | [] | no_license | dongxiaohe/Algorithm-DataStructure | 34547ea0d474464676ffffadda26a92c50bff29f | a9881ac5b35642760ae78233973b1608686730d0 | refs/heads/master | 2020-05-24T20:53:45.689748 | 2019-07-19T03:46:35 | 2019-07-19T03:46:35 | 187,463,938 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 292 | py | class Solution(object):
def countSmaller(self, nums):
result, seen = [], []
for num in nums[::-1]:
position = bisect.bisect_left(seen, num)
result.append(position)
bisect.insort(seen, num)
result.reverse()
return result
| [
"ddong@zendesk.com"
] | ddong@zendesk.com |
11c80e772988fc3cc861e709ea45390227d20fad | 1e6e3528c9f2438d637507df33c0c977ddc95c3e | /p4/Pi/simplePN532.py | 8a3d8218b410f96e6d0278d3f306b6cdc5aa8a49 | [
"Apache-2.0"
] | permissive | OTH-AW/isac-oth-aw | 554ec49173d4bc76d72103d29ed7af17d157b50b | 95731c373ec5f09191ebedc5488643d747970f5d | refs/heads/master | 2023-04-26T16:11:36.613332 | 2021-03-30T07:12:37 | 2021-03-30T07:12:37 | 307,342,229 | 1 | 1 | Apache-2.0 | 2021-05-12T13:21:52 | 2020-10-26T10:55:20 | Jupyter Notebook | UTF-8 | Python | false | false | 7,947 | py | import ndef
import RPi.GPIO as GPIO
import pn532.pn532 as nfc
from pn532 import *
import json
class simplePN532:
#Settings
maxBlocksUltralight = 220 #Wie viele Blocks beschrieben werden koennen auf Ultralight
allowedClassicBlocks = [1,2] #Welche Blocks beschrieben werden duerfen auf Classic
lenACB = le... | [
"noreply@github.com"
] | OTH-AW.noreply@github.com |
f5a19b1ae24ce2bf1c9805074127074515fbdd55 | 85b394a7492b6cab7ea2279e0ae1a15f86c94228 | /2019/Day4/1.py | 9ff6e5b4032f61242092302e01ed8dd1b62d1488 | [] | no_license | nanites2000/AdventOfCode | 861eb75e892f4a1c0aa9a77c5b55af8b1b815ae7 | 8d0dbf069c802539ce60861fc34549ef1b24fab8 | refs/heads/master | 2022-12-12T13:17:53.154356 | 2022-12-07T07:34:46 | 2022-12-07T07:34:46 | 226,938,173 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 733 | py | import math
min = 347312
max = 805915
def split_num(value):
result = []
for i in range(5,-1,-1):
divisor = 10**i
digit = (math.floor(value/divisor))
result.append(digit)
value -= divisor * digit
return(result)
total = 0
for i in range(min,max+1):
digits = (split_num(... | [
"gerrit.larsen@fortemtech.com"
] | gerrit.larsen@fortemtech.com |
b953669bd0d43e3eacdaee7ddec7bf3971f504a9 | 5696212aeb2a52ebd09e7514eab00c273190b9b3 | /graph_components.py | 1db20b4a8c4d7309d300e0e0eaecb4820b5ab88d | [] | no_license | n0skii/problem_solving | 01cce66d0b503f66d1302bd20e666034218c6400 | afd1ee2a790b7f9fd92b2d4b93f7bbf07a127043 | refs/heads/master | 2023-08-01T14:55:24.389499 | 2021-09-16T10:07:51 | 2021-09-16T10:07:51 | 396,303,576 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,309 | py | #!/bin/python3
from ast import fix_missing_locations
import math
import os
import random
import re
import sys
#
# Complete the 'componentsInGraph' function below.
#
# The function is expected to return an INTEGER_ARRAY.
# The function accepts 2D_INTEGER_ARRAY gb as parameter.
#
class Cluster:
def __init__(self, c... | [
"pavel070900@gmail.com"
] | pavel070900@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.