blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 288 | content_id stringlengths 40 40 | detected_licenses listlengths 0 112 | license_type stringclasses 2
values | repo_name stringlengths 5 115 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 684
values | visit_date timestamp[us]date 2015-08-06 10:31:46 2023-09-06 10:44:38 | revision_date timestamp[us]date 1970-01-01 02:38:32 2037-05-03 13:00:00 | committer_date timestamp[us]date 1970-01-01 02:38:32 2023-09-06 01:08:06 | github_id int64 4.92k 681M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 22
values | gha_event_created_at timestamp[us]date 2012-06-04 01:52:49 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[us]date 2008-05-22 07:58:19 2023-08-21 12:35:19 ⌀ | gha_language stringclasses 147
values | src_encoding stringclasses 25
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 128 12.7k | extension stringclasses 142
values | content stringlengths 128 8.19k | authors listlengths 1 1 | author_id stringlengths 1 132 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6f686e08a7cefc2451681d1601521582f55624d6 | 25bf4f39762b4fa0e249c7fc85681368f3d49573 | /test/test_Util/test_param_util.py | 1192a531afea3ec6ae4b61d9bc1d83481660a6f2 | [
"MIT"
] | permissive | linan7788626/lenstronomy | ca740c25c717f2b674903039d582f283f29fb07e | dc9b4651a5b530e659048fd1a65c9955720b40cd | refs/heads/master | 2021-05-04T20:43:20.442654 | 2018-01-31T07:20:52 | 2018-01-31T07:20:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,180 | py | import numpy as np
import pytest
import numpy.testing as npt
import lenstronomy.Util.param_util as param_util
def test_cart2polar():
#singel 2d coordinate transformation
center = np.array([0,0])
x = 1
y = 1
r, phi = param_util.cart2polar(x,y,center)
assert r == np.sqrt(2) #radial part
asse... | [
"simon.birrer@pyhs.ethz.ch"
] | simon.birrer@pyhs.ethz.ch |
81808de5af7f87fb82b724de12996ceca4290f0e | 9968b58abae0639df4233a038a89fe9c872e141b | /examples/02plot/misc/candidates.py | 6fc2a6d2ebb944641a482eaaeb3b91d143d4bc9f | [] | no_license | podhmo/utatane | 5dffa1df6fd4c63a7ddd4075c73c67a18a864c52 | c38a2615fe89efb163651ef3f764144a0cb902cf | refs/heads/master | 2021-01-01T16:46:31.487204 | 2017-08-07T01:47:07 | 2017-08-07T01:47:07 | 97,915,447 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 970 | py | import matplotlib
matplotlib.use("Agg") # NOQA
from matplotlib import pyplot as plt
from utatane import subplot
from collections import defaultdict
def defined_with(mro, name):
owner = None
for cls in mro:
if not hasattr(cls, name):
return owner
owner = cls
with subplot(plt, nco... | [
"ababjam61+github@gmail.com"
] | ababjam61+github@gmail.com |
2c3781633d95f44eb76888ed600cf855f5ba9f03 | 55c250525bd7198ac905b1f2f86d16a44f73e03a | /Python/Games/Making Games with Python & Pygame/drawing.py | 5c043ef052eeaf031e33696603e08f84f5db5f16 | [] | no_license | NateWeiler/Resources | 213d18ba86f7cc9d845741b8571b9e2c2c6be916 | bd4a8a82a3e83a381c97d19e5df42cbababfc66c | refs/heads/master | 2023-09-03T17:50:31.937137 | 2023-08-28T23:50:57 | 2023-08-28T23:50:57 | 267,368,545 | 2 | 1 | null | 2022-09-08T15:20:18 | 2020-05-27T16:18:17 | null | UTF-8 | Python | false | false | 129 | py | version https://git-lfs.github.com/spec/v1
oid sha256:c80352eee128cec2e7813b952de0835d4a061ca8607f2b1e31c472e8244844a3
size 1219
| [
"nateweiler84@gmail.com"
] | nateweiler84@gmail.com |
38b6c08a4a112060d351a0e66345401a44d57378 | 94e2d1fba52b0d8f93c99bdb6a5f58c7de15b842 | /userhandler/migrations/0003_userpersonal_verified.py | da523e58862f39f03c8837457a013b0705f1a6e0 | [] | no_license | hks74123/covidhelpmain | 023b0cfe7c3cb140b2d68a3fbab6e695e6d9c6af | ee96d0b157cd048d2ea27865bf98551186dead98 | refs/heads/main | 2023-04-26T16:16:39.029555 | 2021-05-24T19:25:12 | 2021-05-24T19:25:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 399 | py | # Generated by Django 3.2.3 on 2021-05-20 21:00
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('userhandler', '0002_auto_20210521_0227'),
]
operations = [
migrations.AddField(
model_name='userpersonal',
name='ver... | [
"experimentallyf@gmail.com"
] | experimentallyf@gmail.com |
94b858cec97d32e847d9187305d9f1873514aad8 | 9b50b3a7dda2711c5665909f6801249de53e70f6 | /0x0C-python-almost_a_circle/tests/test_base.py | 448df3af8b02c58fed9730cc03782f0cede681df | [] | no_license | nikolasribeiro/holbertonschool-higher_level_programming | 3119e5442887f06da104dc8aa93df371f92b9f2b | 7dcdf081d8a57ea1f5f6f9830555f73bf2ae6993 | refs/heads/main | 2023-04-21T05:22:03.617609 | 2021-05-05T11:38:51 | 2021-05-05T11:38:51 | 319,198,337 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,600 | py | #!/usr/bin/python3
""" Module test_base"""
import os
import unittest
from models.base import Base
from models.rectangle import Rectangle
from models.square import Square
class TestBase(unittest.TestCase):
""" class TestBase """
def test_normal(self):
""" function test_normal """
self.base ... | [
"nikolasribeiro2@outlook.com"
] | nikolasribeiro2@outlook.com |
130bcaa32fbf9c16da199ad5238345639327879b | f63db957cb63b3a37642d138d3092f8f897d6a53 | /hila_webapp/hila/auth/backends.py | 0798c740954b2d325558900ec384d44bc418ee65 | [] | no_license | fillarikanava/old-fillarikanava | c6fd819f95e675e6eddc674e71528c798b391967 | 8dbb89ea34c2aa98450e403ca2d7f17179edff8d | refs/heads/master | 2021-01-13T02:30:01.501771 | 2013-10-03T16:26:13 | 2013-10-03T16:26:13 | 13,201,013 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,916 | py | '''
Created on 1.4.2009
@author: jsa
'''
from django.contrib.auth.models import User
from hila import roundup_utils
from roundup.password import Password
db = roundup_utils.db()
class RoundupUser(User):
def __init__(self, usernode):
super(RoundupUser, self).__init__(
id=usernode.id,
... | [
"rkarhila@iki.fi"
] | rkarhila@iki.fi |
55b64b2105130f31d48bc584c5a9ac1ab6655c83 | a80963fbac8c0edcef5b1b9bad67a4b5913cd569 | /web_data/check_profanity.py | 9cd251c833e6d6947acdfb9a3506e0d327f4f3c6 | [] | no_license | manurp/Python_programs | 946877caf93a2ff0239c68dc4e8e02c72fe6f156 | 1a0c896b05b72afee7a48dd1bc2bef2aa7ffe0af | refs/heads/master | 2020-06-28T01:22:59.140092 | 2018-09-01T17:03:18 | 2018-09-01T17:03:18 | 97,080,367 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 641 | py | import urllib.request, urllib.parse, urllib.error
def check_profanity(text):
connection = urllib.request.urlopen('http://www.wdylike.appspot.com/?q='+text)
output = connection.read()
print(output)
connection.close()
def read_text():
fhand = open('file.txt')
contents = fhand.read().split()
# words = contents.sp... | [
"manojrpoojary@gmail.com"
] | manojrpoojary@gmail.com |
153479a79245d9a606054d6ec1ac2b88deffe40f | 83ed8b754703a1c9e661c90f0763bfebbc0f2606 | /数据处理/Brokerage/create_db.py | 4f34cf8e25321badf0c3409fc6e0102b3fe613a5 | [] | no_license | zbh123/hobby | 4ce267a20e1af7f2accd2bde8d39af269efa319b | 2215c406fe7700bf150fd536dd56823a2e4733d1 | refs/heads/master | 2021-08-02T10:31:34.683391 | 2021-07-26T07:26:16 | 2021-07-26T07:26:16 | 150,555,879 | 4 | 0 | null | 2021-07-27T07:34:28 | 2018-09-27T08:41:44 | Python | UTF-8 | Python | false | false | 2,936 | py | import MySQLdb
from sshtunnel import SSHTunnelForwarder
import time
with SSHTunnelForwarder(
("10.29.24.47", 222), # ssh IP和port
ssh_password="zts000000", # ssh 密码
ssh_username="tianyj", # ssh账号
remote_bind_address=("10.29.129.94", 3306)) as server: # 数据库所在的IP和端口
server.start()... | [
"zbh@example.com"
] | zbh@example.com |
0d45a727bc28374f7e8457cccf8c58524bade227 | d42954213667ce37a1eeadc125dc6ba1c67cf5d9 | /todoapp/todolist/migrations/0001_initial.py | d21f6b48027b9a9c184f8e38b6325c85ccb21f36 | [] | no_license | Hossain-Shah/Project | 8363f37e6557bca4fd03882b8aae7f344b8eb789 | 338e5fbdc132ea0952b02f93932031546d992d8a | refs/heads/master | 2023-08-09T12:35:01.774043 | 2023-08-05T13:05:22 | 2023-08-05T13:05:22 | 233,031,408 | 0 | 0 | null | 2020-10-13T18:22:53 | 2020-01-10T11:17:42 | Python | UTF-8 | Python | false | false | 1,342 | py | # Generated by Django 2.2.1 on 2019-10-01 16:28
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Category',
fields=[
('id', ... | [
"noreply@github.com"
] | Hossain-Shah.noreply@github.com |
ee8c450917f609d531ffc85dbe264150f66aa9ee | d9eef8dd3489682c8db41f2311e3058d1f369780 | /.history/abel-network-files/mcmc_alg_implementation_own_20180626142636.py | 056663041df5c2070817234221eb3afcb7505416 | [] | no_license | McKenzie-Lamb/Gerrymandering | 93fe4a49fe39a0b307ed341e46ba8620ea1225be | b7a7c4129d6b0fcd760ba8952de51eafa701eac3 | refs/heads/master | 2021-01-25T06:06:43.824339 | 2018-10-16T14:27:01 | 2018-10-16T14:27:01 | 93,526,515 | 0 | 0 | null | 2018-07-12T19:07:35 | 2017-06-06T14:17:47 | Python | UTF-8 | Python | false | false | 1,820 | py | # Author: Abel Gonzalez
# Date: 06/26/18
#
# Description:
# This program uses the .shp file to create a network graph where each node
# represents a census tract and the edge represents adjacency between each
# tract, usign graph-tool instead of networkx
import graph_tool.all as gt
from pathlib import Path
# Paths
da... | [
"gonzaleza@ripon.edu"
] | gonzaleza@ripon.edu |
8d70e1519b3f927b87482b6e543cdcf6457c7802 | 28d5d19196ac52d4bd60cbe5e06963dd8fd2ed74 | /etat_civil/geonames_place/tests/test_models.py | e7ad712113190310e59ed9582d5b45c388da847e | [
"MIT"
] | permissive | kingsdigitallab/etat-civil-django | a01ebea68ea205a185a36cfa76b6245d5a1df3e6 | 02bb32870dfd75d42f10189db6a527f133cbcdd6 | refs/heads/master | 2020-11-26T23:10:49.810602 | 2020-07-02T14:30:15 | 2020-07-02T14:30:15 | 229,226,182 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,640 | py | import geocoder
import pytest
from django.conf import settings
from django.db.utils import IntegrityError
from etat_civil.geonames_place.models import Place
pytestmark = pytest.mark.django_db
@pytest.mark.django_db
class TestPlace:
GEONAMES_ID = 2635167
GEONAMES_ADDRESS = "United Kingdom"
def test_save(... | [
"jmvieira@gmail.com"
] | jmvieira@gmail.com |
1dea1bd5576192e35833fe57508301a3a89aeb69 | 08176a94897588554501217f5ceb89bf8f004e63 | /galpy_cuda_demo/orbits/__init__.py | 7ae680602986aab03874a4c225e71cd40280a674 | [
"MIT"
] | permissive | jobovy/galpy_cuda_demo | 8e8f717a552a588fa7df6a2f25ff3eff8c2f083a | 3e79f3a6701721fd5d89914b2f9c144e68a72ec8 | refs/heads/master | 2020-03-30T18:23:01.791959 | 2018-10-03T02:57:58 | 2018-10-03T02:57:58 | 151,497,462 | 2 | 0 | MIT | 2018-10-04T00:15:10 | 2018-10-04T00:15:09 | null | UTF-8 | Python | false | false | 737 | py | from .CUDAOrbits import CUDAOrbits
from .npOrbits import npOrbits
def Orbits(x, y, vx, vy, mode='cuda'):
"""
Create Orbits array orbit, return Orbits instance depending on the mode
:param x: x-locations in AU
:type x: np.ndarray
:param y: y-locations in AU
:type y: np.ndarray
:param vx: x... | [
"henryskyleung@gmail.com"
] | henryskyleung@gmail.com |
fb0a1027debe02013a8d8ada8b134957351cf9e8 | 7a4ed01a40e8d79126b26f5e8fca43c8e61e78fd | /Geeky Shows/Advance Pyhton/220.Module[34]/PythonProject/Example-1.py | 9bee856020e437b89c563e04fbe4e699c04ee8c1 | [] | no_license | satyam-seth-learnings/python_learning | 5a7f75bb613dcd7fedc31a1567a434039b9417f8 | 7e76c03e94f5c314dcf1bfae6f26b4a8a6e658da | refs/heads/main | 2023-08-25T14:08:11.423875 | 2021-10-09T13:00:49 | 2021-10-09T13:00:49 | 333,840,032 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 192 | py | # Example-1.py <---- Main Module
import cal
print("Cal Module's Variable:",cal.a)
cal.name()
a=cal.add(10,20)
print(a)
print(cal.sub(20,10))
add=cal.add
print(add(4,7))
s=cal.sub
print(s(4,7)) | [
"satyam1998.1998@gmail.com"
] | satyam1998.1998@gmail.com |
7144f28804ed1051f0f61ebacd38ccfa966ca844 | 68f78e45e7cdeeaf2f9f3e8551c5bc922971a3be | /analysis/longbaseline/ch3cn_fiteach_e8.py | 7d23870c4560c80e7e9ba28d564704251679a105 | [] | no_license | keflavich/W51_ALMA_2013.1.00308.S | cdbb2b2aa569836c15fd424356d4a0778fccd2ec | 5389047e3e8adf7bcb4f91b1f4783bcc825961f6 | refs/heads/master | 2023-02-02T08:47:30.104031 | 2023-01-30T16:21:18 | 2023-01-30T16:21:18 | 44,909,889 | 3 | 12 | null | 2016-11-09T11:58:26 | 2015-10-25T12:51:54 | TeX | UTF-8 | Python | false | false | 5,040 | py | from ch3cn_fits import SpectralCube, pyspeckit, fits, u, np
import os
T=True
F=False
cubefn = '../../FITS/longbaseline/W51e8_CH3CN_cutout.fits'
if not os.path.exists(cubefn):
cube = SpectralCube.read('../../FITS/longbaseline/W51e2cax.CH3CN_K3_nat_all.image.fits')
scube = cube[:,1120:1440,2400:2760]
scube.w... | [
"keflavich@gmail.com"
] | keflavich@gmail.com |
aac340369aca6edb334b4fe4d8ece4fa11967c4b | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2151/60788/281320.py | 6778e5f7a57d954b16e2da82cdf7a01966bd5874 | [] | no_license | AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,828 | py | import copy
class Disjoint_set:
def __init__(self,n):
self.li=[[x+1] for x in range(n)]
def union(self,x,y):
index1=0
index2=0
for i in range(len(self.li)):
if x in self.li[i]:
index1=i
if y in self.li[i]:
index2=i
s... | [
"1069583789@qq.com"
] | 1069583789@qq.com |
d2cd0667277f7d6b98e2d0ac48d781ee254dc794 | 2869eb01810389ab7b64355ec189800e7b1d49b9 | /MetaCTF 2021/Crypto/hideandseek/solve.py | 6cfdd54cf61a129c4c65c01876d7a134ef749e84 | [] | no_license | Giantpizzahead/ctf-archive | 096b1673296510bddef9f284700ebdb0e76d71a7 | 5063cd2889cd300aade440429faf9c4ca68511ef | refs/heads/master | 2021-12-28T14:23:33.598960 | 2021-12-20T17:23:55 | 2021-12-20T17:23:55 | 252,905,854 | 1 | 0 | null | 2021-12-20T17:14:05 | 2020-04-04T04:11:24 | C | UTF-8 | Python | false | false | 4,606 | py | import gmpy2
import math
import itertools
with open('raw2.txt', 'r') as fin:
raw = fin.readlines()
# Predict random bits
with open('randbits.txt', 'r') as fin:
rand_bits = eval(fin.read())
curr_bit = 0
def predictrandbits(n):
global curr_bit
x = 0
good = True
for i in reversed(range(n // 32)):
x *= (2 ** 32... | [
"43867185+Giantpizzahead@users.noreply.github.com"
] | 43867185+Giantpizzahead@users.noreply.github.com |
25c0219880c40b5103c897230579f8ae55bbd1d3 | 2e682fa5f6a48d7b22b91e5d518fc28ff0fbb913 | /promoSystemProject/asgi.py | 8b2455dc7b1d3337f6fc58b37ddfa879e494bf9f | [] | no_license | Mohamed-awad/PromoSystem | 90c17d67fdac05c1652cd269b2d4b5f8015bdbb3 | 173abd9bade0524daff8c91c73d24c68d02cf4a5 | refs/heads/master | 2023-07-24T03:28:54.411511 | 2021-08-29T14:11:42 | 2021-08-29T14:11:42 | 299,772,631 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 413 | py | """
ASGI config for promoSystemProject project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('D... | [
"awadmohamed233@gmail.com"
] | awadmohamed233@gmail.com |
b80e0355fffad9d7410648f19d6a06c0bb3f39ff | 6f31a15cb73175084f2c4485d3dea0b8975b2ec9 | /egs/yomdle_zh/v1/local/prepare_lexicon.py | 3ebb52e38f4d3ce7f9cafbcc40bfb03b91006d74 | [
"Apache-2.0",
"LicenseRef-scancode-public-domain"
] | permissive | Idlak/idlak | c7cd5e6c0b02918cda85dbb2fb5c7333a789c304 | 4be6f7d951ba0d707a84a2cf8cbfc36689b85a3c | refs/heads/master | 2021-11-23T13:28:43.709163 | 2021-11-01T15:51:46 | 2021-11-01T15:51:46 | 127,285,931 | 65 | 26 | NOASSERTION | 2021-11-01T15:51:47 | 2018-03-29T12:06:52 | Shell | UTF-8 | Python | false | false | 1,634 | py | #!/usr/bin/env python3
# Copyright 2018 Ashish Arora
# Chun-Chieh Chang
import argparse
import os
parser = argparse.ArgumentParser(description="""Creates the list of characters and words in lexicon""")
parser.add_argument('dir', type=str, help='output path')
parser.add_argument('--data-dir', type=... | [
"dpovey@gmail.com"
] | dpovey@gmail.com |
090d7331f80b90bb5fcd60512140923e61e2f4ad | f9ed6d4ef53874453ff429bd67bfdc91369c5d82 | /misc/h5_stats.py | 06c8b662dca2d90920c7a3fa2f1ed56d03e87aa7 | [] | no_license | axeltidemann/propeller | 35a79464f6f0ee249c2d5e91d5e31d2fe6c08b33 | b9485f523812bf37c40404d052e05a43f6dc0799 | refs/heads/master | 2020-04-04T07:37:07.430215 | 2019-06-05T04:45:48 | 2019-06-05T04:45:48 | 39,445,622 | 5 | 1 | null | 2019-05-29T04:55:46 | 2015-07-21T13:02:33 | Python | UTF-8 | Python | false | false | 1,345 | py | # Copyright 2016 Telenor ASA, Author: Axel Tidemann
'''
Collects stats of categories.
'''
import argparse
import glob
import os
import shutil
import pandas as pd
import matplotlib
matplotlib.use('agg')
import matplotlib.pyplot as plt
import seaborn as sns
parser = argparse.ArgumentParser(formatter_class=argparse.Ar... | [
"axel.tidemann@gmail.com"
] | axel.tidemann@gmail.com |
4c37c257452df18c4aa08f338e5f08b9751c4952 | 80a3d98eae1d755d6914b5cbde63fd10f5cc2046 | /autox/autox_video/mmaction2/configs/skeleton/2s-agcn/2sagcn_80e_ntu60_xsub_bone_3d.py | 4a8ffbfc977e37ecd0bf127efd5462d57e5d6ed2 | [
"Apache-2.0"
] | permissive | 4paradigm/AutoX | efda57b51b586209e1d58e1dab7d0797083aadc5 | 7eab9f4744329a225ff01bb5ec360c4662e1e52e | refs/heads/master | 2023-05-24T00:53:37.109036 | 2023-02-14T14:21:50 | 2023-02-14T14:21:50 | 388,068,949 | 752 | 162 | Apache-2.0 | 2022-07-12T08:28:09 | 2021-07-21T09:45:41 | Jupyter Notebook | UTF-8 | Python | false | false | 2,471 | py | model = dict(
type='SkeletonGCN',
backbone=dict(
type='AGCN',
in_channels=3,
graph_cfg=dict(layout='ntu-rgb+d', strategy='agcn')),
cls_head=dict(
type='STGCNHead',
num_classes=60,
in_channels=256,
loss_cls=dict(type='CrossEntropyLoss')),
train_cfg=... | [
"caixiaochen@4ParadigmdeMacBook-Pro.local"
] | caixiaochen@4ParadigmdeMacBook-Pro.local |
c9940272738fd5a2a46479dd072d9a4990c8b199 | bec623f2fab5bafc95eb5bd95e7527e06f6eeafe | /django-gc-shared/payments/systems/forsazh.py | 05a67bfb1ea63578e3361e141481e6e5c7b25d26 | [] | no_license | riyanhax/a-demo | d714735a8b59eceeb9cd59f788a008bfb4861790 | 302324dccc135f55d92fb705c58314c55fed22aa | refs/heads/master | 2022-01-21T07:24:56.468973 | 2017-10-12T13:48:55 | 2017-10-12T13:48:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,908 | py | # -*- coding: utf-8 -*-
import re
from decimal import Decimal
from django import forms
from django.utils.functional import lazy
from django.utils.translation import ugettext_lazy as _, string_concat
from currencies.currencies import RUR
from geobase.models import Country
from payments.systems import base
from payment... | [
"ibalyko@ubuntu-server-16-04"
] | ibalyko@ubuntu-server-16-04 |
0e90c8be1d35f2c8c360430c4472a00833372326 | a8062308fb3bf6c8952257504a50c3e97d801294 | /problems/N1162_As_Far_From_Land_As_Possible.py | 10b5552d6fd60c2f0ab9b8a7512332ed2e7b0d49 | [] | no_license | wan-catherine/Leetcode | 650d697a873ad23c0b64d08ad525bf9fcdb62b1b | 238995bd23c8a6c40c6035890e94baa2473d4bbc | refs/heads/master | 2023-09-01T00:56:27.677230 | 2023-08-31T00:49:31 | 2023-08-31T00:49:31 | 143,770,000 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,097 | py | """
consider from '1' not '0'
"""
class Solution(object):
def maxDistance(self, grid):
"""
:type grid: List[List[int]]
:rtype: int
"""
n = len(grid)
stack = []
res = -1
for i in range(n):
for j in range(n):
if grid[i][j] ==... | [
"rarry2012@gmail.com"
] | rarry2012@gmail.com |
fe2afc4e27559474c454289a0f2d9f23f9d89c63 | 45614a944ffbdb75a0bef955582a722da5ce7492 | /python/udp_server.py | 02620d0743a3376499c7cbd8f12ad360b23ad43e | [] | no_license | wccgoog/pass | 1c8ab5393547634a27c7543556a75dec771a9e3d | 0ec01536ae10b3d99707002c0e726072acb50231 | refs/heads/2 | 2023-01-15T13:27:26.312648 | 2019-10-23T09:30:45 | 2019-10-23T09:30:45 | 122,595,075 | 0 | 2 | null | 2023-01-07T10:42:38 | 2018-02-23T08:38:36 | JavaScript | UTF-8 | Python | false | false | 320 | py | # -*- coding: utf-8 -*-
"""
Created on Sun Feb 11 14:53:08 2018
@author: wccgo
"""
import socket
s=socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
s.bind(('127.0.0.1',9999))
print('Bind UDP on 9999')
while True:
data,addr=s.recvfrom(1024)
print('Received from %s:%s.'%addr)
s.sendto(b'Hello,%s!'%data,addr) | [
"wcc3@sina.com"
] | wcc3@sina.com |
237fca580df650487e817d5233cd1dbf6fa66ee2 | 3de6f7f6d8497e728101c368ec778e67f769bd6c | /notes/algo-ds-practice/problems/array/kth_smallest.py | b8e24a89f9d21d12c470f70ead0f6c1325cee1e6 | [
"MIT"
] | permissive | arnabs542/interview-notes | 1fceae0cafa74ef23d0ce434e2bc8e85c4c76fdd | 65af75e2b5725894fa5e13bb5cd9ecf152a0d652 | refs/heads/master | 2023-01-03T06:38:59.410704 | 2020-10-25T06:49:43 | 2020-10-25T06:49:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 752 | py | '''
**Solution 1:**
1. Max-heapify the first k elements.
2. For every index i > k, heap.pushpop(n[i]).
3. At the end, we will have a max-heap containing the k smallest elements.
O(k + (n-k)logk)
**Solution 2:**
1. Min-heapify the whole array in O(n).
2. Call heap.pop() k times.
O(n + klogk)
**Solution 3:**
1. Call ... | [
"ajaggi@linkedin.com"
] | ajaggi@linkedin.com |
8948a012db16666753807e0753d132e0481dea7e | 6b3b965597c8f203c0232af19b4f4cd5962699c4 | /src/motan/android_vulnerabilities/invalid_server_certificate/invalid_server_certificate.py | 704cd996c4365579e163f3ddd5795ebce2251d7b | [
"MIT"
] | permissive | cqr-cryeye-forks/motan | 8167060cfabfc6a218fc76eceb439ee8e82257ba | 7687cf23842ac0ddbd0e11efa7788670d4d220c0 | refs/heads/master | 2023-08-15T21:07:00.369536 | 2021-10-22T12:46:42 | 2021-10-22T12:46:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,408 | py | #!/usr/bin/env python3
import logging
import os
from typing import Optional, List
from androguard.core.analysis.analysis import MethodAnalysis
from androguard.core.bytecodes.dvm import EncodedMethod
import motan.categories as categories
from motan import vulnerability as vuln
from motan.analysis import AndroidAnalys... | [
"gabriel@claudiugeorgiu.com"
] | gabriel@claudiugeorgiu.com |
e9de33ecda71093ff5047338a10ffb1936155a4b | 781e2692049e87a4256320c76e82a19be257a05d | /all_data/exercism_data/python/meetup/24bbef018bfa4ae6a84c2b8e3373973d.py | ece76266e33e9054f25f37179abb3518522019ef | [] | no_license | itsolutionscorp/AutoStyle-Clustering | 54bde86fe6dbad35b568b38cfcb14c5ffaab51b0 | be0e2f635a7558f56c61bc0b36c6146b01d1e6e6 | refs/heads/master | 2020-12-11T07:27:19.291038 | 2016-03-16T03:18:00 | 2016-03-16T03:18:42 | 59,454,921 | 4 | 0 | null | 2016-05-23T05:40:56 | 2016-05-23T05:40:56 | null | UTF-8 | Python | false | false | 2,880 | py | from datetime import date, timedelta
class MeetupDayException(Exception):
pass
def _normalize_ordinality(ordinality):
''' Maps inputs like "third" and "1st" to values we can deal with '''
mappings = {
'1st': '1',
'first': '1',
'2nd': '2',
'second': '2',
'3rd': '3... | [
"rrc@berkeley.edu"
] | rrc@berkeley.edu |
47d6c70ccdd47afa280e1e3ca4fd576780a18f33 | 627628700ac9eb3b855fdbf5724d44728dce0b63 | /python/spaceinvaders.py | 685ef9f6a82ca98705cece133c2617631dc1439f | [] | no_license | mn113/codewars-solutions | ffa6f9967f43dd58e00282b04aeb73c65d89747f | f41c93aa16d820d2a4a267b7aa7881323ab8bf46 | refs/heads/master | 2021-01-13T09:52:02.007767 | 2020-06-05T16:58:45 | 2020-06-05T16:58:45 | 69,618,778 | 10 | 2 | null | null | null | null | UTF-8 | Python | false | false | 3,344 | py | def blast_sequence(aliens, player):
return Game(aliens, player).run()
class Game(object):
def __init__(self, aliens, player):
# Wrap each cell in array:
self.aliens = [[[a] if abs(a) > 0 else [] for a in r] for r in aliens]
self.player_x = player[1]
self.player_y = player[0]
... | [
"recyclebing+github@gmail.com"
] | recyclebing+github@gmail.com |
40d967e4f64b55a845f8e91ffb91090ccc5aa01e | 7bededcada9271d92f34da6dae7088f3faf61c02 | /pypureclient/flashblade/FB_2_7/models/api_token.py | 57ed30dc74b9aad64924eb1885eeaed495b5a357 | [
"BSD-2-Clause"
] | permissive | PureStorage-OpenConnect/py-pure-client | a5348c6a153f8c809d6e3cf734d95d6946c5f659 | 7e3c3ec1d639fb004627e94d3d63a6fdc141ae1e | refs/heads/master | 2023-09-04T10:59:03.009972 | 2023-08-25T07:40:41 | 2023-08-25T07:40:41 | 160,391,444 | 18 | 29 | BSD-2-Clause | 2023-09-08T09:08:30 | 2018-12-04T17:02:51 | Python | UTF-8 | Python | false | false | 3,845 | py | # coding: utf-8
"""
FlashBlade REST API
A lightweight client for FlashBlade REST API 2.7, developed by Pure Storage, Inc. (http://www.purestorage.com/).
OpenAPI spec version: 2.7
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re
import six
import typ... | [
"tlewis@purestorage.com"
] | tlewis@purestorage.com |
a6afb02780f5418e60601aa83c740eb85a13e07e | bd7d091565ba63c930351203ed912ff82461d540 | /tree_515_largestValuesPerLevel.py | 23dfe044a516310d559d478557227a2d3c61658f | [] | no_license | screnary/Algorithm_python | 6ea3ab571763b5c0a519bdb7eed64dd5b74e8a8f | 8290ad1c763d9f7c7f7bed63426b4769b34fd2fc | refs/heads/master | 2022-12-07T02:59:42.786259 | 2020-08-25T04:27:45 | 2020-08-25T04:27:45 | 258,499,984 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 919 | py | # class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def largestValues(self, root: TreeNode) -> List[int]:
if root is None:
return []
# init max_list
max_list = []
max_list.append(roo... | [
"screnary@qq.com"
] | screnary@qq.com |
72b11e9bf6e3be6f40f8d80e557bd486a016a2e9 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/otherforms/_prickles.py | 7b0da8887b113dba5f2d0ab69d5f213b2af264f5 | [
"MIT"
] | permissive | cash2one/xai | de7adad1758f50dd6786bf0111e71a903f039b64 | e76f12c9f4dcf3ac1c7c08b0cc8844c0b0a104b6 | refs/heads/master | 2021-01-19T12:33:54.964379 | 2017-01-28T02:00:50 | 2017-01-28T02:00:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 226 | py |
#calss header
class _PRICKLES():
def __init__(self,):
self.name = "PRICKLES"
self.definitions = prickle
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.basic = ['prickle']
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
f08d4ae3acf8695083cbbc555f751dc5040bd771 | 3ccf552a92dc78da06bcd7242ab62b3adf0c9019 | /algorithm_demo/exp_demo.py | 877817780251e1142207b47ea85518ccef039bc7 | [] | no_license | linkcheng/python_demo | a3437bd56083f04d440ae3b4d44f6bffe806dee2 | 332b75948745d66d1a74253033444a2c63fb8e51 | refs/heads/master | 2022-07-08T10:45:53.587317 | 2020-08-07T10:23:49 | 2020-08-07T10:23:49 | 52,152,418 | 2 | 1 | null | 2021-03-25T21:43:04 | 2016-02-20T12:33:20 | Python | UTF-8 | Python | false | false | 3,985 | py | #!/usr/bin/env python3
# -*- coding: UTF-8 -*
"""
给你一个字符串 s 和一个字符规律 p,请你来实现一个支持 '.' 和 '*' 的正则表达式匹配。
'.' 匹配任意单个字符
'*' 匹配零个或多个前面的那一个元素
所谓匹配,是要涵盖 整个 字符串 s的,而不是部分字符串。
说明:
s 可能为空,且只包含从 a-z 的小写字母。
p 可能为空,且只包含从 a-z 的小写字母,以及字符 . 和 *。
"""
class Solution:
def is_match(self, s: str, p: str) -> bool:
# 特殊值处理
... | [
"zheng.long@shoufuyou.com"
] | zheng.long@shoufuyou.com |
bcff14a0fc7e9a6fa5d3750e08b2ce7db4660179 | 23b333449524887594530f73c0079ce60cb8eefb | /python_module/examples/340_Longest_Substring_with_At_Most_K_Distinct_Characters.py | 9bf96f58a4f7a28334865e8030552dbcdf9c9b3e | [] | no_license | benbendaisy/CommunicationCodes | 9deb371095f5d67e260030d3d8abf211c90e7642 | 444cc502ef26810b46115797f2e26ab305a4ebdf | refs/heads/master | 2023-08-09T21:46:58.691987 | 2023-07-20T05:11:39 | 2023-07-20T05:11:39 | 27,856,438 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,188 | py | from collections import defaultdict
class Solution:
"""
Given a string s and an integer k, return the length of the longest
substring of s that contains at most k distinct characters.
Example 1:
Input: s = "eceba", k = 2
Output: 3
Explanation: The substring is "ec... | [
"benbendaisy@users.noreply.github.com"
] | benbendaisy@users.noreply.github.com |
479d98009251330b275180ead5af42146eaac085 | 8a3102e1d3ed5346a0468aafdc0413858ddc25e3 | /check.py | ac20fee4e32b946d265060c6b115a3848bdadec5 | [] | no_license | a13140120a/E_sun_bank_competition | f9bbb6a9c2ef9581cdeae46bd12102f165038685 | 5286e2d8bdb5e285bc0109233eeb2aa3368eb362 | refs/heads/master | 2023-08-11T14:23:10.438964 | 2021-09-24T05:51:00 | 2021-09-24T05:51:00 | 409,580,809 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 759 | py | import pickle
import matplotlib.pyplot as plt
import os
def load_pickle_file(pile_path):
with open(pile_path,'rb') as file:
pickle_file = pickle.load(file)
return pickle_file
batch_acc = load_pickle_file('./analyze/batch/acc.pickle')
batch_lr = load_pickle_file('./analyze/batch/lr.pickle')
epoch_acc ... | [
"you@example.com"
] | you@example.com |
031a0a3da8d9322431d08fee84417af102ea9749 | 9e7e9669ae912e5c3b17deff4267ebf29f32f633 | /seq/__init__.py | 8ab4e9ddd5f93f9551fbac07c408647d01f29f54 | [] | no_license | tjacek/DeepActionLearning | 2304d050986dc8dbd917a7d065b3e68fc03bf9c0 | 153ca8849c78ec265543602728ce0a104da60dcc | refs/heads/master | 2021-01-10T18:29:33.535524 | 2019-08-02T19:53:47 | 2019-08-02T19:53:47 | 40,564,155 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,905 | py | import numpy as np
import utils
class ActionGroup(object):
def __init__(self, actions):
self.actions = actions
def __len__(self):
return len(self.actions)
def __getitem__(self, key):
return self.actions[key]
def raw(self):
if(type(self.actions)==dict):
... | [
"tjacek@student.agh.edu.pl"
] | tjacek@student.agh.edu.pl |
ba68f05dcf1908bb7c1f823730e0551e1e00a52f | 8faf4780686c31588ade78ca69b3737b72857fab | /tests/python/test_while.py | 805c752709cd2dd2765e425ef2a2d072e90dbb58 | [
"MIT"
] | permissive | AnimatedRNG/taichi | 0333ce8da61debe51872ff183ba47cd0bbf56469 | f1f403042dadf8b58887431dbf7a9a661c005bb2 | refs/heads/master | 2020-08-08T06:17:23.366495 | 2019-10-08T20:31:20 | 2019-10-08T20:31:20 | 213,751,271 | 0 | 0 | NOASSERTION | 2019-10-08T20:49:48 | 2019-10-08T20:49:48 | null | UTF-8 | Python | false | false | 372 | py | import taichi as ti
def test_while():
for arch in [ti.x86_64, ti.cuda]:
ti.reset()
ti.cfg.arch = arch
x = ti.var(ti.f32)
N = 1
@ti.layout
def place():
ti.root.dense(ti.i, N).place(x)
@ti.kernel
def func():
i = 0
s = 0
while i < 10:
s += i
i +=... | [
"yuanmhu@gmail.com"
] | yuanmhu@gmail.com |
988ec595b96df9a55ca984a2c195065bc0b9b7bc | 3152fd9ec9ccd83b6e0d2ea40aa36a4b145aea2e | /part3/09_面向对象特性/hm_11_多态案例.py | 6383bd69e621871bb5e25b67ee5e824b7d626a37 | [] | no_license | derekduan1028/hm_python | cf1b6037ac1cde8dcac393453a291c39b5a936c2 | ae79f817a55d1b3bfdbdf1b50d5147946c8b7401 | refs/heads/master | 2023-01-21T00:33:00.927709 | 2020-11-27T00:00:35 | 2020-11-27T00:00:35 | 291,869,531 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 823 | py | #!/usr/bin/python
# coding:utf-8
"""
@author:derek
@contract:derek_duan@sina.com
@file: hm_11_多态案例.py
@time: 2020-10-24 22:27
"""
class Dog(object):
def __init__(self, name):
self.name = name
def game(self):
print("%s 蹦蹦跳跳。。。" % self.name)
class XiaoTianDog(Dog):
def game(self):
... | [
"derek@Derek-Mbp"
] | derek@Derek-Mbp |
f457721ccf69c25c17cde506ef7326a745186344 | 6199ab5c7d7b135c4d4020a0298c33cddcfea960 | /NanoGardener/python/framework/samples/Run2016_102X_nAODv7.py | 9b673aa310e429efad7128f4e114c7036faf2411 | [] | no_license | friccita/LatinoAnalysis | 45b353b76e3561dc43e4a6c65878813e23369d01 | 954bb150de098f9cc9e96276aca68453c6c42adf | refs/heads/master | 2022-12-27T03:47:46.553078 | 2020-10-14T15:10:32 | 2020-10-14T15:10:32 | 290,237,710 | 0 | 0 | null | 2020-08-25T14:29:39 | 2020-08-25T14:29:38 | null | UTF-8 | Python | false | false | 4,207 | py | Samples = {}
Samples["DoubleEG_Run2016B-02Apr2020_ver1-v1"] = {'nanoAOD': '/DoubleEG/Run2016B-02Apr2020_ver1-v1/NANOAOD'}
Samples["DoubleEG_Run2016B-02Apr2020_ver2-v1"] = {'nanoAOD': '/DoubleEG/Run2016B-02Apr2020_ver2-v1/NANOAOD'}
Samples["DoubleEG_Run2016C-02Apr2020-v1"] = {'nanoAOD': '/DoubleEG/Run2016C-02Apr2020-v1... | [
"lorenzo.viliani@cern.ch"
] | lorenzo.viliani@cern.ch |
c9d1dacded44e996624f8b185466fb68157b8d0a | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_74/1139.py | c78596798869e06ec2874789c7afc38cee242367 | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,618 | py | data = open('data(2).in', 'r')
testNum = int(data.readline())
for x in range(testNum):
input = data.readline().split()
heldTurns = 0
orange = 1
blue = 1
last = False #false = orange || true = blue
totalSteps = 0
turns = int(input[0])
input = input[1:]
for point in rang... | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
08cc0a8d706f7860b4a1caba53e29db55b105154 | e57a122cba8d00aac9d014a45e815063cb9f0359 | /imagepy/core/engine/report.py | 86fdd6bf79d9af6773d6ab2ed74ea11eb2e35f06 | [
"BSD-2-Clause"
] | permissive | WeisongZhao/imagepy | 9d66664578c77eb2d463de922c8d06af4f8af35a | 43cd5c4dcb9d6fefdcf11b8b9e9c0d56e11fab1e | refs/heads/master | 2020-04-25T23:44:31.304590 | 2020-01-29T06:10:26 | 2020-01-29T06:10:26 | 173,155,520 | 1 | 0 | NOASSERTION | 2019-02-28T17:21:56 | 2019-02-28T17:21:55 | null | UTF-8 | Python | false | false | 2,151 | py | # -*- coding: utf-8 -*-
"""
Created on Thu Dec 29 01:48:23 2016
@author: yxl
"""
import wx
from imagepy import IPy
from imagepy.core.manager import WidgetsManager, TaskManager, ImageManager
from imagepy.core.manager import ReaderManager, ViewerManager, TableManager
from imagepy.ui.propertygrid import GridDialog
from im... | [
"imagepy@sina.com"
] | imagepy@sina.com |
725dea3840c0a4ed9891327e89a1d202b33e6b90 | bf939848c38f0e42c163d030f273c64ba545306e | /source/migrations/0005_auto_20160531_2028.py | 4e2f2f5d3e88747507b822caf8ec691750100343 | [] | no_license | security-force-monitor/sfm-cms | 17e25f6990066ae1bf1f14783a3ad5ca176f4384 | 057039ad854a3a6703e373f7d2ec84be6af03565 | refs/heads/master | 2023-02-14T02:22:40.600997 | 2023-01-25T19:48:25 | 2023-01-25T19:48:25 | 57,247,158 | 9 | 4 | null | 2022-11-17T16:26:59 | 2016-04-27T21:00:34 | Python | UTF-8 | Python | false | false | 774 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('source', '0004_auto_20160513_2044'),
]
operations = [
migrations.RemoveField(
model_name='publication',
... | [
"eric.vanzanten@gmail.com"
] | eric.vanzanten@gmail.com |
5c767b52310fbce16a1ce44060ce7e3208459470 | ea262de505a1dd5ae1c7b546b85184309c3fdd35 | /src/models/modules/aspp.py | 1ef76d63d0bc32feb48961866576035219c35dac | [
"MIT"
] | permissive | Runki2018/CvPytorch | 306ff578c5f8d3d196d0834e5cad5adba7a89676 | 1e1c468e5971c1c2b037334f7911ae0a5087050f | refs/heads/master | 2023-08-25T09:48:48.764117 | 2021-10-15T05:11:21 | 2021-10-15T05:11:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,064 | py | # !/usr/bin/env python
# -- coding: utf-8 --
# @Time : 2020/9/15 14:27
# @Author : liumin
# @File : aspp.py
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
class _ASPPModule(nn.Module):
def __init__(self, inplanes, planes, kernel_size, padding=0, dilation=1):
... | [
"569793357@qq.com"
] | 569793357@qq.com |
595d0c4eb7364999f7be3eef043687131a208ba3 | 27317b3adb1ccd99afa86cb931d2d14e23b9b175 | /bcs-app/backend/apps/configuration/models/base.py | 254f7e997e26384e25f1311248aedd20fa4b4394 | [
"BSD-3-Clause",
"LicenseRef-scancode-unicode",
"ICU",
"LicenseRef-scancode-unknown-license-reference",
"Artistic-2.0",
"Zlib",
"LicenseRef-scancode-openssl",
"NAIST-2003",
"ISC",
"NTP",
"BSL-1.0",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"MIT"
] | permissive | freyzheng/bk-bcs-saas | cf5a6c4ab1c20959bda1362bc31de7884451acd7 | 96373cda9d87038aceb0b4858ce89e7873c8e149 | refs/heads/master | 2021-07-05T04:11:08.555930 | 2020-09-22T12:26:37 | 2020-09-22T12:26:37 | 201,279,048 | 0 | 1 | NOASSERTION | 2020-09-16T03:07:16 | 2019-08-08T14:48:27 | Python | UTF-8 | Python | false | false | 1,844 | py | # -*- coding: utf-8 -*-
#
# Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
# Copyright (C) 2017-2019 THL A29 Limited, a Tencent company. All rights reserved.
# Licensed under the MIT License (the "License"); you may not use this file except i... | [
"gejun.coolfriend@gmail.com"
] | gejun.coolfriend@gmail.com |
f2e6c14e48abbbab4103a628056f283f5f408a1c | 04ce34e125fd9957b51196f5e31c6651ae8cb0ae | /Day-2/itertools/groupby.py | 8fc08a1564dbb0e1962fdd69fc71bfdba9e59d88 | [] | no_license | morshedmasud/100_days_with_python | 403e1d34cb6cebf983295281613045c60737d8f8 | 1c90d6222835f3b105a9ba26f98e3eb7bab40b30 | refs/heads/master | 2020-03-11T19:53:33.082287 | 2018-07-03T18:41:47 | 2018-07-03T18:41:47 | 130,220,708 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 233 | py | # Go to the link to know about the problem
# https://www.hackerrank.com/challenges/compress-the-string/problem
from itertools import groupby
s = input()
for k, g in groupby(s):
print("({}, {})".format(len(list(g)), k), end=" ")
| [
"masudraj6@gmail.com"
] | masudraj6@gmail.com |
65da5795fa137a569d17f96a32989d23ac977d85 | bdb1c323968cd9d5441a187a29ed7e25a2e4f07e | /cp0/metrix/urls.py | 8a45beca0a3e6a133e38cbc258df9fb61e4a7845 | [] | no_license | liangzhaowang/automation_system | beee351dd9f09a51e2b81617ac5bee63023ea9b8 | f77ef433c2366253dc9d9fdb7c54911cb38ed3e8 | refs/heads/master | 2022-02-19T11:07:44.047000 | 2019-09-23T02:16:00 | 2019-09-23T02:16:00 | 209,732,359 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 481 | py | from django.conf.urls import url
import views as metrix_views
urlpatterns = [
# Metrix
url(r'^metrix/$', metrix_views.metrix_index),
url(r'^metrix/data/$', metrix_views.metrix_data),
url(r'^metrix/examp/(.+)/$', metrix_views.examp),
url(r'^metrix/jira_raw_data/(.+)/$', metrix_views.get_jira_raw_da... | [
"zhaowangx.liang@intel.com"
] | zhaowangx.liang@intel.com |
406e86df76bdd822048227349e4e85b27e833f25 | bb2e9401499974a3ba6a2c083eba54af301736f9 | /lectures/110opengl/gmtutorials/010triangle/gm013.py | de6246611d9ffda296a5d450738ada5d91dfa700 | [] | no_license | geofmatthews/csci480 | 69188cd6ffc5d5ed3e9d9ea9d3c98deb6988e3f2 | fc21f487b57629ecaa042447d05f83b0837edf16 | refs/heads/master | 2021-01-10T11:18:53.451056 | 2015-11-30T23:10:22 | 2015-11-30T23:10:22 | 43,301,371 | 2 | 6 | null | 2016-04-27T19:28:24 | 2015-09-28T13:06:20 | Python | UTF-8 | Python | false | false | 5,086 | py | # Add a rotation matrix
from ctypes import c_void_p
from OpenGL.GL import *
from OpenGL.GL.shaders import compileShader, compileProgram
import pygame
from pygame.locals import *
import numpy as N
# We will be sending C objects to the graphics card, so we need
# some help making sure python sends the right thing.
# ... | [
"geoffrey.matthews@wwu.edu"
] | geoffrey.matthews@wwu.edu |
c647eb211f1f09affb1fb04662ac52f8ad38bc12 | a518141ca3ba2b6fa63a7961b51936d9438ff022 | /11172 - Relational Operator.py | d328188ace2103f64e0214f15f2353ea201ea847 | [] | no_license | jlhung/UVA-Python | ec93b2c98e04c753e8356f3e4825584fae4a8663 | 7a0db4fecffd7ac4f377f93da41291a8e998ee9b | refs/heads/master | 2022-11-28T04:47:49.270187 | 2020-08-10T13:19:58 | 2020-08-10T13:19:58 | 116,969,745 | 19 | 9 | null | null | null | null | UTF-8 | Python | false | false | 171 | py | '''
20180114 jlhung v1.0
'''
n = int(input())
for i in range(n):
x, y = map(int, input().split())
if x > y:
print(">")
elif x < y:
print("<")
else:
print("=") | [
"35291112+jlhung@users.noreply.github.com"
] | 35291112+jlhung@users.noreply.github.com |
300ac82a1c4baf849884d7d2fe7cd07efe1e0f2d | bbf744bfbfd9a935bd98c7cf54152a5d41194161 | /chapter_05/e5-10_ordinal_numbers.py | cf9d01ad4c3aee9140eec1916f92707ff314803c | [] | no_license | terranigmark/python-crash-course-projects | 65a7863be2d26fe8b91ac452b12203386eb0259a | 79ed9ed8e6a1bf015990a9556689379274231d13 | refs/heads/master | 2022-12-05T21:59:00.352140 | 2020-08-21T04:59:50 | 2020-08-21T04:59:50 | 266,263,493 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 370 | py |
def main():
numbers = [number for number in range(1, 10)]
print(numbers)
for number in numbers:
if number == 1:
print(f"{number}st")
elif number == 2:
print(f"{number}nd")
elif number == 3:
print(f"{number}rd")
else:
print(f"{... | [
"linnk99@gmail.com"
] | linnk99@gmail.com |
70de302fb8ee0861e18fba202c456c1afe87f9f9 | e90a772733e73e45b4cdbb5f240ef3b4a9e71de1 | /346. Moving Average from Data Stream.py | 7d66cf03d18e6f3b8d76865f2b9725ca038acae7 | [] | no_license | jiewu-stanford/leetcode | 102829fcbcace17909e4de49c01c3d705b6e6e3a | cbd47f713d3307f900daf55c8f27301c70542fc4 | refs/heads/master | 2022-05-28T18:25:00.885047 | 2022-05-18T05:16:22 | 2022-05-18T05:16:22 | 214,486,622 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 688 | py | '''
Title : 346. Moving Average from Data Stream ($$$)
Problem : https://leetcode.com/problems/moving-average-from-data-stream/
: https://www.lintcode.com/problem/moving-average-from-data-stream/description
'''
class MovingAverage:
def __init__(self, size):
self._size = size
sel... | [
"bayernscience@hotmail.com"
] | bayernscience@hotmail.com |
3b2c4f1223e39221895f4054e2206db3288db630 | 741c5c70bf4a0adb05db6b0777c8d07e28eb9cf6 | /lib/python3.4/site-packages/IPython/nbconvert/preprocessors/tests/test_extractoutput.py | 4b2c515324994f3df53c0b8285135c1fe45333fe | [] | no_license | andybp85/hyLittleSchemer | e686d2dc0f9067562367ea1173f275e8e2d2cb85 | af5cb6adf6a196cc346aa7d14d7f9509e084c414 | refs/heads/master | 2021-01-19T07:48:31.309949 | 2015-01-04T00:57:30 | 2015-01-04T00:57:30 | 28,496,304 | 6 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,601 | py | """
Module with tests for the extractoutput preprocessor
"""
#-----------------------------------------------------------------------------
# Copyright (c) 2013, the IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with ... | [
"andy@youshallthrive.com"
] | andy@youshallthrive.com |
f099090fe0b4ffbb9c84bebdf4e60b95afc751e5 | 86b6385bc0a0cc471e4a7e288bcdbe1f287adf52 | /utils/response_object.py | 62ac58196901874f16e12c99d13a39d96e34c88d | [] | no_license | AidarTaziev/EXAMPLE_PERSONAL_SERVICES | b688340c502380971798921caa6adc432eefb807 | 509ca43f254eb1f2626374fb5e429e32a0372015 | refs/heads/main | 2023-01-13T16:50:37.286108 | 2020-11-16T08:22:48 | 2020-11-16T08:22:48 | 313,234,087 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 141 | py | from django.http import JsonResponse
def create_response_object(error, message):
return JsonResponse({'error': error, 'data': message}) | [
"you@example.com"
] | you@example.com |
e1bacd8d697526fcd796c413b95da822d193d3a9 | 11ef4bbb8086ba3b9678a2037d0c28baaf8c010e | /Source Code/server/binaries/chromium/pyproto/components/gcm_driver/crypto/proto/gcm_encryption_data_pb2.py | 320d5e4043ed8b7fe0408cfcfca9734732f3f583 | [] | no_license | lineCode/wasmview.github.io | 8f845ec6ba8a1ec85272d734efc80d2416a6e15b | eac4c69ea1cf0e9af9da5a500219236470541f9b | refs/heads/master | 2020-09-22T21:05:53.766548 | 2019-08-24T05:34:04 | 2019-08-24T05:34:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | true | 6,313 | py | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: gcm_encryption_data.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflecti... | [
"wasmview@gmail.com"
] | wasmview@gmail.com |
721879e136706a48003650b8fbd0d1770c84fa4a | b5c17b494204ed215ecfdc65932b2c960fa9e121 | /test/functional/create_cache.py | 8cac7417df6be7b4791ae67c8af9e25fabf8b543 | [
"MIT"
] | permissive | syglee7/zenacoin-ver2 | 9c8943c84b8eefad4ce3fee6ac15a9878b87f1df | 90079b95bdf0ea2b7fce644c56d2a9626526e5e4 | refs/heads/master | 2023-03-10T07:29:47.772820 | 2021-02-21T13:57:41 | 2021-02-21T13:57:41 | 340,617,557 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 796 | py | #!/usr/bin/env python3
# Copyright (c) 2016-2019 The Zenacoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Create a blockchain cache.
Creating a cache of the blockchain speeds up test execution when running
m... | [
"syglee7@gmail.com"
] | syglee7@gmail.com |
6db0e717a75b8c2e97b0faa41d5ff9342ac4dd59 | f84a247c47fbc44d2327c5fba9b66af9cbb6904d | /Code/DeNovoCompeting/applyExtreme.py | 46e1be8a3a335fec2220c7b694c54218169e4ed4 | [] | no_license | eggduzao/Costa_TfbsPrediction | e530b2e090d0a1382693a340d581c6f4aa5e441c | c47b9f8e38e3d414f06905f12aeb2c77a75ae55f | refs/heads/master | 2020-12-02T08:08:59.185158 | 2019-08-13T23:56:57 | 2019-08-13T23:56:57 | 96,719,524 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,410 | py | #################################################################################################
# Runs the pipeline for the EXTREME algorithm.
#
# The following are arguments for GappedKmerSearch.py, the word searching algorithm for the seeding:
# -l HALFLENGTH. The number of exact letters on each side of the word ... | [
"eggduzao@gmail.com"
] | eggduzao@gmail.com |
2877643adfbcb52d6cc723fbb5d42cda73d5fde7 | 910eb6e2905fd10337b67f6265d80fa975c63768 | /freenasUI/plugins/migrations/0012_auto__del_field_configuration_collectionurl__add_field_configuration_r.py | abf536b3fea706cef2d8c8abc0f79516e739887a | [] | no_license | truenas/freenas-migrate93 | b6e7a32615137677dbb20f002f0455f5ca3cf5a2 | 9cd6170fc7bf636d55b0513af794f955fb7bfbce | refs/heads/master | 2023-08-18T20:24:45.513212 | 2023-02-07T12:58:01 | 2023-02-07T12:58:01 | 77,483,696 | 1 | 0 | null | 2023-04-27T10:41:55 | 2016-12-27T21:28:51 | Python | UTF-8 | Python | false | false | 2,999 | py | # -*- coding: utf-8 -*-
from south.db import db
from south.v2 import SchemaMigration
from freenasUI.plugins.plugin import PLUGINS_REPO
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'Configuration.collectionurl'
db.delete_column(u'plugins_configuration', 'collectionur... | [
"suraj@ixsystems.com"
] | suraj@ixsystems.com |
c85075fd007feb5b4fdc25b58ff728536d490e0f | 4074db4436d5fc5fa5395de072557def620f993e | /0x05-python-exceptions/2-safe_print_list_integers.py~ | 45b48e50405d79479ecfaf25f5542b82b3a9cb0b | [] | no_license | Hunt66/holbertonschool-higher_level_programming | 49b4a93a8b565cdd588e26e6348bed5d3e9d6953 | b26f42c1d41bb24842d77bf5cf86c441bd8fcf51 | refs/heads/master | 2020-03-28T11:11:52.204554 | 2019-03-25T19:45:28 | 2019-03-25T19:45:28 | 148,187,536 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 390 | #!/usr/bin/python3
def safe_print_list_integers(my_list=[], x=0):
try:
for i in range(0, x):
print("{:d}".format(my_list[i]), end='')
print('')
return i
except ValueError:
return 0
except IndexError:
for i in my_list:
print("{:d}".format(i), en... | [
"489@holbertonschool.com"
] | 489@holbertonschool.com | |
33d87a72c879d79bfd1ceb6f6d0e13ea24c6d194 | 44dea7bd1f7fc93ce5fa3ca14c949120024ef554 | /exercise/bubble.py | 50d760b4c94e3ff3e62b4a1102edb1ad23a72292 | [] | no_license | WillGhost/op | 09b5f94401453d7abdcdf1319d7a753288b4f083 | 1685f18ba3949a23295d408bc781f07f87a1009d | refs/heads/master | 2023-08-28T05:38:59.105302 | 2023-08-24T08:56:36 | 2023-08-24T08:56:36 | 14,950,011 | 6 | 2 | null | null | null | null | UTF-8 | Python | false | false | 299 | py | #!/usr/bin/env python3
import sys
inp = sys.argv[1:]
for i in range(len(inp)):
inp[i] = int(inp[i])
def bubble(xx):
length = len(xx)
for i in range(length-1):
for j in range(length-1-i):
if xx[j] > xx[j+1]:
xx[j],xx[j+1] = xx[j+1],xx[j]
return xx
print(inp)
print(bubble(inp))
| [
"you@example.com"
] | you@example.com |
c104b0cb17230d79f8f8a4956851bd07e3ee11e2 | 9d81fb4bfac02630c0ecf36c35cc63515470961e | /demo/calculated_flow.py | f2f685fa5c857feaf9ee78b842e750e61cefb0fd | [] | no_license | lechat/jenkinsflow | d36cc20af9f03dbbc1a82af5ce1c83f6bc365f2d | 87396069dda4f0681829e5d4e264e4f09ae34131 | refs/heads/master | 2020-04-05T04:35:39.314623 | 2016-08-26T22:18:59 | 2016-08-26T22:18:59 | 10,026,420 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,959 | py | #!/usr/bin/env python
# Copyright (c) 2012 - 2015 Lars Hupfeldt Nielsen, Hupfeldt IT
# All rights reserved. This work is under a BSD license, see LICENSE.TXT.
# Demonstrate that the flow can be dynamically calculated by the script
from __future__ import print_function
import sys, os, tempfile
import logging
from co... | [
"lhn@hupfeldtit.dk"
] | lhn@hupfeldtit.dk |
2d407ed2a59369382421c860ca69164825530a1b | ccddff63d10b9bf857ff5907ed14b1be85975a47 | /test/luna/run_api_tests.py | 608e3b5b61bfe8a2b08c3aacf560e0526a124536 | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] | permissive | webosose/avoutputd | 4d9aff450acce8c62faad22c1fe10d5984993ca1 | 32fa2fc02e76be75b0943a13e8c97d43fb71abdb | refs/heads/master | 2021-03-31T01:04:56.961145 | 2018-07-09T04:49:30 | 2018-08-01T05:29:15 | 125,002,453 | 3 | 3 | null | null | null | null | UTF-8 | Python | false | false | 244 | py | #!/usr/bin/python2
import unittest
import os
if __name__ == '__main__':
testdir = os.path.dirname(os.path.realpath(__file__))
testsuite = unittest.TestLoader().discover(testdir)
unittest.TextTestRunner(verbosity=1).run(testsuite)
| [
"changhyeok.bae@lge.com"
] | changhyeok.bae@lge.com |
5aa885bbab92bb6d71a9a139107820fa31c1f3b6 | 5bfca95abf14f7bb0ff29b58b018fc9062d3f837 | /apps/first_draft/migrations/0041_auto_20171120_2256.py | 34592e123aa65322113d68d5e838de3b53506734 | [] | no_license | wdudek82/django-ogame-clone | 621afb20ea2dd3c0f2e4b93dfdd604e0628bd7b8 | 472971da826d078176a5d619b3b5cad89e3d1c5c | refs/heads/master | 2021-09-08T15:19:49.407650 | 2017-11-26T19:14:48 | 2017-11-26T19:14:48 | 124,670,158 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 619 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2017-11-20 21:56
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('first_draft', '0040_auto_20171120_2250'),
]
operations = [
migrations.Renam... | [
"wdudek82@gmail.com"
] | wdudek82@gmail.com |
68fc75e9c08edbc00449bd58859742b88ae934ec | 5dfbfa153f22b3f58f8138f62edaeef30bad46d3 | /old_ws/build/baxter_simulator/baxter_gazebo/catkin_generated/pkg.develspace.context.pc.py | 0164fbae495acd3846f2e807fea2c9e97795f147 | [] | no_license | adubredu/rascapp_robot | f09e67626bd5a617a569c9a049504285cecdee98 | 29ace46657dd3a0a6736e086ff09daa29e9cf10f | refs/heads/master | 2022-01-19T07:52:58.511741 | 2019-04-01T19:22:48 | 2019-04-01T19:22:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 437 | py | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else []
PROJECT_CATKIN_DEPENDS = "baxter_core_msgs;gazebo_ros_control;roscpp;controller_manager_msgs".replace(';', ' ')
PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" !... | [
"alphonsusbq436@gmail.com"
] | alphonsusbq436@gmail.com |
ae114df5ae9c386214f76e7cd76204f262611484 | ee3e1092daa3b8140ceea4bfef623b54302dfb6c | /core/views.py | 35017542527561aebd701de68bb91d62a9ae7655 | [] | no_license | safwanvk/craigslist | fa68a13b179f9b65ec76119448c03f93bfc845bb | 2ad79c2e6d418b5d7809871a928a24ae10e705ab | refs/heads/master | 2022-11-30T06:10:05.310661 | 2020-08-21T04:23:23 | 2020-08-21T04:23:23 | 289,067,703 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,602 | py | from urllib.parse import quote_plus
import requests
from django.shortcuts import render
from bs4 import BeautifulSoup
# Create your views here.
from . models import Search
BASE_CRAIGSLIST_URL = 'https://losangeles.craigslist.org/search/?query={}'
BASE_IMAGE_URL = 'https://images.craigslist.org/{}_300x300.jpg'
def h... | [
"safwanvalakundil@gmail.com"
] | safwanvalakundil@gmail.com |
293e1a3742444a723d6ba6b124a56450cbe4848f | 377fc6e13101a2a45826cd118110c790f396a805 | /abc098-b.py | 18748153555b09fd04b0e3e02a01bd011f6989da | [] | no_license | number09/atcoder | 4076e7223f424b9923754e73992d6442e0bb0de7 | f521ca1205b254d99744abaf6a7a5bfe69845fe0 | refs/heads/master | 2021-06-04T23:16:39.021645 | 2021-01-19T08:30:39 | 2021-01-19T08:30:39 | 132,128,927 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 197 | py | int_n = int(input())
str_s = input()
result_ar = []
for i in range(len(str_s)):
# print(str_s[:i], str_s[i:])
result_ar.append(len(set(str_s[:i]) & set(str_s[i:])))
print(max(result_ar))
| [
"cielo.abierto09@gmail.com"
] | cielo.abierto09@gmail.com |
a869f7fe8be2069a8b166e8e4e6df23fef8201c7 | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/84/usersdata/162/53871/submittedfiles/lista1.py | 1b054bc98171dfca2ac844d491d8d9aa57da965c | [] | no_license | rafaelperazzo/programacao-web | 95643423a35c44613b0f64bed05bd34780fe2436 | 170dd5440afb9ee68a973f3de13a99aa4c735d79 | refs/heads/master | 2021-01-12T14:06:25.773146 | 2017-12-22T16:05:45 | 2017-12-22T16:05:45 | 69,566,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 402 | py | n=int(input('Digite o tamanho da lista:'))
lista=[]
for i in range(1,n+1,1):
numero=int(input('Digite o número:'))
lista.append(numero)
soma=0
soma2=0
cont=0
cont2=0
for i in range(0,len(lista),1):
if lista[i]%2!=0:
cont=cont+1
soma=soma+lista[i]
else:
soma2=soma2+lista[i]
... | [
"rafael.mota@ufca.edu.br"
] | rafael.mota@ufca.edu.br |
158882e1a339bf6f2984af63cfcedd9e9c4c750e | 482b28d5680768c2e95d214a9c8b97e5c6e93191 | /project1/core python startingclasses/21.07.2018.2.py | 668431893f450270a62ad22fe48366da27a046f3 | [] | no_license | prasadnaidu1/projects | 2bf3cd0fa3b93e549775e928077e1848ac05955b | e41182a9f3c9ea46a2ac0352eac1c81fab79c08a | refs/heads/master | 2020-04-12T19:33:04.834208 | 2018-12-21T12:32:37 | 2018-12-21T12:32:37 | 155,504,638 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 315 | py | def calculate_find(enternumberofadults ,enternumberofchilds):
aduldsprice = 37555.0
childsprice = 12518.3
cost = aduldsprice + childsprice
tax = (cost * 7) / 100
discount = (cost+tax)*10 / 100
d=(aduldsprice+childsprice+tax)-discount
return d
x=input('enteradults,enter chids:')
print(x) | [
"you@example.com"
] | you@example.com |
6822c50c813c29ba240b591f977d8bd81ba30f4c | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02411/s645571797.py | e8d470430047756d2fbf592005537cd9683254d5 | [] | 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 | 311 | py | while 1:
a, b, c = map(int, input().split())
if a == b == c == -1:
break
if a == -1 or b == -1 or a + b < 30:print('F')
elif a + b >= 80:print('A')
elif a + b >= 65: print('B')
elif a + b >= 50:print('C')
elif a + b >= 30 and c >= 50:print('C')
else:print('D')
| [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
f6363026bf6685e36bc6dcd9bde036110c010a38 | cdb7bb6215cc2f362f2e93a040c7d8c5efe97fde | /C/CountPairsWithXORinaRange.py | bf199e04ea01b2a524ac620f74ff4ac3d4592251 | [] | no_license | bssrdf/pyleet | 8861bbac06dfe0f0f06f6ad1010d99f8def19b27 | 810575368ecffa97677bdb51744d1f716140bbb1 | refs/heads/master | 2023-08-20T05:44:30.130517 | 2023-08-19T21:54:34 | 2023-08-19T21:54:34 | 91,913,009 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,091 | py | '''
-Hard-
*Trie*
Given a (0-indexed) integer array nums and two integers low and high, return the number of nice pairs.
A nice pair is a pair (i, j) where 0 <= i < j < nums.length and low <= (nums[i] XOR nums[j]) <= high.
Example 1:
Input: nums = [1,4,2,7], low = 2, high = 6
Output: 6
Explanation: All nice pai... | [
"merlintiger@hotmail.com"
] | merlintiger@hotmail.com |
1c6d5333b3330a919f394f03370a64f6476f1f2a | 8a2657f276e3b9c63c8bd0ce612237d9d66d80ae | /updater/update/ratelimit.py | f724af0aaa79792c4cd22f016025f032f8255a1c | [
"BSD-3-Clause"
] | permissive | codl/status.chitter.xyz | 25d46d5f3eb1904c25492f5374d6d0aa9ad2f3d6 | 034d04df05e2741507c329f36d427b0e4e4c7585 | refs/heads/master | 2023-05-14T21:17:49.797516 | 2022-02-03T14:38:17 | 2022-02-03T14:41:38 | 131,777,102 | 1 | 0 | BSD-3-Clause | 2023-05-01T20:20:43 | 2018-05-02T00:23:44 | JavaScript | UTF-8 | Python | false | false | 1,504 | py | from redis import StrictRedis as Redis
from pathlib import Path
import hashlib
import time
lua_script_path = Path(__file__).parent / 'ratelimit.lua'
with open(lua_script_path) as f:
LUA_SCRIPT = f.read()
del lua_script_path # don't want it polluting the module
class RateLimit(object):
def __init__(self,
... | [
"codl@codl.fr"
] | codl@codl.fr |
d909f630eb3400d202f3924c5cbbe3919adb6f2c | ae65873c3584cef7139066b224daad04410af6d2 | /CodeTest.py | 2237c834df11974a47ef8e96969b150e0100c6cb | [] | no_license | rajatkashyap/Python | 2240c7472d07803c460c7a55d570e20694b694f9 | f74c85c65b0e209a5f7ab25b653d42835222faaf | refs/heads/master | 2022-06-25T19:20:52.847498 | 2022-06-08T14:40:45 | 2022-06-08T14:40:45 | 145,714,257 | 0 | 0 | null | 2022-04-25T00:18:37 | 2018-08-22T13:39:14 | Python | UTF-8 | Python | false | false | 620 | py | ## input no of elements
# input elements
# input threshold
#3 4 5 6 t -10
n=raw_input("Enter no of elements:")
a=raw_input("Enter elements:")
t=int(raw_input("Enter threshold:"))
elements=a.split()
print elements
sum=0
maxlist=[]
for x in range(0,len(elements)):
sum=0
for y in range(x, len(el... | [
"rajatkashyap@Rajats-MBP.T-mobile.com"
] | rajatkashyap@Rajats-MBP.T-mobile.com |
667813317af2bd29df762c292eef9962fdee11a2 | d7d4df5f6db160cb7d090dd761aa43363eeb3351 | /Example/main_ev_nissan_leaf.py | 362df677c199363423a467061810958bc216b547 | [] | no_license | ximitiejiang/EVCable | 4fd9bb0a45e02f22faea80a54e09e2c21656f8c4 | 19959ea0eb2293107edc1953797bebe5c91bea1c | refs/heads/master | 2020-04-14T19:15:45.621049 | 2019-01-06T05:39:48 | 2019-01-06T05:39:48 | 164,051,675 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,763 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Jan 4 22:58:22 2019
@author: suliang
"""
import os,sys
from EVCable import models
from importlib import import_module
from addict import Dict
class ConfigDict(Dict): # 可用于字典的便捷获取,并且适用于嵌套字典
def __init__(self, cfg_dict):
super().__init... | [
"ximitiejiang@163.com"
] | ximitiejiang@163.com |
1ac29adf7a5a87fb932f4279d3b9685c0d7af77a | e70374ec1a1cb7a3a117780fabfbb6c16a111f33 | /setup.py | c2ed70ad479a1c296224ae1072382aedfaa89bad | [
"MIT"
] | permissive | smaggs/silica | 89bddd6b56a10fe6d6ea01bdf70d0faf29208e5f | f7f0a4cdcea1cd4c3c6b58e85aa26bc8152c5960 | refs/heads/master | 2021-01-17T21:46:38.955961 | 2016-06-10T01:26:07 | 2016-06-10T01:26:07 | 61,233,431 | 0 | 0 | null | 2016-06-15T19:02:41 | 2016-06-15T19:02:40 | null | UTF-8 | Python | false | false | 2,157 | py | """
The MIT License (MIT)
Copyright (c) 2016 Zagaran, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge... | [
"iamzags@gmail.com"
] | iamzags@gmail.com |
bba29333945223175b7565aeacc4cf5303e67b15 | ff81a9d7880f1b85a1dc19d5eba5ac72d7179c86 | /pychron/core/helpers/formatting.py | c75df90da927cdb7c8941b04ce060cc06cb1483d | [
"Apache-2.0"
] | permissive | UManPychron/pychron | 2fb7e479a9f492423c0f458c70102c499e1062c4 | b84c9fd70072f9cbda30abe2c471e64fe3dd75d8 | refs/heads/develop | 2022-12-03T23:32:45.579326 | 2020-01-29T19:02:20 | 2020-01-29T19:02:20 | 36,100,637 | 0 | 0 | null | 2015-05-23T00:10:06 | 2015-05-23T00:10:05 | null | UTF-8 | Python | false | false | 3,047 | py | # ===============================================================================
# Copyright 2012 Jake Ross
#
# 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/licens... | [
"jirhiker@gmail.com"
] | jirhiker@gmail.com |
68e01c21b8b43dc3c2a111b20661ff326b70db45 | d16fd8e182fb2e0997166c47432ff6dbefde3079 | /ibm_mq/tests/test_ibm_mq.py | 393f6354a99ec5de42a809556a9778a62c2afae4 | [] | permissive | CIBailey/integrations-core | 501345e4c9c164413929f61eeb27aaf948c9e43a | 2fe90fb044ff3b5db149407b5682cf2b5e0774bf | refs/heads/master | 2020-04-30T19:20:04.294666 | 2019-03-21T18:31:34 | 2019-03-21T18:31:34 | 177,035,275 | 1 | 0 | BSD-3-Clause | 2019-03-21T22:50:12 | 2019-03-21T22:50:12 | null | UTF-8 | Python | false | false | 2,774 | py | # (C) Datadog, Inc. 2018
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import logging
import pytest
from datadog_checks.ibm_mq import IbmMqCheck
log = logging.getLogger(__file__)
METRICS = [
'ibm_mq.queue.service_interval',
'ibm_mq.queue.inhibit_put',
'ibm_mq.queue.d... | [
"noreply@github.com"
] | CIBailey.noreply@github.com |
14805452716dfbf1e0d78d9c5e03cc883ea00a45 | e4610216140a5646e5ac6bb0b4931c198e6bbdd1 | /Day1/ex03.py | 9e64a62158eac2300b715961b2d054af5ce4e4ae | [] | no_license | kayartaya-vinod/2020_SEP_ABB_ADV_PYTHON | ce40e9e6d8664369e4e0540a4809c9579286ca09 | 79a1108ca5b1432df45f7193ea5bc878d93d1d46 | refs/heads/master | 2022-12-27T10:05:53.904914 | 2020-09-30T11:54:17 | 2020-09-30T11:54:17 | 299,226,493 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,035 | py | from ex00 import Person
class Employee(Person):
# the inherited __init__ is hidden or overridden by the newly defined __init__
def __init__(self, **kwargs):
# in other OO languages, like c++/Java/C# automatic execution of the
# super/base class constructor takes place.
# in Python, t... | [
"kayartaya.vinod@gmail.com"
] | kayartaya.vinod@gmail.com |
54f211040364e5c9d83d6df4722c2fd8d7fc5ab8 | 2e7aaf5367b9555554ae22338b9184c616e3f69e | /fair_coin_toss_experiment.py | c4c8e300762b05824f528c63fb1d4f43293c856d | [
"MIT"
] | permissive | noelevans/sandpit | 413ec8586811dfdb8f31f5a50ba1f72fe4a79307 | e97bd599249be3ed7c9958328e3ded0d51fa1859 | refs/heads/master | 2023-03-10T08:59:27.178057 | 2023-03-06T21:12:54 | 2023-03-06T21:12:54 | 34,741,371 | 1 | 0 | MIT | 2021-03-20T01:25:00 | 2015-04-28T16:12:01 | HTML | UTF-8 | Python | false | false | 859 | py | from __future__ import division
import numpy as np
""" Implementing a slide from a PyCon talk, Statistics for Hackers.
https://speakerdeck.com/pycon2016/jake-vanderplas-statistics-for-hackers
The question posed:
"You toss a coin 30 times and see 22 heads. Is it a fair coin"
The key line of inter... | [
"noelevans@gmail.com"
] | noelevans@gmail.com |
7dd335f4f20890e829af77798c5e171300f810bd | 3c3d9cbad17627316c18b28d894f4225b17e7cf4 | /tools/builtins_templates/render.tmpl.pyi | cfa8c7e31b467ca94df42fb4c5742c30a515d587 | [
"MIT",
"CC-BY-3.0"
] | permissive | WilliamTambellini/godot-python | 77ce74c0366b7ceaa8fd0aa4e0716238cf1ae59b | 74ba482c6f06e6b8eae15386e6e21c703acdf102 | refs/heads/master | 2022-11-23T15:02:05.310388 | 2020-07-25T18:47:18 | 2020-07-25T18:47:18 | 282,775,578 | 0 | 0 | NOASSERTION | 2020-07-27T02:31:24 | 2020-07-27T02:31:23 | null | UTF-8 | Python | false | false | 1,429 | pyi | {#- `render_target` must be defined by calling context -#}
{% set py_type = render_target_to_py_type(render_target) %}
{% set gd_type = py_to_gd_type(py_type) %}
{#- Define rendering macros -#}
{% macro render_method(pyname, return_type=None, args=(), gdname=None, gdapi="10") %}
{% set gdname = gdname or pyname %}
{%... | [
"emmanuel.leblond@gmail.com"
] | emmanuel.leblond@gmail.com |
365807961d027fee5bce6f43d0db5c9f20b67479 | 4ccff4c78aac4ad934fce42637f24829bdf26be7 | /icml/master_tree.py | 83207f7cb09efe97bf1acaa9c2c4dd49d94f5703 | [
"MIT"
] | permissive | islamazhar/trees | 185ddc67f1935149414d6ae12b82205213659ad6 | 502565c5bf02503c7bece09cddd93f9368da02c3 | refs/heads/master | 2022-11-16T12:03:55.299111 | 2020-07-19T13:45:10 | 2020-07-19T13:45:10 | 268,391,749 | 0 | 0 | MIT | 2020-06-01T00:51:28 | 2020-06-01T00:51:27 | null | UTF-8 | Python | false | false | 977 | py | import numpy as np
from trees import Tree, TreeNode, TreeLeaf
import cPickle as pickle
def make_master(X, y, name):
if name == 'mnist' or name == 'iris' or name == '20news':
return make_class_tree(X, y)
if name == 'zoo':
with open('data/zoo/zoo2.tree', 'rb') as fp:
tree = pickle.loa... | [
"sharad.vikram@gmail.com"
] | sharad.vikram@gmail.com |
75dce560bda8c932b19b6dee9dc2bb62e480d742 | ca42e62ce157095ace5fbaec0bf261a4fb13aa6a | /edivorce/apps/core/views/pdf.py | e5942b9fac102fc6004dcfef11301e48b7edcd0b | [
"Apache-2.0"
] | permissive | ronald-rgr/ai-chatbot-smartguide | 58f1e7c76b00248923f5fe85f87c318b45e38836 | c9c830feb6b66c2e362f8fb5d147ef0c4f4a08cf | refs/heads/master | 2021-04-18T03:15:23.720397 | 2020-03-23T17:55:47 | 2020-03-23T17:55:47 | 249,500,344 | 0 | 0 | Apache-2.0 | 2021-04-16T20:45:28 | 2020-03-23T17:35:37 | Python | UTF-8 | Python | false | false | 3,392 | py | """ Views for generated forms """
import json
from django.conf import settings
from django.http import HttpResponse
from django.template.loader import render_to_string
import requests
from ..decorators import bceid_required
from ..utils.derived import get_derived_data
from ..utils.user_response import get_responses... | [
"ronald.garcia@gmail.com"
] | ronald.garcia@gmail.com |
131d6d0f90195feb8309fe3d5371985ceac32b40 | 31e141e8929a52ae248eb020f5a769b73d6f36d8 | /lino/modlib/checkdata/fixtures/checkdata.py | 825dc20c61e076973facbd427bdb8038062b21d8 | [
"BSD-2-Clause"
] | permissive | NewRGB/lino | e07e1bb9a6c25103ac9eda9b09de36afd4e6ecbc | 43799e42107169ff173d3b8bc0324d5773471499 | refs/heads/master | 2020-09-09T18:59:15.996197 | 2019-11-12T04:50:52 | 2019-11-12T04:50:52 | 221,534,233 | 1 | 0 | BSD-2-Clause | 2019-11-13T19:20:02 | 2019-11-13T19:20:01 | null | UTF-8 | Python | false | false | 299 | py | # -*- coding: UTF-8 -*-
# Copyright 2015 Rumma & Ko Ltd
# License: BSD (see file COPYING for details)
"""Runs the :manage:`checkdata` management command with `--fix`
option.
"""
from django.core.management import call_command
def objects():
call_command('checkdata', fix=True)
return []
| [
"luc.saffre@gmail.com"
] | luc.saffre@gmail.com |
3283d2ba7e9fbf4a897ed18e7e8bc8ec4d73b48f | 2dde58651cf409ad28d1b9b9218a53a17fcacb26 | /convokit/model/utterance.py | 0180e3aca18bab705234622b958c0ba68692ee2a | [
"MIT"
] | permissive | KatyBlumer/Cornell-Conversational-Analysis-Toolkit | 34bae043c4a5680d508af69ce16801a2143a81f1 | 086a6ea25ada45ad70c43e01ec9f82e8dbfa16e7 | refs/heads/master | 2020-07-22T11:05:29.358854 | 2020-02-14T03:41:18 | 2020-02-14T03:41:18 | 207,177,918 | 0 | 0 | MIT | 2019-09-08T21:49:09 | 2019-09-08T21:49:09 | null | UTF-8 | Python | false | false | 2,653 | py | from typing import Dict, List, Collection, Hashable, Callable, Set, Generator, Tuple, Optional, ValuesView
from .user import User
class Utterance:
"""Represents a single utterance in the dataset.
:param id: the unique id of the utterance. Can be any hashable type.
:param user: the user giving the utteranc... | [
"calebchiam@gmail.com"
] | calebchiam@gmail.com |
99dfcd1c549667547af246b081b2db3b89f1c7d7 | b120f8ec437709571dd363b5750835db6e6d4e32 | /twitter/__init__.py | 4f098cc9981f61bdabf54b21e136a9698206e5f7 | [] | no_license | pipoteam/pipobot-modules | 2b3e61542e95c0144118e56a4a6817e48d0c1822 | dcc6ec037723633f8fc314c6b7e314185e29860a | refs/heads/master | 2022-04-27T00:50:56.805541 | 2022-03-13T19:34:53 | 2022-03-13T19:34:53 | 4,283,568 | 3 | 6 | null | 2017-05-15T09:47:49 | 2012-05-10T11:22:35 | Python | UTF-8 | Python | false | false | 3,988 | py | # -*- coding: utf-8 -*-
from pipobot.lib.modules import AsyncModule, Pasteque
from pipobot.lib.utils import unescape
from twython import Twython, TwythonError
from .model import LastTweets, Tweets
URL = 'https://twitter.com'
RT = 'retweeted_status'
REPLY_NAME = 'in_reply_to_screen_name'
REPLY_TWEET = 'in_reply_to_st... | [
"guilhem.saurel@gmail.com"
] | guilhem.saurel@gmail.com |
57f671e63cea9812f85acdc16e062023c06efa55 | 10ca532599d96032aba24cfb2cf542407b0d2389 | /pylearn2/scripts/icml_2013_wrepl/black_box/learn_zca.py | 8f5aceaee06bd48f2ff2c7aba91f2c0ee7cfd1e1 | [
"BSD-3-Clause"
] | permissive | Coderx7/pylearn2 | a748a522e115c86611ab8a476075f4a9c47c5fac | 96edb376ced1b828962c749240059903686da549 | refs/heads/master | 2020-05-29T11:37:45.469205 | 2017-02-14T19:22:22 | 2017-02-14T19:22:22 | 66,489,783 | 1 | 0 | BSD-3-Clause | 2020-02-03T05:18:32 | 2016-08-24T18:34:44 | Python | UTF-8 | Python | false | false | 237 | py | from pylearn2.datasets.preprocessing import ZCA
from pylearn2.utils import serial
from black_box_dataset import BlackBoxDataset
extra = BlackBoxDataset('extra')
zca = ZCA(filter_bias=.1)
zca.fit(extra.X)
serial.save('zca.pkl', zca)
| [
"goodfellow.ian@gmail.com"
] | goodfellow.ian@gmail.com |
856a9964bbccb127acdd0865de509dd26a2b556a | 4a76ac7ad1aaeec44729ab6d5b121b1cae0d910c | /Week 1/SalesByMatch.py | 4b2ca73d4288dcf2642a84b22826b3fbd29d0e14 | [] | no_license | kalmad99/CompetitiveProgramming | 2d825e839faa9e13ef43dbb45498bd3eef6723ab | 6cbb1f12f7670d0016fa2af8f2dd597d9123070d | refs/heads/main | 2023-03-25T20:18:23.389396 | 2021-03-24T21:36:52 | 2021-03-24T21:36:52 | 325,816,614 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 670 | py | # Complete the sockMerchant function below.
# 9
# 10 20 20 10 10 30 50 10 20
import os
def sockMerchant(n, ar):
emptyl = []
result = 0
count = 0
for i in ar:
if i in emptyl:
continue
else:
emptyl.append(i)
for j in emptyl:
count = ar.count(j)
... | [
"kalemesfin12@gmail.com"
] | kalemesfin12@gmail.com |
166c74052f4fdefdbd33eb3e69f815e776e5218b | 83de24182a7af33c43ee340b57755e73275149ae | /aliyun-python-sdk-cdn/aliyunsdkcdn/request/v20180510/CreateCdnDeliverTaskRequest.py | c1172c6f8e8f3ba180a7ac69b9972bc493a9d39a | [
"Apache-2.0"
] | permissive | aliyun/aliyun-openapi-python-sdk | 4436ca6c57190ceadbc80f0b1c35b1ab13c00c7f | 83fd547946fd6772cf26f338d9653f4316c81d3c | refs/heads/master | 2023-08-04T12:32:57.028821 | 2023-08-04T06:00:29 | 2023-08-04T06:00:29 | 39,558,861 | 1,080 | 721 | NOASSERTION | 2023-09-14T08:51:06 | 2015-07-23T09:39:45 | Python | UTF-8 | Python | false | false | 2,142 | py | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
84b81d5d7f7cb356e4f0b46b571e0a5e4fe4eea9 | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2114/61053/281233.py | 919219fd9ce722f2f5cba1d774979a7bc09062df | [] | no_license | AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 368 | py | def minSum(n):
lst = []
lst.append(0)
for i in range(1,n+1):
for j in range(1,i+1):
if i - j**2 >= 0:
if j == 1:
lst.append(lst[i-1]+1)
else:
lst[i] = min(lst[i],lst[i-j**2]+1)
return lst[n]
if __name__ == "__ma... | [
"1069583789@qq.com"
] | 1069583789@qq.com |
fb566f65414eca423c9aa729951f0a5a47e2a081 | 72167bc16ffc678e5270dc83000013158d69aaf1 | /Chapter05/5.4.3.py | b2c941ecbc32e30f8281eeceff08a270f27d430f | [] | no_license | OSYouth/PythonCrashCourse | 6e37b53b5a83705db3366543b9ab80ef5dd4e3b7 | bbb88a087f489baa535d2b1477c08d023ae5b913 | refs/heads/master | 2021-08-22T17:35:27.702205 | 2021-04-16T13:01:16 | 2021-04-16T13:01:16 | 249,334,439 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 428 | py | available_toppings = ['mushrooms', 'olives', 'green peppers', 'pepperoni', 'pineapple', 'extra cheese']
requested_toppings = ['mushrooms', 'french fries', 'extra cheese']
for requested_topping in requested_toppings:
if requested_topping in available_toppings:
print("Adding " + requested_topping + ".")
e... | [
"benleolee@163.com"
] | benleolee@163.com |
07eae20cb6635e30f8d0e94a525a5b351d928f79 | ee8c4c954b7c1711899b6d2527bdb12b5c79c9be | /assessment2/amazon/run/core/controllers/call.py | e0f9b7714730874a42c41006d2e199a47dc7723c | [] | no_license | sqlconsult/byte | 02ac9899aebea4475614969b594bfe2992ffe29a | 548f6cb5038e927b54adca29caf02c981fdcecfc | refs/heads/master | 2021-01-25T14:45:42.120220 | 2018-08-11T23:45:31 | 2018-08-11T23:45:31 | 117,135,069 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 362 | py | #!/usr/bin/env python3
from flask import Blueprint, Flask, render_template, request, url_for
controller = Blueprint('call', __name__, url_prefix='/call')
# @controller.route('/<string:title>', methods=['GET'])
# def lookup(title):
# if title == 'Republic': # TODO 2
# return render_template('republic.ht... | [
"sqlconsult@hotmail.com"
] | sqlconsult@hotmail.com |
542bf395f97e2cd0e31c965ff605355d11844823 | 5a9d8c64c6478f3816b63f59f1cdaca73c0848eb | /Base/ex10/zy2_myfac.py | 657a9b0e2b55ce1ba2bb48adc87931f48d69de85 | [] | no_license | wangredfei/nt_py | f68134977e6d1e05cf17cec727644509f084c462 | fedf03c0d52565f588e9b342d1c51df0b6dc2681 | refs/heads/master | 2020-04-08T07:55:08.302589 | 2018-11-23T09:53:48 | 2018-11-23T09:53:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 219 | py |
# 2. 给出一个数n,写一个函数myfac来计算n!(n的阶乘)
# n! = 1 * 2 * 3 * ... * n
# print(myfac(5)) # 120
def myfac(n):
N = 1
for i in range(1,n+1):
N *= i
return N
print(myfac(5)) | [
"289498360@qq.com"
] | 289498360@qq.com |
3fdf966b91d3d8fcc8fcb14fcfcbf40710556b46 | 1958631675a1eda1c2c5a018b636cb1117d90d9e | /0x0A-python-inheritance/10-square.py | 8788e4d9e7980b491126277e76078d9cf55b34e0 | [] | no_license | Valinor13/holbertonschool-higher_level_programming | f32d6507546584c3af59e3e8ece345af70a698d6 | 5fad6ea9f28f845820b5a893feb20e83ed3fe7b4 | refs/heads/main | 2023-06-05T21:15:29.774676 | 2021-06-27T23:08:54 | 2021-06-27T23:08:54 | 361,808,582 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 438 | py | #!/usr/bin/python3
"""A module containing the square class inherited from Rectangle"""
Rectangle = __import__('9-rectangle').Rectangle
class Square(Rectangle):
"""A class inherited from rectangle that deals with squares"""
def __init__(self, size):
super().integer_validator("size", size)
s... | [
"jwcalhoun2@gmail.com"
] | jwcalhoun2@gmail.com |
785bc2ace46161ddefd564e79c2b6b21fc34a99e | c6ad3f65da16e714619bb62b27565efc00364c1c | /work-packages/f5500/python/f5500/CiscoIOSXRCryptoMibsIpsecflowmonCfg_ns.py | 881f7c8bb924a008aa386b5a48312eecf1fe3276 | [] | no_license | janlindblad/eantc20 | c0c74a1e6476ca5e5a2906f18472259d8a515b21 | e9051c77de16578c97dcf1f7ecb0a5ef30ad2e68 | refs/heads/master | 2020-12-21T19:09:36.076797 | 2020-03-17T18:17:04 | 2020-03-17T18:17:04 | 236,523,910 | 0 | 3 | null | null | null | null | UTF-8 | Python | false | false | 1,228 | py | #
# BEWARE BEWARE BEWARE BEWARE BEWARE BEWARE BEWARE BEWARE BEWARE
# This file has been auto-generated by the confdc compiler.
# Source: ../load-dir/Cisco-IOS-XR-crypto-mibs-ipsecflowmon-cfg.fxs
# BEWARE BEWARE BEWARE BEWARE BEWARE BEWARE BEWARE BEWARE BEWARE
#
# Autogenerated namespace class for YANG module Cisco-IOS... | [
"jlindbla@cisco.com"
] | jlindbla@cisco.com |
d10e8caa2292cc529759d48213936b44634fb90e | abcf63644ff1f4767f81261f8bc32efb91767771 | /zuoye3/ZUOYE.PY | 8c88abc6faf459d15562fa92e6d67032322f9774 | [] | no_license | Ran-oops/python | cf296711a01c1a01e2794e2310447a5684181f53 | 5ba09234120084f4ea7b13a4945935d38f356dea | refs/heads/master | 2020-11-29T21:18:58.391800 | 2019-12-27T10:52:17 | 2019-12-27T10:52:17 | 230,217,192 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,114 | py | import os
os.chdir(r'C:\Users\Acer\Desktop\zuoye3')
print(os.getcwd())
list1=os.listdir(os.getcwd())
print(list1)
while True:
handle_file=input('请输入接下来的操作:m:创建文件;rm:删除文件;n:修改文件名;e:退出\n')
if handle_file=='m':
mk_file=input('请输入需要创建的文件夹名称\n')
os.mkdir(mk_file)
if mk_file in os.listdir(os.getcwd()):
print('创建成... | [
"18291893776@139.com"
] | 18291893776@139.com |
c689ff58ee57c2c81dfde575173f89051306f798 | 3ae62276c9aad8b9612d3073679b5cf3cb695e38 | /easyleetcode/leetcodes/Leetcode_005_Longest_Palindromic_Substring.py | dd29056683ec824c6e618d3d9a6846c6283a2d06 | [
"Apache-2.0"
] | permissive | gongtian1234/easy_leetcode | bc0b33c3c4f61d58a6111d76707903efe0510cb4 | d2b8eb5d2cafc71ee1ca633ce489c1a52bcc39ce | refs/heads/master | 2022-11-16T17:48:33.596752 | 2020-07-13T02:55:03 | 2020-07-13T02:55:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,499 | py | # 1穷举
class Solution:
def str(self, s):
if not s:
return ''
n = len(s)
logest, left, right = 0, 0, 0
for i in range(0, n):
for j in range(i + 1, n + 1):
substr = s[i:j]
if self.isPalindrome(substr) and len(substr) > logest:
... | [
"425776024@qq.com"
] | 425776024@qq.com |
f123fb96b9fc9be0b130cb0616266daca2a4b1f0 | 4791bde7bb7275fc25480fdf0cd81d1a9450a50c | /articles/migrations/0002_article_thumb.py | f990e16292870d560147e2f25f5793b8e00c4c80 | [] | no_license | VinneyJ/RU-I-tech-app | 9692f0681dd704ce52c621b3d080d1a90fbe501b | dd15335f26a35d8e32477e7dd384f3a80351d25d | refs/heads/master | 2020-05-02T21:04:17.773867 | 2019-03-28T13:25:18 | 2019-03-28T13:25:18 | 178,209,692 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 409 | py | # Generated by Django 2.1.7 on 2019-03-07 18:11
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('articles', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='article',
name='thumb',
fi... | [
"vincentjayden49@gmail.com"
] | vincentjayden49@gmail.com |
aea9b526917cfd144e682e610acce9676629ad37 | 3f09e77f169780968eb4bd5dc24b6927ed87dfa2 | /src/Problems/Linked_List_Cycle.py | d954942bb12a57f59ca94bcca0dceb6070ef809a | [] | no_license | zouyuanrenren/Leetcode | ad921836256c31e31cf079cf8e671a8f865c0660 | 188b104b81e6c73792f7c803c0fa025f9413a484 | refs/heads/master | 2020-12-24T16:59:12.464615 | 2015-01-19T21:59:15 | 2015-01-19T21:59:15 | 26,719,111 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 824 | py | '''
Created on 17 Nov 2014
@author: zouyuanrenren
'''
'''
Given a linked list, determine if it has a cycle in it.
Follow up:
Can you solve it without using extra space?
'''
'''
Can be done with two pointers:
1. one fast pointer;
2. one slow pointer;
3. the list has a cycle iff fast == slow at some point
'''
# Defi... | [
"y.ren@abdn.ac.uk"
] | y.ren@abdn.ac.uk |
4ffcca5c272df580b13e18d5d6c875ec77f8e30b | c8f5d69d21ac4df40d79a811dea2e3ad82fb5e04 | /src/stock_list_upd.py | 8985c45bee57d8f3d21e912834f494b47f4fdfdf | [] | no_license | webclinic017/usstock | e71ab18534fd3afc05ab2452578821584750e2b9 | c724f00bc1c5d2a41ee58e037ba0b1b3f0904f70 | refs/heads/master | 2023-08-15T05:22:14.275202 | 2021-10-14T21:19:53 | 2021-10-14T21:19:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,972 | py | #!/usr/bin/env python
'''
TBD, Wed Jan 30 21:47:38 EST 2019
to automate 1). sp500 ticker selection, 2.) additional ticker price hist update 3. split adj (TBD), 4. dividends adj (TBD), 5. earnings update 6. financials update
Procedure:
1. pull sp500 stock list to [sp500_component]
2. pull available stock list to [iex_c... | [
"facebook@beyondbond.com"
] | facebook@beyondbond.com |
31ee31ef742d9ac8ad49c4ca2f2a2c422d62dfd0 | e489b2f77b52d33bbf952066b0975485a30ec8f9 | /BootCRUDICApp/urls.py | 26f1cd46f50089a767ac6d5c45fa439ca1cbcf0c | [
"Apache-2.0"
] | permissive | cs-fullstack-2019-spring/django-bootstrapcrud-ic-Kenn-CodeCrew | 9e837b6a4d8f6b637273bcb5478c2ee844b1301e | dd65eda49daf8527d01f96c7b39f3c874f371138 | refs/heads/master | 2020-04-27T18:34:02.209542 | 2019-03-08T20:45:31 | 2019-03-08T20:45:31 | 174,576,966 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 168 | py | from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name='index'),
path('addMember/', views.addMember, name='addMember'),
] | [
"kenn+git@code-crew.org"
] | kenn+git@code-crew.org |
5a8fa6e8941d07f985b6f4dddff4736e33c5f14c | d2327e4277629ff5c04cfdfb71cdae7209d56fa7 | /sample codes/topic6/py_test6.py | 43b88b93dc59ce1a63f4197fb2a40aeda7050b52 | [] | no_license | tertiarycourses/Full-ROS-Training | 77caeedda216e6e065fec0664a93d66df38ba571 | b9bdb7daf2a08421d163001cb2b22cbfb1221f23 | refs/heads/main | 2023-03-04T09:04:02.432243 | 2021-02-16T15:57:51 | 2021-02-16T15:57:51 | 314,543,129 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 362 | py | #!/usr/bin/env python
import rospy
from std_msgs.msg import Float32
def callback(msg_data):
rospy.loginfo(msg_data)
def listener():
rospy.init_node('iot_sensor')
rospy.Subscriber('temperature',Float32,callback)
rospy.spin()
if __name__ == '__main__':
try:
listener()
except rospy.ROSIn... | [
"angch@tertiaryinfotech.com"
] | angch@tertiaryinfotech.com |
3ad485aaa42a75f2c082663ae1879b0af554ddba | fbbe424559f64e9a94116a07eaaa555a01b0a7bb | /Keras_tensorflow_nightly/source2.7/markdown/extensions/sane_lists.py | 651b12b257b63a3aa6f281602a59f9a40c8a6c26 | [
"MIT"
] | permissive | ryfeus/lambda-packs | 6544adb4dec19b8e71d75c24d8ed789b785b0369 | cabf6e4f1970dc14302f87414f170de19944bac2 | refs/heads/master | 2022-12-07T16:18:52.475504 | 2022-11-29T13:35:35 | 2022-11-29T13:35:35 | 71,386,735 | 1,283 | 263 | MIT | 2022-11-26T05:02:14 | 2016-10-19T18:22:39 | Python | UTF-8 | Python | false | false | 1,597 | py | """
Sane List Extension for Python-Markdown
=======================================
Modify the behavior of Lists in Python-Markdown to act in a sane manor.
See <https://Python-Markdown.github.io/extensions/sane_lists>
for documentation.
Original code Copyright 2011 [Waylan Limberg](http://achinghead.com)
All change... | [
"ryfeus@gmail.com"
] | ryfeus@gmail.com |
9dada075fc6880ae3051f749c69383a9d71ad79e | f4dedea53630c9cbdc6297ae4a7e2a8195fd7691 | /10 Advanced Techniques/21 Dynamic Connectivity.py | 7cca06fb0f10671253d333d96b04477b6777f2fa | [] | no_license | nikkisora/cses_problemset | d089db048444e07e002f131b4323adc9df95b05b | 03160f33e36cdc6d538403357b36bcb015b4dba7 | refs/heads/master | 2023-07-03T10:34:23.487709 | 2021-08-05T21:13:49 | 2021-08-05T21:13:49 | 379,251,540 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,243 | py | '''
CSES - Dynamic Connectivity
Time limit: 1.00 s
Memory limit: 512 MB
Consider an undirected graph that consists of n nodes and m edges. There are two types of events that can happen:
A new edge is created between nodes a and b.
An existing edge between nodes a and b is removed.
Your task is to re... | [
"32413317+nikkisora@users.noreply.github.com"
] | 32413317+nikkisora@users.noreply.github.com |
4f770d7903cc4c618074e9115637038e89b1a77c | 6a819308924a005aa66475515bd14586b97296ae | /venv/lib/python3.6/site-packages/setuptools/py31compat.py | e80573126c1c9604f492fb04516ad2e619c23349 | [] | no_license | AlexandrTyurikov/my_first_Django_project | a2c655dc295d3904c7688b8f36439ae8229d23d1 | 1a8e4d033c0ff6b1339d78c329f8beca058b019a | refs/heads/master | 2020-05-04T13:20:20.100479 | 2019-05-04T23:41:39 | 2019-05-04T23:41:39 | 179,156,468 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,187 | py | __all__ = ['get_config_vars', 'get_path']
try:
# Python 2.7 or >=3.2
from sysconfig import get_config_vars, get_path
except ImportError:
from distutils.sysconfig import get_config_vars, get_python_lib
def get_path(name):
if name not in ('platlib', 'purelib'):
raise ValueError("Name... | [
"tyur.sh@gmail.com"
] | tyur.sh@gmail.com |
3692dfd4e01349c9d821ab23d96b5c0ced307d96 | f07a42f652f46106dee4749277d41c302e2b7406 | /Data Set/bug-fixing-4/1c6aa5e912cb777ad2a6a9b42097c64e3f0d2f71-<send_message>-bug.py | e08ebe23393d18dd9b4df26cfe0c4d549738a144 | [] | no_license | wsgan001/PyFPattern | e0fe06341cc5d51b3ad0fe29b84098d140ed54d1 | cc347e32745f99c0cd95e79a18ddacc4574d7faa | refs/heads/main | 2023-08-25T23:48:26.112133 | 2021-10-23T14:11:22 | 2021-10-23T14:11:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 264 | py | def send_message(self, queue_url, message_body, delay_seconds=0, message_attributes=None):
return self.get_conn().send_message(QueueUrl=queue_url, MessageBody=message_body, DelaySeconds=delay_seconds, MessageAttributes=(message_attributes or {
})) | [
"dg1732004@smail.nju.edu.cn"
] | dg1732004@smail.nju.edu.cn |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.