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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ee6fc247ac1089bdddd2b207a83b6a927bebb1af | bc2cdb1e438efaf67131e975ac4db80b4dc43385 | /src/public/common/migrations/0010_auto_20190417_1318.py | c39c8bce83b2236235a22b42060953314592d12e | [] | no_license | Shadow-linux/ops-for-study | cf4d55409ebc6f27d454bea60886cd154c994484 | 115b567948d25a64e423a6cdc89bc8337896afe2 | refs/heads/master | 2023-01-14T13:35:56.880896 | 2019-09-23T05:01:31 | 2019-09-23T05:01:31 | 209,781,758 | 2 | 0 | null | 2023-01-04T10:55:45 | 2019-09-20T12:08:11 | Python | UTF-8 | Python | false | false | 586 | py | # Generated by Django 2.0.1 on 2019-04-17 13:18
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('common', '0009_auto_20190417_1312'),
]
operations = [
migrations.RemoveField(
model_name='settingconf',
name='mail_s... | [
"liangyedong@qipeipu.com"
] | liangyedong@qipeipu.com |
e1dd44a6c6549e1f5a3c958a97d51b7ef849d58f | 226e962457f3f9d271bdc0ec7cb999d45dd2ab92 | /plugins/standard.py | f8b10147630e201fc2816e26784067f3d0a758ea | [
"Apache-2.0"
] | permissive | Web5design/saxo | 5109ed2a9c48b2c6e4a2afd6edfe2e28b8279b0f | 1cf079d13be63557626ebf8163c65c16bd4856c8 | refs/heads/master | 2021-01-20T16:30:36.401591 | 2014-01-26T22:23:28 | 2014-01-26T22:23:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 338 | py | # http://inamidst.com/saxo/
# Created by Sean B. Palmer
import saxo
@saxo.event("PRIVMSG")
def exclamation(irc):
if irc.text == irc.config["nick"] + "!":
irc.say(irc.nick + "!")
@saxo.event("PRIVMSG")
def prefix(irc):
if irc.text == irc.config["nick"] + ": prefix?":
irc.reply('"' + irc.config... | [
"sean@miscoranda.com"
] | sean@miscoranda.com |
c8f28fbfdafc9d0e9912f8931569d38be8a7a0c6 | 567ccfcab3a25235e36a852ac0850088baa4de34 | /lib/c_daemon.py | 4a9d77fb8c518886b920a6de4344307616ae6e8e | [] | no_license | fpemud/conduit-daemon | 7d90837471be132b2e0ae6f656a8440cb39647e4 | 89f3285dad48fd561a9497a399fb802a32e73b4b | refs/heads/master | 2020-09-06T09:39:03.702670 | 2019-12-10T23:53:19 | 2019-12-10T23:53:19 | 220,389,028 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,703 | py | #!/usr/bin/python3
# -*- coding: utf-8; tab-width: 4; indent-tabs-mode: t -*-
import os
import sys
import signal
import shutil
import socket
import logging
from gi.repository import GLib
from c_util import CUtil
from c_util import AvahiServiceRegister
from c_param import CConst
from builtin_datatypes import BuiltInDat... | [
"fpemud@sina.com"
] | fpemud@sina.com |
5ffd84c250884e311cf106080812d97c1442dd63 | 771f9e6a6142d7c4a7301ea3f9cfbea3b96fe3e6 | /e227.py | 7dd7ffc0dcc5618e29404e54d247ee76e6dfd55b | [] | no_license | bpachev/proj_euler | 6f92a952be37bac148a7e0d5d655673e920d0e86 | 223946d4ed805fe58bd6a05f403e1d632cb818f4 | refs/heads/master | 2021-07-01T17:03:37.647324 | 2021-06-01T04:49:32 | 2021-06-01T04:49:32 | 38,787,430 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,128 | py | #Benjamin Alexander Pachev benjaminpachev@gmail.com
import numpy as np
import scipy.linalg as la
cap = 100
n = cap/2 # n states
#if zero players separate the dice, the game is over and the number of turns left is zero, so don't need to solve for that
T = np.zeros((n,n))
for i in xrange(2,n-2):
T[i,i] = 0.5 #Both ... | [
"benjaminpachev@gmail.com"
] | benjaminpachev@gmail.com |
5046ed8fe25934c3b98b1e116454db9270bfc86b | 9042ed9effb70fc9309d4de2b4d07fcbf9d21990 | /utils.py | 0cb051eddfb8b5da2b1d9c11a9279f4c9f84978c | [
"BSD-3-Clause"
] | permissive | cbaeck1/T2KWP | 973ed2d2fcf51846f658fe1be0de86ae029cf849 | e3682bee5b96d049d66c586910d34d802ab47637 | refs/heads/master | 2023-05-05T04:56:11.663493 | 2021-05-28T05:29:28 | 2021-05-28T05:29:28 | 368,405,377 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,030 | py | import numpy as np
from scipy.io.wavfile import read
import torch
import librosa
def get_mask_from_lengths(lengths):
max_len = torch.max(lengths).item()
if torch.cuda.is_available():
ids = torch.arange(0, max_len, out=torch.cuda.LongTensor(max_len))
else:
ids = torch.arange(0, max_len, out... | [
"cbaeck1@gmail.com"
] | cbaeck1@gmail.com |
2ca5a1e4f3e59d43b6f2ecc067d1d5305e9e2d46 | f03d41c0ee4d05a6af5eb154fef4c27a2e638e8d | /ontask/core/views.py | a26d46ac86ca024aa1a6740258c284ef876a6f42 | [
"LGPL-2.0-or-later",
"BSD-3-Clause",
"MIT",
"Apache-2.0",
"LGPL-2.1-only",
"Python-2.0"
] | permissive | abelardopardo/ontask_b | c461f561b0965735c158199e94366d5bf1a8a676 | c432745dfff932cbe7397100422d49df78f0a882 | refs/heads/master | 2023-08-17T03:27:35.900314 | 2023-08-16T07:29:26 | 2023-08-16T07:29:26 | 110,175,024 | 43 | 32 | MIT | 2023-08-15T23:08:20 | 2017-11-09T22:49:43 | Python | UTF-8 | Python | false | false | 2,792 | py | """Basic views to render error."""
from django import http
from django.contrib.auth.decorators import login_required
from django.shortcuts import redirect
from django.urls import reverse
from django.views import generic
from django.views.decorators.clickjacking import xframe_options_exempt
from django.views.decorators.... | [
"abelardo.pardo@gmail.com"
] | abelardo.pardo@gmail.com |
a65e236407505f34c4c6e39088ef9140b7a49968 | 2a4a17a67b9069c19396c0f8eabc8b7c4b6ff703 | /BGP3D/Chapter07/TrackLanesClass.py | 28c1d69b165980ebf5481a95a03cd039e070f259 | [] | no_license | kaz101/panda-book | 0fa273cc2df5849507ecc949b4dde626241ffa5e | 859a759c769d9c2db0d11140b0d04506611c2b7b | refs/heads/master | 2022-12-19T09:36:05.794731 | 2020-09-16T19:04:10 | 2020-09-16T19:04:10 | 295,784,057 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,980 | py | ''' TrackLanes Class
This class creates and owns the markers that populate the
track and are used by many things in the game to understand
the shape and position of parts of the track.
'''
from pandac.PandaModules import EggData, Point3
from MarkerClass import Marker
from UtilityFunctions import trueDist
... | [
"kaz101130@gmail.com"
] | kaz101130@gmail.com |
611bb6243f2ed10c3f846bce58cfa7b528a2e4e3 | 53e03422b1098bd0205831f576d6b232d448d1fd | /arcade/examples/shape_list_demo_skylines.py | d395b92b4f31bdb8ffc1fb5cc2b171fc8049d461 | [
"MIT"
] | permissive | yuvallanger/arcade | c56d679c38478b1dbafba906e1ccb8283c609a38 | 6827fcc69a90047dc0e290bd37f7da0b17864d28 | refs/heads/master | 2021-03-27T08:38:39.983393 | 2017-12-29T16:52:50 | 2017-12-29T16:52:50 | 120,493,577 | 0 | 0 | null | 2018-02-06T17:06:09 | 2018-02-06T17:06:08 | null | UTF-8 | Python | false | false | 6,215 | py | """
City Scape Generator
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.shape_list_skylines
"""
import random
import arcade
import time
SCREEN_WIDTH = 1200
SCREEN_HEIGHT = 600
def make_star_field(star_count):
""" Make a bunch of circles for star... | [
"paul@cravenfamily.com"
] | paul@cravenfamily.com |
03f39ea1dd0167e9f6c953d89a68092514cf22fc | 885929d52504b89ec8568dec5cf8fe09d57ff710 | /backend/api/models/non_revenue_car_type_model.py | 65be6d24a4fe9b9db0290f4cecdd3c35e66f17d3 | [
"MIT"
] | permissive | ferdn4ndo/infotrem | 165d3084c5f57d024f072454ca7f536b5280b7ea | 49f941387eae03e8e26aefabd87ca0b48212b059 | refs/heads/master | 2023-09-04T07:13:05.246074 | 2022-02-17T16:54:22 | 2022-02-17T16:54:22 | 200,339,872 | 0 | 0 | MIT | 2023-03-06T04:55:50 | 2019-08-03T06:18:22 | Python | UTF-8 | Python | false | false | 952 | py | from django.contrib import admin
from django.db import models
from django.utils.translation import gettext_lazy as _
from .generic_model import GenericModel
class NonRevenueCarType(GenericModel):
class RollingStockNonRevenueCarCategory(models.TextChoices):
ELECTRICAL_MAINTENANCE = 'ELECTRICAL_MAINTENANC... | [
"const.fernando@gmail.com"
] | const.fernando@gmail.com |
7190564b0bf9da9bbefd35230e1f7f36fde00e17 | d532b85841b459c61d88d380e88dd08d29836d43 | /solutions/1522_diameter_of_n_ary_tree.py | 8e115f701879f334b15338c3fcbc494ab49b4afc | [
"MIT"
] | permissive | YiqunPeng/leetcode_pro | ad942468df5506de9dc48a4019933f658e2a3121 | 4a508a982b125a3a90ea893ae70863df7c99cc70 | refs/heads/master | 2022-05-15T09:32:02.699180 | 2022-05-14T16:32:17 | 2022-05-14T16:32:17 | 182,453,966 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 477 | py | class Solution:
def __init__(self):
self.res = 0
def diameter(self, root: 'Node') -> int:
self._dfs(root)
return self.res
def _dfs(self, root):
if not root:
return 0
f, s = 0, 0
for c in root.children:
v = self._dfs(c)
... | [
"ypeng1@andrew.cmu.edu"
] | ypeng1@andrew.cmu.edu |
5ecd77bf3b4929621d7c34d7b7f91dd83493181f | 08bd7887a8bb028e0467299bb8eb8e25a4e76a8c | /ggtracker/replays/migrations/0005_auto__chg_field_player_character_code.py | 9f69b98dbd7d6da13988fe56495c814670fde65f | [] | no_license | Ruuroku/ggtracker_django | 67e1758edeb8ebe295d4c64ade5fb6186935f7de | 310775de34a19213a855b93325e28b0cc3a709db | refs/heads/master | 2020-03-30T17:11:39.581472 | 2012-08-01T03:48:13 | 2012-08-01T03:48:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,488 | py | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'Player.character_code'
db.alter_column('replays_player', 'character_code', self.gf('djan... | [
"dsjoerg@gmail.com"
] | dsjoerg@gmail.com |
224b53d59fc1684f41d4c67ed1d714eb8c2d51f1 | de99325634f4d81126e6c13603b74ae0a5b04414 | /homework/unit_5/pig/double.py | cbb5457f3335ce61b3f69c6bd5625392b091382a | [] | no_license | joyrexus/CS212 | 13d22b3e41d6a86d2ff9cd2fa2c7b36e70083b8b | ab3729939c154ef559c43d5c5b076ceb59f87db6 | refs/heads/master | 2021-01-23T14:06:13.827050 | 2014-03-20T19:29:08 | 2014-03-20T19:29:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,101 | py | # In this problem, we introduce doubling to the game of pig.
# At any point in the game, a player (let's say player A) can
# offer to 'double' the game. Player B then has to decide to
# 'accept', in which case the game is played through as normal,
# but it is now worth two points, or 'decline,' in which case
# player... | [
"joyrexus@gmail.com"
] | joyrexus@gmail.com |
45baeb403696db411a2dbae6cf82c5bb93ea3514 | c83fb87aa53815dcb3bd51deab19b8d6790bd3af | /nelchan/presenter/topic_ch_presenter.py | c39d251e57fd527ff43e0d82a06e5f5461572e75 | [] | no_license | geek-space-hq/nelchan | fcee0fbb004333ba4070c0dfab729244f99d0641 | 1bba2dc671b8629eff0cf5d9236739264ae7c82e | refs/heads/main | 2023-06-05T18:32:09.645283 | 2021-06-28T06:55:22 | 2021-06-28T06:55:22 | 374,030,461 | 6 | 1 | null | 2021-06-28T06:55:23 | 2021-06-05T05:40:17 | Python | UTF-8 | Python | false | false | 6,764 | py | from nelchan.usecase.outputport import (
AllocateOutputData,
AllocateOutputPort,
CreateTopicChannelCategoryOutputData,
CreateTopicChannelCategoryOutputPort,
InitTopicChannelCategoryOutputData,
InitTopicChannelCategoryOutputPort,
RegisterTopicChannelOutputData,
RegisterTopicChannelOutputP... | [
"in9lude@gmail.com"
] | in9lude@gmail.com |
fbcc8bdf95af928a47727010e8ba5af398a804c1 | 8eff2593ef44b3bdb8dda8678eb051e58b4b5129 | /myenv/lib/python3.5/site-packages/djangojs/contrib/__init__.py | a62abdd7324527beecc154f250047e2bb6e87ce9 | [
"MIT"
] | permissive | rupeshparab/techscan | 08391c26c7916dd397527e1da8f91b4aa78bc96e | ce2558602ddad31873d7129f25b1cc61895b9939 | refs/heads/master | 2022-12-11T03:33:07.533280 | 2017-09-03T17:48:57 | 2017-09-03T17:48:57 | 102,280,759 | 1 | 1 | MIT | 2022-12-08T00:36:08 | 2017-09-03T17:11:16 | Python | UTF-8 | Python | false | false | 297 | py | # -*- coding: utf-8 -*-
'''
This package is dedicated to contributed compatibility modules.
These modules provide mixins and already packed
:class:`ContextSerializers <djangojs.context_serializer.ContextSerializer>`
to use Django applications incompatible with the defaut Django.js behavior.
'''
| [
"rupeshparab.rp@gmail.com"
] | rupeshparab.rp@gmail.com |
661b4fd751ff000da6c6b5b7dda6b97a049b42c8 | 6f3770863fcc846741249817d27a1753b1bb3c70 | /ch3/deliciousrec.py | 7142b3e26534742fc2a158fa2a66a67c572f7548 | [] | no_license | karolius/Programming-Collective-Intelligence-code-with-exercises | 54cbf30a74c41c9066131b7ac508f8f5c8ae85d7 | 3257b62e60ab2c8405f6bb8fd3e053daaf267dd3 | refs/heads/master | 2020-05-21T14:58:05.603804 | 2017-04-09T20:45:46 | 2017-04-09T20:45:46 | 66,273,556 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,446 | py | from pydelicious import *
from time import sleep
from random import randint
from recommendations import *
import pickle
def initializeUserDict(tag, count=15):
user_dict = {}
# get the top count' popular posts
for p1 in get_popular(tag=tag)[0:count]:
# find all users who posted this
try:
... | [
"karolius127@gmail.com"
] | karolius127@gmail.com |
18079e1ece0f7c61a10f8b52845b6849238d7ff7 | 6fa701cdaa0d83caa0d3cbffe39b40e54bf3d386 | /google/cloud/gkehub/v1alpha2/gkehub-v1alpha2-py/scripts/fixup_gkehub_v1alpha2_keywords.py | 830ead8cc59ea39930e04fe3e9936f0a4af93939 | [
"Apache-2.0"
] | permissive | oltoco/googleapis-gen | bf40cfad61b4217aca07068bd4922a86e3bbd2d5 | 00ca50bdde80906d6f62314ef4f7630b8cdb6e15 | refs/heads/master | 2023-07-17T22:11:47.848185 | 2021-08-29T20:39:47 | 2021-08-29T20:39:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,400 | py | #! /usr/bin/env python3
# -*- 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 requi... | [
"bazel-bot-development[bot]@users.noreply.github.com"
] | bazel-bot-development[bot]@users.noreply.github.com |
c5a434020d854a6bdc7ba16e01ef6d32ef8f30d3 | 75764b5febc099a7177311d23c625f8d2a8484c5 | /api/order/tests/test_serializers/test_address_serializer.py | 74036f012c551532e5c97814c41f0aadf9214bbf | [] | no_license | drsantos20/customer-service | f58a054b40390971a4289711ef805ff4355b2b95 | 859f09854e0a5b15de6876e6605dc194f8f20415 | refs/heads/master | 2022-01-12T20:49:30.821904 | 2020-08-16T02:49:45 | 2020-08-16T02:49:45 | 227,499,394 | 0 | 0 | null | 2022-01-06T22:40:23 | 2019-12-12T02:04:13 | Python | UTF-8 | Python | false | false | 975 | py | from django.test import TestCase
from api.order.factories import UserOrderAddressFactory
from api.order.serializers.address_serializer import AddressSerializer
class TestUserOrderAddressSerializer(TestCase):
def setUp(self):
self.address = UserOrderAddressFactory(
street='avenida faria lima',... | [
"drsantos20@gmail.com"
] | drsantos20@gmail.com |
09922aa3bd5e7faf0f3fb17fccefe4377bb5e531 | 8747583c1a7ee7e5309eb518497b51e30e5770d8 | /test_saved_svhn.py | 1564a9362526445f1db1c47e2ce024ef2565ae77 | [] | no_license | Miladiouss/PreprocessingBenchmarkDatasets | db11ea5c9d6bf640ac0456e0efed4cf853bb70f2 | 39fe1af08dce7044dc221c4006489f5237a0b028 | refs/heads/master | 2021-09-12T09:58:10.239334 | 2018-04-16T05:59:54 | 2018-04-16T05:59:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 917 | py | import numpy as np
from PIL import Image
import os
import h5py
def test_by_saving_images_from_hdf5(hdf5file):
dataset_file = h5py.File(hdf5file, "r")
train_dataset = dataset_file['/train/images']
if not os.path.exists('testing_trainset_images_of_svhn'):
os.mkdir('testing_trainset_images_of_svhn')... | [
"thushv@gmail.com"
] | thushv@gmail.com |
7ef990c1ffd218bf4de447c0b2493dc6fd5c4de2 | 657370ee4463f5631639fea79763ac4d78fba236 | /settings/local.py | 50388474781df3751d4f106966325c1a9058cd1e | [] | no_license | jphalip/django-dev-dashboard | b861bd90f1508e36c20d341a423d6ad52102b51e | d1a93ed1ad35e94942b6c5e99f2a23e0bdabc366 | refs/heads/master | 2021-01-18T19:35:21.500858 | 2011-09-29T15:55:26 | 2011-09-29T15:55:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 520 | py | from __future__ import absolute_import
from .base import *
DEBUG = TEMPLATE_DEBUG = True
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'djdash',
}
}
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
},
}
... | [
"jacob@jacobian.org"
] | jacob@jacobian.org |
49ebc398a478f992fa818e04dabd98a7aaba5f7e | 6c8f1fe687f6a62c5c326f8ad7db8dc0790655cb | /photos/migrations/0001_initial.py | 47b2cd45bfd580d3cd99a5f757d7768b818de109 | [] | no_license | hritools/face_management | 74e3ce92fa852dec2c258d8c572b413ec88010b3 | e50b20b9d6bce1e8cba38fc8bd54859bec8ed2b4 | refs/heads/master | 2022-12-30T06:03:58.254851 | 2020-10-13T15:16:00 | 2020-10-13T15:16:00 | 303,607,360 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,997 | py | # Generated by Django 2.2 on 2019-04-24 09:08
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Camera',
fields=[
... | [
"lev_matematik@tut.by"
] | lev_matematik@tut.by |
59742ef789102a3792055ebf24374d9d533298bf | 4577d8169613b1620d70e3c2f50b6f36e6c46993 | /students/1814615/homework01/program03.py | da84659113d5cba61ae9dbfcfc6ec32edb186ca2 | [] | no_license | Fondamenti18/fondamenti-di-programmazione | cbaf31810a17b5bd2afaa430c4bf85d05b597bf0 | 031ec9761acb1a425fcc4a18b07884b45154516b | refs/heads/master | 2020-03-24T03:25:58.222060 | 2018-08-01T17:52:06 | 2018-08-01T17:52:06 | 142,419,241 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,565 | py |
'''Dato un testo da codificare ed una chiave si propone il seguente schema crittografico:
- dalla chiave vengono eliminati tutti i caratteri C per cui C<'a' o C>'z'.
- di ciascuno dei caratteri restanti vengono cancellate dalla chiave tutte le occorrenze
tranne l'ultima, ottenendo una sequenza DISORDINATA.
- i ... | [
"a.sterbini@gmail.com"
] | a.sterbini@gmail.com |
b80ab1062c8f9f22c7016444ca9235f14024d672 | 97f7fdac873141c3e732d74b6a9fbd8a1a2643f4 | /histogram.py | e2e7300461ed79f3d6c4669153c0347c926ec808 | [] | no_license | Saoussenko/IBSRDataReader | 780f3c3fe2452b20e03fe6ae7ed280e0d71c25fe | eb0950c862d5982bf1f64acb345e7ced846081ad | refs/heads/master | 2020-05-28T09:08:14.041106 | 2016-12-10T06:39:00 | 2016-12-10T06:39:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 762 | py | import numpy as np
import matplotlib.pyplot as plt
def equalize(f):
h = np.histogram(f, bins=16384)[0]
H = np.cumsum(h) / float(np.sum(h))
import pdb
pdb.set_trace()
e = np.floor(H[(f.flatten() * 16383.).astype('int')])
return e.reshape(f.shape)
def plt_histogram(image):
import pdb
p... | [
"siavash.khodadadeh@gmail.com"
] | siavash.khodadadeh@gmail.com |
d8ed5675fc7cd493a4717d861652188b17f05ea0 | f854025576f43094df9ca52cc8784df112d93946 | /grade/migrations/0002_remove_grade_sort.py | 84456f950665a2bf31426f5567589fc015027e17 | [] | no_license | Futureword123456/django_1 | 941c2cf0e2242f720376e02b39e0d52530cf5626 | 489ca05e31768ba049bd012eebd84de957b569f5 | refs/heads/master | 2023-03-20T21:13:18.707081 | 2021-03-13T11:24:48 | 2021-03-13T11:24:48 | 338,713,310 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 312 | py | # Generated by Django 2.2.7 on 2021-03-04 19:16
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('grade', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='grade',
name='sort',
),
]
| [
"2635681517@qq.com"
] | 2635681517@qq.com |
41d31a65aaae61bf04f0556d2e49a6eccd949fe5 | 0b842bcb3bf20e1ce628d39bf7e11abd7699baf9 | /oscar/a/api/yang/modules/tech/content/qwilt_tech_content_interfaces/tech/content/interfaces/interface/delivery/delivery_data_gen.py | ff982fd7b75f19a31237a97387a97665bb210bc6 | [] | no_license | afeset/miner2-tools | 75cc8cdee06222e0d81e39a34f621399e1ceadee | 81bcc74fe7c0ca036ec483f634d7be0bab19a6d0 | refs/heads/master | 2016-09-05T12:50:58.228698 | 2013-08-27T21:09:56 | 2013-08-27T21:09:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,732 | py |
# Copyright Qwilt, 2011
#
# The code contained in this file may not be used by any other entities without explicit written permission from Qwilt.
#
# Author: orens
from a.infra.misc.enum_with_value import EnumWithValue
from a.infra.basic.return_codes import ReturnCodes
import socket
class DeliveryData(object)... | [
"afeset@gmail.com"
] | afeset@gmail.com |
b4b066d67881f574fab6a47c8768fc9f4cf3a007 | 929fc8dd47b91c963c8c2f81d88e3d995a9dfc7c | /src/amazon/Zombie in Matrix.py | e40c2a3c372d752dfb2aeb3cbcad50a9bde7d522 | [] | no_license | 1325052669/leetcode | fe7571a9201f4ef54089c2e078810dad11205b14 | dca40686c6a280bd394feb8e6e78d40eecf854b9 | refs/heads/master | 2023-04-01T17:53:30.605822 | 2021-04-10T15:17:45 | 2021-04-10T15:17:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,701 | py | # Given a 2D grid, each cell is either a zombie 1 or a human 0. Zombies can turn adjacent (up/down/left/right) human beings into zombies every hour. Find out how many hours does it take to infect all humans?
#
# Example:
#
# Input:
# [[0, 1, 1, 0, 1],
# [0, 1, 0, 1, 0],
# [0, 0, 0, 0, 1],
# [0, 1, 0, 0, 0]]
#
# Outp... | [
"js7995@nyu.edu"
] | js7995@nyu.edu |
7cdad135e1b9a107a74a15bc9bac3def75c8bbe6 | b1e325259687b58572ea962e5528fa5afa17e6f6 | /python/src/abc159/c.py | a0998887e726a946a29feafbb59e6f0e3c244ed6 | [] | no_license | gen0083/atcoder_python | 84e1b0a63a736f1fca21bf7fcda776f4016a30bd | 93d5b1023242e562e4687119c94812d8c0df429c | refs/heads/master | 2023-07-23T21:47:38.964277 | 2023-07-13T12:23:51 | 2023-07-13T12:23:51 | 231,208,047 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 162 | py | # https://atcoder.jp/contests/abc159/tasks/abc159_c
def main():
l = int(input())
x = l / 3
print(x * x * x)
if __name__ == '__main__':
main()
| [
"archiherewego@gmail.com"
] | archiherewego@gmail.com |
6c6fc45767707b0c22ccd953f22237c9dd20af21 | bce44991fddb9515429e6dba22248e4204b1d30a | /environments/my_env/lib/python3.9/site-packages/meraki_v0/aio/api/mx_cellular_firewall.py | 1d105f2b09f4a89d0761361eabb017495db92afc | [] | no_license | tkj-scythe/meraki-dns-checker | 6f7441380c4b48497b0c9b9a2bc5db380da4899c | 91c2f61b7527f89063bfa0b2e7c28c766581ed96 | refs/heads/main | 2023-07-01T09:04:21.353214 | 2021-08-04T01:22:39 | 2021-08-04T01:22:39 | 390,630,419 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,543 | py | class AsyncMXCellularFirewall:
def __init__(self, session):
super().__init__()
self._session = session
async def getNetworkCellularFirewallRules(self, networkId: str):
"""
**Return the cellular firewall rules for an MX network**
https://developer.cisco.com/me... | [
"t.kjaerolsen@gmail.com"
] | t.kjaerolsen@gmail.com |
adee72fc06e74f144b6da5be52c43941cbbcba7f | adad563a30d9f0e1985724f8f4e196f3fd1c2f16 | /FINAL PROJECT/VMC_Htesting.py | 8642eda2dda556c7721887102d0928635811c3a0 | [] | no_license | ericyeung/PHY407 | 975bb2ab4629283f12bd85cf5dc8e87e11a5b7f0 | 2db9fe66489ae746819a167469de6a560ce00926 | refs/heads/master | 2020-04-10T14:13:59.206994 | 2016-10-08T01:13:21 | 2016-10-08T01:14:20 | 42,448,005 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,339 | py | #!/usr/bin/env python
from __future__ import division
import numpy as np
import matplotlib.pyplot as plt
"""
Variational Monte Carlo Method for the Hydrogen Atom
"""
__author__ = "Eric Yeung"
np.random.seed(1337) # Seed the random generator
N = 500 # Number of Monte Carlo steps
h = 1.00 # Step-size
# Trial wave f... | [
"irq.ericyeung@hotmail.com"
] | irq.ericyeung@hotmail.com |
7afb6eecd72e57e46ca4a087ac770ba2cd5abd4c | 21d64ff371bdbabb6b6b1718fa201a179078db37 | /venv/Scripts/pip3-script.py | 71adad1637331445c7cbe297a3c5a320af0fb3e6 | [] | no_license | Puneeth456/Patterns | 5aae7b55fea8b87849ad2bba0a876d0c5fd85d50 | 8c8e8dbe073af707ed8c9617f9e306f60d4715ad | refs/heads/master | 2020-06-09T00:45:20.316202 | 2019-06-23T10:58:44 | 2019-06-23T10:58:44 | 193,336,772 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 425 | py | #!"C:\Users\Admin\PycharmProjects\Printing Patterns\venv\Scripts\python.exe"
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==19.0.3','console_scripts','pip3'
__requires__ = 'pip==19.0.3'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '... | [
"shivanpuneeth50@gmail.com"
] | shivanpuneeth50@gmail.com |
f3bd2c6c4b7f508049185cc119fddfa10307f9e1 | e8e1dbb34f9e51e21d0ff35e37075983b21ffa54 | /migrations/versions/8d32dac5d61e_.py | 84992a78af5b5fd51c4e685b8a8380bd9fa56aed | [
"Apache-2.0"
] | permissive | zhengjiani/PageOs | a109eda61fcbea62e42bc381817d0825cae1d12a | 842125c1171cccb753e18475671dfce2bd12f04b | refs/heads/v1 | 2022-12-09T00:35:59.889191 | 2020-06-03T22:47:47 | 2020-06-03T22:47:47 | 187,166,996 | 1 | 0 | Apache-2.0 | 2022-12-08T07:12:28 | 2019-05-17T07:19:59 | HTML | UTF-8 | Python | false | false | 1,209 | py | """empty message
Revision ID: 8d32dac5d61e
Revises:
Create Date: 2020-03-01 13:14:52.673434
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '8d32dac5d61e'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto gene... | [
"936089353@qq.com"
] | 936089353@qq.com |
efbd92e067e4eb040811cdf12b2649087c15bf7c | 89b7b6375226e5224321e8e467b1047830bd2073 | /medium/binaryGap.py | 7a1be1fe8a86ef9e1419c8f64dc08aed746e5676 | [] | no_license | xiao-bo/leetcode | 9cf5ec1dd86faa699f51b3a616929da4ebdb3053 | 671383b9ee745ed84fbb6d76a91d8be353710096 | refs/heads/master | 2023-03-18T19:10:28.990610 | 2023-03-11T10:11:43 | 2023-03-11T10:11:43 | 154,341,943 | 0 | 0 | null | 2023-03-11T10:11:44 | 2018-10-23T14:24:15 | Python | UTF-8 | Python | false | false | 715 | py | # you can write to stdout for debugging purposes, e.g.
# print("this is a debug message")
import math
def solution(N):
# write your code in Python 3.6
pow2 = set([int(math.pow(2,x)) for x in range(0,32)])
s = bin(N).split("b")
maxLen = 0
tmp = 0
if N in pow2 or N+1 in pow2:
ret... | [
"ay852852@gmail.com"
] | ay852852@gmail.com |
e074f845887265bc52c662210437e564ecf07c37 | 6eb5a0cd216e721d830e02bb812099521cf9a0f4 | /src/nowcoder/nowcoder2.py | 64cc999430189fe7dff2b8b56a16870d4d77e088 | [
"Apache-2.0"
] | permissive | Peefy/PythonsWithVSCode | e98c8196c8e0810dc0069982a18933f09269ccef | 711e710d2903e056ffe2ff22e279b86bd950a925 | refs/heads/master | 2022-10-20T18:50:26.724517 | 2020-06-09T08:27:36 | 2020-06-09T08:27:36 | 110,962,209 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 465 | py | import sys
IS_TEST_DATA = False
if IS_TEST_DATA == True:
datas = '[2.2 1]'
else:
datas = sys.stdin.readline()
if datas is not None and len(datas) > 2:
datas = datas[1:len(datas) - 1]
nums = datas.split()
for i in range(len(nums)):
if '.' not in nums[i]:
nums[i] = int(nums[i])
... | [
"xpf6677@163.com"
] | xpf6677@163.com |
baa5abb07b94b19ed746b4bb9c3bd4d606f90590 | b8fa6e0a088c371b7dc69001d2ac745c960601ca | /Exercicios/secao07_colecoes_python_parte1/exercicio30.py | e27dc52f668725a762e1f2fc6633ecb627d11d58 | [] | no_license | DanielMalheiros/geekuniversity_programacao_em_python_essencial | 45fb5265c8e0a4e8d435f8341f2b2eb23cfd3f73 | 0e4590defb2510ef71f4ce7039c29873f87d399f | refs/heads/master | 2020-08-05T20:05:04.765817 | 2019-10-09T01:20:35 | 2019-10-09T01:20:35 | 212,689,293 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 712 | py | """30- Faça um programa que leia dois vetores de 10 elementos. Crie um vetor que seja a intersecção
entre os 2 vetores anteriores, ou seja, que contém apenas os números que estão em ambos os vetores.
Não deve conter números repetidos."""
contador = 0
vetor1 = []
vetor2 = []
while contador < 10:
valor = int(input(... | [
"d.o.malheiros@gmail.com"
] | d.o.malheiros@gmail.com |
2bf8c3cf6babeb56c13c64003d0d20dbc0f667cd | fcd813cbf52e017b2724311e7d29c95956e1ec3c | /codes/room_backup.py | 093e45f0750766fa88374ff00e1b8efbdc14549f | [] | no_license | laky55555/metaheuristike | ec6b55e11fc901491db6e1c35688afa56a3836bb | fa82856435e766ee19fe70be778564bf41e35813 | refs/heads/master | 2021-01-13T15:09:39.447779 | 2017-03-06T17:53:28 | 2017-03-06T17:53:28 | 76,258,863 | 0 | 1 | null | 2017-01-22T14:14:25 | 2016-12-12T13:30:24 | Python | UTF-8 | Python | false | false | 3,056 | py | import sys
from PyQt5.QtWidgets import (QMainWindow, QTextEdit, QAction,
QFileDialog, QApplication, QDesktopWidget, QMessageBox, QGridLayout,
QHBoxLayout, QVBoxLayout, QStackedWidget, QWidget, QPushButton, QLabel,
QLineEdit, QPushButton, QInputDialog, QDialog, QDateTimeEdit,
QSpinBox, QDialogButtonBo... | [
"laky55555@gmail.com"
] | laky55555@gmail.com |
6577f49d734788b433945e091fc00e1ec6bc370c | 8015709e5379e8877edefdfe114ecdbe8e48865a | /ecommerce/urls.py | 0ffa48b95e70b262e4d76fae3706ad018c5b9160 | [] | no_license | royerguerrero/ecommerce-api | 93a4f1f3cb093f59f094ff1008a0b8c92b16c1cc | c93e3f4d8a587f22a51b0aee526abf479beff40f | refs/heads/master | 2023-01-28T07:54:42.136886 | 2020-12-07T02:19:08 | 2020-12-07T02:19:08 | 318,850,880 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 828 | py | from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import path
import store.views
import store.api_views
urlpatterns = [
path('api/v1/products/', store.api_views.ProductList.as_view()),
path('api/v1/products/new/', store.api_views.Prod... | [
"royjuni3431@gmail.com"
] | royjuni3431@gmail.com |
5473c5b2eceda8390d2a863e7e715edf7a2c7156 | d5ba475a6a782b0eed5d134b66eb8c601c41421c | /terrascript/resource/oneandone.py | 14d29f17eeae42e0f43215f61b242df1f6835f38 | [
"BSD-2-Clause",
"Python-2.0"
] | permissive | amlodzianowski/python-terrascript | ab42a06a5167e53ad8093b656a9bf14a03cb031d | 142b1a4d1164d1012ac8865d12fdcc72f1e7ae75 | refs/heads/master | 2021-05-19T11:59:47.584554 | 2020-03-26T07:13:47 | 2020-03-26T07:13:47 | 251,688,045 | 0 | 0 | BSD-2-Clause | 2020-03-31T18:00:22 | 2020-03-31T18:00:22 | null | UTF-8 | Python | false | false | 1,150 | py | # terrascript/resource/oneandone.py
import terrascript
class oneandone_server(terrascript.Resource):
pass
class oneandone_firewall_policy(terrascript.Resource):
pass
class oneandone_private_network(terrascript.Resource):
pass
class oneandone_public_ip(terrascript.Resource):
pass
class oneando... | [
"markus@juenemann.net"
] | markus@juenemann.net |
840f10a82889ba98585ecf259d2f7564aa9e4d77 | f27a0f1a63c2c791d2ab5a3b0d180a50420b8531 | /TSP_US.pyde | 64db6c79b2220ffc39f3e6e4bd47d799885cc3ab | [] | no_license | hackingmath/Traveling-Salesperson | 4fb5fd0c33cd3959ea6da71641c8faa070a88fbb | e83e57285bd16d6f0214158dc3caec20ea1e8aa8 | refs/heads/master | 2021-01-20T05:12:46.872134 | 2018-05-17T21:27:53 | 2018-05-17T21:27:53 | 89,759,274 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 6,172 | pyde | '''TSP with state capitals
5/7/17
'''
import random
import urllib
url = 'http://peterf.coderbootcamp.org/capitals.txt'
statedata = urllib.urlopen(url).read().split()
cities = [];
totalCities = 48;
population_size = 5000
nums = [x for x in range(totalCities)]
mutationRate = 0.02
first = True #the first "best" route
... | [
"noreply@github.com"
] | hackingmath.noreply@github.com |
227ab219312435421e3ac8e59b1843f6bcc2eaf3 | 7f88cff95ea5e6f049f73b2646038e90f8eeee7c | /Game/models.py | 82ba0c8cae7a80b1a35c1c1976218e0135e93493 | [] | no_license | arecker/Diplomacy | a2fe2806571dad1560322c3ffe53e9c70860875e | 3ac6ce4ef20b64ffe618eaf41cdce6d19e87f1f8 | refs/heads/master | 2020-05-19T11:55:26.421119 | 2014-09-08T04:52:02 | 2014-09-08T04:52:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,322 | py | from django.db import models
import markdown2
class PlayerManager(models.Manager):
def get_players_waiting(self):
return Player.objects.filter(waiting=True)
def get_percentage_moved(self):
try:
total = Player.objects.count()
moved = Player.objects.filter(waiting=False... | [
"alex@reckerfamily.com"
] | alex@reckerfamily.com |
402352b706aaaae254160b00e4ca77f38ff87a65 | 0d2f636592dc12458254d793f342857298c26f12 | /9-7.py | 0702acfa0f9366b0ec17883b9e472f212684660f | [] | no_license | chenpc1214/test | c6b545dbe13e672f11c58464405e024394fc755b | 8610320686c499be2f5fa36ba9f11935aa6d657b | refs/heads/master | 2022-12-13T22:44:41.256315 | 2020-09-08T16:25:49 | 2020-09-08T16:25:49 | 255,796,035 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 679 | py | travel = {'張家界':{'state':'湖南省',
'attraction':'天門山, 大峽谷'},
'九寨溝':{'state':'四川省',
'attraction':'熊貓海, 箭竹海'},
'黃山':{'state':'安徽省',
'attraction':'天都峰, 蓬萊三島'},
'武夷山':{'state':'福建省',
'attraction':'天遊峰, 桃源洞'},
... | [
"kkbuger1523@gmail.com"
] | kkbuger1523@gmail.com |
c1b736468affe7690811ee62053f1c5258e367bd | 6c6d4f56d1bbf0a2f301a3794fa0c09268d70ba6 | /setup.py | 05a390d8c66f63d2a9a372eb4acf28c924d7ba29 | [
"BSD-3-Clause"
] | permissive | samara0/plotchecker | 9ecf9f9fc58bc7efbac24d92f1104e962e09f956 | 04ea362b35b3d18685a816895950dddc68c97d2a | refs/heads/master | 2023-05-30T19:14:18.921066 | 2018-02-17T19:21:54 | 2018-02-17T19:21:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,813 | py | import argparse
import sys
import subprocess as sp
import warnings
def install_flit():
sp.check_call([sys.executable, '-m', 'pip', 'install', 'flit', 'mock'])
def install_plotchecker(symlink):
from pathlib import Path
from flit.install import Installer
from flit.log import enable_colourful_output
... | [
"jhamrick@berkeley.edu"
] | jhamrick@berkeley.edu |
c8f1537a78175b806ad036e5479e885772e7603d | 6188f8ef474da80c9e407e8040de877273f6ce20 | /examples/docs_snippets/docs_snippets/intro_tutorial/basics/testing/custom_types_test.py | 0798aa5c0fc5b68efed84afb81285ad163a4c4dd | [
"Apache-2.0"
] | permissive | iKintosh/dagster | 99f2a1211de1f3b52f8bcf895dafaf832b999de2 | 932a5ba35263deb7d223750f211c2ddfa71e6f48 | refs/heads/master | 2023-01-24T15:58:28.497042 | 2023-01-20T21:51:35 | 2023-01-20T21:51:35 | 276,410,978 | 1 | 0 | Apache-2.0 | 2020-07-01T15:19:47 | 2020-07-01T15:13:56 | null | UTF-8 | Python | false | false | 3,046 | py | import csv
import os
import typing
from dagster import (
DagsterType,
Failure,
Field,
String,
check_dagster_type,
dagster_type_loader,
job,
op,
)
def less_simple_data_frame_type_check(_, value):
if not isinstance(value, list):
raise Failure(
"LessSimpleDataFram... | [
"noreply@github.com"
] | iKintosh.noreply@github.com |
79472ea67d54fdba550ead67bbbba0109090f436 | 7cd1222a2f2fbe6ab2dc841304caf8b229f61e04 | /292_Nim Game.py | 06f8c90bce1811df07938463f8ac3c1efe1e2c11 | [] | no_license | tainenko/LeetCode | 7e2cfeca71c2a839f9dcd9aa66b0b6d4f614b578 | 89c45b1ee30884abd7ef5ccf0eef15af295e533c | refs/heads/master | 2021-09-10T13:58:22.561649 | 2018-03-27T11:27:06 | 2018-03-27T11:27:06 | 124,998,058 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 875 | py | '''
You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 stones. The one who removes the last stone will be the winner. You will take the first turn to remove the stones.
Both of you are very clever and have optimal strategies... | [
"31752048+tainenko@users.noreply.github.com"
] | 31752048+tainenko@users.noreply.github.com |
b8bc709e5e904525c34ed4fa83f55809b072c55e | 6312ae52fb81f68ca80ad5c607148d011052850d | /sos_reports/wizard/general/report_post_ledger.py | 3b41f74283269d62dfb0f35e8242e6f274726f12 | [] | no_license | cokotracy/sos_guards | e88b95026185aaf1d622b223d39afd5e60a60ee9 | 84242b484cbd9a4296d3083747b4e31f2ebb3e73 | refs/heads/master | 2022-06-14T05:36:27.971635 | 2019-10-07T07:01:58 | 2019-10-07T07:01:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,317 | py |
from openerp import api, fields, models
from datetime import datetime
from dateutil import relativedelta
import pdb
class post_ledger(models.TransientModel):
_name = 'account.post.ledger'
_description = 'Account Post Ledger'
@api.model
def _get_post_ids(self):
if self._context.get('active_model', False) == 's... | [
"sarfraz_g2009@yahoo.com"
] | sarfraz_g2009@yahoo.com |
e667d2b27fba6bd0a129c33ab7a854832775a228 | b697f5d8e441328c2deee1bb5853d80710ae9873 | /1295.统计位数为偶数的数字.py | 70ad95a622cb87159760ade3c99f5ccb981c4dd3 | [] | no_license | happy-luck/LeetCode-python | d06b0f6cf7bad4754e96e6a160e3a8fc495c0f95 | 63fc5a1f6e903a901ba799e77a2ee9df2b05543a | refs/heads/master | 2021-03-22T16:12:52.097329 | 2020-07-15T13:48:37 | 2020-07-15T13:48:37 | 247,381,313 | 0 | 0 | null | 2020-03-15T01:47:42 | 2020-03-15T01:28:38 | null | UTF-8 | Python | false | false | 866 | py | class Solution:
def findNumbers(self, nums: List[int]) -> int:
res = 0
for num in nums:
tar = 0
while(num != 0):
num = num // 10
tar += 1
if tar%2==0:
res += 1
return(res)
方法一:枚举 + 字符串
class Solution:
d... | [
"18813129242@163.com"
] | 18813129242@163.com |
854a207d556313c1e8e5a6c219dfce3d7d3f3f77 | 585bac463cb1919ac697391ff130bbced73d6307 | /200_NumberofIslands/solution3.py | a11b5b690045e47f7c99e810411d07d9e851ddfa | [] | no_license | llgeek/leetcode | ce236cf3d3e3084933a7a4a5e8c7766f7f407285 | 4d340a45fb2e9459d47cbe179ebfa7a82e5f1b8c | refs/heads/master | 2021-01-22T23:44:13.318127 | 2020-03-11T00:59:05 | 2020-03-11T00:59:05 | 85,667,214 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,527 | py | #retry the solution
class Solution:
def numIslands(self, grid):
"""
:type grid: List[List[str]]
:rtype: int
"""
def nonzeroIndex(grid):
for i, row in enumerate(grid):
for j, ele in enumerate(row):
if ele == '1':
... | [
"angleflycll@gmail.com"
] | angleflycll@gmail.com |
a51e5727dbaa73c11551983c584686cacd287368 | 976d24924655e8b908ac95ea28a149cfd4b22062 | /util/describe_experiment.py | 89dccf8e5611f94a713a8bdf837b691b9093ff20 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | tuetschek/ratpred | bb827b9d8155b4b1a33cc9d8d419bde4dca5ecf7 | 1a4eba35fbf29919353d47fd5c2d8dce60572680 | refs/heads/master | 2020-06-26T02:31:57.797434 | 2019-10-11T16:42:35 | 2019-10-11T16:42:35 | 74,603,112 | 9 | 0 | null | 2017-09-08T12:26:37 | 2016-11-23T18:22:01 | Python | UTF-8 | Python | false | false | 4,777 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from argparse import ArgumentParser
import codecs
import yaml
import re
def main(args):
iters, training_set, run_setting, nn_shape = '', '', '', ''
with codecs.open(args.config_file, ... | [
"odusek@ufal.mff.cuni.cz"
] | odusek@ufal.mff.cuni.cz |
c125981955ba8dfeecf048750539f048c94ea46f | 6915b959a36273b1e4cd3d99faa0df8058b35726 | /Python/good_downloadandread_marketvalue_barclaysaggregate.py | 50d0c39507b0930ce9070b0281b57816431deb5b | [] | no_license | rtstock/WebScrapeStockMarketIndexes | 77c0d444a4294caac977629740f9f31a2c1e541f | e13f1c81095b9d691b07dcd5784ac8b40ab92f8b | refs/heads/master | 2020-12-30T09:26:04.002635 | 2017-08-15T18:57:16 | 2017-08-15T18:57:16 | 100,405,226 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,427 | py | '''
# Notes
Downloads last 5 days of Barclays data from lehman via ftp
'''
#################################################################################
download_last_x_days = -5
#################################################################################
from ftplib import FTP
import os, os.path... | [
"noreply@github.com"
] | rtstock.noreply@github.com |
c7e6a7fb836c3131cb3c6bf016d4aeac30949ceb | 8e6546515c8094f2df7fca4be343b57a1716257a | /tests/algorithms/boltzmann_machine/test_bernoulli_rbm.py | b19883f419422999c077a8386d4bdf928d11d1c4 | [
"MIT"
] | permissive | FGDBTKD/neupy | b51e5870ef75df8aa3dcfb6753648a235f39e50b | 1f5e1ae9364e8c7816df79678a4648c689d2a5d1 | refs/heads/master | 2020-03-31T13:32:57.099935 | 2018-10-29T15:52:19 | 2018-10-29T15:52:19 | 152,260,277 | 0 | 0 | MIT | 2018-10-29T15:52:20 | 2018-10-09T13:56:16 | Python | UTF-8 | Python | false | false | 3,995 | py | import pickle
import theano
import numpy as np
from neupy import algorithms
from base import BaseTestCase
class BernoulliRBMTestCase(BaseTestCase):
def setUp(self):
super(BernoulliRBMTestCase, self).setUp()
self.data = np.array([
[1, 0, 1, 0],
[1, 0, 1, 0],
[... | [
"mail@itdxer.com"
] | mail@itdxer.com |
d49286778a919bc6d737494e4ab89f005ab05c73 | 50948d4cb10dcb1cc9bc0355918478fb2841322a | /azure-mgmt-network/azure/mgmt/network/v2018_10_01/models/endpoint_service_result_paged.py | 5faa5b219f0eed2a544ca48baa25fb0f1a08d704 | [
"MIT"
] | permissive | xiafu-msft/azure-sdk-for-python | de9cd680b39962702b629a8e94726bb4ab261594 | 4d9560cfd519ee60667f3cc2f5295a58c18625db | refs/heads/master | 2023-08-12T20:36:24.284497 | 2019-05-22T00:55:16 | 2019-05-22T00:55:16 | 187,986,993 | 1 | 0 | MIT | 2020-10-02T01:17:02 | 2019-05-22T07:33:46 | Python | UTF-8 | Python | false | false | 997 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | [
"lmazuel@microsoft.com"
] | lmazuel@microsoft.com |
dbdbedc7b53a51f244f02db22675d7029a75762a | b766a3df5bc61da27c736b4df0d8350ca73f43e2 | /api/tests/opentrons/protocol_engine/resources/test_deck_data_provider.py | 0ae5e69064a47de4e264940611a6a8612693dc88 | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | Corey-ONeal/opentrons-app_ws-remote | e771005badf0037f2a295838202072cbfae99ebd | a255b76c8a07457787d575da12b2d5bdb6220a91 | refs/heads/master | 2023-06-17T02:12:37.177932 | 2021-07-07T12:28:20 | 2021-07-07T12:28:20 | 383,791,062 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,119 | py | """Test deck data provider."""
import pytest
from mock import AsyncMock # type: ignore[attr-defined]
from opentrons_shared_data.deck.dev_types import DeckDefinitionV2
from opentrons.protocols.models import LabwareDefinition
from opentrons.types import DeckSlotName
from opentrons.protocol_engine.types import DeckSlot... | [
"corey.o'neal@opentrons.com"
] | corey.o'neal@opentrons.com |
7de12d0e4675d4e3932ffd46b4b67aca2a04751b | 395cabaa64a3a823a74e0dc52dd801cb7846d6df | /fluids/compressible.pyi | 84f3d43826f181b193e9687a6cda44716821891d | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | CalebBell/fluids | 883e28aae944e0f55cdc4e759edf9868714afebb | 837acc99075f65060dfab4e209a72dff4c4fe479 | refs/heads/master | 2023-09-01T07:53:27.386513 | 2023-08-19T23:49:01 | 2023-08-19T23:49:01 | 48,924,523 | 298 | 85 | MIT | 2023-06-06T05:11:12 | 2016-01-02T21:31:10 | Python | UTF-8 | Python | false | false | 5,698 | pyi | # DO NOT EDIT - AUTOMATICALLY GENERATED BY tests/make_test_stubs.py!
from __future__ import annotations
from typing import List
from typing import (
Optional,
)
def Fritzsche(
SG: float,
Tavg: float,
L: Optional[float] = ...,
D: Optional[float] = ...,
P1: Optional[float] = ...,
P2: Optiona... | [
"Caleb.Andrew.Bell@gmail.com"
] | Caleb.Andrew.Bell@gmail.com |
d5aed1d7513dcd0755a3685310e6c286a2aed042 | e722e3ef6bf041a71f2f3814fb8d9da42c36e4c9 | /schemas/cartsystem.py | c8c93cc67f87da2e4b3a6374e42d80fa6b8899d7 | [] | no_license | vincycode7/maistore-api | 1dfa83f3be6390948971309cab517209e2e08820 | 29207505f463a2f28a03aa6cca21e58070b76975 | refs/heads/master | 2023-07-17T05:04:35.991141 | 2021-08-11T16:13:51 | 2021-08-11T16:13:51 | 295,108,899 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 290 | py | from ma import ma
from models.cartsystem import CartSystemModel
class CartSystemSchema(ma.SQLAlchemyAutoSchema):
class Meta:
model = CartSystemModel
# load_only = ("password",)
dump_only = ("id",)
include_fk = True
include_relationships = True
| [
"akinwandegbengavincent@gmail.com"
] | akinwandegbengavincent@gmail.com |
01dadecceb2fb873f9f1af980693848ff4ae2a5f | 430f3abfe3c90f18b48276c2a433066801a4c5c1 | /LeetCode/src/RotateImage.py | d0e878839b0482081fd1c9cf644e9adaf62438fa | [] | no_license | jinwei15/java-PythonSyntax-Leetcode | ba689294c5309d322b6ddb8e84f98c4e659cfeb7 | f6df35359b223cdd1635c287455032ae1463906f | refs/heads/master | 2020-06-14T14:58:48.626291 | 2019-07-03T12:22:20 | 2019-07-03T12:22:20 | 195,033,815 | 0 | 0 | null | 2019-07-03T10:40:50 | 2019-07-03T10:40:49 | null | UTF-8 | Python | false | false | 1,355 | py | # You are given an n x n 2D matrix representing an image.
# Rotate the image by 90 degrees (clockwise).
# Note:
# You have to rotate the image in-place, which means you have to modify the input 2D matrix directly. DO NOT allocate another 2D matrix and do the rotation.
# Example 1:
# Given input matrix =
# [
# [... | [
"janviezhang14@gmail.com"
] | janviezhang14@gmail.com |
d9afeea91aaad4c5efc5cfa01c008192513b2e18 | efd471380d976614667e56c92f0aed671371fc63 | /All Programs/Map and Lambda Function.py | d3cbb4330778836fa3fc73732824915a0e13c0ae | [] | no_license | anshumanairy/Hacker-Rank | 39af46e76182d34637340d1755aff4afd7820083 | 6fef4c6a415422d9379232932358e4ee7430a6af | refs/heads/master | 2021-07-04T07:41:37.769152 | 2020-10-12T05:49:24 | 2020-10-12T05:49:24 | 181,359,750 | 2 | 2 | null | 2020-10-12T05:49:25 | 2019-04-14T19:38:18 | Python | UTF-8 | Python | false | false | 231 | py | #!/usr/bin/env python
# coding: utf-8
# In[3]:
def func():
N=int(input())
a=0
b=1
c=1
list1=[a]
for i in range(1,N):
list1.append(c**3)
c=a+b
a=b
b=c
func()
# In[ ]:
| [
"anshuman.airy04@gmail.com"
] | anshuman.airy04@gmail.com |
da4e6e3c4cdc2a1f151dec4d4843e4cf380e1fa5 | a18e71848a887f7e1bc9bdbe73988e84c29f91fc | /2020_04_23_datascience.py | ee0110aac651076c625c77c3dadb829361f5ca15 | [] | no_license | yksoon/Python2 | 10b533d0900c21a4b5e4be31e2d901371b94e074 | e6a784e7e2ebfb52f1092ef143bbe09de4886634 | refs/heads/master | 2021-06-02T08:13:49.993604 | 2020-04-27T05:24:25 | 2020-04-27T05:24:25 | 254,319,260 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,012 | py | import pandas as pd
import numpy as np
# CCTV 데이터와 인구 데이터 합치고 분석하기
CCTV_Seoul = pd.read_csv('./data/01. CCTV_in_Seoul.csv', encoding='utf-8')
CCTV_Seoul.head()
CCTV_Seoul.columns
CCTV_Seoul.columns[0]
# 컬럼명 변경 : 기관명을 구별로 변경
CCTV_Seoul.rename(columns={CCTV_Seoul.columns[0] : '구별'}, inplace=True)
CCTV_Seoul.head()
#... | [
"ksyong1990@gmail.com"
] | ksyong1990@gmail.com |
40f2400f25b08613770e9506b402b66332a43a93 | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_350/ch20_2019_08_24_22_24_38_593883.py | 6296bc19a3b91f5db0cb8355f85cfa191c1dcef8 | [] | no_license | gabriellaec/desoft-analise-exercicios | b77c6999424c5ce7e44086a12589a0ad43d6adca | 01940ab0897aa6005764fc220b900e4d6161d36b | refs/heads/main | 2023-01-31T17:19:42.050628 | 2020-12-16T05:21:31 | 2020-12-16T05:21:31 | 306,735,108 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 131 | py | def diga_o_seu_nome(x):
x= input("qual seu nome?")
if x=="Chris":
return "Todo mundo odeia o Chris"
| [
"you@example.com"
] | you@example.com |
5c5ed588c1b67823996e720dd2820524d4e39644 | 31e32761e3572f8adeb690053ebfcc26390a87b5 | /leetcode/valid_bst.py | 6b11f3faaa798223bc7fd8a3f4df89eea18c6801 | [] | no_license | sanshitsharma/pySamples | 738b95c758d65e3360f3ee7221591d7b78c7ba1d | ce06f1e38e0c7a142af26e8883c81b7a5dfc7edc | refs/heads/master | 2021-06-05T19:01:40.279148 | 2021-02-02T21:52:31 | 2021-02-02T21:52:31 | 110,218,258 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,633 | py | #!/usr/bin/python
'''
Problem #98: Validate BST
Given a binary tree, determine if it is a valid binary search tree (BST).
Assume a BST is defined as follows:
The left subtree of a node contains only nodes with keys less than the node's key.
The right subtree of a node contains only nodes with keys greater than the ... | [
"sansshar@cisco.com"
] | sansshar@cisco.com |
e0c6424f09eaf8689b79aad1bed2b3360b1bb645 | 530bc8410be2cc8c1d3799a752a1e9e7daad2722 | /models/end_layer.py | dbb5e6c5f9190a278583f25204a5107e7d313180 | [
"BSD-3-Clause"
] | permissive | SunHaoOne/spc2 | d379f46bcdb496b4338bad403bb5d90701a62603 | 244b7f0c6c9d5de60c85f4581370e0560d7d7907 | refs/heads/master | 2023-03-09T09:52:50.583426 | 2021-02-27T03:18:29 | 2021-02-27T03:18:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,627 | py | import torch.nn as nn
import torch.nn.functional as F
from utils.util import weights_init
class end_layer(nn.Module):
def __init__(self, args, in_channels, out_dim, activate=None):
super(end_layer, self).__init__()
self.args, self.activate = args, activate
self.conv1 = nn.Conv2d(in_channe... | [
"you@example.com"
] | you@example.com |
39ad207e3941197d621a3d66a4310fc678607bdb | 5502a1403120233dae2af88872395dec529add82 | /ex13.py | 1dd55643012f98a587be9f26171b2532a87d0fd0 | [] | no_license | alicejang08/sandbox | 479d08fe8201b61771a83a80bd75fa0c84f21b56 | 564f659289e0606f4dc2da411a9f25106f72a81d | refs/heads/master | 2020-03-25T03:07:53.314080 | 2019-01-02T12:03:04 | 2019-01-02T12:03:04 | 143,324,344 | 0 | 0 | null | 2019-01-02T12:03:05 | 2018-08-02T17:15:05 | Python | UTF-8 | Python | false | false | 290 | py | from sys import argv
script, first, second, third, forth = argv
a = raw_input("The script is called:"), script
print "Your first variable is:", first
b = raw_input("Your second variable is:"), second
c = raw_input("Your third variable is:"), third
print "Your forth variable is:", forth
| [
"you@example.com"
] | you@example.com |
f77d043edf053934f167e69c17255a4aadb9178e | 9d64b4ca21171e432fd7c061608bcaa2e7cdb3d3 | /setup.py | 90ab4e5320118d770ab1ad45f3e12a69319a2b10 | [
"MIT"
] | permissive | MacHu-GWU/crawlib2-project | b3f69bad671338787762f080c577fffe4c089fd0 | 618d72522d5b36d40607b53b7de7623976460712 | refs/heads/master | 2020-05-05T06:18:41.943523 | 2019-05-21T03:31:55 | 2019-05-21T03:31:55 | 179,783,249 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,245 | py | # -*- coding: utf-8 -*-
"""
The setup script is the centre of all activity in building, distributing,
and installing modules using the Distutils. It is required for ``pip install``.
See more: https://docs.python.org/2/distutils/setupscript.html
"""
from __future__ import print_function
import os
from datetime import... | [
"husanhe@gmail.com"
] | husanhe@gmail.com |
ce8d4fbfc7e9ebb7fc4535352997a66343641a60 | 181f82b21dbfb296b2bab9a3616ca6ca6e93094d | /mifs/version.py | 4e2cd5b492bda94a41baacb5d954f178dd8a5467 | [
"BSD-3-Clause"
] | permissive | sumansaha66/mifs | a565c46a9b3410db834a780850837a116cdacd09 | d454eed141444e92252eb8884de7c32c8bd2b014 | refs/heads/master | 2021-07-12T08:38:19.701012 | 2020-07-09T08:07:35 | 2020-07-09T08:07:35 | 179,632,798 | 0 | 0 | BSD-3-Clause | 2019-04-05T06:53:16 | 2019-04-05T06:53:16 | null | UTF-8 | Python | false | false | 3,686 | py | """
``mifs`` is a Parallelized Mutual Information based Feature Selection module.
"""
# Based on NiLearn package
# License: simplified BSD
# PEP0440 compatible formatted version, see:
# https://www.python.org/dev/peps/pep-0440/
#
# Generic release markers:
# X.Y
# X.Y.Z # For bugfix releases
#
# Admissible pre-release... | [
"glemaitre@visor.udg.edu"
] | glemaitre@visor.udg.edu |
e24355223fe1fc5c770c92b2277f87a1d4f9c8ea | 826bffcd468f0979d05251e6578de13fff1029d4 | /madoka/dataflow/random.py | 8b8a8e1e1d3b71c9759259173613b81e4241ddbf | [
"MIT"
] | permissive | korepwx/madoka | 58b9b65cb1e3edf476d741ee1b5ffc67a9793a48 | 56675bd8220935c6a9c1571a886a84bed235fd3b | refs/heads/master | 2021-01-12T03:18:46.261909 | 2017-01-06T06:36:21 | 2017-01-06T06:36:21 | 78,190,020 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,477 | py | # -*- coding: utf-8 -*-
import numpy as np
from madoka.utils import INT32_MAX_VALUE
from .subset import _IndexedDataFlow
__all__ = []
class _BaseShuffledDataFlow(_IndexedDataFlow):
def __init__(self, origin):
super(_BaseShuffledDataFlow, self).__init__(
origin, self._make_random_indices(ori... | [
"public@korepwx.com"
] | public@korepwx.com |
fa3f3ea428025916c26d223d9a277c9f2cbc1934 | 781e2692049e87a4256320c76e82a19be257a05d | /all_data/exercism_data/python/rna-transcription/cc69ec22af574e3ca0f97895405c6531.py | 2fffd63f376c5f5f9f20889e2426892bfd3fcbda | [] | 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 | 262 | py | """
Rna Transcription
"""
def to_rna(dna_strand):
result = []
complements = {'G': 'C', 'C': 'G', 'T': 'A', 'A': 'U'}
for nucleotide in dna_strand:
result.append(complements[nucleotide])
return "".join(result)
| [
"rrc@berkeley.edu"
] | rrc@berkeley.edu |
b27ef91d9b6d2564f4d58b7aa2c043b78d019cd4 | 83df1fb88f7abba1198284bb4b8dc8d0a7ff6f93 | /src/third_party/catapult/perf_insights/perf_insights/mre/failure.py | f464d1fb9a8dfb74c7f4ed675879e5cde119a3ca | [
"BSD-3-Clause"
] | permissive | JamshedVesuna/telemetry | 7f3385399e47b7b98f8d3eec80ade43690956cd7 | 1697886b155f22a42e13aa311538f1db65e6e6ed | refs/heads/master | 2021-01-20T09:12:34.645395 | 2016-01-22T08:40:44 | 2016-01-22T08:40:44 | 47,851,831 | 3 | 2 | null | 2020-07-24T04:58:51 | 2015-12-11T21:25:59 | HTML | UTF-8 | Python | false | false | 1,145 | py | # Copyright 2015 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.
class Failure(object):
def __init__(self, job_guid, function_handle_guid, trace_guid,
failure_type_name, description, stack):
self.job... | [
"jamshed.vesuna@gmail.com"
] | jamshed.vesuna@gmail.com |
f1ecbbfa46adeb97b26f658fef2902682db6bf8c | 0fc2b08ff4214fbc53340009cbfae885718a8494 | /2016/15.py | 745e2d71bb109273ddb1563e294bd49a2528c520 | [] | no_license | matteosan1/AoC | c37170b19a95bb90d77187a672126c5df0c75c9e | 058dfc4f40fecf534c34f4c7339a39a0419b69a6 | refs/heads/master | 2023-01-27T15:56:38.533143 | 2023-01-10T21:45:06 | 2023-01-10T21:45:06 | 163,546,410 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 523 | py | def position(t, sectors, offset):
return (t+offset)%sectors == 0
part = 1
if part == 1:
discs = [(17, 1), (7, 0), (19, 2), (5, 0), (3, 0), (13, 5)]
else:
discs = [(17, 1), (7, 0), (19, 2), (5, 0), (3, 0), (13, 5), (11, 0)]
delay = 0
while True:
state = [position(delay+i+1, s, o) for i, (s,o) in enumer... | [
"matteosan1@gmail.com"
] | matteosan1@gmail.com |
774a45b7fd4408519f507b8255de516eba732bc1 | 98c6ea9c884152e8340605a706efefbea6170be5 | /examples/data/Assignment_8/gwgthe001/question4.py | 23396bcafd21c8441c6455b81ce482f9984593ec | [] | no_license | MrHamdulay/csc3-capstone | 479d659e1dcd28040e83ebd9e3374d0ccc0c6817 | 6f0fa0fa1555ceb1b0fb33f25e9694e68b6a53d2 | refs/heads/master | 2021-03-12T21:55:57.781339 | 2014-09-22T02:22:22 | 2014-09-22T02:22:22 | 22,372,174 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,383 | py | #Thembekani Gwegwana
# A program to find palindromic primes between two supplied numbers
#May 2014
import sys
sys.setrecursionlimit (30000)
#A fuction to check whether or not a number is a palindrome
def palindrome(string_no):
if len(string_no) <= 1 :
return ' Palindrome'
else :
if... | [
"jarr2000@gmail.com"
] | jarr2000@gmail.com |
80cfaf1b9419c5c6dbaabe8313ea0f2e81a97f81 | 4e8a55ff85a2aa26fbbf05bc9350028226dfde37 | /DProject/Manager/GasManager.py | 276900a561c7af29c19a1e82d8d241e54c3a3d2c | [] | no_license | DWaze/DisabledProject | dbb572fa47063011abc4f13e95c9e44ab24a5c55 | 6c16269c7722503226ba500d0216dc373ffad867 | refs/heads/master | 2020-03-17T09:02:28.913809 | 2018-06-22T10:07:55 | 2018-06-22T10:07:55 | 133,458,886 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,932 | py | from DProject.Drivers import GasDetection, GasPrevention,rgb
from DProject.Models.Empty import Empty
from DProject.Models.StateHistory import StateHistory
from DProject.Models.ActionHistory import ActionHistory
from DProject.Models.Action import Action
from DProject.Models.Object import Object
from DProject.Models.Area... | [
"wazeproo@gmail.com"
] | wazeproo@gmail.com |
2f4f4a97e21e1a70bc00f93c1a91537a2337f00b | 64de9f2b66578000b733242ac9609ac5be4b181d | /plugin.video.doofree_old/resources/lib/sources/ororo_tv_null.py | ca3892706cc792c41d2b6a63c65b14907df563c8 | [] | no_license | mpie/repo | 8b3e7a0b66596d1deee5d4474299692076baf667 | 391eebf68fa2d4c8a37659e310c695459428bd0a | refs/heads/master | 2022-01-30T08:09:31.909089 | 2022-01-09T13:30:17 | 2022-01-09T13:30:17 | 34,678,785 | 7 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,065 | py | # -*- coding: utf-8 -*-
import re,urllib,urlparse
from resources.lib.libraries import control
from resources.lib.libraries import cleantitle
from resources.lib.libraries import client
class source:
def __init__(self):
self.base_link = 'http://ororo.tv'
self.sign_link = 'http://ororo.tv/users/sig... | [
"info@mpie.nl"
] | info@mpie.nl |
1351029e6ba334bc653cf8177eeff24a3bbf87b9 | 45dc7ea9f9fc029b67b3ed8d44fc85baa72dfd1d | /pandaspractice3.py | bf5df0c8267d6a9ab69b5664021551aec86ddeda | [] | no_license | OrhanCinar/python-practice | 18d9555b6f577b0c5697d96d6957fe4582dc61ad | 1cb9baf98c67e8bad82a0e9f16c981ca6a3a4440 | refs/heads/master | 2020-07-07T04:19:55.312006 | 2020-02-16T17:44:18 | 2020-02-16T17:44:18 | 203,246,178 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,154 | py | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
df = pd.read_csv("data/Minimum Wage Data.csv", encoding="latin")
gb = df.groupby("State")
gb.get_group("Alabama").set_index("Year")
act_min_wage = pd.DataFrame()
for name, group in df.groupby("State"):
if act_min_wage.empty:
... | [
"orhancinar35@gmail.com"
] | orhancinar35@gmail.com |
ff05e690230c86513703c1fb8fcbceec25c7e357 | fd7598754b87536d3072edee8e969da2f838fa03 | /chapter11_mean.py | 10a5f0fbfac6078e3f9635e6a86beb98d008f13b | [] | no_license | dorabelme/Python-Programming-An-Introduction-to-Computer-Science | 7de035aef216b2437bfa43b7d49b35018e7a2153 | 3c60c9ecfdd69cc9f47b43f4a8e6a13767960301 | refs/heads/master | 2020-05-02T23:19:44.573072 | 2019-03-28T21:27:20 | 2019-03-28T21:27:20 | 178,261,171 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,218 | py | from math import sqrt
def getNumbers():
nums = [] # start with an empty list
# sentinel loop to get numbers
xStr = input("Enter a number (<Enter> to quit) >> ")
while xStr != "":
x = float(xStr)
nums.append(x) # add this value to the list
xStr = input("Enter a number (<Enter> to quit) >> ")
return nums
... | [
"contact.dorabelme@gmail.com"
] | contact.dorabelme@gmail.com |
d663d76c5c931c569136ec2efdbea7063b3dc92a | ea522b496372174216fba2aad29bf231a28cc819 | /QuikLab/.svn/pristine/ad/add994053ea639268b892ba9c0755f5217721117.svn-base | 450b2a5b18b9a6c2df89cfee6754b721cf997f50 | [] | no_license | gatdotZF/svn192.168.1.5 | 15fdf074042b0a1e5e8c795d3c340080c04ba496 | 196bd4c83b12e3476c269057a4ef3b730a967d9e | refs/heads/master | 2020-07-26T17:45:16.259037 | 2019-09-16T06:36:35 | 2019-09-16T06:36:35 | null | 0 | 0 | null | null | null | null | GB18030 | Python | false | false | 3,459 | #! /usr/bin/env python
#coding=GB18030
from pywinauto import application
from pywinauto import mouse as ms
import auto_lib as pywin
import SendKeys
import time
import os
app=pywin.Pywin()
#添加客户端接口
def add_TCP_Client_Interface(window_name):
app.connect(window_name)
app._wait_child(window_name, u'添加接口', 'ready'... | [
"994430058@qq.com"
] | 994430058@qq.com | |
299670c49156b47f2ac4ac04f6003b88e17af891 | 69206c93927f9a60e8f02a1f8c743efdd1cf3039 | /rl/algorithms/ecritic_quantile.py | 32a2240b73aa711f19c2a1fbc9796299deb4acfb | [
"MIT"
] | permissive | Luck1ess/catalyst | b7a9f2ffb84669b7b0539ae46028dae5f9ce4296 | 2a4d18857e693ca1fb46ee28952b9db2f822ff50 | refs/heads/master | 2020-04-15T03:55:13.322065 | 2019-01-06T19:13:09 | 2019-01-06T19:13:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,039 | py | import torch
from catalyst.rl.algorithms.utils import quantile_loss
from catalyst.rl.algorithms.ecritic import EnsembleCritic, \
prepare_for_trainer as base_prepare_for_trainer, \
prepare_for_sampler as base_prepare_for_sampler
class QuantileEnsembleCritic(EnsembleCritic):
def _init(self, **kwargs):
... | [
"scitator@gmail.com"
] | scitator@gmail.com |
6a0e07725743e839675dc6bf12c78da00a3e23b8 | a0445714a6532a3b67d9b46af81b81462cd0dca8 | /sgf/dep_features.py | b809d7eb4a05e6c01d004e9c4e503bd23d51e817 | [] | no_license | shixing/SGF | 82d27d08458818b0c95106dfa43d34f28285156c | da8cae790fded4d0f03706c32e28299b28042ce3 | refs/heads/master | 2020-12-24T15:50:22.303722 | 2017-04-10T01:09:52 | 2017-04-10T01:09:52 | 31,988,461 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,464 | py | # the additional features that can be derived from DEP
# python penn_features.py s1 ../data/v5/penn/penn.txt
# abspos
# relpos
#
#
#
import re
import sys
import os
invalid_number = 12345
def abspos(fn,fnwords, to_print=True, relative=False):
f = open(fn)
fwords = open(fnwords)
p = re.compile(r'.+\(.... | [
"shixing19910105@gmail.com"
] | shixing19910105@gmail.com |
f76b8794972c2d777cfaaa82506aa9f477583d18 | 27448b3ca14ec3e33ea730a504f91b0031476d1b | /dpr/settings.py | 8e69531a9504e0719fc557a7f221207b80642f4c | [] | no_license | vineel2014/djg2018 | 10bcf8c39a21705dedd84d9fdd95589ffdbccf91 | 43797ce87d2afad3ab42407cc35ca28587a9ac49 | refs/heads/master | 2020-03-28T12:10:31.068387 | 2018-09-11T11:26:55 | 2018-09-11T11:26:55 | 148,275,486 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,259 | py | """
Django settings for dpr project.
Generated by 'django-admin startproject' using Django 2.1.1.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
import os
# Bui... | [
"vineel2006@gmail.com"
] | vineel2006@gmail.com |
c4ad82b0c06b34904a24bf81bd90c4f24178e29e | 0ca21d1d60bb9dbe70fb55b7ebace0510695d489 | /examples/blender/floating.py | 4fb57ec2b854325b1b0123341d07f097822d6858 | [
"Apache-2.0"
] | permissive | colinmford/coldtype | fa5cc65ac318ee22138857ea60d964ca4ecb8267 | 8462dbd5f65f3ef8f3cbc8662a866b7e20ec5985 | refs/heads/main | 2023-07-02T12:34:18.700566 | 2021-08-06T03:40:21 | 2021-08-06T03:40:21 | 393,237,997 | 0 | 0 | Apache-2.0 | 2021-08-06T03:35:41 | 2021-08-06T03:35:40 | null | UTF-8 | Python | false | false | 1,128 | py | from coldtype import *
from coldtype.blender import *
from noise import pnoise1
tilda = Font.Cacheable("~/Type/fonts/fonts/Tilda Grande.otf")
@b3d_animation(timeline=240)
def floating(f):
def square(x):
return (DP()
.record(StSt("Floating",
tilda, 500,
wght=f.ad... | [
"rob.stenson@gmail.com"
] | rob.stenson@gmail.com |
f428b07dd80d74f9ddbc899e8339d90b05e1ef5a | 52585c8d95cef15199c18ba1a76899d2c31329f0 | /04Python workbook/ch4function/randomPlate95.py | d314903851074fbfebf99ee1140b46f2ba34afd0 | [] | 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 | 677 | py | from random import randint
import string, random
def randomPlate():
result = ""
# for i in range(3):
# print(ord('A'),ord('z'))
# randomChar = chr(randint(ord('A'),ord('z')))
# print('randomChar=',randomChar)
# result = result + randomChar
result = ''.join(random.choice(string.ascii_lowercase) for x in r... | [
"greatabel1@126.com"
] | greatabel1@126.com |
0bc67a88a9c7aee1384386c5689247590868335c | 987697512ce9b8d7c29bfd2f18d5aec0261a6863 | /数组中的Kdiff数对.py | 0c7e5c644352563c8474638d72ea49ee19709314 | [] | no_license | Luckyaxah/leetcode-python | 65e7ff59d6f19312defdc4d4b4103c39193b198a | 2b9c78ba88e7bf74a46a287fb1914b4d6ba9af38 | refs/heads/master | 2023-06-05T12:15:31.618879 | 2021-06-22T13:05:30 | 2021-06-22T13:05:30 | 262,287,940 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,278 | py | class Solution:
def findPairs1(self, nums, k: int) -> int:
if k == 0:
nums1 = []
nums2 = []
for num in nums:
if num in nums1:
if num not in nums2:
nums2.append(num)
continue
el... | [
"math_leqi@163.com"
] | math_leqi@163.com |
b78bae86f5ffd69fd4781f956f00fb9f32fd7da0 | 33787153c4f85cb626cf16e0e4d40d5970df2871 | /reservation_system/order/models.py | 397334ae26349d123a3fbbfd126b8418bb81b361 | [] | no_license | nazaninsbr/E-Commerce-Website | 93e14576d69618f749d7fd6f19b6b1b989fa47a8 | 46bed8c58f4adac37dc4ddd881f57e694961b9b2 | refs/heads/master | 2021-09-22T14:20:56.940950 | 2018-09-11T05:01:23 | 2018-09-11T05:01:23 | 125,370,560 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,187 | py | from django.db import models
from shop.models import Product
class Order(models.Model):
first_name = models.CharField(max_length=60)
last_name = models.CharField(max_length=60)
email = models.EmailField()
address = models.CharField(max_length=150)
postal_code = models.CharField(max_length=30)
... | [
"nazanin.sabrii@gmail.com"
] | nazanin.sabrii@gmail.com |
9083a3f0201e37afba1d43d4a688e847d5da5ef6 | b9d7194bb50a01e7e56d19ba2f3c048084af54b5 | /_OLD_/predict.py | 80e1120aa367788daba2bbb51deb04fa6b11d7de | [] | no_license | BernardoGO/TCC---2017 | 099e72d788974446b58fe5f409a2df25e3613cc5 | 75025e095956624470c22d8f3118441d5c28bdd7 | refs/heads/master | 2018-12-04T10:53:07.809161 | 2018-09-06T04:59:30 | 2018-09-06T04:59:30 | 64,803,675 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,704 | py | from keras.models import load_model
import numpy as np
import cv2
from keras.preprocessing.image import ImageDataGenerator
from keras.models import Sequential
from keras.layers import Conv2D, MaxPooling2D
from keras.layers import Activation, Dropout, Flatten, Dense
from keras import backend as K
img_width, img_height =... | [
"bernardo.godinho.oliveira@gmail.com"
] | bernardo.godinho.oliveira@gmail.com |
feef9c5ba615b4b9dcecd7fff3e4cc41f64f93dd | fffb5df278f4818b920355348d9f1f33f61de963 | /class-03/demo/unpacking.py | dd96c762878d6dd2ee7731090735ab82e27569af | [] | no_license | AbrarAlzubaidi/amman-python-401d7 | c78f192a374e0fa67ec560fb5fcf562b293e8347 | cd9260f64831644b70ef2488a460335205576206 | refs/heads/main | 2023-09-05T18:35:12.798491 | 2021-11-16T10:56:24 | 2021-11-16T10:56:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 375 | py | def my_sum(*args):
result = 0
for x in args:
result += x
return result
if __name__=="__main__":
nums = {3,7,5,6}
print(my_sum(2,7,3,9,0,5))
print(my_sum(4,5))
print(my_sum(*nums))
def fun(*args):
# for arg in args:
# print(arg)
print(type(args))
fun(3,5,6,7,1,2,... | [
"ahmad.alawad.sf@gmail.com"
] | ahmad.alawad.sf@gmail.com |
c34bc82f488fd74b79bf6b81149aed1faecb3773 | f76862c7dfcc08a495927eae3f4a995e416b948c | /amulet_map_editor/programs/edit/api/ui/goto.py | fcf1b3f13fc706540abb09b08cf4be37332a3406 | [] | permissive | Ex-Ark/Amulet-Map-Editor | 0bc1e6ac07349736114ea80e6c3ee2233863366e | 24704b91749727e8bce25aecf41d39f4b0eba433 | refs/heads/master | 2023-03-02T23:06:46.201874 | 2021-02-14T12:31:59 | 2021-02-14T12:31:59 | 221,939,739 | 0 | 0 | MIT | 2019-11-15T14:26:14 | 2019-11-15T14:26:14 | null | UTF-8 | Python | false | false | 1,041 | py | from typing import Optional, Tuple
import wx
from amulet_map_editor.api.wx.ui.simple import SimpleDialog
def show_goto(
parent, x: float, y: float, z: float
) -> Optional[Tuple[float, float, float]]:
dialog = SimpleDialog(parent, "Teleport", wx.HORIZONTAL)
x_text = wx.StaticText(dialog, label="x:")
x ... | [
"james_clare1@yahoo.co.uk"
] | james_clare1@yahoo.co.uk |
6a56dcce6dac645ba2c5cfaa8bf796ae3e76e97c | 2ec9cb451cb00e2fa4e96d22c1ce1db4de10773c | /tensorflow/lite/python/lite_v2_test_util.py | 8b6d7ccb4c9c131d5335fd6a137d4ace33ecef96 | [
"MIT",
"Apache-2.0",
"BSD-2-Clause"
] | permissive | Rachelmorrell/tensorflow | 039ff0bdadaaba88e4e76899a0362e3029714019 | 035ce302db5ba917765d3fec658c195a2052c6a5 | refs/heads/master | 2023-08-31T00:39:54.988884 | 2021-10-26T18:28:49 | 2021-10-26T18:45:48 | 130,050,312 | 2 | 0 | Apache-2.0 | 2023-07-19T21:35:45 | 2018-04-18T11:12:45 | C++ | UTF-8 | Python | false | false | 7,114 | py | # Lint as: python2, python3
# Copyright 2019 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
#
... | [
"gardener@tensorflow.org"
] | gardener@tensorflow.org |
b3bcade2fca769788b045bfb1e740ad5268b5fc5 | 62ad045b6c28d3cf0784cb03ade9525a645a56fa | /mathutils/__init__.py | e99897d8ae9a0e916fec5fa68573728b91840ec2 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | tomasderner97/customutils2 | 7f6141a507135e0f1085af16f2ea768b9ae4d727 | 2ec561e39b2518f78ad71bfb37d72dfa20766a44 | refs/heads/master | 2020-07-14T21:21:09.372281 | 2019-08-30T15:17:52 | 2019-08-30T15:17:52 | 205,405,476 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,057 | py | from scipy.misc import derivative as _derivative
def partial_derivative(f, with_respect_to, arguments, n=1, dx=1e-6):
"""
Calculates partial derivative of function f(a1, a2, a3,...) with respect to
argument in position given by with_respect_to.
Parameters
----------
f : callable, N arguments... | [
"tomasderner97@gmail.com"
] | tomasderner97@gmail.com |
0f8b008b0ee111049eca990ff850be7d920c6639 | 07504838d12c6328da093dce3726e8ed096cecdb | /pylon/resources/enumerations/motor_state_t.py | 40f0280ee0a5a4b1fa53ba72796b407d4af8225c | [] | no_license | lcoppa/fiat-lux | 9caaa7f3105e692a149fdd384ec590676f06bf00 | 7c166bcc08768da67c241078b397570de159e240 | refs/heads/master | 2020-04-04T02:47:19.917668 | 2013-10-10T10:22:51 | 2013-10-10T10:22:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,816 | py | """motor_state_t standard enumeration type, originally defined in resource
file set standard 00:00:00:00:00:00:00:00-0."""
# Copyright (C) 2013 Echelon Corporation. All Rights Reserved.
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation fil... | [
"lcoppa@rocketmail.com"
] | lcoppa@rocketmail.com |
c7e584c8551c368bf818639b8406382e6846ab30 | 7419b605fb556490c45c431823420069fa52a9c5 | /tinned-django/fc/profile/__init__.py | d28d0212b6ac10e0eb7f8db45d0c7ba03dbeb8de | [] | no_license | wd5/tinned-django | 44665e000a83296f7df151c25c14e300fea8a4c9 | b6a6cd5561fab1de27f4896e307762dade14bfb2 | refs/heads/master | 2021-01-24T00:52:32.998516 | 2012-10-04T11:18:10 | 2012-10-04T11:18:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,592 | py | # -*- coding: utf-8 -*-
from django.conf import settings
from django.db.models.query import QuerySet
import copy
import logging
logger = logging.getLogger('debug')
if settings.DEBUG and settings.FIRELOGGER:
def fp(*args, **kwargs):
"""Выводит указанные аргументы в консоли FirePython. Принимает произволь... | [
"baryshev@gmail.com"
] | baryshev@gmail.com |
feb8905f936950d1a0a235405b93b8b1e5821e04 | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2131/60661/256112.py | 2be8a23cca73b3a20adb07f366d8039e22a2d6fc | [] | 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 | 358 | py | def isArith(nums):
space=nums[1]-nums[0]
for i in range(2,len(nums)):
if nums[i]-nums[i-1]!=space:
return False
return True
nums=list(eval(input()))
res=0
nums.sort()
for i in range(len(nums)-2):
for j in range(i+2,len(nums)):
if isArith(nums[i:j+1]):
res+=1
... | [
"1069583789@qq.com"
] | 1069583789@qq.com |
b85a6723eb4b1d43bfbc8be5eb606eb9e0c946f2 | a406ebf25e26ea12c446b2b136b65f064a5bc571 | /tests/test_memoization.py | 53c8af510a97b25bf24b3be0e00ff149bba83eba | [
"MIT"
] | permissive | mintusah25/cacheout | 8d8091b927b7c822e211140748567bbfe5d7a27c | 0d836808c1b7f154fd0e819c2064744b360895ea | refs/heads/master | 2023-01-02T17:12:26.857199 | 2020-10-30T21:13:15 | 2020-10-30T21:13:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 979 | py | from unittest import mock
import pytest
from cacheout import (
Cache,
FIFOCache,
LFUCache,
LIFOCache,
LRUCache,
MRUCache,
RRCache,
fifo_memoize,
lfu_memoize,
lifo_memoize,
lru_memoize,
memoize,
mru_memoize,
rr_memoize,
)
parametrize = pytest.mark.parametrize
... | [
"dgilland@gmail.com"
] | dgilland@gmail.com |
d2adc81a9656dfa57ce9d1c50ceb750a4366191b | f82e67dd5f496d9e6d42b4fad4fb92b6bfb7bf3e | /scripts/client/notification/notificationlistview.py | aa5858ad1a8e8725cc2a547e25ca60d48b34aaed | [] | no_license | webiumsk/WOT0.10.0 | 4e4413ed4e7b00e22fb85d25fdae9400cbb4e76b | a84f536c73f86d9e8fab559e97f88f99f2ad7e95 | refs/heads/master | 2021-01-09T21:55:00.662437 | 2015-10-23T20:46:45 | 2015-10-23T20:46:45 | 44,835,654 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,750 | py | # Embedded file name: scripts/client/notification/NotificationListView.py
from debug_utils import LOG_ERROR
from gui.Scaleform.daapi.view.meta.NotificationsListMeta import NotificationsListMeta
from messenger.formatters import TimeFormatter
from notification.NotificationLayoutView import NotificationLayoutView
from not... | [
"info@webium.sk"
] | info@webium.sk |
3c3c06993743fc462bf1443c507a8d4c949727d2 | f10db3b11131ddf2bf5026e42cdd72c275e49693 | /ToolsX/leetcode/0090/0090.py | 9d5291ccce0aebabe994524026e808b6c79cde28 | [] | no_license | JunLei-MI/PythonX | 36def40e33c9ebb64ce28af2b5da010393b08356 | efea806d49f07d78e3db0390696778d4a7fc6c28 | refs/heads/master | 2023-04-07T10:58:45.647430 | 2021-01-25T16:54:37 | 2021-04-15T13:41:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 953 | py | from typing import List
from twisted.trial import unittest
class Solution:
"""20190918"""
def subsetsWithDup(self, nums: List[int]) -> List[List[int]]:
"""前一个是 0078,只需要加个排序就好了"""
ans = []
self.subsets(ans, sorted(nums), [], 0)
return ans
def subsets(self, ans: List[List[... | [
"pingfangx@pingfangx.com"
] | pingfangx@pingfangx.com |
416121f5dc417c25ace81b297a3bc1af6f1a899c | c9ddbdb5678ba6e1c5c7e64adf2802ca16df778c | /cases/pa2/sample/class_def_methods-170.py | e11bc4919cd972531ad69f4b5cc65a98a438b2a6 | [] | no_license | Virtlink/ccbench-chocopy | c3f7f6af6349aff6503196f727ef89f210a1eac8 | c7efae43bf32696ee2b2ee781bdfe4f7730dec3f | refs/heads/main | 2023-04-07T15:07:12.464038 | 2022-02-03T15:42:39 | 2022-02-03T15:42:39 | 451,969,776 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 342 | py | class A(object):
x:int = 1
def get_A(self: "A") -> int:
return self.x
class B(A):
def __init__(self: "B"):
pass
class C(B):
z:bool = True
def set_A(self: "C", val: int) -> object:
self.x = val
a:A = None
b:B = None
c:C = None
a = A()
b = B()
c = C()
b.x = $Exp()
a.x = ... | [
"647530+Virtlink@users.noreply.github.com"
] | 647530+Virtlink@users.noreply.github.com |
cda6609cbb312113e83732a22523b984ba40eb55 | 2d0f940ebbf3d6f9eb5962715e2880bdc70f40b9 | /week-05/day-1/cab.py | 6d0ad20aedbf83f12d7bfcd69fc353b097735e2e | [] | no_license | greenfox-velox/agyenes | 9482cdfc33d0f68f24209ce2af3629e2ccd1a120 | d341d14d7cd0bc627d02e02acabf79bc45c8ccfa | refs/heads/master | 2021-01-21T14:12:08.707870 | 2016-07-14T15:09:28 | 2016-07-14T15:09:28 | 58,042,941 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 591 | py | import random
a = random.randint(1000, 9999)
class CowsAndBulls():
def __init__(self, number):
self.number = number
def playing_the_game(number):
if len(number) != 4:
print("4 digit number needed")
counter = 0
state = "finished"
else:
co... | [
"aron.gyenes@gmail.com"
] | aron.gyenes@gmail.com |
5dd187c06586bc14ddd5a339dc3d5ae3db519fe9 | ed7757eb7c030e1c0cd7a2aacde9d7785b8ef825 | /arcade/examples/move_mouse.py | 032f3be492a398a3f8108e749e43b1f9385d8fd5 | [
"MIT"
] | permissive | callmebg/arcade | 3f45796e0e8b02151d7283f1b4d619ad320c64e5 | 50d05415001423a4f15013b95db05bea6ca1fd09 | refs/heads/master | 2021-05-17T10:20:25.070726 | 2020-03-27T19:19:58 | 2020-03-27T19:19:58 | 250,736,736 | 1 | 0 | NOASSERTION | 2020-03-28T07:20:06 | 2020-03-28T07:20:05 | null | UTF-8 | Python | false | false | 2,266 | py | """
This simple animation example shows how to move an item with the mouse, and
handle mouse clicks.
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.move_mouse
"""
import arcade
SCREEN_WIDTH = 640
SCREEN_HEIGHT = 480
SCREEN_TITLE = "Move Mouse Example... | [
"paul@cravenfamily.com"
] | paul@cravenfamily.com |
233a6d7a7b0c0034b45bde70cce097a0deee2d1d | ae53410a837876abae440d14c243619dedba51f1 | /Solutions/20.py | d577bd605dd241dcb83e4087fa4c5c0ed7a1d83f | [] | no_license | AvivYaniv/Project-Euler | 68e839ae6d4d1a683aa8723f7c9ab3e55ee1dd28 | ec271404a7280129cdc0af9cf3a07f8faa3ab2f4 | refs/heads/master | 2021-06-25T11:20:12.010985 | 2021-04-25T18:39:12 | 2021-04-25T18:39:12 | 225,074,588 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 347 | py | N = 100
def Factorial(n):
f = 1
for i in xrange(2, n, 1):
f *= i
return f
def SumDigits(n):
sum = 0
n_as_string = str(n)
for c in xrange(len(n_as_string)):
sum += int(n_as_string[c])
return sum
# Main
def main():
# 648
print SumDigits(Factorial(N))
if __name__... | [
"avivyaniv@gmx.com"
] | avivyaniv@gmx.com |
b085a3311714bf4b324f109cf9adfed87c56a593 | a2c6a55119fe21ff43aaf2341a75805e1193649d | /aliyun-python-sdk-smartag/aliyunsdksmartag/request/v20180313/GrantInstanceToCbnRequest.py | 9d4fa236eff25eaf9a2014334bba1549f1e05a70 | [
"Apache-2.0"
] | permissive | small-lei/aliyun-openapi-python-sdk | a41ab64803b2b5684c9cfd6ea285d028c7efed4c | 536038c353de57b1853984266d604033571c4368 | refs/heads/master | 2020-04-10T21:37:28.886184 | 2018-12-11T06:37:51 | 2018-12-11T06:37:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,286 | py | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | [
"yixiong.jxy@alibaba-inc.com"
] | yixiong.jxy@alibaba-inc.com |
466b85e6fd78704f10a3797763511c2f3360f6ea | d22c1db84101df4b7d88b61e8b074718b6aa116f | /weixin/pipelines.py | 0778d092162035e41e4dc6bad53d5644abf6b73b | [] | no_license | Activity00/myproject | ca519be8e688bdcf5a9884fa5f1c06d6750519d1 | 8f4896df2db85bb14a3470c588ff14af3a44bde6 | refs/heads/master | 2020-12-30T17:51:15.515304 | 2017-05-11T03:53:51 | 2017-05-11T03:53:51 | 90,933,840 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,802 | py | # -*- coding: utf-8 -*-
import pymongo
from bson import ObjectId
from scrapy.exceptions import DropItem
class DropPipeline(object):
""" 去掉无效的数据
掉丢不可用数据
优先级最高
"""
def process_item(self, item, spider):
if not item['account'] and not item['name']:
raise DropItem('丢掉不可信数据%... | [
"1032662429@qq.com"
] | 1032662429@qq.com |
856df0fd105ff041cd3f2c48f2928712235b25e1 | dcce9bc03eb4428cf1fa023115ffce599f1106eb | /mlt/map/views.py | 2bdf364c14140d69b3650f36a86f902f933327d5 | [] | no_license | DataSparkRI/mlt | 3efc8cdfe285f2a492e7f4437254b8ec2275e199 | dbfcb1b39b26c4042c5b041fcc8aa8b39995653b | refs/heads/master | 2021-05-26T14:56:24.850686 | 2011-06-13T23:08:48 | 2011-06-13T23:08:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 748 | py | from django.http import HttpResponse
from vectorformats.Formats import Django, GeoJSON
from .models import Parcel
def geojson(request, westlat, eastlat, southlon, northlon):
ewkt = (
"SRID=4326;POLYGON(("
"%(w)s %(s)s, "
"%(w)s %(n)s, "
"%(e)s %(n)s, "
"%(e)s %(s)s, "
... | [
"carl@oddbird.net"
] | carl@oddbird.net |
0a090d8625c177cbb65c83660daca63108ed3889 | b16dee45fa8028c76585e73722413f405901f30d | /apps/blogs_app/urls.py | 62432290f912597ecc1b9da37b58241a30843e0c | [] | no_license | alialwahish/django_app | 648f89440c83e44638b4e2fd48d90841b5221493 | 3ff40599ca1533d50bc6e5a121d6165898bfdb59 | refs/heads/master | 2020-03-16T20:39:38.958897 | 2018-05-11T00:10:34 | 2018-05-11T00:10:34 | 132,967,444 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 366 | py | from django.shortcuts import render
from django.conf.urls import url
from . import views
from django.urls import path
urlpatterns=[
url(r'^$',views.index),
url(r'^new/$',views.new),
url(r'^create$',views.create),
url(r'^(?P<num>\d+)/$',views.number),
url(r'^(?P<num>\d+)/edit/$',views.edit),
url... | [
"bayati.ali@icloud.com"
] | bayati.ali@icloud.com |
b5a4fd1f506b9012a774ac2b89e2d8f0207136af | 8a03b8459902d1bf0806f8d3387fb962bb57cf58 | /Data/test.py | 9f84dd335912c7cae35b4a0a9d87c5c9a73efa53 | [] | no_license | chetandg123/cQube | f95a0e86b1e98cb418de209ad26ae2ba463cfcbc | a862a1cdf46faaaff5cad49d78c4e5f0454a6407 | refs/heads/master | 2022-07-18T12:43:06.839896 | 2020-05-22T13:23:52 | 2020-05-22T13:23:52 | 258,089,042 | 0 | 0 | null | 2020-05-08T16:28:26 | 2020-04-23T03:55:52 | HTML | UTF-8 | Python | false | false | 775 | py | # import csv
#
# with open('/home/chetan/Documents/Data_files/District_wise_report.csv', 'r') as file:
# reader = csv.reader(file)
# lines = len(list(reader))
# print(
import base64
import csv
import re
str = "no of schools : 4500"
res = re.sub("\D", "", str)
print(res)
# with open('/home/chetan/Documents... | [
"chetan.goudar@tibilsolutions.com"
] | chetan.goudar@tibilsolutions.com |
d76b5ffc45462de8d4b658a7cc1790c2277804cd | f36fb0c48f624695cbdb9d705763735dcbdd2bff | /frame_labels_hdf5_to_lmdb.py | 4dd7763ef5619b8c6aea773d170ad342c80c5678 | [] | no_license | achalddave/video-tools | 055aca794b4fc6447a3f332cf5687d71251e1752 | 8276cf73826214d1d3e14a38bc1cdfea5d020556 | refs/heads/master | 2020-04-05T23:04:34.994084 | 2019-08-12T18:31:15 | 2019-08-12T18:31:15 | 52,479,853 | 9 | 4 | null | 2018-09-21T19:41:07 | 2016-02-24T22:42:57 | Python | UTF-8 | Python | false | false | 1,458 | py | """Create an LMDB mapping '<video_name>-<frame_number>' keys to label vectors.
Takes as input an HDF5 mapping '<video_name>' to a binary matrix of
(num_frames, num_labels) shape, and constructs an LMDB that has a unique key
for each frame. The labels are numpy arrays stored as byte strings, and can be
loaded calling n... | [
"achalddave@live.com"
] | achalddave@live.com |
6b43ca1d78bb5fbe487a63b81a185ee120c9cb55 | fd74a044c0037796455ba4bd4fd44f11c3323599 | /Contest/ABC/Contest_159/d.py | 941df0f8fcccf4ddb5d1149568479d4e534d4f31 | [] | no_license | tegetege/tegetege_AtCoder | 5ac87e0a7a9acdd50d06227283aa7d95eebe2e2f | ba6c6472082e8255202f4f22a60953d0afe21591 | refs/heads/master | 2022-03-25T00:29:22.952078 | 2022-02-10T14:39:58 | 2022-02-10T14:39:58 | 193,516,879 | 0 | 0 | null | 2019-06-25T13:53:13 | 2019-06-24T14:02:05 | Python | UTF-8 | Python | false | false | 671 | py | import math
import copy
N = int(input())
A = list(map(int,input().split()))
A_dict = dict()
for i in range(N):
if A_dict.get(A[i]) is not None:
A_dict[A[i]] += 1
else:
A_dict[A[i]] = 1
# 各キーが選ばれたときの答えを求めてdict型で持っておく
ans = dict()
for K,V in A_dict.items():
count = 0
A_dict_2 = copy.deepc... | [
"m_take7_ex_d@yahoo.co.jp"
] | m_take7_ex_d@yahoo.co.jp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.