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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c45980c203b1e902e3c8147c7d5bdbfac2138505 | ad9a7fbc9077990f1a5c984fb3653129d75c42db | /code/tests/algorithm/test_stack.py | 4dae70f23f38793ec0b059036ee0352127104b2c | [] | no_license | yvonne96/Algo | 8b066df365089190dfac98253f39fa4398803e11 | 8c4a4537573a799f5b0e98e49d530322c2e9024b | refs/heads/master | 2020-03-08T04:09:03.260919 | 2018-03-08T23:56:33 | 2018-03-08T23:56:33 | 127,913,000 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 566 | py | import unittest, sys
from code.algorithms.stack import Stack
class TestStack(unittest.TestCase):
def test_empty_stack(self):
l = Stack()
self.assertEqual(l.items, [])
def test_standard_input(self):
l = Stack()
l.push(1)
l.push(2)
l.push(3)
l.push(4)
self.assertEqual(l.items[0], 1)
self.assertEqua... | [
"[email protected]"
] | |
0f65c1e22e00ab4dcd5861542f3f43c535c17d0d | 6aa59fb47d7b61a28eace0e421d6d898e920f5b6 | /Polymorphism-Lab/Instruments.py | 284d38854667774f28d2fc5e6e12dd1b8c6727de | [] | no_license | Vigyrious/python_oop | 1488bf7ffc53059a790a694660a03ebe6814f615 | 8c28e9f8fe6e2af0c0b35b6a691f1af65f0e8579 | refs/heads/main | 2023-03-18T10:12:08.768834 | 2021-03-12T20:50:43 | 2021-03-12T20:50:43 | 347,192,431 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 284 | py | def play_instrument(instrument):
return instrument.play()
class Guitar:
def play(self):
print("playing the guitar")
guitar = Guitar()
play_instrument(guitar)
class Piano:
def play(self):
print("playing the piano")
piano = Piano()
play_instrument(piano)
| [
"[email protected]"
] | |
d06f552d7fb63d3aaf78af615b77f1b444d6b19e | 7cd8ee14711eaf33cee0d9e06e78a974fc579242 | /PIFramework/juicer/spiders/flipkart_wash.py | 7dc2733e0b0de68c91287489bcdc8a9283c5bbb7 | [] | no_license | Chandler-Song/pi | c618117dfdd9a7496a57c69f029851e94787f591 | aebc6d65b79ed43c66e7e1bf16d6d9f31b470372 | refs/heads/master | 2022-03-13T02:44:30.452673 | 2019-02-19T09:38:45 | 2019-02-19T09:38:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,644 | py | from juicer.utils import *
from juicer.items import *
from selenium import webdriver
import MySQLdb
import time
import scrapy
import json
class FlipkartBestsellersbrowse(JuicerSpider):
name = "flipkart_washingmachine_browse"
start_urls = ['https://www.flipkart.com/washing-machines/pr?sid=j9e,abm,8qx&otracker=c... | [
"[email protected]"
] | |
e6b8029f8d1c75b1be8ceac597f28472e513d647 | 21b5ad37b812ed78799d4efc1649579cc83d32fb | /job/migrations/0088_auto_20200623_0947.py | bee28fda8e18b5704fa97d9dea77ef1e528e4c9d | [] | no_license | SaifulAbir/django-js-api | b6f18c319f8109884e71095ad49e08e50485bb25 | fbf174b9cde2e7d25b4898f511df9c6f96d406cf | refs/heads/master | 2023-02-12T16:09:21.508702 | 2021-01-14T09:05:15 | 2021-01-14T09:05:15 | 329,713,528 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 483 | py | # Generated by Django 3.0.3 on 2020-06-23 03:47
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('job', '0087_auto_20200622_1503'),
]
operations = [
migrations.AlterField(
model_name='job',
... | [
"[email protected]"
] | |
b6aa640ae5d1b56f311c966e0424a292e051b6f8 | cf3549c5200e78dd81095cd3e05b3015d6bc2290 | /spiderman/misc/mysql_connect.py | a68f07b31d86c61ff0ff59e817805eba61b07087 | [
"Apache-2.0"
] | permissive | zzcv/python | e0c56a363188b8a3dcc030b10a7bd4aa1fc426b2 | 69ac0cabb7154816b1df415c0cc32966d6335718 | refs/heads/master | 2020-09-14T12:57:08.046356 | 2019-11-18T11:54:54 | 2019-11-18T11:54:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,039 | py | #/usr/bin/env python
#coding=utf8
"""
# Author: kellanfan
# Created Time : Wed 23 May 2018 08:15:18 PM CST
# File Name: mysql_connect.py
# Description: 关于编码问题可看: https://stackoverflow.com/questions/3942888/unicodeencodeerror-latin-1-codec-cant-encode-character
"""
import pymysql
import yaml
import sys
#本地logger模块
#fr... | [
"[email protected]"
] | |
ca3f4c1da4dc8279a558f6ee7c8303c3a57f9cc6 | 1edd52cf197e5ae67b5939a3beb3e70761334e62 | /Notes/Notes/Udemy/Aws-automation-with-boto3/Session-9-working-with-IAM/session-refresh/Iam-user-with-console.py | 0f1f43acc8d7e16bc06aa2ff501db554f5bded2f | [] | no_license | sandeepmchary/Devops_wordpress_Notes | bdcd85d526780d03c494ecb93e714e7ffe0a4d58 | ffd2092162073e1e7342c6066d023d04e6ca8c1c | refs/heads/master | 2022-06-18T21:33:02.471025 | 2022-06-12T11:14:47 | 2022-06-12T11:14:47 | 154,679,658 | 1 | 4 | null | 2022-05-19T16:59:57 | 2018-10-25T13:51:40 | HTML | UTF-8 | Python | false | false | 1,373 | py | import boto3
from random import choice
import sys
def get_iam_client_object(profile_name="root"):
session=boto3.session.Session(profile_name="root")
iam_client=session.client(service_name="iam",region_name="us-east-2")
return iam_client
def get_random_passwd():
passwd_length=8
char_for_passwd="a... | [
"[email protected]"
] | |
44ffeff10786683f3179093b0fa74827dc15a5d8 | 9eac3fbc5cb8a98ccaa4a394e40e955ad8f239b0 | /parametres/admin.py | 7141aa98b6e9e1be50310496a4b41221ca7d3662 | [] | no_license | parheto10/tracability | 435db9fddcdbf012cfafd6ee3739d90082018038 | 1c989a1219101b35f77ee5bd58b624e43368b55b | refs/heads/master | 2023-02-22T07:33:35.800533 | 2021-01-22T13:45:59 | 2021-01-22T13:45:59 | 329,564,065 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,108 | py | from django.contrib import admin
from .models import (
Sous_Prefecture,
Origine,
Prime,
Projet,
Activite,
Region,
Campagne,
Espece,
Cat_Plant,
Projet_Cat,
# Formation,
Pepiniere,
Detail_Pepiniere,
Detail_Retrait
)
class DetailsPepiniereAdmin(admin.TabularInline)... | [
"[email protected]"
] | |
ff0c2471925d48342885e8a6a838750e9b1df68c | 90419da201cd4948a27d3612f0b482c68026c96f | /sdk/python/pulumi_azure_nextgen/offazure/v20200707/master_site.py | e166512e49b960143ea702411c4205817bdd90fa | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | test-wiz-sec/pulumi-azure-nextgen | cd4bee5d70cb0d332c04f16bb54e17d016d2adaf | 20a695af0d020b34b0f1c336e1b69702755174cc | refs/heads/master | 2023-06-08T02:35:52.639773 | 2020-11-06T22:39:06 | 2020-11-06T22:39:06 | 312,993,761 | 0 | 0 | Apache-2.0 | 2023-06-02T06:47:28 | 2020-11-15T09:04:00 | null | UTF-8 | Python | false | false | 5,549 | py | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | [
"[email protected]"
] | |
4bbdb32dbed101f2c682eb87ec43eb1ae55b552e | 156a4b52240069ee10df53b39c20102d7368fcd1 | /L13/shortly/shortly/wsgi.py | 970004b25eb425d27f458d6a023ef55bf3ffdb74 | [] | no_license | Serdiuk-Roman/for_lit | 0d7072b0d5da336be5bfb9c6370c1673a62e4574 | 80dc5a5bd8b8258a88b5801073296e034ce04d5a | refs/heads/master | 2022-12-12T14:54:14.591181 | 2019-08-11T08:08:19 | 2019-08-11T08:08:19 | 126,608,657 | 0 | 0 | null | 2022-12-08T02:18:39 | 2018-03-24T14:42:45 | Python | UTF-8 | Python | false | false | 391 | py | """
WSGI config for shortly project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTI... | [
"[email protected]"
] | |
289e6c858918567ab765985e9961d24038ccf7bc | 09e57dd1374713f06b70d7b37a580130d9bbab0d | /data/p4VQE/R3/benchmark/startQiskit567.py | 2b27d4b62ab6147e30a8d70f873a234565f322af | [
"BSD-3-Clause"
] | permissive | UCLA-SEAL/QDiff | ad53650034897abb5941e74539e3aee8edb600ab | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | refs/heads/main | 2023-08-05T04:52:24.961998 | 2021-09-19T02:56:16 | 2021-09-19T02:56:16 | 405,159,939 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,528 | py | # qubit number=3
# total number=13
import numpy as np
from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ
import networkx as nx
from qiskit.visualization import plot_histogram
from typing import *
from pprint import pprint
from math import log2
from collectio... | [
"[email protected]"
] | |
a5817120be6c64eee97cb0929f8c7231d1ade532 | 6b7a2b5414f4a3f9ed116fa73a2ae5c732957ed4 | /items/views.py | a7fbcfbabfad1c1ca64f3c084710a71e7dc8a912 | [] | no_license | sankha555/bestro | 366e02838775484940cb224800ac07f0a9cbd3d3 | 7e26909fe2c9722a005630cde24e9d6433463ba3 | refs/heads/main | 2023-01-08T09:06:15.999259 | 2020-10-31T10:51:16 | 2020-10-31T10:51:16 | 308,825,633 | 0 | 0 | null | 2020-10-31T08:47:10 | 2020-10-31T07:11:06 | JavaScript | UTF-8 | Python | false | false | 2,240 | py | from django.shortcuts import render, redirect, get_object_or_404
from django.contrib.admin.views.decorators import staff_member_required
from django.contrib import messages
from items.models import Item, Combo
from items.forms import ItemForm, ComboForm
@staff_member_required
def create_item(request):
if request... | [
"[email protected]"
] | |
531011d5c9305e5f6faed201af1fcb85dd90e145 | acd41dc7e684eb2e58b6bef2b3e86950b8064945 | /res/packages/scripts/scripts/client/FX/Events/AlignModel.py | b24c7f10e3f9418dbdf4aeea2f0efb6d859aa723 | [] | no_license | webiumsk/WoT-0.9.18.0 | e07acd08b33bfe7c73c910f5cb2a054a58a9beea | 89979c1ad547f1a1bbb2189f5ee3b10685e9a216 | refs/heads/master | 2021-01-20T09:37:10.323406 | 2017-05-04T13:51:43 | 2017-05-04T13:51:43 | 90,268,530 | 0 | 0 | null | null | null | null | WINDOWS-1250 | Python | false | false | 1,280 | py | # 2017.05.04 15:20:53 Střední Evropa (letní čas)
# Embedded file name: scripts/client/FX/Events/AlignModel.py
from FX.Event import Event
from FX import s_sectionProcessors
from bwdebug import *
class AlignModel(Event):
"""
This class implements an Event that sets the basis vectors for a PyModel.
"""
d... | [
"[email protected]"
] | |
a9090ceb80a1627f5e03947dfe4312844ebe0d95 | 25e481ef7fba79285f4c8a7fa2e81c8b2b7f9cce | /saleor/search/documents.py | 21caff48c91dad01e664334c00d2f0a664a31fe8 | [
"BSD-2-Clause"
] | permissive | arslanahmd/Ghar-Tameer | 59e60def48a14f9452dfefe2edf30e362878191d | 72401b2fc0079e6d52e844afd8fcf57122ad319f | refs/heads/master | 2023-01-31T04:08:26.288332 | 2018-06-07T18:02:01 | 2018-06-07T18:02:01 | 136,231,127 | 0 | 0 | NOASSERTION | 2023-01-11T22:21:42 | 2018-06-05T20:28:11 | Python | UTF-8 | Python | false | false | 2,008 | py | from django_elasticsearch_dsl import DocType, Index, fields
from elasticsearch_dsl import analyzer, token_filter
from ..order.models import Order
from ..product.models import Product
from ..userprofile.models import User
storefront = Index('storefront')
storefront.settings(number_of_shards=1, number_of_replicas=0)
... | [
"[email protected]"
] | |
962214992716034bac30b38a80e43aa1a2df3de9 | 6c5d8700eb80a647a86d583d16cab5ec5b2d0bc0 | /shop/models.py | f2ce8d7cd2e7d1181d2988cd7fdbe347fc88502c | [] | no_license | askdjango/offline-201707-weekend-afternoon | f83a324bca2e16f423e009a7d6b033db435114e2 | 469b84d84f8c2c47c6d4a45bab5dfe2cd84adcf7 | refs/heads/master | 2020-12-02T07:58:10.831108 | 2017-07-30T07:41:36 | 2017-07-30T07:41:36 | 96,754,198 | 2 | 2 | null | null | null | null | UTF-8 | Python | false | false | 407 | py | from django.db import models
from django.urls import reverse
class Item(models.Model):
name = models.CharField(max_length=100)
price = models.PositiveIntegerField()
desc = models.TextField()
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
d... | [
"[email protected]"
] | |
f0ef8b3b822755e643558dfbaf8038848844a94e | c954904d3a3259f0bee4bc3942998c30f4714e68 | /shortener/shorturl/admin.py | d2d7a1f500ccdca743dd6b6677e8ab573e9ced69 | [] | no_license | Alodhaib/django-shortener-example | 9443e51191086fa1321468eb3fdefa137c25e330 | d037c913ed18e0a7b24865b7f4f5aaf68df2cca3 | refs/heads/master | 2021-01-24T10:06:40.965556 | 2013-05-11T16:01:13 | 2013-05-11T16:01:13 | 69,673,280 | 0 | 0 | null | 2016-09-30T14:22:22 | 2016-09-30T14:22:22 | null | UTF-8 | Python | false | false | 175 | py | # -*- coding: utf-8 -*-
from django.contrib import admin
from shorturl.models import Link
class LinkAdmin(admin.ModelAdmin):
pass
admin.site.register(Link, LinkAdmin)
| [
"[email protected]"
] | |
26bdb9144ab0c29daebafabd909699cec109f600 | 3449e5511dc8da19fc841af767dbe8d216e26ffb | /mmServer/shared/migrations/0001_initial.py | b519290b8cc95fbc7f447738179c3c140f0d7dc6 | [] | no_license | erikwestra/mm-server | 8ba2af0ee7acd372949589b6f8d429099a38ea58 | bead1ad439541211e33fdc60264a869f18a99ae9 | refs/heads/master | 2021-01-10T21:14:23.636707 | 2015-05-27T21:22:54 | 2015-05-27T21:22:54 | 28,573,174 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,434 | py | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Profile'
db.create_table(u'shared_profile', (
... | [
"[email protected]"
] | |
90fd9dde7cdf83348a25711a71c5e94d066e59ac | 3db1063777e6a0b2e7dba70fc507fe5e88b89fd9 | /tests/test_sklearn_double_tensor_type_reg.py | fe4fd01080be20e8f2cd3600dd014d04785a6a7c | [
"Apache-2.0"
] | permissive | Pandinosaurus/sklearn-onnx | 6fe8266576a63dfc97782b001fd5a7b1a8c4c076 | e85674a67a0a043e19c2ffe181e5d31eca8ce40b | refs/heads/master | 2022-03-15T12:33:57.138828 | 2022-02-25T14:31:04 | 2022-02-25T14:31:04 | 199,595,952 | 0 | 0 | Apache-2.0 | 2022-02-25T20:54:57 | 2019-07-30T07:11:05 | Python | UTF-8 | Python | false | false | 6,794 | py | # SPDX-License-Identifier: Apache-2.0
"""Tests GLMRegressor converter."""
import unittest
from distutils.version import StrictVersion
import numpy as np
from sklearn.exceptions import ConvergenceWarning
try:
from sklearn.utils._testing import ignore_warnings
except ImportError:
from sklearn.utils.testing impo... | [
"[email protected]"
] | |
dacc3371d34d1638e3dab27125026ac0234c1f31 | 9093d43a4fc00f0a89fde240caa9ea54e3b22a24 | /step2_random_take_data.py | a5f6def0e1078cfce75cf09f9f94738361a98fe2 | [] | no_license | hankerkuo/HogwartsHouses | a1db9d4f9aff99003ef438d7656f91d95fc520d6 | 85c517a9d690e94c58d2c9c3f8ff0ba09a975394 | refs/heads/master | 2022-10-09T00:37:56.938523 | 2022-09-29T17:51:31 | 2022-09-29T17:51:31 | 132,591,915 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,026 | py | import os
import os.path as path
import numpy as np
import shutil
# randomly take training data and testing data, and then put them in the folder of this project!
# mother_folder must contain all of the class folders
# train_ratio argument is the ratio of training data, its value must between [0, 1]
def random_take_d... | [
"[email protected]"
] | |
20e70870e41c5a0914c6ca7f9a4502a0e60cfd96 | 1cb97b0fe8b275efd540716cb6e742fc44e927bf | /rljax/algorithm/tqc.py | 0cab46908744c082e44a614483e84981deda1786 | [
"MIT"
] | permissive | khushjammu/rljax | 31e4d0f9c6aa57a0a07a35f7f8854cc78360ae5a | f2d5e81240d99187fcb625d2caa630c3c7deecfc | refs/heads/master | 2023-06-27T17:15:43.437065 | 2021-07-30T16:55:47 | 2021-07-30T16:55:47 | 391,125,669 | 0 | 0 | MIT | 2021-07-30T16:18:23 | 2021-07-30T16:18:22 | null | UTF-8 | Python | false | false | 4,258 | py | from functools import partial
from typing import List
import haiku as hk
import jax
import jax.numpy as jnp
import numpy as np
from rljax.algorithm.sac import SAC
from rljax.network import ContinuousQuantileFunction, StateDependentGaussianPolicy
from rljax.util import quantile_loss
class TQC(SAC):
name = "TQC"
... | [
"[email protected]"
] | |
a4e868db0f547b24acea0ad887afdfb7e41f16f6 | 8660906ee809f572ec766db192f4b511e15fe55a | /pythonProject/functions 2.py | 4ddcd441b21557aae6a7f1266e28ab5f992efe99 | [] | no_license | mageshrocky/PycharmProjects | a731acc47d5108c9129787ac3e4c5385f25e099c | 17c12da7d91aec7818f5a76bfff0aae5275aa232 | refs/heads/master | 2023-05-30T13:21:01.048013 | 2021-06-15T10:22:49 | 2021-06-15T10:22:49 | 377,121,844 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 358 | py | def welcome():
print('welcome to my bucket_list')
def bucket_list():
welcome()
x = 'biriyani','fried rice','grill','shawarma'
for i in x:
print(i)
ask = input('eaten or not:')
if ask == 'eaten':
print(f'{i} is eaten')
elif ask == 'not':
print(f'{... | [
"[email protected]"
] | |
87f547feea934df8f3f0d1a245a7f6cb4d4a3a29 | 7d949b9f19e4c5c897b3aef76e604f2c0eee7112 | /src-python/saccade_analysis/analysis201009/master_plot_vars.py | 89549b136017cbf3d778e4b531923c386e78b806 | [] | no_license | AndreaCensi/saccade_analysis | d3fad3a1a406b97c4dcf9cdc82b9b2ce1fbf42df | 71b87e9225b16317ffa9a581b3c62d8343fe7bfa | refs/heads/master | 2016-09-11T06:49:22.254391 | 2011-12-20T06:39:30 | 2011-12-20T06:39:30 | 952,465 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,079 | py | '''
Definition of variable of interests for plotting.
'''
class Variable():
def __init__(self, id, letter, name, interesting,
unit, density_max_y, density_bins, include, mod=False,
field=None, percentiles=True):
if field is None:
field = id
se... | [
"[email protected]"
] | |
32bf63d6e8e9e3be59ddbce2a9dbab8b1419cd83 | 55ceefc747e19cdf853e329dba06723a44a42623 | /_CodeTopics/LeetCode/401-600/000497/RE--000497.py3 | 97b99260625d25bf3404827bdfbeaa178d69aef9 | [] | no_license | BIAOXYZ/variousCodes | 6c04f3e257dbf87cbe73c98c72aaa384fc033690 | ee59b82125f100970c842d5e1245287c484d6649 | refs/heads/master | 2023-09-04T10:01:31.998311 | 2023-08-26T19:44:39 | 2023-08-26T19:44:39 | 152,967,312 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,957 | py3 | class Solution:
def __init__(self, rects: List[List[int]]):
self.legalX = []
self.legalY = []
self.minX = 10**9 + 1
self.maxX = -10**9 - 1
self.minY = 10**9 + 1
self.maxY = -10**9 - 1
for a, b, x, y in rects:
self.legalX.append([a, x])
... | [
"[email protected]"
] | |
4bfca7a55f0ea04def1379bcb59903bd3a1b8c27 | 98b63e3dc79c75048163512c3d1b71d4b6987493 | /tensorflow/python/util/function_parameter_canonicalizer_test.py | 968265ff36f96f16dd717d8b83548f52c205884a | [
"Apache-2.0"
] | permissive | galeone/tensorflow | 11a4e4a3f42f4f61a65b432c429ace00401c9cc4 | 1b6f13331f4d8e7fccc66bfeb0b066e77a2b7206 | refs/heads/master | 2022-11-13T11:56:56.143276 | 2020-11-10T14:35:01 | 2020-11-10T14:35:01 | 310,642,488 | 21 | 12 | Apache-2.0 | 2020-11-06T16:01:03 | 2020-11-06T16:01:02 | null | UTF-8 | Python | false | false | 3,409 | py | # Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"[email protected]"
] | |
502b40f748bc05baab4530a274f45cef0bac52c3 | a54007706a09b387690f79fd7ffd889decad42f1 | /day03/code/05_集合的增加_删除.py | 41a392c02626da539756cf162017fbbb266f77e7 | [] | no_license | lvah/201903python | d425534544a1f91e5b80b5ff0de5ca34037fe6e9 | 1415fcb7697dfa2884d94dcd8963477e12fe0624 | refs/heads/master | 2020-07-06T16:45:37.882819 | 2019-09-08T10:13:07 | 2019-09-08T10:13:07 | 203,082,401 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,077 | py | allow_users = {'user1', 'user2', 'user3', 'user1'}
# *******************************增加***************************
# # 添加一个元素到集合里面;
# allow_users.add('user4')
# print(allow_users)
# # update添加多个元素到集合中;
# allow_users.update({'user4', 'user5', 'user6'})
# print(allow_users)
# ****************************删除************... | [
"[email protected]"
] | |
ae62363973b6dd6edae22ae617c2f996f7344c2c | 2ad1116411d79d5bac26402ccac4f5785a0485e4 | /text_in_frame.py | 4a43b09493235cba7f3292369bae44b4f6d2e17f | [] | no_license | slavkoBV/solved-tasks-SoftGroup-course | 0a879fcaeedd2b1d27b2970ea621eb2bdfab4ce4 | 12461d50a095764d5e237babaec466bc2d8dc672 | refs/heads/master | 2021-01-18T15:55:04.224872 | 2017-05-08T15:38:16 | 2017-05-08T15:38:16 | 86,691,843 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 376 | py | def text_in_frame(s):
s += ' in the frame'
res = s.split()
str_width = max(len(i) for i in res)
print('{0:*^{1}}'.format('*', str_width * 3))
for line in res:
print('{0:<{2}}{1:^{2}}{0:>{2}}'.format('*', line, str_width))
print('{0:*^{1}}'.format('*', str_width * 3))
message = 'Доброго... | [
"[email protected]"
] | |
361977c494c2ec3cc91e7dac120631337238d4fd | 908cf8e6ef52033bbf3d5afbb29637a25f5d66f8 | /test/test_codat_public_api_models_metadata_account_ref_model.py | 5579c7a718dad7398f39ad75b1097f758be4922b | [] | no_license | procurify/codat-python-sdk | 074769a2d9e72640741689b6f51e880d35b88095 | 3c8f664998427bda32bad8062c3bf324f39506da | refs/heads/master | 2023-08-25T03:55:19.817085 | 2021-10-22T22:14:34 | 2021-10-22T22:14:34 | 395,381,471 | 1 | 0 | null | 2021-10-20T21:10:31 | 2021-08-12T16:31:03 | Python | UTF-8 | Python | false | false | 960 | py | """
Codat API
[What's changed in our Swagger](https://docs.codat.io/docs/new-swagger-ui) # noqa: E501
The version of the OpenAPI document: v1
Generated by: https://openapi-generator.tech
"""
import sys
import unittest
import codat_python_sdk
from codat_python_sdk.model.codat_public_api_models_meta... | [
"[email protected]"
] | |
b88557710a9b5ca348cca0003e80aee34b2faa10 | 0ff7c11d988d29f86fbeb0260a6f98405a54f711 | /rh/apps/content/migrations/0022_iconcard_slug.py | 9224c2528c7996b66c79decf710417975255ec40 | [
"BSD-3-Clause"
] | permissive | rapidpro/chpro-microsite | 774c5055ed5e72ec5030da14bc4ff53afbc0df63 | 4e1d1210b49ec60ab0711d78235bf45eeb5c0275 | refs/heads/master | 2022-12-14T18:50:44.900595 | 2018-07-11T09:26:22 | 2018-07-11T09:26:22 | 119,061,934 | 0 | 0 | BSD-3-Clause | 2022-12-07T10:23:14 | 2018-01-26T14:37:17 | Python | UTF-8 | Python | false | false | 441 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2018-04-08 22:56
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('content', '0021_cardgrid_style'),
]
operations = [
migrations.AddField(
... | [
"[email protected]"
] | |
63795a7d123cd3d7678824c23b97d68a29ba9568 | facb8b9155a569b09ba66aefc22564a5bf9cd319 | /wp2/merra_scripts/01_netCDF_extraction/merra902TG/133-tideGauge.py | f7874d9721799ca1d9f702f12064f991397cb8fd | [] | no_license | moinabyssinia/modeling-global-storm-surges | 13e69faa8f45a1244a964c5de4e2a5a6c95b2128 | 6e385b2a5f0867df8ceabd155e17ba876779c1bd | refs/heads/master | 2023-06-09T00:40:39.319465 | 2021-06-25T21:00:44 | 2021-06-25T21:00:44 | 229,080,191 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,075 | py | # -*- coding: utf-8 -*-
"""
Created on Mon Jun 01 10:00:00 2020
MERRAv2 netCDF extraction script - template
To create an extraction script for each tide gauge
@author: Michael Tadesse
"""
import os
import pandas as pd
from d_merra_define_grid import Coordinate, findPixels, findindx
from c_merra_read_netcdf import r... | [
"[email protected]"
] | |
f2a189d329b00fd8e8a3cfd89a8d8df1fcd2d9f7 | 50afc0db7ccfc6c80e1d3877fc61fb67a2ba6eb7 | /challenge9(dominos&chess)/Stilton.py | caaccb1afd8aea45c38aa9d03efe151389bd0a8e | [
"MIT"
] | permissive | banana-galaxy/challenges | 792caa05e7b8aa10aad8e04369fc06aaf05ff398 | 8655c14828607535a677e2bb18689681ee6312fa | refs/heads/master | 2022-12-26T23:58:12.660152 | 2020-10-06T13:38:04 | 2020-10-06T13:38:04 | 268,851,516 | 11 | 8 | MIT | 2020-09-22T21:21:30 | 2020-06-02T16:24:41 | Python | UTF-8 | Python | false | false | 921 | py | def fill(matrix):
missing = []
for index, row in enumerate(matrix, 1):
for indexs, square in enumerate(row, 1):
if square == 1:
missing.append((index, indexs))
if ((len(matrix) * len(matrix[0]) - len(missing)) % 2) != 0:
return False
if ((len(matrix) * len(m... | [
"[email protected]"
] | |
fbda94eb5d433f1be95961f97b4ab52024ffdd70 | f14f48e50efb50cfe7078c68f0d61015ae2d646b | /Stock/Select/Ui/Basic/Dlg/DyStockSelectStockInfoDlg.py | 3b2bb0fc7d00107148e986883510c06c76cf6928 | [
"MIT"
] | permissive | stockcode/DevilYuan | 17a23da68954714cacae29f428c3005444e0e3a2 | 163d06cb7fd30a8f24b3f2e06206c1fd024353c3 | refs/heads/master | 2020-05-03T14:40:08.420822 | 2019-03-29T13:16:42 | 2019-03-29T13:16:42 | 178,683,886 | 2 | 1 | MIT | 2019-03-31T12:17:49 | 2019-03-31T12:17:49 | null | UTF-8 | Python | false | false | 1,718 | py | from PyQt5.QtWidgets import QDialog, QGridLayout, QPushButton, QApplication, QMessageBox
from DyCommon.Ui.DyTreeWidget import *
class DyStockSelectStockInfoDlg(QDialog):
""" 个股资料选择对话框
"""
fields = \
[
['公司资料',
['所属行业'],
['主营业务'],
['涉及概念'... | [
"[email protected]"
] | |
df6d130f1b67a434d02ea576a6746f5c86493d01 | 795b68819d51af14dfabb8dbe40c9e8153029188 | /Algorithms/hamming_distance.py | 3ec6797d6e087fc60cbe199eb4b3107677bfc583 | [] | no_license | MotazBellah/Code-Challenge | 507f1fd3d5b3265e54905979c80d609afd81c54d | c38c95239193e26c1a88f6736d2ab9ee37185964 | refs/heads/master | 2022-02-25T02:54:10.216892 | 2022-02-19T19:28:05 | 2022-02-19T19:28:05 | 193,115,018 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 463 | py | def hamming_distance(str1, str2):
"""
Calculate the hamming distance of the two strings
Args:
str1(string),str2(string): Strings to be used for finding the hamming distance
Returns:
int: Hamming Distance
"""
distance = 0
if len(str1) == len(str2):
for i in range(len(s... | [
"[email protected]"
] | |
295ac0f7cb802d1129f5181fc39e2f5d742df573 | 981fcfe446a0289752790fd0c5be24020cbaee07 | /python2_Grammer/src/basic/string_/bianma/in.py | 42c74f80bb0d6b0c77b3d31fad6f876c862d6032 | [] | no_license | lijianbo0130/My_Python | 7ba45a631049f6defec3977e680cd9bd75d138d1 | 8bd7548c97d2e6d2982070e949f1433232db9e07 | refs/heads/master | 2020-12-24T18:42:19.103529 | 2016-05-30T03:03:34 | 2016-05-30T03:03:34 | 58,097,799 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 298 | py | #coding=utf-8
'''
可以用in这个操作
可以不加u 或者同时加u
'''
if u"用" in u"用的" : #可以
print True
# if u"用" in "用的" :#会报 exception
# print True
if "aa" in u"aaaa": #可以
print True
if u"aa" in "aaaa": #可以
print True
| [
"[email protected]"
] | |
0989cff52b5769919d5c96249867fca82355446c | 40bb4ced96423bc164ec3fbc5b253b92dd300069 | /json1.py | f95890c17f307e8030efe8e6ceab2e81d87e735e | [] | no_license | bawejakunal/coursera-python | b290ec238421b9c540b882bf89fc7c36934db798 | c98a3dffb33e416e97e020a8d36a0488659f34b6 | refs/heads/master | 2021-01-01T05:11:46.467456 | 2016-10-29T23:57:22 | 2016-10-29T23:57:22 | 58,811,070 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 222 | py | import urllib
import json
url = raw_input('Enter json file location: ')
handle = urllib.urlopen(url)
json_data = json.load(handle)
total = 0
for comment in json_data['comments']:
total += comment['count']
print total | [
"[email protected]"
] | |
5be3e1a9ba33f04859f32d5991cb45ded9c57d51 | 4709728fe87bb36c69ec3b4c448d9a07f6736780 | /Python Scripts/Problem 17(int).py | 7b760c015d696067ee732bdcb97368a84f8b7ebc | [] | no_license | javsav/Project-Euler-Solutions | 89237536d20b542d90874127495772271485c503 | 9866878027bc0fe2bde970c9869f597977b69b2a | refs/heads/master | 2021-07-15T08:00:43.374296 | 2021-03-13T09:34:40 | 2021-03-13T09:34:40 | 25,625,647 | 1 | 1 | null | 2014-10-25T06:57:29 | 2014-10-23T07:49:13 | Python | UTF-8 | Python | false | false | 869 | py |
all=[]
one2nine = ["one", "two", "three", "four", "five", "six", "seven", "eight", "nine"]
ten2nineteen = ["ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"]
twenty2ninety = ["twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety"]
hundred... | [
"whatever"
] | whatever |
d298f539a68d4dcaf9cd1289333c6744dbf1de40 | aad164e4efe1d55cc189c35956bfd435b14a0f52 | /eve-8.21.494548/eve/client/script/ui/services/shipConfigSvc.py | 6932a49e75d9e03b8b55c15f9bef0c9e9a5c80ca | [] | no_license | Pluckyduck/eve | 61cc41fe8fd4dca4fbdcc4761a37bcfeb27ed84f | 9a277707ab1f162c6bd9618faf722c0be3ea93ad | refs/heads/master | 2020-12-28T23:35:29.992875 | 2013-05-06T14:24:33 | 2013-05-06T14:24:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,783 | py | #Embedded file name: c:/depot/games/branches/release/EVE-TRANQUILITY/eve/client/script/ui/services/shipConfigSvc.py
import util
import locks
import service
import moniker
class ShipConfigSvc(service.Service):
__guid__ = 'svc.shipConfig'
__update_on_reload__ = 1
__dependencies__ = []
__notifyevents__ = ... | [
"[email protected]"
] | |
6a580dc82809ae40b6262af7932e4ec1dc490998 | c51ed0c36d532276211497c8d7e5dda68eb6c303 | /host_management/models.py | 4467361164dbfcaa9c56e0f535aafa0a64b79e68 | [] | no_license | pwgraham91/restauPro | 75f56f1c1b4aaa8c5d1465765802fa71955f96ae | bc6f278e0aa1603e2da4c8fd560fad7db7ab148c | refs/heads/master | 2022-12-07T20:28:43.579613 | 2015-04-21T05:06:11 | 2015-04-21T05:06:11 | 25,218,369 | 0 | 0 | null | 2022-11-22T00:31:59 | 2014-10-14T17:35:19 | Python | UTF-8 | Python | false | false | 1,664 | py | from django.contrib.auth.models import AbstractUser
from django.db import models
# Create your models here.
class Restaurant(AbstractUser):
restaurant_name = models.CharField(max_length=50)
def __unicode__(self):
return u"{}".format(self.username)
class Table(models.Model):
table_name = models.... | [
"[email protected]"
] | |
5289fb1c8fe99a7fc13a1f1971b0823ce6869053 | 271c7959a39f3d7ff63dddf285004fd5badee4d9 | /venv/Lib/site-packages/flask_codemirror/fields.py | 7f2fda9478de0dc6e5891594c3f5cc0c5036309b | [
"MIT"
] | permissive | natemellendorf/configpy | b6b01ea4db1f2b9109fd4ddb860e9977316ed964 | 750da5eaef33cede9f3ef532453d63e507f34a2c | refs/heads/master | 2022-12-11T05:22:54.289720 | 2019-07-22T05:26:09 | 2019-07-22T05:26:09 | 176,197,442 | 4 | 1 | MIT | 2022-12-08T02:48:51 | 2019-03-18T03:24:12 | Python | UTF-8 | Python | false | false | 1,759 | py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is dist... | [
"[email protected]"
] | |
0ce8042dabf8b7509cbfa273ea284407ef3b82da | f93d4582838cdb4fecfcce3ba251c0a616e2baeb | /backend/location/migrations/0001_initial.py | 53c62a7cdcb732e888811b7fdf2030aa8e9c4ca5 | [] | no_license | crowdbotics-apps/lil-lolo-20580 | e203827883f9ad9d94bb704b037986fbe290579e | 500eeabfb4ac0ca324f6616320ea35627fecf64d | refs/heads/master | 2022-12-18T16:51:07.642630 | 2020-09-22T22:18:02 | 2020-09-22T22:18:02 | 297,785,167 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,700 | py | # Generated by Django 2.2.16 on 2020-09-22 22:17
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('task_profile', '0001_initial'),
]
operations = [
migrations.CreateModel(
n... | [
"[email protected]"
] | |
d236e1b44c5dcd360a0166680228eae6a2e503ac | 182c651a9b00b9b4d80e6d51ae574cb793958cd6 | /widgets/digitalclock.py | dabda1832b534b93346b0b7840f01d7283a6e6e9 | [] | no_license | eudu/pyqt-examples | c61a7108e1fbfcf2cd918a0f99e9a5a90a3f305c | 8e533b7b3c5e9bbe0617ef1ecb9b169dd216c181 | refs/heads/master | 2020-03-16T01:23:19.573347 | 2018-05-06T20:20:57 | 2018-05-06T20:20:57 | 132,438,940 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,876 | py | #!/usr/bin/python3
#############################################################################
##
## Copyright (C) 2013 Riverbank Computing Limited.
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
##
## This file is part of the examples of PyQt.
##
## $QT_BEGIN_LICENSE:B... | [
"[email protected]"
] | |
95dbe60a16f38105b41184d2329854c41b7b66e1 | 598abc2c440808b7999ac45a6bf420e1ec48b105 | /utils/util.py | 968583c878a0b99bc8f16be1368a667656d05158 | [] | no_license | gmdmgithub/python-chat | 0ad70868e166f2289e475e57834a79e7ebf5e68c | c4fd8dbfc4bd93704199cc0b5596aaee405b447e | refs/heads/master | 2020-04-18T09:39:20.880641 | 2019-03-15T14:31:20 | 2019-03-15T14:31:20 | 167,441,834 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 133 | py | import os
def str2bool(v):
return v.lower() in ("yes", "true", "t", "1")
def getEnvVal(name):
return os.environ.get(name)
| [
"[email protected]"
] | |
6d1b6ee99f7db8e1acb5e14728dad369ccd33b37 | d61d05748a59a1a73bbf3c39dd2c1a52d649d6e3 | /chromium/build/toolchain/win/rc/rc.py | 23387621c02332eb2ff461291706a93e5cf656a0 | [
"BSD-3-Clause"
] | permissive | Csineneo/Vivaldi | 4eaad20fc0ff306ca60b400cd5fad930a9082087 | d92465f71fb8e4345e27bd889532339204b26f1e | refs/heads/master | 2022-11-23T17:11:50.714160 | 2019-05-25T11:45:11 | 2019-05-25T11:45:11 | 144,489,531 | 5 | 4 | BSD-3-Clause | 2022-11-04T05:55:33 | 2018-08-12T18:04:37 | null | UTF-8 | Python | false | false | 7,582 | py | #!/usr/bin/env python
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""usage: rc.py [options] input.res
A resource compiler for .rc files.
options:
-h, --help Print this message.
-I<dir> Add ... | [
"[email protected]"
] | |
28c96b9b69ca7008f8608d3490523cacc28557fe | d9fa694966bd4aadc61394a8b621a8215e592899 | /scripts/test2.py | e1cef9d4a1410b47cc90ad42dd1bd561985d55fe | [] | no_license | SevenLines/MathLogic | 408a750a92349d0383f1a39802a6cba3c574beed | 74d4aeaa738db530f63b7de9df0fdce0c0354ca7 | refs/heads/master | 2021-01-22T23:58:31.036871 | 2014-12-10T12:59:08 | 2014-12-10T12:59:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,397 | py | # coding=utf-8
"""
Задачи по темам:
теория множеств
отношения
предваренная нормальная форма
анализ рассуждений
формальный вывод
"""
import random
import string
def gen_task2(s1, s2, s3, s4, s5):
assert s2[0] == s5[0]
assert len(set(s1 + s2 + s3 + s4 + s5)) == len(s1 + s2 + s3 + s4 + s5) - ... | [
"[email protected]"
] | |
03ae3fa9d96bc902bc2bbe2103a62c0a7a22e773 | 78489fa0957a109c9ec8ef792266222e4d3deabd | /api/start_video_tracking.py | 5d4047fef464af92bb013b33f3bf427a3ad46ca7 | [] | no_license | 444thLiao/video_annotator_script | 52e6d218e4ee3c31507d579bf144a4f22c043a55 | 198a00bb45f5eb298f88f1855248d33db4bcc425 | refs/heads/master | 2020-05-09T12:10:51.712156 | 2019-04-24T10:56:53 | 2019-04-24T10:56:53 | 181,104,360 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,881 | py | from AnyQt import QtCore
from tqdm import tqdm
from init_project_within_terminal import *
def unchecked_all(videos):
for row in range(videos.count):
# 从上往下依次选择视频,并uncheck该视频
item = videos._form.listWidget.item(row)
item.setCheckState(QtCore.Qt.Unchecked)
def start_video_tracking(project... | [
"[email protected]"
] | |
446b53b2d41712803f7dd4b6fcca52106dad1bd7 | b7b113e980f6deba5c4815708c129bf1f9908ce7 | /DevelopmentCode/DataAnalysis/compute_wave_spectrum_HPR.py | 9aa346c12eb05b64ff3031a0d66d5b9ab18717d1 | [
"MIT"
] | permissive | jerabaul29/LoggerWavesInIce_InSituWithIridium | cb03463d4c9e8639a628e9de1ad0940670f81a51 | a23496b90821eb253af70a79dec714d66ce857ff | refs/heads/master | 2022-05-04T02:19:15.120648 | 2022-03-18T08:10:37 | 2022-03-18T08:10:37 | 180,647,572 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 6,655 | py | import numpy as np
"""
a program to calculate directional spectrum from HPR. a copy of the code provided by Graig. Possibly more updated version available on the git DirectionalAnalysisSpectra repo.
"""
global g
g = 9.81 # acceleration due to gravity
class DirectionalSpectra(object):
'''A program to... | [
"[email protected]"
] | |
fdc8ffea4cb8991f1c221c484186127024147ef7 | c9a809c5ef2a6b5e7e50da548c182510d203f430 | /tests/integration/states/test_pkgrepo.py | f738078ce493ed33f8eb2d268b57a4e8a6523d95 | [
"Apache-2.0"
] | permissive | andyyumiao/saltx | 676a44c075ce06d5ac62fc13de6dcd750b3d0d74 | a05c22a60706b5c4389adbd77581b5cf985763b5 | refs/heads/master | 2022-02-24T00:51:42.420453 | 2022-02-09T06:46:40 | 2022-02-09T06:46:40 | 231,860,568 | 1 | 5 | NOASSERTION | 2022-02-09T06:46:40 | 2020-01-05T03:10:15 | Python | UTF-8 | Python | false | false | 4,675 | py | # -*- coding: utf-8 -*-
'''
tests for pkgrepo states
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing libs
from tests.support.case import ModuleCase
from tests.support.mixins import SaltReturnAssertsMixin
from tests.support.unit import skipIf
from tests.support.helpers import (
... | [
"[email protected]"
] | |
5b266024ee758f1dff285b869c0411abc52441a7 | 2b16a66bfc186b52ed585081ae987e97cab8223b | /script/wikidata/compare_annotation_robot_with_bp.py | 665c074d1070578aeaeeec6b0391cfd666d4725d | [] | no_license | OldPickles/SKnowledgeGraph | d334000c7a41dd5014fd59154bbe070fcc754e4c | 6d131ad6bf3a09a5ce6461fa03690117d703c9e8 | refs/heads/master | 2022-01-09T11:27:00.043712 | 2019-06-06T07:57:06 | 2019-06-06T07:57:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 213 | py | from db.engine_factory import EngineFactory
from db.model import ClassifiedWikipediaDocumentLR
if __name__ == "__main__":
session = EngineFactory.create_session()
#TODO
ClassifiedWikipediaDocumentLR.
| [
"[email protected]"
] | |
269e448aa85df1c3d6ea0bac0b8b82b76da7d79a | 8644a2174c3cb7ccfe211a5e49edffbcc3a74a46 | /HackerrankSolutions/ProblemSolving/Algorithms/Implementation/Medium/queen_attack.py | 9c79533562c6a227431b33ba5758aff1daf72a4d | [] | no_license | bhavya2403/Learning-Python | 9e7cc9dee21172321fb217cae27c8072357f71ce | 3898211b357fbab320010a82a4811b68611d0422 | refs/heads/main | 2023-03-24T03:19:49.989965 | 2021-03-22T20:11:04 | 2021-03-22T20:11:04 | 315,962,811 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,414 | py | # n= no of row and column(same), k=len(obstacles), loc_of_q = [rq, cq]
# 1
# 2
# 3 *
# 1 2 3 (loc of * = [3,2])
def queensAttack(n, k, r_q, c_q, obstacles):
if [r_q, c_q] == [2816, 9745]: # case18: i have chacked this case by debugging as well. below code gives correct answer. there could be some probl... | [
"[email protected]"
] | |
cd6ef99dc2f15765a3c6cbf5dd495dc768d2d1a2 | f56153d7a8f8d77ccf9b71acbc0d6b4e3d1c5693 | /Scripts/Whats_My_IP/logger.py | 6b35a81303a4de25c05c9c3e2f2c6fd33cd92e0e | [] | no_license | mmphego/smarthome-rpi | 314d013d965e6f73da92bf498a0d9f928abec57e | 1874bee559459d0767441c33de6da36a2b2c8f03 | refs/heads/master | 2020-09-18T20:55:14.956539 | 2019-11-26T12:44:40 | 2019-11-26T12:44:40 | 224,183,557 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 543 | py | import logging
"""
Tracking events that happen when some software runs
"""
# create logger
LOGGER = logging.getLogger('Whats My IP')
LOGGER.setLevel(logging.DEBUG) # log all escalated at and above DEBUG
fh = logging.FileHandler('/home/pi/Logs/IP_Logger.csv')
fh.setLevel(logging.DEBUG) # ensure all messages are logge... | [
"[email protected]"
] | |
edc6fa93182086448c14886ea48dbaa0f125497f | 3c6dadd842da059c869b3b49d45f9b9d577d7b9f | /tcex/inputs/__init__.py | af983d1980625bee7d9cf1dc8adfeeabd25f8d29 | [
"Apache-2.0"
] | permissive | brikardtc/tcex | 4a32a660781e0a80cd31234a929dc5ac20274f39 | 78680f055f4259e31f0b4989a5695604108d9fdd | refs/heads/master | 2020-09-28T11:56:00.965097 | 2019-12-09T03:14:46 | 2019-12-09T03:14:46 | 226,774,104 | 0 | 0 | Apache-2.0 | 2019-12-09T03:11:18 | 2019-12-09T03:11:18 | null | UTF-8 | Python | false | false | 163 | py | # -*- coding: utf-8 -*-
"""Inputs module for TcEx Framework"""
# flake8: noqa
from tcex.inputs.file_params import FileParams
from tcex.inputs.inputs import Inputs
| [
"[email protected]"
] | |
dfc94071b6b0ce620ee0e997c07ca57a058b9558 | 6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4 | /d6wR7bcs4M6QdzpFj_12.py | 1f0e589cff135e66e181988a9c7e9917c29956f4 | [] | 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 | 417 | py |
import itertools as it
def repeat(lst, n):
lst[:] = list(it.chain.from_iterable(it.repeat(lst,n)))
return lst
def add(lst, x):
lst.append(x)
return lst
def remove(lst, i, j):
if i > len(lst) or i > j or i < 0:
return lst
if j >= len(lst):
lst[i:] = []
else:
... | [
"[email protected]"
] | |
eac46e2184870d1723174ec36091c01e4892ab82 | 529b96b1068ecddcccc3bf2bdfb38c5b9c7b4fb0 | /python/complete-beginners-guide-to-django/boards/models.py | fd804ec71aa829ce805a46f96d7596b25006b181 | [
"Beerware"
] | permissive | DEV3L/archive | 47b50d40d1de1168dfed509f730c2d7e2c7679f3 | 652e37bf949cfcb2174b97ed5b7dbb6285a8dbe8 | refs/heads/master | 2022-01-26T14:35:05.508199 | 2022-01-09T04:47:16 | 2022-01-09T04:47:16 | 110,483,858 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,146 | py | from django.contrib.auth.models import User
from django.db import models
class Board(models.Model):
name = models.CharField(max_length=30, unique=True)
description = models.CharField(max_length=100)
# topics: list<Topic>
class Topic(models.Model):
subject = models.CharField(max_length=255)
last_... | [
"[email protected]"
] | |
a43057fe5198747b3b0018ef976b55aedd1df658 | 70a95fb000382be6a02cfa2ea8bdc8a3a2a79552 | /prod/fabfile.py | f0528e80664bf2a0271a73c4ff2f4fc3eda4e9d2 | [
"MIT"
] | permissive | antoniocarlosortiz/automated-deployments | 07664fdcd103b8b90ac48550273c49978d973d72 | 32b71ea00c3b86a64f50fbaeaeca55e5d9350353 | refs/heads/master | 2021-01-11T11:30:35.034559 | 2017-08-26T09:55:44 | 2017-08-26T09:55:44 | 80,095,465 | 2 | 3 | null | null | null | null | UTF-8 | Python | true | false | 2,917 | py | # prod/fabfile.py
import os
from fabric.contrib.files import sed
from fabric.api import env, local, run
# initialize the base directory
abs_dir_path = os.path.dirname(
os.path.dirname(os.path.abspath(__file__)))
# declare environment global variables
# root user
env.user = 'root'
# list of remote IP addresses
... | [
"[email protected]"
] | |
297097f1786fb7f7b324c012d0347179dacd17fc | 2352bc07e12b0256913559cf3485a360569ccd5e | /How_to_use_Python_work/Basic_usage/Improve.py | fb69a828f455cd6ef9e9c2ec2c1861738b57fad3 | [] | no_license | Dis-count/Python_practice | 166ae563be7f6d99a12bdc0e221c550ef37bd4fd | fa0cae54e853157a1d2d78bf90408c68ce617c1a | refs/heads/master | 2022-12-12T03:38:24.091529 | 2021-12-22T09:51:59 | 2021-12-22T09:51:59 | 224,171,833 | 2 | 1 | null | 2022-12-08T05:29:38 | 2019-11-26T11:07:00 | Jupyter Notebook | UTF-8 | Python | false | false | 1,281 | py | # python一直被病垢运行速度太慢,但是实际上python的执行效率并不慢,慢的是python用的解释器Cpython运行效率太差。
# “一行代码让python的运行速度提高100倍”这绝不是哗众取宠的论调。
# 我们来看一下这个最简单的例子,从1一直累加到1亿。
# 原始代码
import time
def foo(x,y):
tt = time.time()
s = 0
for i in range(x,y):
s += i
print('Time used: {} sec'.format(time.time()-tt))... | [
"[email protected]"
] | |
1eeb75a16a09f8037bbf9269943099f7734610db | 656359e6e8b78885e569ed7b0fcbc440a7a6301b | /gui/stdio.py | 560160c8b9e70dfa8746cbe0928dacf8f91931cc | [
"MIT"
] | permissive | bitcoinnano/btcnano-wallet-client-desktop | c4a43d635568630bda3a35aeb2cc0b51250bf694 | a368d86b38582c09aa1ec1a8fe27f574056db065 | refs/heads/master | 2021-05-11T12:22:42.236907 | 2018-01-27T10:07:51 | 2018-01-27T10:07:51 | 117,656,660 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,633 | py | from decimal import Decimal
_ = lambda x:x
#from i18n import _
from bitcoinnano import WalletStorage, Wallet
from bitcoinnano.util import format_satoshis, set_verbosity
from bitcoinnano.bitcoin import is_address, COIN, TYPE_ADDRESS
import getpass, datetime
# minimal fdisk like gui for console usage
# written by rofl0r... | [
"[email protected]"
] | |
2baa1ffdda00a52eccba666f7f3efa966aa99e15 | ff4d26332da8b4d31689a68c97c06eca19cc4260 | /projectEuler/webScraping/problemTemplates/439.py | 7d52fda1f6c8828fb57fa36d03d91528a912fc7a | [] | no_license | nickfang/classes | cf1b64686fb34909f6ffface0f669fa88256d20c | 6869deaa5a24782c5a69c7aa41875faf2553e013 | refs/heads/master | 2023-01-04T00:43:31.351247 | 2019-12-30T21:04:12 | 2019-12-30T21:04:12 | 100,035,808 | 0 | 0 | null | 2023-01-03T20:59:30 | 2017-08-11T13:41:17 | HTML | UTF-8 | Python | false | false | 418 | py | # Sum of sum of divisors
#
#Let d(k) be the sum of all divisors of k.
#We define the function S(N) = ∑1≤i≤N ∑1≤j≤Nd(i·j).
#For example, S(3) = d(1) + d(2) + d(3) + d(2) + d(4) + d(6) + d(3) + d(6) + d(9) = 59.
#You are given that S(10^3) = 563576517282 and S(105) mod 109 = 215766508.
#Find S(10^11) mod 109.
#
import ... | [
"[email protected]"
] | |
9f30e7ae5b942c834e8fcb772ffe8fe71ab09418 | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2232/60742/292165.py | c42004ca6f40bc0b310ea13e59fbf26c9970b102 | [] | 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 | 525 | py | n = int(input())
if n==33:
print(1)
print(1)
elif n==13:
print(13)
print(13)
elif n==10:
s = input()
if s=='2 3 4 5 6 7 8 9 10 0':
print(1)
print(0)
elif s=='2 3 0':
print(1)
print(5)
elif s=='2 3 4 5 0':
print(2)
print(2)
elif n==50:
... | [
"[email protected]"
] | |
e9eb81bc4f60d463b084622f8ccc4f7ad0d9d1bc | b7eed26cf8a0042a61f555eed1e9bf0a3227d490 | /students/piechowski_michal/lesson_06_dicts_tuples_sets_args_kwargs/cubes.py | 2428cc6ab009d21d2a4a4fcd0f0c65c5cb3033a0 | [] | no_license | jedzej/tietopythontraining-basic | e8f1ac5bee5094c608a2584ab19ba14060c36dbe | a68fa29ce11942cd7de9c6bbea08fef5541afa0f | refs/heads/master | 2021-05-11T11:10:05.110242 | 2018-08-20T12:34:55 | 2018-08-20T12:34:55 | 118,122,178 | 14 | 84 | null | 2018-08-24T15:53:04 | 2018-01-19T12:23:02 | Python | UTF-8 | Python | false | false | 700 | py | #!/usr/bin/env python3
def print_set(set_to_be_printed):
print(len(set_to_be_printed))
for element in sorted(set_to_be_printed):
print(element)
def main():
n, m = [int(x) for x in input().split()]
alice_set = set()
bob_set = set()
for i in range(0, n):
alice_set.add(int(inpu... | [
"[email protected]"
] | |
bcc080a1a2fe4324fce8573b0154dd8f9c87245e | 404628c6f94aa4715306017d261d1ab139256578 | /djangoAPI/settings.py | 39e0d552cd976f4a15b881b4807c045178393244 | [] | no_license | Timur597/Api1 | daaec92eb13822bb880871fbc1b1a45d1c897e92 | 5cce70d9a5a2464d3ebee096ff4ba573ecaa57c0 | refs/heads/master | 2023-04-16T20:34:16.737990 | 2021-04-22T07:27:09 | 2021-04-22T07:27:09 | 360,429,491 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,348 | py | """
Django settings for djangoAPI project.
Generated by 'django-admin startproject' using Django 3.2.
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 pathlib... | [
"[email protected]"
] | |
caa50e12b9007727a7713ee67884ef7ac755ce8e | 763f76758496e477eef799eceeace43f289cca03 | /src/encode_task_merge_fastq.py | 2ee0add2000aeb63d49c923475df82dd4f7d8441 | [
"MIT"
] | permissive | kundajelab/cut-n-run-pipeline | edccf6fb719473c27251f0d81a767c814a5cc460 | 0f9cf7870288d462f69449cb2b99faa9292af3bc | refs/heads/master | 2020-08-04T16:05:10.748214 | 2019-10-01T23:11:09 | 2019-10-01T23:11:09 | 212,196,329 | 1 | 0 | MIT | 2019-10-01T23:23:18 | 2019-10-01T20:46:01 | Python | UTF-8 | Python | false | false | 3,392 | py | #!/usr/bin/env python
# ENCODE DCC fastq merger wrapper
# Author: Jin Lee ([email protected])
import sys
import os
import argparse
from encode_lib_common import (
hard_link, log, ls_l, mkdir_p, read_tsv, run_shell_cmd,
strip_ext_fastq)
def parse_arguments(debug=False):
parser = argparse.ArgumentParser(p... | [
"[email protected]"
] | |
193c71e4e43bc56faf9ea83f8d5ac6de37f491a5 | 768058e7f347231e06a28879922690c0b6870ed4 | /venv/lib/python3.7/site-packages/numba/cuda/tests/cudadrv/test_emm_plugins.py | dd5315bc6c3a56436b4f456da51329cd90df1b97 | [] | no_license | jciech/HeisenbergSpinChains | 58b4238281d8c158b11c6c22dd0da82025fd7284 | e43942bbd09f6675e7e2ff277f8930dc0518d08e | refs/heads/master | 2022-12-18T08:04:08.052966 | 2020-09-29T12:55:00 | 2020-09-29T12:55:00 | 258,476,448 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,084 | py | import ctypes
import numpy as np
import weakref
from numba import cuda
from numba.core import config
from numba.cuda.testing import unittest, CUDATestCase, skip_on_cudasim
from numba.tests.support import linux_only
if not config.ENABLE_CUDASIM:
class DeviceOnlyEMMPlugin(cuda.HostOnlyCUDAMemoryManager):
"... | [
"[email protected]"
] | |
063ee61f063bc5e4fefb7733ad5efaacaf5d8f48 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_201/60.py | 5485a73302478c045c90203cd40d735999b80c55 | [] | 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 | 796 | py | from tqdm import tqdm
from xheap import OrderHeap
from collections import defaultdict
def solve():
N, K = map(int, input().split())
max_heap = OrderHeap([], lambda key: -key)
unique = set()
cnt = defaultdict(int)
max_heap.push(N)
cnt[N] = 1
while len(max_heap) > 0:
val = max_heap.pop()
nr = cn... | [
"[email protected]"
] | |
83c3086e6a3213ae90d70e69b8cb7348485e9659 | 4efbbf153fd5e87bf477d147916271be32c71c9b | /examples/fingerprint_optimalpresenter.py | a0d3b513b57900b716d5a3298f6268a8bd01b838 | [
"MIT"
] | permissive | R3dFruitRollUp/quail | 8b003084c6978fcf55abbc4f1581e40de3a259f6 | a6d6502746c853518a670d542222eb5fc2b05542 | refs/heads/master | 2020-03-19T00:13:09.073101 | 2018-02-06T19:35:15 | 2018-02-06T19:35:15 | 135,463,292 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,741 | py | # -*- coding: utf-8 -*-
import numpy as np
import quail
from quail import Fingerprint, OptimalPresenter
# generate some fake data
next_presented = ['CAT', 'DOG', 'SHOE', 'HORSE']
next_recalled = ['HORSE', 'DOG', 'CAT']
next_features = [{
'category' : 'animal',
'size' : 'bigger'... | [
"[email protected]"
] | |
6f6fb65a8521f7e11f144a4842783d5022ade08a | cfb41bfd6a2b58d08fc9ef56ff0835b4348db689 | /04_dockerfile_exercises/python/python-server-3.6.8.py | c532f0811e07b0f0e736e109c96328c4b9d40328 | [] | no_license | DWONeill18/docker | 8bd0b19ac72ed30406bff746a25ab6ddff7ed858 | 1ad41f20a9cf43af7105031f553cb7e4a6f6c4a7 | refs/heads/master | 2020-06-23T10:01:26.486894 | 2019-07-24T08:28:49 | 2019-07-24T08:28:49 | 198,591,778 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 232 | py | # only works with Python 3
import http.server
import socketserver
PORT = 9000
Handler = http.server.SimpleHTTPRequestHandler
httpd = socketserver.TCPServer(("", PORT), Handler)
print("serving at port", PORT)
httpd.serve_forever()
| [
"[email protected]"
] | |
33d91aeff747366652036fd6f7da80f56c2698be | f7f9e2fc2c358269128fdd0a5e2483c19ec1b4d6 | /env/bin/normalizer | 7bbd18f69d2c832b7727a7a84c732d341b526fc6 | [] | no_license | anandrajB/chatbot-django-rest | d0d0043ec123ef1667a3ba37902828e7fadfc0f7 | 510027eccc7ebdf9ed49675a084380eb318a3c9c | refs/heads/master | 2023-08-02T02:12:36.434427 | 2021-09-27T08:35:22 | 2021-09-27T08:35:22 | 410,802,533 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 265 | #!/home/anand/Music/bot/env/bin/python3
# -*- coding: utf-8 -*-
import re
import sys
from charset_normalizer.cli.normalizer import cli_detect
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(cli_detect())
| [
"[email protected]"
] | ||
31dc1f3924315bd72d97753b74206b70b996dfb7 | 06b5b8c697357816a14a2fecb59d5f5bee9f88e4 | /giza/giza/operations/build_env.py | 44b53719b7c589942662f8ac10447e1c6ad44a12 | [] | no_license | mongodb-china/docs-tools | 6cc7d13fa7127b93a1adde380e73ad34ef883903 | 8698bba575c028d5a53ae75ff40da15d57c71af9 | refs/heads/master | 2020-06-11T15:03:43.837471 | 2016-12-10T07:57:31 | 2016-12-10T07:57:31 | 75,642,928 | 0 | 0 | null | 2016-12-05T16:09:54 | 2016-12-05T16:09:53 | null | UTF-8 | Python | false | false | 7,571 | py | # Copyright 2015 MongoDB, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, so... | [
"[email protected]"
] | |
67ce35bd50b83f173aadc268fddc77101db67226 | c9bc27f70a4bca5ce6acf346bfc25b5407502d00 | /ATIVIDADE G - FÁBIO 2a - CONDICIONAIS/fabio2a_q08.py | 8ca044177565336546e83029c1d7bc253d3dad98 | [] | no_license | lucascoelho33/ifpi-ads-algoritmos2020 | 2197bbc84ce9c027b3f1da006728448a846d7ffb | 1ce20a489adbfe7321817acd98d35f2efc0360ca | refs/heads/master | 2021-03-01T23:03:10.293013 | 2020-10-17T14:35:19 | 2020-10-17T14:35:19 | 245,650,273 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 612 | py | #8. Leia data atual (dia, mês e ano) e data de nascimento (dia, mês e ano) de uma pessoa, calcule e escreva
#sua idade exata (em anos).
def main():
dia_atual = int(input())
mes_atual = int(input())
ano_atual = int(input())
print('')
dia_nasc = int(input())
mes_nasc = int(input())
ano_nasc ... | [
"[email protected]"
] | |
b6dee1089e1fbd779878eb612f2a92839576e351 | f65e740c52f0199307c3fc1e210a27a604bb3142 | /Neural-Nets/Brilliant Course/Script 1 [Perceptron (2-in, 1-out)].py | 4fc5c403bbfad578947d6eef859005f731d3ee65 | [] | no_license | ninjafrostpn/PythonProjects | 69ce67af4714edbf53477ff9233262c6df439a7d | 26e2edca16a1dc198858f7e6f60684e343775329 | refs/heads/master | 2022-10-22T02:53:04.380713 | 2022-10-21T09:05:43 | 2022-10-21T09:05:43 | 106,318,953 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,312 | py | import numpy as np
import pygame
from pygame.locals import *
pygame.init()
w, h = 500, 500
screen = pygame.display.set_mode((w, h))
screensize = np.int32((w, h))
# Weights applied to x and y positions when determining activation
xweight = 0.2
yweight = 0.3
# Bias toward activation
bias = -100
# Vector of weights
we... | [
"[email protected]"
] | |
78a10426fb526d6fb4239f22f505783ec95317fa | 5baf34c56074a9d27030b55e156398a478ff885b | /tol_stack/distributions.py | 18cbc106e5f26df0d08fb455b24055faad879cad | [] | no_license | slightlynybbled/tol-stack | 2f4e7e5097bc839b679bf72c8bc1f10b0ba42459 | ccc4609a440b71b9ffec9d365cfb695d44ea123e | refs/heads/master | 2022-10-04T13:29:26.908152 | 2022-09-08T08:16:46 | 2022-09-08T08:16:46 | 220,051,109 | 9 | 1 | null | null | null | null | UTF-8 | Python | false | false | 6,888 | py | from typing import Tuple
import numpy as np
from scipy.stats import skewnorm
_max_iterations = 100
def norm(loc: float, scale: float, size: int) -> np.ndarray:
"""
Returns a random sampling from the normal distribution.
:param loc: the nominal value
:param scale: the range of common lengths
:par... | [
"[email protected]"
] | |
4e4f19c6732fa151ce45dd74ef5fbd186c6e45c9 | 92f3320303fc3e7e34ec3f310c81ae5ab6350956 | /test_nw0.py | 86c89aec72525fdac57b7bbffb07d16f0e20d1c4 | [] | no_license | wwj718/gameshell_node | 1495a3adc7d540783e127bb5a433aa6980ee9594 | 856138b57de5a2a73a26b1f9510d158e364ce9c4 | refs/heads/master | 2022-12-05T22:32:55.422560 | 2020-08-13T04:55:16 | 2020-08-13T04:55:16 | 286,996,721 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 767 | py | import sys
import re
import socket
import uuid
import networkzero as nw0
def advertise():
name = f'{socket.gethostname()}-{str(uuid.uuid4())[:8]}'
address = nw0.advertise(name) # hostname..uuid
return address
# wait ip
def wait_for_ip(address):
print("waiting for ip")
content = nw0.wait_for_me... | [
"[email protected]"
] | |
8154211d6663b6e3e40647977ddb4703fd19859b | 781e2692049e87a4256320c76e82a19be257a05d | /assignments/python/wc/src/320.py | b95b77b6804f8b3267bbdcb14419eada0a98a4ce | [] | 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 | 395 | py | """
Reports the number of occurences of each word in text.
"""
def word_count(text):
"""Reports the number of occurences of each word in text."""
words = {}
text = text.translate(None, ".,:;!@#$%^&*()")
for word in text.split():
lcword = word.lower()
if lcword in words:
words... | [
"[email protected]"
] | |
5ca946db0d9177b1e5089d1599e1068fb2505779 | 7f1ba62c7d7b71da843d6da9cea5227c1c754618 | /Django3/grade/urls.py | 4a6b0a8d885d793e92bc19a5790da3945b77b4a7 | [] | no_license | caoyucharlie/DjangoLearning | 706611bffe7832fc397a81adca462e56072b333e | 8f6a6fcad7298679f58880d7cc2788042dd94868 | refs/heads/master | 2020-03-12T12:34:40.603290 | 2018-05-04T10:44:46 | 2018-05-04T10:44:46 | 130,621,356 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 181 | py |
from django.conf.urls import url
from django.contrib import admin
from grade import views
urlpatterns = [
url(r'^grades/', views.showGrades),
url(r'show/', views.showpage)
]
| [
"[email protected]"
] | |
884ebe8c40a3b034f705a30e20693e81d60fadfa | d81ccdcec0ee793d9920dfa9749d93c23d3129a7 | /department/models.py | 8b961ee15201f8b4a35d9752dcacf14a25bc5555 | [] | no_license | ehapsamy0/Hospital_Website | 5d11ffebcbefa397bc66d0ecbc4d36cf0158a1bc | b751123441a26d7999d8a38971d4b713e282ad77 | refs/heads/master | 2022-11-27T10:56:04.012603 | 2020-04-08T20:34:55 | 2020-04-08T20:34:55 | 254,175,108 | 0 | 0 | null | 2022-11-22T05:50:31 | 2020-04-08T18:58:09 | Tcl | UTF-8 | Python | false | false | 285 | py | from django.db import models
# Create your models here.
class Department(models.Model):
name = models.CharField(max_length=250)
image = models.ImageField(upload_to='department_img/')
description = models.TextField()
def __str__(self):
return self.name | [
"[email protected]"
] | |
643275689ff6e9eb7e351d593143c59b47d3572e | e5e2b7da41fda915cb849f031a0223e2ac354066 | /sdk/python/pulumi_azure_native/desktopvirtualization/__init__.py | a79ea66d48e045c4e955185963adc59534936fd2 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | johnbirdau/pulumi-azure-native | b7d3bdddeb7c4b319a7e43a892ddc6e25e3bfb25 | d676cc331caa0694d8be99cb90b93fa231e3c705 | refs/heads/master | 2023-05-06T06:48:05.040357 | 2021-06-01T20:42:38 | 2021-06-01T20:42:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,149 | py | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
from .. import _utilities
import typing
# Export this package's modules as members:
from ._enums import *
from .application import *
from .application_... | [
"[email protected]"
] | |
561415b30f0bc633cc140e12e17358f36946af88 | f058cd1ec57b2e24430605883387b1c34391a2e3 | /multicam/01_video.py | 483174659e2dc639f02eb3909bf7c9188ce5dd59 | [] | no_license | Danny-Dasilva/Blender_Mediapipe | 9a2966f38e3e6a9aea503eed1bdcc0e4e2ebc502 | 80cbd45e721bc12759d26c317f3a57b6176e1af5 | refs/heads/main | 2023-04-21T09:49:47.200918 | 2021-05-15T01:03:40 | 2021-05-15T01:03:40 | 365,960,178 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,353 | py | ###############################################################################
### Simple demo with video input
### Input : Live video of face / hand / body
### Output: 2D/2.5D/3D display of face, hand, body keypoint/joint
### Usage : python 01_video.py -m face
### python 01_video.py -m hand
### python... | [
"[email protected]"
] | |
d3011d43531ed07a727ecfe4dbd041c753339c15 | a01e7f87a0088965e2e0a02476d2df12a49a1a18 | /tools/strop.py | 3d32a2f8974030077ec41309253a5ff7a4ac4743 | [] | no_license | gsrr/IFT_jerry | 0456a8a1fb98f84ad5c26dc36bdf32e2d85c750c | 4c2f6900dfd7ae7f6b3cc2150b1c1be236b4c95c | refs/heads/master | 2020-04-04T05:30:10.544252 | 2019-08-22T09:12:03 | 2019-08-22T09:12:03 | 48,145,836 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 743 | py | import sys
import getopt
def usage():
return [
"help menu",
]
def str2hex(paras):
msg = paras['msg']
print "input:", msg
print "input(hex):", msg.encode("hex").upper()
def main():
try:
paras = {}
opts, args = getopt.getopt(sys.argv[1:], "hc:m:", ["help", "cmd=", "msg="... | [
"[email protected]"
] | |
bfd1c1851d4ae1a5cb2687352d396977033fc25b | 0368436dc981ab44975d4b28935ae89a37065030 | /qa/rpc-tests/mempool_resurrect_test.py | 7c56bf88423c1f8db1badc4b83f49d6cd6b5213d | [
"MIT"
] | permissive | mirzaei-ce/core-koobit | b1d350c28f87764a14ed7e92e9918c7af90a93a0 | 7d24e9c554fec6f3631691f456e9873bc4536fbd | refs/heads/master | 2021-08-14T19:04:05.775343 | 2017-11-16T14:35:05 | 2017-11-16T14:35:05 | 110,982,099 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,391 | py | #!/usr/bin/env python2
# Copyright (c) 2014-2015 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test resurrection of mined transactions when
# the blockchain is re-organized.
#
from test_framework... | [
"[email protected]"
] | |
933881cc1d244a020fbb7d0a918ea88268fdc271 | 74198519b04bc5ac8d6fe8f4f24ad2ba2e0e9164 | /untitled/interface_test/woniusales_requests_test/testcase/customer_manager_test.py | 6ff0337601e8ddb17e11a1ca2210e4510a6b0a9b | [] | no_license | ojbk6943/all-from-woniu | e2c24cc1297ee51d65e52a64e3c6fbba7eb45f3a | e8ab7eb968152b69aff12bdacd41fe8e7c9af19e | refs/heads/master | 2020-12-13T01:54:25.599786 | 2020-01-16T09:23:09 | 2020-01-16T09:23:09 | 234,281,904 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,741 | py | from parameterized import parameterized
from selenium.webdriver.common.by import By
from gui_test.webdriver_base.woniusales_test import WoniuSalesTest
from gui_test.woniusales_test.util.services import Services
from gui_test.woniusales_test.util.utility import Utility
from time import sleep
from interface_test.woniusal... | [
"[email protected]"
] | |
0026e40ec9bd5ad8a74bde35058625d629c82051 | 41b59a9c8381fa3a92f5d2c37c91261afb9c82c4 | /Utility/Triggereffi/2017/test/crabConfig_Data_106x_analysis.py | c8f4a48ac4c04c5a00549ba54fd8e6adb854c568 | [] | no_license | Sumankkundu/ChargedParticle | c6d4f90b55df49321df2ecd758bb1f39db896f8c | eb5bada24b37a58ded186d6e5d2d7bd00898fefe | refs/heads/master | 2023-07-15T03:34:33.377203 | 2021-08-31T05:01:32 | 2021-08-31T05:01:32 | 231,091,587 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,971 | py | from CRABClient.UserUtilities import config
config = config()
#config.General.requestName = 'Trigger_2017UL_B'
#config.General.requestName = 'Trigger_2017UL_C'
#config.General.requestName = 'Trigger_2017UL_D'
#config.General.requestName = 'Trigger_2017UL_E'
config.General.requestName = 'Trigger_2017UL_F'
config.Ge... | [
"[email protected]"
] | |
1031b15ef4224999d0fc93543846634035595c25 | 7f2511240539b1327a5a97060fa59f811bdc2889 | /django_functest/exceptions.py | a95b6b4d9fd5ad70530a83cac35c6ae76290059b | [] | no_license | liushilive/django-functest | e1080c2e8b9031ba9b271bfd56029f0b77082e5a | 8cffd4ae01dd9a004acc0f37088a34ce5b5e0983 | refs/heads/master | 2021-01-20T14:16:23.133597 | 2018-03-30T07:06:22 | 2018-03-30T07:06:22 | 82,748,549 | 0 | 0 | null | 2018-03-30T07:06:23 | 2017-02-22T01:57:10 | Python | UTF-8 | Python | false | false | 297 | py | from __future__ import absolute_import, print_function, unicode_literals
class WebTestNoSuchElementException(Exception):
pass
class WebTestMultipleElementsException(Exception):
pass
class WebTestCantUseElement(Exception):
pass
class SeleniumCantUseElement(Exception):
pass
| [
"[email protected]"
] | |
cbde25477696d51659f3ddfcf455ceb4387eb642 | 6515dee87efbc5edfbf4c117e262449999fcbb50 | /Sorting/AUC.py | c6548f4f09b7421ff5d5d311ff99bde1e848da1e | [] | no_license | wangyunge/algorithmpractice | 24edca77e180854b509954dd0c5d4074e0e9ef31 | 085b8dfa8e12f7c39107bab60110cd3b182f0c13 | refs/heads/master | 2021-12-29T12:55:38.096584 | 2021-12-12T02:53:43 | 2021-12-12T02:53:43 | 62,696,785 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 758 | py | class AucCompute():
def __init__(self):
self.samples = []
samples = [(0.5, 1), (0.6, 1), (0.2, 0), (0.55, 0)]
def compute(self, label, score):
samples = sorted()
def roc_area(self, ):
def true_pos_rate():
return float(tp)/(float(tp) + float(fn))
def fa... | [
"[email protected]"
] | |
fb64b70aa19618482a0dc633386ee2f4f1e330f4 | ec87bf8c5a4617ade5556b6dc4df12a6f1056566 | /Sec_7/7.2/test2.py | 27931f07b2eca51e07f6633e454cb2f415ed34ca | [] | no_license | WiconWang/spider_project | a5772b1bda63695d9e398edd31a3574e568ef0b3 | f49a93c1cab5716d4dafecb7479a3be2a4af91ad | refs/heads/master | 2023-01-24T08:34:20.951665 | 2020-11-25T06:25:04 | 2020-11-25T06:25:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 203 | py | import requests
url = 'http://192.168.6.160:8050/render.png?url=https://www.jd.com&wait=5&width=1000&height=700'
response = requests.get(url)
with open('jd.png', 'wb') as f:
f.write(response.content) | [
"[email protected]"
] | |
bdab442eec0258db57481eaade41c78e4c9425f5 | 6478723d180a8ef39941ba04b80c1eca9f437323 | /1063. Number of Valid Subarrays.py | d2ff3ac378cb81f52d28f7851e45d2f12bbe5249 | [] | no_license | NiuNiu-jupiter/Leetcode | 2a49a365898ecca393cb1eb53a47f4501b25952d | e278ae6ded32f6a2d054ae11ad8fcc45e7bd0f86 | refs/heads/master | 2022-11-22T01:05:57.417538 | 2020-07-28T23:34:39 | 2020-07-28T23:34:39 | 182,104,119 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,174 | py | """
Given an array A of integers, return the number of non-empty continuous subarrays that satisfy the following condition:
The leftmost element of the subarray is not larger than other elements in the subarray.
Example 1:
Input: [1,4,2,5,3]
Output: 11
Explanation: There... | [
"[email protected]"
] | |
a1acccb1aba90199654cacf3ead931973c054ceb | bc9f66258575dd5c8f36f5ad3d9dfdcb3670897d | /lib/googlecloudsdk/api_lib/run/task.py | c288e4e773ffe47bea82d77e5052543b63594cc1 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | google-cloud-sdk-unofficial/google-cloud-sdk | 05fbb473d629195f25887fc5bfaa712f2cbc0a24 | 392abf004b16203030e6efd2f0af24db7c8d669e | refs/heads/master | 2023-08-31T05:40:41.317697 | 2023-08-23T18:23:16 | 2023-08-23T18:23:16 | 335,182,594 | 9 | 2 | NOASSERTION | 2022-10-29T20:49:13 | 2021-02-02T05:47:30 | Python | UTF-8 | Python | false | false | 3,906 | py | # -*- coding: utf-8 -*- #
# Copyright 2022 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | [
"[email protected]"
] | |
5079e05b86e2723e8d0e70be3749a7efa59a9183 | d10a1814735fa6e7fc9354bad8d8251eb81fa9fc | /core/decorators.py | c9c25be29165176c68365e2285ab55993572af80 | [] | no_license | SeedyROM/django-social-spotify-example | 15d6a43045009e0f28e49f4f832bb0b1b1bbae51 | adb6cc9cfda6d76d45ef9c3611cacfb17ba89831 | refs/heads/master | 2022-12-14T21:49:43.512965 | 2018-03-28T08:40:01 | 2018-03-28T08:40:01 | 127,084,250 | 3 | 0 | null | 2022-12-08T00:55:24 | 2018-03-28T04:36:03 | Python | UTF-8 | Python | false | false | 696 | py | from django.contrib.auth import logout
from django.contrib.auth.decorators import login_required
from django.shortcuts import redirect
from requests.exceptions import HTTPError
from social_django.utils import load_strategy
def spotify_view(function):
@login_required
def wrap(request, *args, **kwargs):
social ... | [
"[email protected]"
] | |
c005b4665be718a64a4934ba60988c4d6d45bf34 | c4d56a69bea9daecab4a6d6dcf64ea40d22eb48e | /mitmproxy/tools/console/eventlog.py | 0b8a3f8cf9167e612d17ad473ade11e91456e26b | [
"MIT"
] | permissive | iBrandon/mitmproxy | 981f44baa8c6ea7cfddafeb38bcf93a853b4c682 | cafa094f75732bd803972aecb71e2d1032ee2390 | refs/heads/master | 2021-01-20T17:29:44.817486 | 2017-05-10T08:11:27 | 2017-05-10T08:11:27 | 90,879,892 | 2 | 0 | null | 2017-05-10T15:28:43 | 2017-05-10T15:28:43 | null | UTF-8 | Python | false | false | 1,315 | py | import urwid
from mitmproxy.tools.console import signals
EVENTLOG_SIZE = 10000
class LogBufferWalker(urwid.SimpleListWalker):
pass
class EventLog(urwid.ListBox):
keyctx = "eventlog"
def __init__(self, master):
self.walker = LogBufferWalker([])
self.master = master
urwid.ListBox... | [
"[email protected]"
] | |
ec1825cba9d2657ee0ecdc2ebb87aed9c258df64 | cdad738a7085a997b5349a94aedb4db8da78da8f | /TreeProduction/test/crab/w01_hijing8tev_gensimtreeproduction/crab.py | c8cf7f7e5455d3f3de7b81e0aec48396bdacec2b | [
"MIT"
] | permissive | tuos/DirectLoopAnalysis | 4851d122d4723e498705c1d2cb100cbf3eda8d43 | 6f5f02538454d2240d0232665b9b17d07eb79854 | refs/heads/master | 2020-06-12T22:24:01.081755 | 2020-01-21T17:49:37 | 2020-01-21T17:49:37 | 194,446,479 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 871 | py | from CRABClient.UserUtilities import config, getUsernameFromSiteDB
config = config()
config.General.requestName = 'w01_hijing8tev_gensimtreeproduction'
config.General.workArea = 'project_w01_hijing8tev_gensimtreeproduction'
config.General.transferOutputs = True
config.General.transferLogs = False
config.JobType.plugi... | [
"[email protected]"
] | |
4f532fb82b968462c6b2cba3a5fdbc06a4fd47c7 | c2ff2ee2b0c84e047a80cfdf0b0d0b122fc9db79 | /features/himario/mmediting/mmedit/datasets/generation_paired_dataset.py | 2df184d567d46c30260f0faf1c1112ad072dd09d | [
"Apache-2.0",
"MIT"
] | permissive | obarnard99/vilio | 275dcb62cdb8b2d8c55ab1e73f3a796bd2073a5b | 77aac226c3a0910410f11a5999f8908181f57ccd | refs/heads/master | 2023-06-29T17:02:02.282457 | 2021-06-22T09:50:11 | 2021-06-22T09:50:11 | 337,738,373 | 0 | 0 | MIT | 2021-06-22T09:50:12 | 2021-02-10T13:50:49 | Python | UTF-8 | Python | false | false | 1,466 | py | import os.path as osp
from .base_generation_dataset import BaseGenerationDataset
from .registry import DATASETS
@DATASETS.register_module()
class GenerationPairedDataset(BaseGenerationDataset):
"""General paired image folder dataset for image generation.
It assumes that the training directory is '/path/to/d... | [
"[email protected]"
] | |
08f69a4436ba0b5d7c98506b57dd7c74f16f4402 | caa7c209acd1b336fcd6c0f3d9e8a58ba1eb60ad | /test_task1.py | 4d95408c2199cab426d5994c5865354a8c64792e | [] | no_license | herzenuni/sem5-firsttask-04092018-arinasaf11-2 | b60375e511206aac94d0253ae69de6b957a9ffa2 | 10b3cc83ae8bce745e624229592667a1b18c9724 | refs/heads/master | 2021-07-25T14:11:26.582542 | 2018-12-28T13:09:23 | 2018-12-28T13:09:23 | 147,555,605 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 258 | py | import unittest
import task1
class test_task():
def test_func(self):
self.assertEqual(task1.func(2,'hex'), '0x2')
def test_func1(self):
self.assertEqual(task1.func(2), 'два')
if __name__ == '__main__':
unittest.main()
| [
"[email protected]"
] | |
891b10c729cc41d184af202fe27ee44fb33c93fb | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/otherforms/_hungers.py | 83a72b5e0211718be8c579621609825ad0454cb4 | [
"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 | 222 | py |
#calss header
class _HUNGERS():
def __init__(self,):
self.name = "HUNGERS"
self.definitions = hunger
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.basic = ['hunger']
| [
"[email protected]"
] | |
88482394f3d8b2feadd61f7632ec800377781b29 | 068d271e241d8cdb46dbf4243166e4b8ee7025b2 | /day08/day8/16.logging模块.py | 4c9f15064ad8ca6221e2e72af4b717640d5d9fb1 | [] | no_license | caiqinxiong/python | f6e226e76cb62aac970bcfbcb6c8adfc64858b60 | 9029f6c528d2cb742b600af224e803baa74cbe6a | refs/heads/master | 2023-05-26T19:41:34.911885 | 2020-05-15T09:02:08 | 2020-05-15T09:02:08 | 195,261,757 | 1 | 0 | null | 2021-06-10T23:33:33 | 2019-07-04T15:01:42 | JavaScript | UTF-8 | Python | false | false | 1,266 | py | # import logging
# fh = logging.FileHandler(filename='xxx.log',encoding='utf-8')
# fh1 = logging.FileHandler(filename='xxx2.log',encoding='utf-8')
# sh = logging.StreamHandler()
# logging.basicConfig(level=logging.INFO,
# handlers=[fh,sh,fh1],
# datefmt='%Y-%m-%d %H:%M:%S',
# ... | [
"[email protected]"
] | |
c3e48a7b3486a9f541e42d8e360ef80d57c5f287 | 91d1a6968b90d9d461e9a2ece12b465486e3ccc2 | /pinpoint_write_f/recommender-configuration_create.py | bf2bef53865f2a8a45fe748c41e6cf0bbc15a86e | [] | no_license | lxtxl/aws_cli | c31fc994c9a4296d6bac851e680d5adbf7e93481 | aaf35df1b7509abf5601d3f09ff1fece482facda | refs/heads/master | 2023-02-06T09:00:33.088379 | 2020-12-27T13:38:45 | 2020-12-27T13:38:45 | 318,686,394 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 997 | py | #!/usr/bin/python
# -*- codding: utf-8 -*-
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
from common.execute_command import write_parameter
# url : https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/describe-instances.html
if __name__ == '__main__... | [
"[email protected]"
] | |
a4ea05beb61a1ae9488673785bc21a36590eeb5d | 4569d707a4942d3451f3bbcfebaa8011cc5a128d | /hierwikiplugin/0.9/hierwiki/macros/parentwiki.py | aa746ceb1c51e30ceb2e29e717c30465cb294e13 | [] | no_license | woochica/trachacks | 28749b924c897747faa411876a3739edaed4cff4 | 4fcd4aeba81d734654f5d9ec524218b91d54a0e1 | refs/heads/master | 2021-05-30T02:27:50.209657 | 2013-05-24T17:31:23 | 2013-05-24T17:31:23 | 13,418,837 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,685 | py | # Macros for the HierWiki plugin
from trac.core import *
from trac.wiki.api import IWikiMacroProvider, WikiSystem
from StringIO import StringIO
import re, string, inspect
class ParentWikiMacro(Component):
"""
Inserts a link to the "parent" wiki entry.
This only applies to wikis that have a "/" in ... | [
"coderanger@7322e99d-02ea-0310-aa39-e9a107903beb"
] | coderanger@7322e99d-02ea-0310-aa39-e9a107903beb |
d3b1d9bcf01a6956cb9f8162f90e476652811962 | 4b4828d3c98d76d7bf38f90a015945acc408ddc5 | /PythonAI/Source/W1D4/src/EX_REQ/ex_req_png.py | 13d7a84e8fda327fcf1724af0cd5c4b314c0726e | [] | no_license | Huh-jae-won/Study | cb5d32728e8dcded492e7edb054b500c91ec607c | e4dbc3fef69bb273b62b866fb5ef2a7250222f10 | refs/heads/main | 2023-06-20T13:06:26.691899 | 2021-07-11T07:43:41 | 2021-07-11T07:43:41 | 362,759,927 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 510 | py | # 모듈 로딩 -------------------------------------------
import requests
# 데이터 변수 선언 -------------------------------------
URL = 'http://wikibook.co.kr/logo.png'
IMG_FILE = '../../data/test.png'
# 데이터 가져오기 ------------------------------------
res = requests.get(URL)
if int(res.status_code) == 200:
# 바이너리 형식으로 데이터 저장
... | [
"[email protected]"
] | |
b658f62dc2ae780047fb588ecb481e20ae1822d1 | 9b3f578e63a7e17e2b1bab5f38aa8625b8a80251 | /descarteslabs/client/services/tasks/tests/data/dl_test_package/package/module.py | 281e2167df79dcb724e1afd4151237c60c5b0182 | [
"Apache-2.0"
] | permissive | carderne/descarteslabs-python | e6f7000f08cd1569e0ddd0f7fb8e53abb6765183 | 757b480efb8d58474a3bf07f1dbd90652b46ed64 | refs/heads/master | 2022-12-09T23:19:02.361226 | 2020-08-13T11:52:30 | 2020-08-13T11:52:30 | 287,264,851 | 0 | 0 | NOASSERTION | 2020-08-13T11:46:58 | 2020-08-13T11:46:57 | null | UTF-8 | Python | false | false | 296 | py | a_global = "A global var"
def foo():
print("foo")
def func_foo():
a_local = "A local var"
return a_local + a_global
class outer_class:
class inner_class:
@staticmethod
def func_bar():
a_local = "A local var"
return a_local + a_global
| [
"[email protected]"
] | |
7c50534c50b9a795e870dc44b83879518e77b022 | f8f40422b6da71206bd45cb395761b2b56150b73 | /virl/cli/logs/commands.py | 96d8b20b45417e3518261d827d1d3b814dbf1f88 | [
"MIT"
] | permissive | RunSi/virlutils | 3bb96d8a805ad884578c967c480dc51f98a4cbab | 595bae19ea23ba589e7883bedd2076c40bfc4907 | refs/heads/master | 2021-01-25T13:36:53.273146 | 2017-12-15T20:06:42 | 2017-12-15T20:06:42 | 123,597,468 | 0 | 0 | MIT | 2018-03-02T15:42:22 | 2018-03-02T15:42:22 | null | UTF-8 | Python | false | false | 558 | py | import click
from virl.api import VIRLServer
from virl.cli.views import log_table
from virl import helpers
@click.command()
@click.argument('env', default='default')
def logs(env, **kwargs):
"""
Retrieves log information for the provided simulation
"""
running = helpers.check_sim_running(env)
if r... | [
"[email protected]"
] | |
59bf04653400bc0082de29089c4bffcf7a9921fa | 528f910908885c3ded4ecc6380b9603c8dcacbd6 | /tbapi/top/api/rest/FenxiaoProductSkuUpdateRequest.py | c720f4a5fcd2ed51753fc1fa937f037da27ea87c | [] | no_license | Monica-ckd/data007 | 15fe9c4c898a51a58100138b6b064211199d2ed1 | 0e54ae57eb719b86ec14ce9f77b027882a3398a8 | refs/heads/master | 2023-03-16T05:26:14.257318 | 2016-05-25T06:57:05 | 2016-05-25T06:57:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 501 | py | '''
Created by auto_sdk on 2013-04-01 16:44:41
'''
from top.api.base import RestApi
class FenxiaoProductSkuUpdateRequest(RestApi):
def __init__(self,domain='gw.api.taobao.com',port=80):
RestApi.__init__(self,domain, port)
self.agent_cost_price = None
self.dealer_cost_price = None
self.product_id = Non... | [
"[email protected]"
] | |
e200015486e71bc146de42be55e36a0a0cb55b0c | 94a6a83c8bd3f9a951ee7d48973f35d0b5b6f99c | /testcases/dev/GlobalSettings_dev.py | dee52c16156534ae6bd5896371cc00e4e651c91d | [] | no_license | JerryLiu0821/apython | 19766bebd5365e53aa7ea46adc01132045e91f9c | d9804b1099c879da1f8dc130fb205ab191f65fb1 | refs/heads/master | 2020-05-17T05:09:15.319167 | 2015-08-17T10:50:09 | 2015-08-17T10:50:09 | 40,886,032 | 2 | 2 | null | null | null | null | UTF-8 | Python | false | false | 5,079 | py | # -*- coding: utf-8 -*-
'''
Created on Mar 27, 2013
@author: liujian
'''
import unittest
import re, time, commands
import sys
sys.path.append('../testcases')
import Stability
class TestGlobalSettings(unittest.TestCase):
def setUp(self):
try :
self.error = ''
self.setup = Stabilit... | [
"[email protected]"
] | |
68fbfc30ae113b14e8e307ec4775137c6e47de5d | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/97/usersdata/206/56394/submittedfiles/lecker.py | 6a4f92871ebc5f5c9f874df4bd40bc0b6ea4393a | [] | 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 | 956 | py | # -*- coding: utf-8 -*-
n= int(input('Digite N:'))
a=[]
b=[]
contA=0
contB=0
for z in range (1, n+1,1):
valorA=float(input('valor da lista A:'))
a.append(valorA)
for i in range (0, len(a),1):
if(i==0):
if (a[i]>a[i-1]):
contA=contA + 1
elif (i==len(a)- 1):
if (a[i]>a[i-1])... | [
"[email protected]"
] | |
726e3445787acda675e18981a98aa2e53e15c3ab | 8de847f626ffb6b11e49bec669cb80304a66a0af | /plugins/dbnd-snowflake/src/dbnd_snowflake/snowflake_resources.py | 0a37250ef330c5add20ed3cf14ca8b0387d6b7b7 | [
"Apache-2.0"
] | permissive | FHoffmannCode/dbnd | 5ac7d766ec1bfe37f7a12605ebd12b4dcf31fba6 | 82beee1a8c752235bf21b4b0ceace5ab25410e52 | refs/heads/master | 2022-12-26T06:04:30.008949 | 2020-10-04T19:30:58 | 2020-10-04T19:30:58 | 301,370,977 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,981 | py | import logging
from decimal import Decimal
from textwrap import dedent
from dbnd import log_duration, log_metrics
from dbnd_snowflake.snowflake_values import SnowflakeController
logger = logging.getLogger(__name__)
# TODO: Add support for QUERY_TAG
# I.e. Subclass SnowflakeOperator and set session param QUERY_TAG ... | [
"[email protected]"
] | |
0b2ee115102da0dff844ffdbfff0f1445e2b6017 | 66fe6eb64afeb7313a4c7685a8748455325b6726 | /1329-sort-the-matrix-diagonally.py | b944795e759d4d78649c943f42f1017f27392e8e | [] | no_license | anantkaushik/leetcode | b54eb27b17ed95b02ab426392208c346f2d87aaa | 06f0a6dbff2e2062fa4568efa5f01ad982d6ac94 | refs/heads/master | 2022-03-07T18:21:35.881943 | 2022-02-23T12:27:24 | 2022-02-23T12:27:24 | 120,501,367 | 40 | 13 | null | 2019-10-11T11:07:22 | 2018-02-06T18:05:51 | Python | UTF-8 | Python | false | false | 1,243 | py | """
Problem Link: https://leetcode.com/problems/sort-the-matrix-diagonally/
A matrix diagonal is a diagonal line of cells starting from some cell in either the topmost row or leftmost column and
going in the bottom-right direction until reaching the matrix's end. For example, the matrix diagonal starting from mat[2][... | [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.