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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fdb15e5ace4da1b4de863d60634d45cfd6c62a14 | 099b57613250ae0a0c3c75cc2a9b8095a5aac312 | /leetcode/String/反转/345. Reverse Vowels of a String.py | 91a896abfae47d9cbe3bd90d6741b31aa6ab36ce | [] | no_license | MitsurugiMeiya/Leetcoding | 36e41c8d649b777e5c057a5241007d04ad8f61cd | 87a6912ab4e21ab9be4dd6e90c2a6f8da9c68663 | refs/heads/master | 2022-06-17T19:48:41.692320 | 2020-05-13T16:45:54 | 2020-05-13T16:45:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 859 | py | """
只反转字符串里的元音字母"aeiou"(包括大写)
"""
class Solution(object):
def reverseVowels(self, s):
"""
:type s: str
:rtype: str
"""
if not s or len(s) == 0: return ""
s = list(s)
vowels = ["a", "e", "i", "o", "u", "A", "E", "I", "O", "U"]
left, right = 0, len(s) - ... | [
"yifu3@ualberta.ca"
] | yifu3@ualberta.ca |
1704ea5f968e349c38d2911b9f55d6168f021905 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03096/s565472854.py | 9303a9977cabba456b8b9c565e6ba7c55f29b95a | [] | 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 | 1,287 | py | #!/usr/bin/env python3
import sys
MOD = 1000000007 # type: int
MAX_N = 200000
def solve(N, C):
last = [-1] * MAX_N
pairs = []
for i, c in enumerate(C):
try:
prev = last[c - 1]
except:
if c >= N:
return
else:
raise Excepti... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
6ed95898d877f4870771badd434dfd9b2e6a2526 | a9d197b21b73b25b8b87d2711fa53531ff40e155 | /14 Containers/list_comprehensive.py | 1e69ed048fb8244efccc2fbafcf052d1400aef0d | [] | no_license | CodedQuen/Python-essential-reference | 460109acc901b687d9d4071331df488612e4f452 | c2c222b6616d7ebe78bec3f0a90598582b8f6bf3 | refs/heads/master | 2022-06-15T12:19:34.475686 | 2020-05-04T08:29:25 | 2020-05-04T08:29:25 | 261,105,920 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,439 | py | __author__ = 'rafael'
# Traditional
squares = []
for x in range(10):
squares.append(x**2)
print(squares)
# list comprehensions
squares = [x**2 for x in range(10)]
print(squares)
# Traditional with condition
numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9]
even =[]
for x in numbers:
if x % 2 == 0:
... | [
"noreply@github.com"
] | CodedQuen.noreply@github.com |
c3a5127abc373c9dc30df079a5d04cbbe071c1bd | 60a831fb3c92a9d2a2b52ff7f5a0f665d4692a24 | /IronPythonStubs/release/stubs.min/System/Windows/Forms/__init___parts/ItemChangedEventHandler.py | 9f11e96caa7b2bdc7f288f69104eb50bd383e07a | [
"MIT"
] | permissive | shnlmn/Rhino-Grasshopper-Scripts | a9411098c5d1bbc55feb782def565d535b27b709 | 0e43c3c1d09fb12cdbd86a3c4e2ba49982e0f823 | refs/heads/master | 2020-04-10T18:59:43.518140 | 2020-04-08T02:49:07 | 2020-04-08T02:49:07 | 161,219,695 | 11 | 2 | null | null | null | null | UTF-8 | Python | false | false | 2,795 | py | class ItemChangedEventHandler(MulticastDelegate,ICloneable,ISerializable):
"""
Represents the method that will handle the System.Windows.Forms.CurrencyManager.ItemChanged event of the System.Windows.Forms.CurrencyManager class.
ItemChangedEventHandler(object: object,method: IntPtr)
"""
def BeginInvoke(self,sen... | [
"magnetscoil@gmail.com"
] | magnetscoil@gmail.com |
6817b3eb7405f553d78057e201ab7b0fcd63a5ff | a33e11102b4b934d603f84d18a96cf38239b78f2 | /3_Inheritance/Programmer.py | ff466645a03742c9abbaebf43e4f1bd99809b7e1 | [] | no_license | l2sega/OOP | ddd5244197160d0609c8696f2810834e17820c1f | e918f7f62e68b372b08827b7c419eb0897be44c3 | refs/heads/master | 2021-01-10T08:00:07.598831 | 2015-12-07T18:11:32 | 2015-12-07T18:11:32 | 47,569,463 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 442 | py | # 3_Inheritance
from Person import *
class Programmer(Person):
__exp_of_prog = 0
def get_experience_of_programming(self):
return self.__experience_of_rpogramming
def set_experience_of_programming(self, ex_pr):
self.__exp_of_prog = ex_pr
def description_of_person(self):
... | [
"you@example.com"
] | you@example.com |
0b7c5657b839d26461deb7b7f216986c45a4bff8 | ea3897a5ffe63abd7ced5676c9121f6bb970bb97 | /detransapp/forms/infrator.py | b563a479b01ee4186c90ff6f2cd79d5f816e8347 | [] | no_license | brunowber/transnote2 | a045bdef18a9b07b70cc74483023dd877728682c | 7b799a71380aca342e879c5556cc24fcebdac1ca | refs/heads/master | 2020-04-10T08:53:29.613086 | 2018-03-15T19:52:53 | 2018-03-15T19:52:53 | 124,267,751 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 249 | py | # coding: utf-8
"""Formulario de infrator"""
from django import forms
from detransapp.models import Infrator
class FormInfrator(forms.ModelForm):
"""Classes de infrator"""
class Meta:
model = Infrator
fields = "__all__"
| [
"bm.morais21@gmail.com"
] | bm.morais21@gmail.com |
c97fdb7f491f61e3abbba634fe4379ce2f3d6d37 | 4e6565fbccd4175e4acc26f9b4cedeea5054a872 | /extensions/aria_extension_tosca/simple_v1_0/modeling/constraints.py | 7c99eab7402846a6a77bf2b8d16eb3b47b5a2e94 | [
"Apache-2.0"
] | permissive | azbarcea/incubator-ariatosca | 789fc3612fd7cb463fd7e68ab3802aa85a706802 | 24d693d762e4a56d6bf16d8c29d76c1f2909098d | refs/heads/master | 2021-01-21T08:15:41.513345 | 2017-05-15T11:26:34 | 2017-05-15T21:09:49 | 91,622,847 | 0 | 0 | null | 2017-05-17T21:46:02 | 2017-05-17T21:46:02 | null | UTF-8 | Python | false | false | 5,344 | 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 use ... | [
"tal.liron@gmail.com"
] | tal.liron@gmail.com |
b88bfcee9eb8b458b42b17519ab07ae2b61c0058 | e7e74b72d5367ad03adcf20b3220620baddcc113 | /gotify/models/email_notifier.py | 6142ad077818c1dedbb769d3f8e75aed3744c3d0 | [
"MIT"
] | permissive | akx/gentry | be044a51d0b4d3dd875e320c5ecc3c02c0bc249c | 5a550e34ced37f8f83a10001a3ef0b1480983781 | refs/heads/master | 2023-02-21T21:42:55.205987 | 2022-07-05T22:34:27 | 2022-07-21T11:46:46 | 98,209,171 | 4 | 1 | MIT | 2023-02-15T20:41:40 | 2017-07-24T16:02:32 | Python | UTF-8 | Python | false | false | 923 | py | import json
from django.core.mail import send_mail
from django.db import models
from gotify.models.notifier import Notifier
class EmailNotifier(Notifier):
emails = models.TextField()
@property
def recipient_list(self):
return {
address for address in (line.strip() for line in self.e... | [
"akx@iki.fi"
] | akx@iki.fi |
2e29b16331ecac0ba190f38016bbb7f6092424ea | cac8987fad2cf1363d6654d8365a93209233300c | /CA116-CA117 Programming 1 & 2/2017-04-18/ca117/nolanm45/patterns_62.py | 0fd1a15969d9b82b06f4603c296b639cb4223ff3 | [] | no_license | Mattnolan45/College-Work | 5c580696b0a841752ca3311cc4c88f8e91b8fd9c | d46cdb0d8bcb8f69d9e24b0d1b78d66616d80b96 | refs/heads/master | 2022-12-12T13:36:01.513725 | 2020-05-27T16:25:22 | 2020-05-27T16:25:22 | 174,000,356 | 0 | 0 | null | 2022-12-08T10:33:46 | 2019-03-05T18:35:07 | Java | UTF-8 | Python | false | false | 480 | py | import re
import sys
def main():
lines=sys.stdin.read()
print(re.findall(r"\b\d{1,2}[/]\d{1,2}[/]\d{2,4}\b",lines))
print(re.findall(r"\b\d{1,2}[-]\d{1,2}[-]\d{2,4}\b",lines))
print(re.findall(r"\b\d{1,2}[/-]\d{1,2}[/-]\d{2,4}\b",lines))
print(re.findall(r"\b\d{2}[-\s]\d{7}\b",lines))
print(re... | [
"matthewnolan.nolan@gmail.com"
] | matthewnolan.nolan@gmail.com |
6f27506e51362641fc0d9097b96f6a74b3484909 | 34d8b1b2b7fcedba12207bbb9fd1aeed58b0d7c4 | /PyModels/bot/plain_file_faq_storage.py | 4c775562b40322ad9ed180ea553251f6df4a03ac | [] | no_license | DnAp/chatbot | 8bc91f78fd9688c77665015962774eeb40f87f53 | fe7aa2b06910e3cb7cd75e62feb95967891fd647 | refs/heads/master | 2022-01-17T16:54:05.252316 | 2019-07-10T06:12:38 | 2019-07-10T06:12:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,221 | py | # -*- coding: utf-8 -*-
import logging
import io
from base_faq_storage import BaseFaqStorage
class PlainFileFaqStorage(BaseFaqStorage):
"""
Реализация хранилища FAQ на базе простого текстового файла без разметки.
См. пример https://github.com/Koziev/chatbot/blob/master/data/faq2.txt
"""
def __in... | [
"inkoziev@gmail.com"
] | inkoziev@gmail.com |
7310e6d772a7c4f8a7404ecb1509d61aee6d2327 | 968913bda3879ef316100410cdb2b01333ac14a8 | /003_Algorithms/breadth-first-search/breadth_first_search.py | aed31b905c8db6452cdba8f545923eee9a018fa9 | [] | no_license | sm2774us/2021_Interview_Prep | 02b6a81ee52f3cb14d9e060839a01aadd84e231f | c6689411a4334d53c88581a296e57c314b50f46c | refs/heads/main | 2023-03-02T05:30:17.156821 | 2021-01-26T04:31:02 | 2021-01-26T04:31:02 | 332,603,676 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,200 | py | from collections import deque
#Creating the graph manually
#The graph is the same used in Chapter 4.1 (page 533) of the book "Algorithm II"
vertex_list = [[2,1,5], [0,2], [0,1,3,4], [2,5,4], [2,3], [3,0]]
#List used to mark visited vertex
marked_list = [False, False, False, False, False, False]
#List used to sign from... | [
"sm2774us@gmail.com"
] | sm2774us@gmail.com |
d64830642f1179dde11226d281dcbd6ddb049e1d | 0b72b6dc7559b8a4950714a9fa62765c3eb49ab0 | /todo/test_views.py | faf6ad99fba0d302b8122e3ef9e1c803a9e44c90 | [] | no_license | kydzoster/ci-hello-jango | efe85dbed7abded09c506ca1291b4670093f6f07 | 0ad736d33d5bb460958c0dc1e45ec8c6a62da0e8 | refs/heads/master | 2023-07-18T20:30:31.712102 | 2020-06-04T11:52:57 | 2020-06-04T11:52:57 | 269,055,991 | 0 | 0 | null | 2021-09-22T19:10:07 | 2020-06-03T10:17:00 | HTML | UTF-8 | Python | false | false | 2,037 | py | from django.test import TestCase
from .models import Item
class TestViews(TestCase):
# this will test http response
def test_get_todo_list(self):
response = self.client.get('/')
self.assertEqual(response.status_code, 200)
# to confirm that the view uses correct template
self.as... | [
"kydzoster@gmail.com"
] | kydzoster@gmail.com |
6e55c317f62fc12df8d56caca64b11d84d6eba7a | ad69df518c785648db03cd39e682394f9825416e | /Models_Prac/randomGen/apps/user_page/views.py | d032d4778cb932332559beb0f08ae6acb98cdd2e | [] | no_license | jsterling23/Django_Projects | ea24c0b615b3897e831b04e80453d47d5fc74e6d | 733d3f045b466a1da7fd8cabb91ac8d233c1dfc4 | refs/heads/master | 2020-03-23T00:21:08.749080 | 2018-07-21T05:24:31 | 2018-07-21T05:24:31 | 140,858,076 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,212 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib import messages
from django.shortcuts import render, redirect
from ..logReg.models import User
from ..home.models import Thought
from ..user_page.models import Bio
# Create your views here.
def index(req):
if 'logged_in... | [
"jerrypadilla23@gmail.com"
] | jerrypadilla23@gmail.com |
265ddc7fc4d2c905f623dd333edd858c5f695f86 | 71a7ed5dd56b89aea1795a3db1469e3006be783f | /configs/hand/2d_kpt_sview_rgb_img/deeppose/rhd2d/res50_rhd2d_256x256.py | d092c5daad4e345f6749014c6c7da33fdb17ac8b | [
"Apache-2.0"
] | permissive | RunningLeon/mmpose | b6091416a2565778a1438b23edaa6620a2088a3e | 9ef202c0a4b2c28add32b530caf2ea0354843fe4 | refs/heads/master | 2023-06-30T04:46:52.917877 | 2021-08-05T08:54:24 | 2021-08-05T08:54:24 | 335,275,684 | 0 | 0 | Apache-2.0 | 2021-02-02T12:06:57 | 2021-02-02T12:06:57 | null | UTF-8 | Python | false | false | 3,655 | py | log_level = 'INFO'
load_from = None
resume_from = None
dist_params = dict(backend='nccl')
workflow = [('train', 1)]
checkpoint_config = dict(interval=10)
evaluation = dict(interval=10, metric=['PCK', 'AUC', 'EPE'], save_best='AUC')
optimizer = dict(
type='Adam',
lr=5e-4,
)
optimizer_config = dict(grad_clip=Non... | [
"noreply@github.com"
] | RunningLeon.noreply@github.com |
bca6f5303d6159365b37724fbb4866c03cd47e23 | 0005e05b9d8b8ad0d3c3c0539b2ded9db6e9f1dd | /test/test_tododelete_result_data.py | 69b5a56402ef281dcba19fe3e8e259de60d8669b | [] | no_license | termicoder/codechef-client-lib | a3e3de2b300355c5daa5ed3fad03a9859af13d86 | 74d6b21787c75a987e3451751f5554e4cc6cf469 | refs/heads/master | 2020-03-27T17:58:45.298121 | 2018-09-30T18:03:14 | 2018-09-30T18:03:14 | 146,889,644 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 934 | py | # coding: utf-8
"""
CodeChef API
CodeChef API to support different applications. # noqa: E501
OpenAPI spec version: 1.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import codechef_client
from codechef_client.m... | [
"diveshuttamchandani@gmail.com"
] | diveshuttamchandani@gmail.com |
44beb3d30e89be434403c409c11ce1a774eee7c5 | a63d907ad63ba6705420a6fb2788196d1bd3763c | /src/api/datahub/databus/shippers/queue_pulsar/shipper.py | e62bcb3d889895d1688285fd8e5b6a8751e54595 | [
"MIT"
] | permissive | Tencent/bk-base | a38461072811667dc2880a13a5232004fe771a4b | 6d483b4df67739b26cc8ecaa56c1d76ab46bd7a2 | refs/heads/master | 2022-07-30T04:24:53.370661 | 2022-04-02T10:30:55 | 2022-04-02T10:30:55 | 381,257,882 | 101 | 51 | NOASSERTION | 2022-04-02T10:30:56 | 2021-06-29T06:10:01 | Python | UTF-8 | Python | false | false | 3,084 | py | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available.
Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
BK-BASE 蓝鲸基础平台 is licensed under the MIT License.
License for BK-BASE 蓝鲸基础平台:
------------------------------------------... | [
"terrencehan@tencent.com"
] | terrencehan@tencent.com |
97da5f9ed2403cbfb999fd206cd86a65a5020ecb | c160a1b94a00ce253a1580edcd98153e23cfb383 | /solutions/python/grid.py | b076cfc34becbff0f5ee005ce90ed293a065a7eb | [
"MIT"
] | permissive | skeate/aoc | bcab38b34939058cb93e8f6566be634491097910 | 0f93ac5f266a7a9b143523a5493194bd5d3c6e02 | refs/heads/master | 2022-12-27T16:16:10.422594 | 2022-12-15T22:26:29 | 2022-12-15T22:26:29 | 317,359,038 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,402 | py | import os
from itertools import zip_longest
def same(x): return x
def noop(a,b): pass
class Grid:
def __init__(self, visit=noop, start=(0,0)):
self.grid = {}
self.loc = start
self._visit = visit
self.grid[start] = self.visit()
def visit(self):
return self._visit(self.g... | [
"skeate@gmail.com"
] | skeate@gmail.com |
19230c364581de587da4be991464cbf8e5d3a301 | 09e57dd1374713f06b70d7b37a580130d9bbab0d | /benchmark/startCirq2368.py | fb02a8b97b554b2851468bd1d908bafd0a4c40a1 | [
"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 | 3,037 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 5/15/20 4:49 PM
# @File : grover.py
# qubit number=4
# total number=39
import cirq
import cirq.google as cg
from typing import Optional
import sys
from math import log2
import numpy as np
#thatsNoCode
from cirq.contrib.svg import SVGCircuit
# Symbols for... | [
"wangjiyuan123@yeah.net"
] | wangjiyuan123@yeah.net |
0ee40e47f60a57f933c70898f8cbfd68c59d8de6 | c8f5b7fc5bd5de3e086dfe573adbd8d3d675fc5f | /cct/qtgui2/devices/connectioneditor/connectioneditor.py | 6ead8c001f838d2ce34a192d4f598e82d5d70851 | [
"BSD-3-Clause"
] | permissive | awacha/cct | 3b44fd7cf7a66dc3112abae3d8a156e26aad8c22 | 4a00f6817843d287680787725ba917cf801d9063 | refs/heads/master | 2023-02-03T17:18:55.624721 | 2022-08-22T06:20:28 | 2022-08-22T06:20:28 | 44,253,619 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,947 | py | from typing import Optional
from PyQt5 import QtWidgets, QtCore
from PyQt5.QtCore import pyqtSlot as Slot
from .connectioneditor_ui import Ui_Form
from ....core2.devices.device.telemetry import TelemetryInformation
from ...utils.window import WindowRequiresDevices
from .newconnectiondialog import NewConnectionDialog
... | [
"awacha@gmail.com"
] | awacha@gmail.com |
7aea0dd7f0b272507549dc2acda9de336497e3eb | 0ed0f9b98be3eb4f87aedfb67210b01a3bd4ffe4 | /Validation/prod/common/pass1.3_computeStat.py | 9dabd2494fb62f3e9b6e9e99a85a3dced376677d | [] | no_license | jshlee/CATTools | 6e6714225010fa5dfcc819f578d3ad0b8458a8dc | 3805086b4577b439ecef5369d5bd56f25cfe1ca3 | refs/heads/cat80x | 2021-01-21T16:44:52.978003 | 2017-10-17T18:46:58 | 2017-10-17T18:46:58 | 25,828,473 | 1 | 2 | null | 2017-10-17T18:46:59 | 2014-10-27T16:32:59 | C++ | UTF-8 | Python | false | false | 1,847 | py | #!/usr/bin/env python
import os
from ROOT import *
## Load JSON file and categorize datasets
import json
import pandas as pd
pd.options.display.max_rows = 999
dataDir = "%s/src/CATTools/CatAnalyzer/data/dataset" % os.environ["CMSSW_BASE"]
dsets = pd.DataFrame.from_dict(json.loads(open("%s/dataset.json" % dataDir).rea... | [
"jhgoh@cern.ch"
] | jhgoh@cern.ch |
b3ad213e7df90faebb3ed18bb0cf6beb7ae9ba8b | d362a983e055984c588ee81c66ba17d536bae2f5 | /backend/agent/migrations/0038_remove_beautician_serving_in.py | 2d0f761d4808fc04921f7fc4263f611c9ca2ab23 | [] | no_license | prrraveen/Big-Stylist-CRM | 1d770b5ad28f342dfc5d40002ddc3ee7cc6f840a | 6cd84ce7b01a49a09b844c27ecc4575dcca54393 | refs/heads/master | 2021-01-10T04:37:43.414844 | 2015-12-15T10:47:21 | 2015-12-15T10:47:21 | 49,239,402 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 358 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('agent', '0037_pincode_localities'),
]
operations = [
migrations.RemoveField(
model_name='beautician',
... | [
"prrraveen@gmail.com"
] | prrraveen@gmail.com |
f9922b9d3bae440ccb0610f88d4514d6b857adfa | a873f3cd46a10ad879fc56d78e1f533d8bf486c0 | /a_web/demo/books/migrations/0001_initial.py | e1a5d7ac565fa41f343d7d8db7feecefdf2baaed | [] | no_license | shenhaiyu0923/resful | d0301b39363e6b3d3659f62fa4a9b2532ebcd225 | 1e66cae7d68fa231794776953cc1a5e999bf36c6 | refs/heads/master | 2021-07-08T20:46:57.300298 | 2021-06-01T08:17:27 | 2021-06-01T08:17:27 | 244,308,016 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,061 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2020-03-02 08:09
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.Crea... | [
"jwang9@vova.com.hk"
] | jwang9@vova.com.hk |
73af5d54ade5a5774012cb896ba9efde50161f03 | 19919c7c7f4ccfc4842e016c8ece818cd144de14 | /Base/Get_Driver.py | 5f86b1201b6babeb3fdd83bfddf04c81495c59e3 | [] | no_license | Cz1660/GitTestSetting_0225 | b9e08e74dc0eb27aa39f204763140f0d772e5796 | ba59ca5b16d1e9784a19b2c70d7ca27e923289f4 | refs/heads/master | 2020-04-25T02:52:49.869443 | 2019-02-25T08:08:21 | 2019-02-25T08:08:21 | 172,456,529 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 571 | py | from appium import webdriver
class Get_Driver:
def get_driver(self,appPackage,appActivity):
self.desired = {}
self.desired['platformName'] = 'Android'
self.desired['platformVersion'] = '8.0.0'
self.desired['deviceName'] = 'HUAWEI nova2'
self.desired['appPackage'] = appPacka... | [
"you@example.com"
] | you@example.com |
ec3ba31eeb69ab63d3e143775f83466f06aa6ea0 | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/80/usersdata/147/48115/submittedfiles/moedas.py | a4067a6260de0b909a14118260d5027646fbc947 | [] | 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 | 246 | py | # -*- coding: utf-8 -*-
from __future__ import division
a=int(input('digite a:'))
b=int(input('digite b:'))
c=int(input('digite c:'))
i=1
cont=0
resto=0
while c//i!=0:
cont=cont+1
i=i+1
if c%i!=0:
resto=(c%i)
print(cont)
print(resto)
| [
"rafael.mota@ufca.edu.br"
] | rafael.mota@ufca.edu.br |
d8096faa00f8915f1969549c2188ed9dee744c00 | e3efabcafdbf8dc88841ded4fd2d2854772044d1 | /config.py | 1cbdc627018747d7b8b251cd9eb92f2e55cb6bc6 | [
"BSD-3-Clause",
"MIT"
] | permissive | reubano/ebay-search-api | df3c4152184d0aeb014c8cad4a41dd8532187823 | b1acd92dd195fe17d39317904e0704e4a425e3fa | refs/heads/master | 2021-01-23T11:56:01.055238 | 2017-06-20T11:12:40 | 2017-06-20T11:12:40 | 19,175,031 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,143 | py | # -*- coding: utf-8 -*-
"""
config
~~~~~~
Provides the flask config options
###########################################################################
# WARNING: if running on a a staging server, you MUST set the 'STAGE' env
# heroku config:set STAGE=true --remote staging
#################... | [
"reubano@gmail.com"
] | reubano@gmail.com |
7b50de229e7863db9841d282a03efbaf5a930532 | 32218d307c2bb58672112370a31e16d3b9cc4c50 | /tushare/__init__.py | 37da945cfafb7add1dd9e025f4d80fa6d9eb2bef | [
"BSD-3-Clause"
] | permissive | kiinoo/tushare | d409d30d802ea6d7dd113fb8b14b4ffbf6ac5597 | f408b10751ca060fcd9d77b3383263de8b35b2ba | refs/heads/master | 2021-01-22T16:45:44.937242 | 2015-08-02T08:10:45 | 2015-08-02T08:10:45 | 39,777,523 | 0 | 0 | null | 2015-07-27T14:01:51 | 2015-07-27T14:01:51 | null | UTF-8 | Python | false | false | 2,395 | py | __version__ = '0.3.4'
__author__ = 'Jimmy Liu'
"""
for trading data
"""
from tushare.stock.trading import (get_hist_data, get_tick_data,
get_today_all, get_realtime_quotes,
get_h_data, get_today_ticks,
get... | [
"jimmysoa@sina.cn"
] | jimmysoa@sina.cn |
4f1af7a9aacd95d75a78f76813936f1bc34ceb0d | 44fb2fe531a0ff2144e4f0c2d4dd611f86f93cfb | /FuckLeetcode/47. 全排列 II.py | dedf1988d849d1f4370cfce2adb61f11a464d17d | [] | no_license | Alex-Beng/ojs | d9f1a49f76dc6b6429951330af526e0df2152be8 | 26a467dfe8acd8ae4be0cd2784d79eebf09c06ce | refs/heads/master | 2023-07-12T05:36:36.176271 | 2023-07-07T15:09:39 | 2023-07-07T15:09:39 | 152,544,110 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 977 | py | from copy import deepcopy
class Solution:
def permuteUnique(self, nums: List[int]) -> List[List[int]]:
def dfs(n, layer, used, curr, ans):
if layer == n:
# print(curr)
ans.append(deepcopy(curr))
else:
for i in range(n):
... | [
"599267065@qq.com"
] | 599267065@qq.com |
7b3823ecb281b9ea378ca0e4243791daf7be5a40 | adc646a248ca0e599689af869999ddc2dec4a63d | /Python3/237.delete-node-in-a-linked-list.py | 5558e23f7230fa687c76b28113b8d1a231ec99ba | [
"MIT"
] | permissive | 610yilingliu/leetcode | fd3a5675932e7056641bd878afe36b55ad53490b | 3fd33092f53de25e8014c05af4ac3e6754f54e23 | refs/heads/master | 2023-04-27T22:22:27.103682 | 2023-04-14T16:33:40 | 2023-04-14T16:33:40 | 247,016,311 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 506 | py | #
# @lc app=leetcode id=237 lang=python3
#
# [237] Delete Node in a Linked List
#
# @lc code=start
# Definition for singly-linked list.
class ListNode:
def __init__(self, x):
self.val = x
self.next = None
class Solution:
def deleteNode(self, node):
"""
:type node: ListNode
... | [
"yilingliu1994@gmail.com"
] | yilingliu1994@gmail.com |
630913d770b73fedbabcfec731b4cc54d4ece04d | 72b77f97876983025eb05a5aa1d6f248a1be3074 | /kill_process.py | d07fe15152d06bf213f2ba932f6351b8cb609921 | [
"Apache-2.0"
] | permissive | erjan/coding_exercises | 4c6bccb2cdac65ccbc3107a482914275ecd157f7 | 68dac358a6d4dabd41d47dbd4addb2ec50e0ca11 | refs/heads/master | 2023-09-02T07:25:30.886175 | 2023-08-27T06:13:06 | 2023-08-27T06:13:06 | 236,281,070 | 5 | 0 | Apache-2.0 | 2020-05-05T15:08:49 | 2020-01-26T07:32:09 | Python | UTF-8 | Python | false | false | 4,520 | py | '''
You have n processes forming a rooted tree structure. You are given two integer arrays pid and ppid, where pid[i] is the ID of the ith process and ppid[i] is the ID of the ith process's parent process.
Each process has only one parent process but may have multiple children processes. Only one process has ppid[i] =... | [
"noreply@github.com"
] | erjan.noreply@github.com |
9478c3c91058bd588bf97b715f2380989ea45794 | 20cf2cb73adfed63cf182fc12a09aa3aadc033c6 | /class.py | ccf3d94b4796fd2057fc9fe5169616f40aa46c58 | [] | no_license | arunkumar27-ank-tech/Python-Programs | 678ae558e8c141a6302e2705849c97258974c4eb | a56788057d1bf8848681e38eb569874d84db7337 | refs/heads/master | 2023-06-16T14:50:36.146381 | 2021-07-15T13:57:54 | 2021-07-15T13:57:54 | 386,305,015 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 203 | py | class Arun:
def __init__(self, name, age):
self. n = name
self. a = age
def func(self):
print("the details is ", self.n, self.a)
obj1 = Arun('arun', 22)
obj1.func()
| [
"arunkumar834428@gmail.com"
] | arunkumar834428@gmail.com |
1f3acd1b7658546833166ea3a06e14bf4d2dc8d1 | 2c190c1f324659a76bd7a701f09f49760b946a02 | /person.py | 547cdb0f5a4df655d4fa9f4ec0a19c6a60d72d65 | [] | no_license | erikaosgue/Git-GitHup-Practice | cc9882c000e4cdd09dfcf8e1e8ddb5459147c5a9 | 3e618fa943395fe30768e82a936d18d4e4c244bb | refs/heads/master | 2023-05-01T19:57:24.067849 | 2021-05-20T03:47:09 | 2021-05-20T03:47:09 | 367,688,938 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 540 | py | #!/usr/bin/python3
# Exercise to practice git with a simple class
class Person:
# constructor for Person Class
def __init__(self, name, age):
self.name = name
self.age = age
def myfunc(self):
print("Hello my name is " + self.name)
person1 = Person("Amanda", 22)
# Print the ... | [
"1476@holbertonschool.com"
] | 1476@holbertonschool.com |
882c9e01045db45df0ab9d39424d7ceb27a691dc | a8769709aeb7299fa3757f0e7bba5c617eb8cfe3 | /lesson-3/k8s/lib/python2.7/site-packages/kubernetes/client/models/v1_service_account_token_projection.py | a9ff17589f4c3fb5c27b854a85630b34b6476cd4 | [
"Apache-2.0"
] | permissive | simox-83/workshop-k8s | 2ac5e8b282bb7c3337acc726a7d972717bf649cc | 04cb18e8b5925a3cfd84ca316952a6cb64960b31 | refs/heads/master | 2020-03-31T20:52:21.421995 | 2018-10-11T14:43:08 | 2018-10-11T14:43:08 | 152,558,678 | 0 | 0 | Apache-2.0 | 2018-10-11T08:37:20 | 2018-10-11T08:37:20 | null | UTF-8 | Python | false | false | 6,265 | py | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.11.3
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re... | [
"simone.dandreta@concur.com"
] | simone.dandreta@concur.com |
2b9441f1518dcc4b56399c2815b4ab9300e948e9 | a181b2f877a1b963102ff143fa1d2fbcb930102b | /com/cskaoyan/object/AdvanceObject/MethodType.py | 1fa65150bc6c8430194404caadc56cbb4f2d3ba1 | [] | no_license | tangkangtai/pythonProject3 | bab2533aba9d411ffb3d69bf97ef3ff5418bef05 | 2b86622b335b8d122b8ab6a74c3e8fb280d619a8 | refs/heads/master | 2023-03-30T06:36:49.439429 | 2021-03-30T12:00:23 | 2021-03-30T12:00:23 | 316,452,391 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 604 | py |
from types import MethodType
class Student(object):
pass
s1 = Student()
#python 3目前不可用
#s1.set_age = MethodType(set_age,s1,Student)
# s1.set_age(23)
# print(s1.age)
#这种绑定 只将方法绑定到s1对象上面
# s2 = Student()
# s2.set_age(24)
# print(s2.age)
def set_age(self,age):
self.age = age
#-----------------------
print('... | [
"1179167225@qq.com"
] | 1179167225@qq.com |
d3dbd8a9d64161c83aa909c824126929b072c04e | 426a3f961982db52360a3e66c326b36a1d0a91ae | /File Input & Output Function/create diff list.py | 8738adae07d3154e7decae7979bb2aa037d5a978 | [] | no_license | Sibinvarghese/PythonPrograms | c121f8eaf06b2fcbbd15f64b54c13771e82e5d99 | c0e0951dab3ff0921ae2e25dfb086bb94d805464 | refs/heads/master | 2023-02-17T10:27:59.876242 | 2021-01-13T03:51:51 | 2021-01-13T03:51:51 | 329,186,398 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 240 | py | f=open("employee demo ","r" )
id=[]
name=[]
sal=[]
for line in f:
lines=line.rstrip("\n").split(",")
id1=lines[0]
name1=lines[1]
sal1=lines[2]
id.append(id1)
name.append(name1)
sal.append(sal1)
print(id,name,sal) | [
"sibinmvarghese@gmail.com"
] | sibinmvarghese@gmail.com |
24cee9ef3896433bf1ad75325a2fd6be6ebe8890 | aa7878b7975a669d5ca29a7efada73d7cf48202c | /pld.py | 0cfa75c92c3400622910ec9c876bbba66ca54ff8 | [
"MIT"
] | permissive | bmorris3/arcsat_monitoring | 11e4f11d9934b22cbadc6144b65b5b66302c9821 | 158988c49ef9384e905c02dd855bfaf855da140a | refs/heads/master | 2023-05-30T19:54:18.767192 | 2018-06-18T22:23:16 | 2018-06-18T22:23:16 | 121,421,273 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,826 | py | import numpy as np
# Iterate!
def Init(fpix, K = 5):
'''
'''
# Compute the 1st order PLD model
fsap = np.sum(fpix, axis = 1)
A = fpix / fsap.reshape(-1,1)
w = np.linalg.solve(np.dot(A.T, A), np.dot(A.T, fsap))
model = np.dot(A, w)
fdet = fsap - model + 1
# The data matrix
F =... | [
"brettmorris21@gmail.com"
] | brettmorris21@gmail.com |
198ff4a8dfe3692a385a0fc8c2c474abbfa30f79 | 87c3f0cc9d181a525ed6249cde81f8e483f30223 | /tests/test_warn.py | 825a71a1a78a9946c36e736d60c924304390ac96 | [
"MIT"
] | permissive | jwilk/anorack | 35f0afd3b69eb390bdf73f350937fdf27a67fa53 | c189b95262878112cfe6f73cc3bda0fd380d11e0 | refs/heads/master | 2023-07-25T12:11:41.031553 | 2023-07-17T21:01:39 | 2023-07-17T21:01:39 | 62,392,075 | 35 | 4 | null | null | null | null | UTF-8 | Python | false | false | 1,632 | py | # Copyright © 2016-2021 Jakub Wilk <jwilk@jwilk.net>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the “Software”), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, mer... | [
"jwilk@jwilk.net"
] | jwilk@jwilk.net |
33837656c35ecd37ba14e9df1296351299282be9 | d66818f4b951943553826a5f64413e90120e1fae | /hackerearth/Basic Programming/Implementation/Basics of Implementation/The art of verification/test.py | e6fd525ebadce34504688a43f004a25b37679292 | [
"MIT"
] | permissive | HBinhCT/Q-project | 0f80cd15c9945c43e2e17072416ddb6e4745e7fa | 19923cbaa3c83c670527899ece5c3ad31bcebe65 | refs/heads/master | 2023-08-30T08:59:16.006567 | 2023-08-29T15:30:21 | 2023-08-29T15:30:21 | 247,630,603 | 8 | 1 | MIT | 2020-07-22T01:20:23 | 2020-03-16T06:48:02 | Python | UTF-8 | Python | false | false | 727 | py | import io
import unittest
from contextlib import redirect_stdout
from unittest.mock import patch
class TestQ(unittest.TestCase):
@patch(
"builtins.input",
return_value="http://www.cleartrip.com/signin/service?username=test&pwd=test&profile=developer&role=ELITE&key=manager",
)
def test_case... | [
"hbinhct@gmail.com"
] | hbinhct@gmail.com |
be009a921a73797b5c464c5daefe70001fe6f656 | 10fbe5526e5f0b8588b65f70f088cd86b6e9afbe | /geemkrwi/migrations/0014_auto_20150218_1628.py | e9b7ac6b3c2a1007a9666fa70256b0b80145af26 | [] | no_license | MarkusH/django-migrations-benchmark | eb4b2312bb30a5a5d2abf25e95eca8f714162056 | e2bd24755389668b34b87d254ec8ac63725dc56e | refs/heads/master | 2016-09-05T15:36:45.250134 | 2015-03-31T23:44:28 | 2015-03-31T23:44:28 | 31,168,231 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,007 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('avwpufexob', '0013_auto_20150218_1628'),
('geemkrwi', '0013_wilsmoea_lpmmn'),
]
operations = [
migrations.CreateMode... | [
"info@markusholtermann.eu"
] | info@markusholtermann.eu |
3f4a2d9ef61a2adcf829dabc23897dece46df261 | c0075f31ff48142a05d92f11840229beee09f697 | /tests/plugins/test_pixiv.py | 8d547d3dbadc6e88d5f2c37e850a9991a8933867 | [
"BSD-Source-Code",
"BSD-2-Clause"
] | permissive | beardypig/streamlink | c1d44605ced0c924257b4813649acb406b035cb8 | 54c25e49a45a5545d2d9a545320cd2034ea41cd3 | refs/heads/master | 2021-12-12T04:31:02.955852 | 2020-11-10T06:18:33 | 2020-11-10T06:39:46 | 70,149,227 | 5 | 2 | BSD-2-Clause | 2019-08-08T11:56:37 | 2016-10-06T11:52:09 | Python | UTF-8 | Python | false | false | 566 | py | import unittest
from streamlink.plugins.pixiv import Pixiv
class TestPluginPixiv(unittest.TestCase):
def test_can_handle_url(self):
should_match = [
'https://sketch.pixiv.net/@exampleuser',
'https://sketch.pixiv.net/@exampleuser/lives/000000000000000000',
]
for url... | [
"gravyboat@users.noreply.github.com"
] | gravyboat@users.noreply.github.com |
54fb0c1ba4f22838fc6317dbe2ba56a27fb1d04b | f2658c4bd7f833ace25ac2b63e88317b05f4602d | /2017 July/2017-July-11/st_rdf_test/model/WaysNavigableLinkAdasRegioncode.py | adf4e3fe9747e75b1425409b538d2cefac9b43f9 | [] | no_license | xiaochao00/telanav_diary | e4c34ac0a14b65e4930e32012cc2202ff4ed91e2 | 3c583695e2880322483f526c98217c04286af9b2 | refs/heads/master | 2022-01-06T19:42:55.504845 | 2019-05-17T03:11:46 | 2019-05-17T03:11:46 | 108,958,763 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,699 | py | #-------------------------------------------------------------------------------
# Name: WaysNavigableLink model
# Purpose: this model is used to mapping the rdf_nav_link, rdf_link and rdf_access
# columns: [ link_id,iso_country_code,access_id,status_id,functional_class,controlled_access,travel_... | [
"1363180272@qq.com"
] | 1363180272@qq.com |
d11dd142101d3e542c52af2df6d118f774c36db1 | 2e29036d10a1e2bf86b622270783810f0d6bc34e | /temp_converter.py | fe1238150007299a2a1efe1d674a18e531bbb128 | [] | no_license | golammahmud/tkinter-gui-tempereture-converter | 22f45968e210b474eff8aad5b907f1450a47bfb6 | 2597f0b3c7358585faa86f4410858cdb525a4c6c | refs/heads/master | 2023-04-21T04:25:17.229489 | 2021-05-23T04:17:19 | 2021-05-23T04:17:19 | 369,958,739 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,944 | py | from functools import partial
from tkinter import *
import math
from tkinter import messagebox
width=500
height=500
root=Tk(className="Tkinter Temprature converter")
root.geometry(f'{width}x{height}')
# root.resizable(False, False)
title=Label(root, text="Temperature converter in Python",font='lucida 15 bold italic')
... | [
"golam.mahmud99@gmail.com"
] | golam.mahmud99@gmail.com |
97a64162010667e3cb465e023fb80eacce45154a | c3a178eeffc969b5981d570f5658f7bcb0207303 | /calc/operacoes.py | 0500d3fcbc10159134c440b17ebec3c5d2f23bcb | [] | no_license | Maethorin/aula-giovanna | 0013e969d3981774e90c318a3556c39882ce15af | c47b0d99a5a0e043c7e67f82276bb043cd62ad62 | refs/heads/master | 2021-01-20T05:04:38.024849 | 2014-10-04T01:26:54 | 2014-10-04T01:26:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 204 | py | # -*- coding: utf-8 -*-
from objetos import Calculadora
def executar():
calc = Calculadora("Legal")
calc.mostrar_display()
calc.mostrar_botoes()
if __name__ == "__main__":
executar() | [
"maethorin@gmail.com"
] | maethorin@gmail.com |
5edc157a23a1f0818f9757f8251b65bedee70b0e | c5420cee98aae008cb404ace7b8d21dcdf205a69 | /backend/app/enums/base_enum.py | 857293ce9e6e250693365cc403d90317384f9058 | [] | no_license | LyanJin/check-pay | 2aeb81f430a26410964e979b63d20c9d5aa7d46e | ff36deb73e667de16a73b1666bbeaf28f993f944 | refs/heads/master | 2023-01-14T03:38:00.907488 | 2019-11-04T09:29:27 | 2019-11-04T09:29:27 | 219,446,460 | 0 | 0 | null | 2023-01-04T16:14:10 | 2019-11-04T07:55:33 | Python | UTF-8 | Python | false | false | 1,932 | py | from enum import Enum
class BaseEnum(Enum):
@classmethod
def get_all_enums(cls):
return [x for x in cls]
@classmethod
def from_name(cls, name):
return getattr(cls, name.upper())
@property
def desc(self):
"""
中文描述
:return:
"""
return se... | [
"aken.jin.33@gmail.com"
] | aken.jin.33@gmail.com |
f9d45cd2709a248638e9f73a2c3a7c5d6da4032c | eabf02cd9a0197fbdec8399ce88ff78e063a9788 | /2021/Lunch Concert S3 CCC 2021.py | fde64f97d11fcb4b16e73a224807a4247aa2be3c | [] | no_license | het1613/CCC-Solutions-2006-to-2021 | 3b0cf4e247e273193f3696e42438e27fd44ee1d0 | 9e9c599ff089138a07e1a1d6eadd0db58fc8c936 | refs/heads/main | 2023-07-21T16:05:32.861368 | 2021-09-01T20:39:17 | 2021-09-01T20:39:17 | 401,526,110 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 852 | py | #Het Patel
#S3 CCC 2021
#17/02/20
def time_finder(pos):
global info
total_time=0
for friend in info:
starting=friend[0]
speed=friend[1]
hearing=friend[2]
move=0
if abs(pos-starting)>hearing:
move=abs(pos-starting)-hearing
total_t... | [
"noreply@github.com"
] | het1613.noreply@github.com |
88d1c090516e23b558ece11a253aa863f3909fb4 | 234a4d04918792ff29a4de07555c48c1d82ba750 | /app/timeline/controller.py | 2d8ad0bef98bab30a3d14121132afadcfb5a3aa2 | [] | no_license | fodisi/mytwitter | dce1ca4cefd19f57cd829df4aadeaf72aaeb407a | f04101fd6a6c3fa96653960383626d7f1dc43d5e | refs/heads/master | 2020-03-23T16:40:28.016221 | 2018-07-23T18:35:42 | 2018-07-23T18:35:42 | 141,626,592 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,823 | py | # /usr/bin/env python3
from flask import Blueprint, request, render_template, \
session, redirect, url_for
from .. import db
from ..auth.user_model import User, UserSchema
from ..twit.twit_model import Twit, TwitSchema
timeline_ctrl = Blueprint('timeline', __name__)
@timeline_ctrl.route('/home/', methods=['GET... | [
"fodisi@users.noreply.github.com"
] | fodisi@users.noreply.github.com |
61eead0107714a02ba7bc832f9da3eafb0f0d098 | 0e4dc82a94563dacb0c25d0d43fbcbe3def21f72 | /220-Contains-Duplicate-III/solution01.py | 445686bf1abb72beecde953b1ca62de0a75e234c | [
"CC-BY-3.0",
"MIT"
] | permissive | Eroica-cpp/LeetCode | 3ce3b05b3098e8097c1090e2116b813efaadd2a3 | 07276bd11558f3d0e32bec768b09e886de145f9e | refs/heads/master | 2021-06-20T05:41:30.506250 | 2017-03-16T05:17:39 | 2017-03-16T05:17:39 | 35,126,816 | 7 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,137 | py | #!/usr/bin/python
"""
==============================================================================
Author: Tao Li (taoli@ucsd.edu)
Date: Jun 20, 2015
Question: 220-Contains-Duplicate-III
Link: https://leetcode.com/problems/contains-duplicate-iii/
=============================================================... | [
"eroicacmcs@gmail.com"
] | eroicacmcs@gmail.com |
b1ae58e31624a8ee0a964237752927feca1f5cd6 | 3006e60dd4811dec1b9f4f6b1fcfa4eddb6be44a | /Algorithms/Data_Structure/array_partition.py | 5f1978d2003233b53f370fff92adc506e15553db | [] | no_license | duilee/workspace | 382e8a2c11bc54e76e829bdd7b98268108e68c49 | 581c7e65383fe05d57826c7ad1a4d80a1bf0fcc5 | refs/heads/master | 2023-06-05T15:29:32.363152 | 2021-06-27T02:10:08 | 2021-06-27T02:10:08 | 328,106,426 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 304 | py | class Solution:
def arrayPairSum(self, nums: List[int]) -> int:
nums.sort()
sums = 0
for i in range(0, len(nums), 2):
sums += min(nums[i], nums[i + 1])
return sums
"""
def arrayPairSum(self, nums: List[int]) -> int:
return sum(sorted(nums)[::2])
""" | [
"duilee@berkeley.edu"
] | duilee@berkeley.edu |
f9c186bb3c8c872480fe94bed987c2c9425bc702 | 99ae8d6b9f4e0adfdf6ac148e4003a5fd4b70cc7 | /Pico CTF/Pico CTF 2013/xortool.py | b544f44e1c08896d90a501dd15ebedd2021f38be | [] | no_license | Amo10/Computer-Science-2014-2015 | 80449e38a32d93e0e45bbeadaeb30b9e82437560 | c68a49ba350285c01c171385445a06f006a45e18 | refs/heads/master | 2020-05-17T05:39:26.985455 | 2015-01-02T03:14:29 | 2015-01-02T03:14:29 | 26,147,151 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 926 | py | #!/usr/bin/env python
"""
Xor tool to encrypt a file with XOR cypher using a key
Inspired from http://www.daniweb.com/software-development/python/code/216632/text-encryptiondecryption-with-xor-python
Usage: python xor.py plain_text_file 'secret_key'
Will result in a *.xor file
"""
from sys import argv
from StringIO im... | [
"Andrew@Andrews-MacBook-Pro.local"
] | Andrew@Andrews-MacBook-Pro.local |
5c8d4b44f6aad9e66b30d70a14d1cb24f77c7ca3 | 96ea550c0c9cedb5ff2e3390f44303a227a3b040 | /docs/conf.py | 56864c8461b8bf595c51fd3dd55687d516e971c2 | [
"MIT"
] | permissive | mihikasharma/dredd | f72cb6afdae211ac9a5c4d39ffe1a56131d2ea67 | 831871b63b0074d07cad01db9d934932bcfd74cb | refs/heads/master | 2020-04-29T16:04:39.756442 | 2019-03-18T09:37:55 | 2019-03-18T09:37:55 | 176,247,048 | 0 | 0 | MIT | 2019-03-18T09:27:57 | 2019-03-18T09:27:57 | null | UTF-8 | Python | false | false | 4,581 | py | import os
import sys
import re
import json
import urllib.request
from sphinx.errors import SphinxError
from pygments.lexers.data import YamlLexer
###########################################################################
# #
# Dredd document... | [
"mail@honzajavorek.cz"
] | mail@honzajavorek.cz |
341597d919229feef9cfa14d8d88a2e4552269e4 | 7b59fc2536380c72f291ced2d86a6fe0fbe2cc7a | /test_employee.py | d579f85948f65017a85acfcd67bad2e8ab7b729b | [] | no_license | tebbythomas/Python_Unit_Testing_Demo | e556f76abac9947b54cd3262e39398de308ba94f | 7f5207807347a669dc33e0f3872be25f6fab32fc | refs/heads/master | 2020-07-29T16:11:50.578022 | 2019-10-28T20:12:16 | 2019-10-28T20:12:16 | 209,875,701 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,535 | py | '''
Description:
Unit test code for the employee class
'''
import unittest
from employee import Employee
from unittest.mock import patch
class TestEmployee(unittest.TestCase):
@classmethod
def setUpClass(cls):
print('setupClass')
@classmethod
def tearDownClass(cls):
print('teardownC... | [
"tebby.thomas@gmail.com"
] | tebby.thomas@gmail.com |
4e28992860c47d3fb234b616e1f5da16cc2f0aef | cefc1215d274245afb139c4d0070f7246d285f3a | /03-deep_learning/01-tensorflow_examples/04-CV/04-ocr/OCR_repo/ocr_lib/gen_train_val_data.py | 39cecd008838008e67d7263d3bd70920ab56a245 | [] | no_license | MachineLP/CodeFun | 7ddb02dbd3d99885015e3f641dadee124644a4a0 | ed6b3190964371797c295346378f79197a9ce05e | refs/heads/master | 2022-11-28T01:43:19.778901 | 2021-07-26T14:26:56 | 2021-07-26T14:26:56 | 115,327,621 | 44 | 12 | null | 2022-11-22T03:19:43 | 2017-12-25T09:57:51 | Jupyter Notebook | UTF-8 | Python | false | false | 5,606 | py | #-*- coding:utf-8 -*-
"""
Created on 2018 08.20
@author: liupeng
wechat: lp9628
blog: http://blog.csdn.net/u014365862/article/details/78422372
github:https://github.com/MachineLP
"""
import numpy as np
import random
import os
from tqdm import tqdm
import pandas as pd
import cv2
from keras.models import *
from keras.la... | [
"MachineLP@163.com"
] | MachineLP@163.com |
e337fb2ce228de5ea24a0eadacebd95281a8a778 | 2dc12207547c3438421905aee1c506d427e0cbf1 | /ex01-VBA/oftk/oftk.py | ed761d0463964134fc089e7804df1d6f361784db | [] | no_license | xmduhan/reading_notes__learning_python | 8b61ea30be3fb50e1ad49764fcfc8bee8189f48e | 3526f6b07cb2be799b2baddd7a2e3afef27e7b81 | refs/heads/master | 2020-05-17T16:26:23.624423 | 2014-06-15T04:43:38 | 2014-06-15T04:43:38 | 16,638,479 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,045 | py | # -*- coding: utf-8 -*-
"""
提供较为复杂office实用方法包,主要为最终脚本封装服务
"""
#%%
import win32com
from pandas.io.excel import ExcelWriter
from ppt import FourChartPage,ThreeChartPage
from oftkl import forcePowerPointQuit,forceExcelQuit
def dfs2Excel(dfs,sheetnames,filename):
'''
将一些列DataFrame保存到Excel中
'''
e... | [
"xmduhan@gmail.com"
] | xmduhan@gmail.com |
5e08bea7685fe6298559323afd87539f59943757 | b86a9c5672c754d06f2c162171adc7989850391e | /scripts/interesting_times.py | 48e23ac9f77ed6b36ed4bf3e405da4040d133deb | [] | no_license | OSUrobotics/map_analysis | 3741f9f1ba06024909081578d416ab4ea0b3c7ed | 4fd613f2275dcb9495b764ac616fd45f0fdeb7aa | refs/heads/master | 2020-06-07T18:25:37.415335 | 2015-10-23T21:39:58 | 2015-10-23T21:39:58 | 36,688,694 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 7,055 | py | #!/usr/bin/env python
from map_analysis.math import ssd_mat as ssd
from map_analysis.bag_utils import extract_clusters
import rosbag
import rospy
import numpy as np
import os
import yaml
from sklearn.cluster import MeanShift
N_BINS = 100
LOWER_CUTOFF_BIN = 6
ACCEL_THRESH = 0.1
ANG_VEL_THRESH = 0.05
IMU_THRESH = (A... | [
"dan@lazewatsky.com"
] | dan@lazewatsky.com |
5785eef3b295c5bcd717d058e1f587ab7b09969c | bc5e3ec2665f795b84671317ce736719ab79dc0f | /maintain_frontend/add_land_charge/additional_info.py | ba1be7ea89ab14fed269cac0314bd9b782028451 | [
"MIT"
] | permissive | uk-gov-mirror/LandRegistry.maintain-frontend | 9de44a9f42c4c29682276420dcf297d0afb48e5f | d92446a9972ebbcd9a43a7a7444a528aa2f30bf7 | refs/heads/master | 2021-09-26T16:14:55.686790 | 2018-10-29T15:37:03 | 2018-10-31T14:42:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,192 | py | from flask import render_template, redirect, url_for, request, current_app, g
from maintain_frontend.add_land_charge.validation.additional_info_validator import AddChargeAdditionalInfoValidator
from maintain_frontend.decorators import requires_permission
from maintain_frontend.constants.permissions import Permissions
f... | [
"james.lademann@landregistry.gov.uk"
] | james.lademann@landregistry.gov.uk |
47d16875597999f97a3101c84dce17f19918e14b | cfcd117378664e4bea080b3c1011a25a575b3d51 | /tests/hawc/apps/epiv2/test_forms.py | baa0d0ef5a99251273da6e02c3ff502478f45612 | [
"MIT"
] | permissive | shapiromatron/hawc | 9d3a625da54d336334da4576bd5dac6915c18d4f | 51177c6fb9354cd028f7099fc10d83b1051fd50d | refs/heads/main | 2023-08-03T13:04:23.836537 | 2023-08-01T18:39:16 | 2023-08-01T18:39:16 | 25,273,569 | 25 | 15 | NOASSERTION | 2023-09-14T17:03:48 | 2014-10-15T21:06:33 | Python | UTF-8 | Python | false | false | 2,669 | py | from copy import deepcopy
import pytest
from hawc.apps.epiv2 import constants, forms, models
@pytest.mark.django_db
class TestExposureLevelForm:
def test_clean(self):
instance = models.ExposureLevel.objects.first()
form = forms.ExposureLevelForm({}, instance=instance)
data = deepcopy(fo... | [
"noreply@github.com"
] | shapiromatron.noreply@github.com |
ceb83747658d076352ad31124c7b477bd6483433 | 045cb1a5638c3575296f83471758dc09a8065725 | /addons/sale_margin/__init__.py | faf3ae29a42356d58837f254849bed0b71a93427 | [] | no_license | marionumza/saas | 7236842b0db98d1a0d0c3c88df32d268509629cb | 148dd95d991a348ebbaff9396759a7dd1fe6e101 | refs/heads/main | 2023-03-27T14:08:57.121601 | 2021-03-20T07:59:08 | 2021-03-20T07:59:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 169 | py | # -*- coding: utf-8 -*-
# Part of Harpiya. See LICENSE file for full copyright and licensing details.
from . import models # noqa
from . import report # noqa
| [
"yasir@harpiya.com"
] | yasir@harpiya.com |
01ddc31826c02eb69c81a524e466d50b9aee3012 | d13215e2cff8eaeabde1242c9e23c309d7be2036 | /backendgroovebug 1.2.7/tests/FeaturedHandlerTests.py | 3eaa88098f3d29382cba9c7e33c9d88bf34f80b2 | [] | no_license | bbcawodu/groovebug_backend | 182bf0ce8a5285c3870bfac6b7f3cd4190ef19bb | 4ddf8a2c60747775a01ad1b4f4d6bf50d3e065b6 | refs/heads/master | 2020-03-29T17:23:03.158385 | 2018-09-24T19:47:47 | 2018-09-24T19:47:47 | 150,159,311 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,445 | py | # -*- coding: utf-8 -*-
import unittest, httplib2, CompositeHandlerTests, random
from django.utils import simplejson as json
class FeaturedTestsCase(unittest.TestCase):
def __init__(self, methodName='runTest'):
super(FeaturedTestsCase,self).__init__(methodName)
self.h = httplib2.Http()... | [
"awodubradley@gmail.com"
] | awodubradley@gmail.com |
a0e62324ceb268f819381df866e560d72a14d03d | c7427aeec5599a828209efd3c2805e0b9159d1a3 | /src/900_batch/401_download.py | 344d4bfcde61aee17d867bc198afc000d2069d3a | [] | no_license | nakamura196/genji_curation | 817690098fe6e0ea9f351edd8d21b4cb49a11c53 | b7988e2125b68c3014dbeacad7c8ce795014eb7c | refs/heads/master | 2023-04-14T01:27:39.322047 | 2021-04-30T00:04:54 | 2021-04-30T00:04:54 | 255,350,404 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,021 | py | # coding: utf-8
import requests
import time
import os
import shutil
def download_img(url, file_name):
r = requests.get(url, stream=True)
if r.status_code == 200:
with open(file_name, 'wb') as f:
r.raw.decode_content = True
shutil.copyfileobj(r.raw, f)
for i in range(1, 55):
... | [
"na.kamura.1263@gmail.com"
] | na.kamura.1263@gmail.com |
4cb87df7a2261222718c970129d213f4a4d5a65d | 444f065c041ff559ac4d7aa8bbbd54d9bbac9dbb | /small-strain/laminate/non-linear-elasticity.py | 26e14533f3429cfca92301139b28c89e0d9372e7 | [
"MIT"
] | permissive | shahul31/GooseFFT | 358e0369237d709a93ab12e32189ded5effaac23 | 1e460e6fed750cbaf33139e13cfc27dee5ab291e | refs/heads/master | 2023-08-30T06:27:27.276732 | 2021-11-15T07:37:12 | 2021-11-15T07:37:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,469 | py | import numpy as np
import scipy.sparse.linalg as sp
import itertools
# turn of warning for zero division (occurs due to vectorization)
np.seterr(divide='ignore', invalid='ignore')
# ----------------------------------- GRID ------------------------------------
Nx = 31 # number of voxels in x-direction... | [
"tom@geus.me"
] | tom@geus.me |
c4a305d145cdf8cc8f2ef04f1d012a1e4ebefe8e | 480e33f95eec2e471c563d4c0661784c92396368 | /DQM/BeamMonitor/python/AlcaBeamMonitor_cff.py | b4945921bdd6052db519a460eef04bd8eed9c528 | [
"Apache-2.0"
] | permissive | cms-nanoAOD/cmssw | 4d836e5b76ae5075c232de5e062d286e2026e8bd | 4eccb8a758b605875003124dd55ea58552b86af1 | refs/heads/master-cmsswmaster | 2021-01-23T21:19:52.295420 | 2020-08-27T08:01:20 | 2020-08-27T08:01:20 | 102,867,729 | 7 | 14 | Apache-2.0 | 2022-05-23T07:58:09 | 2017-09-08T14:03:57 | C++ | UTF-8 | Python | false | false | 307 | py | import FWCore.ParameterSet.Config as cms
from DQM.BeamMonitor.AlcaBeamMonitor_cfi import *
import RecoVertex.BeamSpotProducer.BeamSpotOnline_cfi
scalerBeamSpot = RecoVertex.BeamSpotProducer.BeamSpotOnline_cfi.onlineBeamSpotProducer.clone()
alcaBeamMonitor = cms.Sequence( scalerBeamSpot*AlcaBeamMonitor )
| [
"giulio.eulisse@gmail.com"
] | giulio.eulisse@gmail.com |
daafcb01e0017a71f1a66d9832fb171358e18eed | 6586ea2308776313d877a429ecebc3385a58896c | /dags-ttpl/testme.py | ff73873c3915e6c71e469e99291323efb026c781 | [
"BSD-3-Clause"
] | permissive | vipul-tm/DAG | a36c177670c0d71891fb78dbe18942f108df408e | d0d3edcae0986773977963ddae0375e39bbbde95 | refs/heads/master | 2020-09-09T19:53:00.877960 | 2018-02-07T11:34:06 | 2018-02-07T11:34:06 | 94,444,933 | 3 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,156 | py | from airflow import DAG
from airflow.operators import ApiExtractor
from datetime import datetime, timedelta
from airflow.models import Variable
#from airflow.telrad_extractor_operator import TelradExtractor
default_args = {
'owner': 'wireless',
'depends_on_past': False,
'start_date': datetime.now() -... | [
"vipul.sharma@teramatrix.in"
] | vipul.sharma@teramatrix.in |
edd214088c4c67b4175c0ded5394123fb696a8a0 | 73543b2e172b5b2fd64cf6903f1fc4251335cb15 | /c_example.py | 390aadad4898fdaabd2b29c29d9ede5c7214ffe8 | [] | no_license | stnava/C | d7f2d035672823551262bd92918040d375d630dc | 39c86bb4375eb620465a206b6f9743e7a5602167 | refs/heads/master | 2021-06-10T17:14:03.625072 | 2019-05-10T01:22:51 | 2019-05-10T01:22:51 | 13,416,716 | 1 | 2 | null | 2019-05-10T01:22:52 | 2013-10-08T15:01:42 | R | UTF-8 | Python | false | false | 1,091 | py | import ants
import os
# Read in the images
dataDirectory = './data/'
fixedImageFile = dataDirectory + 'chalf.nii.gz'
fixedImage = ants.image_read( fixedImageFile, dimension = 2 )
movingImageFile = dataDirectory + 'c.nii.gz'
movingImage = ants.image_read( movingImageFile, dimension = 2 )
# Plot the fixed and moving... | [
"ntustison@gmail.com"
] | ntustison@gmail.com |
bb6afd98e83cf160abc8ab4edf4beba1d56d6a1f | 2f1bde1788642b637da63471495fb47102dc5b0b | /poleno/invitations/migrations/0004_invitationsupply_data.py | baaa4a4dc70146cc998f10cc3765a9b091415b4b | [] | no_license | martinmacko47/chcemvediet | 841c9c8529f1e1a552138ec23c715e9750a127db | 945cb89f37272d79dc38370c7fb481380a3d8472 | refs/heads/master | 2022-07-14T19:31:46.448495 | 2022-05-31T17:01:53 | 2022-05-31T17:01:53 | 13,114,888 | 6 | 5 | null | 2022-05-31T17:01:53 | 2013-09-26T06:41:40 | Python | UTF-8 | Python | false | false | 852 | py | # vim: expandtab
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
# Creates default InvitationSupply objects for all registered users.
def forward(apps, schema_editor):
InvitationSupply = apps.get_model(u'invitations', u'InvitationSupply')
User = apps.g... | [
"martin@github.ksp.sk"
] | martin@github.ksp.sk |
0414aafd897a77bba22e825c1b33950597bfbc1a | 62b04f9f2cc8ec5c4ccaaf918bbc48c32367a3a3 | /spotty/providers/gcp/instance_deployment.py | e4e9ce055cb9dca72cb1b5b09daaf149314f6723 | [
"MIT"
] | permissive | spotty-cloud/spotty | 80e9bb703df505c9f9c11e9efa0466bda6e419bd | bdbacd4e893bbc5e5372f11cac4658dc683a4904 | refs/heads/dev | 2023-08-11T00:32:52.906420 | 2022-06-25T19:46:14 | 2022-06-25T19:46:14 | 108,915,261 | 234 | 17 | MIT | 2023-06-18T16:27:56 | 2017-10-30T22:26:37 | Python | UTF-8 | Python | false | false | 4,802 | py | from spotty.commands.writers.abstract_output_writrer import AbstractOutputWriter
from spotty.deployment.abstract_cloud_instance.abstract_instance_deployment import AbstractInstanceDeployment
from spotty.deployment.container.docker.docker_commands import DockerCommands
from spotty.deployment.utils.print_info import rend... | [
"apls777@gmail.com"
] | apls777@gmail.com |
72af923f59b373a2b0dacf8039359c62aaf6bdbb | 9848a719ddfdd21b5fe1fa2f55da290c0f6952dc | /minimum-deletions-to-make-character-frequencies-unique.py | ce449ea6f477c4188ae8880f90d51a11fffe4efb | [] | no_license | maomao905/algo | 725f7fe27bb13e08049693765e4814b98fb0065a | 84b35ec9a4e4319b29eb5f0f226543c9f3f47630 | refs/heads/master | 2023-03-13T12:38:55.401373 | 2021-03-25T01:55:48 | 2021-03-25T01:55:48 | 351,278,248 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 782 | py | """
allocate the more than 1 freq to free space
O(N)
"""
from collections import Counter
class Solution:
def minDeletions(self, s: str) -> int:
cnt = Counter(s)
cnt = Counter(cnt.values())
ans = 0
stack = []
for freq in range(max(cnt.keys())+1):
if cnt[f... | [
"maoya.sato@gmail.com"
] | maoya.sato@gmail.com |
fdf4d2c335e898efaddb7d3eec93c8754c1e74b8 | c113158bf6ce1edeb24298d711fddc56af2d62ee | /heltour/tournament/migrations/0092_leaguemoderator_send_contact_emails.py | 07003f4473fa52b9c0e49971416cf10d716630dc | [
"MIT"
] | permissive | elvisaronsp/heltour | 44d05b6e195b5fd939304ac776167e85762aec83 | f5444552293ee4d51cbc7cf025857ed23d7d03dd | refs/heads/master | 2020-06-19T06:16:54.312479 | 2019-05-26T15:13:33 | 2019-05-26T15:13:33 | 196,594,361 | 1 | 0 | MIT | 2019-07-12T14:34:58 | 2019-07-12T14:34:58 | null | UTF-8 | Python | false | false | 444 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-09-13 22:51
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('tournament', '0091_remove_player_is_moderator'),
]
operations = [
migrations.AddField(
model_name='leag... | [
"ben.cyanfish@gmail.com"
] | ben.cyanfish@gmail.com |
e51bf9525d20d7587f6bce7eee67de3056ca99b7 | a99a44aee5cfc5e080f6d83d2bcc1c3d273a3426 | /scripts/uscrn/compute_uscrn_pday.py | b106e21ce979d024792f2a8dc3ac4f6d433e8671 | [
"MIT"
] | permissive | ragesah/iem | 1513929c8bc7f254048271d61b4c4cf27a5731d7 | 8ed970d426bddeaa3e7ded593665d22f0f9f6e87 | refs/heads/main | 2023-08-20T20:01:15.480833 | 2021-10-12T15:44:52 | 2021-10-12T15:44:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,755 | py | """Compute the daily USCRN precipitation total.
Called from `RUN_20_AFTER.sh` for current date.
Called from `RUN_12Z.sh` for yesterday and a week ago.
"""
# pylint: disable=cell-var-from-loop
import sys
import datetime
try:
from zoneinfo import ZoneInfo
except ImportError:
from backports.zoneinfo import ZoneI... | [
"akrherz@iastate.edu"
] | akrherz@iastate.edu |
5f242e7c4ce9886aac55e1cdb84c00377d737a0e | b41e0def0792c55ee12a452bf34c1e339487b42c | /extras/arrange_data/compute_plumb_fluxes.py | 17034cc1e3499633fc392fe5b7ea76cfb077005b | [] | no_license | marisolosman/assessment_SH_zonal_asymmetries | ba6e0a9c38019313367dbbe5914c45aa4f23b19e | dc400f09be8c6845ce86d28e2ab7bc9bfb37fcc8 | refs/heads/master | 2022-12-25T00:52:31.678839 | 2022-12-19T13:34:37 | 2022-12-19T13:34:37 | 194,651,414 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 2,534 | py | #sort el ninio events
import numpy as np
import xarray as xr
import pandas as pd
import plumb_flux
import os
os.environ['HDF5_USE_FILE_LOCKING'] = 'FALSE'
RUTA='/storage/shared/glusterfs/acrcc/users/vg140344/data/'
#abro el archivo de geopotencial y junto la coordenada year y numbre
winds = xr.open_dataset(RUTA + 'win... | [
"marisolosman17@gmail.com"
] | marisolosman17@gmail.com |
5e8eb86858fe9fdc808c6e34a37aa5b8bb34e3c6 | d9aece850fb295c43c42cb907f200285c33e0087 | /aizu/lectures/introduction_to_programming_ii/set/set_delete.py | 35e78655f5367c34b32b2fdf649589d2919d95d1 | [] | no_license | memicq/ProgrammingContestAnswers | 02a8f9ba76819cb04fb9934c6945a5de0735e6d4 | b679894cadcbab1b84037db6fb8fd496079cf63a | refs/heads/master | 2020-03-30T23:12:10.570349 | 2019-04-18T06:33:53 | 2019-04-18T06:33:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 460 | py | #! python3
# set_delete.py
numset = set([])
q = int(input())
for i in range(q):
query = list(map(int, input().split(' ')))
x = query[1]
if query[0] == 0:
numset.add(x)
print(len(numset))
elif query[0] == 1:
if set([x]).issubset(numset):
print(1)
else:
... | [
"jgr9ey2ug8@gmail.com"
] | jgr9ey2ug8@gmail.com |
916601f25ccf69608f06d9edd27a76f957e2647a | 75566ef3423c72fe9e73075dfe29df172b65a28c | /src/data/migrations/0017_userprofile_avatar.py | 08d13fd6240eb924f6ad2e6bab5a09609cc27ae5 | [] | no_license | bicsi/cpaggregator | 7020663305eeff8690e92da64fc796926b12fe31 | b6459fe33c19dc2020b29470e457f0666b0ff212 | refs/heads/master | 2022-12-12T10:24:38.756844 | 2020-11-11T13:53:30 | 2020-11-11T13:53:30 | 153,731,264 | 2 | 1 | null | 2022-12-08T01:15:28 | 2018-10-19T05:33:06 | CSS | UTF-8 | Python | false | false | 446 | py | # Generated by Django 2.1.2 on 2018-11-02 19:10
import data.models
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('data', '0016_auto_20181102_1556'),
]
operations = [
migrations.AddField(
model_name='userprofile',
... | [
"lucianbicsi@gmail.com"
] | lucianbicsi@gmail.com |
2b413dc9dd450636c82d29b3933c7c612d7735a5 | e4a7a444d0fca8ad9cf135b36258afa53970d0fa | /HashTable.py | 1edb17857fcbe1e0d24fa9d59318ddc8849d4612 | [] | no_license | vpc20/python-misc | 225b0e6a9ee60adc536cbf42155665e55dc93ed6 | b0c7be9a6a85818cf873c72c5b5408486457eb8c | refs/heads/master | 2021-07-17T09:45:49.376126 | 2021-05-15T23:07:37 | 2021-05-15T23:07:37 | 248,102,508 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 848 | py | HASH_TABLE_SIZE = 1024
class HashTable:
# def __init__(self, key, value):
# self.key = key
# self.value = value
hash_table = []
bucket = []
item = []
def __init__(self):
pass
def hash_func(self, key):
bucket_size = 128
hash_val = 0
for ch in k... | [
"cuevasvp@gmail.com"
] | cuevasvp@gmail.com |
2b1cf5b442c1a9a21767110353314f325d8bc153 | 85147eec46810841bd49918dd3df8d423e9f1a04 | /custom_wizard/__manifest__.py | cda182234923f1f6190f32b3b2f1f9afe7a86292 | [] | no_license | khyasir/odoo-10 | 999cade56501d96030399ecc3d525d5647ea5228 | f745b6fe70748444b0a70d854d2273d8d24337cf | refs/heads/master | 2021-08-16T22:45:01.532494 | 2017-11-20T12:37:12 | 2017-11-20T12:37:12 | 106,803,831 | 0 | 3 | null | null | null | null | UTF-8 | Python | false | false | 195 | py | # -*- coding: utf-8 -*-
{ 'name': 'custom_wizard',
'description': 'custom_wizard',
'author': 'yasir rauf',
'depends': ['base','test1'],
'data': ['views/todo_wizard_view.xml'], }
| [
"yasirkrauf@yahoo.com"
] | yasirkrauf@yahoo.com |
5f26a14eb67fc5079bb5472e5b4f58c97c99fd63 | 5ace97f6bf2aeb661b4c544e1cc183684afe8413 | /euler/65.py | 904aa6d4f5fab6e0500055eacb863477c9a286a3 | [] | no_license | crazymerlyn/code | 1aada845b70486ef45408ff67bd722d910c58dd6 | 3deed9c8a1393c160866f33d5efc6dd3d1a4c469 | refs/heads/master | 2022-07-26T21:13:23.588366 | 2022-06-11T15:35:13 | 2022-06-11T15:35:13 | 97,077,698 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 208 | py | from fractions import Fraction
res = Fraction(1, 1)
for i in range(99, 1, -1):
digit = 2*i//3 if i % 3 == 0 else 1
res = digit + 1/res
res = 2 + 1/res
print(sum(int(d) for d in str(res.numerator)))
| [
"crazy.d.merlyn@gmail.com"
] | crazy.d.merlyn@gmail.com |
e67295499036ad495931414d22941b182e934f9a | 8e7b56e6cef9951c5c9a3593f2a40a301d274bfc | /pfizer.py | bea0b7544279005ac49b15eaf052eae84fd099d2 | [] | no_license | soumil0702/VacAvl | 40a1d1cadadf3eea33882dcd3724877ddc0890d0 | f89158d19b13f36281e668e747aa1bbfeaee19bf | refs/heads/master | 2023-06-04T23:20:48.305428 | 2021-06-18T00:38:26 | 2021-06-18T00:38:26 | 377,994,800 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 861 | py | '''
Created on 18 Jun 2021
@author: soumi
'''
from selenium.webdriver.chrome.options import Options
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver import ActionChains
import time
# example of adding o... | [
"you@example.com"
] | you@example.com |
d4313881b0e6087a2e0f3faa32adfcfa331ef676 | 5a01ebf2479599ea89c1e767e76fabbfbd0271cb | /chainer/functions/math/average.py | e742ec8d7474a7672b56ac0c100dd9055ead8d87 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | ywatanabex/chainer | d3f161848842c1e82d868fcd083c41242ee4e471 | a98bace8a52960a2b8a5ba4ab467c3e7052668a7 | refs/heads/master | 2020-12-25T03:21:29.251523 | 2017-05-01T05:45:25 | 2017-05-01T05:45:25 | 52,711,297 | 3 | 0 | null | 2016-02-28T08:08:59 | 2016-02-28T08:08:59 | null | UTF-8 | Python | false | false | 1,834 | py | from chainer.functions.array import broadcast
from chainer.functions.array import reshape
from chainer.functions.math import sum as sum_mod
def average(x, axis=None, weights=None, keepdims=False):
"""Calculate weighted average of array elements over a given axis.
Args:
x (~chainer.Variable): Elements... | [
"unnonouno@gmail.com"
] | unnonouno@gmail.com |
1eb7cac4728387a1be1b7bceee3402a7c5c9c313 | b685036280331fa50fcd87f269521342ec1b437b | /src/demo/Sina_Data_Collection/collection/comments_crawler.py | 1963f73a5a9c9acb0c3586694364b9a45166a14f | [] | no_license | chenqing666/myML_DM_Test | f875cb5b2a92e81bc3de2a0070c0185b7eacac89 | 5ac38f7872d94ca7cedd4f5057bb93732b5edbad | refs/heads/master | 2022-02-26T01:52:06.293025 | 2019-09-20T06:35:25 | 2019-09-20T06:35:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,925 | py | import requests
import random
from requests.exceptions import RequestException
import time
from urllib.parse import urlsplit
import urllib.parse
from math import ceil
import multiprocessing
import threading
from src.demo.Sina_Data_Collection.common.util import mkdir
import logging
logging.basicConfig(level=logging.DEB... | [
"hejinrong@news.cn"
] | hejinrong@news.cn |
3c1773ecbb73fd5180abac709f6d2e6a44949f6a | 22931d5e91db42645510fd2f3ef8617c1e36cfb5 | /Task 12: Mayfair.py | 4d319e68ad6131af75334ee78036db4838afcb7d | [] | no_license | sasha00123/PillowTutorial | 9e1c738eb7723fc105b7a197c4471e6c82a96766 | 6fbbc98c1f4332b2ca1c6c58b3a76d6124bf8ffe | refs/heads/master | 2022-05-30T13:09:39.919304 | 2020-05-03T16:12:23 | 2020-05-03T16:12:23 | 260,966,371 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 711 | py | from PIL import Image
with Image.open("virus.png") as img:
img = img.convert("RGBA")
pixels = img.load()
center_x, center_y = img.width // 2, img.height // 2
radius = img.width // 2
diff_center, diff_border = 2, 0.1
for x in range(img.width):
for y in range(img.height):
r,... | [
"sasha@bashkort.org"
] | sasha@bashkort.org |
95eaca84943445445f9447b9b5b10d39a18cfe0a | d2c229f74a3ca61d6a22f64de51215d9e30c5c11 | /qiskit/result/mitigation/base_readout_mitigator.py | fd2abad24d0db134f3a937111d4dfa8916908b3b | [
"Apache-2.0"
] | permissive | 1ucian0/qiskit-terra | 90e8be8a7b392fbb4b3aa9784c641a818a180e4c | 0b51250e219ca303654fc28a318c21366584ccd3 | refs/heads/main | 2023-08-31T07:50:33.568824 | 2023-08-22T01:52:53 | 2023-08-22T01:52:53 | 140,555,676 | 6 | 1 | Apache-2.0 | 2023-09-14T13:21:54 | 2018-07-11T09:52:28 | Python | UTF-8 | Python | false | false | 3,165 | py | # This code is part of Qiskit.
#
# (C) Copyright IBM 2021
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wor... | [
"noreply@github.com"
] | 1ucian0.noreply@github.com |
18227cdac01dc6bddfff355e3ae303c711f6c3d3 | 87acc9143e21c1e76c83131fd42032d8c8ccaf1d | /r5bandisplaysensor.py | 4eb4b9e927bb1ac6d0c115eb11c0645a89530801 | [] | no_license | Tubbz-alt/Leakage-Resilient-and-Lightweight-AKE-protocol-for-E-Health | c739035044982ffe2df99e690921680908311957 | 158d4d66b59d0d35ac2a6f74430f01e22e286348 | refs/heads/master | 2022-12-02T19:57:08.809874 | 2020-08-22T08:08:24 | 2020-08-22T08:08:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,992 | py | import errno
import socket
import time
import random
import hmac
from time import clock
from collections import OrderedDict
from ecc.Key import Key
from hashlib import sha256,md5
from ecc.elliptic import mul,add,neg
from time import clock
from getCPU import getMemCpu, main
DOMAINS = {
# Bits : (p... | [
"noreply@github.com"
] | Tubbz-alt.noreply@github.com |
6d095cc60ae71c7f58521951b4db94c9c670e087 | 62d6a37e1fb1b224b53e14a1cf151ef0571aa20f | /orun/core/checks/database.py | a39d6336f5cbbf4695a8d57b9b296fcee32eea01 | [] | no_license | katrid/orun | 4fa0f291a1ef43f16bc1857a170fc0b2e5e06739 | bfc6dae06182124ba75b1f3761d81ba8ca387dea | refs/heads/master | 2023-08-30T03:58:34.570527 | 2023-08-09T04:05:30 | 2023-08-09T04:05:30 | 66,562,767 | 14 | 4 | null | 2023-01-06T22:29:37 | 2016-08-25T14:01:44 | Python | UTF-8 | Python | false | false | 259 | py | from orun.db import connections
from . import Tags, register
@register(Tags.database)
def check_database_backends(*args, **kwargs):
issues = []
for conn in connections.all():
issues.extend(conn.validation.check(**kwargs))
return issues
| [
"alexandre@katrid.com"
] | alexandre@katrid.com |
c257a9d3b2d9894b5753be4c9cb30e9511ec3d9d | 71f00ed87cd980bb2f92c08b085c5abe40a317fb | /Data/GoogleCloud/google-cloud-sdk/lib/surface/run/services/update.py | 99adaebce0ca8857402c578e626f6ebb04c17af5 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | factoryofthesun/Rao-NLP | 2bd8269a8eed1cb352c14c8fde88e3111ccca088 | 87f9723f5ee51bd21310d58c3425a2a7271ec3c5 | refs/heads/master | 2023-04-18T08:54:08.370155 | 2020-06-09T23:24:07 | 2020-06-09T23:24:07 | 248,070,291 | 0 | 1 | null | 2021-04-30T21:13:04 | 2020-03-17T20:49:03 | Python | UTF-8 | Python | false | false | 6,168 | py | # -*- coding: utf-8 -*- #
# Copyright 2018 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | [
"guanzhi97@gmail.com"
] | guanzhi97@gmail.com |
c0d4d59aa385f17622bfcb39b8c5891637d4cf32 | 2c59e943a98fe0c25b2f7267324fe850603def57 | /leetcode/数组/矩阵里的幻方.py | 9ee8e620a13b23df08c81a36ef184672b619c6a9 | [] | no_license | xxNB/sword-offer | 047dd6b3db7ea24af1a83d5a7a46ab47daa9ab85 | e2699a43e9f7aecc475e21a4b2582c6ee3b41a1c | refs/heads/master | 2021-07-06T18:44:47.074632 | 2019-01-16T15:57:27 | 2019-01-16T15:57:27 | 125,879,250 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,442 | py | class Solution:
def numMagicSquaresInside(self, grid):
"""
直接按照河图的规定去做就OK了。用到了一个结论:河图的中心数字是5.
注意一个易忽略的点,就是所有的数字应该在1~9之间。测试用例里面出现了不在这个范围内的数字也能组成河图。
另外,关于河图,其实有很多有用的结论,我并没有使用。
河图记忆方法:偶角奇边坐心五.一线双角相对画.
:param grid:
:return:
"""
if len(grid) < 3 ... | [
"zhangxin@juxinli.com"
] | zhangxin@juxinli.com |
ed210c26d050c4a6f47cb31df8339d0cac104f1f | 483d0589f1efc10af3cbffe44b8abfe8031bf776 | /descarteslabs/client/deprecation.py | 99eacacf7eee6d7d89d7c3daceb32e2b5ec818fb | [
"Apache-2.0"
] | permissive | grpecunia/descarteslabs-python | 3f4129748c8b251c76cf094d34485ea2e563d174 | c99c3091f2629c758a27de4d8fd6e4a39a7b3013 | refs/heads/master | 2020-09-11T14:51:00.390072 | 2019-11-15T20:41:27 | 2019-11-15T21:02:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,526 | py | # Copyright 2018-2019 Descartes Labs.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | [
"support@descarteslabs.com"
] | support@descarteslabs.com |
fa3caf91fdfa6eea59b1b13eadf046002ed80126 | 45de3aa97525713e3a452c18dcabe61ac9cf0877 | /src/primaires/salle/editeurs/decedit/__init__.py | 8d0d2e9257ddce5b2aad1d56f4b5cb474674a5cf | [
"BSD-3-Clause"
] | permissive | stormi/tsunami | 95a6da188eadea3620c70f7028f32806ee2ec0d1 | bdc853229834b52b2ee8ed54a3161a1a3133d926 | refs/heads/master | 2020-12-26T04:27:13.578652 | 2015-11-17T21:32:38 | 2015-11-17T21:32:38 | 25,606,146 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,271 | py | # -*-coding:Utf-8 -*
# Copyright (c) 2012 LE GOFF Vincent
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# l... | [
"kredh@free.fr"
] | kredh@free.fr |
02685bdf19cd4101cb743d53dcd382fbc35761c6 | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_356/ch22_2019_03_15_01_41_05_399028.py | 6d6bdfecaacd5b619bdb0d497487b03f0d4a75f5 | [] | 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 | 139 | py | def eh_bissexto(n):
if n %4==0 and n %100!=0:
return True
else:
return False
a=eh_bissexto(2012)
print(a) | [
"you@example.com"
] | you@example.com |
0e0f456093bfd5c4f64ec783d12026fea10821d6 | 3a53cc14b7b4a85feb6f3b7655e82c7cce6f1ee9 | /apiapp/views.py | 08453be8f0b9cb57f401b53f487b32acb001516f | [] | no_license | codeboy/test-auth | e6bcbc7f24eaf901d6a0b23a040ebb94a2ae967d | 7f3cf7b7e1bcceb40fe25cf62d2bb41da40ec5b7 | refs/heads/master | 2022-12-08T01:37:29.627967 | 2020-08-30T18:49:12 | 2020-08-30T18:49:12 | 291,056,247 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,155 | py | from django.http import HttpResponse
from django.views import View
from django.views.generic.base import TemplateView
from django.conf import settings
import requests
import json
import logging
from .api_request import BaseRequest
logger = logging.getLogger(__name__)
api_url = "https://slb.medv.ru/api/v2/"... | [
"developer.ru@gmail.com"
] | developer.ru@gmail.com |
0517e2ec49a26b3338d140caf4054415ec2d559f | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/Cases/2229/.mooctest/answer.py | 40aed8482b6387582434f99db13ab92290b908aa | [] | 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 | 369 | py | class Solution(object):
def isIdealPermutation(self, A):
"""
:type A: List[int]
:rtype: bool
"""
for i in range(len(A)):
if A[i] != i and abs(A[i] - i) > 1:
return False
return True
b = input().split(',')
c= []
for i in b:
c.append(int(... | [
"382335657@qq.com"
] | 382335657@qq.com |
1fd30e2ab17421dd10cc1a9c8d2845b840e02bbe | 7a4ac773912fa5c3eb3f8d684eb6050e403832b0 | /python/machine-learning/mlmpy/run_nbayes1.py | 3bb3187e43323ba190b7b361b6ab2defef02d496 | [] | no_license | macinjoke/various | 8e7de61b7bec28bd4b5e6210243fec1891b77f5e | 11ff1d09a94dba41ffd586eb8a56175a94c1674c | refs/heads/master | 2022-12-24T15:02:21.726248 | 2018-12-09T12:58:51 | 2018-12-09T12:58:51 | 81,713,017 | 0 | 0 | null | 2022-12-14T03:10:15 | 2017-02-12T08:31:34 | JavaScript | UTF-8 | Python | false | false | 463 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
NaiveBayes1 test runner
Chapter "Naive Bayes: a Primary Course"
"""
# imports
import numpy as np
from nbayes1 import NaiveBayes1
# load data
data = np.genfromtxt('vote_filled.tsv', dtype=np.int)
# split data
X = data[:, :-1]
y = data[:, -1]
# learn model
clr = Naiv... | [
"shunji.makino@gmail.com"
] | shunji.makino@gmail.com |
650305ea33ececa3eba8983997718956011b3d00 | 27010a7ad70bf69511858a91d42dc7a64e61b66d | /src/1647_minimum_deletions_to_make_characters_frequencies_unique.py | ec06228335859e01622e3ed34a839a5b9b79484e | [
"Apache-2.0"
] | permissive | hariharanragothaman/leetcode-solutions | fb7d967f2c6e3f4c936e3c7afe369415bc8d2dc6 | 44e759f80d3c9df382fdf8d694d6378881e3649d | refs/heads/master | 2023-09-03T20:31:59.200701 | 2021-10-18T00:50:56 | 2021-10-18T00:50:56 | 267,927,538 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,576 | py | """
A string s is called good if there are no two different characters in s that have the same frequency.
Given a string s, return the minimum number of characters you need to delete to make s good.
The frequency of a character in a string is the number of times it appears in the string.
For example, in the string "aab... | [
"hariharanragothaman@gmail.com"
] | hariharanragothaman@gmail.com |
04f2100f729bed3969617ea8c7b98c17960ff1f1 | e20d947696ffb2422c5856ca1067c9a068705a82 | /day009/hw_002_标志位.py | 738d1a1d121d5b0b1656f172e980232b657bf1d7 | [] | no_license | lxgzhw520/ZhangBaofu | 27aed80446c687890e17c35a2bc5c93a5b75462e | 401bae4b2d8e1a284d281cc29b5ed31a4e2039a4 | refs/heads/master | 2020-05-07T16:14:06.627708 | 2019-04-21T06:20:26 | 2019-04-21T06:20:26 | 180,673,589 | 4 | 3 | null | null | null | null | UTF-8 | Python | false | false | 695 | py | # _*_ coding:UTF-8 _*_
# 开发人员: 理想国真恵玩-张大鹏
# 开发团队: 理想国真恵玩
# 开发时间: 2019/4/9 17:45
# 文件名称: hw_001_re模块的所有方法.py
# 开发工具: PyCharm
"""
修饰符 描述
re.I 使匹配对大小写不敏感
re.L 做本地化识别(locale-aware)匹配
re.M 多行匹配,影响 ^ 和 $
re.S 使 . 匹配包括换行在内的所有字符
re.U 根据Unicode字符集解析字符。这个标志影响 \w, \W, \b, \B.
re.X 该标志通过给予你更灵活的格式以便你将正则表达式写得更易于理解。
... | [
"zhangdapeng@zhangdapengdeMacBook-Pro.local"
] | zhangdapeng@zhangdapengdeMacBook-Pro.local |
8fe8890f25008209cec2ec6da60b8f033233e4ff | 665d9bad46e68f779512640e582d2522867b0dba | /Strings/227. Basic Calculator II.py | 340e989f29ed7ad85b48b9596c4eff33b8d37ab5 | [] | no_license | RahatIbnRafiq/leetcodeProblems | 6fd1e9726b14b7ad3571e5a4af5665b72f7aee0a | 2d35590d189938e0705a21be110e75e0b209ea96 | refs/heads/master | 2021-11-25T11:58:20.498911 | 2021-11-25T00:43:04 | 2021-11-25T00:43:04 | 72,865,562 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 861 | py | class Solution(object):
def calculate(self, s):
if not s:
return "0"
stack, num, sign = [], 0, "+"
for i in xrange(len(s)):
if s[i].isdigit():
num = num*10+ord(s[i])-ord("0")
if (not s[i].isdigit() and not s[i].isspace()) or i == len(s)-1:
... | [
"rahat.rafiq@colorado.edu"
] | rahat.rafiq@colorado.edu |
4b3868365dea2e67344d19503e9b90fc795b2f13 | 566754f63c0d665af01bdad8814873468f8be888 | /python/learn/thinkbayes/hockey.py | 49843500d3632f6770ddde23f4d86e211cf2d970 | [
"MIT"
] | permissive | qrsforever/workspace | 7f7b0363649b73e96526745f85a22e70b1c749c9 | 53c7ce7ca7da62c9fbb3d991ae9e4e34d07ece5f | refs/heads/master | 2022-05-04T18:58:41.562544 | 2020-05-25T04:07:00 | 2020-05-25T04:07:00 | 82,469,335 | 2 | 0 | MIT | 2022-04-12T21:54:15 | 2017-02-19T15:36:43 | Jupyter Notebook | UTF-8 | Python | false | false | 7,098 | py | #!/usr/bin/python3
# -*- coding: utf-8 -*-
"""This file contains code for use with "Think Bayes",
by Allen B. Downey, available from greenteapress.com
Copyright 2012 Allen B. Downey
License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html
"""
from __future__ import print_function, division
import math
# import col... | [
"lidong8@le.com"
] | lidong8@le.com |
d7def9364496afb02d562fbeade61854c9013e05 | 923f707341f7e6a4c86673c52ca796f40638619c | /753. Cracking the Safe.py | 19b43ca2c48670c78dea34f42c36adff3c88c52a | [] | no_license | Huijuan2015/leetcode_Python_2019 | bb1e54801faa15ee3ef2a7bd7628b6a16033f7c7 | 36c584e8f92a0725bab7a567dfd10b918408627b | refs/heads/master | 2020-04-22T13:31:55.203162 | 2020-03-10T00:00:58 | 2020-03-10T00:00:58 | 170,412,291 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 894 | py | class Solution(object):
def crackSafe(self, n, k):
"""
:type n: int
:type k: int
:rtype: str
"""
# 共有 pow(k, n)个答案, 从n个0开始, 下一个答案向后移一个
# 然后分别与k个数组合,验证是否在结果set中,不在就加入
passwords = set()
res = '0'*(n-1)
for i in range(pow(k, n)):# 为什么要循环这... | [
"huijuan1991@hotmail.com"
] | huijuan1991@hotmail.com |
e472f7692ead0893aad646a47c79b4878815bd65 | 8cccdb1ca93d1b7ed690eb096522262523948a72 | /tests/unit/libs/prices_tests.py | 213bed70a1e6a51d3951808ac64bc3b298d857a0 | [
"MIT"
] | permissive | newhub-spec/django-accounting | 6b886378219dbed1d4f2ee34e71be198a7b28eb5 | 12b01a944d368ce717b57957d26d7aa4ecd04285 | refs/heads/master | 2020-08-21T08:06:41.318805 | 2019-10-19T06:33:41 | 2019-10-19T06:33:41 | 216,116,659 | 0 | 0 | MIT | 2019-10-18T22:35:01 | 2019-10-18T22:35:01 | null | UTF-8 | Python | false | false | 1,891 | py | from decimal import Decimal as D
from itertools import product
from django.test import TestCase
from accounting.libs.prices import Price
class TestPriceObject(TestCase):
def test_can_be_instantiated_with_tax_amount(self):
price = Price('USD', D('10.00'), tax=D('2.00'))
self.assertTrue(price.is_t... | [
"dulacpier@gmail.com"
] | dulacpier@gmail.com |
ee236cf7f39750c061217715331d916a4e66500c | 12828cd0e1c852e8b52bfb71dd1b21ff85ddc09c | /serialization/serialization/snippets/views_cbv.py | 09ac804344a9b45f3f6ccb3311392f47f1648343 | [] | no_license | Hugekyung/drf-tutorial | 9a107bad6cd2abdc78de2ef1e9b5c24d0d986591 | 0d371ccfa365daef9bd6fd30e32dcf96bc20e641 | refs/heads/main | 2023-06-29T14:50:03.108915 | 2021-08-03T08:01:23 | 2021-08-03T08:01:23 | 390,978,943 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,692 | py | """ 2. Class-Based Views
- 기본적인 구현 내용은 FBV와 동일
- 확장성과 재사용성이 높아 활용성 높음
- 다중상속, Mixin 가능
- (단점)읽기 상속과 Mixin 코드에 대한 이해가 필요하다. 복잠. """
from snippets.serializers import SnippetSerializer
from snippets.permissions import IsOwnerOrReadOnly
from snippets.models import Snippet
from django.http import Http404
from re... | [
"kiki9510@gmail.com"
] | kiki9510@gmail.com |
c9955d416abbab5bdcad77f80bfc575613bcdbab | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2883/58616/317787.py | 77427e76c825b5983180944561e7d5d379e67baf | [] | 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 | 286 | py | #include<bits/stdc++.h>
using namespace std;
int main()
{
int n,m,sum=0,r=0,col=0;
char c;
cin>>n>>m;
for(int i=1;i<=n;i++)
for(int j=1;j<=m;j++)
{
cin>>c;
if (c=='B') r+=i,col+=j,sum++;
}
cout<<r/sum<<" "<<col/sum<<endl;
return 0;
} | [
"1069583789@qq.com"
] | 1069583789@qq.com |
6c5b66ca37a29d70dac600dbc40bd5321b18f5b8 | 76f59c245744e468577a293a0b9b078f064acf07 | /865.smallest-subtree-with-all-the-deepest-nodes.py | 2af95dd14cd99f69a7e929a5abf8bc8d4de2cf91 | [] | no_license | satoshun-algorithm-example/leetcode | c3774f07e653cf58640a6e7239705e58c5abde82 | 16b39e903755dea86f9a4f16df187bb8bbf835c5 | refs/heads/master | 2020-07-01T10:24:05.343283 | 2020-01-13T03:27:27 | 2020-01-13T03:27:27 | 201,144,558 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,289 | py | #
# @lc app=leetcode id=865 lang=python3
#
# [865] Smallest Subtree with all the Deepest Nodes
#
# @lc code=start
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def subtreeWithAllDeep... | [
"shun.sato1@gmail.com"
] | shun.sato1@gmail.com |
c0f7e73fe93dcf887f31037ef9eae8569a2e507b | 6f0cd8652c02b83da63993ad3b9640eb176c84f9 | /scoring/urls.py | 4c99edb7c27c481843f651a09d5c93c577c71359 | [
"BSD-2-Clause"
] | permissive | mjtamlyn/channels-scoring | 8d26e76704c19409d3efcc1890ce14dcf743b291 | 1a5dd82c0bcf33667457ed5d66dcc4125c6c950c | refs/heads/master | 2021-01-01T05:30:13.175578 | 2016-05-08T08:48:21 | 2016-05-08T08:48:21 | 58,232,745 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 302 | py | from django.conf.urls import url
from . import views
urlpatterns = [
url('^$', views.GameList.as_view(), name='index'),
url('^(?P<game_id>\d+)/$', views.GameLeaderboard.as_view(), name='leaderboard'),
url('^(?P<game_id>\d+)/score/$', views.GameDataEntry.as_view(), name='data-entry'),
]
| [
"marc.tamlyn@gmail.com"
] | marc.tamlyn@gmail.com |
ecbcebee8e1723004c91601e2aa0108384d580e9 | 56befbe23e56995f9772010f47dcbf38c8c150bc | /0x0F-python-object_relational_mapping/4-cities_by_state.py | bafa152105359c98d9209a89d8572cf57086104e | [] | no_license | lemejiamo/holbertonschool-higher_level_programming | a48175156816a856dba0ddc6888b76f6e04b7223 | 3f756ed3a907044bfc811f108d5ae98bb0e9802c | refs/heads/main | 2023-08-14T13:22:13.481356 | 2021-09-28T04:09:50 | 2021-09-28T04:09:50 | 361,910,906 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 659 | py | #!/usr/bin/python3
"""cities by state"""
import MySQLdb
from sys import argv
if __name__ == "__main__":
username = argv[1]
password = argv[2]
database_name = argv[3]
database = MySQLdb.connect(host="localhost",
port=3306,
user=username,
... | [
"luismejia69@gmail.com"
] | luismejia69@gmail.com |
e186c1c4cb9a062f6d01c8e9ce63cfdfe564e42a | 0d2f125d4ee8a2c63ef1b2ebac365631b105d34e | /queue.py | 8a18cde309ff5c5325f913671ab5cfd2940ff8ba | [] | no_license | cgsarfati/HB-Assessment7-CSDataStructures | 01b6f5b81f6bdfb26eb9667cce53c790543ea007 | bda82c3d6de7fd8290753b26d19b96fab4f44205 | refs/heads/master | 2021-01-20T07:01:57.225251 | 2017-08-27T06:40:41 | 2017-08-27T06:40:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,733 | py | """FIFO queues implemented as a list.
Warning: this is not the best way to implement a Queue."""
class Queue(object):
"""FIFO queue."""
def __init__(self):
self._list = []
def __repr__(self):
if not self._list:
return "<Queue (empty)>"
else:
return "<Queu... | [
"vagrant@vagrant.vm"
] | vagrant@vagrant.vm |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.