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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3d51cada4fcc3bccaa05d0d8bcf13d87f511e4cd | dd3bbd4e7aaee7a8a5f26b927ce28ac472c855a5 | /eggs/plone.indexer-1.0-py2.7.egg/plone/indexer/wrapper.py | af6043ef51e1809c325d4ff5c16172fda8fd7798 | [] | no_license | nacho22martin/tesis | ea0a822f8bdbdef6f13f41276ecd4d6e85427ca5 | e137eb6225cc5e724bee74a892567796166134ac | refs/heads/master | 2020-12-24T13:20:58.334839 | 2013-11-09T12:42:41 | 2013-11-09T12:42:41 | 14,261,570 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,382 | py | from zope.interface import implements, providedBy, Interface
from zope.interface.declarations import getObjectSpecification
from zope.interface.declarations import ObjectSpecification
from zope.interface.declarations import ObjectSpecificationDescriptor
from zope.component import adapts, queryMultiAdapter
from plone.... | [
"ignacio@plone.(none)"
] | ignacio@plone.(none) |
667f548bbdde7dd5e71a13711858b07f4fcd4843 | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2247/60716/266133.py | 8db7c824a1b3b1a0d5f01af76ea81c3268fb320c | [] | 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 | 433 | py | strs = input().split(',')
lists = [int(i) for i in strs]
#print(lists)
if lists!=[5, 4, 3, 1] and lists!=[1, 2, 3, 4] and lists!=[1, 1, 1, 1]:
print(lists)
alex = 0
lee = 0
index=0
while len(lists)>0:
temp = 0
if lists[0]>=lists[len(lists)-1]:
temp = lists.pop(0)
else:
temp = lists.pop()... | [
"[email protected]"
] | |
e2b8ba8c8017dc208ccc30241dc2628fc5650a09 | dffe3e0b7f803ffbf98ef92fbee5786376873505 | /accounts/models.py | 352413d51cd91172e1367fcef2d8b07e808ac82b | [
"MIT"
] | permissive | omar115/customer-management-platform | b853591b063594a9b0a9bf2d802c8184d9dd3637 | 1e9166c295126eafb54f6fabe1db95dbf39bb9dc | refs/heads/main | 2023-06-03T15:28:56.574720 | 2021-06-18T21:02:16 | 2021-06-18T21:02:16 | 377,743,739 | 0 | 0 | MIT | 2021-06-18T21:02:17 | 2021-06-17T07:31:46 | Python | UTF-8 | Python | false | false | 1,517 | py | from django.db import models
# Create your models here.
class Customer(models.Model):
name = models.CharField(max_length=200, null=True)
phone = models.CharField(max_length=100, null=True)
email = models.CharField(max_length=200, null=True)
date_created = models.DateTimeField(auto_now_add=True, null=T... | [
"[email protected]"
] | |
4a500466ac29119c0d1d6a39c3be619e931254bc | 96e76bcb634e0e48bcf3ae352eb235ed9bc32b36 | /app/calculations.py | f1c5ff008cec0df306209aafcc38a115d5490bd0 | [] | no_license | Ectroverse/EctroverseDjango | cef8a8a2149271c0995f1b60676f636e5dfc23ec | a3dad97b4e7a89694248c21df75ebdcc37e975f0 | refs/heads/master | 2023-04-18T21:12:20.062646 | 2021-04-28T11:06:01 | 2021-04-28T11:06:01 | 291,338,914 | 1 | 3 | null | 2021-01-23T14:32:21 | 2020-08-29T19:50:33 | Python | UTF-8 | Python | false | false | 8,106 | py | import numpy as np
from .constants import *
from .models import *
# This is where longer formulas should go, 1-3 liners can go inside process_tick.py
def explore_FR_cost(num_planets, num_explos_traveling):
return int(np.floor((num_planets + num_explos_traveling)/4.0 + 3)) # its either +3 or +10 depending o... | [
"[email protected]"
] | |
234c1d8d515203793de7a04d88a66a7bb1373620 | 30daf732b9b2e6a38b77225cbcaa3cf8fee0e86e | /Binary Tree -2/Lectures/check if tree is balanced or not IMPROVED.py | 1079696cbe9e4baad13adef02e000348a063d46f | [] | no_license | HarikrishnaRayam/Data-Structure-and-algorithm-python | 23b4855751dc0bc860d2221115fa447dc33add3e | 0a2ebe6e3c7c7c56c9b7c8747a03803d6e525dda | refs/heads/master | 2023-03-17T09:59:31.265200 | 2020-09-10T17:50:27 | 2020-09-10T17:50:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,514 | py | # -*- coding: utf-8 -*-
"""
Created on Tue Apr 28 22:29:48 2020
@author: cheerag.verma
Time Complexity = O(n)
"""
class BinaryTree:
def __init__(self,data):
self.data = data
self.left = None
self.right = None
def takeInput():
root = int(input())
... | [
"[email protected]"
] | |
d2bf1e28419cf4c75659518016fe12d82d2ec4ca | 3d19e1a316de4d6d96471c64332fff7acfaf1308 | /Users/S/Sarietha/oakleyeurope.py | 2a8a9989fd01cfcc5984bf59c67b78c63d20201c | [] | no_license | BerilBBJ/scraperwiki-scraper-vault | 4e98837ac3b1cc3a3edb01b8954ed00f341c8fcc | 65ea6a943cc348a9caf3782b900b36446f7e137d | refs/heads/master | 2021-12-02T23:55:58.481210 | 2013-09-30T17:02:59 | 2013-09-30T17:02:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,472 | py | ###################################################################################
# Twitter scraper - designed to be forked and used for more interesting things
###################################################################################
import scraperwiki
import simplejson
import urllib2
# Change QUERY to y... | [
"[email protected]"
] | |
0a37e1a29baa81ce7acb8177264987c2c5588ad2 | c7a6f8ed434c86b4cdae9c6144b9dd557e594f78 | /ECE364/.PyCharm40/system/python_stubs/348993582/CORBA/TRANSIENT.py | 075d3a163f32e8888c52378120610e7d07232f02 | [] | no_license | ArbalestV/Purdue-Coursework | 75d979bbe72106975812b1d46b7d854e16e8e15e | ee7f86145edb41c17aefcd442fa42353a9e1b5d1 | refs/heads/master | 2020-08-29T05:27:52.342264 | 2018-04-03T17:59:01 | 2018-04-03T17:59:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,302 | py | # encoding: utf-8
# module CORBA calls itself ORBit.CORBA
# from /usr/lib64/python2.6/site-packages/gtk-2.0/bonobo/_bonobo.so
# by generator 1.136
# no doc
# imports
from ORBit.CORBA import (ADD_OVERRIDE, ATTR_NORMAL, ATTR_READONLY,
AttributeDescription, AttributeMode, COMPLETED_MAYBE, COMPLETED_NO,
COMPLETE... | [
"[email protected]"
] | |
79b927b95495699ba8dc4d1bff9f40aa07c409fd | d3efc82dfa61fb82e47c82d52c838b38b076084c | /Autocase_Result/MEDIUM/YW_ZXBMM_SZSJ_012.py | ce70e6c97112eccb70762569eb0a2745ca8a1ae9 | [] | no_license | nantongzyg/xtp_test | 58ce9f328f62a3ea5904e6ed907a169ef2df9258 | ca9ab5cee03d7a2f457a95fb0f4762013caa5f9f | refs/heads/master | 2022-11-30T08:57:45.345460 | 2020-07-30T01:43:30 | 2020-07-30T01:43:30 | 280,388,441 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,989 | py | #!/usr/bin/python
# -*- encoding: utf-8 -*-
import sys
sys.path.append("/home/yhl2/workspace/xtp_test/xtp/api")
from xtp_test_case import *
sys.path.append("/home/yhl2/workspace/xtp_test/service")
from ServiceConfig import *
from mainService import *
from QueryStkPriceQty import *
from log import *
sys.path.append("/h... | [
"[email protected]"
] | |
ad71f9cf6ae76ff247eb8a8a293f4d39d412282b | 1ab7b3f2aa63de8488ce7c466a67d367771aa1f2 | /Ricardo_OS/Python_backend/venv/lib/python3.8/site-packages/pandas/_typing.py | 76ec527e6e25860f431eb6ed7e957b4dbc03bb82 | [
"MIT"
] | permissive | icl-rocketry/Avionics | 9d39aeb11aba11115826fd73357b415026a7adad | 95b7a061eabd6f2b607fba79e007186030f02720 | refs/heads/master | 2022-07-30T07:54:10.642930 | 2022-07-10T12:19:10 | 2022-07-10T12:19:10 | 216,184,670 | 9 | 1 | MIT | 2022-06-27T10:17:06 | 2019-10-19T09:57:07 | C++ | UTF-8 | Python | false | false | 3,745 | py | from datetime import datetime, timedelta, tzinfo
from pathlib import Path
from typing import (
IO,
TYPE_CHECKING,
Any,
AnyStr,
Callable,
Collection,
Dict,
Hashable,
List,
Mapping,
Optional,
Type,
TypeVar,
Union,
)
import numpy as np
# To prevent import cycles pl... | [
"[email protected]"
] | |
915f750c2d95faa2dda3d6014a9953a3ca6040ca | 29cbf374b3c08e17c559b1870370d6db01369bc2 | /PyCrowlingo/ApiModels/SearchEngine/Responses.py | 0c43c592cf733a4bc49aa6890ac10275db7fbaa0 | [] | no_license | Crowlingo/PyCrowlingo | f12900dd44da1f04a5d55b064a56fdd5f5918bb6 | 8cd134f8527ae2eebefaaa8c42eb2d79751b26b3 | refs/heads/master | 2023-07-04T08:26:06.176478 | 2021-08-11T17:27:55 | 2021-08-11T17:27:55 | 266,834,155 | 5 | 1 | null | null | null | null | UTF-8 | Python | false | false | 376 | py | from .Examples import Responses as Examples
from ..Attributes import LangSearchResult, DocumentsId
class Search(Examples.Search, LangSearchResult):
pass
class CreateDocuments(Examples.CreateDocuments, DocumentsId):
pass
class CreateKeywords(Examples.CreateKeywords, DocumentsId):
pass
class DeleteDoc... | [
"[email protected]"
] | |
937f72f20da6e97acbef35888d289f6c903eb380 | 722b85a88be1688974a87fc307887a1ed3d0e0af | /swagger_server/models/data_entry.py | cfaca829dad7ddc53c62a935cf1160bfd295fb81 | [
"MIT"
] | permissive | Capping-WAR/API | 579d9a354c5b947efad9759939a8c020298bfe76 | 981823732f2b4f8bc007da657d5195579eb7dad3 | refs/heads/master | 2020-07-28T05:43:23.062068 | 2019-11-30T20:50:44 | 2019-11-30T20:50:44 | 209,327,306 | 0 | 0 | MIT | 2019-11-19T22:22:09 | 2019-09-18T14:19:58 | Python | UTF-8 | Python | false | false | 5,930 | py | # coding: utf-8
from __future__ import absolute_import
from datetime import date, datetime # noqa: F401
from typing import List, Dict # noqa: F401
from swagger_server.models.base_model_ import Model
from swagger_server import util
class DataEntry(Model):
"""NOTE: This class is auto generated by the swagger c... | [
"[email protected]"
] | |
1d07a990fcad3988c9905f19888bd2f562286804 | 12971fc2b1426f3d3a52039f21c4c2d7bb820f68 | /ProjectEuler/p001/sum_multiples.py | 3ec6d737728ecde60f3348e4ed294d3faa55f60d | [
"MIT"
] | permissive | adrianogil/AlgoExercises | 29b3c64e071008bffbfe9273130f980100381deb | be1d8d22eedade2e313458e8d89185452d9da194 | refs/heads/main | 2023-08-18T23:31:51.463767 | 2023-07-22T18:02:46 | 2023-07-22T18:02:46 | 86,254,111 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 565 | py | # https://projecteuler.net/problem=1
# If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
def sum_multiples_3_or_5_below(below_target):
total_sum = 0
for n in range(0, below_target):
if n % 3 == 0 or n % 5 == 0:
total_sum += n
retu... | [
"[email protected]"
] | |
e6e09c8f6ec320e16d3d27bb48752350f7e3e3da | 7c0820998f6ed2f1f5ee82b8b7ffd67c3228bfb6 | /pygame/plane_sprites_03_enemy.py | 91bf620db5da622afeaa52cb838577e18a63260a | [] | no_license | youinmelin/practice2020 | 5127241eaccf3ec997bb10671008a9a7c5f9d741 | 47d376b6d264141c229b6afcc2be803f41fd611e | refs/heads/master | 2022-12-12T00:28:22.293373 | 2020-09-22T08:29:37 | 2020-09-22T08:29:37 | 237,427,204 | 0 | 0 | null | 2022-11-04T19:10:12 | 2020-01-31T12:38:26 | Python | UTF-8 | Python | false | false | 2,788 | py | import pygame
import random
SCREEN_RECT = pygame.Rect(0, 0, 480, 700)
CREATE_ENEMY_EVENT = pygame.USEREVENT
HERO_FIRE_EVENT = pygame.USEREVENT + 1
class GameSprite(pygame.sprite.Sprite):
""" plane game sprites"""
def __init__(self,image_name,speed=1):
# 调用父类的初始化方法
super().__init__()
se... | [
"[email protected]"
] | |
1f0e1b078a3e7b081475307d57849c0b378bbb8e | f8580d2c963b6a3c34e918e0743d0a503a9584bd | /unittests/test_scrolwin.py | 117f89e77c3ddf2e066ffd7cbf693e8db8bb1974 | [] | 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 | 2,417 | py | import imp_unittest, unittest
import wtc
import wx
#---------------------------------------------------------------------------
class scrolwin_Tests(wtc.WidgetTestCase):
def commonBits(self, w):
vsize = 750
rate = 20
w.SetSize(self.frame.GetClientSize())
w.EnableScrolling... | [
"[email protected]"
] | |
40ebe62b6d5033e8e10ea24956730f3e06ee69b1 | a6aaca52563f35a05f37dcd27237e0c04a5427a9 | /integration/integration.py | 42354a7aa9db9c73d1ccb007463d032aff974f0a | [
"Apache-2.0"
] | permissive | backwardn/s2 | 4395cf17ca2e711e6f35f6c164761f21aebb0163 | d52f35094520fd992cb2a114dc8896b91978524d | refs/heads/master | 2022-10-11T07:58:42.049661 | 2020-06-09T18:33:54 | 2020-06-09T18:33:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,268 | py | #!/usr/bin/env python3
import os
import sys
import argparse
import subprocess
from urllib.parse import urlparse
ROOT = os.path.dirname(os.path.abspath(__file__))
TESTDATA = os.path.join(ROOT, "testdata")
def main():
parser = argparse.ArgumentParser(description="Runs the s2 integration test suite.")
parser.ad... | [
"[email protected]"
] | |
8858af318d2749519148dd9344b4630cad0dd249 | 781e2692049e87a4256320c76e82a19be257a05d | /all_data/exercism_data/python/meetup/3301efd411054cab9d496465a25695fc.py | bedae31529510afb9d51cb80c1b95b6583865644 | [] | 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 | 1,076 | py | """
Utility to get the date of meetups.
Written by Bede Kelly for Exercism.
"""
import datetime
from calendar import day_name, monthrange
__author__ = "Bede Kelly"
def meetup_day(year, month, weekday, selector):
"""Returns the date of a meetup."""
teenth_days = range(13, 20) # 20th not included.
weekdays ... | [
"[email protected]"
] | |
3b8bf356fc0ab962f89c390875463e6796501f66 | 80888878480eb75e7e55a1f1cbc7273bf176a146 | /pyclaw_profiler.py | 5324d0ae2f57f6962aa10e6973d395a57db05afb | [] | no_license | ketch/pyclaw-scaling | eff0ea15459d6266cf222a9a2461abe2fc1831a9 | 633510b902113c80b6111fcaf990987f8ca99fa2 | refs/heads/master | 2021-01-19T08:10:46.509637 | 2014-11-19T13:02:28 | 2014-11-19T13:02:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,229 | py | #!/usr/bin/env python
import os
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
from matplotlib.colors import colorConverter
import pstats
params = {'backend': 'ps',
'axes.labelsize': 10,
'text.fontsize': 10,
'legend.fontsize': 10,
'xtick.labelsize': 8,
... | [
"[email protected]"
] | |
fb8910d631fb39f1201915c814f6f177ff8e36fe | d6ed05e23faa20beb5e47624870608a9219ea81c | /TuningTools_old/scripts/skeletons/datacurator.py | 554954e0e803f3f13f472feaba5219997fc0f3e9 | [] | no_license | kaducovas/ringer | f6495088c0d54d622dcc707333b4c2fbf132d65f | 603311caab016ad0ef052ea4fcc605c5ac4e494b | refs/heads/master | 2020-06-16T21:37:15.228364 | 2019-07-08T01:29:57 | 2019-07-08T01:29:57 | 195,477,531 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,949 | py |
from RingerCore import masterLevel, LoggingLevel, keyboard
from TuningTools import *
import ROOT
ROOT.TH1.AddDirectory(ROOT.kFALSE)
ROOT.gROOT.SetBatch(ROOT.kTRUE)
masterLevel.set( LoggingLevel.VERBOSE )
# FIXME Go to data curator and force multiStop if needed
dCurator = DataCurator( kw, dataLocation = dataLocation )... | [
"[email protected]"
] | |
00d990a843520de66f3ef9a02f2e9b4c7b4f3634 | 33f3179000f0275e0e3253671b518e98611128d9 | /migrations/versions/063cfb907a5c_.py | 1759edaa8a7b0ebacebb21d33594d5c72c5016a8 | [] | no_license | ss820938ss/pro_chatbot | e0ff85d700a5fe3d33b4028b1ea7a3050e4367cd | f23d88dcfeffc33dea48972819dc8643975a3dae | refs/heads/master | 2023-07-26T20:54:31.653597 | 2021-09-10T03:47:59 | 2021-09-10T03:47:59 | 397,513,124 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,938 | py | """empty message
Revision ID: 063cfb907a5c
Revises:
Create Date: 2021-08-18 20:55:32.437776
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '063cfb907a5c'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto gene... | [
"[email protected]"
] | |
1060c16c44b2ccd9172668d50fee71da836dbd5e | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/6/usersdata/129/1287/submittedfiles/investimento.py | c5f1ee45d7f2ffb03013182917c20506cd4c63ca | [] | 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 | 479 | py | # -*- coding: utf-8 -*-
from __future__ import division
#COMECE SEU CODIGO AQUI
A= input('Digite o valor do investimento inicial: ')
B= input('Digite o valor de crescimento percentual: ')
C= A + A*B
D= C + C*B
E= D + D*B
F= E + E*B
G= F + F*B
H= G + G*B
I= H + H*B
J= I + I*B
K= J + J*B
L= K + K*B
print ('%.2f' %C)
pri... | [
"[email protected]"
] | |
6d5da17b1099b03b0b389db4251bab06d7722e51 | e20ed90b9be7a0bcdc1603929d65b2375a224bf6 | /generated-libraries/python/netapp/lun/invalid_use_partner_cfmode_setting_info.py | d4c1dc34b9ec55d375e71885616f1a9920a60be8 | [
"MIT"
] | permissive | radekg/netapp-ontap-lib-gen | 530ec3248cff5ead37dc2aa47ced300b7585361b | 6445ebb071ec147ea82a486fbe9f094c56c5c40d | refs/heads/master | 2016-09-06T17:41:23.263133 | 2015-01-14T17:40:46 | 2015-01-14T17:40:46 | 29,256,898 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,563 | py | from netapp.netapp_object import NetAppObject
class InvalidUsePartnerCfmodeSettingInfo(NetAppObject):
"""
Information about an invalid initiator group use_partner
and cfmode
"""
_initiator_group_name = None
@property
def initiator_group_name(self):
"""
Name of this init... | [
"[email protected]"
] | |
3962de788f504519a10a81bf39a059fafa67d08d | 2aba3c043ce4ef934adce0f65bd589268ec443c5 | /atcoder/CODE_FESTIVAL_2015_qual_B/B.py | 9e6979aff253edb3737ba01ff0bf57c0c50a01b5 | [] | no_license | kambehmw/algorithm_python | 4f66593b77039d90515d1fcbecacdab8c811b92f | 17222399dcc92fd8f908e5774a9883e2e89c486e | refs/heads/master | 2020-06-02T12:44:11.322356 | 2020-05-18T13:22:05 | 2020-05-18T13:22:05 | 191,157,113 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 227 | py | from collections import Counter
N, M = map(int, input().split())
A = list(map(int, input().split()))
counter = Counter(A)
ans = max(counter.items(), key=lambda x: x[1])
if N // 2 < ans[1]:
print(ans[0])
else:
print("?") | [
"[email protected]"
] | |
a74f698d0e534a081149edbe1311ec943dbcfd16 | 12a652ffb301e2f48cb80ddc8fdc556926b8026f | /scripts/python/anagrams/ngrams.py | f682d31a98056bbe05337294d7965b0e99c424ec | [
"MIT"
] | permissive | jeremiahmarks/dangerzone | de396da0be6bcc56daf69f2f3093afed9db5ede3 | fe2946b8463ed018d2136ca0eb178161ad370565 | refs/heads/master | 2020-05-22T12:45:34.212600 | 2017-04-18T02:57:59 | 2017-04-18T02:57:59 | 28,025,861 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,028 | py | import string
import random
import grams
class anagramfinder(object):
def checkLetters(self,mainstring, teststring):
#print "checkLetters is checking "+mainstring + " against "+teststring
isThere=True
for letter in teststring:
if (teststring.count(letter)>mainstring.c... | [
"[email protected]"
] | |
2b65d1e32c6aedc8f97411e58999eaa62a8b13ac | e4cab6feadcee618f092f23020a157c8ded42ffc | /WEB/2. Bots/FirstBot/tools/keyboards.py | f7b619b6937bbdf92a8ada14d54037cd34d60240 | [] | no_license | Larionov0/Group3_Lessons | 7c314898a70c61aa445db37383076e211692b56b | 628bc7efe6817d107cb39d3017cb7cee44b86ba4 | refs/heads/master | 2023-08-22T07:14:44.595963 | 2021-10-17T11:48:06 | 2021-10-17T11:48:06 | 339,141,183 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 911 | py | import json
def make_keyboard(list_keyboard):
"""
keyboard = [
["Грати", "Магазин"],
["Моя корзина"],
["Друзі", "Підтримка"]
]
f(keyboard) -> JSON:
{
"keyboard": [
[{"text": "Пошук лобі"}, {"text": "Створити лобі"}],
[{"text": "Магазин"}],
[{"... | [
"[email protected]"
] | |
e13f85a697789a6add9a026b87968ab8ad0c62aa | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02646/s315626964.py | e9854e7e7c5008b40ed6f4acd03e5ae61be041f9 | [] | 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 | 211 | py | A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
if A > B:
x = A
A = B
B = x
if V <= W:
ans="NO"
elif T*V+A-B >= T*W:
ans="YES"
else:
ans="NO"
print(ans) | [
"[email protected]"
] | |
676c910681338a412c9976012360ab390235b2e3 | 52585c8d95cef15199c18ba1a76899d2c31329f0 | /05PythonCookbook/ch12Concurrency/14launching_a_daemon_process_on_unix/daemon.py | b3b2215ad1ffb5424f87257ca06e09df1f0e1482 | [] | no_license | greatabel/PythonRepository | c7a952257303a21083ed7d535274c339362bd126 | 836fcdd3f5c1b150122302685104fe51b5ebe1a3 | refs/heads/master | 2023-08-30T15:56:05.376391 | 2023-08-26T03:34:14 | 2023-08-26T03:34:14 | 29,392,599 | 33 | 6 | null | 2023-02-14T13:33:21 | 2015-01-17T13:54:58 | Python | UTF-8 | Python | false | false | 2,928 | py | # $python3 daemon.py start
# $cat /tmp/daemon.pid
# 34358
# $tail -f /tmp/daemon.log
# Daemon started with pid 34358
# Daemon Alive! Sat Jan 9 17:30:39 2016
# Daemon Alive! Sat Jan 9 17:30:49 2016
# Daemon Alive! Sat Jan 9 17:30:59 2016
# Daemon Alive! Sat Jan 9 17:31:09 2016
# Daemon Alive! Sat Jan 9 17:31:19 20... | [
"[email protected]"
] | |
6dfd0a8cae771b4bd31112c19577568d72aa67ab | 04afe39888ea2a3a131a7096dc4eea08e556aea3 | /upgrade/models/check-output.py | d0b7eb2c12b36ea54d1cca225ee0d0552a1fdd91 | [] | no_license | vinzenz/actor-stdlib-examples | 2b0b65b8e6ae2e68a058fbe83e6daecde7c6f8c1 | 35108d2a83703a367a6ac807e651bb04730e5bfd | refs/heads/master | 2021-04-29T02:04:10.185880 | 2018-03-28T09:57:46 | 2018-03-28T09:57:46 | 121,812,528 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 364 | py | from leapp.models import Model, fields
from leapp.topics import CheckOutputTopic
class CheckOutput(Model):
topic = CheckOutputTopic
check_actor = fields.String(required=True)
check_action = fields.String()
status = fields.String(required=True)
summary = fields.String(required=True)
params = f... | [
"[email protected]"
] | |
df9999f0bc1ec9301db6c6b588572cdef393fb3d | 24946a607d5f6425f07d6def4968659c627e5324 | /Algorithms/staircase.py | 7301debb6ce9b06238ee64987170966a5d2d29f6 | [] | no_license | mmrubayet/HackerRank_solutions | 5d8acbb8fd6f305a006f147e6cb76dbfc71bbca5 | f1c72fbf730b6a79656d578f6c40a128a6f0ac5c | refs/heads/master | 2023-06-02T16:51:18.017902 | 2021-06-19T18:35:41 | 2021-06-19T18:35:41 | 233,853,287 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 265 | py | #!/bin/python3
import math
import os
import random
import re
import sys
# Complete the staircase function below.
def staircase(n):
for i in range(1, n+1):
print(('#'*i).rjust(n, ' '))
if __name__ == '__main__':
n = int(input())
staircase(n)
| [
"[email protected]"
] | |
4c45b9f0a45f25ef256430aba68a2a6cd0205869 | 07f92805a75dc91b8be2ac14c238394245eda9ea | /Python编程从入门到实践/ch10/write_message.py | f63d0f76f2edfe7dd25ab4d01381877ac1545533 | [] | no_license | 08zhangyi/Some-thing-interesting-for-me | 6ea7366ef1f0812397300259b2e9d0e7217bcba0 | f4cbda341ada98753c57a3ba07653163522dd023 | refs/heads/master | 2023-01-11T22:54:03.396911 | 2023-01-06T05:47:41 | 2023-01-06T05:47:41 | 136,426,995 | 7 | 6 | null | null | null | null | UTF-8 | Python | false | false | 362 | py | filename = 'programming.txt'
with open(filename, 'w') as file_object:
file_object.write("I love programming.\n")
file_object.write("I love creating new games.\n")
with open(filename, 'a') as file_object:
file_object.write("I also love finding meaning in large datasets.\n")
file_object.write("I love cr... | [
"[email protected]"
] | |
50a408b8dfc41fdb59dde8b5a78466973222fb85 | e65ce709feadc277b95032be5269d450deab76fc | /ark/account/views.py | 12c0f4a241d6385ea451e1189fed69b176de86be | [
"MIT"
] | permissive | N402/NoahsArk | 77c6b8d8ddfdf76688575cc9d1f65ba432b6286a | 97dbe295d0579912860c7b7a4509a3912d5a783b | refs/heads/master | 2016-09-10T20:38:48.101055 | 2015-08-18T02:50:00 | 2015-08-18T02:50:00 | 28,763,317 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 5,322 | py | from flask import Blueprint, render_template
from flask import url_for, redirect, request, jsonify
from flask.ext.login import current_user, login_required
from flask.ext.babel import gettext
from sqlalchemy import or_
from ark.exts import db
from ark.utils.qiniu import get_url
from ark.utils.helper import jsonify_laz... | [
"[email protected]"
] | |
974eba86119b66cbc84ecb49bef7bbc009673c99 | 777a972966fa29a1b5a1a0c5d507a3137de007fc | /container_management/models/container_config.py | 2f7e0aa4f60a6260eda2b5e20d1f9c9438efcb90 | [] | no_license | suningwz/ruvati | 1d1ace30fb2929f686f368fb8d8c51ae76a71190 | 9b15373125139cab1d26294c218685c5b87b9709 | refs/heads/master | 2023-08-15T22:28:18.499733 | 2021-10-12T12:16:56 | 2021-10-12T12:16:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 518 | py | # -*- coding: utf-8 -*-
from odoo import models, fields,api
class ContainerConfig(models.TransientModel):
_name = 'container.config'
_description = "Container Configuration"
_inherit ='res.config.settings'
freight_account_id = fields.Many2one('account.account', string="Freight Account", config_param... | [
"[email protected]"
] | |
5e3c9bef5cc205d514052ea4a0687ae7ab1cd5a9 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/otherforms/_solariums.py | 9e32ce0f592b4095252b978a893f5e61bf9a7f98 | [
"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 | 230 | py |
#calss header
class _SOLARIUMS():
def __init__(self,):
self.name = "SOLARIUMS"
self.definitions = solarium
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.basic = ['solarium']
| [
"[email protected]"
] | |
c1278210180978e06fd80b879ace3fb24f9d1b19 | a2ba4451a2b0264cd5e65f393e370bc6c809bff0 | /src/test/helpers/PDUnitTest.py | a4fea56ba5d68c096d3b71e9675adef2f8d15d19 | [] | no_license | Sinnach0/PDOauth | e1579a6a1047f2b770881acfa70bcc6860cd3a89 | a49a267f5564a40c1b24cab0232b2ead1407e344 | refs/heads/master | 2020-12-26T01:59:31.985745 | 2015-06-09T09:52:09 | 2015-06-09T09:52:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,205 | py | from twatson.unittest_annotations import Fixture, test # @UnusedImport
from pdoauth.Controller import Controller, Interfaced
from pdoauth.FlaskInterface import FlaskInterface
from test.helpers.FakeInterFace import FakeInterface, FakeMailer, TestData
from pdoauth.ReportedError import ReportedError
class PDUnitTest(Fix... | [
"[email protected]"
] | |
65190f63674ba42b90a697afc3c471684de05db7 | 2c7f025568bceb560888d26828aef30e5ae23393 | /bin/player.py | 6f88955e7794fa49bd22cd7439f71727990972c0 | [] | no_license | GustavoCruz12/educacao | 6271ebc71830ee1964f8311d3ef21ec8abf58e50 | d0faa633ed1d588d84c74a3e15ccf5fa4dd9839e | refs/heads/master | 2022-12-08T09:34:42.066372 | 2018-08-03T06:38:49 | 2018-08-03T06:38:49 | 143,387,426 | 0 | 0 | null | 2022-12-08T00:01:52 | 2018-08-03T06:31:03 | Python | UTF-8 | Python | false | false | 2,114 | py | #!/home/gustavo/Projetos/web_serrana/bin/python3
#
# The Python Imaging Library
# $Id$
#
from __future__ import print_function
import sys
if sys.version_info[0] > 2:
import tkinter
else:
import Tkinter as tkinter
from PIL import Image, ImageTk
# ------------------------------------------------------------... | [
"[email protected]"
] | |
90c8650602b1b7604791e96b1119c15da29e8c78 | 38382e23bf57eab86a4114b1c1096d0fc554f255 | /hazelcast/protocol/codec/list_is_empty_codec.py | 3c42ede40f79caab5b53e877250ec48b64b4f700 | [
"Apache-2.0"
] | permissive | carbonblack/hazelcast-python-client | e303c98dc724233376ab54270832bfd916426cea | b39bfaad138478e9a25c8a07f56626d542854d0c | refs/heads/gevent-3.12.3.1 | 2023-04-13T09:43:30.626269 | 2020-09-18T17:37:17 | 2020-09-18T17:37:17 | 110,181,474 | 3 | 1 | Apache-2.0 | 2020-12-01T17:45:42 | 2017-11-10T00:21:55 | Python | UTF-8 | Python | false | false | 940 | py | from hazelcast.serialization.bits import *
from hazelcast.protocol.client_message import ClientMessage
from hazelcast.protocol.codec.list_message_type import *
REQUEST_TYPE = LIST_ISEMPTY
RESPONSE_TYPE = 101
RETRYABLE = True
def calculate_size(name):
""" Calculates the request payload size"""
data_size = 0
... | [
"[email protected]"
] | |
316d6a4481b9b85c7182965171aa599101a81e14 | 7950c4faf15ec1dc217391d839ddc21efd174ede | /leetcode-cn/1605.0_Find_Valid_Matrix_Given_Row_and_Column_Sums.py | b4fada7996fc9ea5767ddf55419bcfb31f7c78f9 | [] | no_license | lixiang2017/leetcode | f462ecd269c7157aa4f5854f8c1da97ca5375e39 | f93380721b8383817fe2b0d728deca1321c9ef45 | refs/heads/master | 2023-08-25T02:56:58.918792 | 2023-08-22T16:43:36 | 2023-08-22T16:43:36 | 153,090,613 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 753 | py | '''
Greedy
T: O(M+N)
S: O(1)
执行用时:64 ms, 在所有 Python3 提交中击败了92.42% 的用户
内存消耗:19.6 MB, 在所有 Python3 提交中击败了48.48% 的用户
通过测试用例:84 / 84
'''
class Solution:
def restoreMatrix(self, rowSum: List[int], colSum: List[int]) -> List[List[int]]:
m, n = len(rowSum), len(colSum)
mat = [[0] * n for _ in r... | [
"[email protected]"
] | |
9b9e97ebbd98b98e9738d5df74392cb0d6e2d21c | aa49120740b051eed9b7199340b371a9831c3050 | /clone.py | 701834c5ca32640f8f8f368b3578b0ea5477daa0 | [] | no_license | ashutosh-narkar/LeetCode | cd8d75389e1ab730b34ecd860b317b331b1dfa97 | b62862b90886f85c33271b881ac1365871731dcc | refs/heads/master | 2021-05-07T08:37:42.536436 | 2017-11-22T05:18:23 | 2017-11-22T05:18:23 | 109,366,819 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,822 | py | #!/usr/bin/env python
'''
Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors.
From the way the Node class is defined, this approach should work for directed graphs as well
'''
# Definition for a undirected graph node
class UndirectedGraphNode:
def __init__(self, x):
... | [
"[email protected]"
] | |
be09094636d2801e89169504b074ee1057aed514 | 74649c1220c68ad0af79e420d572e3769fcd7a53 | /mlprodict/onnx_tools/optim/onnx_optimisation_identity.py | c96948edb77f4f8c561404cd8813ec7f9e918e5f | [
"MIT"
] | permissive | sdpython/mlprodict | e62edcb428700cb2c4527e54e96431c1d2b36118 | 27d6da4ecdd76e18292f265fde61d19b66937a5c | refs/heads/master | 2023-05-08T10:44:30.418658 | 2023-03-08T22:48:56 | 2023-03-08T22:48:56 | 112,469,804 | 60 | 13 | MIT | 2023-04-19T01:21:38 | 2017-11-29T11:57:10 | Python | UTF-8 | Python | false | false | 8,112 | py | """
@file
@brief Optimisation of :epkg:`ONNX` graphs.
"""
import logging
from onnx import FunctionProto, AttributeProto
from onnx.helper import make_graph, make_function
from ._onnx_optimisation_common import ( # pylint: disable=E0611
_rename_node_input,
_rename_node_output,
_apply_optimisation_on_graph,
... | [
"[email protected]"
] | |
35a65c4ea014c1aed94e50ec5bada17dacf43f2b | 3fc19cb92237b0823cafbfc66600c8129b1c2245 | /linesOnMap.py | f745da58f3775021f35d3ff2eff56fe17d98b9a4 | [] | no_license | rayyan-khan/4-railroad-lab | f47600305447565d89056c42f06bf03d066204a0 | c51160dddcb17cda7739742cf93875fb431b7170 | refs/heads/master | 2022-02-26T08:30:47.103538 | 2018-12-15T02:59:05 | 2018-12-15T02:59:05 | 161,864,018 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,356 | py | from tkinter import *
# set US map to background
window = Tk()
window.title('Railroad Lab')
window.config(bg='white')
photo = PhotoImage(file = 'map.gif')
w = photo.width()
h = photo.height()
window.geometry('{}x{}'.format(w, h))
print(w, h)
canvas = Canvas(window, width=w, height=h)
canvas.pack()
canvas.create_im... | [
"[email protected]"
] | |
de84e59db82f5181eb521a99d4b8e39400fa5147 | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /bHTb8p5nybCrjFPze_15.py | 21f824539d57198450f4e378f2ea821112ddbff4 | [] | 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 | 902 | py | """
Write a function that, given the start `start_num` and end `end_num` values,
return a list containing all the numbers **inclusive** to that range. See
examples below.
### Examples
inclusive_list(1, 5) ➞ [1, 2, 3, 4, 5]
inclusive_list(2, 8) ➞ [2, 3, 4, 5, 6, 7, 8]
inclusive_list(10, 20) ➞ ... | [
"[email protected]"
] | |
97fe0c0adb566ece112ebb0a0b205498a4739980 | 99fc570cc293c971a72fa88434bf9e39b2e45f19 | /watermarking/migrations/0007_auto_20181019_1535.py | 729597cfa04aff9b38bb283ce3328c1de2c71d6c | [] | no_license | EroPerez/dhmdi | 94d4e6812fa0b098af95462faa45c004cb503c7d | 73dbeac369fc4bd8f59209c65189f0872d8980a1 | refs/heads/master | 2020-04-08T18:13:47.463678 | 2018-11-28T17:03:06 | 2018-11-28T17:03:06 | 159,599,005 | 2 | 0 | null | 2018-11-29T03:00:26 | 2018-11-29T03:00:26 | null | UTF-8 | Python | false | false | 510 | py | # Generated by Django 2.0 on 2018-10-19 19:35
import datetime
from django.db import migrations, models
from django.utils.timezone import utc
class Migration(migrations.Migration):
dependencies = [
('watermarking', '0006_auto_20181019_1451'),
]
operations = [
migrations.AlterField(
... | [
"[email protected]"
] | |
e1f0d3b16b4b79ebae8525dc1ebdc02cf7f8ca01 | ac4b9385b7ad2063ea51237fbd8d1b74baffd016 | /.history/google/drive_quickstart_20210213174716.py | bb8564f06bc3db10016ca2751aac0b644314d4b6 | [] | no_license | preethanpa/ssoemprep | 76297ef21b1d4893f1ac2f307f60ec72fc3e7c6f | ce37127845253c768d01aeae85e5d0d1ade64516 | refs/heads/main | 2023-03-09T00:15:55.130818 | 2021-02-20T06:54:58 | 2021-02-20T06:54:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,466 | py | from __future__ import print_function
import pickle
import os.path
import io
from googleapiclient.discovery import MEDIA_MIME_TYPE_PARAMETER_DEFAULT_VALUE, build
from google_auth_oauthlib.flow import InstalledAppFlow
from google.auth.transport.requests import Request
from googleapiclient.http import MediaIoBaseDownloa... | [
"{[email protected]}"
] | |
5c7ebc2db699834376e7efedc26192f0f6ca1708 | fb46c7eb0e8108e59afff177b2d2ce00eb9a78cf | /pyomo/dae/tests/test_flatten.py | 9ccf2cc8dfb7b705f241d3f32e6f04a48b7cd0c1 | [
"BSD-3-Clause"
] | permissive | qtothec/pyomo | 823d6f683e29fc690564047ca5066daaf14d4f36 | ab4ada5a93aed570a6e6ca6161462e970cffe677 | refs/heads/new_dev | 2022-06-09T15:42:16.349250 | 2020-05-18T00:37:24 | 2020-05-18T00:37:24 | 61,325,214 | 3 | 5 | NOASSERTION | 2019-12-09T04:03:56 | 2016-06-16T20:54:10 | Python | UTF-8 | Python | false | false | 4,325 | py | # ___________________________________________________________________________
#
# Pyomo: Python Optimization Modeling Objects
# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
# Under the terms of Contract DE-NA0003525 with National Technology and
# Engineering Solutions of Sandia, LLC,... | [
"[email protected]"
] | |
524ffd950e6b5b0334c1fbefee5c7036da505cf8 | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2235/60614/303084.py | 6cd63f840ba7468c2f277dfeb99b91a286eebce6 | [] | 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 | 1,459 | py | def other(num):
if num%2==0:
return num+1
else:
return num-1
init = [int(x) for x in input().split()]
n = init[0]*2
m = init[1]
pairs=[]
edge=[[] for i in range(n)]
for i in range(m):
temp=[int(x) for x in input().split()]
edge[temp[0]-1].append(other(temp[1]-1))
edge[temp[1]-1].appe... | [
"[email protected]"
] | |
caee1b2c16ec8d413abb4a20682ec50cc7eebdc8 | 88963a0e0ddf47e666a3acd030cfa3050693c2bd | /globMatching.py | 372abb445e911784d3d376da14874bbf5fff51a9 | [] | no_license | santoshparmarindia/algoexpert | 9728054bbebb4e9413fe3c7cb75463b959046191 | d71397bef5bf3a76735b2e4ef8ee808919209b8c | refs/heads/main | 2023-06-01T15:44:28.296437 | 2021-06-15T23:03:19 | 2021-06-15T23:03:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 322 | py | def globMatching(fileName, pattern):
locations = getLocationOfSymbols(pattern)
for pos in locations:
if pattern[pos]=="*":
stringBefore=fileName[len(fileName)-pos]
def getLocationOfSymbols(pattern):
return [idx for idx in range(len(pattern)) if pattern[idx] == "*" or pattern[idx] == "?"... | [
"[email protected]"
] | |
a2f04deabb3eb3ccda22c389cf99ce25e63a77dc | 57eb44ce1d84aca3580e28688cf645db483d0d03 | /accounts/views/user.py | 06e3bab546f4abebad577e240d55e3488e345733 | [
"Apache-2.0"
] | permissive | TheLabbingProject/pylabber | cbfd7a6663d56f779dde96bd6e0281f5c8f06393 | 4b51065f457ab86ed311f222080187caf1979fea | refs/heads/master | 2023-04-08T05:29:08.356479 | 2023-03-29T09:06:11 | 2023-03-29T09:06:11 | 205,411,164 | 5 | 3 | Apache-2.0 | 2023-03-29T09:06:13 | 2019-08-30T15:40:47 | Python | UTF-8 | Python | false | false | 1,678 | py | """
Definition of the :class:`UserViewSet` class.
"""
from accounts.filters.user import UserFilter
from accounts.serializers.user import UserSerializer
from django.contrib.auth import get_user_model
from django.db.models import QuerySet
from pylabber.views.defaults import DefaultsMixin
from rest_framework import viewse... | [
"[email protected]"
] | |
8d31ea4c5eee17006526e8dbb68804018da6797d | c9dc1df17ecb9e279eb4403b83358363cdbe7fee | /project/cms/migrations/0020_auto_20180302_0513.py | 55c47d006cd522af0420e248798d77367eeb50f8 | [] | no_license | m0nte-cr1st0/keyua | c3894a94c9bfe73409078be11cb1d3f64831054c | b964ebb7e260fbebdbc27e3a571fed6278196cac | refs/heads/master | 2022-11-25T16:03:51.882386 | 2020-01-09T12:57:54 | 2020-01-09T12:57:54 | 232,809,529 | 0 | 0 | null | 2022-11-22T02:24:49 | 2020-01-09T12:58:10 | Python | UTF-8 | Python | false | false | 656 | py | # Generated by Django 2.0 on 2018-03-02 05:13
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('blog', '0006_auto_20180226_0554'),
('cms', '0019_page_show_on_category_menu'),
]
operations = [
migra... | [
"[email protected]"
] | |
c602d0dde6c12d0b6e4e1af055d8d9bba4a4991c | 2310666ca3de8c5e41b1fb7268632015b0658dde | /leetcode/0013_roman_to_integer.py | 6cdd3a3254113bc451c81ea965e8f537a2674e3a | [
"BSD-2-Clause"
] | permissive | chaosWsF/Python-Practice | 72196aa65a76dd27e1663e50502954dc07f4cad6 | 49a0b03c55d8a702785888d473ef96539265ce9c | refs/heads/master | 2022-08-16T13:04:41.137001 | 2022-08-16T06:17:01 | 2022-08-16T06:17:01 | 144,381,839 | 1 | 0 | null | 2021-09-16T03:58:32 | 2018-08-11T12:02:19 | Python | UTF-8 | Python | false | false | 3,037 | py | """
Roman numerals are represented by seven different symbols:
I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, two is written as II in Roman numeral, just t... | [
"[email protected]"
] | |
9ae6fece0afe3beedd05a6cb5236776f8a8a70b0 | e173bfaa3c728a3ce7a7709f1beee5c5a64a0e2a | /LandMatrixExtractor/es/weso/landmatrix/entities/deal_analyser_entry.py | e5fc06b9c89ff4a8c576f6f72ed6ec143094e308 | [
"Unlicense"
] | permissive | weso/landportal-importers | d4ddfe0db298a9c2f51820f714b21ff5c570291d | 6edfa3c301422bbe8c09cb877b1cbddbcd902463 | refs/heads/master | 2020-03-30T08:08:31.457937 | 2014-07-15T11:31:28 | 2014-07-15T11:31:28 | 15,933,682 | 0 | 0 | null | 2014-04-07T09:15:12 | 2014-01-15T11:47:44 | null | UTF-8 | Python | false | false | 487 | py | __author__ = 'Dani'
class DealAnalyserEntry(object):
"""
The DealAnalyser will return a dict that saves under a key composed by Country and indicator
certains group of entities.
This class contains all this elements: an indicator, a date (int), a country (country entity) and a value
"""
def ... | [
"[email protected]"
] | |
733747b606dec6f402a5ea55269c848673bb82c8 | 4e3ce5a1fc39c00d28b42f61c15cc54f65e706f0 | /leetcode/101-200/T164_maximumGap.py | 5d559312515ac2a5c70ae408e8cd69df9eaf6dd8 | [] | no_license | PemLer/Journey_of_Algorithm | 6c2a1d1f2bb9e1cff5239857dd33747b14127dfd | c0a51f0054446d54f476cf8f1cd3e6268dcd2b35 | refs/heads/master | 2023-03-31T01:57:09.223491 | 2020-06-23T11:25:27 | 2020-06-23T11:25:27 | 178,988,861 | 2 | 0 | null | 2020-06-23T11:25:29 | 2019-04-02T03:06:47 | Python | UTF-8 | Python | false | false | 564 | py | class Solution(object):
def maximumGap(self,num):
if len(num) < 2 or min(num) == max(num):
return 0
a, b = min(num), max(num)
size = (b-a)//(len(num)-1) or 1
bucket = [[None, None] for _ in range((b-a)//size+1)]
for n in num:
b = bucket[(n-a)//size]
... | [
"[email protected]"
] | |
8efd18901c9f572c09ee983bae120fa0e3bed0ec | fe427adf26411595c447ce880436383bb7c565e2 | /exps/inverted_pendulum/run.py | 311d66ab5798e744c469cbb8f03f9520be5aaf10 | [
"MIT"
] | permissive | LWANG0413/hucrl | 81023314bc2d32abe9a3bdda5e97c4f3d88cd1db | f09076bb7083aeef62bdaa129f485bab9a5fa685 | refs/heads/master | 2023-04-14T18:57:51.237180 | 2021-03-26T16:13:28 | 2021-03-26T16:13:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,250 | py | """Run the inverted-pendulum using MB-MPO."""
from dotmap import DotMap
from exps.inverted_pendulum import (
ACTION_COST,
ENVIRONMENT_MAX_STEPS,
TRAIN_EPISODES,
get_agent_and_environment,
)
from exps.inverted_pendulum.plotters import (
plot_pendulum_trajectories,
set_figure_params,
)
from exps.... | [
"[email protected]"
] | |
0b2e693e5580b814554653d9ffdd9871c366fd33 | 82b728e805d887102c0b8c415731b353877690cd | /samples/generated_samples/aiplatform_generated_aiplatform_v1_featurestore_service_batch_read_feature_values_sync.py | fdf813f6f78ca224219d688d99fd770c3fbc9267 | [
"Apache-2.0"
] | permissive | geraint0923/python-aiplatform | 90c7742c9bdbde05b9688b117e8e59c0406d6f85 | 7ab05d5e127636d96365b7ea408974ccd6c2f0fe | refs/heads/main | 2023-08-24T05:30:38.519239 | 2021-10-27T20:38:25 | 2021-10-27T20:38:25 | 370,803,114 | 0 | 0 | Apache-2.0 | 2021-05-25T19:15:47 | 2021-05-25T19:15:46 | null | UTF-8 | Python | false | false | 2,280 | 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... | [
"[email protected]"
] | |
67e01004501971d37fce799ec2e4c98ba5c2c2cd | efe1546fa1f057cbbbe974bd8478309b6176d641 | /waf/tests/preproc/wscript | 8b6a5c1d28eb03a8d92149cdc9dbd61bd15a6fee | [
"Apache-2.0"
] | permissive | yankee14/reflow-oven-atmega328p | 2df323aba16ac4f3eac446abc633a5d79a1a55cb | e6792143576f13f0a3a49edfd54dbb2ef851d95a | refs/heads/master | 2022-12-02T21:32:39.513878 | 2019-05-30T06:25:12 | 2019-05-30T06:25:12 | 188,760,664 | 0 | 1 | Apache-2.0 | 2022-11-15T18:22:50 | 2019-05-27T02:52:18 | Python | UTF-8 | Python | false | false | 4,441 | #! /usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2012 (ita)
VERSION='0.0.1'
APPNAME='preproc_test'
top = '.'
out = 'build'
from waflib import Utils
from waflib.Tools import c_preproc
from waflib.Tools.c_preproc import NUM, OP, IDENT
from waflib.Logs import pprint
def configure(conf):
pass
def build(bld):
... | [
"[email protected]"
] | ||
05a269f38e872abaf687b447a962c6e69d2948d4 | 68cd659b44f57adf266dd37789bd1da31f61670d | /swea/뱀.py | 020110d76f3e7ac5fc7f1bcce168de785b3bfe14 | [] | no_license | 01090841589/solved_problem | c0c6f5a46e4d48860dccb3b0288aa5b56868fbca | bbea2f31e5fe36cad100bc514eacd83545fb25b1 | refs/heads/master | 2023-07-02T23:55:51.631478 | 2021-08-04T13:57:00 | 2021-08-04T13:57:00 | 197,157,830 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 983 | py | import sys
sys.stdin = open('뱀.txt')
DIR = [[0, 1], [1, 0], [0, -1], [-1, 0]]
N = int(input())
a = int(input())
apple = [list(map(int, input().split())) for _ in range(a)]
s = int(input())
snake = [list(map(str, input().split())) for _ in range(s)]
snake.append([-1])
MAP = [[0]*N for _ in range(N)]
for i in apple:... | [
"[email protected]"
] | |
9c359467fb4335e915ad157c12c5bd309f190f2b | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/63/usersdata/231/28019/submittedfiles/swamee.py | eb9d48ac7aaed3c447136497d9b7cecec1da9701 | [] | 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 | 376 | py | # -*- coding: utf-8 -*-
import math
f=float(input('digite f:'))
l=float(input('digite l:'))
q=float(input('digite q:'))
deltah=float(input('digite deltah:'))
v=float(input('digite v:'))
g=9.81
e=0.000002
d=((8*f*l*q**2)/(math.pi**2*g*deltah))**0.5
rey=(4*q)/(math.pi*d*v)
k=0.25/((math.log10)((e/3.7*d)*((5.74)/rey**0.9)... | [
"[email protected]"
] | |
a79fb5c1a81166b1a3b1ce3af402698df246bace | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03138/s242505224.py | 5340460e00db7847047a31b2e818dc0725314dd4 | [] | 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 | 258 | py | n,k = map(int,input().split())
a = list(map(int,input().split()))
t,ans =2**40,0
while t:
c = sum([(a[i]&t)//t for i in range(n)]) #a[i]のある桁における1の数
if c>=n-c or k<t: ans += t*c
else: ans += t*(n-c);k-=t
t = t>>1
print(ans) | [
"[email protected]"
] | |
2623877e3f99911ed39c4d01307f8420d2a1b535 | fccc9acd62447941a49313c01fcf324cd07e832a | /Função/testefuncao.py | aff1ed7ba584e2b052a263e21cf54c5626d1febc | [] | no_license | paulovictor1997/Python | fba884ea19ed996c6f884f3fcd3d49c5a34cfd3d | 671d381673796919a19582bed9d0ee70ec5a8bea | refs/heads/master | 2023-04-29T18:01:55.451258 | 2021-05-19T15:12:09 | 2021-05-19T15:12:09 | 354,154,332 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,247 | py | #def soma(a =0,b =0,c = 0):
#s = a + b + c
#return s
#s1 = soma(1,2,1)
#s2 = soma(3,1,1)
#print(f'A soma vale : {s1} e {s2}')
#def contador(*num):
#tam = len(num)
#print(f'Valores : {num}. E tem {tam} número(s) em cada')
#contador(1 , 3, 5, 7)
#contador(1 , 5 , 7)
#def dobra(lista):
#pos = 0
... | [
"[email protected]"
] | |
44d5c97995747aa07393a15f51ed50bc5bae7f0a | eccbb87eefe632a1aa4eafb1e5581420ccf2224a | /network/nn.py | fe56be268b4051085e83df4e53349562c717d4fe | [] | no_license | jianjunyue/python-learn-ml | 4191fc675d79830308fd06a62f16a23295a48d32 | 195df28b0b8b8b7dc78c57dd1a6a4505e48e499f | refs/heads/master | 2018-11-09T15:31:50.360084 | 2018-08-25T07:47:20 | 2018-08-25T07:47:20 | 102,184,768 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,036 | py | import numpy as np
def nonlin(x,deriv=False):
if(deriv==True):
return x*(1-x)
return 1/(1+np.exp(-x))
X = np.array([[0,0,1],
[0,1,1],
[1,0,1],
[1,1,1]])
print(X.shape)
y = np.array([[0],
[1],
... | [
"[email protected]"
] | |
494edcb6a321c1c2a75f534f196e8e3761d09887 | 8afb5afd38548c631f6f9536846039ef6cb297b9 | /MY_REPOS/web-dev-notes-resource-site/2-content/Python/automate-the-boring/Automate_the_Boring_Stuff_onlinematerials_(1)/automate_online-materials/mapIt.py | 962b6c390846e4270f16c8a7480e072327a7dc3f | [
"MIT"
] | permissive | bgoonz/UsefulResourceRepo2.0 | d87588ffd668bb498f7787b896cc7b20d83ce0ad | 2cb4b45dd14a230aa0e800042e893f8dfb23beda | refs/heads/master | 2023-03-17T01:22:05.254751 | 2022-08-11T03:18:22 | 2022-08-11T03:18:22 | 382,628,698 | 10 | 12 | MIT | 2022-10-10T14:13:54 | 2021-07-03T13:58:52 | null | UTF-8 | Python | false | false | 378 | py | #! python3
# mapIt.py - Launches a map in the browser using an address from the
# command line or clipboard.
import webbrowser, sys, pyperclip
if len(sys.argv) > 1:
# Get address from command line.
address = " ".join(sys.argv[1:])
else:
# Get address from clipboard.
address = pyperclip.paste()
webbro... | [
"[email protected]"
] | |
26457ac8cdae452935fadc9e69e29f8750810bd3 | 1d61057dab56fddd1edba78ce10b3a5f96c18c60 | /diskinventory/build_database.py | d6819fa75fa4a82dc2e130fe3e97ee0927cb2b0b | [] | no_license | phaustin/pythonlibs | f4f1f450d3e9bb8ebac5ffdb834d3750d80ee38e | 35ed2675a734c9c63da15faf5386dc46c52c87c6 | refs/heads/master | 2022-04-29T00:45:34.428514 | 2022-03-06T17:16:30 | 2022-03-06T17:16:30 | 96,244,588 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,456 | py | #!/home/phil/usr243_Fc3/bin/python
#ls -R -l -Q --time-style=full-iso --time=status /home/phil/* > listing.txt
#-rw-r--r-- 1 phil users 0 2005-10-06 12:28:09.000000000 -0700 "/home/phil/eosc211_fall2005.txt~"
#du /home/phil/* > ~/philprojects/disk_inventory/dulist.txt
import MySQLdb, MySQLdb.cursors
import... | [
"[email protected]"
] | |
7b9f607962a9ad7be9ffd32f81187cb4fffda709 | d2d3ebfbf293fa96c95a29648f70774d310494d3 | /app/storage/__init__.py | 6e6201c1147b2dcca6c6f1008edee57cf2a9a6e3 | [] | no_license | sysdeep/DNote | 092b01c38f7b1a266a59bddb327cee2d52ae01d2 | 6d933e3f487c5a03a4984a2bbcbc48ac38d4dc3c | refs/heads/master | 2021-01-13T13:46:34.365021 | 2018-07-11T13:46:13 | 2018-07-11T13:46:13 | 76,347,379 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,001 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
2018.08.11 - новая реализация хранилища - singleton
"""
import os.path
import shutil
# from app.rc import DIR_PROJECT
from .Manager import Manager
from .Storage import Storage
from .nodes.Nodes import NODE_TYPES
from app.rc import DIR_DEFAULTS
storage = Storage()... | [
"[email protected]"
] | |
b7878405a799077723e9ef10a02c1c9f638fa925 | 49e8edf6cefd68aea18d2799147b6f44ec44d7f1 | /robot_learning/scripts/convert_odom.py | 66d2ab337d1cc726811b24759145667e0127ac61 | [] | no_license | yycho0108/robot_learning | 815a805bfbcf0ebd93164fa132780e03d7d0075b | b5ed0c13679c4ba3a569c020734308d3618ec57a | refs/heads/master | 2020-04-01T22:37:37.211389 | 2018-12-18T08:59:44 | 2018-12-18T08:59:44 | 153,718,297 | 0 | 0 | null | 2018-10-19T02:55:43 | 2018-10-19T02:55:43 | null | UTF-8 | Python | false | false | 2,690 | py | import rospy
import tf
import numpy as np
from nav_msgs.msg import Odometry
from tf_conversions import posemath as pm
class ConvertOdom(object):
def __init__(self):
self.method_ = rospy.get_param('~method', default='tf')
self.pub_tf_ = rospy.get_param('~pub_tf', default=False)
# data
... | [
"[email protected]"
] | |
7ae6a828f59509f2a877757873e9e0e15f838175 | c88e895ae9a08842987513d339cd98de735ee614 | /tests/test_utils.py | 631a24645c84d45814cf5874daefa65d94f256de | [
"Apache-2.0"
] | permissive | tardyp/ramlfications | 32cf25c4d5093424f7b71180c390bca777848dd8 | cdc0d43d5e70a5f53fed9f25bff3529e89fff1af | refs/heads/master | 2021-01-24T20:02:59.237045 | 2015-12-25T03:30:20 | 2015-12-25T03:30:20 | 49,712,338 | 0 | 0 | null | 2016-01-15T10:24:49 | 2016-01-15T10:24:48 | null | UTF-8 | Python | false | false | 5,683 | py | # -*- coding: utf-8 -*-
# Copyright (c) 2015 Spotify AB
import sys
if sys.version_info[0] == 2:
from io import open
import json
import os
import tempfile
from mock import Mock, patch
import pytest
import xmltodict
from ramlfications import utils
from .base import UPDATE
@pytest.fixture(scope="session")
def d... | [
"[email protected]"
] | |
9bee7b08f46de36e23ae891f4c9864f8e80a81f6 | 865f33817e8989160b1d396ae96554134dc8c01a | /slack_bolt/workflows/step/utilities/__init__.py | eedc9c85efae340228b286a9ed898fdf72758dbf | [
"MIT"
] | permissive | xocliwtb/bolt-python | 4f075b945ef5b51e6e1e54f7b7afc36bd7894a91 | 11e202a14d6196585312e2d456e45267be9dd465 | refs/heads/main | 2023-03-23T21:26:50.256141 | 2021-03-24T12:22:50 | 2021-03-24T12:38:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 626 | py | """Utilities specific to workflow steps from apps.
In workflow step listeners, you can use a few specific listener/middleware arguments.
### `edit` listener
* `slack_bolt.workflows.step.utilities.configure` for building a modal view
### `save` listener
* `slack_bolt.workflows.step.utilities.update` for updating th... | [
"[email protected]"
] | |
dd49ab2283fcd7331e36188957f09dffafcce446 | 359cbc4e41d2321dbcaa610fb51132d5013514e5 | /django_project/celery.py | 893a0aa658718cef20b58ea05544cfd34ef59f12 | [
"MIT"
] | permissive | runmosta/product-database | 780ff9d8dcf64af5fd191d1cb0ace94dd4c18d0e | 1b46d6d0464a5196cf9f70c060fe9e9ae614f8ea | refs/heads/master | 2021-01-22T23:44:35.711366 | 2017-03-16T12:12:49 | 2017-03-16T12:12:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,136 | py | from __future__ import absolute_import
import logging
import os
import celery
import raven
from celery import states
from django.conf import settings
from django.core.cache import cache
from raven.contrib.celery import register_signal, register_logger_signal
class Celery(celery.Celery):
def on_configure(self):
... | [
"[email protected]"
] | |
0ff06ec8d28402aab70bef401caaea5fd2e432f8 | 6ceea2578be0cbc1543be3649d0ad01dd55072aa | /src/fipy/viewers/matplotlibViewer/matplotlib1DViewer.py | a7697b5974aec5a137e5dbbf43f731801af8300d | [
"LicenseRef-scancode-public-domain"
] | permissive | regmi/fipy | 57972add2cc8e6c04fda09ff2faca9a2c45ad19d | eb4aacf5a8e35cdb0e41beb0d79a93e7c8aacbad | refs/heads/master | 2020-04-27T13:51:45.095692 | 2010-04-09T07:32:42 | 2010-04-09T07:32:42 | 602,099 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,954 | py | #!/usr/bin/env python
## -*-Pyth-*-
# ###################################################################
# FiPy - Python-based finite volume PDE solver
#
# FILE: "matplotlib1DViewer.py"
#
# Author: Jonathan Guyer <[email protected]>
# Author: Daniel Wheeler <[email protected]>
# Author: James Warren ... | [
"[email protected]"
] | |
98da77c4e00f8af57fb0f7401c7164edec898362 | 09e57dd1374713f06b70d7b37a580130d9bbab0d | /benchmark/startPyquil3397.py | 755036f7e7971cea85acc259f8c84b03de4679f6 | [
"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,022 | py | # qubit number=4
# total number=46
import pyquil
from pyquil.api import local_forest_runtime, QVMConnection
from pyquil import Program, get_qc
from pyquil.gates import *
import numpy as np
conn = QVMConnection()
def make_circuit()-> Program:
prog = Program() # circuit begin
prog += H(3) # number=20
prog... | [
"[email protected]"
] | |
0d26c8c18a0c57b0fef625f11d847b87fef5a932 | 3fd8958283dc1f0f3619b2835efb0c735eecb3db | /slixmpp/plugins/xep_0428/stanza.py | eb3c3daebf218a4437687b4360e7085aef660b7d | [
"MIT",
"BSD-3-Clause"
] | permissive | poezio/slixmpp | 0e8ea7a5c12180f7806889a3a1d0c1136116c416 | 7a0fb970833c778ed50dcb49c5b7b4043d57b1e5 | refs/heads/master | 2023-08-13T15:05:51.996989 | 2022-10-03T08:20:19 | 2022-10-03T08:20:19 | 26,556,621 | 97 | 51 | NOASSERTION | 2023-08-01T08:20:03 | 2014-11-12T21:17:50 | Python | UTF-8 | Python | false | false | 491 | py |
# Slixmpp: The Slick XMPP Library
# Copyright (C) 2020 Mathieu Pasquet <[email protected]>
# This file is part of Slixmpp.
# See the file LICENSE for copying permissio
from slixmpp.stanza import Message
from slixmpp.xmlstream import (
ElementBase,
register_stanza_plugin,
)
NS = 'urn:xmpp:fallback:0'
cl... | [
"[email protected]"
] | |
3b51948f1918b55d1e39c110991ffe7fe8740878 | 244189d49a3967b4b002af73f40ca8e8064c4771 | /modules/payloads/stages/windows/x64/vncinject.rb | 8f466c207cac07f11e4e57704d91a5b147ecb2c1 | [
"MIT"
] | permissive | darkcode357/thg-framework | 7540609fb79619bdc12bd98664976d51c79816aa | c1c3bd748aac85a8c75e52486ae608981a69d93a | refs/heads/master | 2023-03-01T05:06:51.399919 | 2021-06-01T14:00:32 | 2021-06-01T14:00:32 | 262,925,227 | 11 | 6 | NOASSERTION | 2023-02-10T23:11:02 | 2020-05-11T03:04:05 | Python | UTF-8 | Python | false | false | 932 | rb | ##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core/payload/windows/x64/reflectivedllinject'
require 'msf/base/sessions/vncinject'
require 'msf/base/sessions/vncinject_options'
###
#
# Injects the VNC server DLL (v... | [
"[email protected]"
] | |
95ca5345a8e610b9a95855f36668531f02c28e8c | fab39aa4d1317bb43bc11ce39a3bb53295ad92da | /examples/torch/object_detection/layers/extensions/__init__.py | 17620e92e9100990a5186deae8331de1fc7e059b | [
"Apache-2.0"
] | permissive | dupeljan/nncf | 8cdce27f25f01ce8e611f15e1dc3036fb8548d6e | 0abfd7103ca212888a946ba4d0fbdb9d436fdaff | refs/heads/develop | 2023-06-22T00:10:46.611884 | 2021-07-22T10:32:11 | 2021-07-22T10:32:11 | 388,719,455 | 0 | 0 | Apache-2.0 | 2021-07-23T07:46:15 | 2021-07-23T07:43:43 | null | UTF-8 | Python | false | false | 516 | py | import os.path
import torch
from torch.utils.cpp_extension import load
from nncf.torch.extensions import CudaNotAvailableStub
ext_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)))
if torch.cuda.is_available():
EXTENSIONS = load(
'extensions', [
os.path.join(ext_dir, 'extensions.... | [
"[email protected]"
] | |
d76f494dd6a71b2112a8888bb41eff64b231b4da | e02806138dfef3763f1f93bf8cb4990bd7502c06 | /misc/convert_to_bilou.py | 89959771d0c74c0a23220a553aec22203eeaaf4a | [
"Apache-2.0"
] | permissive | ELS-RD/anonymisation | b40a809865d943d4abdceb74cc49ac03209373a9 | 0b02b4e3069729673e0397a1dbbc50ae9612d90f | refs/heads/master | 2021-06-22T07:14:26.082920 | 2020-11-28T20:52:50 | 2020-11-28T20:52:50 | 139,612,256 | 87 | 21 | Apache-2.0 | 2020-10-29T17:23:18 | 2018-07-03T16:48:23 | Python | UTF-8 | Python | false | false | 2,862 | 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... | [
"[email protected]"
] | |
ac2a955bb3b15a542b3ea4cc42c726a3a191c310 | beb3ee10276cbbb9c3b32bcebc38427816d7302a | /cmc/conf/prod.py | b0ab32587a9624ce29e6a918b6951a43066fc745 | [
"MIT"
] | permissive | einsfr/cmc | df147ebc06b23801cb0f9982f49a1837a31dd2ff | 3735c0182b552757171f4e38af2463a9059a60da | refs/heads/master | 2021-01-12T09:29:17.865237 | 2016-12-14T14:36:07 | 2016-12-14T14:36:07 | 76,158,113 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 681 | py | ALLOWED_HOSTS = []
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
REST_FRAMEWORK = {
'DEFAULT_RENDERER_CLASSES': (
'rest_framework.renderers.JSONRenderer',
)
}
MIDDLEWARE = [
'debug_toolbar.middleware.DebugToolbarMiddleware',
'django.middleware.security.Secur... | [
"[email protected]"
] | |
c1b3eed09a9e40c8dd977b55adb93eb45df42db9 | 0cdeba10a9e29fb6abc324a80605770edf887cd1 | /代理/11111.py | d121342e3f0b6238a2d3b6dd44dc5e7d9b0407cf | [] | no_license | snailuncle/spider01 | 721e655771f17cbbb47fac8fa7771325a6f86770 | 49c83be01cbd3ef8ebabb83fb6409ef2c10692bc | refs/heads/master | 2021-04-12T08:22:25.337779 | 2018-04-30T05:34:55 | 2018-04-30T05:34:55 | 126,051,990 | 5 | 3 | null | null | null | null | UTF-8 | Python | false | false | 4,580 | py | # -*- coding:UTF-8 -*-
from bs4 import BeautifulSoup
# from selenium import webdriver
import subprocess as sp
from lxml import etree
import requests
import random
import re
"""
函数说明:获取IP代理
Parameters:
page - 高匿代理页数,默认获取第一页
Returns:
proxys_list - 代理列表
Modify:
2017-05-27
"""
def get_proxys(page = 1):
#re... | [
"[email protected]"
] | |
05e0ad0c9844453bca4fa2dedf0a25e400f0c2ab | 463087b1f650928385c711390fb8ead19e63cc76 | /rooms/views.py | b904a80e7905eb776412a64a4cfc97f8527b2032 | [] | no_license | sbtiffanykim/awesome-api | 81a81b45c793b393512fd1b1a01085fd96c8af51 | b1f4c8ef0caf32f3fe2522d3011f68dcfd34065b | refs/heads/master | 2023-02-05T19:50:48.990059 | 2020-12-21T14:14:29 | 2020-12-21T14:14:29 | 319,961,409 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,406 | py | from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import status
from .models import Room
from .serializers import RoomSerializer
class RoomsView(APIView):
def get(self, request):
rooms = Room.objects.all()
serializer = RoomSerializer(rooms, m... | [
"[email protected]"
] | |
6a501f24bce4742b2280fbad8b6f066b1a1cd36b | 02863fb122e736e1d1193c01270a3731dd114f79 | /venv/Lib/site-packages/tensorflow/keras/applications/xception/__init__.py | 9427a25842edb2883be8696835bd990586d9ae2a | [] | no_license | umedsondoniyor/PredictiveMaintenance | ee9dd4fe8d3366be4c5b192b4275f23903dbd285 | 88d8184cc2a958aa5feb9b55a0d5d9b6de36c22e | refs/heads/master | 2021-06-18T23:42:24.901395 | 2021-03-03T15:36:55 | 2021-03-03T15:36:55 | 142,778,437 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,003 | py | # This file is MACHINE GENERATED! Do not edit.
# Generated by: tensorflow/tools/api/generator/create_python_api.py script.
"""Xception V1 model for Keras.
On ImageNet, this model gets to a top-1 validation accuracy of 0.790
and a top-5 validation accuracy of 0.945.
Do note that the input image format for this model i... | [
"[email protected]"
] | |
af8fe2f47bb526cbdc6867a4f95b7d42e1af9a5a | 05e61f3db737b7327849d1301b1ed3ba38028a9a | /seata/sqlparser/mysql/antlr4/value/table.py.txt | 40d03cc824fd8557e349c784ce853ac5a45ad43c | [] | no_license | JoshYuJump/seata-python | d56b2d27593ce92c39640c45b6a5ef1b27d0ce84 | 9fe12dd3ddea0903db7c52bd6810df2da8012417 | refs/heads/master | 2023-07-14T16:06:59.165247 | 2021-08-20T01:16:06 | 2021-08-22T13:19:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,808 | txt | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
# @author jsbxyyx
# @since 1.0
"""
from seata.sqlparser.mysql.antlr4.value.value import IdentifierValue
class OwnerSegment:
def __init__(self, start_index: int, stop_index: int, identifier: IdentifierValue):
self.start_index = start_index
self.stop_in... | [
"[email protected]"
] | |
e3f687bcd124488b172bd73651a8d9237a9fccea | 1c790b0adc648ff466913cf4aed28ace905357ff | /python/lbann/modules/graph/sparse/NNConv.py | 8a8e61aeea88d0cbab3e6c1be5a8f9e717a03a80 | [
"Apache-2.0"
] | permissive | LLNL/lbann | 04d5fdf443d6b467be4fa91446d40b620eade765 | e8cf85eed2acbd3383892bf7cb2d88b44c194f4f | refs/heads/develop | 2023-08-23T18:59:29.075981 | 2023-08-22T22:16:48 | 2023-08-22T22:16:48 | 58,576,874 | 225 | 87 | NOASSERTION | 2023-09-11T22:43:32 | 2016-05-11T20:04:20 | C++ | UTF-8 | Python | false | false | 7,203 | py | import lbann
from lbann.modules import Module, ChannelwiseFullyConnectedModule
class NNConv(Module):
"""Details of the kernel is available at:
"Neural Message Passing for Quantum Chemistry"
https://arxiv.org/abs/1704.01212
"""
global_count = 0
def __init__(self,
sequenti... | [
"[email protected]"
] | |
0f8e5e98a83027e12be70103548b1d15138d3074 | d22fc5d683ea0ece1eb1623d81603b0c8a59da98 | /zillowdb/packages/sfm/string_match.py | fa5058591fd9e0578a355e0fdaee05c42c1732c7 | [
"MIT"
] | permissive | MacHu-GWU/zillowdb-project | 27117b00b330ca48af3972a2ae1beb28a98da5ca | 020266257311fa667a3b5fcca15450eb00584aaf | refs/heads/master | 2021-01-19T09:20:59.556094 | 2017-02-15T20:44:48 | 2017-02-15T20:44:48 | 82,104,953 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 582 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from fuzzywuzzy import process
def choose_best(text, choice, criterion=None):
if criterion is None:
return choose_best(text, choice, criterion=0)
else:
res, confidence_level = process.extractOne(text, choice)
if confidence_level >= criteri... | [
"[email protected]"
] | |
3004cbc484b80119507eb7f8708fb1370930251b | e530016831a0140a34a4f12a1517c66348d8109e | /backoffice/contabilidad/migrations/0001_initial.py | 93e07b4ef45f9a21b63a091f7b6fa2a88a24fff1 | [] | no_license | ryujiin/storeserver | 0e959c269b2d7885c142a10ca66139c6bb611522 | 043e76a6917d930f5c27840cf276ce36c7d991bf | refs/heads/master | 2022-12-11T18:38:29.764044 | 2018-08-08T15:50:02 | 2018-08-08T15:50:02 | 136,964,735 | 0 | 0 | null | 2022-12-08T00:45:40 | 2018-06-11T18:22:06 | Python | UTF-8 | Python | false | false | 1,279 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2018-05-24 23:42
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Egreso... | [
"[email protected]"
] | |
f121f2ea956a73bfc1479762b76d1592eea3e6d7 | f900a9f48fe24c6a581bcb28ad1885cfe5743f80 | /Chapter_15/random_walk.py | d7954dcedfa24837b832900dbc2bf853f8e2de9e | [] | no_license | Anjali-225/PythonCrashCourse | 76e63415e789f38cee019cd3ea155261ae2e8398 | f9b9649fe0b758c04861dad4d88058d48837a365 | refs/heads/master | 2022-12-03T21:35:07.428613 | 2020-08-18T11:42:58 | 2020-08-18T11:42:58 | 288,430,981 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,025 | py | from random import choice
class RandomWalk:
"""A class to generate random walks."""
def __init__(self, num_points=5000):
"""Initialize attributes of a walk."""
self.num_points = num_points
# All walks start at (0, 0).
self.x_values = [0]
self.y_values = [0]
def fill_walk(self):
"""Calcula... | [
"[email protected]"
] | |
74a826f628afae63a211d3f9a9edfa9a82abb7e8 | 06887e27c9c27e15a1295bab418998685fd5cf80 | /app/__init__.py | 8266d76887a19ddb077cce6c881729019ac89f71 | [] | no_license | Lenchok/struggle | 7db061f2ad17a6191b88289c330ba386eaa460b7 | 04167c55faa1498373d682fb39e87b98ab187ec8 | refs/heads/master | 2020-03-25T06:29:14.291912 | 2018-08-04T06:57:35 | 2018-08-04T06:57:35 | 143,504,929 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 311 | py | from flask import Flask
from config import config
def create_app(config_name):
app = Flask(__name__)
app.config.from_object(config[config_name])
config[config_name].init_app(app)
from .main import main as main_blueprint
app.register_blueprint(main_blueprint)
return app
| [
"[email protected]"
] | |
b70fec8e0fe10789c193b948b2bd5e54d9877a0c | b088f48c2ac006b1c0afcbba13568fb143a7d248 | /translate.py | edf27d8f257263de72871684abc2b437c38ed375 | [] | no_license | PanXiebit/transformer-tf2.0 | e58ee3fbfe3f270be464ae56bccbca931e9458c6 | 8eb297a0a4ba650a0d0b5afba2cbb2e634b7d05b | refs/heads/master | 2020-05-21T08:55:06.031628 | 2019-06-18T00:20:55 | 2019-06-18T00:20:55 | 185,985,287 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,599 | py | from model_config import Config
from model.transformer import Transformer
import tensorflow as tf
from data_process.dataset import tokenizer_en, tokenizer_pt
from model.multi_head_attention import create_mask
config = Config()
transformer = Transformer(config.num_layers, config.d_model, config.num_heads, config.dff,
... | [
"[email protected]"
] | |
15abc4d6eabadcb283773ef994d7e11300fcafa5 | 173aa19210509b0c84808a3b16c1d21047aa6b1a | /health_4.py | cf52cdecc02ea4975a166b38d9102e1eb9cf0b5e | [] | no_license | wangleixin666/ML_healthAI | 78ccea5ef824e63a2f7b1be40fbb385beac3643f | dcf41dd15d6f9d033f58c8c5384c786d8ab1ff72 | refs/heads/master | 2020-03-23T10:06:49.757535 | 2018-07-18T11:33:28 | 2018-07-18T11:33:28 | 141,426,047 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,982 | py | # coding:utf-8
# 删除掉一些出现次数低,缺失比例大的字段,保留超过阈值的特征
import pandas as pd
def remain_feat(df, thresh):
exclude_feats = []
print('----------移除数据缺失多的字段-----------')
print('移除之前总的字段数量',len(df.columns))
num_rows = df.shape[0]
for c in df.columns:
num_missing = df[c].isnull().sum()
if num_miss... | [
"[email protected]"
] | |
0575d7d9a3ca2056933ecd9b1d9c8799f3572e87 | a80e9eb7ade3d43ce042071d796c00dd10b93225 | /ch_7/Quadratic.py | e77eacca7d2fc9c2eae058ebf9bb5816848fc724 | [] | no_license | ksjpswaroop/python_primer | 69addfdb07471eea13dccfad1f16c212626dee0a | 99c21d80953be3c9dc95f3a316c04b0c5613e830 | refs/heads/master | 2020-07-14T17:37:45.923796 | 2014-06-06T22:30:48 | 2014-06-06T22:30:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,419 | py | # Exercise 7.6
from numpy import linspace
from cmath import sqrt
class Quadratic:
def __init__(self, a, b, c):
self.a = a
self.b = b
self.c = c
def value(self, x):
a, b, c = self.a, self.b, self.c
return a * x ** 2 + b * x + c
def table(self, L, R, n=10):
... | [
"[email protected]"
] | |
c1aa83d130ce68b30efd26154ab61c0fdc349fe8 | 7b739d1ea5f53d8cfffc18f23044aec11238b2bb | /단계별/15. 백트래킹/01. N과 M (1).py | 2db337c80c24122ac1e1c87d4200e5600f0c3b60 | [] | no_license | Choojj/acmicpc | 2281f299386174388c08a31ac6ad76c4b1a2ce6c | 0fa3fc2c575cb1de51be2dc41408b50d7fd7a00f | refs/heads/master | 2022-12-10T09:11:27.310472 | 2020-09-04T08:46:06 | 2020-09-04T08:46:06 | 270,581,505 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 513 | py | import sys
def backtraking(N, M, depth):
if (depth == M):
for i in range(len(answer_list)):
print(answer_list[i], end = " ")
print()
return
for i in range(1, N + 1):
if (not check_list[i]):
answer_list[depth] = i
check_list[i] = True
... | [
"[email protected]"
] | |
b11ad1600711c8c9f71b5ec5982dc342a418b536 | b93c188b16cbb9917e5a3af1239aa2c1f02c5600 | /tests/requests/valid/012.py | 10a54334d22c8888a323961ca77790be5e4e97a2 | [
"MIT",
"BSD-3-Clause",
"FSFAP"
] | permissive | tilgovi/restkit | 1e2fc0131afc721804054396e0ad79e70e9317ee | 12d97ea867eb0516bf2ed885b9d6007b84c79bb2 | refs/heads/master | 2021-01-18T08:52:27.148178 | 2010-11-26T07:31:46 | 2010-11-26T07:31:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 283 | py | request = {
"method": "POST",
"uri": uri("/chunked_w_trailing_headers"),
"version": (1, 1),
"headers": [
("Transfer-Encoding", "chunked")
],
"body": "hello world",
"trailers": [
("Vary", "*"),
("Content-Type", "text/plain")
]
} | [
"[email protected]"
] | |
4911b631beb8973c72847d4fe73f50f5ea01f7fd | ac7435b0b3faa6b6cf51d0d6b43984b77b70a37c | /nova/pci/whitelist.py | 603b29400fbc330bc792a44f5e1b39aef77762ca | [
"Apache-2.0"
] | permissive | gokrokvertskhov/nova-mesos-driver | 04688cd51cad9790cf5460b44ba527b51080760d | fdb9c8468f6a8680c19095a81bf77884ae61e170 | refs/heads/master | 2021-01-10T10:51:07.096729 | 2016-03-25T01:45:10 | 2016-03-25T01:45:10 | 54,685,199 | 0 | 1 | Apache-2.0 | 2020-07-24T01:00:58 | 2016-03-25T01:22:06 | Python | UTF-8 | Python | false | false | 4,014 | py | # Copyright (c) 2013 Intel, Inc.
# Copyright (c) 2013 OpenStack Foundation
# 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/li... | [
"[email protected]"
] | |
d0e92bdb9509ec14e81a1049597521136059a5c9 | 9d61f7ef9eee4187111aa3337af3f3326d56b67e | /thruster_driver/scripts/thruster_driver | 1d948a7c27858dbb4ed1666dec1e8fcd29e73a49 | [] | no_license | uf-mil-archive/SubjuGator | a6e99a06e5a7daaad1303cc69a45a17ac4e6ee00 | c0f4d5296a33f939ede2784cd9297daea929513e | refs/heads/master | 2021-05-29T20:03:26.424539 | 2015-07-25T19:17:28 | 2015-07-25T19:19:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,511 | #!/usr/bin/env python
from __future__ import division
import math
import struct
import numpy
import roslib
roslib.load_manifest('thruster_driver')
import rospy
from std_msgs.msg import Header
from geometry_msgs.msg import Point, Vector3
from sensor_msgs.msg import MagneticField
from thruster_handling.broadcaster i... | [
"[email protected]"
] | ||
584855499f37277bd64c47b5e6c8cc26c6157388 | 2443f23d928a6b3516f810e3dfdf6f4b72aa0325 | /st01.Python기초/py04연산자/py04_02_몫과머지.py | 126d71891077d16c18cc6ab311b0782a4002050c | [] | no_license | syuri7/Python20200209 | 48653898f0ce94b8852a6a43e4e806adcf8cd233 | 5f0184d9b235ce366e228b84c663a376a9957962 | refs/heads/master | 2021-01-01T10:37:59.077170 | 2020-03-15T09:15:50 | 2020-03-15T09:15:50 | 239,241,118 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 397 | py | import math #math 모듈 불러오기
# 몫과 나머지 구하기
num=5/2
print(num) # (출력값) 2.5
# 몫을 구하시오
quotient = 5//2
print("몫은: ", quotient) # (출력값) 2
# 몫을 구하시오 math.floor()
quotient = math.floor(num)
print("몫은: ", quotient) # (출력값) 2
# 나머지를 구하시오
remainder = 5%2
print("나머지는: ", remainder) # (출력값) 1 | [
"d@d"
] | d@d |
7591cd1eb094e2dd03e1ba8e953311c8092df947 | 59f64b5cf799e31c97b11828dba4787afb8f3f17 | /hail/python/test/hail/utils/test_struct_repr_pprint.py | 338fa33f57bfc4dae35e4ce817280c5513926ae3 | [
"MIT"
] | permissive | hail-is/hail | 2089e6f3b38548f13fa5c2a8ab67f5cfdd67b4f1 | 07a483ae0f46c66f3ed6fd265b48f48c06298f98 | refs/heads/main | 2023-09-01T15:03:01.450365 | 2023-09-01T02:46:35 | 2023-09-01T02:46:35 | 45,069,467 | 913 | 262 | MIT | 2023-09-14T21:53:32 | 2015-10-27T20:55:42 | Python | UTF-8 | Python | false | false | 3,823 | py | import hail as hl
from pprint import pformat
def test_repr_empty_struct():
assert repr(hl.Struct()) == 'Struct()'
def test_repr_identifier_key_struct():
assert repr(hl.Struct(x=3)) == 'Struct(x=3)'
def test_repr_two_identifier_keys_struct():
assert repr(hl.Struct(x=3, y=3)) == 'Struct(x=3, y=3)'
def... | [
"[email protected]"
] | |
b8e2268768855166460543c4a549ace91b2acd01 | aa76391d5789b5082702d3f76d2b6e13488d30be | /Data Structure/collections/collections03.py | f37a8db3304c4250ee197efc507c772589a18b0b | [] | no_license | B2SIC/python_playground | 118957fe4ca3dc9395bc78b56825b9a014ef95cb | 14cbc32affbeec57abbd8e8c4ff510aaa986874e | refs/heads/master | 2023-02-28T21:27:34.148351 | 2021-02-12T10:20:49 | 2021-02-12T10:20:49 | 104,154,645 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,382 | py | # namedtuple()
# 일반 튜플 방식에서는 필드가 많을 경우 각각의 순서가 어떠한 의미를 내포하는지 헷갈릴 수 있다.
# 따라서 이러한 필드에 이름을 지정해서 사용할 경우 이러한 문제를 방지할 수 있다.
# 사전을 사용할 수도 있지않을까? => 메모리를 좀 더 많이 사용하게된다.
# 이러한 부담을 줄일 수 있는 방법이 namedtuple 이다.
import collections
aa = ("홍길동", 24, "남")
print(aa)
bb = ("강복녀", 21, "여")
print(bb[0])
for n in [aa, bb]:
print("%... | [
"[email protected]"
] | |
014eebc0b47437ce3b6ed32e4e7644145307ee0e | 52b5773617a1b972a905de4d692540d26ff74926 | /.history/sorting_20200614221804.py | aab218c7b33236836a8e08302cc90f7c2f007196 | [] | no_license | MaryanneNjeri/pythonModules | 56f54bf098ae58ea069bf33f11ae94fa8eedcabc | f4e56b1e4dda2349267af634a46f6b9df6686020 | refs/heads/master | 2022-12-16T02:59:19.896129 | 2020-09-11T12:05:22 | 2020-09-11T12:05:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 543 | py | def wavesort(arr):
# sort the numbers first
numbers = sorted(arr)
# swap the numbers
n = len(numbers)
i = 0
print(numbers)
while i < n-1:
temp = numbers[i]
numbers[i] = numbers[i+1]
numbers[i+1] = temp
i+=2
#check if number at position i is smaller than... | [
"[email protected]"
] | |
9f02551bf775ed8ec2d6884a17d21cc6099d7879 | b3217e2bb6e72fbcb15df99b5c6c10ea4731a5b7 | /sarctf/ppc/2.py | 99590c8528f3d8868b0b0480a5fd96ab12992ed4 | [] | no_license | CrackerCat/ctf-6 | 5704de09eda187e111c7719c71e0a81c5d5c39e3 | aa7846548451572fe54a380dc8d367a0132ad2ec | refs/heads/master | 2023-01-28T06:18:01.764650 | 2020-12-07T12:05:20 | 2020-12-07T12:05:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,087 | py | #!/usr/bin/python
#coding=utf-8
#__author__:TaQini
from pwn import *
p = remote('212.47.229.1', 33002)
context.log_level = 'debug'
se = lambda data :p.send(data)
sa = lambda delim,data :p.sendafter(delim, data)
sl = lambda data :p.sendline(data)
sla = lambda d... | [
"[email protected]"
] | |
ffde862214cda7a2147f1869d2129ac1db5da852 | 6219e6536774e8eeb4cadc4a84f6f2bea376c1b0 | /scraper/storage_spiders/babyclickvn.py | 8b4bfb4c58c50080570a3fe83c35000202c62e4f | [
"MIT"
] | permissive | nguyenminhthai/choinho | 109d354b410b92784a9737f020894d073bea1534 | d2a216fe7a5064d73cdee3e928a7beef7f511fd1 | refs/heads/master | 2023-05-07T16:51:46.667755 | 2019-10-22T07:53:41 | 2019-10-22T07:53:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,166 | py | # Auto generated by generator.py. Delete this line if you make modification.
from scrapy.spiders import Rule
from scrapy.linkextractors import LinkExtractor
XPATH = {
'name' : "//div[@id='content_detail']/div[@class='extra_title width880']",
'price' : "//div[@id='product_price']/div[@id='ctl00_ContentPlaceHold... | [
"[email protected]"
] | |
09ede8ef76b80288854cd7a698b21384d4287691 | 411eff94020c192d5e5f657fa6012232ab1d051c | /extras/unused/goals/Goals.py | 9edb3faad6ded548a68976b4d7a7778136b57789 | [] | no_license | xMakerx/cio-src | 48c9efe7f9a1bbf619a4c95a4198aaace78b8491 | 60b2bdf2c4a24d506101fdab1f51752d0d1861f8 | refs/heads/master | 2023-02-14T03:12:51.042106 | 2021-01-15T14:02:10 | 2021-01-15T14:02:10 | 328,268,776 | 1 | 0 | null | 2021-01-15T15:15:35 | 2021-01-09T23:51:37 | Python | UTF-8 | Python | false | false | 1,239 | py | """
Filename: Goals.py
Created by: blach (31Jan15)
"""
class Goal:
def __init__(self, data):
self.completed = False
self.reward = data.get("reward")
self.goalType = None
def getGoalType(self):
return self.goalType
def isCompleted(self):
return self.completed
def getReward(self):
return... | [
"[email protected]"
] | |
1edcdf5662fb9929ad20c46750e1aacfce2ec20c | f445450ac693b466ca20b42f1ac82071d32dd991 | /generated_tempdir_2019_09_15_163300/generated_part009876.py | 57a965a16500bcdc8e2f8d774f7276a11554e190 | [] | no_license | Upabjojr/rubi_generated | 76e43cbafe70b4e1516fb761cabd9e5257691374 | cd35e9e51722b04fb159ada3d5811d62a423e429 | refs/heads/master | 2020-07-25T17:26:19.227918 | 2019-09-15T15:41:48 | 2019-09-15T15:41:48 | 208,357,412 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,292 | py | from sympy.abc import *
from matchpy.matching.many_to_one import CommutativeMatcher
from matchpy import *
from matchpy.utils import VariableWithCount
from collections import deque
from multiset import Multiset
from sympy.integrals.rubi.constraints import *
from sympy.integrals.rubi.utility_function import *
from sympy.... | [
"[email protected]"
] | |
3a1dde9c5c50408db3863a86c8e88385a9feaa1b | 23ec357d5df7addf06cb70c10ba9173521c70a9b | /core/migrations/0009_auto_20210617_1030.py | 35a247c12f40532b5e495d2fc609f64c811b74cf | [] | no_license | blimp666/d_job | b8e8b93ef6b94e24a38bd94195a779bfff7f3c30 | 18904ac12af6593bf59b1ba379f722bd69d00863 | refs/heads/main | 2023-06-07T21:50:34.596128 | 2021-06-22T11:15:20 | 2021-06-23T19:36:48 | 376,893,878 | 0 | 0 | null | 2021-06-15T19:30:46 | 2021-06-14T16:48:17 | Python | UTF-8 | Python | false | false | 649 | py | # Generated by Django 3.2.4 on 2021-06-17 10:30
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0008_auto_20210617_1019'),
]
operations = [
migrations.RenameField(
model_name='application',
... | [
"[email protected]"
] | |
189fc2f6b216183bc3e8e1bb343a24c9669444f0 | af84faa0eedb07725755b89e1ce254ed2317286c | /Basics/04_Elements/Distance2Grid.py | cda319b3d75b274e8d209901c3c8ba90b3d62d0c | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | ambaamba/Examples | cdc59a0db40097e9401941facb88e09f41f96abf | 88cfc58ca0ce81e70bb3fde964b11d8a094bddf8 | refs/heads/master | 2020-12-23T10:39:33.696844 | 2019-12-17T11:23:21 | 2019-12-17T11:23:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,078 | py | #!/usr/bin/env python3
# -----------------------------------------------------------------------------
# Copyright (c) 2016+ Buro Petr van Blokland + Claudia Mens
# www.pagebot.io
#
# P A G E B O T
#
# Licensed under MIT conditions
#
# Supporting DrawBot, www.drawbot.com
# Supporting Flat, xxyxy... | [
"[email protected]"
] | |
a3f2d11981c17034f2fa94d45194dd6fc7f631bd | 4e2117a4381f65e7f2bb2b06da800f40dc98fa12 | /026_mobile-deeplabv3-plus/01_float32/01_image_to_npy.py | 9c53b65419559184884b93a4f706df629e353ed8 | [
"AGPL-3.0-only",
"LicenseRef-scancode-proprietary-license",
"MIT"
] | permissive | PINTO0309/PINTO_model_zoo | 84f995247afbeda2543b5424d5e0a14a70b8d1f1 | ff08e6e8ab095d98e96fc4a136ad5cbccc75fcf9 | refs/heads/main | 2023-09-04T05:27:31.040946 | 2023-08-31T23:24:30 | 2023-08-31T23:24:30 | 227,367,327 | 2,849 | 520 | MIT | 2023-08-31T23:24:31 | 2019-12-11T13:02:40 | Python | UTF-8 | Python | false | false | 311 | py | from PIL import Image
import os, glob
import numpy as np
dataset = []
files = glob.glob("JPEGImages/*.jpg")
for file in files:
image = Image.open(file)
image = image.convert("RGB")
data = np.asarray(image)
dataset.append(data)
dataset = np.array(dataset)
np.save("person_dataset", dataset)
| [
"[email protected]"
] | |
c7cbe123ca4dc453acc9c9f66bc343aadfbcb3c6 | f0755c0ca52a0a278d75b76ee5d9b547d9668c0e | /atcoder.jp/sumitrust2019/sumitb2019_c/Main.py | c9aee86e614b37fe0a6f1b4a03b4dc524557edd8 | [] | no_license | nasama/procon | 7b70c9a67732d7d92775c40535fd54c0a5e91e25 | cd012065162650b8a5250a30a7acb1c853955b90 | refs/heads/master | 2022-07-28T12:37:21.113636 | 2020-05-19T14:11:30 | 2020-05-19T14:11:30 | 263,695,345 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 333 | py | X = int(input())
a = [100, 101, 102, 103, 104, 105]
dp = [[False]*100010 for _ in range(10)]
dp[0][0] = True
for i in range(6):
for j in range(X+1):
dp[i+1][j] |= dp[i][j]
if j >= a[i]:
dp[i+1][j] |= dp[i][j-a[i]]
dp[i+1][j] |= dp[i+1][j-a[i]]
if dp[6][X]:
print(1)
else:... | [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.