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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b61968dae81932acb65d39767e1e265e0cacf305 | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_167/ch50_2019_06_11_13_14_47_474417.py | 72022271fba4966682e6c89d23ed329447de3c78 | [] | no_license | gabriellaec/desoft-analise-exercicios | b77c6999424c5ce7e44086a12589a0ad43d6adca | 01940ab0897aa6005764fc220b900e4d6161d36b | refs/heads/main | 2023-01-31T17:19:42.050628 | 2020-12-16T05:21:31 | 2020-12-16T05:21:31 | 306,735,108 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 193 | py | def numero_no_indice (lista):
l=[]
i=0
posicao=0
while i < len(lista):
if i[lista]==posicao:
i+=1
posicao+=1
x.append(i)
return l | [
"you@example.com"
] | you@example.com |
52aaa46352ec022d7349aab054fec390a4a8e785 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03359/s399632677.py | 4b9e4ef5080c28b6522f683bf717ce679011d8cb | [] | 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 | 411 | py | import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007
def main():
a, b = map(int, readline().split())
ans = 0
for i in range(1, 13):
if i < a:
ans += 1
elif i == a and i <= ... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
a51a38a2e71d34f8aa6a2e82026c584eeacddb12 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03363/s286998192.py | 091f166035f13606310d3cb4f31a2b7bd57a4859 | [] | 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 | 297 | py | from collections import defaultdict
n = int(input())
li_a = list(map(int, input().split()))
s = [0] * (n+1)
dd = defaultdict(lambda:0)
for i in range(n):
s[i+1] += s[i] + li_a[i]
for i in range(n+1):
dd[s[i]] += 1
ans = 0
for key in dd:
ans += (dd[key]*dd[key] - dd[key])//2
print(ans) | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
cc2fb3795c9dafa0f738c912004965c3b7b25f9a | ab4f0df599159b2c3929c24b12e2766718efdacb | /pyplan_engine/classes/CustomImports.py | e28736de5115b4624154fca75a5693ce79bf591c | [
"MIT"
] | permissive | jorgedouglas71/pyplan-ide | f01ec438f727ee0dea01b0d265155b49a26ccdb8 | 5ad0e4a2592b5f2716ff680018f717c65de140f5 | refs/heads/master | 2020-09-25T03:10:01.201707 | 2019-12-04T15:39:55 | 2019-12-04T15:39:55 | 225,904,173 | 0 | 0 | MIT | 2019-12-04T15:57:06 | 2019-12-04T15:57:05 | null | UTF-8 | Python | false | false | 1,083 | py |
custom = {
}
defaults = {
"abs": abs,
"range": range,
"abs": abs,
"dict": dict,
"min": min,
"all": all,
"hex": hex,
"next": next,
"slice": slice,
"any": any,
"divmod": divmod,
"object": object,
"sorted": sorted,
"ascii": ascii,
"enumerate": enumerate,
... | [
"fbrussa@novix.com"
] | fbrussa@novix.com |
991ef0d671ac96b7e9c8992788bc4c9aaefb75ee | eb7b84b70b335e913aa7d6bf9effba3034810e27 | /FirstApp_Flask/employeeInfo.py | 73e6fe9ffb1ca4a70d0a2d3879854a6a22310f0c | [] | no_license | chavhanpunamchand/flask | ccc27c9909799bcc4fa9208b49c478942d569eb4 | 840c7299eb5cfc708f8a6cbefe8955115af9b179 | refs/heads/master | 2023-02-21T13:57:43.012794 | 2021-01-28T11:09:41 | 2021-01-28T11:09:41 | 326,448,594 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,008 | py |
class Employee:
def __init__(self,eid,ename,eage,egen,ecity,esalary,email,erole,eskil,ehobs):
self.empid=eid
self.empName=ename
self.empAge=eage
self.eGender=egen
self.empCity=ecity
self.empSalary=esalary
self.empEmail=email
self.empRole=erole
... | [
"chavhanpunamchand@gmail.com"
] | chavhanpunamchand@gmail.com |
c6283b432e7cc517ab49d5868cb8608925fc9ed8 | 60eec837687166288bed41aa406fb92ff8b63f1b | /model/tensorflow/examples/tfdnnc/tfdnnc.py | d764e5f63f5b4c9824f4e993163d0e65ed8a9156 | [
"MIT",
"LicenseRef-scancode-generic-export-compliance"
] | permissive | shivam-bit/dffml | 1c5ca75e946fddec78fd3943bdcb6cf5650bcd89 | 4c1e7870dba12c298d5a7f4740a23af634cacb7e | refs/heads/master | 2022-06-19T22:28:10.396364 | 2020-05-08T21:53:53 | 2020-05-08T21:53:53 | 262,698,152 | 0 | 0 | MIT | 2020-05-10T02:36:10 | 2020-05-10T02:36:09 | null | UTF-8 | Python | false | false | 1,128 | py | from dffml import CSVSource, Features, DefFeature
from dffml.noasync import train, accuracy, predict
from dffml_model_tensorflow.dnnc import DNNClassifierModel
model = DNNClassifierModel(
features=Features(
DefFeature("SepalLength", float, 1),
DefFeature("SepalWidth", float, 1),
DefFeature(... | [
"johnandersenpdx@gmail.com"
] | johnandersenpdx@gmail.com |
bb74ddac0a7bc8a9c141488aea6f2faa98c9f820 | 8fb1d41797595550418ecfc0e7558f38254b4606 | /django/contrib/flatpages/tests/forms.py | 7282f009c9dc86d398bb8e67aa09a2233c66ef42 | [
"MIT"
] | permissive | hunch/hunch-gift-app | 2aad70a9f18124bf0de02d7a125fa93c765da008 | 8c7cad24cc0d9900deb4175e6b768c64a3d7adcf | refs/heads/master | 2016-09-06T03:13:52.153974 | 2012-03-26T18:11:59 | 2012-03-26T18:11:59 | 1,191,221 | 6 | 3 | null | null | null | null | UTF-8 | Python | false | false | 1,245 | py | from django.contrib.flatpages.admin import FlatpageForm
from django.test import TestCase
class FlatpageAdminFormTests(TestCase):
def setUp(self):
self.form_data = {
'title': "A test page",
'content': "This is a test",
'sites': [1],
}
def test_flat... | [
"gleitz@hunch.com"
] | gleitz@hunch.com |
5bf881452b66fca7b77a5d8014fa09f19fdeb494 | 87163acf1614292be250754f28114f89013f73a3 | /Codechef/COLOR.py | bb42d808690439dedd343a0a5262394440066d8d | [] | no_license | khush-01/Python-codes | 742a9d9966d2ceb3ad2e7c78e34ef88e55df955a | da3cae8df0aafe763399066eefc9b786538fdb35 | refs/heads/main | 2023-03-20T04:37:14.020134 | 2021-03-12T04:56:30 | 2021-03-12T04:56:30 | 346,941,048 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 151 | py | for _ in range(int(input())):
n = int(input())
s = input()
a = {'R': 0, 'G': 0, 'B': 0}
for x in s:
a[x] += 1
print(n - max(a.values()))
| [
"noreply@github.com"
] | khush-01.noreply@github.com |
6200af4f551c8e6534b8a3a0ca176346d8b54d3e | dfff816642f4e1afeab268f441906a6d811d3fb4 | /polling_stations/apps/data_collection/management/commands/import_swale.py | 1450c85e75893e03f2e966075e02b5698e14b4c4 | [] | permissive | mtravis/UK-Polling-Stations | 2c07e03d03959492c7312e5a4bfbb71e12320432 | 26e0331dc29253dc436a0462ffaa01e974c5dc52 | refs/heads/master | 2020-05-14T18:36:31.501346 | 2019-04-17T12:54:57 | 2019-04-17T12:54:57 | 181,912,382 | 0 | 0 | BSD-3-Clause | 2019-04-17T14:48:26 | 2019-04-17T14:48:26 | null | UTF-8 | Python | false | false | 3,327 | py | from django.contrib.gis.geos import Point
from data_collection.management.commands import BaseHalaroseCsvImporter
class Command(BaseHalaroseCsvImporter):
council_id = "E07000113"
addresses_name = (
"local.2019-05-02/Version 1/polling_station_export-2019-02-28Swle.csv"
)
stations_name = (
... | [
"chris.shaw480@gmail.com"
] | chris.shaw480@gmail.com |
efbce9c46c5c14d023e8afee6f5fd7be1921c7d8 | 4c252eb68446d5fd050e28a6b5ba1a7879b70b0a | /pyuavcan/transport/can/media/socketcan/__init__.py | c6ee7989569c0ca65d99e412f740125f7b1a788f | [
"MIT"
] | permissive | jxltom/pyuavcan | ce2cdf3a95ba4c6f3a0fd8aae24b341e46481fae | 42063b65ee2af431ab485f228d1ed5465a576449 | refs/heads/master | 2021-01-16T15:09:48.547764 | 2020-05-26T09:31:25 | 2020-05-26T09:31:25 | 243,163,363 | 0 | 0 | MIT | 2020-02-26T03:53:47 | 2020-02-26T03:53:46 | null | UTF-8 | Python | false | false | 901 | py | #
# Copyright (c) 2019 UAVCAN Development Team
# This software is distributed under the terms of the MIT License.
# Author: Pavel Kirienko <pavel.kirienko@zubax.com>
#
"""
The module is always importable but is functional only on GNU/Linux.
For testing or experimentation on a local machine it is often convenient to u... | [
"pavel.kirienko@gmail.com"
] | pavel.kirienko@gmail.com |
7e17aef7c234a83dd5f625f3f79766cdd0c89a88 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02689/s473246876.py | 934535d4b4972167937a8498aa36c123addb4e8b | [] | 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 | 374 | py | n, m = map(int, input().split())
h = list(map(int, input().split()))
ab = [list(map(int, input().split())) for _ in range(m)]
ans = [1]*n
for i in range(m):
if h[ab[i][0]-1] == h[ab[i][1]-1]:
ans[ab[i][0]-1] = 0
ans[ab[i][1]-1] = 0
elif h[ab[i][0]-1] > h[ab[i][1]-1]:
ans[ab[i][1]-1] = 0
... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
1058bf0e58b27114ec41ce159f6a6412a3122981 | 2e3430eefb94fe6bc6ea8256ceadaf25bbf34e76 | /puma/helpers/testing/mixin/__init__.py | e5d5031dc92b6e294d4d8a37e566046b3bcab595 | [
"Apache-2.0"
] | permissive | gift-surg/puma | 33e08b464fe4241da512fefcab5e8909e6f1d768 | 58beae3459a0c8d96adfe9af323e26868428df4d | refs/heads/master | 2022-11-27T11:26:25.557773 | 2020-06-04T11:21:38 | 2020-06-04T11:21:38 | 198,999,143 | 1 | 0 | Apache-2.0 | 2020-07-29T16:36:50 | 2019-07-26T10:38:46 | Python | UTF-8 | Python | false | false | 173 | py | from puma.helpers.testing.mixin.not_a_test_case import NotATestCase # noqa: F401
from puma.helpers.testing.mixin.not_a_test_case_enum import NotATestCaseEnum # noqa: F401
| [
"richard.miles@fast-chat.co.uk"
] | richard.miles@fast-chat.co.uk |
aeba0cf66cd6b63cc2cd690e704544f6c0591260 | 8541f4118c6093c84e78d768285e7007ee5f6a6c | /apps/inventory/migrations/0009_auto_20151220_1554.py | e2b8366a29c48b68bbe2d712b6d251b066c4ba96 | [] | no_license | iraycd/awecounting | c81a8ca6b7a4a942e63cf6b7d723f9883e57a107 | 388df4de63146e0a9a211afa522ec50e0f3df443 | refs/heads/master | 2021-01-15T23:30:27.439759 | 2016-03-16T10:34:40 | 2016-03-16T10:34:40 | 57,046,467 | 1 | 0 | null | 2016-04-25T14:03:40 | 2016-04-25T14:03:40 | null | UTF-8 | Python | false | false | 444 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import njango.fields
class Migration(migrations.Migration):
dependencies = [
('inventory', '0008_auto_20151219_1547'),
]
operations = [
migrations.AlterField(
model_name=... | [
"roshanshrestha01@gmail.com"
] | roshanshrestha01@gmail.com |
5b5451db8c50ff61a68abf0e926e2717d703c310 | 5e381364c2ab31ff3618369085afffba6caa8edb | /recipes/ghc-filesystem/all/conanfile.py | a6f41d56f7d61a30937802fdd0e2b28998c42def | [
"MIT"
] | permissive | CAMOBAP/conan-center-index | 16aea68a6d22da22831ba985773125e8eda08f00 | 67d57532bdad549fef3fa6cb8fcdfa86bc55e4f1 | refs/heads/master | 2023-07-30T08:58:57.285571 | 2021-10-02T14:57:54 | 2021-10-02T14:57:54 | 323,262,699 | 1 | 0 | MIT | 2021-05-29T13:37:04 | 2020-12-21T07:30:02 | Python | UTF-8 | Python | false | false | 1,846 | py | import os
from conans import ConanFile, CMake, tools
class GhcFilesystemRecipe(ConanFile):
name = "ghc-filesystem"
description = "A header-only single-file std::filesystem compatible helper library"
topics = ("conan", "ghc-filesystem", "header-only", "filesystem")
homepage = "https://github.com/gulra... | [
"noreply@github.com"
] | CAMOBAP.noreply@github.com |
183611ac29eb22fef0ace8fc886bf34f6a42b118 | 6923f79f1eaaba0ab28b25337ba6cb56be97d32d | /Non_Linear_Finite_Element_Analysis_of_Solids_and_Structures_Borst/pyfem-1.0/pyfem/solvers/Solver.py | 2f5f42f519614cbfcae51e0f61b1ad62fe84b778 | [] | no_license | burakbayramli/books | 9fe7ba0cabf06e113eb125d62fe16d4946f4a4f0 | 5e9a0e03aa7ddf5e5ddf89943ccc68d94b539e95 | refs/heads/master | 2023-08-17T05:31:08.885134 | 2023-08-14T10:05:37 | 2023-08-14T10:05:37 | 72,460,321 | 223 | 174 | null | 2022-10-24T12:15:06 | 2016-10-31T17:24:00 | Jupyter Notebook | UTF-8 | Python | false | false | 2,684 | py | ############################################################################
# This Python file is part of PyFEM-1.0, released on Aug. 29, 2012. #
# The PyFEM code accompanies the book: #
# #
# 'No... | [
"me@yomama.com"
] | me@yomama.com |
5b80fd002f0f429389f82658da7f4196dab59f60 | 9640f0b9a51ead702e1fc70c2571c116893f5046 | /products/migrations/0004_auto_20201006_2154.py | 04bb2798e01b633ba64b7ddc57eb2292697db4c1 | [] | no_license | CODE-Easyy/optic-backend | d7f46194d91fa25e1d54c4a9cb88faac9ca57ba9 | ed885265125b9d95be9467d95308964d25551230 | refs/heads/main | 2023-01-07T04:10:00.746112 | 2020-10-31T01:00:13 | 2020-10-31T01:00:13 | 302,156,695 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,255 | py | # Generated by Django 3.1.2 on 2020-10-06 21:54
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('products', '0003_auto_20201006_2115'),
]
operations = [
migrations.RemoveField(
model_name='brand',
name='cat',
),
... | [
"mr.esenyazov@gmail.com"
] | mr.esenyazov@gmail.com |
2ed9c19851b9bc62ae4c409439f33728ff16f76a | 8692807f1dfa8c18c61df07cfafbbd27d4e66fba | /previous_problems/BEGINNER/CHN09.sol.py | a30740f15472fbe4e2738dd1ba776740691bc28d | [] | no_license | sharmakajal0/codechef_problems | 00381e9bf1996b859e46f087c2ffafd9d7a10ef1 | 0b979029e0a821f47fbdd6f9c624daee785a02e7 | refs/heads/master | 2020-05-29T15:04:40.459979 | 2020-03-29T08:44:53 | 2020-03-29T08:44:53 | 189,212,028 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 326 | py | #!/usr/bin/env python
for _ in range(int(input())):
s = str(input())
amber = 0
brass = 0
for i in s:
if i == 'a':
amber += 1
elif i == 'b':
brass += 1
if amber > brass:
print(brass)
elif brass > amber:
print(amber)
else:
print(... | [
"sharma.kajal.sitm@gmail.com"
] | sharma.kajal.sitm@gmail.com |
11a635d63cb3cc6ec4f23bc2d39a60be2dea79e2 | e37f5df6d380e9395e2433558be05090c2e2cd72 | /tspec_mapping/make_index_from_field.py | 8384803f596600e08a0ab8f71024bd3eefc7a835 | [] | no_license | keflavich/tspec_mapping | c8bcff914095cb3bc2bfc9dccdcbe7897e5399c7 | b61e561235a5c3c104cb3a59e016fc252dbd5845 | refs/heads/master | 2021-01-18T14:15:14.241892 | 2015-02-13T06:22:29 | 2015-02-13T06:22:29 | 7,315,394 | 0 | 0 | null | 2013-09-28T15:54:17 | 2012-12-25T07:32:22 | Python | UTF-8 | Python | false | false | 5,970 | py | import astroquery.irsa
import astrometry
import astropy.io.fits
import numpy as np
import atpy
import os
def make_index_from_table(table,fieldname,fov=None,clobber=False,**kwargs):
"""
Given a table with RA and Dec columns (case-sensitive!), build an astrometry.net
quad index
Parameters
----------... | [
"keflavich@gmail.com"
] | keflavich@gmail.com |
c423aa3aae2fbf9cab46298e451c9a089326366a | 6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4 | /vcFgGJHxhTwRiLK5d_14.py | 4a507ff87ec2b6c51b89dc31487dd6f18bceb1b8 | [] | no_license | daniel-reich/ubiquitous-fiesta | 26e80f0082f8589e51d359ce7953117a3da7d38c | 9af2700dbe59284f5697e612491499841a6c126f | refs/heads/master | 2023-04-05T06:40:37.328213 | 2021-04-06T20:17:44 | 2021-04-06T20:17:44 | 355,318,759 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 149 | py |
from fractions import gcd
def smallest(n):
lcm = 1
for i in range(1, n+1):
lcm = (lcm * i)//(gcd(int(lcm), i))
return int(lcm)
| [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
463cf524dbd01e72dbb67f1b1b24dff9c7398279 | 8bbb508b2efd88beff28e072b6ba3ad5ad86f9c7 | /Config_ipython_import/ipython/import_here.py | f079107a00955301b1fb74660f6674d951bf3ce6 | [] | no_license | wubinbai/2019 | 1f31a96d49c3383e696f208358347341783f6141 | 5f1e191a037b793abb97120f4e13185782c64a2c | refs/heads/master | 2021-06-30T11:48:16.230757 | 2020-09-25T09:09:01 | 2020-09-25T09:09:01 | 162,510,722 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,467 | py | import numpy as np
import sys
#np.set_printoptions(threshold=sys.maxsize)
np.set_printoptions(threshold=100)
import pandas as pd
import matplotlib.pyplot as plt
plt.ion()
import seaborn as sns
from tqdm import tqdm
def plot_whole(df):
with pd.option_context('display.max_rows', None, 'display.max_columns', None): ... | [
"wubinbai@yahoo.com"
] | wubinbai@yahoo.com |
d9b120c6b3b4f2a5ecffddf3d0f51f0bbf07cc85 | 401f783a202949adbf144b5780bcd87a6daf2299 | /code/python/Day-89/SumNested.py | 790c9104c096a14e9c9ead74bef4561443cec9d7 | [] | no_license | TalatWaheed/100-days-code | 1934c8113e6e7be86ca86ea66c518d2f2cedf82a | b8fd92d4ddb6adc4089d38ac7ccd2184f9c47919 | refs/heads/master | 2021-07-04T14:28:45.363798 | 2019-03-05T13:49:55 | 2019-03-05T13:49:55 | 140,101,486 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 240 | py | def sum1(lst):
total = 0
for element in lst:
if (type(element) == type([])):
total = total + sum1(element)
else:
total = total + element
return total
print( "Sum is:",sum1([[1,2],[3,4]]))
| [
"noreply@github.com"
] | TalatWaheed.noreply@github.com |
7258c482e8ee9b88d64784f4b8132d59778a383d | 6c721f3cfce6dc88396cd3b5f6a59d65a2ea5033 | /some_learn/Data_Set_handle/Caltech-Dateset/test/caltech_generate_xml/generate_xml.py | 5252a995b10a61e6a84100101e23d4a81ac98bc2 | [
"MIT"
] | permissive | unicoe/PycharmProjects | 20a3dabe88c7874da54451c7bb16999afc0eee35 | 23ff314eb5ac9bfa01a8278089d722b5d0061751 | refs/heads/master | 2020-03-23T09:16:25.907188 | 2019-12-21T03:10:49 | 2019-12-21T03:10:49 | 141,377,686 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 6,550 | py | #!/usr/bin/env python
# coding:utf-8
#from xml.etree.ElementTree import Element, SubElement, tostring
from lxml.etree import Element, SubElement, tostring
import pprint
from xml.dom.minidom import parseString
import os
def mkdir(path):
import os
path = path.strip()
path = path.rstrip("\\")
isExists ... | [
"unicoe@163.com"
] | unicoe@163.com |
c91effaaaa7685813f70b6e5719bd5298048a24f | f714db4463dd37fc33382364dc4b1963a9053e49 | /src/sentry/integrations/msteams/utils.py | 3dd201dde1ca3bb9f4e5d09390e9154ffa859fb7 | [
"BUSL-1.1",
"Apache-2.0"
] | permissive | macher91/sentry | 92171c2ad23564bf52627fcd711855685b138cbd | dd94d574403c95eaea6d4ccf93526577f3d9261b | refs/heads/master | 2021-07-07T08:23:53.339912 | 2020-07-21T08:03:55 | 2020-07-21T08:03:55 | 140,079,930 | 0 | 0 | BSD-3-Clause | 2020-05-13T11:28:35 | 2018-07-07T11:50:48 | Python | UTF-8 | Python | false | false | 1,755 | py | from __future__ import absolute_import
from sentry.models import Integration
from sentry.utils.compat import filter
from .client import MsTeamsClient
MSTEAMS_MAX_ITERS = 100
def channel_filter(channel, name):
# the general channel has no name in the list
# retrieved from the REST API call
if channel.get... | [
"noreply@github.com"
] | macher91.noreply@github.com |
15b4273440bb14b4e5c6be697d42d8398d30d59e | 6034b74d0d31997aa46f669d3d77bb46e199a430 | /tests/test_dataset_processor.py | 6cae4a56b6cba92bb31d6fa50efab979b3b32076 | [
"Apache-2.0"
] | permissive | bupt-nlp/sequence-labeling-models | 5ea641eec4fad1f470bdb7f3dd64ef0b892ba557 | 75bb8c24098ad9f307605fad61d811bcd299cfcc | refs/heads/master | 2023-06-01T00:59:56.753952 | 2021-06-19T11:28:13 | 2021-06-19T11:28:13 | 287,694,702 | 2 | 2 | Apache-2.0 | 2020-08-15T07:07:06 | 2020-08-15T06:54:35 | null | UTF-8 | Python | false | false | 5,152 | py | from __future__ import annotations
import os
from typing import List, Tuple
from allennlp.data import Vocabulary, Instance
from allennlp.data.data_loaders import SimpleDataLoader, DataLoader
from allennlp.data.token_indexers.pretrained_transformer_indexer import PretrainedTransformerIndexer
from allennlp.data.dataset... | [
"1435130236@qq.com"
] | 1435130236@qq.com |
f98f2e83b1096b53c66e15f0fbf035ddc93c1d8e | 197420c1f28ccb98059888dff214c9fd7226e743 | /happy_pythoning_cource_2_prodv/3.1 Bool/3.1. bool.py | be2e6728722c29ced0d3c7440e63523df6444bf2 | [] | no_license | Vovanuch/python-basics-1 | fc10b6f745defff31364b66c65a704a9cf05d076 | a29affec12e8b80a1d3beda3a50cde4867b1dee2 | refs/heads/master | 2023-07-06T17:10:46.341121 | 2021-08-06T05:38:19 | 2021-08-06T05:38:19 | 267,504,364 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 283 | py | '''
Что будет выведено на экран в результате выполнения следующей программы?
'''
numbers = [-6, -8, 0, 1, 3, 8, -7, 12, 17, 24, 25, 3, 5, 1]
res = 0
for num in numbers:
res += (num % 2 == 1) and (num > 1)
print(res) | [
"vetohin.vladimir@gmail.com"
] | vetohin.vladimir@gmail.com |
cfcc64c2dd2a5398b2f9b30038ba8ada47ef3178 | 31023b59e743b5bef1c2c935dc1f2b26e8e10e9b | /线程进程/进程间通信/数据共享.py | ef96b8051c960f8e1af50dca4856fa31d9922af5 | [] | no_license | hsyy673150343/PythonLearning | 417650d8ab5dbafbede08ef40223b29e82738443 | 817c6bd4c2ecba2549fa0be9f0c41337fe5acfdf | refs/heads/master | 2020-05-18T06:36:25.648709 | 2019-05-23T13:40:59 | 2019-05-23T13:40:59 | 184,239,403 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 600 | py | #!/usr/bin/env python
# -*- coding:utf8 -*-
# @TIME :2019/3/20 19:33
# @Author : 洪松
# @File : 数据共享.py
from multiprocessing import Process, Manager
def f(d, l,n):
d[n] = n
d["name"] ="alvin"
l.append(n)
if __name__ == '__main__':
with Manager() as manager:
d = manager.dict()
... | [
"13096337080@163.com"
] | 13096337080@163.com |
4d4d16b4c0f08b20c039e19a68cbe44848bc592a | e9a210d6e58bd0450197dfb4bbbc03f66788a297 | /eventplus/talks/migrations/0005_auto_20171031_0209.py | 3d87473b034b28fb35cd41f7b8916e329532208b | [] | no_license | werberth/EventPlus | 3895587c8f4b2b6cc03507d10badd3c3cd2c28c9 | d80c2ab5ec30fa83950380567195514df1cc9892 | refs/heads/master | 2021-08-28T17:00:21.363698 | 2017-12-12T21:10:16 | 2017-12-12T21:10:16 | 108,935,215 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 449 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-10-31 05:09
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('talks', '0004_auto_20171029_2142'),
]
operations = [
migrations.AlterField(
... | [
"werberthvinicius@gmail.com"
] | werberthvinicius@gmail.com |
3548555fe01d146e2f03abab2eaebe86099355ba | 71e49ae86e6398f3278a031edaeebee2218c8b9b | /todo_django/todo_django/settings.py | 6abb1e168465164fa89608d6d98a73a2d985b19f | [] | no_license | swestphal/todo | 38558688063089b30e0ac1ca4906ef1f2d816ad8 | 97ef67696abd4e46fcc5a61270d6ad60596de321 | refs/heads/main | 2023-05-13T11:25:26.614616 | 2021-05-28T15:26:19 | 2021-05-28T15:26:19 | 371,403,392 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,405 | py | """
Django settings for todo_django project.
Generated by 'django-admin startproject' using Django 3.2.3.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from pat... | [
"hello@swestphal.io"
] | hello@swestphal.io |
e5715062db6a8e7bb894b4f5bd2d275d98e604be | 0fb505765604b586c3a46e608fc23930f8501db5 | /venv/lib/python2.7/site-packages/django/contrib/messages/apps.py | 1a9189383ef26083e87cbc3f46cf61eaad518797 | [
"MIT"
] | permissive | domenicosolazzo/practice-django | b05edecc302d97c97b7ce1de809ea46d59e2f0e6 | 44e74c973384c38bd71e7c8a1aacd1e10d6a6893 | refs/heads/master | 2021-08-19T15:36:22.732954 | 2015-01-22T18:42:14 | 2015-01-22T18:42:14 | 25,118,384 | 0 | 0 | MIT | 2021-06-10T19:50:51 | 2014-10-12T12:08:47 | Python | UTF-8 | Python | false | false | 196 | py | from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class MessagesConfig(AppConfig):
name = 'django.contrib.messages'
verbose_name = _("Messages")
| [
"solazzo.domenico@gmail.com"
] | solazzo.domenico@gmail.com |
7f847a8a75b0bd5215fc381713b860453fc20803 | d05a59feee839a4af352b7ed2fd6cf10a288a3cb | /xlsxwriter/test/comparison/test_chart_format24.py | 017038f19ec35b57c30a8bd3b6c3821087c59443 | [
"BSD-2-Clause-Views"
] | permissive | elessarelfstone/XlsxWriter | 0d958afd593643f990373bd4d8a32bafc0966534 | bb7b7881c7a93c89d6eaac25f12dda08d58d3046 | refs/heads/master | 2020-09-24T06:17:20.840848 | 2019-11-24T23:43:01 | 2019-11-24T23:43:01 | 225,685,272 | 1 | 0 | NOASSERTION | 2019-12-03T18:09:06 | 2019-12-03T18:09:05 | null | UTF-8 | Python | false | false | 1,555 | py | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2019, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparsion_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompareXLSXFiles(ExcelComparisonTest):
"""... | [
"jmcnamara@cpan.org"
] | jmcnamara@cpan.org |
ec9733d55c01eb7e99f50e9f9fa51fd0cb38aaf4 | 6662aa37e6a5df5ef72359f5e52ba74a77ef00b6 | /sensors/gps_2.py | 886adcf175323e317a3326910e154dad195e52be | [] | no_license | rice-eclipse/RTR-PocketBeagle | b3f4a7536a28d5e412e7184dc8399558264f0e78 | 11939281355204c08f32da316ee35061def254f0 | refs/heads/master | 2023-01-01T18:28:53.201874 | 2020-10-24T18:48:15 | 2020-10-24T18:48:15 | 295,223,021 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,667 | py | # Simple GPS module demonstration.
# Will print NMEA sentences received from the GPS, great for testing connection
# Uses the GPS to send some commands, then reads directly from the GPS
import time
import board
#import busio
import adafruit_gps
import digitalio
# Create a serial connection for the GPS connection using... | [
"debian@beaglebone.localdomain"
] | debian@beaglebone.localdomain |
317316afc2eda10a2c3dfedce7768855c411e93a | 6aa36fee3f4fcc9ac8f5509e51ea6bd8fc05b39b | /virtualenv-flask/lib/python2.7/site-packages/cybox/helper.py | f65d1b9819c9e719d461e09d6c1d1c63d37795f0 | [] | no_license | syn-ack-zack/msg-stix-parser | 8c46c4d897d579162f224360a077ac42f28ffe89 | 1edb7c3b6d60f76f24b91830a1ae7076d46ede14 | refs/heads/master | 2021-03-27T15:01:07.344754 | 2016-09-30T16:43:22 | 2016-09-30T16:43:22 | 69,684,161 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,178 | py | #!/usr/bin/env python
# Copyright (c) 2013, The MITRE Corporation. All rights reserved.
# See LICENSE.txt for complete terms.
'''
CybOX Common Indicator API
An api for creating observables for common indicators:
ipv4 addresses, domain names, file hashes, and urls.
'''
import sys
import uuid
from cybox.core import ... | [
"nagaich@localhost.localdomain"
] | nagaich@localhost.localdomain |
7197e5b320ce581df451038b10cf2e2ca4b3c204 | e28009b0a4584e8d128ed6fbd4ba84a1db11d1b9 | /824.Goat Latin/824.Goat Latin.py | 9a074961d672b68bff7b9d3ae8faee89d99a8b11 | [] | no_license | jerrylance/LeetCode | 509d16e4285296167feb51a80d6c382b3833405e | 06ed3e9b27a3f1c0c517710d57fbbd794fd83e45 | refs/heads/master | 2020-12-02T23:10:27.382142 | 2020-08-02T02:03:54 | 2020-08-02T02:03:54 | 231,141,551 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 906 | py | # LeetCode Solution
# Zeyu Liu
# 2019.6.12
# 824.Goat Latin
from typing import List
# method 1 straight forward
class Solution:
def toGoatLatin(self, S: str) -> str:
vowel = ['a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U']
res = []
S = S.split()
for i,v in enumerate(S)... | [
"noreply@github.com"
] | jerrylance.noreply@github.com |
5948942590110adf43f925fd248d417aae92946d | ea88fac1da1b02e77180c2e20e1fd49b919eecf5 | /installer/core/providers/aws/boto3/rds.py | 30e547edc215610260da165de7c20d672e56f79c | [
"Apache-2.0"
] | permissive | jacob-kinzer/pacbot | 7eeb667505e0ddfd333f6e423b51b8199b481692 | d78605e9e3fd8c34435636495cd6d51c677754e3 | refs/heads/master | 2020-04-23T21:46:42.251948 | 2019-02-06T20:47:08 | 2019-02-06T20:47:08 | 171,480,569 | 0 | 0 | null | 2019-02-19T13:41:01 | 2019-02-19T13:41:00 | null | UTF-8 | Python | false | false | 1,610 | py | import boto3
def get_rds_client(access_key, secret_key, region):
return boto3.client(
'rds',
region_name=region,
aws_access_key_id=access_key,
aws_secret_access_key=secret_key)
def check_rds_instance_exists(instance_identifier, access_key, secret_key, region):
client = get_rd... | [
"sanjnur@gmail.com"
] | sanjnur@gmail.com |
929c23a9620adf2f1c003ec9135e45ad81261b01 | 010c5fbc97731286be00028ff33fc981d943bca3 | /primal/src/system/bin-data/lift_over.py | a2fcb668400bd441d0a7b9f2cd1b78e1afe870a1 | [] | no_license | orenlivne/ober | 6ce41e0f75d3a8baebc53e28d7f6ae4aeb645f30 | 810b16b2611f32c191182042240851152784edea | refs/heads/master | 2021-01-23T13:48:49.172653 | 2014-04-03T13:57:44 | 2014-04-03T13:57:44 | 6,902,212 | 7 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,139 | py | #!/usr/bin/env python
'''
============================================================
Convert coordinates read from stdin from one human genome
build to another.
Usage: lift_over.py <from-build> <to-build>
stdin line format: chrom bp_in_from_build
stdout line format: bp_in_to_build, or '-' if not found
Created on F... | [
"oren.livne@gmail.com"
] | oren.livne@gmail.com |
4ac2d30029f1696f61dc06f4ed732f1df62f1975 | 5ce393ca7d50b35c41f65188dfe8423646b2fcbc | /flask_with_spark/utilities/decorators.py | eef1b78e8690d55b6feb452f294174d73054c5b1 | [
"MIT"
] | permissive | todhm/have_you_read_this_book | 0c7894319705ed4f047a6b936ab80ea239e5509c | 905cb1934bafc987b76b6e57dbc63285f491ac88 | refs/heads/master | 2022-11-24T07:36:12.514646 | 2018-08-07T05:00:33 | 2018-08-07T05:00:33 | 141,091,550 | 2 | 0 | MIT | 2022-11-11T07:26:01 | 2018-07-16T05:42:52 | JavaScript | UTF-8 | Python | false | false | 750 | py | from functools import wraps
from flask import session,request,redirect,url_for, abort
def login_required(f):
@wraps(f)
def decorated_function(*args,**kwargs):
if session.get('email') is None:
return redirect(url_for('user_app.login',next=request.url))
if session.get('userIntId') is... | [
"todhm@nate.com"
] | todhm@nate.com |
4defe82f22c6b83db3cff78f6e922aefcdaf6ec9 | f569978afb27e72bf6a88438aa622b8c50cbc61b | /douyin_open/VideoListVideoList/models/inline_response200_data.py | 84ccfc29afdb3da81d954674bb7beb2eca74eec5 | [] | no_license | strangebank/swagger-petstore-perl | 4834409d6225b8a09b8195128d74a9b10ef1484a | 49dfc229e2e897cdb15cbf969121713162154f28 | refs/heads/master | 2023-01-05T10:21:33.518937 | 2020-11-05T04:33:16 | 2020-11-05T04:33:16 | 310,189,316 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,561 | py | # coding: utf-8
"""
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: 1.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class InlineRe... | [
"strangebank@gmail.com"
] | strangebank@gmail.com |
0955c0d21f9a00b48526ba7a9c1c612b49f3afa2 | a0eea3e416a050168aba0876c33a8fddf310868a | /src/eavatar.x.hub/eavatar/hub/avatar.py | db30881d9fe987bf3e1717de9e5f9638a4226eeb | [] | no_license | eavatar/exchange-hub | a0dee945da6922408773a8d5bd1b9029fcf55dd6 | c78cdc6aa357442001c76c0daaca3597cd8b4adf | refs/heads/master | 2021-01-13T14:28:29.968008 | 2015-03-05T13:47:18 | 2015-03-05T13:47:18 | 30,749,051 | 0 | 0 | null | 2015-03-05T13:47:19 | 2015-02-13T09:16:04 | Python | UTF-8 | Python | false | false | 3,307 | py | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
"""
Avatar-specific functionality.
"""
import json
import time
import logging
import falcon
from datetime import datetime, timedelta
from cqlengine import columns
from cqlengine.models import Model
from eavatar.... | [
"sam@eavatar.com"
] | sam@eavatar.com |
f3dd5b4353dff6f6cef8c9eb4092d47fdf047aaa | 80b545522375b2b8bbfdff0f540b1172e53b140c | /djecommerce/settings/development.py | 3911c6f54c156da5237c8b83486eff63c55810d2 | [] | no_license | DuncanMoyo/django-ecommerce-website | 18e1e8dcf358de6758ad7974a703145ed5cab4db | 21783c3d4159adffabbfc522099cf9c55346bed8 | refs/heads/master | 2022-12-11T15:14:51.039929 | 2019-08-31T20:48:59 | 2019-08-31T20:48:59 | 196,033,607 | 0 | 0 | null | 2022-12-08T05:51:59 | 2019-07-09T15:14:11 | JavaScript | UTF-8 | Python | false | false | 1,244 | py | from .base import *
DEBUG = True
ALLOWED_HOSTS = ['127.0.0.1']
INSTALLED_APPS += [
'debug_toolbar'
]
MIDDLEWARE += ['debug_toolbar.middleware.DebugToolbarMiddleware',]
# DEBUG TOOLBAR SETTINGS
DEBUG_TOOLBAR_PANELS = [
'debug_toolbar.panels.versions.VersionsPanel',
'debug_toolbar.panels.timer.TimerPanel... | [
"duncanfmoyo@gmail.com"
] | duncanfmoyo@gmail.com |
691d6cbe2f9a10ae712c4829e33e1f99b6e87147 | f1e7f6c34316828eb541d76e160c43e2e61743c8 | /ate/main.py | 7b19cea3a56cefb0c8e9b9d5baa47c7a1d9d312e | [
"MIT"
] | permissive | luochun3731/ApiTestEngine | 216fc95b8e1d5423cc24083ffac22d119f4a789e | b75e17e7c7a73047660fe13accab4653aa0fa5fb | refs/heads/master | 2021-01-01T15:47:26.516079 | 2017-07-18T04:24:51 | 2017-07-18T04:24:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,597 | py | import os
import argparse
import logging
import unittest
import HtmlTestRunner
from ate import runner, utils
class ApiTestCase(unittest.TestCase):
""" create a testcase.
"""
def __init__(self, test_runner, testcase):
super(ApiTestCase, self).__init__()
self.test_runner = test_runner
... | [
"mail@debugtalk.com"
] | mail@debugtalk.com |
70141887bb0e0c852255ad1ce9359dbad564f6f4 | 5d1e737816e53cdb0056031f49267467b0a8de77 | /visualize_cspace_and_workspace.py | aa42f09da550cf0bb13d9c643deee5e32f830a16 | [] | no_license | aorthey/configuration-space-visualizer | ab4fe297b586d0e7acb2bc58c14b09253da47fec | e839cc839be37de98c6f34ff5ca6347173fc8e45 | refs/heads/master | 2020-06-01T09:56:01.209503 | 2020-04-28T10:43:27 | 2020-04-28T10:43:27 | 190,740,072 | 2 | 3 | null | 2019-07-25T11:20:53 | 2019-06-07T12:30:03 | Python | UTF-8 | Python | false | false | 2,745 | py | import sys
import numpy as np
from src.cspace_visualizer import *
import os
if not os.path.exists("images"):
os.makedirs("images")
from worlds import manipulator_2dof as World
from matplotlib.ticker import MaxNLocator
world = World.Manipulator2dof()
worldName = world.getName()
N = 200
c1 = (0.9,0.9,0.9)
c2 = (0.7,0... | [
"andreas.orthey@gmx.de"
] | andreas.orthey@gmx.de |
b1d35b14319ee88f737697a4ff38b5548b64a8e8 | cd4bbecc3f713b0c25508d0c5674d9e103db5df4 | /toontown/fishing/DistributedFishingTarget.py | 69a3ef13a7dc66adb05d96a2986dc55852deddf6 | [] | no_license | peppythegod/ToontownOnline | dce0351cfa1ad8c476e035aa3947fdf53de916a6 | 2e5a106f3027714d301f284721382cb956cd87a0 | refs/heads/master | 2020-04-20T05:05:22.934339 | 2020-01-02T18:05:28 | 2020-01-02T18:05:28 | 168,646,608 | 11 | 2 | null | null | null | null | UTF-8 | Python | false | false | 2,803 | py | from pandac.PandaModules import *
from direct.distributed.ClockDelta import *
from direct.interval.IntervalGlobal import *
from direct.directnotify import DirectNotifyGlobal
from direct.distributed import DistributedNode
from direct.fsm import ClassicFSM
from direct.fsm import State
from direct.directutil import Mopath... | [
"47166977+peppythegod@users.noreply.github.com"
] | 47166977+peppythegod@users.noreply.github.com |
92d2540caa11631b2211b05ce1cd8a3ec146552b | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/otherforms/_currycombs.py | 697fc9498aafda38d96c4b64c23d5633a1a39751 | [
"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 | 234 | py |
#calss header
class _CURRYCOMBS():
def __init__(self,):
self.name = "CURRYCOMBS"
self.definitions = currycomb
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.basic = ['currycomb']
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
70ffe5314419bb5044b3a9f8f244447a6aad5a93 | c1267fbec95318184e7388cddf9b7085f797d514 | /2023/05 May/db05232023.py | 5dc2d55800b8a6bd5a3a2bcf895e58b5ac20691d | [
"MIT"
] | permissive | vishrutkmr7/DailyPracticeProblemsDIP | 1aedfd2e173847bf22989a6b0ec550acebb2bd86 | 2c365f633a1e1bee281fbdc314969f03b17ac9ec | refs/heads/master | 2023-05-31T23:49:52.135349 | 2023-05-28T09:32:12 | 2023-05-28T09:32:12 | 199,596,248 | 10 | 4 | MIT | 2022-11-02T21:31:59 | 2019-07-30T07:12:46 | Python | UTF-8 | Python | false | false | 1,310 | py | """
You are on the command line of a computer in the root directory and given a list of commands to run.
The commands consist of three possible operations, ../ which brings you to the parent directory (or
nowhere if you’re already in the root directory), ./ which keeps you in the current directory, and
directory_name/ ... | [
"vishrutkmr7@gmail.com"
] | vishrutkmr7@gmail.com |
a87207e9eff593413fc1fe99434da4f68da15b15 | 025abc9e70eb347e688a90bdf3030db120e8824b | /python_script/test_rolling_sphere.py | c4f43ab61ff56c9f2f8b47da5e867ab321a5335b | [
"BSD-3-Clause"
] | permissive | listenzcc/3D_model_matlab | 6953a2ebbb55373a749aebc5101166e327c45cb5 | 2dcaf50a51cf02591737aaa6b4924ed3848f1840 | refs/heads/master | 2020-04-24T02:34:58.093612 | 2019-05-28T04:05:29 | 2019-05-28T04:05:29 | 171,641,961 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,090 | py | # code: utf-8
from mpl_toolkits.mplot3d import proj3d
from matplotlib import animation
import matplotlib.pyplot as plt
import numpy as np
fig = plt.figure()
ax = fig.gca(projection='3d')
ax.set_aspect("equal")
# draw sphere
def init():
u, v = np.mgrid[0:2*np.pi:20j, 0:np.pi:10j]
x = np.cos(u)*np.sin(v)
... | [
"listenzcc@mail.bnu.edu.cn"
] | listenzcc@mail.bnu.edu.cn |
3eb0059440e55929683569010648a2bfee9d1a04 | 9ae6ce54bf9a2a86201961fdbd5e7b0ec913ff56 | /google/ads/googleads/v9/services/services/campaign_criterion_simulation_service/transports/base.py | aa5d97f44787ec6884d649ce8947e8a4c96799a0 | [
"Apache-2.0"
] | permissive | GerhardusM/google-ads-python | 73b275a06e5401e6b951a6cd99af98c247e34aa3 | 676ac5fcb5bec0d9b5897f4c950049dac5647555 | refs/heads/master | 2022-07-06T19:05:50.932553 | 2022-06-17T20:41:17 | 2022-06-17T20:41:17 | 207,535,443 | 0 | 0 | Apache-2.0 | 2019-09-10T10:58:55 | 2019-09-10T10:58:55 | null | UTF-8 | Python | false | false | 4,107 | py | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | [
"noreply@github.com"
] | GerhardusM.noreply@github.com |
81218cbe35e6ef4a09627951ac0eab617bd94d2c | fa0c53ac2a91409eaf0fc7c082a40caae3ffa0d8 | /com/lc/python_1_100_Days_Demo/Day01-15/Day09/code/employee.py | ac82d97c526cf06934a23fa8d2368df0c8c0cd8a | [] | no_license | ahviplc/pythonLCDemo | aba6d8deb1e766841461bd772560d1d50450057b | 22f149600dcfd4d769e9f74f1f12e3c3564e88c2 | refs/heads/master | 2023-07-24T01:41:59.791913 | 2023-07-07T02:32:45 | 2023-07-07T02:32:45 | 135,969,516 | 7 | 2 | null | 2023-02-02T03:24:14 | 2018-06-04T04:12:49 | Python | UTF-8 | Python | false | false | 1,824 | py | """
抽象类 / 方法重写 / 多态
实现一个工资结算系统 公司有三种类型的员工
- 部门经理固定月薪12000元/月
- 程序员按本月工作小时数每小时100元
- 销售员1500元/月的底薪加上本月销售额5%的提成
输入员工的信息 输出每位员工的月薪信息
Version: 0.1
Author: LC
DateTime:2018年9月18日13:55:50
一加壹博客最Top-一起共创1+1>2的力量!~LC
LC博客url: http://oneplusone.top/index.html
"""
from abc import ABCMeta, abstractmethod
class Employee(o... | [
"ahlc@sina.cn"
] | ahlc@sina.cn |
8ca313a6343af6f39fca663bf4e7b08003d71448 | 98c6ea9c884152e8340605a706efefbea6170be5 | /examples/data/Assignment_2/klmale001/question2.py | 74abd3ce5a120172d6cab928acbe28d3e19dd740 | [] | no_license | MrHamdulay/csc3-capstone | 479d659e1dcd28040e83ebd9e3374d0ccc0c6817 | 6f0fa0fa1555ceb1b0fb33f25e9694e68b6a53d2 | refs/heads/master | 2021-03-12T21:55:57.781339 | 2014-09-22T02:22:22 | 2014-09-22T02:22:22 | 22,372,174 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,046 | py | print('Welcome to the 30 Second Rule Expert')
print('------------------------------------')
print('Answer the following questions by selecting from among the options.')
if input('Did anyone see you? (yes/no)\n')=="yes":
if input('Was it a boss/lover/parent? (yes/no)\n')=='yes':
if input('Was it expensi... | [
"jarr2000@gmail.com"
] | jarr2000@gmail.com |
bceef0b93c3691d490c863dae8725908c66c9136 | 92a6b3dfbaa5ee932b7ecebcb5dad66c878163d5 | /机器学习的代码/hello_world_linear_model.py | c4455c7476f4610d89a4df7aabe14b25e497a6d2 | [] | no_license | Color4/2017_code_updata_to_use | c99e9cf409904531813e69e5106b4650a1863979 | a531d2b61d6984b4101af68bf1e54783d5e0843b | refs/heads/master | 2020-03-31T20:14:34.366303 | 2018-10-08T04:58:10 | 2018-10-08T04:58:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,835 | py | import tensorflow as tf
import numpy
import matplotlib.pyplot as plt
rng = numpy.random
# Parameters
learning_rate = 0.01
training_epochs = 2000
display_step = 50
# Training Data
train_X = numpy.asarray([3.3,4.4,5.5,6.71,6.93,4.168,9.779,6.182,7.59,2.167,7.042,10.791,5.313,7.997,5.654,9.27,3.1])
train_Y = numpy.asa... | [
"zhangp@origimed.com"
] | zhangp@origimed.com |
b0b0f2739ca965c635b18a5027894999d2f8ca3c | ddaef23fe2e8da8153d69c5fc95421cc70f0d76c | /hc/api/decorators.py | bff56dda347bd98b691fd63c97deb7217b1f5210 | [
"BSD-3-Clause"
] | permissive | PagerTree/healthchecks | ee706b7b86a96c86d00428bdae96f4711e03bbde | ae53aaaa3a9f3e420858f9b877dd5047fae689ee | refs/heads/master | 2023-01-10T00:14:15.735248 | 2022-12-20T14:23:33 | 2022-12-20T14:23:33 | 114,281,135 | 0 | 1 | null | 2017-12-14T18:03:00 | 2017-12-14T18:03:00 | null | UTF-8 | Python | false | false | 3,708 | py | from __future__ import annotations
import json
from functools import wraps
from django.db.models import Q
from django.http import HttpResponse, JsonResponse
from hc.accounts.models import Project
from hc.lib.jsonschema import ValidationError, validate
def error(msg, status=400):
return JsonResponse({"error": m... | [
"cuu508@gmail.com"
] | cuu508@gmail.com |
29922bc33b6c89fc40112d18ddfad5c53622011d | 16270d37d819a35777ab6d6a6430cd63551917f1 | /handlers/newpost.py | 7299307b23a91c08ba2ee439648df4749e4e1c09 | [] | no_license | SteadBytes/multi-user-blog | de28673155b81bd22e6cb57825670beca9ffdcf0 | a3269a949753c72fad0915a1a6feafe50d75c4e3 | refs/heads/master | 2021-06-22T13:42:58.381491 | 2017-06-28T15:22:14 | 2017-06-28T15:22:14 | 89,211,765 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,182 | py | from handlers.blog import BlogHandler
from models.blogpost import BlogPost
from helpers import *
class NewPostHandler(BlogHandler):
"""Handler for '/blog/newpost'.
"""
def render_new_post(self, subject="", content="", error=""):
self.render("new_post.html.j2", subject=subject,
... | [
"="
] | = |
a5911ccfb35e51051246e197db71d55138d3c634 | 6df062cecf36b3e0ae46a84e28b3af50f179c442 | /autouri/metadata.py | e5ab73e28370c1cdcc262b3ccad79285964efd3d | [
"MIT"
] | permissive | ENCODE-DCC/autouri | 81b8b0807c05f17c125fe90f125f516a5a1fcec7 | 73d97ac2ee98bd153abe2f34cbdd89bf3c7aea24 | refs/heads/master | 2023-05-12T06:11:00.576561 | 2023-05-04T17:33:52 | 2023-05-04T17:33:52 | 222,572,865 | 0 | 1 | MIT | 2023-05-04T17:33:53 | 2019-11-19T00:33:18 | Python | UTF-8 | Python | false | false | 1,380 | py | """URIMetadata and helper functions for metadata
"""
import warnings
from base64 import b64decode
from binascii import hexlify
from collections import namedtuple
from datetime import datetime, timezone
from dateparser import parse as dateparser_parse
from dateutil.parser import parse as dateutil_parse
URIMetadata = n... | [
"leepc12@gmail.com"
] | leepc12@gmail.com |
a5a87d9cb88235ea15ab3e8f5388bacc96dbfbea | b1926953762b3720a9b5e4f7e136c3f296765f4b | /0x09-utf8_validation/0-validate_utf8.py | c026393dd80a6751dde74b661baa470fb11e7cea | [] | no_license | Nukemenonai/holbertonschool-interview | 2fd637e50d943fb5735012eee074f4c272c86e83 | 3c2727aaf91f4cccfce7c05406cac8b9c10f6e2d | refs/heads/master | 2023-06-26T13:32:30.568587 | 2021-07-29T01:20:08 | 2021-07-29T01:20:08 | 280,456,322 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 714 | py | #!/usr/bin/python3
"""
utf validator
"""
def validUTF8(data):
"""
checks if an array if integers representing a UTF-8 is valid UTF-8
data: list of integers
returns: true if valid else 0
"""
n_bytes = 0
for num in data:
bin_rep = format(num, '#010b')[-8:]
if n_bytes == 0:
... | [
"david.giovanni.ovalle@gmail.com"
] | david.giovanni.ovalle@gmail.com |
9bb14ece250d2ec5a2cf8da15216e6244b49cb44 | d7df481f20826849b208f2b62eff53d8d107eeff | /ch5/multi3.py | 3ec9f68a0da4de3c70e95033f4d0a2367ec0ee86 | [] | no_license | jemuelb/programming-python-2 | 5f847d591129ae2071cf2937f7853fda654a4e09 | 07f1b36f6017f7c310ac89a62fa8f8280aac9b8c | refs/heads/master | 2021-05-01T19:23:15.748425 | 2018-03-04T22:53:30 | 2018-03-04T22:53:30 | 121,020,259 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,457 | py | """
Use multiprocess shared memory objects to communicate.
Passed objects are shared, but globals are not on Windows.
Last test here reflects common use case: distributing work.
"""
import os
from multiprocessing import Process, Value, Array
procs = 3
count = 0
def showdata(label, val, arr):
"""
print data ... | [
"jemuelb@gmail.com"
] | jemuelb@gmail.com |
bbdaf5b5723f6bf90d7a7615c82525fa5e2c3298 | 50e375bdc8affc1a8c09aa567a740fa19df7d5a6 | /DSBQ/venv/bin/chardetect | 5b47b8e5fd7a90a96a565e185674e79a64bd2b81 | [] | no_license | michTalebzadeh/SparkStructuredStreaming | ca7a257626e251c7b03a9844cfd229fa8ea95af5 | 87ef34ffe52061fcbb4f22fcd97764037717696a | refs/heads/master | 2023-07-13T00:49:10.753863 | 2021-07-12T16:39:50 | 2021-07-12T16:39:50 | 364,826,528 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 254 | #!/home/hduser/PycharmProjects/DSBQ/venv/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from chardet.cli.chardetect import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
| [
"mich.talebzadeh@gmail.com"
] | mich.talebzadeh@gmail.com | |
1fe8d88dbb1f77c4ea991f377fb063188a87e733 | 6810a482759afd585db7bb0b85fd0416f0450e6d | /Open Kattis/tolower.py | 7daf83d10d73126578159f631168fa5092a44ace | [] | no_license | BenRStutzman/kattis | 01b000ac2353c8b8000c6bddec3698f66b0198ef | 005720f853e7f531a264227d0d9aaa19d4d7cf1b | refs/heads/master | 2020-07-15T23:52:45.785021 | 2019-11-09T03:28:06 | 2019-11-09T03:28:06 | 205,675,532 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 464 | py | import sys
def main():
inp = sys.stdin.read().splitlines()
P, T = [int(num) for num in inp[0].split()]
num_right = 0
for problem in range(1, P * T + 1, T):
#print('NEW PROBLEM')
for case in range(problem, problem + T):
string = inp[case]
#print(string)
... | [
"tysorx89@gmail.com"
] | tysorx89@gmail.com |
144944f86d23e3dd519eba2f3a2d474bfcad06bc | c36d9d70cbb257b2ce9a214bcf38f8091e8fe9b7 | /75_sort_color.py | 7bcae70f22da475f20b84852253654c068fa61d1 | [] | no_license | zdadadaz/coding_practice | 3452e4fc8f4a79cb98d0d4ea06ce0bcae85f96a0 | 5ed070f22f4bc29777ee5cbb01bb9583726d8799 | refs/heads/master | 2021-06-23T17:52:40.149982 | 2021-05-03T22:31:23 | 2021-05-03T22:31:23 | 226,006,763 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,510 | py | class Solution:
def sortColors(self, nums):
"""
Do not return anything, modify nums in-place instead.
"""
self.recur(nums,0,len(nums)-1)
def recur(self,nums, lt, rt):
if lt<rt:
print(lt,rt)
pivot_idx = self.rearrange(nums, lt, rt)
... | [
"zdadadaz5566@gmail.com"
] | zdadadaz5566@gmail.com |
d12aec597ccbdf191c9024d967f7c6d1b7b636ed | 2ff2f41c6fe48a4961513ca6deefbc5b393c406e | /python/tvm/contrib/dlpack.py | 11db29f98b3ea308493040c592bdc92c390450a9 | [
"Apache-2.0"
] | permissive | zhiics/tvm | 9f5a39c6373349800b9255d74225d5dd65aba70f | 4782b1fc153d6614808f542155d58188f2dc8255 | refs/heads/master | 2021-12-21T03:24:31.176090 | 2018-09-05T22:48:37 | 2018-09-05T22:48:37 | 143,820,078 | 6 | 2 | Apache-2.0 | 2020-05-13T00:54:21 | 2018-08-07T04:34:08 | C++ | UTF-8 | Python | false | false | 1,251 | py | """Wrapping functions to bridge frameworks with DLPack support to TVM"""
from .. import ndarray
def convert_func(tvm_func, tensor_type, to_dlpack_func):
"""Convert a tvm function into one that accepts a tensor from another
framework, provided the other framework supports DLPACK
Parameters
---------... | [
"tqchen@users.noreply.github.com"
] | tqchen@users.noreply.github.com |
c9f4124207254efef396011f078633f4edf00400 | 8e39f7ab3d728aaa593a0c0ddd113ea8e6f287c6 | /14_ulter)table.py | b0ca45650e4fa1679ae40301ec502f9c1fd74489 | [] | no_license | tamercs2005/Python-MySQL-Guide | 423ffd502cd08de2850f25f3cfad47983e0949eb | 01917a31038517dfcabe7f5400262792d5b86ef7 | refs/heads/master | 2021-05-22T01:01:21.988815 | 2020-04-02T08:41:40 | 2020-04-02T08:41:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 356 | py | import mysql.connector
myconn = mysql.connector.connect(
host="localhost" ,
user = "root" ,
passwd = "toor" ,
database='mydatabase'
)
mycursor = myconn.cursor()
# mycursor.execute(" ALTER TABLE movies ADD COLUMN language VARCHAR(30)")
mycursor.execute(" ALTER TABLE movies CHANGE language language... | [
"pythondeveloper6@gmail.com"
] | pythondeveloper6@gmail.com |
d7d8e8c5e21f43299f74516f10cb59ddbb9faaba | 9680ba23fd13b4bc0fc3ce0c9f02bb88c6da73e4 | /Bernd Klein (520) ile Python/p_20702.py | fdd42efc88e98cd52221dee5ff8c40475d982f06 | [] | no_license | mnihatyavas/Python-uygulamalar | 694091545a24f50a40a2ef63a3d96354a57c8859 | 688e0dbde24b5605e045c8ec2a9c772ab5f0f244 | refs/heads/master | 2020-08-23T19:12:42.897039 | 2020-04-24T22:45:22 | 2020-04-24T22:45:22 | 216,670,169 | 0 | 0 | null | null | null | null | ISO-8859-9 | Python | false | false | 7,337 | py | # coding:iso-8859-9 Türkçe
# p_20702.py: Grafik sınıfıyla, yumru, bağlantı, izole, yeni yumru ve bağlantı ekleme örneği.
class Grafik (object):
def __init__ (self, grafikSözlüğü=None):
if grafikSözlüğü == None: grafikSözlüğü = {}
self.__grafikSözlüğü = grafikSözlüğü
def yumrular (self)... | [
"noreply@github.com"
] | mnihatyavas.noreply@github.com |
d02aa2b17cff92893dbbc39c51ae250ff988bac9 | 472578974401c83509d81ea4d832fc3fd821f295 | /python资料/day8.1/day02/exercise06.py | 55b143dd621190359b3f5a9fd71213fb7e669ccc | [
"MIT"
] | permissive | why1679158278/python-stu | f038ec89e9c3c7cc80dc0ff83b76e7c3078e279e | 0d95451f17e1d583d460b3698047dbe1a6910703 | refs/heads/master | 2023-01-05T04:34:56.128363 | 2020-11-06T09:05:16 | 2020-11-06T09:05:16 | 298,263,579 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 238 | py | """
古代的秤,一斤十六两。
在终端中获取两,计算几斤零几两。
"""
total_liang = int(input("请输入两:"))
jin = total_liang // 16
liang = total_liang % 16
print(str(jin) + "斤零" + str(liang) + "两")
| [
"1679158278@qq.com"
] | 1679158278@qq.com |
67048f55cb3fb75a8cae9b2b21d1dfcb147d6a37 | 70b339d0b2638a7914d0d56c5edf8a2637c9f4b0 | /sortedSquares.py | 2903b4c61f859f1b2a07c241e19027f5d65a4f57 | [] | no_license | pflun/advancedAlgorithms | 9991da7514024e18ba08de8688966b9220e12571 | 5520dbcd26999b98e1229bf03c2f62dd690a2ddc | refs/heads/master | 2023-02-19T12:05:26.902535 | 2023-02-14T06:08:54 | 2023-02-14T06:08:54 | 189,055,701 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 565 | py | class Solution(object):
# brutal force
def sortedSquares(self, A):
res = []
for a in A:
a *= a
res.append(a)
return sorted(res)
def sortedSquares2(self, A):
l = 0
r = len(A) - 1
res = []
while l <= r:
if A[l] * A[l]... | [
"zgao@gwu.edu"
] | zgao@gwu.edu |
4c428bc89f8805b8ef2093c63845593d05c4ce62 | 39cd9aa81927c20d85d1b65e55523455626ee902 | /python_work/chapter_9/exercises/9_7_admin.py | bfa5186b5cf37e58e1617c832d9bc40acb9e8e8f | [] | no_license | SMS-NED16/crash-course-python | acf363562a813f7deb36614dc935be4ed2d07fee | e6e6cb787d208f51f114f71331c43af1ddc1e4c2 | refs/heads/master | 2020-03-09T02:29:35.241621 | 2018-04-21T16:09:16 | 2018-04-21T16:09:16 | 128,541,065 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,544 | py | class User():
"""A class that models a user for an online forum"""
def __init__(self, f_name, l_name,
age, city, hometown, *languages):
"""Constructor - creates attributes, initialises them"""
self.first_name = f_name;
self.last_name = l_name;
self.age = age
self.city = city
self.hometown = hometown
... | [
"saadmsiddiqui96@gmail.com"
] | saadmsiddiqui96@gmail.com |
b8583d8e9f7866f782b43f9711befcd5252146ac | ea393959886a5cd13da4539d634f2ca0bbcd06a2 | /573.py | 42d030dc870c94f3d9e8565f14b11a340a9c8cdf | [] | no_license | zhangchizju2012/LeetCode | f605f35b82f16282559af71e4e61ec2629a90ebc | 0c4c38849309124121b03cc0b4bf39071b5d1c8c | refs/heads/master | 2020-04-05T12:12:14.810639 | 2018-08-09T10:24:52 | 2018-08-09T10:24:52 | 81,021,830 | 7 | 1 | null | null | null | null | UTF-8 | Python | false | false | 900 | py | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Sun May 7 10:19:34 2017
@author: zhangchi
"""
class Solution(object):
def minDistance(self, height, width, tree, squirrel, nuts):
"""
:type height: int
:type width: int
:type tree: List[int]
:type squirrel: List... | [
"zhangchizju2012@zju.edu.cn"
] | zhangchizju2012@zju.edu.cn |
affa813021fb253b56dceef1f271826d715e645c | 150d9e4cee92be00251625b7f9ff231cc8306e9f | /NumbersSmallerThanCurrent.py | 2bae72ae2f809266720b4eaf4ce851d1171905a7 | [] | no_license | JerinPaulS/Python-Programs | 0d3724ce277794be597104d9e8f8becb67282cb0 | d0778178d89d39a93ddb9b95ca18706554eb7655 | refs/heads/master | 2022-05-12T02:18:12.599648 | 2022-04-20T18:02:15 | 2022-04-20T18:02:15 | 216,547,245 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,377 | py | '''
1365. How Many Numbers Are Smaller Than the Current Number
Given the array nums, for each nums[i] find out how many numbers in the array are smaller than it. That is, for each nums[i] you have to count the number of valid j's such that j != i and nums[j] < nums[i].
Return the answer in an array.
Example 1:
In... | [
"jerinsprograms@gmail.com"
] | jerinsprograms@gmail.com |
64fb7280e68ec5647db275e2630d86e34c3f4531 | 751d837b8a4445877bb2f0d1e97ce41cd39ce1bd | /codegolf/ryleys-theorem.py | d1cab6a350c802b71d7905109a1cbddc1681610b | [
"MIT"
] | permissive | qeedquan/challenges | d55146f784a3619caa4541ac6f2b670b0a3dd8ba | 56823e77cf502bdea68cce0e1221f5add3d64d6a | refs/heads/master | 2023-08-11T20:35:09.726571 | 2023-08-11T13:02:43 | 2023-08-11T13:02:43 | 115,886,967 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,365 | py | #!/usr/bin/env python
"""
S. Ryley proved following theorem in 1825:
Every rational number can be expressed as a sum of three rational cubes.
Challenge
Given some rational number r∈Q find three rational numbers a,b,c∈Q such that
r=a^3+b^3+c^3.
Details
Your submission should be able to compute a solution for every ... | [
"qeed.quan@gmail.com"
] | qeed.quan@gmail.com |
35f1888cc5c9fc51aa085d4c3396ea1d040525b6 | e23a4f57ce5474d468258e5e63b9e23fb6011188 | /070_oop/008_metaprogramming/_exercises/templates/abc_Abstract Base Classes/a_002_abc_register.py | b8bfec0995c22298e2201c8eea4bad38aa21ba9e | [] | no_license | syurskyi/Python_Topics | 52851ecce000cb751a3b986408efe32f0b4c0835 | be331826b490b73f0a176e6abed86ef68ff2dd2b | refs/heads/master | 2023-06-08T19:29:16.214395 | 2023-05-29T17:09:11 | 2023-05-29T17:09:11 | 220,583,118 | 3 | 2 | null | 2023-02-16T03:08:10 | 2019-11-09T02:58:47 | Python | UTF-8 | Python | false | false | 1,704 | py | # # abc_register.py
#
# # Registering a Concrete Class
# # There are two ways to indicate that a concrete class implements an abstract API: either explicitly register the class
# # or create a new subclass directly from the abstract base. Use the register() class method as a decorator on a concrete
# # class to add it ... | [
"sergejyurskyj@yahoo.com"
] | sergejyurskyj@yahoo.com |
8f0df066964b1e9be5746d2af2975bece4df73dd | a46d135ba8fd7bd40f0b7d7a96c72be446025719 | /packages/python/plotly/plotly/validators/histogram/_textangle.py | 68378b446f6808b2e7ee34ebc5568780f31bdf59 | [
"MIT"
] | permissive | hugovk/plotly.py | 5e763fe96f225d964c4fcd1dea79dbefa50b4692 | cfad7862594b35965c0e000813bd7805e8494a5b | refs/heads/master | 2022-05-10T12:17:38.797994 | 2021-12-21T03:49:19 | 2021-12-21T03:49:19 | 234,146,634 | 0 | 0 | MIT | 2020-01-15T18:33:43 | 2020-01-15T18:33:41 | null | UTF-8 | Python | false | false | 403 | py | import _plotly_utils.basevalidators
class TextangleValidator(_plotly_utils.basevalidators.AngleValidator):
def __init__(self, plotly_name="textangle", parent_name="histogram", **kwargs):
super(TextangleValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | [
"nicolas@plot.ly"
] | nicolas@plot.ly |
1b5b98a0ebbbde2b3c9439d1ebe83df300ce4cec | e5eec1428da1d24d3e9b86f5723c51cd2ca636cd | /graph/크루스칼 알고리즘.py | ae3bd36d2be0371b0a25c5e8ea7b41ba0d1f97a7 | [] | no_license | jamwomsoo/Algorithm_prac | 3c36c381f59277721517d331a8f1640399d80c1d | 8393f3cc2f950214c47f3cf0b2c1271791f115d0 | refs/heads/master | 2023-06-09T06:49:14.739255 | 2021-06-18T06:41:01 | 2021-06-18T06:41:01 | 325,227,295 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,385 | py | # 특정 원소가 속한 집합을 찾기
def find_parent(parent, x):
# 루트 노드가 아니라면, 루트 노드를 찾을 때까지 재귀적으로 호출
if parent[x] != x:
parent[x] = find_parent(parent, parent[x])
return parent[x]
# 두 원소가 속한 집합을 합치기
def union_parent(parent, a, b):
a = find_parent(parent, a)
b = find_parent(parent, b)
if a < b:
... | [
"41579282+jamwomsoo@users.noreply.github.com"
] | 41579282+jamwomsoo@users.noreply.github.com |
a439223a06d02e7d8088ceb8471a3751f271d18a | 2e0e549394fefc3e7332170603f0be3b96fcb8f5 | /src/compas_ghpython/artists/lineartist.py | e6f8a82ad85c337d0de61df00022aa80fe98d0ce | [
"MIT"
] | permissive | irfanirw/compas | 02f6f15dc2e20de886faf5d77420fd55f6a03c4e | 41048e71610c3e063e3e9085440b3cba0a00b603 | refs/heads/master | 2022-11-29T18:59:18.344232 | 2020-08-17T19:04:14 | 2020-08-17T19:04:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,093 | py | from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
import compas_ghpython
from compas_ghpython.artists.primitiveartist import PrimitiveArtist
__all__ = ['LineArtist']
class LineArtist(PrimitiveArtist):
"""Artist for drawing lines.
Parameters
--... | [
"vanmelet@ethz.ch"
] | vanmelet@ethz.ch |
b124149598b75875c924a95d429ff80af9708bdd | c9bae3b822cf8c098e656486d455d88646d1712b | /starnavi_task/settings.py | db077ea080b9e03e959ce8620862d8c3de3557a8 | [] | no_license | sergiy-chumachenko/starnavi | f9967eeeec8803b58ecb0bdab28063431afc9cc7 | 1aa901ba42be1ef4322c9766ec58edecca07ce74 | refs/heads/master | 2022-12-10T20:25:46.923932 | 2020-07-18T17:22:07 | 2020-07-18T17:22:07 | 172,897,429 | 2 | 0 | null | 2022-12-08T01:39:44 | 2019-02-27T10:49:10 | Python | UTF-8 | Python | false | false | 5,260 | py | """
Django settings for starnavi_task project.
Generated by 'django-admin startproject' using Django 2.1.7.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
import... | [
"chumachenko.sergiy@gmail.com"
] | chumachenko.sergiy@gmail.com |
f59b3577b280e77e01de5f4b1a661591fa9d69c2 | 8d23f941ade6e18df9094760c4e3ad5676e96fef | /advanced/05/05pymsql.py | f0982c9fb3bf720ae5266437de8f47d03b214b74 | [] | no_license | asdwsxzc123/python | 95c7b6ed39d47a48e5a2630a3f221c20a8347764 | b2422a7c6b62d4bfa9d1488a6dff322a57ba4c48 | refs/heads/master | 2020-04-03T14:34:06.299282 | 2019-02-05T13:14:16 | 2019-02-05T13:14:16 | 155,326,540 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 547 | py | from pymysql import connect
# 链接数据库
conn = connect(host='172.16.20.46', port=3306, user='root', password='123456', database='jing_dong', charset='utf8')
# 获取cursor对象
cs1 = conn.cursor()
# sql注入
# # 执行select语句
# cs1.execute('select * from goods;')
# # print(row)
# for row in cs1.fetchall():
# print(row)
# 插入数据
... | [
"sbfgeyygy@126.com"
] | sbfgeyygy@126.com |
e76a57551d81a6271b7c5fa8396a47b474218e4a | 432c55838cad26bb6233a799e35e9187a3451434 | /q2_diversity/tests/test_beta_correlation.py | f511afbe0c9ea946466122955ad84cfb567a9924 | [
"BSD-3-Clause"
] | permissive | wasade/q2-diversity | 5a46d7a34bfae05d26fd285f2bfd180e55d58f2a | cdcf24c551a8ca4246dce658fd6b608b174e224d | refs/heads/master | 2023-06-27T19:16:48.985517 | 2018-08-31T21:56:10 | 2018-08-31T21:56:10 | 150,510,254 | 0 | 0 | BSD-3-Clause | 2018-09-27T01:19:35 | 2018-09-27T01:19:35 | null | UTF-8 | Python | false | false | 1,744 | py | # ----------------------------------------------------------------------------
# Copyright (c) 2016-2018, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | [
"matthewrdillon@gmail.com"
] | matthewrdillon@gmail.com |
ddbedb9961f05627dcdc40f9668733b593051ada | e7190289cea8006fb99a54347a57439cdd7047b8 | /stock/industry/tonghuashun_industry-master/industry_current.py | 3100023a4c07be3e3a7b23b8aae3a3b4853d9479 | [] | no_license | hong0396/start_up_git | 282fe3845ad4c81ee7b23785a73052e3a5749fea | a6f9fa2da126382577e05869ff5a2fc98e29a7fb | refs/heads/master | 2021-07-09T06:16:16.955217 | 2019-03-30T13:43:13 | 2019-03-30T13:43:13 | 119,171,188 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,030 | py | #coding:utf-8
from requests.exceptions import RequestException
from bs4 import BeautifulSoup
from selenium import webdriver
from sqlalchemy import create_engine
import datetime
import pymysql
import requests
import pandas as pd
import time
import random
import re
#获取动态cookies
def get_cookie():
options = webdri... | [
"hong0396@126.com"
] | hong0396@126.com |
f0eb93788821d074784c29b88e667723b67a6989 | 10d17864a685c025bb77959545f74b797f1d6077 | /capitulo 02/02.22.py | bbe2a8217430cbaaf8609a9daa1183c8464aeb0a | [] | no_license | jcicerof/IntroducaoPython | 02178d2dfcaa014587edbd3090c517089ccef7c2 | 02e619c7c17e74acdc3268fbfae9ab624a3601dd | refs/heads/master | 2020-04-24T18:12:21.422079 | 2019-02-23T05:14:43 | 2019-02-23T05:14:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 632 | py | ##############################################################################
# Parte do livro Introdução à Programação com Python
# Autor: Nilo Ney Coutinho Menezes
# Editora Novatec (c) 2010-2019
# Primeira edição - Novembro/2010 - ISBN 978-85-7522-250-8
# Segunda edição - Junho/2014 - ISBN 978-85-7522-408-3
# Terce... | [
"jose.cicero@gmail.com"
] | jose.cicero@gmail.com |
1b185f68bd117dbd36f56f53bb64319b0b1072cf | f8580d2c963b6a3c34e918e0743d0a503a9584bd | /unittests/test_dcDrawLists.py | f72721a02be41c67ddfde98034ae0e79396d6ec2 | [] | no_license | pypy/wxpython-cffi | f59c3faeed26e6a26d0c87f4f659f93e5366af28 | 877b7e6c1b5880517456f1960db370e4bb7f5c90 | refs/heads/master | 2023-07-08T21:13:22.765786 | 2016-12-02T22:10:45 | 2016-12-02T22:10:45 | 397,124,697 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,196 | py | import imp_unittest, unittest
import wtc
import wx
import random
try:
import numpy as np
haveNumpy = True
except ImportError:
haveNumpy = False
#---------------------------------------------------------------------------
w = 600
h = 400
num = 500
colornames = ["BLACK",
"BLUE",
"BLUE... | [
"wayedt@gmail.com"
] | wayedt@gmail.com |
6a598ec973d39b8857bf8e4b3513591117312264 | c036befbd9a4b81c0f082273dd0eb007e7f9582d | /dort-core/util/ints.py | fae6a3dcebe1b48a086026ebb082e01903b1f5c2 | [
"Apache-2.0"
] | permissive | Dortchain/dort-blockchian | 889f52f36dcdeffe0f852b413cdd32879741462f | 14f16e321a60f9d70f849f58e4e9964fa337a084 | refs/heads/main | 2023-06-16T01:31:30.718415 | 2021-07-11T03:03:12 | 2021-07-11T03:03:12 | 384,694,718 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,995 | py | from typing import Any, BinaryIO
from Dort.util.struct_stream import StructStream
class int8(StructStream):
PACK = "!b"
class uint8(StructStream):
PACK = "!B"
class int16(StructStream):
PACK = "!h"
class uint16(StructStream):
PACK = "!H"
class int32(StructStream):
PACK = "!l"
class uint... | [
"welllinks@outlook.com"
] | welllinks@outlook.com |
48fa8d2e0ea8bb9d65ab82b01db7bab8b5d6fe5c | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /HXkpnCxJgxkFwaReT_10.py | 0ac63cec767a5f117ae4d9a6bd8853f9c41acfad | [] | no_license | daniel-reich/turbo-robot | feda6c0523bb83ab8954b6d06302bfec5b16ebdf | a7a25c63097674c0a81675eed7e6b763785f1c41 | refs/heads/main | 2023-03-26T01:55:14.210264 | 2021-03-23T16:08:01 | 2021-03-23T16:08:01 | 350,773,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,039 | py | """
Given a function that accepts **unlimited** arguments, check and count how
many data types are in those arguments. Finally return the total in a list.
List order is:
[int, str, bool, list, tuple, dictionary]
### Examples
count_datatypes(1, 45, "Hi", False) ➞ [2, 1, 1, 0, 0, 0]
count_datatype... | [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
8888162efa48c3b16541f45d0afbca742d5c9197 | f504253210cec1c4ec6c3ea50a45564db7d6cd7f | /prettyqt/custom_widgets/adjustingboxlayoutdockwidget.py | 35beb69676ef4e03eeb813230ff08764a12d6637 | [
"MIT"
] | permissive | phil65/PrettyQt | b1150cb4dce982b9b8d62f38f56694959b720a3e | f00500d992d1befb0f2c2ae62fd2a8aafba7fd45 | refs/heads/master | 2023-08-30T21:00:08.905444 | 2023-08-17T12:24:45 | 2023-08-17T12:24:45 | 177,451,205 | 17 | 5 | MIT | 2020-08-15T22:21:18 | 2019-03-24T18:10:21 | Python | UTF-8 | Python | false | false | 2,620 | py | from __future__ import annotations
from prettyqt import constants, widgets
DockWidgetArea = constants.DockWidgetArea
class AdjustingBoxLayoutDockWidget(widgets.DockWidget):
"""DockWidget adjusting its child widget QBoxLayout direction.
The child widget layout direction is set according to dock widget area... | [
"philipptemminghoff@googlemail.com"
] | philipptemminghoff@googlemail.com |
c95ff0ea213f72ba08dca8053a412519590fdd91 | c89543dd926c1787c40616ed174a3d1371c54449 | /superset/views/users/api.py | 675b918847c461140578a642453c1a429f620198 | [
"Apache-2.0",
"OFL-1.1"
] | permissive | j420247/incubator-superset | 7c7bff330393f0e91f5e67782f35efe8c735250a | c9b9b7404a2440a4c9d3173f0c494ed40f7fa2bd | refs/heads/master | 2023-03-11T21:53:16.827919 | 2023-02-03T19:04:17 | 2023-02-03T19:04:17 | 157,780,350 | 1 | 1 | Apache-2.0 | 2023-03-07T00:14:51 | 2018-11-15T22:24:29 | TypeScript | UTF-8 | Python | false | false | 3,465 | py | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | [
"noreply@github.com"
] | j420247.noreply@github.com |
9061a8446b430d608a4cab7867f06179ed62a610 | 65f5a6e6455cc76558dfcc95a9b2a42aeb3f4205 | /add_contextual_info.py | d525a56fa2fb24b5f5497ae7a2d20d022a748ab8 | [
"MIT"
] | permissive | robertdstein/millipede_parser | af84b3bd650215e09d200bff67fea11cc52cd031 | 7f3ad22aea3eca6385e55fd084ce43b2d7000f92 | refs/heads/master | 2020-08-12T19:12:59.643359 | 2020-01-06T16:01:40 | 2020-01-06T16:01:40 | 214,826,592 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 6,639 | py | import pickle
import os
import numpy as np
from astropy.io import fits
from astropy.time import Time
import argparse
from parse_archival_scan import get_v0_output_dir
from contextual_info import archival_data
import healpy as hp
import logging
import requests
def extract_az_zen(nside, index):
return hp.pix2ang(nsi... | [
"robert.stein@desy.de"
] | robert.stein@desy.de |
0325fa1080c27994e0fa2c8ee857985828ccad3d | 5c72a7214bcf1d0cf185bce57393b201cf1b9dd9 | /pyigm/surveys/tests/test_llssurvey.py | 4545d6d8d0a006e1798263ad87f132c1a49e6145 | [] | no_license | JianiDing/pyigm | 6e9b960a0e8617e8861f45b0699f5e1847b5aff8 | d72f84a27fb25386aab8035bd49b21b37008f0af | refs/heads/master | 2021-08-24T09:06:49.810451 | 2017-12-07T01:17:53 | 2017-12-07T01:17:53 | 110,727,652 | 1 | 0 | null | 2017-12-09T00:00:27 | 2017-11-14T18:18:43 | Python | UTF-8 | Python | false | false | 2,416 | py | # Module to run tests on initializing AbsSurvey
# TEST_UNICODE_LITERALS
import numpy as np
import glob, os, imp, pdb
import pytest
from pyigm.surveys.llssurvey import LLSSurvey
from ..lls_literature import load_lls_lit
remote_data = pytest.mark.remote_data
lt_path = imp.find_module('linetools')[1]
'''
def data_pa... | [
"xavier@ucolick.org"
] | xavier@ucolick.org |
7e539a9efa9026a14bd5bab19690d3be70235f37 | 951e433b25a25afeea4d9b45994a57e0a6044144 | /NowCoder/百度_二叉树深度.py | d30d251bea18bf6991eba6cc5047bd36ce19bac8 | [] | no_license | EricaEmmm/CodePython | 7c401073e0a9b7cd15f9f4a553f0aa3db1a951a3 | d52aa2a0bf71b5e7934ee7bff70d593a41b7e644 | refs/heads/master | 2020-05-31T14:00:34.266117 | 2019-09-22T09:48:23 | 2019-09-22T09:48:23 | 190,318,878 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 665 | py | from tool import TreeNode
def depth(root):
# 递归
if not root:
return 0
return max(depth(root.left), depth(root.right)) + 1
def depth1(root):
# 层次遍历:队列
depth = 0
tmp = []
tmp.append(root)
while tmp:
depth += 1
for i in range(len(tmp)):
new = tmp[0]
... | [
"1016920795@qq.com"
] | 1016920795@qq.com |
715651fb3db0cf699d68d033c0188c829fb5d7bc | 8b713697ba8c40179393e069f07d750480c21d4a | /django_tutorial/test.py | 21287d83ef06d9670784440e3ce3f515b7d1db5c | [] | no_license | navill/pytest_tutorial | ca24bcd742d5f8c7273694ebf0a0dd38af095bdb | 27b4d163abe8581996503c851949c9f75aebb786 | refs/heads/master | 2023-02-02T03:06:11.784673 | 2020-12-23T04:53:16 | 2020-12-23T04:53:16 | 323,780,460 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 889 | py | import pytest
from django.test import TestCase
from django.contrib.auth.models import Group, User
class MyTest(TestCase):
fixtures = ['group.json', 'user.json']
def test_should_create_group(self):
group = Group.objects.get(pk=1)
self.assertEqual(group.name, 'appusers')
def test_should_cr... | [
"blue_jihoon@naver.com"
] | blue_jihoon@naver.com |
f7a4ceae9be0677a9d7c43d574dbb721e9efbe82 | 52ba0511e188a289f73a226f616d0f34bd96ebdb | /blog/models.py | 9a2f84d21a454b24a62e1c3f0bc9a3f456aa58db | [] | no_license | Tyaro2/my-first-blog | a4d96e33481e3a5a4373b41c4e5099f2c9561837 | 7d3139a010be719d96b4e94f9439c083078ff1c3 | refs/heads/master | 2023-04-04T05:12:03.278013 | 2021-04-06T09:36:29 | 2021-04-06T09:36:29 | 339,306,261 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,338 | py | from django.conf import settings
from django.db import models
from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
from django.contrib.auth.models import PermissionsMixin
from django.utils import timezone
from django.utils.translation import gettext_lazy as _
from django.contrib.auth import get_u... | [
"you@example.com"
] | you@example.com |
11465b5b97e1db0d850bb05e9a72d69ab7a6968f | 62fe739a9485a2bf547b6d96777f6a01c32dd2f5 | /tarefas/forms.py | 8b1285266859e81df676add9789352e1a9f79d9d | [] | no_license | jgjefersonluis/pdmytest1 | 950c84016a153e931f49b47a7366d7677dfeb62d | 7bb3b377af1fdffe2ad307352a82e2f39005b909 | refs/heads/master | 2023-06-16T14:36:01.388219 | 2021-06-29T05:27:51 | 2021-06-29T05:27:51 | 380,875,827 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 171 | py | from django import forms
from tarefas.models import Tarefas
class TarefasModelForms(forms.ModelForm):
class Meta:
model = Tarefas
fields = '__all__' | [
"jgjefersonluis@gmail.com"
] | jgjefersonluis@gmail.com |
117d079ed37845edbeb098e4e4257bb6044dda54 | 05f06a1b104526c5262289e663df855e1335f32a | /User/views.py | 682030b507801c942c3b37a8305cfb6ddf3afb55 | [] | no_license | Harshvartak/E-commerce-DRF | 784ebecce95730996a9553fef1f3a9218e942749 | b2eea09d7f965b8e8c9397f636c7ea8703813539 | refs/heads/master | 2022-12-13T11:39:11.854643 | 2020-01-03T07:54:41 | 2020-01-03T07:54:41 | 229,832,815 | 0 | 0 | null | 2022-11-22T04:19:28 | 2019-12-23T22:41:40 | JavaScript | UTF-8 | Python | false | false | 714 | py | from django.shortcuts import render
from rest_framework import status
from rest_framework.response import Response
from rest_framework.decorators import api_view
from rest_framework.authtoken.models import Token
from .serializers import RegistrationSerializer
@api_view(['POST', ])
def registration_view(request):
... | [
"vartak.harsh@gmail.com"
] | vartak.harsh@gmail.com |
8c68a5907b798fbc88de11c624c0c63918f8322b | 46d13216824f95f29da7672bf83ae1128a835a97 | /tests/unittests/test_user.py | 4a07b07fb597d183b4ae04f5c989e43c5abc6294 | [] | no_license | lucascandidoff/crudzin | 0a426b754d925e2990dd60cdd9cf2f90424c68b6 | bad721c62fa5f7f9905724838dbc61113ccc25ec | refs/heads/master | 2022-11-27T22:03:45.185391 | 2020-08-01T12:40:51 | 2020-08-01T12:40:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 929 | py | from flask import url_for
from flask_base_tests_cases import TestFlaskBase
class TestUserBP(TestFlaskBase):
def test_api_deve_registrar_usuario_na_base(self):
user = {
'username': 'test',
'password': '1234'
}
esperado = {
'id': '1',
'usernam... | [
"mendesxeduardo@gmail.com"
] | mendesxeduardo@gmail.com |
737252ca9ba41c369ac7335e2c5f7e8fcb7042d2 | 1721445a6635af8604a1f2693660bb0c4ae88ca8 | /6/dest.py | 4eec336a4587bfb3fd4f69becc8e2938e75848a9 | [] | no_license | nelhage/aoc2018 | fdc01f557f9d9b82b533decaff64ebbe1909f9ba | c42a44ea2f86bf42ab4a0c9034f75a6827daf69e | refs/heads/master | 2020-04-13T06:50:10.134072 | 2018-12-25T18:07:31 | 2018-12-25T18:07:31 | 163,032,184 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 993 | py | import numpy as np
import sys
coords = [list(map(int, line.rstrip().split(", "))) for line in sys.stdin]
xs = np.array([x for (x, y) in coords])
ys = np.array([y for (x, y) in coords])
def closest(x, y):
ds = np.abs(xs - x) + np.abs(ys - y)
m = np.argmin(ds)
if np.sum(ds == ds[m]) == 1:
return m
return No... | [
"nelhage@nelhage.com"
] | nelhage@nelhage.com |
0ab99563f7ecd9e09c49f930b365411a52e51bb9 | 5c7f2ce11f440c1abc1e2052c1ec725fadb3e8c9 | /ckanext/youckan/controllers/organization.py | 0bf3b89e498d1fd7027313f5e49ceff6fa1450a8 | [] | no_license | morty/ckanext-youckan | e06f2877270ba215b3dbbbb5b8a8c21ab33f71f6 | 8303e94363805a49d3cf93ee5216c7135b22e481 | refs/heads/master | 2021-01-18T07:47:11.510353 | 2014-02-26T14:24:03 | 2014-02-26T14:24:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,114 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import logging
from ckan import model
from ckan.model import Group
from ckan.plugins import toolkit
from ckanext.youckan.controllers.base import YouckanBaseController
from ckanext.youckan.models import MembershipRequest
DB = model.meta.Session
log = ... | [
"noirbizarre@gmail.com"
] | noirbizarre@gmail.com |
b029233ca5db7a28e56f90072761bd0020303006 | e781909485258415cb01e2bb2f7aaaaa0b14eb3b | /trunk/pyinstaller-1.3/optparse.py | 8d231fe52eed9349d83fc923a56d765d04b3f47f | [] | no_license | BGCX067/fabriciols-svn-to-git | 408cce031243125ed13c1b01deeb077c55519ac6 | 6fbd5eccdc8af831e3c7f3a313a5c300ab39b4aa | refs/heads/master | 2016-09-01T08:53:02.311545 | 2015-12-28T14:39:38 | 2015-12-28T14:39:38 | 48,847,917 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 321 | py | """
optparse -- forward-compatibility wrapper for use with Python 2.2.x and
earlier. If you import from 'optparse' rather than 'optik', your code
will work on base Python 2.3 (and later), or on earlier Pythons with
Optik 1.4.1 or later installed.
"""
from optik import __version__, __all__
from optik import *
... | [
"you@example.com"
] | you@example.com |
0a17c4a3a96f46c1b448dc93700c7c55373c4752 | e9757274ddb8484e27590ff0cc3f24550776c6cc | /Solved/0072/0072.py | 55dea79789686cbd455c67813dc7f05c68eda8de | [] | no_license | Jinmin-Goh/LeetCode | 948a9b3e77eb03507aad6f3c78640aa7f00e6ad5 | d6e80b968032b08506c5b185f66d35c6ff1f8bb9 | refs/heads/master | 2020-09-22T10:22:18.443352 | 2020-09-06T06:34:12 | 2020-09-06T06:34:12 | 225,153,497 | 1 | 1 | null | 2020-01-29T15:16:53 | 2019-12-01T11:55:25 | Python | UTF-8 | Python | false | false | 2,045 | py | # Problem No.: 72
# Solver: Jinmin Goh
# Date: 20191228
# URL: https://leetcode.com/problems/edit-distance/
import sys
# good solution link: https://leetcode.com/problems/edit-distance/discuss/159295/Python-solutions-and-intuition
class Solution:
def minDistance(self, word1: str, word2: str) -> int:
... | [
"eric970901@gmail.com"
] | eric970901@gmail.com |
83a51b7834034e76de94905bbd610c06a4d17331 | 587dbdf730b6cc3e693efc5dca5d83d1dd35ee1a | /extra/exam/tencent/t4.py | a3655900a722fb09c95050c6251460968144bb67 | [] | no_license | Rivarrl/leetcode_python | 8db2a15646d68e4d84ab263d8c3b6e38d8e3ea99 | dbe8eb449e5b112a71bc1cd4eabfd138304de4a3 | refs/heads/master | 2021-06-17T15:21:28.321280 | 2021-03-11T07:28:19 | 2021-03-11T07:28:19 | 179,452,345 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 713 | py | # -*- coding: utf-8 -*-
# ======================================
# @File : t4.py
# @Time : 2020/5/10 20:35
# @Author : Rivarrl
# ======================================
def f(n, board):
def dfs(l, r, x=0):
if l > r: return 0
if l == r: return board[l]
res = mi = min(board[l:r+1]) - x
... | [
"1049793871@qq.com"
] | 1049793871@qq.com |
90d367495fd4f5c2f02d3b37e2e010af2cff3534 | c7faffdc340eb72737315efb017beee97cbd016d | /GetSharedWithAnyoneTeamDriveACLs.py | 52723eee417c2f398f7db170df420c32af2f7da5 | [] | no_license | boussagf/GAM-Scripts | d4b1c840cc2d25e67960262758b2a59f844d452b | bc1e05ddd4e9c94a3fd78c4566fe1df13a8d2e68 | refs/heads/master | 2020-04-29T16:35:57.279614 | 2019-03-01T18:43:49 | 2019-03-01T18:43:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,418 | py | #!/usr/bin/env python2
"""
# Purpose: For a Google Drive User(s), delete all drive file ACLs for Team Drive files shared with anyone
# Note: This script requires Advanced GAM with Team Drive support:
# https://github.com/taers232c/GAMADV-XTD, https://github.com/taers232c/GAMADV-XTD3
# Customize: Set FILE_NAME and ALT_F... | [
"ross.scroggs@gmail.com"
] | ross.scroggs@gmail.com |
f439595cb39ef495936efad8712fa16400e44651 | 6923f79f1eaaba0ab28b25337ba6cb56be97d32d | /Introduction_to_numerical_programming_using_Python_and_CPP_Beu/Ch04/Python/P04-SortComp0.py | 75189e60cc98e52081bce1ec35954c3f6ea24a9d | [] | no_license | burakbayramli/books | 9fe7ba0cabf06e113eb125d62fe16d4946f4a4f0 | 5e9a0e03aa7ddf5e5ddf89943ccc68d94b539e95 | refs/heads/master | 2023-08-17T05:31:08.885134 | 2023-08-14T10:05:37 | 2023-08-14T10:05:37 | 72,460,321 | 223 | 174 | null | 2022-10-24T12:15:06 | 2016-10-31T17:24:00 | Jupyter Notebook | UTF-8 | Python | false | false | 5,186 | py | # Comparison of operation counts for sorting methods
from random import *
#============================================================================
def BubbleSort(x, n):
#----------------------------------------------------------------------------
# Ascending sort of array x[1..n] by modified bubble sort
#... | [
"me@yomama.com"
] | me@yomama.com |
8a93acb3e5d67ecd8aa7a59639df91384b829756 | 8e0070b28f5377b94c50de2c979f92194a4ac88d | /tests/test_svg_colorful.py | 6b5c35925b757675b537c35c42fe91fbd1853ceb | [
"BSD-3-Clause"
] | permissive | AgentIvan/segno | c04ce887c3ee71ae0173d8e7653442fa16eea3b5 | 1033b9d21c6d82cf76f90927702f79599097ca1d | refs/heads/master | 2023-07-26T04:30:52.640466 | 2021-08-30T21:06:42 | 2021-08-30T21:06:42 | 416,811,279 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,735 | py | # -*- coding: utf-8 -*-
#
# Copyright (c) 2016 - 2020 -- Lars Heuer
# All rights reserved.
#
# License: BSD License
#
"""\
SVG related tests for multicolor support.
"""
from __future__ import absolute_import, unicode_literals
import io
import xml.etree.ElementTree as etree
import pytest
import segno
from segno import w... | [
"heuer@semagia.com"
] | heuer@semagia.com |
5a1e56872d5452c032dc23c23ca192b621aa38e1 | a296dc8f628111cab2b5b96cc22fb1b35f776a1d | /arbitrage/public_markets/paymiumeur.py | 009e357742af71f7cb84d275af7b1d5d2d6a43d1 | [
"MIT"
] | permissive | caojun105/bitcoin-arbitrage | e67e9c6bfb4280f1f3cc79292844f2365a28f964 | 9677b77829005c928c7a0b738c5fd28ad65a6331 | refs/heads/master | 2021-01-18T20:47:54.084419 | 2016-07-08T07:31:56 | 2016-07-08T07:31:56 | 63,140,117 | 2 | 0 | null | 2016-07-12T08:22:20 | 2016-07-12T08:22:19 | null | UTF-8 | Python | false | false | 1,112 | py | import urllib.request
import urllib.error
import urllib.parse
import json
from .market import Market
class PaymiumEUR(Market):
def __init__(self):
super(PaymiumEUR, self).__init__("EUR")
# bitcoin central maximum call / day = 5000
# keep 2500 for other operations
self.update_rate =... | [
"maxime.biais@gmail.com"
] | maxime.biais@gmail.com |
647b30379f37a277c78f8b6e9cfad34e77374880 | 18da2e6f54184313f9d36107fd7d6a60acc3df92 | /0x0F-python-object_relational_mapping/model_state.py | dc00ab58c9b0ba6aab8f141c4ec7660efe4e191c | [] | no_license | decolnz/HS_higher_level_programming | a92311faed6ecdeeb6db81ebd8da330126d0e139 | 4ff903992945e7f021db9a7e7499dccd35395446 | refs/heads/master | 2022-07-09T12:34:57.847768 | 2020-05-15T06:45:39 | 2020-05-15T06:45:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 403 | py | #!/usr/bin/python3
"""
Creating a class
"""
from sqlalchemy import Column, Integer, String
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
class State(Base):
"""Class State"""
__tablename__ = 'states'
id = Column(Integer, autoincrement=True, unique=True, nullable=False... | [
"castrok.c11@hotmail.com"
] | castrok.c11@hotmail.com |
762f66561d8648aca6e0784e3ebccc8d36a7e4c0 | 3ead257c7b6413fd6f0831652f367b926f39f337 | /data/cites/utils.py | 1107ce533303981d9e6153144a29dfeba0b07994 | [] | no_license | syyunn/tex | 88558b993f561f0370e9b8ad1500220f6c7578c9 | 6b5976c2f668d115ef2dbfa22cd16d1fac9c2b0c | refs/heads/master | 2022-12-31T21:09:05.073341 | 2020-10-21T11:27:41 | 2020-10-21T11:27:41 | 300,886,452 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,323 | py | def create_cooccurrence_matrix(cites):
"""Create co occurrence matrix from given list of sentences.
Returns:
- vocabs: dictionary of word counts
- co_occ_matrix_sparse: sparse co occurrence matrix
Example:
===========
sentences = ['I love nlp', 'I love to learn',
'nlp i... | [
"syyun@snu.ac.kr"
] | syyun@snu.ac.kr |
e18b3657bcf036d792f980438845cacd61d5bd51 | 9adc810b07f7172a7d0341f0b38088b4f5829cf4 | /experiments/shikhar/corl2019/mulitobj_cvae/multiobj_cvae2.py | 23bef1e12a07541089ac824be0af1db3efcbb747 | [
"MIT"
] | permissive | Asap7772/railrl_evalsawyer | 7ee9358b5277b9ddf2468f0c6d28beb92a5a0879 | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | refs/heads/main | 2023-05-29T10:00:50.126508 | 2021-06-18T03:08:12 | 2021-06-18T03:08:12 | 375,810,557 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,161 | py | import rlkit.misc.hyperparameter as hyp
from experiments.murtaza.multiworld.skew_fit.reacher.generate_uniform_dataset import generate_uniform_dataset_reacher
from multiworld.envs.mujoco.cameras import sawyer_init_camera_zoomed_in
from rlkit.launchers.launcher_util import run_experiment
# from rlkit.torch.grill.launcher... | [
"alexanderkhazatsky@gmail.com"
] | alexanderkhazatsky@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.