blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 616 | 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 777
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 149
values | src_encoding stringclasses 26
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 3 10.2M | extension stringclasses 188
values | content stringlengths 3 10.2M | authors listlengths 1 1 | author_id stringlengths 1 132 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
55c673b67c3a872708a795ab81efcb972452a59c | 07fbabf8ae74b0e6e650a9e9316f092cda34a5c1 | /Stratosphere/hashlib.py | 0a5c9b272f70ef7ba2a63894f7efdda9a53447df | [] | no_license | ryanleh/Hack-The-Box | e23ddb510ecc336e4ff0190a9209bfff5e67b31d | d5bee76489af82e659454e0ec1f75da6776c5f5e | refs/heads/master | 2020-03-19T08:33:16.061601 | 2019-12-21T14:35:03 | 2019-12-21T14:35:03 | 136,213,996 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,076 | py | import sys
class md5_hash:
def __init__(self):
print('wow')
def update(self, wtvr):
return None
def hexdigest(self):
return "5af003e100c80923ec04d65933d382cb"
class sha1_hash:
def __init___(self):
print('wow2')
def update(self, wtvr):
return None
def h... | [
"root@localhost.localdomain"
] | root@localhost.localdomain |
4a49a92dd92db1155ea8c508d5ae2f854070f821 | 9b5b643bb5f400273c92fff62884c46d3f4ee1cb | /python/pyspark/pandas/groupby.py | 072a26739d7638a43b8a9a5c3caa06f416199099 | [
"Apache-2.0",
"CC0-1.0",
"GCC-exception-3.1",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"CC-BY-SA-3.0",
"LicenseRef-scancode-free-unknown",
"LGPL-2.0-or-later",
"CPL-1.0",
"NAIST-2003",
"LicenseRef-scancode-unicode",
"CC-PDDC",
"LicenseRef-scancode-other-copyleft",
"EPL-1.0",
"L... | permissive | BryanCutler/spark | 4f7033cb2644a96efa320cd643635f8732f65f29 | 81dbaededeb450ba1b8c96af05dcafdfad928d0a | refs/heads/master | 2021-07-10T15:21:55.747776 | 2021-04-21T15:37:02 | 2021-04-21T15:37:02 | 34,092,463 | 0 | 2 | Apache-2.0 | 2018-01-26T00:20:01 | 2015-04-17T02:35:36 | Scala | UTF-8 | Python | false | false | 109,171 | 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 us... | [
"gurwls223@apache.org"
] | gurwls223@apache.org |
2251c1b980e0ba7c276b941a004f557b1dafcae3 | a2e638cd0c124254e67963bda62c21351881ee75 | /Extensions/FrontCache/FPythonCode/FC_ENUMERATIONS.py | 2ebab3cd7a889f29591a496889b0dd0e4bb6e151 | [] | no_license | webclinic017/fa-absa-py3 | 1ffa98f2bd72d541166fdaac421d3c84147a4e01 | 5e7cc7de3495145501ca53deb9efee2233ab7e1c | refs/heads/main | 2023-04-19T10:41:21.273030 | 2021-05-10T08:50:05 | 2021-05-10T08:50:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,180 | py |
'''----------------------------------------------------------------------------------------------------------
MODULE : FC_ENUMERATIONS
PROJECT : FX onto Front Arena
PURPOSE : This module holds all the enumerations needed for Frotn Cache
DEPARTMENT AND ... | [
"nencho.georogiev@absa.africa"
] | nencho.georogiev@absa.africa |
10b331ea89bbca4e56c064d4dc2ed4f373fe3126 | 3b84c4b7b16ccfd0154f8dcb75ddbbb6636373be | /google-cloud-sdk/lib/googlecloudsdk/compute/subcommands/replica_pools/replicas/list.py | a4ad5acbf30d8409f8dfa4dd0b320663fc764b51 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | twistedpair/google-cloud-sdk | 37f04872cf1ab9c9ce5ec692d2201a93679827e3 | 1f9b424c40a87b46656fc9f5e2e9c81895c7e614 | refs/heads/master | 2023-08-18T18:42:59.622485 | 2023-08-15T00:00:00 | 2023-08-15T12:14:05 | 116,506,777 | 58 | 24 | null | 2022-02-14T22:01:53 | 2018-01-06T18:40:35 | Python | UTF-8 | Python | false | false | 4,067 | py | # Copyright 2014 Google Inc. All Rights Reserved.
"""replicapool replicas list command."""
from apiclient import errors
from googlecloudsdk.api_lib.compute import rolling_updates_util as util
from googlecloudsdk.calliope import base
from googlecloudsdk.calliope import exceptions
from googlecloudsdk.core import log
f... | [
"joe@longreen.io"
] | joe@longreen.io |
9249886f971e1a8a4616d8b12c927e9f9fb1be55 | 1c33cc5f051e6010d95b03231a7f7b4af0ad367a | /windows/analyzer.py | 39857bbbbbf86dbf2a82ba6d27478646409d6918 | [] | no_license | Ryuchen/Panda-Sandbox-Analyzer | 6d29590dad74309cbe2c2e8ce2c151e8a9106ae0 | 23506bbd8047cefa1ab79d9646ce3ee5d09eb9c9 | refs/heads/master | 2020-09-27T04:45:54.966318 | 2019-12-07T00:41:46 | 2019-12-07T00:41:46 | 226,433,963 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 32,218 | py | # Copyright (C) 2011-2013 Claudio Guarnieri.
# Copyright (C) 2014-2018 Cuckoo Foundation.
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.
import datetime
import hashlib
import logging
import os
import pkgutil
import socket
import struct
import ... | [
"chenhao@geyecloud.com"
] | chenhao@geyecloud.com |
16a764ba3d1687b4e7d1e71343dad5a23cfd6d52 | 5cc6c015652636e1fc793b41e6971988e9bba06f | /tests/pydevtest/icommands.py | 7e29c8923f93347e009230e924ced719011aea0c | [
"BSD-3-Clause"
] | permissive | cchapati/irods | 77c8daae0e8a908f8edc45cacadee5bd1c27c25d | 6fc0c16f64a1602101bdb22c5d60856575370160 | refs/heads/master | 2021-01-17T13:59:25.022917 | 2014-10-16T02:14:25 | 2014-10-16T02:14:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 16,065 | py | from __future__ import with_statement
import os
import shutil
import subprocess
import datetime
import time
import psutil
import sys
from pydevtest_common import get_irods_top_level_dir
'''Originally written by Antoine de Torcy'''
RODSLOGDIR = get_irods_top_level_dir() + "/iRODS/server/log"
class RodsEnv(object):
... | [
"terrellrussell@gmail.com"
] | terrellrussell@gmail.com |
b06516e4b8d552450b447b15e8a86a9384fb59b3 | 9326ad1e95f27056c92d53f547377fb0fb9cd115 | /dim/perfect/writeHash.py | 695190d5850340e261c585eb622909fbcf4f5851 | [] | no_license | mengguiyouziyi/otherProject | 760be8c44849bca366fcd652ad49b88e869ba361 | 1b4d1bb076d6d1b74a62c3af0dafe2014e6e9893 | refs/heads/master | 2021-08-24T10:54:47.230099 | 2017-12-09T10:37:00 | 2017-12-09T10:37:00 | 103,385,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,088 | py | """
将需要增补为线上数据的公司,放入redis中
"""
import pymysql
from outAndIn import get_redis_db, in_redis_hash, get_mysql_con, sel_fun
sql_config = {'host': '47.95.31.183',
'port': 3306,
'user': 'test',
'password': '123456',
'db': 'innotree_data_online',
'charset'... | [
"775618369@qq.com"
] | 775618369@qq.com |
ea366e26973da758978ad5bf73bff5beec74f7b5 | a65d30fc3cfd78ef49d1e1f45ccd12e085ca2149 | /timetracker/sheets/models.py | 8c8fa6d22b587b10604fb6db88e04791e9564c2b | [
"BSD-2-Clause"
] | permissive | tm-kn/cht2520-assignment2 | 16e0f88a4a2e7444454091753ac2928f12279ba2 | 05d8c8372d60672e603acf201d1fbf7ffde9484e | refs/heads/master | 2023-01-21T14:24:08.533081 | 2019-04-05T22:55:49 | 2019-04-06T01:18:50 | 194,840,881 | 0 | 0 | BSD-2-Clause | 2023-01-14T00:52:00 | 2019-07-02T10:20:30 | Python | UTF-8 | Python | false | false | 3,179 | py | import io
import logging
from urllib.parse import urljoin
from django.conf import settings
from django.contrib.sites.models import Site
from django.core.files.base import ContentFile
from django.core.mail.message import EmailMessage
from django.db import models
from django.urls import reverse
from django.utils import ... | [
"hi@tmkn.org"
] | hi@tmkn.org |
4369778e652ebd1b7567ce444be46b5909379df5 | 32b54137df5643326d346ccbae573d816afa4209 | /machines/htb/bounty/yolo_enum.py | 5c8c2b72ae34cd518033db6b35eb6db1c114258d | [] | no_license | jossets/YoloToolbox | 0e072622d7ff088b78ce32bf84f676083d14e20d | c94c2d7d37afad63108421b3bcc39e0a57dd18ca | refs/heads/master | 2022-10-19T05:17:15.668523 | 2022-10-12T19:25:08 | 2022-10-12T19:25:08 | 170,295,542 | 19 | 8 | null | null | null | null | UTF-8 | Python | false | false | 9,429 | py | #!/bin/python
#
import sys, os, time
import Queue, thread, subprocess, shlex
import curses
import signal
#
# Usage
#
def banner():
print "\n======================"
print " Autoscan v0.1.0"
print ""
def usage():
print "Usage : "+sys.argv[0]+" IP_TARGET [options]"
exit(1)
if (len(sys.argv)<=1):
... | [
"root@localhost.localdomain"
] | root@localhost.localdomain |
906caf782c0069bc6334ec305de59f91ae72babd | cbfddfdf5c7fa8354162efe50b41f84e55aff118 | /venv/lib/python3.7/site-packages/apscheduler/triggers/base.py | ce2526a88f07871f575d3fa26e0f9bf81f2c8055 | [
"Apache-2.0",
"MIT"
] | permissive | tclerico/SAAC | 8d2245221dd135aea67c5e079ac7eaf542b25e2f | 2f52007ae8043096662e76da828a84e87f71091e | refs/heads/master | 2022-12-09T21:56:33.430404 | 2019-02-20T14:23:51 | 2019-02-20T14:23:51 | 153,152,229 | 3 | 0 | MIT | 2022-09-16T17:52:47 | 2018-10-15T17:13:29 | Python | UTF-8 | Python | false | false | 1,837 | py | from abc import ABCMeta, abstractmethod
from datetime import timedelta
import random
import six
class BaseTrigger(six.with_metaclass(ABCMeta)):
"""Abstract base class that defines the interface that every trigger must implement."""
__slots__ = ()
@abstractmethod
def get_next_fire_time(self, previou... | [
"timclerico@gmail.com"
] | timclerico@gmail.com |
902195d36d6b0c8b0bb1cfabbfa4ae6859138b50 | e82245a9e623ef3e2b4b9c02f0fd932c608c4484 | /interviewbit.com/Binary Search/matrix_median.py | 2f7599a46152e185d032ec2a4cc8560079af4797 | [] | no_license | Zylophone/Programming-for-Sport | 33e8161028cfddce3b7a1243eb092070107342e3 | 193d6184f939303d8661f68d6fd06bdec95df351 | refs/heads/master | 2020-06-16T23:11:44.719286 | 2017-05-21T17:10:46 | 2017-05-21T17:10:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,058 | py | # https://www.interviewbit.com/problems/matrix-median/
def bin_search(nums, target):
lo, hi = 0, len(nums) - 1
while lo <= hi:
mid_idx= (lo+hi)/2
mid_val= nums[mid_idx]
if mid_val == target:
l, r = expand(nums, mid_idx)
times_found= r ... | [
"jfv33@cornell.edu"
] | jfv33@cornell.edu |
f0bb88aff9cb557a20cad860d9d5d2dd04cd3095 | e4a3d09cf4047ec99a40c7444d3bb9354153d363 | /Prepare0_mPing_excision_Identification/bin/mPing_Boundary_Coverage.py | b5e74d441beb9eaa6825c9a49f03cbc502ff1f40 | [] | no_license | JinfengChen/RILs_Preparation | 10155385f4c347863cfe4455e941aa3afe5dd07a | e95c33ad203256bc5d7a7630d50c42a085dd104c | refs/heads/master | 2021-01-21T04:36:03.425989 | 2018-03-17T04:12:25 | 2018-03-17T04:12:25 | 51,611,549 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,848 | py | #!/opt/Python/2.7.3/bin/python
import sys
from collections import defaultdict
from numpy import *
import re
import os
import argparse
from Bio import SeqIO
import subprocess
sys.path.append('%s/lib' %(os.getcwd()))
from excision import bamcheck, bamcheck_simple, convert_MAP, genotyping, convert_MAP_SNP, genotyping_SNP
... | [
"jinfeng7chen@gmail.com"
] | jinfeng7chen@gmail.com |
fabb7936d927d54b98c86565c2bb9589b9ae119e | fb0610488e334393fc799b6afa64f9d3eca61419 | /panoptes_aggregation/reducers/dropdown_reducer.py | 6a9c143b86ee3806fbb0b525b1fa74209b91a057 | [
"Apache-2.0"
] | permissive | zooniverse/aggregation-for-caesar | 81086359dd9e8c2cc461967888f4ee38d12a6cac | 89070fc64e3c76e276ac96dfe428e6b4994dd474 | refs/heads/master | 2023-09-01T12:20:13.463335 | 2023-07-27T08:39:12 | 2023-07-27T08:39:12 | 98,517,215 | 10 | 15 | Apache-2.0 | 2023-09-07T13:18:12 | 2017-07-27T09:14:51 | Python | UTF-8 | Python | false | false | 1,817 | py | '''
Dropdown Reducer
----------------
This module porvides functions to reduce the dropdown task extracts from
:mod:`panoptes_aggregation.extractors.dropdown_extractor`.
'''
from collections import Counter
import numpy as np
from .reducer_wrapper import reducer_wrapper
def process_data(data):
'''Process a list of... | [
"coleman.krawczyk@gmail.com"
] | coleman.krawczyk@gmail.com |
82365770a30ef90dff17f4829818f94c2868a319 | f69fdcbc208045fc0b6f5f83231309d9ee473ff7 | /src/kedja/resources/root.py | 4100bc47e389c28a676c5aa1e983e6bed935fcc7 | [] | no_license | kedjaproject/kedja_server | d578266ad5e688dcbd21ceac8694ad60e4b1e72a | 6df14d221c8ea247460e7f4600bf7fa860eb18de | refs/heads/master | 2020-05-07T18:02:16.816912 | 2019-10-22T19:43:58 | 2019-10-22T19:43:58 | 180,751,037 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,301 | py | import colander
from kedja.core.folder import Folder
from kedja.core.rid_map import ResourceIDMap
from zope.interface import implementer
from kedja.resources.mixins import JSONRenderable
from kedja.resources.security import SecurityAwareMixin
from kedja.interfaces import IRoot
from kedja.permissions import MANAGE_TEMP... | [
"robin@betahaus.net"
] | robin@betahaus.net |
f83deb5fa92233af3424b5b7dfd8648c3363e3f0 | 1d88ed99e2f01b6b0faa7acf762543f41569380c | /top/tests/test_postcode.py | c1067862bc5e684e668681b5ce2981ea8ac23da8 | [] | no_license | loum/top | be0ae6951ed7d5834d14f96403d6cd1dc9d008a4 | 4d9aae6297793822b6de28b65f7639a4b2e6dcfa | refs/heads/master | 2016-09-10T10:38:41.312180 | 2014-06-05T05:44:48 | 2014-06-05T05:44:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,054 | py | import unittest2
from top.postcode import translate_postcode
class TestPostcode(unittest2.TestCase):
def test_valid_translate_postcode_non_integer(self):
"""Translate postcode to state -- valid, range-based.
"""
postcode = 'xxx'
received = translate_postcode(postcode)
exp... | [
"lou.markovski@gmail.com"
] | lou.markovski@gmail.com |
cf2b776e443cd986efdec23f8999ea79148fc200 | 91e810849c5680311ce51c9e66289afb0a76336c | /pytool/box/draw.py | 172750c1bd84125c238d346464e5f24f866c5f79 | [
"MIT"
] | permissive | zhanglixixi/pytool | 307b0505dfa6312223239d34c0dc6a03904e1df3 | 35fb633149b663e6a0fe69c666e5883172223b45 | refs/heads/master | 2022-03-13T08:43:27.572958 | 2019-12-16T07:54:13 | 2019-12-16T07:54:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,485 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date : 2017-12-21 20:22:27
# @Author : Zhi Liu (zhiliu.mind@gmail.com)
# @Link : http://blog.csdn.net/enjoyyl
# @Version : $1.0$
import cv2
import numpy as np
import matplotlib.pyplot as plt
def drawbox(img, bbox, clsl, mod='ltrb', colors=None):
r"""draw bo... | [
"zhiliu.mind@gmail.com"
] | zhiliu.mind@gmail.com |
ae9286208019d5fb006f5e91833a632cc4d97845 | 77e63ec062ca1902842b58b2024a033e72b44a98 | /authors/apps.py | 3b3f4b3bbd403ca6e1b410834faafafa9293cd82 | [] | no_license | aziz2719/Book_house | e0daef94ceb9d1067abebca527f7ab7fa79b6868 | ff3a59d53ad46f5c2ab8d2f5815255181bf0aca5 | refs/heads/master | 2023-04-13T19:00:14.665825 | 2021-04-15T14:03:10 | 2021-04-15T14:03:10 | 358,277,402 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 146 | py | from django.apps import AppConfig
class AuthorsConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'authors'
| [
"davletovaziz511@gmail.com"
] | davletovaziz511@gmail.com |
8215df89db4dcb2413c54afe2f2f461f8587b590 | cadb6dceb7bb67ce47ef48b2c83f480a65d6b01a | /s3prl/problem/hear/vox_lingua.py | 08347d40fb4b224a66ad42e9f4ec68cee0d4f0dd | [
"Apache-2.0",
"CC-BY-NC-4.0"
] | permissive | s3prl/s3prl | 52ec2ae4df5a61c786c122085603aa9c5e8c2681 | 76a9432b824f6ae3eae09a35a67782c4ed582832 | refs/heads/main | 2023-08-17T02:26:57.524087 | 2023-06-10T17:12:27 | 2023-06-10T17:12:27 | 196,905,457 | 1,549 | 398 | Apache-2.0 | 2023-09-14T13:07:05 | 2019-07-15T01:54:52 | Python | UTF-8 | Python | false | false | 2,710 | py | import logging
from s3prl.corpus.hear import hear_scene_kfolds
from s3prl.util.configuration import default_cfg, field
from .scene import HearScene
logger = logging.getLogger(__name__)
NUM_FOLDS = 5
class VoxLingua(HearScene):
@default_cfg(
**HearScene.setup.default_except(
corpus=dict(
... | [
"leo19941227@gmail.com"
] | leo19941227@gmail.com |
7fcc3cab1c75b28df22a00f3d1471d46397fa27f | 8a82a83655f118208692e55d7804d9fa480ad4b6 | /src/dg/data_analysis/courseware/week14.py | d6ee2724cb2d1e9229fc197ee2b43e412b65a72a | [] | no_license | xenron/sandbox-da-python | 0814159da9a91923e4b66c5e40057e381f765e96 | ab8f1c0d57fdc6006355f613012b84165068c315 | refs/heads/master | 2020-04-12T05:41:33.182110 | 2016-12-14T22:57:33 | 2016-12-14T22:57:33 | 60,324,979 | 5 | 2 | null | null | null | null | UTF-8 | Python | false | false | 6,419 | py |
# coding: utf-8
# In[1]:
import numpy as np
import pandas as pd
from sklearn.cluster import AgglomerativeClustering
import matplotlib.pyplot as plt
import numpy as np
from scipy import ndimage
from matplotlib import pyplot as plt
from sklearn import manifold, datasets
# In[2]:
digits = datasets.load_digits(n_clas... | [
"xenron@hotmail.com"
] | xenron@hotmail.com |
73e42a58e5c306784e7b4d2155ed6cf676f45e38 | d0deee39a4b71e7eadaaad8de00ec5d0e1d8e589 | /python/ccxt/hitbtc3.py | 45e36a1184ed79f21909bfdbe2ea1740d305e336 | [
"MIT"
] | permissive | zgayjjf/ccxt | 9659777585e8eb78ff77c0aa18885d001c6e05bc | 62d5216d73de43e1b1d64648604ba2e41780d407 | refs/heads/master | 2022-07-02T02:26:00.970391 | 2022-06-14T03:49:16 | 2022-06-14T03:49:16 | 180,404,496 | 0 | 0 | MIT | 2019-04-09T16:07:25 | 2019-04-09T16:07:24 | null | UTF-8 | Python | false | false | 103,794 | py | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.base.exchange import Exchange
import hashlib
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import Authenticati... | [
"travis@travis-ci.org"
] | travis@travis-ci.org |
9dccf937a8e58a6cc81c3614552ccae8b6de1132 | 0252a277036b9ac7f95e5db3cad6c1a94b89c4ef | /eaif4_ws/build/navigation/map_server/catkin_generated/pkg.develspace.context.pc.py | ff75eb672664e5f2bf1045ef86e0e72cfdcb114c | [] | no_license | maxwelldc/lidar_slam | 1e5af586cd2a908474fa29224b0d9f542923c131 | 560c8507ea1a47844f9ce6059f48937b0627967b | refs/heads/master | 2020-07-01T03:15:42.877900 | 2019-08-07T10:25:27 | 2019-08-07T10:25:27 | 201,025,062 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 551 | py | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/wenhou/eaif4_ws/src/navigation/map_server/include".split(';') if "/home/wenhou/eaif4_ws/src/navigation/map_server/include" != "" else []
PROJECT_CATKIN_DEPENDS = "roscpp;nav_msgs;tf2".replace(';'... | [
"374931377@qq.com"
] | 374931377@qq.com |
34c9b16fe77608b88e3134d0bdf982c179fac0c4 | 03a2c1eb549a66cc0cff72857963eccb0a56031d | /codeforces/contests/1305/C. Kuroni and Impossible Calculation.py | ee636e16c713f6ba87b2d9de023ea1e8d43af6ba | [] | no_license | nobe0716/problem_solving | c56e24564dbe3a8b7093fb37cd60c9e0b25f8e59 | cd43dc1eddb49d6b5965419e36db708c300dadf5 | refs/heads/master | 2023-01-21T14:05:54.170065 | 2023-01-15T16:36:30 | 2023-01-15T16:36:30 | 80,906,041 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 276 | py | def solve(n, m, a):
if m < n:
return 0
r = 1
for i in range(n - 1):
for j in range(i + 1, n):
r = r * abs(a[i] - a[j]) % m
return r
n, m = map(int, input().split())
a = list(map(int, input().split()))
r = solve(n, m, a)
print(r)
| [
"sunghyo.jung@navercorp.com"
] | sunghyo.jung@navercorp.com |
3fc9a73a56b83de5a1e7ccb356fbec9d7d4983ae | b7f5a31dd7774e8e23403a1097fd79c4dcf1256e | /RpiInit.py | 3395113e4491f176360906fb2d54b8984d245c1d | [] | no_license | vksgaikwad3/Tah_Testbed | fbe8eaee1d38e1e97d2a3e076025df93ef05599e | 9b1c93b7204ce21a63a261c80abf3b22a31f09c5 | refs/heads/master | 2016-09-05T16:13:30.463773 | 2015-02-16T12:06:57 | 2015-02-16T12:06:57 | 26,494,723 | 0 | 2 | null | 2015-02-16T13:16:31 | 2014-11-11T16:57:06 | Makefile | UTF-8 | Python | false | false | 876 | py | import RPi.GPIO as GPIO
def init():
# to use Raspberry Pi board pin numbers
GPIO.setmode(GPIO.BOARD)
GPIO.setup(15, GPIO.OUT) # A
GPIO.setup(19, GPIO.OUT) # B
GPIO.setup(8, GPIO.OUT) # select line C
GPIO.setup(10, GPIO.OUT) # select line D
GPIO.setup(23, GPIO.OUT)
GPIO.setup(7, GPIO.OUT) # NC
GPI... | [
"root@raspberrypi.(none)"
] | root@raspberrypi.(none) |
e1ff2fb946a8d290de30a28566bccc7221eed454 | e7570f6c153a1ab09a169ae9dc1169136e512aac | /blog/admin.py | 4a5cdfe38dcb02d52a2f04b8cd3311bc6a53b87b | [] | no_license | KirosKost/eshop | 5e7ed2a975462f18f3f5d9f4dc8cc7644676d56e | 2c64383e0bff1f66b9a80da80f621a9ec3e02e47 | refs/heads/main | 2022-12-28T12:18:24.720924 | 2020-10-14T04:04:11 | 2020-10-14T04:04:11 | 303,898,399 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 85 | py | from django.contrib import admin
from .models import Blog
admin.site.register(Blog) | [
"you@example.com"
] | you@example.com |
ae029197439c29c60ad52756fe3812aba920657c | 17c098eb5bd4977e68bee4733d215e562e7dfad9 | /Data/write_yaml.py | 818142360ed31679ac50a18441de7dcd0010b9d8 | [] | no_license | 15690677747/app_15_20_0071 | 6963fd1530994b27a2556091993d47295f0e4b4d | 598bd6a2c958cafb6a2740d276472f12159bf891 | refs/heads/master | 2022-09-23T09:50:16.688627 | 2020-06-06T02:03:25 | 2020-06-06T02:03:25 | 269,837,514 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 24 | py | import yaml
data= {
} | [
"stan@stan.com"
] | stan@stan.com |
e096cd5d8f162c549e2f352add2f2ec9ed3a2bde | ece0d321e48f182832252b23db1df0c21b78f20c | /engine/2.80/scripts/addons/add_advanced_objects_menu/circle_array.py | 6d4a945939d8d650e1100544a497043065dbbb1c | [
"Unlicense",
"GPL-3.0-only",
"Font-exception-2.0",
"GPL-3.0-or-later",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-public-domain-disclaimer",
"Bitstream-Vera",
"LicenseRef-scancode-blender-2010",
"LGPL-2.1-or-later",
... | permissive | byteinc/Phasor | 47d4e48a52fa562dfa1a2dbe493f8ec9e94625b9 | f7d23a489c2b4bcc3c1961ac955926484ff8b8d9 | refs/heads/master | 2022-10-25T17:05:01.585032 | 2019-03-16T19:24:22 | 2019-03-16T19:24:22 | 175,723,233 | 3 | 1 | Unlicense | 2022-10-21T07:02:37 | 2019-03-15T00:58:08 | Python | UTF-8 | Python | false | false | 6,393 | py | # gpl author: Antonis Karvelas
# -*- coding: utf-8 -*-
bl_info = {
"name": "Circle Array",
"author": "Antonis Karvelas",
"version": (1, 0, 1),
"blender": (2, 67, 0),
"location": "View3D > Object > Circle_Array",
"description": "Uses an existing array and creates an empty, "
... | [
"admin@irradiate.net"
] | admin@irradiate.net |
adbdaf6277ef7960105ee779e47caab6cb9006d1 | 1af6958461af6257264ace2a6d13385b47104606 | /pyscf/lib/gto/test/test_ecp.py | 9a0af2f0cedb6374c67adcf3edb9a95dccb7a4e3 | [
"Apache-2.0"
] | permissive | tmash/pyscf | ac9a86c078170044b52be71e5d00fa5f680f55af | 89c101c1c963e8247808635c61cd165bffab42d6 | refs/heads/master | 2020-12-04T04:41:23.456744 | 2020-01-02T18:05:16 | 2020-01-02T18:05:16 | 231,615,690 | 1 | 0 | Apache-2.0 | 2020-01-03T15:33:33 | 2020-01-03T15:33:32 | null | UTF-8 | Python | false | false | 27,664 | py | #!/usr/bin/env python
# Copyright 2014-2018 The PySCF Developers. 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
#
# U... | [
"osirpt.sun@gmail.com"
] | osirpt.sun@gmail.com |
f7277537d5e5a370dd90d85849f460c8406aa22b | 1423a793ea82e43dbb0bfce36fad13e8f96d48d0 | /TeamChallenges/forwardCenterSecond.py | 50e1d5a0d093927b1605837ebe9ffce83e925591 | [] | no_license | ecasiano/ComputationalPhysics | d813f96030cf6711b7dacb4def43596a219c9099 | 2e002dd7f30419c668b382dee8896f454092094d | refs/heads/master | 2021-05-06T06:05:58.263003 | 2017-12-11T04:51:11 | 2017-12-11T04:51:11 | 113,813,500 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,102 | py | #Check out the forward, center and second derivatives
import numpy as np
import matplotlib.pyplot as plt
def f(x):
return np.log(x)
def df(f,x):
'''Compute the forward, centered and 2nd derivative of f = ln(x)'''
dx = x[1]-x[0]
dff = (f(x+dx) - f(x)) / dx
dcf = (f(x) - f(x-dx)) / dx
d2f = (... | [
"Emanuel.Casiano-Diaz@uvm.edu"
] | Emanuel.Casiano-Diaz@uvm.edu |
5455854aebad619ae2ea8224d420ca637a3192a0 | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_117/ch9_2019_06_06_16_00_07_789792.py | 79e171219a81d54f6384bc08259cc494bebbee60 | [] | 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 | 161 | py | def lista_sufixos(string):
x= []
i=0
while x in lista_sufixos(string) and i in lista_sufixos(string):
x.ppend[lista_sufixos[i]]
return x
| [
"you@example.com"
] | you@example.com |
5ed6021c2690314e7ba25a3d312a678df74f5522 | e50fb8fff29149672c581fee796e9ca1fbc128c2 | /dust_extinction/tests/test_g16.py | 9f5b60d6ad2a9f049f23e763c80ada192d7b4f0e | [
"BSD-3-Clause"
] | permissive | krislars/dust_extinction | 70cbabc4bf23e23dd6bb3c11cfe9a4ec2528e843 | 651d53d5bbbb2890dd67bd7ab93e0a318c4f14ea | refs/heads/master | 2021-09-25T08:56:51.098610 | 2018-10-20T04:18:48 | 2018-10-20T04:18:48 | 114,434,756 | 1 | 1 | BSD-3-Clause | 2018-10-20T04:18:49 | 2017-12-16T04:56:57 | Python | UTF-8 | Python | false | false | 2,533 | py | import numpy as np
import pytest
import astropy.units as u
from astropy.modeling import InputParameterError
from ..parameter_averages import G16
from ..averages import G03_SMCBar
from .test_f99 import get_axav_cor_vals as get_axav_cor_vals_fA_1
from .helpers import _invalid_x_range
@pytest.mark.parametrize("RvA_inv... | [
"kgordon@stsci.edu"
] | kgordon@stsci.edu |
fa1906332a417b7770ed39e5aceec6cbc21d271a | 91d90f8e026ae8e6594db37fdff3cda9ca65a2dd | /my_modules/comp_chem/rism_recipes.py | ab7b50c1902d339e4f948760c793c8e21b3c9dc7 | [] | no_license | MTS-Strathclyde/python-mm-scripts | 4567bc943a990b0df162d9f8dbc003d8698d4219 | 0235479c2a9f4e91ff5ffeeacfc56d604b62b551 | refs/heads/master | 2020-03-25T23:39:50.438744 | 2018-08-27T22:08:51 | 2018-08-27T22:08:51 | 144,286,211 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,461 | py | # -*- coding: utf-8 -*-
"""
Created on Thu Jun 4 13:29:06 2015
@author: max
"""
import numpy as np
def load_dx(fname, return_xyz=False):
"""Return dx matrix, origin coordinates tuple and spacing between points tuple.
If return_xyz is true returns dx, x, y, and z matrices."""
with open(fname, 'rb') as f:
... | [
"mishin1991@gmail.com"
] | mishin1991@gmail.com |
bac93d65826b2004d966bbb967c2b4884b2febdb | 4f65908ca7d2fb55619e664c69f593411253d937 | /api.py | b2973d951cd795b75a6a48fcbc76939d92770a70 | [
"MIT"
] | permissive | ElHackerMan/sql-injection-demo | 2cef31403de380c8b1c4305324ed9637a9520ef3 | 2dac7635527b350fe7ab06d52b42fb41a087d703 | refs/heads/master | 2022-12-23T08:39:26.944876 | 2020-10-01T12:44:00 | 2020-10-01T12:44:00 | 300,275,123 | 0 | 0 | MIT | 2020-10-01T12:41:53 | 2020-10-01T12:41:52 | null | UTF-8 | Python | false | false | 1,337 | py | from flask import Flask, request, render_template
from flask_cors import CORS
import sqlite3
app = Flask(__name__)
CORS(app)
@app.route("/get")
def get():
conn = sqlite3.connect("data.db")
c = conn.cursor()
c.execute("select * from data")
data = c.fetchall()
return "<br>".join([i[0] for i in data... | [
"vivnps.verma@gmail.com"
] | vivnps.verma@gmail.com |
5701ff7c8921d1852dee962cef036fd24765f824 | 471479fd33215ffd088e09940c78cc8b2f65ffcd | /docs/source/01-AWS/01-All-AWS-Services-Root/27-Machine-Learning/01-Sagemaker-Root/01-What-is-Sagemaker/estimator_example.py | 0dfe386849f5aa041507fb4296c9b544fed0d490 | [
"MIT"
] | permissive | MacHu-GWU/Dev-Exp-Share | a25ec59f9402e56c3bd9d98269634894fa452537 | 0b659c62bf795374ea981953b25119ca30007e7d | refs/heads/master | 2023-08-22T05:28:52.536090 | 2023-08-14T13:37:31 | 2023-08-14T13:37:31 | 84,245,070 | 3 | 1 | MIT | 2023-02-13T23:44:03 | 2017-03-07T20:53:18 | Shell | UTF-8 | Python | false | false | 779 | py | # -*- coding: utf-8 -*-
import sagemaker
from sagemaker import image_uris
from sagemaker.estimator import Estimator
sess = sagemaker.Session()
role = sagemaker.get_execution_role()
container = image_uris.retrieve("pca", "us-east-2", version="1")
pca = sagemaker.estimator.Estimator(
container,
role,
insta... | [
"MacHu-GWU@users.noreply.github.com"
] | MacHu-GWU@users.noreply.github.com |
722c318ba3f92614672fec373dc84a8c34b4b272 | 0abc546a1442cae56ddcdc43f85497b37fc89036 | /CGATPipelines/pipeline_docs/pipeline_chipseq/trackers/Annotations.py | 8faaa8fcc92605e9b18316a3f4527ae2bead797a | [] | no_license | yangjl/cgat | 01a535531f381ace0afb9ed8dc3a0fcff6290446 | 01758b19aa1b0883f0e648f495b570f1b6159be4 | refs/heads/master | 2021-01-18T03:55:14.250603 | 2014-02-24T10:32:45 | 2014-02-24T10:32:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,766 | py | import os, sys, re, types, itertools
import matplotlib.pyplot as plt
import numpy
import numpy.ma
from ChipseqReport import *
##################################################################################
##################################################################################
###########################... | [
"andreas.heger@gmail.com"
] | andreas.heger@gmail.com |
deeac463af0522cf25eeb9b13fcf4b08d46ca663 | 268e68da9a3a1e6a564e3650313e09d5e424f109 | /quant_engine/Strategy/stg_CC_20191106/stg_CC.py | 69b27d09ec1ac94658777d5955ab0d93f1f699fd | [] | no_license | dxcv/DFZQ | 7d101217067ead6f19f3e1450f0276f81d38af12 | cc52a6bc658fcce051a380486e3d60b432b7ee90 | refs/heads/master | 2020-09-28T14:20:15.579453 | 2019-12-09T05:40:25 | 2019-12-09T05:40:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,635 | py | # 开始日期: 2019-11-7
from strategy_base import StrategyBase
import pandas as pd
from dateutil.relativedelta import relativedelta
import dateutil.parser as dtparser
import joblib
import datetime
class stg_CC(StrategyBase):
def __init__(self):
super().__init__()
@staticmethod
def job_filter(code,ROE,... | [
"bright_gl@126.com"
] | bright_gl@126.com |
377f3cac308cdf96a9b0ddd599c30e79eeacd5e1 | 8bc0bebd527ef68011066e83713bfda974d29755 | /apps/users/views.py | a1baf863198931adf2ed5d4bbf1e8d4e246f9ab2 | [] | no_license | wuchengjiang/onlineEducation | 31f55439c52c1b2704a3c63dd2594974a6159ffb | 22c83ff3f624b1b8185635d2008422d565112b50 | refs/heads/master | 2022-11-08T11:36:34.943630 | 2018-06-24T01:17:46 | 2018-06-24T01:17:46 | 150,530,420 | 0 | 1 | null | 2018-09-27T04:51:01 | 2018-09-27T04:51:01 | null | UTF-8 | Python | false | false | 11,552 | py | from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.backends import ModelBackend
from courses.models import Course
from operations.models import UserCourse, UserFavorite, UserMessage
from org... | [
"Donnie0918xu@163.com"
] | Donnie0918xu@163.com |
91c4252526dd2d808747d3f8dba7bc6ab1ca839f | 41ef2591852ef50a0a1266f19a7b841265a72e96 | /tw2018/sandbox2.py | 175787f663a689d9224ba82e553822b6a724af93 | [] | no_license | JustBeYou/ctfs | 00476bcd87d4edcaa922f28f73a591ebcb31ab6b | 91a5ecc5f2571ff4fbf27b74082f97f280e8ab58 | refs/heads/master | 2023-02-03T04:38:09.017478 | 2021-12-27T18:49:01 | 2021-12-27T18:49:01 | 137,554,267 | 16 | 7 | null | 2023-02-02T04:55:13 | 2018-06-16T05:00:12 | Assembly | UTF-8 | Python | false | false | 3,489 | py | import ast
import hashlib
def check_flag1():
sys.stdout.write('input sha512(flag1) >> ')
sys.stdout.flush()
s = sys.stdin.readline().strip()
flag = open('./flag', 'rb').read().strip()
if hashlib.sha512(flag).hexdigest() != s:
exit()
sys.stdout.write(open(__file__, 'rb').read().decode()... | [
"mihailferaru2000@gmail.com"
] | mihailferaru2000@gmail.com |
4cd7449ecea28d2f9fba9525c64e5711a69814c4 | 749bd7db8d1902274a47bb7d98b9d6ced3ef6b68 | /S-NET/1_snet_without_pr/main.py | 9eaaca4de41f98d6e76eec4184c3b262150fccc7 | [] | no_license | burglarhobbit/machine-reading-comprehension | 37582e0fdca4690bd55accf33987b5fce1f663ea | 04729af3d934a7696938f4079089b9b014c986aa | refs/heads/master | 2023-02-08T10:39:19.262900 | 2020-01-11T04:08:30 | 2020-01-11T04:08:30 | 114,113,176 | 29 | 15 | null | 2023-02-02T02:32:54 | 2017-12-13T11:34:36 | Python | UTF-8 | Python | false | false | 9,657 | py | import tensorflow as tf
import ujson as json
import numpy as np
from tqdm import tqdm
import os
from model import Model
from util import get_record_parser, convert_tokens, evaluate, get_batch_dataset, get_dataset
from tensorflow.python import debug as tf_debug
def train(config):
gpu_options = sess_config = None
i... | [
"bhavyapatwa007@gmail.com"
] | bhavyapatwa007@gmail.com |
3f07d943cef6f3e9902f6a42171fb3da89d3c18f | 87b249bde7c729800f2c2530a0ee35c101e3d363 | /game/serializers.py | 4810073cf88f2532a89ccd5cb0f5e5955a6e846a | [] | no_license | infsolution/prehistory | 9c909230cdc114dfdbc97875df27de23262befcc | 70bab6b9c8352612bd46572b63330c1187dd869e | refs/heads/master | 2020-09-12T12:14:39.358521 | 2019-11-29T23:59:43 | 2019-11-29T23:59:43 | 222,422,083 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,493 | py | from rest_framework import serializers
from django.contrib.auth.models import User
from .models import *
class UserSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model=User
fields=('url','pk', 'username', 'email', 'password')
class KnowingSerializer(serializers.HyperlinkedModelSerializer):
clas... | [
"clsinfsolution@gmail.com"
] | clsinfsolution@gmail.com |
52a8fa5aecfd0073386b3d4557b7840f4a497d3d | 06820fccbfd2024368f56ba8cf028a54213dc497 | /src/ec_cloudspeech.py | 433743090d0738dd4c76616881e1d71237a7eba2 | [] | no_license | makelove/AIY_py | 12e4532e0eb13a305c30c7f2625d44915dc43ed0 | 5956804a19d4f42887486f9b5516c6df3f1a9ffd | refs/heads/master | 2021-09-11T20:51:10.717197 | 2018-04-12T07:35:50 | 2018-04-12T07:35:50 | 111,373,960 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,129 | py | # -*- coding: utf-8 -*-
# @Time : 2017/11/14 14:49
# @Author : play4fun
# @File : ec_cloudspeech.py
# @Software: PyCharm
"""
ec_cloudspeech.py:
"""
#!/usr/bin/env python3
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compl... | [
"play4fun@foxmail.com"
] | play4fun@foxmail.com |
31f94d40a73c8814ea28b3afde6632b450c348c1 | b961c67885fe1033ec8c1d480a43ee4f2d07ce02 | /img/migrations/0003_auto_20180706_0104.py | db6e068365edd5b1387d2c45b63f07da7600aded | [] | no_license | aistiak/crude | 83590be42d5b7966398a55af0afb15e556bd9d60 | da34b50b349cef842fb77067fec2c8074f871dc3 | refs/heads/master | 2020-03-23T03:52:25.565818 | 2018-07-15T19:42:35 | 2018-07-15T19:42:35 | 141,053,610 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 401 | py | # Generated by Django 2.0.5 on 2018-07-05 19:04
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('img', '0002_auto_20180706_0103'),
]
operations = [
migrations.AlterField(
model_name='store',
name='img_file',
... | [
"you@example.com"
] | you@example.com |
216e34ee799c8cc5c9e6d33d5aa98dd80dd83909 | a8a86f7d2b154043078159b06db2a7ef1eb5425f | /functions_parameters.py | 41dde70924f1e23667a66860cf1f1fbb68be081e | [] | no_license | julesc00/Python-3-Exercises | ed3f42a372147b67037602d36c43a7ac05423502 | 3e3d4a9bb14bd0d27586fa913e5634587ded4267 | refs/heads/master | 2020-06-06T03:55:54.815597 | 2019-07-05T13:56:56 | 2019-07-05T13:56:56 | 192,631,709 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,005 | py | # Functions with parameters
# def parameters(a):
# print(a)
#
#
# parameters("This is a parameter")
#
#
# def add(a, b):
# c = a + b
# return c
#
# def substract(a, b):
# c = a - b
# return c
#
# def times(a, b):
# c = a * b
# return c
#
# def division(a, b):
# c = a / b
# return c... | [
"julesc00@hotmail.com"
] | julesc00@hotmail.com |
adc5beca570d7df09d4e54d0662f940996f3eebc | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02720/s356125809.py | e99b71a13874ec2f088ce5e4627a48693ce6addf | [] | 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 | 301 | py | import queue
K = int(input())
Q = queue.Queue()
for i in range(1, 10):
Q.put(i)
ans = 1
for k in range(K):
ans = Q.get()
ansm = ans % 10
if ans%10 != 0:
Q.put(10 * ans + ansm - 1)
Q.put(10 * ans + ansm)
if ans%10 != 9:
Q.put(10 * ans + ansm + 1)
print(ans) | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
4a849254e203aa9a4f2f99b295727b328ef0a2eb | 7c87beaaed3d6e1459c3328c9d14b1c64187c161 | /awesomepython3webapp/www/handlers.py | d41c7bd7c9265d0378717aa9a8dd1cf5962cc687 | [] | no_license | QAlexBall/PythonProject | 24a7061def9e31db2ef112e775c6b75710ca267c | 74b9db9d60acaa112b266fffaa799e00b2a63016 | refs/heads/master | 2020-04-22T21:39:04.508991 | 2019-05-19T15:02:17 | 2019-05-19T15:02:17 | 170,679,679 | 0 | 0 | null | 2019-09-27T07:28:05 | 2019-02-14T11:18:32 | CSS | UTF-8 | Python | false | false | 7,880 | py | # -*- coding: utf-8 -*-
""" url handlers """
import re, time, json, logging, hashlib, base64, asyncio
from aiohttp import web
import markdown2
from config import configs
from coroweb import get, post
from models import User, Comment, Blog, next_id
from apis import APIValueError, APIResourceNotFoundError, APIPermissionE... | [
"zhuderen12345@icloud.com"
] | zhuderen12345@icloud.com |
57b95fbf466f9875a9545def6dc310b69907498f | 4929dd3039d95d22cfe4dd99f2de2df3a5f442ba | /engine/threed/quaternion.py | 7a8a3f24fbdc7ff5f2300ed722ad38fe67ae5c39 | [
"MIT"
] | permissive | Nachtfeuer/engine | b82565685ab8fc2cb67e04549446ba1831d8c084 | c7d86877b84f648b229c8c958078b899ad9eeeaf | refs/heads/master | 2023-01-04T12:01:40.010060 | 2020-04-25T12:43:24 | 2020-04-25T12:43:24 | 233,201,469 | 0 | 0 | MIT | 2022-12-23T23:57:03 | 2020-01-11T08:40:16 | Python | UTF-8 | Python | false | false | 4,346 | py | """Module quaternion for mathmatical quaternion."""
from __future__ import annotations
from typing import Union
import math
from engine.threed.base.quaternion import AbstractQuaternion
from engine.threed.base.vector import AbstractVector
class Quaternion(AbstractQuaternion):
"""Mathmatical quaternion."""
def... | [
"thomas.lehmann.private@gmail.com"
] | thomas.lehmann.private@gmail.com |
6137c2767ac4a1fa838bd1c1220f62ac6ea848ad | 40571afb41d6886f3ee72259e44b31c831355ee5 | /backend/movies/newrecommend.py | 56bf43e5ea39b5cb0955f384d8e4c5956b1a463d | [] | no_license | suwonraison900206/idkmovies | e552efa6923a56bf7386f125d8e97c419a1acfe7 | ae102ba4d8a111c6efd21fce1a6934b2720ca93d | refs/heads/main | 2023-01-25T03:15:42.688861 | 2020-12-07T14:18:01 | 2020-12-07T14:18:01 | 319,341,701 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,199 | py | # 데이터 불러오기
from numpy.linalg import norm
import pandas as pd
from pandas import Series, DataFrame
import numpy as np
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.metrics.pairwise import cosine_similarity
import pymysql
def recommend_sys(searchword):
df = DataFrame()
movie_db = pymy... | [
"suwonraison@gmail.com"
] | suwonraison@gmail.com |
555043562028542fdcee87110d719145c3eb96bf | f707303e4dfe383cf82c23a6bb42ccfdc4cfdb67 | /pandas-ta-quant-plot/pandas_ta_quant_plot/plotting_bak/__init__.py | d7a091df751bdd48c967aecdab5eedc979b7a4e9 | [
"MIT"
] | permissive | jcoffi/pandas-ml-quant | 1830ec256f8c09c04f1aa77e2eecfba07d34fe68 | 650a8e8f77bc4d71136518d1c7ee65c194a99cf0 | refs/heads/master | 2023-08-31T06:45:38.060737 | 2021-09-09T04:44:35 | 2021-09-09T04:44:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 21 | py | # from .bar import *
| [
"kic@kic.kic"
] | kic@kic.kic |
f4b7403859bb54f3ce9db78739674b9e0aa4799d | 81407be1385564308db7193634a2bb050b4f822e | /the-python-standard-library-by-example/multiprocessing/multiprocessing_daemon_join.py | 129c85458ea0012dec9b138ceec8a97fea0e9098 | [
"MIT"
] | permissive | gottaegbert/penter | 6db4f7d82c143af1209b4259ba32145aba7d6bd3 | 8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d | refs/heads/master | 2022-12-30T14:51:45.132819 | 2020-10-09T05:33:23 | 2020-10-09T05:33:23 | 305,266,398 | 0 | 0 | MIT | 2020-10-19T04:56:02 | 2020-10-19T04:53:05 | null | UTF-8 | Python | false | false | 810 | py | #!/usr/bin/env python
# encoding: utf-8
#
# Copyright (c) 2008 Doug Hellmann All rights reserved.
#
"""Daemon vs. non-daemon processes.
"""
#end_pymotw_header
import multiprocessing
import time
import sys
def daemon():
name = multiprocessing.current_process().name
print 'Starting:', name
time.sleep(2)
... | [
"350840291@qq.com"
] | 350840291@qq.com |
ff704ccec9c5422fcf636fc4c887ab7f2ef89f81 | f07a42f652f46106dee4749277d41c302e2b7406 | /Data Set/bug-fixing-5/d44fd70d021454f4d5e4e13464669c0beb828fe8-<_permissions_service>-fix.py | b5827de750672394a1e8cdfb11010b0cd9aaa75a | [] | no_license | wsgan001/PyFPattern | e0fe06341cc5d51b3ad0fe29b84098d140ed54d1 | cc347e32745f99c0cd95e79a18ddacc4574d7faa | refs/heads/main | 2023-08-25T23:48:26.112133 | 2021-10-23T14:11:22 | 2021-10-23T14:11:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 574 | py | def _permissions_service(connection, module):
if module.params['user_name']:
service = connection.system_service().users_service()
entity = next(iter(service.list(search='usrname={0}'.format('{0}@{1}'.format(module.params['user_name'], module.params['authz_name'])))), None)
else:
service... | [
"dg1732004@smail.nju.edu.cn"
] | dg1732004@smail.nju.edu.cn |
27e92479af861924da74eb43fabe9260a03e8c76 | c9ee92af7462d4bd9f68e773bf4fb11c977ebd66 | /worker.py | cdf8776bc6072f4d9ae31f15778ebaf94d9ab1c4 | [] | no_license | gfjreg/CommonCrawl | 23737b9863c2e5394b7820cee4ada31e86ebf5d7 | 2aaa42d857a49aa04d250e0208b25dd6419af358 | refs/heads/master | 2021-01-22T23:54:28.843306 | 2014-06-24T19:05:39 | 2014-06-24T19:05:39 | 21,654,496 | 14 | 6 | null | null | null | null | UTF-8 | Python | false | false | 2,444 | py | __author__ = 'aub3'
import logging
from collections import defaultdict
from cclib import commoncrawl
from filequeue import FileQueue
from boto.s3.connection import S3Connection
from boto.s3.key import Key
import json
from config import OUTPUT_S3_BUCKET, JOB_QUEUE, CRAWL_ID
logging.basicConfig(filename='worker.log',le... | [
"akshayubhat@gmail.com"
] | akshayubhat@gmail.com |
a085f7bf4695cf325e0ee9e57edf7846036ca0e6 | eef5a6712582fec52915c5281d03a822ef47f371 | /vrequest/pyprime.py | 4b23fbd901b729b5200d461fb107481cadaf97ce | [
"MIT"
] | permissive | zhangsanfu/vrequest | 35d1948e4b2ebb9c9d6a846e7d432ca4e21ba84a | 0a483bb4ea86452b03ccf33869c1ebcd3f6c6d32 | refs/heads/master | 2021-02-15T20:39:48.915875 | 2020-03-04T12:43:32 | 2020-03-04T12:43:32 | 244,929,730 | 1 | 0 | MIT | 2020-03-04T15:03:05 | 2020-03-04T15:03:04 | null | UTF-8 | Python | false | false | 4,591 | py | import random
# miller-rabin 算法素性检测
def isprime_mr(a,b=None):
if b is None: b = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97]
if a == 2:return True
if a%2==0 or a==1:return False
for x in b:
t = a - 1
while t%2 == 0:
v = pow(x,t,a)# python自带函数pow就带... | [
"opaquism@hotmail.com"
] | opaquism@hotmail.com |
fe3e08d01a56585ad2cecabd502c5e1a287456a0 | f11a2a19b9ebb8231d88ef403ae921a420059d5c | /ares/util/Survey.py | 8b2c1a7fc50aa365ae806ddcf323d1b27bb8e380 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | jlashner/ares | 4b09d808fce34d20a84102ab268232f239df0dea | 6df2b676ded6bd59082a531641cb1dadd475c8a8 | refs/heads/master | 2022-12-19T04:18:32.062469 | 2020-07-27T20:57:44 | 2020-07-27T20:57:44 | 283,597,070 | 0 | 0 | MIT | 2020-07-29T20:34:13 | 2020-07-29T20:34:13 | null | UTF-8 | Python | false | false | 15,031 | py | """
Survey.py
Author: Jordan Mirocha
Affiliation: McGill
Created on: Sat 16 Feb 2019 10:40:18 EST
Description:
"""
import re
import os
import copy
import numpy as np
from ..physics.Constants import c
from ..physics.Cosmology import Cosmology
try:
import ares
except ImportError:
pass
flux_AB = 3631. * 1e... | [
"mirochaj@gmail.com"
] | mirochaj@gmail.com |
6ca13f810992c2693ed14d720b891f61e3729666 | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2208/60688/274603.py | 8ddccc41e4d111844ffb168adc58bce474965db1 | [] | 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 | 494 | py | times=int(input());
#首先是单次的
results=[];
for j in range(times):
nums=int(input());
numslist = (input().split(" "));
numslist=list(int(x) for x in numslist);
result=[-1];
for i in range(1,nums):
previewnum=numslist[i-1];
if(numslist[i]>previewnum):
result.append(previewnum)... | [
"1069583789@qq.com"
] | 1069583789@qq.com |
0035741d85f8fdad03b538e34cfb885ef5e9a22d | 65f3ada144f45bd5dbaf3d37ca9366ff54796f0c | /month6-21/maxProductDifference.py | 56e642d3e0eafa3421099f9393f986debdd630be | [] | no_license | BruceHi/leetcode | 43977db045d9b78bef3062b16d04ae3999fe9ba7 | 0324d247a5567745cc1a48b215066d4aa796abd8 | refs/heads/master | 2022-09-22T14:18:41.022161 | 2022-09-11T23:45:21 | 2022-09-11T23:45:21 | 248,240,171 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 305 | py | from typing import List
class Solution:
def maxProductDifference(self, nums: List[int]) -> int:
nums.sort()
return nums[-1]*nums[-2] - nums[0]*nums[1]
s = Solution()
nums = [5,6,2,7,4]
print(s.maxProductDifference(nums))
nums = [4,2,5,9,7,4,8]
print(s.maxProductDifference(nums))
| [
"BruceHi@users.github.com"
] | BruceHi@users.github.com |
d2707ab0e49f8a6c6f0e66b9428cbb8da3668509 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03625/s124260947.py | b291f53eee5b0fe45988c00b23afb57577b4bfa4 | [] | 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 | 413 | py | n = int(input())
seq = sorted((int(x) for x in input().split()), reverse=True)
val1 = None
val2 = None
cur_val = seq[0]
for val in seq[1:]:
if val == cur_val:
if val1 is None:
val1 = val
cur_val = None
elif val2 is None:
val2 = val
break
else:
... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
c59948e775712b277deae1b29e13cf954cfcebba | 46ae8264edb9098c9875d2a0a508bc071201ec8b | /res_bw/scripts/client/postprocessing/effectssharpen.py | 079154e4ce4235a3d59f7da3a0adbb329383df6d | [] | no_license | Difrex/wotsdk | 1fc6156e07e3a5302e6f78eafdea9bec4c897cfb | 510a34c67b8f4c02168a9830d23f5b00068d155b | refs/heads/master | 2021-01-01T19:12:03.592888 | 2016-10-08T12:06:04 | 2016-10-08T12:06:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,026 | py | # Embedded file name: scripts/client/PostProcessing/Effects/Sharpen.py
from PostProcessing.RenderTargets import *
from PostProcessing import Effect
from PostProcessing.Phases import build9TapFilterPhase
from PostProcessing.Phases import buildBackBufferCopyPhase
from PostProcessing.FilterKernels import *
from PostProces... | [
"m4rtijn@gmail.com"
] | m4rtijn@gmail.com |
5bb2470c0166acc4ae189378f71c1bce085304b1 | d3efc82dfa61fb82e47c82d52c838b38b076084c | /utils/Autocase_Result/Quote16/HQ_16_010.py | 5716216f268d90e0e1d43b44e79ab509f2f0d46b | [] | no_license | nantongzyg/xtp_test | 58ce9f328f62a3ea5904e6ed907a169ef2df9258 | ca9ab5cee03d7a2f457a95fb0f4762013caa5f9f | refs/heads/master | 2022-11-30T08:57:45.345460 | 2020-07-30T01:43:30 | 2020-07-30T01:43:30 | 280,388,441 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,287 | py | #!/usr/bin/python
# -*- encoding: utf-8 -*-
import time
import sys
sys.path.append("/home/yhl2/workspace/xtp_test/xtp/api")
from xtp_test_case import *
sys.path.append("/home/yhl2/workspace/xtp_test/service")
from log import *
class HQ_16_010(xtp_test_case):
def subMarketData(self, Api, stk_info, case_name, rs_ex... | [
"418033945@qq.com"
] | 418033945@qq.com |
e82327ca51579b28a3f560841036aadef7b4b2d3 | acff427a36d6340486ff747ae9e52f05a4b027f2 | /contrib/editor/master-pdf-editor/actions.py | da42af8f079017a6038a7356782509b1e9de763d | [] | no_license | jeremie1112/pisilinux | 8f5a03212de0c1b2453132dd879d8c1556bb4ff7 | d0643b537d78208174a4eeb5effeb9cb63c2ef4f | refs/heads/master | 2020-03-31T10:12:21.253540 | 2018-10-08T18:53:50 | 2018-10-08T18:53:50 | 152,126,584 | 2 | 1 | null | 2018-10-08T18:24:17 | 2018-10-08T18:24:17 | null | UTF-8 | Python | false | false | 710 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt
from pisi.actionsapi import shelltools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get
def install():
pisitools.insinto("/usr/share/pixma... | [
"erkanisik@yahoo.com"
] | erkanisik@yahoo.com |
fe18f740c6f5fb93cac20a61fda4df79ec0efaa4 | c7dd4b5501d08d7e66ad44d02fdd95a9695527d6 | /src/jk_logging/fmt/LogMessageFormatter.py | 22d339ef6c3a17e22d2ee23705afac082b68e62e | [
"Apache-2.0"
] | permissive | jkpubsrc/python-module-jk-logging | 874605f4de9b0a0c093cf45c248186a264a82deb | d4728c3079362ff9d3cc45d57eda2a3516b23ba5 | refs/heads/master | 2022-08-28T12:41:32.131472 | 2022-08-18T06:20:17 | 2022-08-18T06:20:17 | 79,403,196 | 0 | 1 | null | 2022-08-27T01:37:36 | 2017-01-19T01:35:32 | Python | UTF-8 | Python | false | false | 4,309 | py |
import typing
from .AbstractTimeStampFormatter import AbstractTimeStampFormatter
from .AbstractLogMessageFormatter import AbstractLogMessageFormatter
from .DefaultTimeStampFormatter import DefaultTimeStampFormatter
#
# This is a default formatter for log messages. It produces human readable output for log mes... | [
"pubsrc@binary-overflow.de"
] | pubsrc@binary-overflow.de |
ec8e6c457fe6d2513a2fd8fc2cf34c3aab0a7f95 | a8e03b707caf4c449ed2e9caed1637cd153811fc | /lean/components/config/lean_config_manager.py | b92345a7474a38e2d61e44f8f734c304f0186d93 | [
"Apache-2.0"
] | permissive | gitsteveo/lean-cli | 57c698f3f3f438359173203caabddf1580b441cc | 695574e55b4ab3d44c5cbe180e11876754eeae7e | refs/heads/master | 2023-07-11T00:42:40.796302 | 2021-08-08T21:32:19 | 2021-08-08T21:32:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,403 | py | # QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
# Lean CLI v1.0. Copyright 2021 QuantConnect Corporation.
#
# 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... | [
"jaspervmerle@gmail.com"
] | jaspervmerle@gmail.com |
4e92895377c78c8ef4e517352d917ad1408279ba | b538301926fd5971decf529c28094aeec082c73d | /project3/search_project/apps/movie/migrations/0010_rmovieticketinfo_ticket_type.py | 12f4010fe325f8cf15c6b1a9c621b71ef0e2efe4 | [] | no_license | so1n/Django_project | a7407a422a4f492cc67df618fe54cafdc9b27d1f | 64611e11f452faca4a7a3f2b9d0203eb1afe2e56 | refs/heads/master | 2021-09-14T20:07:04.530064 | 2018-05-18T16:30:14 | 2018-05-18T16:30:14 | 101,761,725 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 512 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-03-31 09:28
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('movie', '0009_remove_rmovieticketinfo_ticket_type'),
]
operations = [
migrati... | [
"qaz6803609@163.com"
] | qaz6803609@163.com |
d5a5093c340b4abf4729f1ce2ccf139709b6d320 | 20527de15bff7810c8cb3d8b45d919ce413c22ec | /tools/sapp/sapp/trimmed_trace_graph.py | d67102f353ded3c03612d9e4b5b6bd5ac5a37199 | [
"MIT"
] | permissive | modulexcite/pyre-check | 7fd921b4f323e149aebe9a3eb03f6db124d23822 | a84e85f735fa80a95cd4a0a10d1b88bff3495c8e | refs/heads/master | 2020-06-27T07:56:18.019456 | 2019-07-31T01:11:01 | 2019-07-31T01:14:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 18,364 | py | #!/usr/bin/env python3
from collections import Counter
from typing import Any, Iterable, List, Optional, Set, Tuple
from .models import SharedTextKind, TraceFrame, TraceKind
from .trace_graph import TraceGraph
class TrimmedTraceGraph(TraceGraph):
"""Represents a trimmed graph that is constructed from a bigger T... | [
"facebook-github-bot@users.noreply.github.com"
] | facebook-github-bot@users.noreply.github.com |
edcda9c73ebd03acee0c6dfa013fe68a556d3484 | f07a42f652f46106dee4749277d41c302e2b7406 | /Data Set/bug-fixing-5/c6854fde29659e2fbade78ae704e1e243b0781e9-<_cf_simple_api_call>-fix.py | 0d6faa7157ab3c318a97dfac4e30a4681a4d9964 | [] | no_license | wsgan001/PyFPattern | e0fe06341cc5d51b3ad0fe29b84098d140ed54d1 | cc347e32745f99c0cd95e79a18ddacc4574d7faa | refs/heads/main | 2023-08-25T23:48:26.112133 | 2021-10-23T14:11:22 | 2021-10-23T14:11:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,823 | py | def _cf_simple_api_call(self, api_call, method='GET', payload=None):
headers = {
'X-Auth-Email': self.account_email,
'X-Auth-Key': self.account_api_token,
'Content-Type': 'application/json',
}
data = None
if payload:
try:
data = json.dumps(payload)
exc... | [
"dg1732004@smail.nju.edu.cn"
] | dg1732004@smail.nju.edu.cn |
782d80896638109ce6006d31e97c5e81aaca93e6 | e18174a56f801e4daaa1fe76685e9e119b6c7652 | /hamal/hamal/service.py | 08c18de4854182700143a0a62d33c857ad5f91c6 | [
"MIT"
] | permissive | JackDan9/hamal | 10ae45e14bfe6b27b31961e75ae0269c896089df | 965be9db066209300c52f0cf17d251290d8901b7 | refs/heads/master | 2021-03-28T14:16:49.156503 | 2020-09-23T01:00:38 | 2020-09-23T01:00:38 | 247,869,364 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,795 | py | # Copyright
"""Generic Node base class for all workers that run on hosts."""
import os
import sys
from oslo_concurrency import processutils
from oslo_log import log as logging
import oslo_messaging as messaging
from oslo_service import service
from oslo_utils import importutils
import hamal.conf
from hamal import b... | [
"1835812864@qq.com"
] | 1835812864@qq.com |
3ddebd52418dd604af3ec13cea4384e0c68d9657 | a6d04a7cf14c7186534f7af255bfdf032464f45c | /schoolAdmin/settingsXXX/prod.py | d9c4e6c35b9b03fb461cf4a12dfc74e5d30e21e8 | [] | no_license | tberhanu/school-admin | 6ddb199fda77ded6379226890b88d9c272587ef8 | 40f53a2b496e61affb8109d25f5ee685f334cfe6 | refs/heads/master | 2022-12-13T12:00:19.641683 | 2020-03-15T03:22:22 | 2020-03-15T03:22:22 | 155,252,989 | 0 | 0 | null | 2022-12-08T01:21:34 | 2018-10-29T17:28:53 | Python | UTF-8 | Python | false | false | 408 | py | from schoolAdmin.settings.base import *
DEBUG = False
SECRET_KEY = os.environ['SECRET_KEY']
ALLOWED_HOSTS = ['*']
try:
from schoolAdmin.settings.local import *
EMAIL_USE_TLS = EMAIL_USE_TLS
EMAIL_HOST = EMAIL_HOST
EMAIL_HOST_USER = EMAIL_HOST_USER
EMAIL_PORT = EMAIL_PORT
EMAIL_HOST_PASSWORD =... | [
"tberhanu@berkeley.edu"
] | tberhanu@berkeley.edu |
1c02c9eb8b4bf439e161198a96f0bbcc850f478c | 31141d90a7fda02b75e11db485da9e4abf6a23d4 | /django_amazon_scrapper/scrapper/parsers/base.py | 75ec9d9ea17160c71d7afb4d0f3b74ad9dd92ab9 | [] | no_license | reckonsys/django-amazon-scrapper | 7d7482738ed68475bb004fce5cec76c1e86814be | 7c8b9f98440b749b316bc3b1575c65d355ede42d | refs/heads/master | 2022-07-16T02:36:38.850625 | 2020-05-13T03:09:49 | 2020-05-13T03:09:49 | 262,225,004 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,083 | py | from re import compile
from datetime import datetime
from parsel.selector import Selector
from django_amazon_scrapper.scrapper.config import (
MAX_ANSWER_PAGES, MAX_QUESTION_PAGES, MAX_REVIEW_PAGES)
non_numeric = compile('[^0-9\.]+') # noqa: W605
def rating_transform(text):
return text.split(' ')[0]
def... | [
"dhilipsiva@pm.me"
] | dhilipsiva@pm.me |
9b6c103c6162f31075ac9f777a6e95e461cd3f81 | eab5f1c8292a76babb0e1b86471db954ac0d1a41 | /guvi88.py | 28e24d48c62abf3a1feff32e153afa5c9941d185 | [] | no_license | pavanimallem/pavs3 | 56cabfa7cc56c650746cbf80296e6fe32578f953 | c43e6b2993317c438554bbcae304eb6aa6763801 | refs/heads/master | 2020-03-24T07:26:10.827892 | 2018-09-19T11:18:24 | 2018-09-19T11:18:24 | 142,564,155 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 152 | py | N,M=map(int,raw_input().split())
if(N>M):
max1=N
else:
max1=M
while(1):
if(max1%N==0 and max1%M==0):
print(max1)
break
else:
max1=max1+1
| [
"noreply@github.com"
] | pavanimallem.noreply@github.com |
93669d48aa5488c35c0bea7bfd91f54922420401 | 1720aa75167aa0837a727e16761e3b65acadcba7 | /doc/source/serve/doc_code/monitoring/request_id.py | c7ba3d967f6c8b2b332b857db681d5f6ef6720b3 | [
"BSD-3-Clause",
"MIT",
"Apache-2.0"
] | permissive | pcmoritz/ray-1 | 3fd0dbf300cb4c1ce791555f4691e1101c1edbee | c5e78dc0c8a3e2c099451f37e54ab6b6fe8a004a | refs/heads/master | 2023-08-17T05:36:11.528122 | 2023-07-25T21:39:48 | 2023-07-25T21:39:48 | 77,173,450 | 0 | 1 | Apache-2.0 | 2023-03-04T08:57:43 | 2016-12-22T20:21:46 | Python | UTF-8 | Python | false | false | 287 | py | from ray import serve
import requests
@serve.deployment
class Model:
def __call__(self) -> int:
return 1
serve.run(Model.bind())
resp = requests.get(
"http://localhost:8000", headers={"RAY_SERVE_REQUEST_ID": "123-234"}
)
print(resp.headers["RAY_SERVE_REQUEST_ID"])
| [
"noreply@github.com"
] | pcmoritz.noreply@github.com |
8a6d280b4c76654188379111fba1e448cc3cb51a | 58dd5b7ca717527bb68d1485510dd312c52283fc | /gallery/urls.py | 04ccfd586d0a6cd4e50ddaabf4926e68612a6957 | [
"MIT"
] | permissive | kitili/MOVOTIA-GALLERY | 594e5b3b99005727ba5ada546d3ef5aad529479f | 1baea1a9451fd2c149fddfbc1ffb750b89e25da3 | refs/heads/main | 2023-07-27T07:52:25.803811 | 2021-09-07T16:57:33 | 2021-09-07T16:57:33 | 402,788,883 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 640 | py | from django.conf.urls import url
from django.contrib import admin
from django.urls import path
from . import views
from django.conf import settings
from django.conf.urls.static import static
urlpatterns=[
url(r'^$',views.welcome,name='home-page'),
url(r'^search/',views.search_results, name='search_results'),
... | [
"you@example.com"
] | you@example.com |
ed9e9c81d9d6b77bf9787d9b96897f464c7c132d | 6d91c5629575f972888b695990504b89364abf6b | /processing/process.py | 50d09ceb07297f9486ee6a00b5c91eff4afdf52b | [] | no_license | YerongLi/BFGD-sgns | 5772147de3ccbaaf1d72e0bfa94c51f9dbbe2257 | e51ad4bb32d7e2aca66aaf05f751e42ba4a52e54 | refs/heads/master | 2020-03-21T10:26:37.165527 | 2018-10-16T23:36:41 | 2018-10-16T23:36:41 | 138,450,915 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,029 | py | from until.word2vec_as_MF import Word2vecMF
import numpy as np
data = []
with open('enwik9.txt') as file:
for line in file:
data+= [line[:-1]]
def wiki_to_wordlist(sentence, remove_stopwords=True ):
# Function to convert a document to a sequence of words,
# optionally removing stop words. Returns... | [
"yerong.li@outlook.com"
] | yerong.li@outlook.com |
c1aee647ea25dbaf8c0b3f15fdf7ab746a9773e4 | 76462e0a338eea3ef56d46a5e4961cb4ca3dfafe | /conv_model.py | 089f8814663f39a202fb6f95f17796e507ad873b | [] | no_license | chengyang317/information_pursuit | 7183f3b893027b014bb4a99c91599af15604489f | c0ccbb7c64bac9ba69e7c0326f6146cf2a39c8fa | refs/heads/master | 2021-01-10T13:36:32.436830 | 2016-04-16T06:50:45 | 2016-04-16T06:50:45 | 55,868,676 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,464 | py | import conv_net
import dataset
class ConvModel(object):
def __init__(self, images_percent, network_percent, batch_size):
# self.work_path = '/scratch/dataset/information_pursue'
# self.dataset_path = '/scratch/dataset/information_pursue'
# self.images_path = '/scratch/dataset/256_ObjectCat... | [
"chengyang317@gmail.com"
] | chengyang317@gmail.com |
542541cd59d09901b3df635b452fe145209386bc | a53998e56ee06a96d59d97b2601fd6ec1e4124d7 | /线程/网络编程/block_IO.py | 91c7a77805d1761100064fd307fa5f4fb777ff3a | [] | no_license | zh-en520/aid1901 | f0ec0ec54e3fd616a2a85883da16670f34d4f873 | a56f82d0ea60b2395deacc57c4bdf3b6bc73bd2e | refs/heads/master | 2020-06-28T21:16:22.259665 | 2019-08-03T07:09:29 | 2019-08-03T07:09:29 | 200,344,127 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 498 | py | from socket import *
from time import ctime,sleep
sockfd = socket()
sockfd.bind(('127.0.0.1',8888))
sockfd.listen(5)
#设置非阻塞IO
# sockfd.setblocking(False)
sockfd.settimeout(5)
while True:
print('Waiting for connect...')
try:
connfd,addr = sockfd.accept()
except BlockingIOError:
sleep(2)
... | [
"zh_en520@163.com"
] | zh_en520@163.com |
08b2334bcc864a9bfb11eec1a58140c908b2e477 | 6646f6b92e9ff31f2f74b749ea12ace53cfc135c | /app/blueprints/payments/services.py | 97dbcf35e359b21ffbaa0c4dcd5dbeae462e0f98 | [] | no_license | EricMontague/SponsorMatch | 0a6685edb44b2694824d3d3a4d15dfcb42fdb68e | 864aa3cfe25d74c2b97b9f09f45eb9fa10dac892 | refs/heads/master | 2022-12-08T22:43:21.684165 | 2021-03-19T00:50:06 | 2021-03-19T00:50:06 | 241,396,411 | 0 | 0 | null | 2022-12-08T03:38:23 | 2020-02-18T15:27:42 | Python | UTF-8 | Python | false | false | 1,366 | py | """This module contains functions that abstract away operations for
the payment blueprint.
"""
import uuid
from datetime import datetime
from http import HTTPStatus
from app.models import Event, Sponsorship, Package
class OutOfStock(Exception):
pass
def validate_checkout_success(data, current_user, user_session... | [
"eric.g.montague@gmail.com"
] | eric.g.montague@gmail.com |
c00242f65b21ea5cc172ed575dff92f340ba4367 | bd02769c3f8cbd250c0c488c580852b28bda2ff4 | /venv/Lib/site-packages/instruments/tests/test_hp/test_hpe3631a.py | f2eda828681f93845587d0419375987f8ae70874 | [] | no_license | LiamDroog/DG645-Interface | 01ef09083b3e08de186ddef00cd0cc3a774e468b | 5f81ea76797893f807bb2a8b4a967de1f8effba0 | refs/heads/master | 2023-06-30T01:39:42.142594 | 2021-08-04T15:05:01 | 2021-08-04T15:05:01 | 387,855,182 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,792 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Module containing tests for the HP E3631A power supply
"""
# IMPORTS #####################################################################
from __future__ import absolute_import
import quantities as pq
import instruments as ik
from instruments.tests import expected_... | [
"droog@ualberta.ca"
] | droog@ualberta.ca |
c9ac6bdc93fce27473332e2daf6b1cbdc2f29bb7 | c7b5349181973a0a4a43caab5f093e1b7b328a78 | /backend/users/migrations/0002_auto_20210614_1607.py | 46436b5e4d86992d9f9be5ad0842f16dc26c0069 | [] | no_license | crowdbotics-apps/carexdoc-27970 | 7f5d0d00e6dcd00b4a63e15a9c2622a821a87869 | fd010351994205f6ffd97a570ef787231833a11f | refs/heads/master | 2023-06-03T06:44:23.163755 | 2021-06-14T16:07:51 | 2021-06-14T16:07:51 | 376,880,551 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 394 | py | # Generated by Django 2.2.20 on 2021-06-14 16:07
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='user',
name='name',
field=... | [
"team@crowdbotics.com"
] | team@crowdbotics.com |
26e7b80b25339b4b3e5ef345dbf48294ee4c7dcc | 6c8d8b1c5b02e3181efd41b5b227f8905f474fa9 | /neural network/emnist-pytorch/test.py | 8920642f5caf813e595561ff05e512533b1e77a2 | [] | no_license | DXV-HUST-SoICT/data_mining_mini_projects | 9203990a620546fb61ee571090ef51e16242054d | c1010a4f39b5b114ad58ae1f3224435c3a84f50e | refs/heads/master | 2022-11-01T08:38:21.141429 | 2020-06-16T12:01:32 | 2020-06-16T12:01:32 | 257,429,399 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,243 | py |
from config import get_config
from load_data import *
from PIL import Image
import torch.nn.functional as F
import torch
import cv2
import numpy as np
import glob
from backbone.mobilev3.mobilenetV3 import mobilenetv3
import glob
from alignment.retinaface import Retinaface_Detector
import torch.nn.functional as F
imp... | [
"vuong.1998@gmail.com"
] | vuong.1998@gmail.com |
94fc1330466f2f1af57653cf1ef6ae8288d3191a | 1ffa998ab070d1b96cf6350fa8050c0ae5b3b029 | /009.GUI编程/scripts/scrolledcanvas.py | d30699152826f468f6a1d84fc3697a1ca8a60e12 | [] | no_license | YangBin1729/python_notes | 849723206833d523e39c1588aec4e4d9ff197d7d | d0e6a0e0044013efe93ee28444d444236666545a | refs/heads/master | 2020-08-14T02:50:14.845091 | 2019-10-14T16:01:20 | 2019-10-14T16:01:20 | 215,083,908 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,284 | py | #!python3
# scrolledcanvas.py -
from tkinter import *
class ScrolledCanvas(Frame):
def __init__(self, parent=None, color='white'):
Frame.__init__(self, parent=None)
self.pack(expand=YES, fill=BOTH)
canv = Canvas(self, bg=color, relief=SUNKEN)
canv.config(width=500, height=300) ... | [
"360661716@qq.com"
] | 360661716@qq.com |
ee0cb6191a701cf94a798acba61fff961a626cbe | 3d31eaec2f8d1757b94316bcc78a8ad08e42e529 | /tests/conftest.py | 3edf8ea6af1c56dccbc77affe94e32a9418e6636 | [
"MIT"
] | permissive | mwchase/python-mypy-structured-data | 48d27fa6bf51c0de1872a4d576d9a65e030a5ba0 | 251ebffcb8698a9b7c2734d163144f645e5e7361 | refs/heads/master | 2020-04-29T10:11:52.803285 | 2019-03-18T11:04:22 | 2019-03-18T11:04:22 | 176,052,890 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 168 | py | import pytest
@pytest.fixture(scope="session")
def mypy_structured_data():
import mypy_structured_data as _mypy_structured_data
return _mypy_structured_data
| [
"max.chase@gmail.com"
] | max.chase@gmail.com |
5e05b462d2d08e4b4a7a183d9f35fe302e6a3632 | daf28ed3f20340a136f19d582019fbd2554b6ea6 | /python/Ds_NonPrompt_kstar892kkpi_pt1p8_cfg.py | 3e9689a686f50d4b977fb52bfb144d5231e12781 | [] | no_license | NiharSaha/Ds_MC_Gen_fragment | ccb4d48a80e46c260da0c7c7e821ad4da12f6a43 | b9bf94cb4f0cf4ffa2619e4671a8c70ca37aaf5d | refs/heads/master | 2022-01-08T10:31:43.544326 | 2018-04-12T19:45:30 | 2018-04-12T19:45:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,002 | py |
import FWCore.ParameterSet.Config as cms
from Configuration.Generator.Pythia8CommonSettings_cfi import *
from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import *
from GeneratorInterface.EvtGenInterface.EvtGenSetting_cff import *
generator = cms.EDFilter("Pythia8GeneratorFilter",
pythiaPylistVerbosity = c... | [
"peng43@purdue.edu"
] | peng43@purdue.edu |
0a3cab0f75aeeda9fac191ab6b4705170da24211 | 70280955a5382d73e58395eba78c119a400f4ce7 | /abc/161/fib.py | 56c8409de2bb8f29c048969611d44d9b4c1af779 | [] | no_license | cohock13/atcoder | a7d0e26a10a4e58690347a2e36839c2f503a79ba | d268aa68fc96203eab94d021bd158cf84bdb00bc | refs/heads/master | 2021-01-03T00:41:31.055553 | 2020-10-27T12:28:06 | 2020-10-27T12:28:06 | 239,839,477 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 97 | py | def fib(n):
if n == 0 or 1:
return n
else:
return fib(n-1) + fib(n-2) | [
"callout2690@gmail.com"
] | callout2690@gmail.com |
aac0d25784e840b17c4a9184289a36081dea4159 | 187a6558f3c7cb6234164677a2bda2e73c26eaaf | /jdcloud_sdk/services/monitor/models/DescribeDatasourceEnd.py | c966d56eae7d86919ac88b98c37f47f62daca439 | [
"Apache-2.0"
] | permissive | jdcloud-api/jdcloud-sdk-python | 4d2db584acc2620b7a866af82d21658cdd7cc227 | 3d1c50ed9117304d3b77a21babe899f939ae91cd | refs/heads/master | 2023-09-04T02:51:08.335168 | 2023-08-30T12:00:25 | 2023-08-30T12:00:25 | 126,276,169 | 18 | 36 | Apache-2.0 | 2023-09-07T06:54:49 | 2018-03-22T03:47:02 | Python | UTF-8 | Python | false | false | 1,426 | py | # coding=utf8
# Copyright 2018 JDCLOUD.COM
#
# 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 ... | [
"tancong@jd.com"
] | tancong@jd.com |
16922aae8b82a73bb4b642746b65e4da7177d494 | 0f556b9d4e250df73bf1e0929dbd4afad51e82fe | /test_currency_sign_invalid_values/test_currency_sign_invalid_values.py | 43f1ab42deeeffaf2a43b946acadd147bfb367e6 | [] | no_license | unabl4/PythonCodeClub | 0ef1cb4d145860a4fda528c2eea513d0ba6b8327 | 72d5887342c1e0b304307a0e0ac9eb78f0202c35 | refs/heads/master | 2021-04-30T04:42:03.266029 | 2019-02-18T22:09:12 | 2019-02-18T22:09:12 | 121,541,065 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 648 | py | # https://pyspace.eu/ws/thorgate/ch/37/
import pytest
def currency_sign_from_name(name):
mapping = {
'euro': '€',
'dollar': '$',
'pound': '£'
}
if name.lower() in mapping:
return mapping[name.lower()]
raise ValueError(f'Name of currency not one of ["euro", "dollar", "po... | [
"unabl4@gmail.com"
] | unabl4@gmail.com |
328c8a9bf1a24fce1677e71befabd5c226a2a775 | 971e0efcc68b8f7cfb1040c38008426f7bcf9d2e | /tests/artificial/transf_Integration/trend_MovingAverage/cycle_5/ar_/test_artificial_1024_Integration_MovingAverage_5__20.py | e1afb73035273913aa109f8e355d3ac5ab7cc8fa | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | antoinecarme/pyaf | a105d172c2e7544f8d580d75f28b751351dd83b6 | b12db77cb3fa9292e774b2b33db8ce732647c35e | refs/heads/master | 2023-09-01T09:30:59.967219 | 2023-07-28T20:15:53 | 2023-07-28T20:15:53 | 70,790,978 | 457 | 77 | BSD-3-Clause | 2023-03-08T21:45:40 | 2016-10-13T09:30:30 | Python | UTF-8 | Python | false | false | 271 | py | import pyaf.Bench.TS_datasets as tsds
import tests.artificial.process_artificial_dataset as art
art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "MovingAverage", cycle_length = 5, transform = "Integration", sigma = 0.0, exog_count = 20, ar_order = 0); | [
"antoine.carme@laposte.net"
] | antoine.carme@laposte.net |
9402361bc4ef792187d906d289f1d37b7320845f | 603284928313c2245b426ab66fff1c237019b55a | /2.79/Sets/toolplus_align/ops_main/align_mirror.py | 1e5984ed816e63f26438d970f12e306af41a947f | [] | no_license | Pumpkin-Studios/ToolPlus | d663239e61aa1a2676c14c8494c19e4d09de9ffc | fc59449c33358d1087fe798bbdae71cc7bf20778 | refs/heads/master | 2020-04-03T17:55:54.804723 | 2017-12-10T19:30:28 | 2017-12-10T19:30:28 | 155,464,330 | 1 | 0 | null | 2018-10-30T22:57:13 | 2018-10-30T22:26:52 | Python | UTF-8 | Python | false | false | 4,315 | py | # ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distrib... | [
"cgdroste@gmail.com"
] | cgdroste@gmail.com |
83ff9b23abf99b9fa13829ea8c406c5a3f05df4c | 748c4ba7058336eb2d09b413066d21582e26d71b | /discussions/migrations/0002_unique_channel_name.py | 385dcf8e866a9cc88710037a996626247ca5ad52 | [
"BSD-3-Clause"
] | permissive | mitodl/open-discussions | 6dbb8ae2843263889634849ddd9096f74536b78e | ba7442482da97d463302658c0aac989567ee1241 | refs/heads/master | 2023-08-10T02:54:45.706067 | 2023-08-01T17:05:36 | 2023-08-01T17:05:36 | 93,760,926 | 13 | 3 | BSD-3-Clause | 2023-08-01T17:05:40 | 2017-06-08T14:46:35 | Python | UTF-8 | Python | false | false | 751 | py | # Generated by Django 2.2.27 on 2022-07-22 18:42
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("discussions", "0001_add_channels"),
]
operations = [
migrations.AlterField(
model_name="channel",... | [
"noreply@github.com"
] | mitodl.noreply@github.com |
4ff655e7a1fa886fe509102222821292165e3df2 | 02e8612fbc33b6e6a26e3f935db5069693b58f76 | /prepalgo/Trees/binary-tree-preorder-traversal.py | 263d7c54623c80457b735cc2be157bf49bf182db | [] | no_license | arsaikia/Data_Structures_and_Algorithms | f6fe2547d9ebb5750e7d88cc1ee7e6a2b858ecd9 | bdb9037349e82d72d9833ea1fa7102a66b43a9f2 | refs/heads/master | 2023-07-12T20:16:43.067906 | 2023-07-12T07:10:28 | 2023-07-12T07:10:28 | 219,902,931 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 735 | py | # O(N) Time | O(N) Space
def recursivePreorderTraversal(self, root: Optional[TreeNode]) -> List[int]:
result = []
def recursivePreorder(node):
if not node:
return
result.append(node.val)
recursivePreorder(node.left)
recursivePreorder(node.right)
return node... | [
"arunabh.matrix@gmail.com"
] | arunabh.matrix@gmail.com |
17def8d9189e4399694c0c78bae34300ebec82e2 | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_165/ch16_2019_03_29_17_59_29_630524.py | d867e226cabe74dee09a0db842c8b1735edd3fe7 | [] | 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 | 98 | py | def distancia_euclidiana(x1,y1,x2,y2):
d = ( (x1 - x2)**2 + (y1 - y2)**2 )**(1/2)
return d | [
"you@example.com"
] | you@example.com |
7ba04419bdfdb271dcc86679785baa2b9c12df03 | 585bac463cb1919ac697391ff130bbced73d6307 | /55_JumpGame/solution1.py | bc317a549967e922aa702f3e66ddbc1531387a2b | [] | 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 | 12,492 | py |
"""
To overcome memory exceed limit error, we need to reduce space from 2d to 1d
instead consider canjump from i to j, only consider 0 to i(or i to len(nums)-1)
back-tracker fashion
"""
class Solution(object):
def canJump(self, nums):
"""
:type nums: List[int]
:rtype: bool
"""
... | [
"angleflycll@gmail.com"
] | angleflycll@gmail.com |
e3d3225909bfc1ea48128e4b610586143a839609 | f576f0ea3725d54bd2551883901b25b863fe6688 | /sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_03_01/_configuration.py | 5ffcfcdccd3938b48fbf8078364da3cfd961d196 | [
"LicenseRef-scancode-generic-cla",
"MIT",
"LGPL-2.1-or-later"
] | permissive | Azure/azure-sdk-for-python | 02e3838e53a33d8ba27e9bcc22bd84e790e4ca7c | c2ca191e736bb06bfbbbc9493e8325763ba990bb | refs/heads/main | 2023-09-06T09:30:13.135012 | 2023-09-06T01:08:06 | 2023-09-06T01:08:06 | 4,127,088 | 4,046 | 2,755 | MIT | 2023-09-14T21:48:49 | 2012-04-24T16:46:12 | Python | UTF-8 | Python | false | false | 3,610 | 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 may ... | [
"noreply@github.com"
] | Azure.noreply@github.com |
093d7d37b4ea21dc042777327500efa18b7b7dbc | 53bdd0fb7fd6666fec4a156a8c616bc32941c1df | /367_valid_perfect_square/_2.py | e6f324078235ae1dc3ba8ffa53326076b4ff25ed | [] | no_license | chxj1992/leetcode-exercise | 663f138c11ab8a8351fcd584199c6d103befdfac | 248b620791611001ebb471dcf8284437264b2f20 | refs/heads/master | 2021-07-08T17:57:08.329390 | 2021-04-15T09:59:17 | 2021-04-15T09:59:17 | 236,332,029 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 509 | py | import unittest
class Solution:
def isPerfectSquare(self, num: int) -> bool:
prev, curr = num, 0
while prev - curr > 1:
prev = curr if curr > 0 else num
curr = (prev + num / prev) / 2
return int(prev) * int(prev) == num
class Test(unittest.TestCase):
def test... | [
"chxj1992@gmail.com"
] | chxj1992@gmail.com |
a1af1e8f7bdea8bcf06c6a43071faa01dd04feed | 9d4a03990d94e9fb0248ec94875376c82139891a | /Python实战:四周实现爬虫系统/week_2/第二周实战项目/page_parsing.py | 56fca609d019baac9aef81fc71571b10d091f737 | [] | no_license | wenhaoliang/learn-python | 114744f3c94859f665a998b03c6d5f5d908fb94d | bd31daa34cc79f3171a2e195c149af60a7e0ebed | refs/heads/master | 2020-04-16T02:14:36.345629 | 2019-07-06T12:26:23 | 2019-07-06T12:26:23 | 58,053,238 | 7 | 7 | null | 2017-07-21T09:35:55 | 2016-05-04T13:14:26 | Python | UTF-8 | Python | false | false | 1,890 | py | import pymongo
import requests
from bs4 import BeautifulSoup
import time
client = pymongo.MongoClient('localhost', 27017)
ganji = client['ganji']
ganji_data2 = ganji['ganji_data2']
ganji_url = ganji['ganji_url']
def get_pages(base_url):
pages_url = []
# http://zz.ganji.com/xuniwupin/o2/
for i in range(1,... | [
"641541452@qq.com"
] | 641541452@qq.com |
922abc2031be5b62c9e058bd09d7b55c70ea4c04 | 0c1bfd0ba861f1abeff506f4b28289189474ca3b | /blueblog/urls.py | ba67d48d3157bdebef4af530fbde698c55b187fd | [] | no_license | jrjames83/blueblog | abc267a95cd5e2dce0b13eccca16d86764e667c2 | b5ca49e47275e384d41ffb8bd8f30882298693f1 | refs/heads/master | 2020-05-29T15:12:54.306150 | 2016-07-09T03:36:02 | 2016-07-09T03:36:02 | 62,930,400 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,010 | py | from django.conf.urls import include
from django.conf.urls import url
from django.contrib import admin
from django.views.generic import TemplateView
from accounts.views import UserRegistrationView
from django.contrib.auth.views import login
from django.contrib.auth.views import logout
from blog.views import NewBlogView... | [
"="
] | = |
14ae5aa5b0361304720216f6350ae303c6d27619 | e23a4f57ce5474d468258e5e63b9e23fb6011188 | /045_functions/004_closures/_exercises/001/004_closures_template_003_Python Closures.py | 23b940d5ab218fd852ad01e0253af1facb4efd25 | [] | no_license | syurskyi/Python_Topics | 52851ecce000cb751a3b986408efe32f0b4c0835 | be331826b490b73f0a176e6abed86ef68ff2dd2b | refs/heads/master | 2023-06-08T19:29:16.214395 | 2023-05-29T17:09:11 | 2023-05-29T17:09:11 | 220,583,118 | 3 | 2 | null | 2023-02-16T03:08:10 | 2019-11-09T02:58:47 | Python | UTF-8 | Python | false | false | 450 | py | # Python program to illustrate
# nested functions
# ___ outerFunction text
# text _ t..
#
# ___ innerFunction
# print t..
#
# ?
#
#
# __ ______ __ ______
# o.. Hey!
# Python program to illustrate
# closures
# ___ outerFunction text
# text _ t..
#
# ___ innerFunction
# print t...... | [
"sergejyurskyj@yahoo.com"
] | sergejyurskyj@yahoo.com |
f19934fbe801503013f830a2425bc39e53d0fc4d | ad1e7db1102a1310a8bd48bb3c25abc8f763faff | /Medium Problems/longest-zig-zag-subsequence.py | 48ffeb962584a7e06ecb66ecfb88359091c80919 | [] | no_license | AggarwalAnshul/Dynamic-Programming | 2b3beb3673ab83501ea954cea00d087f2c44c3d8 | b08487d45b9f1653468bb2f9169e5eac64ef5f2d | refs/heads/master | 2020-06-26T14:20:40.673045 | 2020-04-17T09:17:17 | 2020-04-17T09:17:17 | 199,656,737 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,074 | py | """
#M.52
Longest Zig-Zag Subsequence
The longest Zig-Zag subsequence problem is to find length of the longest subsequence of given sequence such that all elements of this are alternating.
If a sequence {x1, x2, .. xn} is alternating sequence then its element satisfy one of the following relation :
x1 < x2 > x3 < x... | [
"anshul.aggarwal.sfd@gmail.com"
] | anshul.aggarwal.sfd@gmail.com |
d77a61e56f1ef81a78385da4e37cd5b3c2bec376 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03281/s953545433.py | c4ad34b0e8b41c0a5278ea5a839881a28d0e4c55 | [] | 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 | 278 | py | n = int(input())
cnt = 0
def sympy(num):
l = []
for i in range(1, num+1):
for j in range(1, num+1):
if (i % 2 != 0) and (i*j == num):
l.append(i)
return l
for i in range(1, n+1):
l = sympy(i)
if (i % 2 != 0) and (len(l) == 8):
cnt += 1
print(cnt) | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
af6ec1da362d30e939baaf590762e77cba3f1b85 | 1113b5b7838d666d1e5fc6352ded5c47d2e1db1a | /Regex_and_Parsing/Re.findall()&Re.finditer().py | cc352d436faa37d47b5bab9ce7b6bbccfb0bc57c | [
"MIT"
] | permissive | NikolayVaklinov10/Python_Challenges | 84b118f7d9e3855b8c79659609fdc7f46b605a20 | a1052e1d527004bbb6072a3cbc802065469f66ae | refs/heads/master | 2020-08-29T00:32:23.045278 | 2019-11-06T18:11:26 | 2019-11-06T18:11:26 | 217,866,654 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,774 | py | """
re.findall()
The expression re.findall() returns all the non-overlapping matches of patterns in a string as a list of strings.
Code
#>>> import re
#>>> re.findall(r'\w','http://www.hackerrank.com/')
['h', 't', 't', 'p', 'w', 'w', 'w', 'h', 'a', 'c', 'k', 'e', 'r', 'r', 'a', 'n', 'k', 'c', 'o', 'm']
re.finditer(... | [
"nikolayvaklinov@yahoo.com"
] | nikolayvaklinov@yahoo.com |
ea3d02e8f5f49d287af457fcaae3a0d08c76ca82 | 1c3f5f1bdf0e24f5d6db968572f13c860ac1c06e | /src/scs_analysis/sample_error.py | ef14ea090c5bcaff5b2b0299d65a82415cc40431 | [
"MIT"
] | permissive | kbschulte/scs_analysis | 62a97dd2f719db59e295175759d9490a59cda011 | 5df0c6ba3d284993732eb60e4275ffaaf2f55b86 | refs/heads/master | 2023-08-29T06:48:44.813246 | 2021-11-05T08:59:17 | 2021-11-05T08:59:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,674 | py | #!/usr/bin/env python3
"""
Created on 6 Nov 2019
@author: Bruno Beloff (bruno.beloff@southcoastscience.com)
source repo: scs_analysis
DESCRIPTION
The sample_error utility is used to compute either the difference between or the ratio of a reported value and a
reference value for a given path is a stream of JSON docu... | [
"bruno.beloff@southcoastscience.com"
] | bruno.beloff@southcoastscience.com |
e0041a2b6462a1b7d01224a176021c440a40066b | 06b95aa8c6133cfb2fc145b6c7836ab698d3eb31 | /seq2seq.py | 2a08a6d9101ea6c701ade2b795ec1344fcf62e04 | [] | no_license | marii-moe/course-nlp | f90640067ad837c9a943215b677d910aa6f18485 | 59c261b11a4e4e44051985062af540dee6088e32 | refs/heads/master | 2023-08-03T20:32:17.008685 | 2021-09-09T07:17:43 | 2021-09-09T07:17:43 | 384,071,869 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,864 | py | from fastai.text import *
def seq2seq_collate(samples:BatchSamples, pad_idx:int=1, pad_first:bool=True, backwards:bool=False) -> Tuple[LongTensor, LongTensor]:
"Function that collect samples and adds padding. Flips token order if needed"
samples = to_data(samples)
max_len_x,max_len_y = max([len(s[0]) for s... | [
"j@fast.ai"
] | j@fast.ai |
a0f68f155556bd5e2954ab921529f4b8a08b6220 | 00f3474dfd326a7c1d21124bdc9267d8fd4373f0 | /report2/2-6-astar/field.py | 2e9f2e86eb6e5b04887bf15e206d6b5d5d21c0cc | [] | no_license | jre233kei/aia-kadai | d2d764de0ddff0fbb73ad4ae04635ef5dba75490 | 3732e8bd8772d71dc6549c971b602067a44a5537 | refs/heads/master | 2020-06-12T09:42:15.174053 | 2019-07-05T14:59:39 | 2019-07-05T14:59:39 | 194,261,290 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 355 | py | import vector2 as vec2
class field:
field = {}
def __init__(self, txt):
for i in range(len(txt)):
for j in range(len(txt[i])):
self.field[vec2.vector2(j, i)] = txt[i][j]
def get_tile(self, pos):
return self.field.get(pos)
def __str__(self):
return... | [
"jre233kei+github@gmail.com"
] | jre233kei+github@gmail.com |
2960210a9ccc0d92f11cb5128ca0f6d1dc5d32cc | ac0b9c85542e6d1ef59c5e9df4618ddf22223ae0 | /kratos/.svn/pristine/29/2960210a9ccc0d92f11cb5128ca0f6d1dc5d32cc.svn-base | 065599a02d8ba6d88138e92acc8ca16c130d9ced | [] | no_license | UPC-EnricBonet/trunk | 30cb6fbd717c1e78d95ec66bc0f6df1a041b2b72 | 1cecfe201c8c9a1b87b2d87faf8e505b7b1f772d | refs/heads/master | 2021-06-04T05:10:06.060945 | 2016-07-15T15:29:00 | 2016-07-15T15:29:00 | 33,677,051 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,074 | from KratosMultiphysics import *
class PointOutputProcess(Process):
defaults = Parameters('''{
"position" : [],
"output_file_name" : "",
"output_variables" : []
}''')
def __init__(self,model_part,params):
self.model_part = model_part
# Note: params is expected... | [
"enriquebonetgil@hotmail.com"
] | enriquebonetgil@hotmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.