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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a7c06dc93cc7febe105c9c5e02e838264589e283 | bb142df010298fb4fa51d021a869bc99f689541b | /arelle/plugin/security/cryptAES_CBC.py | 47f32f7e35b403f4958f998c77ac43e52b7dc2da | [
"Apache-2.0"
] | permissive | fritzh321/Arelle | 6d7a7363716d52e3bf2f788c43a50de5f84edaa3 | fd585c7a5cef067ae213059bb864c4d32f937eb5 | refs/heads/master | 2020-04-09T22:50:02.115753 | 2018-12-02T16:33:20 | 2018-12-02T16:33:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,957 | py | '''
Created on June 7, 2018
@author: Mark V Systems Limited
(c) Copyright 2018 Mark V Systems Limited, All rights reserved.
Template crypt module using AES CBC mode.
Customize for an integrated security environment
Input file parameters may be in JSON (without newlines for pretty printing as below):
[ {"file": "f... | [
"fischer@markv.com"
] | fischer@markv.com |
6de2299a08c10405b614b3e10584176fc4c0a16f | 6a194f60c57f00d89467a551696a6d12c6494ca5 | /migrations/versions/b67f74365ac0_updated_the_classes.py | 6906146f3c3e3c17f86d5eff34066880f6b860a3 | [
"MIT"
] | permissive | GeGe-K/Pitcher-App | 3479bc41b0dd431592db87dd9bf94ca59645e2d6 | 4a970b37fe0fcd63ad3853a4f764c410a4acb640 | refs/heads/master | 2020-04-06T22:37:58.522524 | 2018-11-26T08:41:18 | 2018-11-26T08:41:18 | 157,842,038 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,372 | py | """updated the classes.
Revision ID: b67f74365ac0
Revises: 9d0c25ad18b3
Create Date: 2018-11-20 08:24:19.781368
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'b67f74365ac0'
down_revision = '9d0c25ad18b3'
branch_labels = None
depends_on = None
def upgrade():... | [
"gloriagivondo@gmail.com"
] | gloriagivondo@gmail.com |
11a6fe0692f20dd9838d132b112065aff12e988d | 2f30cf20d58e2cde4037441e67213223c69a6998 | /lesson32_接口总结/d2_time_log.py | dc2d95c037ebc1ecda9cf0ab9e2c2fdab64b67c4 | [] | no_license | zengcong1314/python1205 | b11db7de7d0ad1f8401b8b0c9b20024b4405ae6c | da800ed3374d1d43eb75485588ddb8c3a159bb41 | refs/heads/master | 2023-05-25T07:17:25.065004 | 2021-06-08T08:27:54 | 2021-06-08T08:27:54 | 318,685,835 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 386 | py | # 根据时间生成新文件
import logging
import time
from logging.handlers import TimedRotatingFileHandler
logger = logging.getLogger('python36')
handler = TimedRotatingFileHandler('time12.log',when='s',interval=2,backupCount=100,encoding='UTF-8')
logger.addHandler(handler)
for i in range(100):
logger.warning("生成警告信息{}".format... | [
"237886015@qq.com"
] | 237886015@qq.com |
68b702c7709ce4ab311d3fa7fb54a30b2284e31d | bd3fb18aef0bf47eb6410107d939134cffc3a1ae | /0-jakc/jakc_sale/models/procurement.py | 976173c9d8ebca1145d8f77ed6cb1eee4a2fdaf9 | [] | no_license | rapolebas/project-0021 | 477227f7359c893df891c1d98da82d45b6cfcdbe | 4e65ca034be5ff4c7a9c91a988db85ec37392452 | refs/heads/master | 2020-03-16T02:32:32.213774 | 2017-12-02T07:59:15 | 2017-12-02T07:59:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 671 | py | from datetime import datetime, timedelta
from openerp import SUPERUSER_ID
from openerp import api, fields, models, _
import openerp.addons.decimal_precision as dp
from openerp.tools import float_is_zero, float_compare, DEFAULT_SERVER_DATETIME_FORMAT
import logging
logging.basicConfig(level=logging.DEBUG)
logger = log... | [
"wahhid@gmail.com"
] | wahhid@gmail.com |
4a80d8be5dbcc1b93e738373fe9b598f7b96a3e3 | ad8de2c69a4d3692af2ce14aaa31ba97de95f24f | /project_code/Example Scripts/plot_oneclass.py | 28048908c1cd94c8c477ae1709fb92532a28fc17 | [
"MIT"
] | permissive | e-koch/Phys-595 | b04f7179879b3f6ff8a6d608be8667b892b874d9 | 44872fa47609242f7aa8671eb75851622516129f | refs/heads/master | 2021-01-25T05:28:09.497201 | 2015-09-10T04:58:26 | 2015-09-10T04:58:26 | 24,083,293 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,557 | py | """
==========================================
One-class SVM with non-linear kernel (RBF)
==========================================
An example using a one-class SVM for novelty detection.
:ref:`One-class SVM <svm_outlier_detection>` is an unsupervised
algorithm that learns a decision function for novelty detection:
... | [
"koch.eric.w@gmail.com"
] | koch.eric.w@gmail.com |
f3e82229dd7ad3dce9fa4f95ba275f4f42e1397d | dbf635c24ed9eff228ffaf35e71dcfd3712891a5 | /acoustic/COVAREP/sentence_level_format/archived_models/archived_model_4/load_model.py | a663a69b3fee68df98be40a215253ee114384130 | [] | no_license | aascode/depression_estimation_from_individual_modalities | 57f3b6ebf740585c9cb3d5821028969e2f36e4d1 | 6e1563b4081c4aadc91f7110c684290b7a622167 | refs/heads/master | 2022-01-14T20:41:33.333739 | 2019-05-06T18:30:11 | 2019-05-06T18:30:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 836 | py | import numpy as np
import keras
from keras.models import Model, Sequential, load_model
from keras.layers import Dense, CuDNNLSTM, Input, Concatenate, Dropout
from keras import regularizers
def load_model(location = None):
if(location != None):
model = keras.models.load_model(location)
print("Loaded the model."... | [
"arbaaz.qureshi29@gmail.com"
] | arbaaz.qureshi29@gmail.com |
340d1b477b1dd67a4c8461aabf6a05268df3064b | 3c358b34811ad9d178e2865336498dde3f3e5032 | /WAFLEX/server/mymail.py | 8db59a99094a40f33d3899b37367ca1491db7699 | [] | no_license | shywj05/WAFLEX-MiddelProject | b255796839c889a16c4900a87f2e5adcd1337a44 | ca8db1e368104f75218a8da9a0f987349d27f755 | refs/heads/master | 2023-06-30T23:50:22.367106 | 2021-08-03T01:15:11 | 2021-08-03T01:15:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,612 | py | import smtplib
from email.mime.text import MIMEText
import string
import random
class MyMail:
def mysendmail(self, recvEmail, title):
smtpName = "smtp.gmail.com" #smtp 서버 주소
smtpPort = 587 #smtp 포트 번호
sendEmail = "sysojxx@gmail.com"
password = "Qwe123!@#"
... | [
"shywj05@gmail.com"
] | shywj05@gmail.com |
307cd74f01bac3f5f7372ab4a7ad3205c7496789 | 69ff10443014ac749d6e8e5eb8dd65f0ae995e0c | /install/opt/etc/gunicorn/sigproxy_config.py | 4764190e9bef0dfc137545068bab743d1f6bf0fd | [] | no_license | identinetics/d-PVZDweb | 1443051a961c2ffff3cef8fc5326a651d4783443 | 1e269546a505eed121e32cf22b7f2227e6473c95 | refs/heads/master | 2021-07-13T01:46:34.025748 | 2019-05-09T07:20:18 | 2019-05-09T07:22:06 | 160,792,534 | 0 | 1 | null | 2020-06-08T13:27:09 | 2018-12-07T08:10:35 | Shell | UTF-8 | Python | false | false | 786 | py | import os
from seclay_xmlsig_proxy_config import SigProxyConfig as Cfg
# Parameter description: see https://github.com/benoitc/gunicorn/blob/master/examples/example_config.py
bind = Cfg.host + ':' + str(Cfg.port)
access_log_format = '%(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s"'
accesslog = '/var/log/... | [
"rainer@hoerbe.at"
] | rainer@hoerbe.at |
cbcfdc0e60f18a05779c713ed704226606269649 | 7950091dfd123b9fbe020cb8c9f529e98f7a89d8 | /weatherenv/Lib/site-packages/pipenv/vendor/backports/__init__.py | 0c64b4c10b513a109244dbb31d44bb616bdcf10c | [
"LicenseRef-scancode-python-cwi",
"Python-2.0",
"LicenseRef-scancode-free-unknown",
"GPL-1.0-or-later",
"LicenseRef-scancode-other-copyleft",
"MIT",
"BSD-3-Clause"
] | permissive | diyajaiswal11/Weather-App | d0000ebd12fb051cca8a4c56da4418c89714fb3e | f5e1bca505f6643d870b905577a383a10d17b026 | refs/heads/master | 2022-12-11T05:16:38.941949 | 2020-08-25T18:02:18 | 2020-08-25T18:02:18 | 231,254,913 | 3 | 0 | MIT | 2022-12-08T03:22:58 | 2020-01-01T19:25:37 | Python | UTF-8 | Python | false | false | 179 | py | __path__ = __import__('pkgutil').extend_path(__path__, __name__)
from . import weakref
from . import enum
from . import shutil_get_terminal_size
from . import functools_lru_cache
| [
"shubhijaiswal2000@gmail.com"
] | shubhijaiswal2000@gmail.com |
76d348dd6ae297a33d077ef1b31f5028fbf0cb36 | a8d86cad3f3cc6a977012d007d724bbaf02542f7 | /testsuites_dev/vui/sandbox/parse_test_suite.py | af2cfbb7b8f5b922afabd76a9b2df5c5256e8d27 | [] | no_license | bopopescu/bigrobot | f8d971183119a1d59f21eb2fc08bbec9ee1d522b | 24dad9fb0044df5a473ce4244932431b03b75695 | refs/heads/master | 2022-11-20T04:55:58.470402 | 2015-03-31T18:14:39 | 2015-03-31T18:14:39 | 282,015,194 | 0 | 0 | null | 2020-07-23T17:29:53 | 2020-07-23T17:29:52 | null | UTF-8 | Python | false | false | 345 | py | #!/usr/bin/env python
import sys
from robot.api import TestData
def print_suite(suite):
print 'Suite:', suite.name
for test in suite.testcase_table:
print '-', test.name
for child in suite.children: # recurse through testsuite directory
print_suite(child)
suite = TestData(source=sys.argv... | [
"vui.le@bigswitch.com"
] | vui.le@bigswitch.com |
ccc0c00ee714e842e0109aed656cd984dce4fb0a | b7add0d1b1effc50b27d3316fa5889a5227e5b19 | /Micropython/backups/tests/archieved/servo_driver_test.py | b14cc8b334a2136f39fec59f7d606d07e82b091c | [] | no_license | Woz4tetra/Atlas | efb83a7c7b2698bf8b36b023f7aa573cc38284f6 | c7380868a9efef9d1594ed7aa87187f03a7e4612 | refs/heads/master | 2020-04-04T06:25:50.657631 | 2017-04-05T01:53:15 | 2017-04-05T01:53:15 | 50,269,756 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 771 | py | import pyb
from libraries.pca9685 import ServoDriver
servo_driver = ServoDriver(2, -90, 90, 150, 600)
assert servo_driver.angle_to_pulse(-90) == 150
assert servo_driver.angle_to_pulse(90) == 600
assert servo_driver.angle_to_pulse(0) == 375
# servo_driver.servo_angle_min =
# servo_driver.servo_angle_max =
# servo_d... | [
"woz4tetra@gmail.com"
] | woz4tetra@gmail.com |
3159f08ce73dc31e6bc9ee9d40859fdff73dd26b | 7fb87945b77d3adaedd8a155c981e97946734e41 | /cachetools/func.py | 78ec7f632964682cc6be0e5d5585a16cb22d26d7 | [] | no_license | Tony910517/openstack | 916b36368ea9f17958e4eb04bd1f9daf3aba9213 | 4c1380a03c37e7950dcf2bba794e75b7e4a8dfd0 | refs/heads/master | 2020-05-20T01:05:22.499224 | 2019-05-07T01:11:05 | 2019-05-07T01:11:05 | 185,292,662 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,382 | py | import collections
import functools
import random
import time
from .lfu import LFUCache
from .lru import LRUCache
from .rr import RRCache
from .ttl import TTLCache
try:
from threading import RLock
except ImportError:
from dummy_threading import RLock
_CacheInfo = collections.namedtuple('CacheInfo', [
'h... | [
"471123674@qq.com"
] | 471123674@qq.com |
7943b6a769c17e914c502d093500da05a3a32b96 | 37482bcc34c569b2042cc4f893a92360cb5cbca6 | /shell/userinfo.py | ed06ab41df9ca3fd84acfc2b025e1ee08f2ecb10 | [] | no_license | hustmonk/k21 | 8442b7bdc6eb92282add59a4ee9166a89897d3f4 | 12279e970da57150154ef3a6343afccb8b992870 | refs/heads/master | 2016-09-05T09:22:48.506265 | 2015-07-11T13:01:33 | 2015-07-11T13:01:33 | 35,711,753 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,071 | py | #!/usr/bin/env python
# -*- coding: GB2312 -*-
# Last modified:
"""docstring
"""
__revision__ = '0.1'
from common import *
from weekend import *
from Object import *
class Userinfo:
def __init__(self):
self.uid_num = {}
self.uid_days = {}
for line in open("conf/user.info"):
u... | [
"liujingminghust@163.com"
] | liujingminghust@163.com |
f0f5d2e0e0693be10cb308b2a39769d289e2ecbc | 6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4 | /hoxv8zaQJNMWJqnt3_6.py | 80095df9794340c219bca34f726b867be42b5f8d | [] | no_license | daniel-reich/ubiquitous-fiesta | 26e80f0082f8589e51d359ce7953117a3da7d38c | 9af2700dbe59284f5697e612491499841a6c126f | refs/heads/master | 2023-04-05T06:40:37.328213 | 2021-04-06T20:17:44 | 2021-04-06T20:17:44 | 355,318,759 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 189 | py |
def is_heteromecic(n, test = 0):
if n==test*(test+1): return True
if test>int(n**.5): return False
return is_heteromecic(n, test+1)
# yet again, I'd hardly call this recursion...
| [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
fb6ce6d5ebf417aab66391b1ce2da8a5afc32d15 | 71bd623429f3b9f3701603836cf91f98436d48a7 | /tests/test_compute_embeddings.py | 0bfee0d2862e82494e0f8b5576c22f2b73997d55 | [
"Apache-2.0"
] | permissive | xiaobiaohust/sentence-transformers | b9f7d41901ef3159cb933e3d7d4f2e7698503975 | 167e4567670d711ef543239d0b922858c796a2fc | refs/heads/master | 2023-03-23T05:46:18.989786 | 2021-03-17T21:20:15 | 2021-03-17T21:20:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,870 | py | """
Computes embeddings
"""
import unittest
from sentence_transformers import SentenceTransformer
import numpy as np
class ComputeEmbeddingsTest(unittest.TestCase):
def setUp(self):
self.model = SentenceTransformer('paraphrase-distilroberta-base-v1')
def test_encode_token_embeddings(self):
... | [
"rnils@web.de"
] | rnils@web.de |
ed8a1eaea1d7b77ed9b4b067104c6a228d5336a4 | 6a6984544a4782e131510a81ed32cc0c545ab89c | /src/simprod-scripts/resources/tests/generators/nugen-generator.py | 934c279088774b490b79df7b1f9a5806373d3362 | [] | no_license | wardVD/IceSimV05 | f342c035c900c0555fb301a501059c37057b5269 | 6ade23a2fd990694df4e81bed91f8d1fa1287d1f | refs/heads/master | 2020-11-27T21:41:05.707538 | 2016-09-02T09:45:50 | 2016-09-02T09:45:50 | 67,210,139 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,138 | py | #!/usr/bin/env python
"""Ensure that the NuGen API hasn't changed (too much)"""
import os
import tempfile
import shutil
from icecube.simprod.modules.nugen import NuGen
from icecube import icetray, dataclasses, dataio
from I3Tray import I3Tray
try:
tmpdir = tempfile.mkdtemp(dir=os.getcwd())
tmpfile = os.pat... | [
"wardvandriessche@gmail.com"
] | wardvandriessche@gmail.com |
ef990efbcc159fa01bb54f036ae7fdee2768ce9c | b67958ebbde7538f6c5dc0305ed278f7c1a9528a | /networking_tn/common/config.py | 4d6a5bfa7757d4899831213ab593e0c75d393d7d | [
"Apache-2.0"
] | permissive | xjforfuture/networking-ngfw | 4c6b04ede370ba9888422715d5a4be7858335fe0 | 26fa3aa94e0ae733dde47c82f3372afeb07ff24b | refs/heads/master | 2021-05-15T06:34:12.658302 | 2017-12-12T07:01:31 | 2017-12-12T07:01:31 | 113,798,673 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,819 | py | # Copyright 2015 Fortinet Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | [
"xjforfuture@163.com"
] | xjforfuture@163.com |
93120f4f678d41f66a3161ce124689235c26903b | 0c6100dc16291986fab157ed0437f9203f306f1b | /2000- 3000/2712.py | 1116e8cbeb79eb95c5222b1816185b7230018b3d | [] | no_license | Matuiss2/URI-ONLINE | 4c93c139960a55f7cc719d0a3dcd6c6c716d3924 | 6cb20f0cb2a6d750d58b826e97c39c11bf8161d9 | refs/heads/master | 2021-09-17T09:47:16.209402 | 2018-06-30T08:00:14 | 2018-06-30T08:00:14 | 110,856,303 | 13 | 1 | null | null | null | null | UTF-8 | Python | false | false | 689 | py | import re
loops = int(input())
for i in range(loops):
data = input()
placa = re.compile('([A-Z]{3})-([0-9]{4})') # vê se segue o formato AAA-9999
# Tem que checar o tamanho pois placas como AAA-9999x também são aceitas pelo regex
if placa.match(data) and len(data) == 8:
ultimo = data[-1]... | [
"noreply@github.com"
] | Matuiss2.noreply@github.com |
9ce14fca10d2ddb156b0712bfbb6af3a9ece4b33 | 5ca4a0d91f5bd119e80478b5bd3d43ed30133a42 | /film20/core/forms.py | adb00b502ae71fb5993bc1d567b86ff73d69687b | [] | no_license | thuvh/filmmaster | 1fc81377feef5a9e13f792b329ef90f840404ec5 | dd6a2ee5a4951b2397170d5086c000169bf91350 | refs/heads/master | 2021-01-17T16:10:54.682908 | 2012-04-29T18:19:52 | 2012-04-29T18:19:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,150 | py | #-------------------------------------------------------------------------------
# Filmaster - a social web network and recommendation engine
# Copyright (c) 2009 Filmaster (Borys Musielak, Adam Zielinski).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero ... | [
"email@ibrahimcesar.com"
] | email@ibrahimcesar.com |
79ccd0a82b25f9eaa786743f1ddefc8eaeb949f1 | 238e46a903cf7fac4f83fa8681094bf3c417d22d | /output/python37/Lib/email/errors.py | 95aa000352daf17b4eed229313953cfe30607bb5 | [
"bzip2-1.0.6",
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-newlib-historical",
"OpenSSL",
"Python-2.0",
"TCL",
"BSD-3-Clause"
] | permissive | baojunli/FastCAE | da1277f90e584084d461590a3699b941d8c4030b | a3f99f6402da564df87fcef30674ce5f44379962 | refs/heads/master | 2023-02-25T20:25:31.815729 | 2021-02-01T03:17:33 | 2021-02-01T03:17:33 | 268,390,180 | 1 | 0 | BSD-3-Clause | 2020-06-01T00:39:31 | 2020-06-01T00:39:31 | null | UTF-8 | Python | false | false | 3,642 | py | # Copyright (C) 2001-2006 Python Software Foundation
# Author: Barry Warsaw
# Contact: email-sig@python.org
"""email package exception classes."""
class MessageError(Exception):
"""Base class for errors in the email package."""
class MessageParseError(MessageError):
"""Base class for message pa... | [
"l”ibaojunqd@foxmail.com“"
] | l”ibaojunqd@foxmail.com“ |
d68c7916badbfb576b18ac6ccf18e9336831c7fd | b05b89e1f6378905bbb62e2a2bf2d4f8e3187932 | /nonDuplicateNumber.py | 47a770f039bc1c3e8aa91571be7ab8bc35b4f9b9 | [
"MIT"
] | permissive | anishmo99/Daily-Interview-Pro | c959cd336209132aebad67a409df685e654cfdfc | d8724e8feec558ab1882d22c9ca63b850b767753 | refs/heads/master | 2023-04-10T08:09:46.089227 | 2021-04-27T07:27:38 | 2021-04-27T07:27:38 | 269,157,996 | 1 | 1 | MIT | 2020-06-08T07:09:19 | 2020-06-03T17:57:21 | C++ | UTF-8 | Python | false | false | 233 | py | def nonDuplicateNumber(nums):
nums.sort()
i=0
while(i<len(nums)-1):
if nums[i]!=nums[i+1]:
return nums[i]
i+=2
return nums[len(nums)-1]
print nonDuplicateNumber([4, 3, 3, 2, 1, 2, 1])
# 1
| [
"ani10sh@gmail.com"
] | ani10sh@gmail.com |
d0200942933649d20982e8d0c1ba94566e8a5c5e | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_116/1767.py | 32d55ab5e1dd3b425a76fa09552b6e7c540fce0e | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,772 | py | def getRow( s ):
return [
s[0], s[1], s[2], s[3]
]
def checkCell( s, scores ):
if s == 'X':
return (scores[0],scores[1]+1)
if s == 'O':
return (scores[0]+1,scores[1])
if s == 'T':
return (scores[0]+1,scores[1]+1)
return scores
def findWinner( b... | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
4141d7cc2fbc369307bee0785e1cf1982a1e9a81 | f5652eab2e9efa7ec26cade6c5ecabdd5a067929 | /src/lib/Bcfg2/Options/OptionGroups.py | 70cb5d0dda8a4f57a39a8a38bbe8e52a03f9b0da | [
"BSD-2-Clause",
"mpich2",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | dhutty/bcfg2 | 949f3053f3f54beb304fad50182d8c12c72f73ca | fdf47ccf128645bd099f7da80487320e086d17fe | refs/heads/master | 2020-12-24T17:44:06.213854 | 2013-08-12T13:40:08 | 2013-08-12T13:40:08 | 1,522,043 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,578 | py | """ Option grouping classes """
import re
import copy
import fnmatch
from Options import Option # pylint: disable=W0403
from itertools import chain
__all__ = ["OptionGroup", "ExclusiveOptionGroup", "Subparser",
"WildcardSectionGroup"]
class OptionContainer(list):
""" Parent class of all option group... | [
"chris.a.st.pierre@gmail.com"
] | chris.a.st.pierre@gmail.com |
d32468db483cb91e5c3d3e4cfbbe931b6e5f991c | 92237641f61e9b35ff6af6294153a75074757bec | /Machine Learning/수업 자료/3주차_기계학습 알고리즘/14일차_로지스틱회귀분석/mnistNeuralNet03.py | 77b742b01f40b34c1e9f6e4e0735237777105fdf | [] | no_license | taepd/study | 8ded115765c4f804813e255d9272b727bf41ec80 | 846d3f2a5a4100225b750f00f992a640e9287d9c | refs/heads/master | 2023-03-08T13:56:57.366577 | 2022-05-08T15:24:35 | 2022-05-08T15:24:35 | 245,838,600 | 0 | 1 | null | 2023-03-05T23:54:41 | 2020-03-08T15:25:15 | JavaScript | UTF-8 | Python | false | false | 2,587 | py | # mnistNeuralNet01.py
from tensorflow.python.keras.datasets import mnist
from keras.utils import to_categorical
from tensorflow.python.keras.models import Sequential
from tensorflow.python.keras.layers import Dense
import matplotlib.pyplot as plt
image_row, image_col, image_dim = 28, 28, 28*28
(x_train, y_train), (x... | [
"taepd1@gmail.com"
] | taepd1@gmail.com |
3bb1ce23ad811a88a750d495850bd3be33a763b0 | 19fb971011a0d3977abfde325f77eedbff180b23 | /kf/kf/doctype/statement_of_account_for_gl/test_statement_of_account_for_gl.py | 93ab173a19461e78fccded89a5ae3a74472b26b3 | [
"MIT"
] | permissive | sagar30051991/KF-HR | a489174181869c0300f4c659e41162fcb84ce80b | 182c52563243fd609473bb5411ad61f789e9441e | refs/heads/master | 2021-01-18T23:33:26.702772 | 2016-05-16T05:20:14 | 2016-05-16T05:20:14 | 58,905,560 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 297 | py | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Indictrans and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
# test_records = frappe.get_test_records('Statement of Account for GL')
class TestStatementofAccountforGL(unittest.TestCase):
pass
| [
"sagarshiragawakar@gmail.com"
] | sagarshiragawakar@gmail.com |
4e09cc6f747a652d23a1385e5d090c163e840bc7 | cb2882bd79c4af7a145f0639a5c7f473b1d22456 | /python/tvm/topi/cumsum.py | 2013a352874d76955b69a5223da7f6bb6280377c | [
"Apache-2.0",
"Zlib",
"MIT",
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference",
"Unlicense"
] | permissive | vinx13/tvm | 8e37dd7735eeadc476596ba96f683a93f44a26c3 | fe398bf206d01b54a2d74603e6bc9c012d63b2c9 | refs/heads/master | 2023-08-30T17:50:49.337568 | 2021-02-17T08:16:26 | 2021-02-17T08:16:26 | 141,384,391 | 4 | 0 | Apache-2.0 | 2022-09-21T18:53:08 | 2018-07-18T05:16:49 | Python | UTF-8 | Python | false | false | 4,159 | py | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | [
"noreply@github.com"
] | vinx13.noreply@github.com |
c5c27117168845db40692da47f0e4b594df6e4e8 | 73e063b43d0890f13cf1936826e2a1833447806f | /sqlalchemy/query.py | 078159db8bdaceb69c6ad698741a117d24e62e41 | [] | no_license | sodewumi/hb-skills | f1814495ee5540243449b1df3c43f3ce62dae8fe | 502f398a75568804393272aa896621811eb7bacb | refs/heads/master | 2021-01-19T13:53:00.523056 | 2015-05-11T16:06:52 | 2015-05-11T16:06:52 | 34,186,938 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,080 | py | # Note: this file will not run. It is only for recording answers.
# Part 2: Write queries
# Get the brand with the **id** of 8.
Brand.query.filter_by(id=8).one()
# Get all models with the **name** Corvette and the **brand_name** Chevrolet.
Brand.query.filter_by(name="Corvette", brand_name="Chevrolet").all()
# Get a... | [
"info@hackbrightacademy.com"
] | info@hackbrightacademy.com |
628e23f96ff86b40610fd3627ca993c1abd63e56 | 4137167a68f487343ef5cfd4e99e730fb39efa56 | /polyfile/fileutils.py | c43d5b9f09ccb380558b05c773a85496fcaecf95 | [
"Apache-2.0",
"LicenseRef-scancode-public-domain"
] | permissive | chrismattmann/polyfile | b57ccc72ce2fcfd67c885815204b40d61924c0cb | 6b86b2d91c9af19abc1520c1339935569b2cc964 | refs/heads/master | 2020-09-24T08:42:10.991623 | 2019-11-25T22:16:29 | 2019-11-25T22:16:29 | 225,717,204 | 2 | 1 | Apache-2.0 | 2019-12-03T21:14:40 | 2019-12-03T21:14:39 | null | UTF-8 | Python | false | false | 7,221 | py | import mmap
import os
import tempfile as tf
import sys
def make_stream(path_or_stream, mode='rb', close_on_exit=None):
if isinstance(path_or_stream, FileStream):
return path_or_stream
else:
return FileStream(path_or_stream, mode=mode, close_on_exit=close_on_exit)
class Tempfile:
def __in... | [
"evan.sultanik@trailofbits.com"
] | evan.sultanik@trailofbits.com |
19fbe3ae6d843d850ff23562c5b8b31594a1e2a0 | 4b64dd47fa9321b50875e96298a5f0766ffe97c9 | /leetcode/p122.py | 162b1bac0c661d114c05ccc4dc65293548240690 | [] | no_license | choupi/puzzle | 2ce01aa85201660da41378c6df093036fa2d3a19 | 736964767717770fe786197aecdf7b170d421c8e | refs/heads/master | 2021-07-23T13:17:45.086526 | 2021-07-20T11:06:28 | 2021-07-20T11:06:28 | 13,580,701 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 519 | py | class Solution:
def maxProfit(self, prices: List[int]) -> int:
trans = False
buy_price = None
profit = 0
for i in range(len(prices)):
if trans:
if i == len(prices)-1 or prices[i+1]<prices[i]:
profit += prices[i] - buy_price
... | [
"chromosome460@gmail.com"
] | chromosome460@gmail.com |
1bd82cb13ed2585404f2436b99d32f708c8e9d82 | d96ffbadf4526db6c30a3278f644c1bc25ff4054 | /src/storage/cluster_storage.py | d972d9137b5369a66d792d63c71147b0a0d4d5b5 | [
"MIT"
] | permissive | dballesteros7/master-thesis-2015 | 07c03726f6ceb66e6d706ffe06e4e5eb37dcda75 | 8c0bf9a6eef172fc8167a30780ae0666f8ea2d88 | refs/heads/master | 2021-05-03T11:22:28.333473 | 2016-04-26T14:00:30 | 2016-04-26T14:00:30 | 44,601,064 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,148 | py | import logging
from pymongo import MongoClient
class ClusterStorage:
def __init__(self):
client = MongoClient()
self.collection = client.flickrdata.clusters
def get_clusters(self, city_name, bandwidth):
result = self.collection.find({
'city_name': city_name,
'... | [
"diegob@student.ethz.ch"
] | diegob@student.ethz.ch |
22fb657a6dc5caa60f4275c099a2c55e2f160222 | fc678a0a5ede80f593a29ea8f43911236ed1b862 | /206-ReverseLinkedList.py | f14547c884d1681052b51980876ae39bad92b593 | [] | no_license | dq-code/leetcode | 4be0b1b154f8467aa0c07e08b5e0b6bd93863e62 | 14dcf9029486283b5e4685d95ebfe9979ade03c3 | refs/heads/master | 2020-12-13T15:57:30.171516 | 2017-11-07T17:43:19 | 2017-11-07T17:43:19 | 35,846,262 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 519 | py | # Definition for singly-linked list.
class ListNode(object):
def __init__(self, x):
self.val = x
self.next = None
class Solution(object):
def reverseList(self, head):
"""
:type head: ListNode
:rtype: ListNode
"""
if head==None: return None
pivo... | [
"dengqianwork@gmail.com"
] | dengqianwork@gmail.com |
8616f51bef26951ccf5dd36eea282b9742d4f87d | 930309163b930559929323647b8d82238724f392 | /arc109_a.py | e8f0ea60a8a44793ef14ac47d27ac9e2ebf69e2c | [] | no_license | GINK03/atcoder-solvers | 874251dffc9f23b187faa77c439b445e53f8dfe1 | b1e7ac6e9d67938de9a85df4a2f9780fb1fbcee7 | refs/heads/master | 2021-11-07T14:16:52.138894 | 2021-09-12T13:32:29 | 2021-09-12T13:32:29 | 11,724,396 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,393 | py |
SA,SB,X,Y=map(int,input().split())
SA-=1;
SB-=1;
N=202
G = [[]*N for _ in range(N)]
A = [a for a in range(100)]
B = [b+100 for b in range(100)]
for i in range(len(A)-1):
G[A[i]].append( (A[i+1], Y) )
G[A[i+1]].append( (A[i], Y) )
for i in range(len(B)-1):
G[B[i]].append( (B[i+1], Y) )
G[B[i+1]].appe... | [
"gim.kobayashi@gmail.com"
] | gim.kobayashi@gmail.com |
acc8718c446ff2f61372886aa27513bf83191698 | 6aa8fd438e12e4e285d9b89be15e211e607821e0 | /.metadata/.plugins/org.eclipse.core.resources/.history/cc/604d9aa93aac00141484e17924c72bfe | 220dd8bf723cd98eacd7547909b0124e9522e153 | [] | no_license | phoenixproject/python | 2aa251c9fe9a3a665043d5f3d29d48c0f95b9273 | f8171d31d1d33a269d29374e7605a8f5bce6b5d6 | refs/heads/master | 2021-03-12T19:15:01.611936 | 2015-02-04T08:25:27 | 2015-02-04T08:25:27 | 30,287,884 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 491 | #!/usr/bin/python3
from br.edu.ifes.poo2.adapter.cdp.FiltroAguaNatural import FiltroAguaNatural
from br.edu.ifes.poo2.adapter.cdp.FiltroAguaGelada import FiltroAguaGelada
from br.edu.ifes.poo2.adapter.cdp.FiltroAguaESaiGelo import FiltroAguaESaiGelo
def main():
filtro = FiltroAguaNatural()
filtro.FiltrarA... | [
"phoenixproject.erp@gmail.com"
] | phoenixproject.erp@gmail.com | |
a2a09b8055dfde80a01fcb05669f1e1078e5b234 | e10a6d844a286db26ef56469e31dc8488a8c6f0e | /constrained_language_typology/sigtyp_reader_main.py | c3641d426176bf96df9381cb5e3c2f02b22c2a70 | [
"Apache-2.0",
"CC-BY-4.0"
] | permissive | Jimmy-INL/google-research | 54ad5551f97977f01297abddbfc8a99a7900b791 | 5573d9c5822f4e866b6692769963ae819cb3f10d | refs/heads/master | 2023-04-07T19:43:54.483068 | 2023-03-24T16:27:28 | 2023-03-24T16:32:17 | 282,682,170 | 1 | 0 | Apache-2.0 | 2020-07-26T15:50:32 | 2020-07-26T15:50:31 | null | UTF-8 | Python | false | false | 5,528 | py | # coding=utf-8
# Copyright 2022 The Google Research Authors.
#
# 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 applicab... | [
"copybara-worker@google.com"
] | copybara-worker@google.com |
eb023275d736cbac3ff00334ca4f12d84d44429a | f6e78129c6669e8f46a65a3d7c45cf10cca083b9 | /scripts/inject_powerloss.py | 1c4d01f0ff71e14aeb4c309ca1dea09dbfc96d04 | [] | no_license | realraum/door_and_sensors | 339259c16ed27d2466f3cf9d5a51a93bfc7b326c | 8c70cdc4a28eabb04ce1e2df6aab0fb86c5b4f28 | refs/heads/master | 2023-08-30T08:53:28.419146 | 2023-08-07T22:16:21 | 2023-08-07T22:16:21 | 31,234,025 | 1 | 0 | null | 2023-08-11T11:46:30 | 2015-02-23T22:45:47 | Go | UTF-8 | Python | false | false | 983 | py | #!/usr/bin/python3
# -*- coding: utf-8 -*-
from __future__ import with_statement
import paho.mqtt.client as mqtt
import json
import time
import sys
######## r3 ############
def sendR3Message(client, structname, datadict):
client.publish(structname, json.dumps(datadict))
# Start zmq connection to publish / forwa... | [
"dev@2904.cc"
] | dev@2904.cc |
9fd094b78b8730d2a64729c0e9348ca22cbac3c0 | e01c5d1ee81cc4104b248be375e93ae29c4b3572 | /Sequence5/CTCI/2-Linked-List/1remove-dup.py | 17fed028ad554d4eca493329a1f98a574741788a | [] | no_license | lalitzz/DS | 7de54281a34814601f26ee826c722d123ee8bd99 | 66272a7a8c20c0c3e85aa5f9d19f29e0a3e11db1 | refs/heads/master | 2021-10-14T09:47:08.754570 | 2018-12-29T11:00:25 | 2018-12-29T11:00:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 797 | py | import singlell
def remove_duplicate(S):
tmp = S.head
seen_nodes = set()
prev = None
while tmp is not None:
if tmp.data in seen_nodes:
if prev is not None:
prev.next = tmp.next
else:
S.head = None
if tmp.next is None:
S.tail = prev
else:
seen_nodes.... | [
"lalit.slg007@gmail.com"
] | lalit.slg007@gmail.com |
58fab79e5b39430682a825af92f73644698e4c5c | 64a296ffabb013ad8c8a55380718fcc629bc7755 | /cry1ac/src/pb_d_major_subset.py | f941b371c4ba31b579b7b1e815e7bf8cb87a6720 | [] | no_license | maxwshen/evoracle-dataprocessinganalysis | 3ed16fc20ff52d4be81bb171893e64562a81d5d7 | ed400f6ddfd7b7bba161dd3a06254013a2c90770 | refs/heads/master | 2022-04-30T07:50:07.486482 | 2020-04-27T18:21:08 | 2020-04-27T18:21:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,397 | py | #
from __future__ import division
import _config
import sys, os, fnmatch, datetime, subprocess
sys.path.append('/home/unix/maxwshen/')
import numpy as np
from collections import defaultdict
from mylib import util, compbio
import pandas as pd
# Default params
inp_dir = _config.OUT_PLACE + f'pb_c_convert/'
... | [
"maxwshen@gmail.com"
] | maxwshen@gmail.com |
4558cc6e46898c6d04ac0c115bcdacc63c8181fa | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_34/619.py | 42c863876e3fa0be7bf9a9744685f50aab0ed2a3 | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 558 | py | #!/usr/bin/env python
import re
import sys
def match(words, pattern):
count = 0
for word in words:
if re.match(pattern.replace("(", "[").replace(")", "]"), word):
count += 1
return count
def main():
readline = sys.stdin.readline
l, d, n = [int(x) for x in readline().split(" ",... | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
680b2b82bf857e26d0faafe6e4775c0ed3a62c5a | 56f1bb713f0651ac63391349deb81790df14e4b5 | /Mirror Images/mirror.py | 2f0d48862fb5ca30e5ed19cfae2c329da4a5f92f | [
"CC0-1.0"
] | permissive | rajitbanerjee/kattis | 4cd46a2fe335120b8f53ca71544fc0681474118b | 3a5dd4c84c07e21f09ef45ebd9c1bad2a0adc6ad | refs/heads/master | 2022-05-05T03:19:28.744660 | 2020-08-12T18:48:55 | 2020-08-12T18:48:55 | 192,208,120 | 4 | 2 | CC0-1.0 | 2022-04-15T05:50:16 | 2019-06-16T15:38:15 | Python | UTF-8 | Python | false | false | 643 | py | """https://open.kattis.com/problems/mirror"""
T = int(input())
ans = []
def doubleMirror(image, R, C):
mirror_im = [[[] for _ in range(C)] for _ in range(R)]
for i in range(R):
for j in range(C):
mirror_im[R - i - 1][C - j - 1] = image[i][j]
for i in range(R):
mirror_im[i... | [
"rajit.banerjee@ucdconnect.ie"
] | rajit.banerjee@ucdconnect.ie |
f6892953b61e5bd8d916108ba1c4c6a22883b75e | 781e2692049e87a4256320c76e82a19be257a05d | /all_data/exercism_data/python/sum-of-multiples/6cd4a956dd254262aaa0ea881b44e3fe.py | 689a350a7f9eb5a21bf4e588871116ce841d8f22 | [] | no_license | itsolutionscorp/AutoStyle-Clustering | 54bde86fe6dbad35b568b38cfcb14c5ffaab51b0 | be0e2f635a7558f56c61bc0b36c6146b01d1e6e6 | refs/heads/master | 2020-12-11T07:27:19.291038 | 2016-03-16T03:18:00 | 2016-03-16T03:18:42 | 59,454,921 | 4 | 0 | null | 2016-05-23T05:40:56 | 2016-05-23T05:40:56 | null | UTF-8 | Python | false | false | 676 | py | class SumOfMultiples:
def __init__(self, *args):
if not args:
self.nums = (3, 5)
else:
self.nums = args
# @profile
def to_old(self, num):
ans = []
for i in range(num):
for j in self.nums:
if i % j == 0:
... | [
"rrc@berkeley.edu"
] | rrc@berkeley.edu |
6212ce1b008a751d592f27035ba0f6e02bc76f93 | 706dd00183f5f4a3ccb80e78efc35c9173a7d88b | /backend/prototype/migrations/0023_auto_20210827_2116.py | 70b299cf4cbc9978bb85a7710a1eb4e33178f229 | [] | no_license | jiaweioss/2021_Summer_Project | d82e89e431c500cde07201b150a4390ecf09ce6f | 136f007f1a4449710659b7424025d15402b7344a | refs/heads/main | 2023-07-14T14:17:39.239612 | 2021-08-29T12:59:03 | 2021-08-29T12:59:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 420 | py | # Generated by Django 3.1.7 on 2021-08-27 13:16
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('prototype', '0022_questionnaire_shownumbers'),
]
operations = [
migrations.AlterField(
model_name='questionnaire',
n... | [
"455436082@qq.com"
] | 455436082@qq.com |
9508aa89ecf08ec9d6866cda6052c802a93eb274 | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_320/ch40_2019_08_26_19_13_34_255376.py | daf09fb1bcba4e7885a4e0cdad8525c5c25316da | [] | 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 | 132 | py | def fatorial(numero):
fat = 1
while numero > 0:
fat *= numero
numero -= 1
return fat
print(fatorial(5)) | [
"you@example.com"
] | you@example.com |
40a45937067dd33457d82b9d157f6a37f2980933 | 25faa623b069a9423e040903f4f2c5c123f53825 | /src/Sparrow/Python/setup.py | 8ec59326f11aa2e3e8e06d300befe7899648e147 | [
"BSD-3-Clause"
] | permissive | DockBio/sparrow | 99d3eb316426351312e74397c5cc4bb962118306 | f82cf86584e9edfc6f2c78af4896dc6f2ee8a455 | refs/heads/master | 2022-07-14T11:44:21.748779 | 2020-04-27T20:41:58 | 2020-04-27T20:41:58 | 257,099,197 | 0 | 0 | BSD-3-Clause | 2020-04-27T20:42:00 | 2020-04-19T20:48:28 | null | UTF-8 | Python | false | false | 1,000 | py | import setuptools
# Read README.md for the long description
with open("README.md", "r") as fh:
long_description = fh.read()
# Define the setup
setuptools.setup(
name="scine_sparrow",
version="2.0.0",
author="ETH Zurich, Laboratory for Physical Chemistry, Reiher Group",
author_email="scine@phys.chem.ethz.ch"... | [
"scine@phys.chem.ethz.ch"
] | scine@phys.chem.ethz.ch |
b40323c2dade3b11429fceddf7181bb8297ac62b | 025230a618b49c5f255c34e4389f87064df32a6f | /hypertools/tools/cluster.py | 88b0ff6d482d9bc04b10998d88acccca77304cd5 | [
"MIT"
] | permissive | shannonyu/hypertools | 18b44b502992e7748c8eabdab188b41e0120bf08 | 8134d46b6031169bb12d03e49357802c923a175f | refs/heads/master | 2021-01-25T05:50:54.314315 | 2017-02-01T22:16:57 | 2017-02-01T22:16:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,707 | py | #!/usr/bin/env python
from sklearn.cluster import KMeans
from sklearn.decomposition import PCA
import numpy as np
from .._shared.helpers import *
def cluster(x, n_clusters=8, ndims=None):
"""
Aligns a list of arrays
This function takes a list of high dimensional arrays and 'hyperaligns' them
to a 'co... | [
"andrew.heusser@gmail.com"
] | andrew.heusser@gmail.com |
f4876c464f794477270f2c5c04c1902be29d18ef | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02785/s998943177.py | af54361e577f369c4e98be5c6ef60ce49c5108ea | [] | 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 | 130 | py | n,k=map(int,input().split())
h=list(map(int,input().split()))
h.sort(reverse=True)
if n-k<=0:
print(0)
else:
print(sum(h[k:])) | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
4212e86c28029d266b8be09cb40da53ac4ceb49a | ee7e74fa14f176c7f1e9cff57cae14092a0baacf | /HomePlugPWN/plcmon.py | a5a3bbc1ddf4d810d49c224543e56c8f7383fe9c | [] | no_license | Cloudxtreme/powerline-arsenal | f720b047cc4fe24ceb44588456ad0fc1ce627202 | f62f9ea8b27b8079c7f52b7b81d6a8bf5e4baa1a | refs/heads/master | 2021-05-29T01:02:14.512647 | 2015-03-31T10:25:24 | 2015-03-31T10:25:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,267 | py | #!/usr/bin/en python2
import sys
import binascii
from layerscapy.HomePlugAV import *
from optparse import OptionParser
from genDAK import *
dictio = {}
def appendindic(pkt):
macad = iter(binascii.hexlify(pkt.load[0xe:0xe+6]))
macad = ':'.join(a+b for a,b in zip(macad, macad))
if macad not in dictio.keys(... | [
"oleg.kupreev@gmail.com"
] | oleg.kupreev@gmail.com |
e54038178c4fa4d44718db97ca7343f349b2592c | d1de9fdc4a444ff1c322e09c684ccb5247c22164 | /OpenElectrophy/classes/neo/io/asciisignalio.py | 3e15feb9068b0f9c35d8cb45b0849551f6806123 | [] | no_license | AntoineValera/SynaptiQs | a178ddf5aa3269fe677afa68f6838db219763a65 | b44a27ba01262e68d74488f98502083c9d681eb6 | refs/heads/master | 2021-01-18T21:12:16.543581 | 2016-05-12T14:52:27 | 2016-05-12T14:52:27 | 40,709,264 | 0 | 0 | null | 2015-10-07T11:32:01 | 2015-08-14T10:17:16 | Python | UTF-8 | Python | false | false | 8,028 | py | # -*- coding: utf-8 -*-
"""
Class for reading/writing analog signals in a text file.
Covers many case when part of a file can be viewed as a CSV format.
Supported : Read/Write
@author : sgarcia
"""
from baseio import BaseIO
#from neo.core import *
from ..core import *
import numpy
from numpy import *
from... | [
"a.valera@ucl.ac.uk"
] | a.valera@ucl.ac.uk |
7981081268ce40b43f61b4b1ac9d555a9fc68f34 | 6b2a8dd202fdce77c971c412717e305e1caaac51 | /solutions_2464487_1/Python/axelbrz/a.py | 994845f27594079c0fb1112cac19471ac08a4d95 | [] | no_license | alexandraback/datacollection | 0bc67a9ace00abbc843f4912562f3a064992e0e9 | 076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf | refs/heads/master | 2021-01-24T18:27:24.417992 | 2017-05-23T09:23:38 | 2017-05-23T09:23:38 | 84,313,442 | 2 | 4 | null | null | null | null | UTF-8 | Python | false | false | 677 | py | def paintRC(r, n):
return 2*n*r + n + 2*(n*(n-1))
def solve(m):
r, t = m.split(" ")
r, t = int(r), int(t)
d = 1
while paintRC(r, d) <= t:
d *= 2
i = 0
m = (d+i)/2
_m = m-1
while True:
if m == _m: return m
_m = m
#print i, m, d
p = paintRC(r, m)... | [
"eewestman@gmail.com"
] | eewestman@gmail.com |
0022e5af4b34bac0101c46ed56fdda12471bfbc2 | aba8e48577dba352eaebcfa6743bdf2e7e2de315 | /setup.py | 5c4e38b2e95bf9ce3d2ca27df97fa4822ae4d364 | [
"MIT"
] | permissive | tiagocoutinho/xkcd | 2ab019bcd4d5ac10ca638f268b0ed1d223ff47d0 | 33adc0bc1c15ae40e16a27575a710906e351e6d2 | refs/heads/master | 2021-01-22T21:41:10.590103 | 2017-03-19T11:09:51 | 2017-03-19T11:09:51 | 85,462,691 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 967 | py | # -*- coding: utf-8 -*-
#
# This file is part of the xkcd-get project
#
# Copyright (c) 2017 Tiago Coutinho
# Distributed under the MIT license. See LICENSE for more info.
import os
import sys
from setuptools import setup
requirements = [
'grequests',
'bs4',
]
setup(
name='xkcd-get',
version='0.0.3',... | [
"coutinhotiago@gmail.com"
] | coutinhotiago@gmail.com |
49372f57347b9b25f4a13f2f90ba51d3e00fb64d | 428b2789f055f35a3d7221dfdd35ef2a74262f76 | /백준_문제집/BFS/적록색약.py | 3c82e8fa43361ccdf165a1ba80a21b6b44552229 | [] | no_license | sinsomi/Coding-Test | eb9fcf9c9ef2b427287a8f9ea27320bf6616e49a | 881974b533dc8d1ba44e8734346e38a3e668fda8 | refs/heads/master | 2022-12-10T04:56:50.280532 | 2020-09-14T02:37:55 | 2020-09-14T02:37:55 | 287,198,959 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,515 | py | import sys
n=int(input())
matrix=[list([p for p in sys.stdin.readline().strip()]) for _ in range(n)]
visit=[[0]*n for _ in range(n)]
dx=[1,0,-1,0]
dy=[0,-1,0,1]
def bfs(x,y,text):
queue=[]
queue.append([x,y])
while queue:
x,y=queue.pop(0)
for i in range(4):
nx,ny=x+dx[i],y+dy[i... | [
"cindy960602@naver.com"
] | cindy960602@naver.com |
f0edcf01a50a21c0908381b011ca7b52dd8c04fb | 9e5eca27222871dd04e42c9106bb2fba07e598ff | /src/osxification/core_foundation/cf_number_type.py | f0cd9f2a858be41f18bf1d41f034984fe5d59fe2 | [] | no_license | jepebe/osxification | b2a68dec07cd0be3b7ebd519bd99d0bbd51e61c7 | c9a539f4dbeda9200e32a2eea2c955dd94e6f45e | refs/heads/master | 2016-09-03T06:35:41.659315 | 2015-05-19T18:00:23 | 2015-05-19T18:00:23 | 35,567,134 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,432 | py | from osxification.c import Enum
class CFNumberType(Enum):
kCFNumberSInt8Type = None
kCFNumberSInt16Type = None
kCFNumberSInt32Type = None
kCFNumberSInt64Type = None
kCFNumberFloat32Type = None
kCFNumberFloat64Type = None
kCFNumberCharType = None
kCFNumberShortType = None
kCFNumberI... | [
"jepebe@users.noreply.github.com"
] | jepebe@users.noreply.github.com |
47d464054b8f55b003a9117767310c2e27b0ee56 | 9b64f0f04707a3a18968fd8f8a3ace718cd597bc | /huaweicloud-sdk-drs/huaweicloudsdkdrs/v3/model/data_transformation_resp.py | 57c96c1b9a290c243df869933fe1713af14d0dc7 | [
"Apache-2.0"
] | permissive | jaminGH/huaweicloud-sdk-python-v3 | eeecb3fb0f3396a475995df36d17095038615fba | 83ee0e4543c6b74eb0898079c3d8dd1c52c3e16b | refs/heads/master | 2023-06-18T11:49:13.958677 | 2021-07-16T07:57:47 | 2021-07-16T07:57:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,705 | py | # coding: utf-8
import re
import six
class DataTransformationResp:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is json ke... | [
"hwcloudsdk@huawei.com"
] | hwcloudsdk@huawei.com |
c671c9bc14faeca0c67ea4b50d76925245201787 | 1d7eec692553afc411ec1e7325634f71a2aed291 | /backend/git_real/helpers.py | bf3c422e05de22a0a2d2461619aa0a66fe26c830 | [] | no_license | Andy-Nkumane/Tilde | a41a2a65b3901b92263ae94d527de403f59a5caf | 80de97edaf99f4831ca8cb989b93e3be5e09fdd6 | refs/heads/develop | 2023-05-09T10:02:41.240517 | 2021-05-28T09:20:51 | 2021-05-28T09:20:51 | 299,501,586 | 0 | 0 | null | 2020-10-25T22:37:30 | 2020-09-29T04:10:48 | Python | UTF-8 | Python | false | false | 6,310 | py | import base64
from social_auth.github_api import Api
from git_real import models
from git_real.constants import GITHUB_DATETIME_FORMAT, GITHUB_DEFAULT_TIMEZONE
from timezone_helpers import timestamp_str_to_tz_aware_datetime
from django.http import Http404
def strp_github_standard_time(timestamp: str):
if timestam... | [
"sheena.oconnell@gmail.com"
] | sheena.oconnell@gmail.com |
0641e580798d05608958c806b1f8e45d5f9962c6 | a0db06c233d73b275c657b14ebc5e87dd91bc5e1 | /benchmark/egfrd/out_BD.py | e4918445bcc9c4c65cd550c9bb825413f0a53011 | [] | no_license | likr/ecell3-spatiocyte | 9a7cd258aa3fbd837ff3867a3cf8e9e99233a19e | 26a3231e9b022a239956938feabab9099baaee97 | refs/heads/master | 2021-01-14T14:16:35.291030 | 2013-03-07T04:27:28 | 2013-03-07T04:27:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,563 | py | # dt_factor = 1e-05
data_BD = [
# T=1e-06, N=100, V=1e-12
# steps= 8001, steps/sec= 7113.922237, steps/N= 80.010000
# run_times = [1.089055061340332, 1.0960071086883545, 1.1246960163116455]
[10890550.61340332, 10960071.086883545, 11246960.163116455],
# T=3.33333e-07, N=300, V=1e-12
# steps= 2667, steps/sec= 2568.901297... | [
"satya.arjunan@gmail.com"
] | satya.arjunan@gmail.com |
adc2011e57740926b2a60ca255e2411fb52098be | d34f82e7aa5da1d535f30ba7c0be6f8efff18107 | /backend/spaceshooter_3559/settings.py | 1a6e5daa445b9e858f47516c4f4629810933b373 | [] | no_license | crowdbotics-apps/spaceshooter-3559 | cc5f5c7e45e7db8733de12cbd53de15b6a01ce1c | 49d2a7f8fbba710dc74ffc5f3add81d4f72a9cf5 | refs/heads/master | 2020-05-25T00:02:37.230248 | 2019-05-19T20:49:44 | 2019-05-19T20:49:44 | 187,526,671 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,588 | py | """
Django settings for spaceshooter_3559 project.
Generated by 'django-admin startproject' using Django 1.11.20.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""... | [
"team@crowdbotics.com"
] | team@crowdbotics.com |
2431b176a55f8c6554eaee9d4f08a9dd7b51f8d2 | f4f181f2c970a163801b4202fc8d6c92a4e8113d | /google-cloud-sdk/lib/googlecloudsdk/core/cache/exceptions.py | 2a53ffbf78a8f4a08d4a1c7348e5267837dd01bf | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"MIT"
] | permissive | Sorsly/subtle | 7732a6cb910f5e2f4eed1ac0d3b5979001582340 | 718e79a3e04f1f57f39b6ebe90dec9e028e88d40 | refs/heads/master | 2021-05-24T01:21:39.218495 | 2017-10-28T01:33:58 | 2017-10-28T01:33:58 | 83,103,372 | 0 | 1 | MIT | 2020-07-25T11:21:05 | 2017-02-25T03:33:07 | Python | UTF-8 | Python | false | false | 1,730 | py | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | [
"han300@purdue.edu"
] | han300@purdue.edu |
15cb0c801573dc6c1fa20b20b008cf2ebbbab028 | 19d47d47c9614dddcf2f8d744d883a90ade0ce82 | /pynsxt/swagger_client/models/protocol_version.py | ecf2c99557eb577188be0e061a75187b063fc04b | [] | no_license | darshanhuang1/pynsxt-1 | 9ed7c0da9b3a64e837a26cbbd8b228e811cee823 | fb1091dff1af7f8b8f01aec715682dea60765eb8 | refs/heads/master | 2020-05-25T14:51:09.932853 | 2018-05-16T12:43:48 | 2018-05-16T12:43:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,888 | py | # coding: utf-8
"""
NSX API
VMware NSX REST API # noqa: E501
OpenAPI spec version: 1.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class ProtocolVersion(object):
"""NOTE: This class is auto generated by the swa... | [
"tcraft@pivotal.io"
] | tcraft@pivotal.io |
fe576e708d4593189a39418e127740d8fb4917db | f07a42f652f46106dee4749277d41c302e2b7406 | /Data Set/bug-fixing-5/4cb959150b31b8e8000fbce71583b4bae828e7b0-<test_delete_install>-fix.py | 57a327550c539cacc60b763701c92aeef81d3564 | [] | 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 | 283 | py | @responses.activate
def test_delete_install(self):
responses.add(url='https://example.com/webhook', method=responses.POST, body={
})
self.login_as(user=self.user)
response = self.client.delete(self.url, format='json')
assert (response.status_code == 204) | [
"dg1732004@smail.nju.edu.cn"
] | dg1732004@smail.nju.edu.cn |
07f7368b4fbb438613eaef2bbd3af716121c3aad | 1065ec75d9ee668ffd7aafc6a8de912d7c2cee6f | /addons/script.icechannel.extn.extra.uk/plugins/livetv_uk/the_vault_ltvi.py | 72df20a16aef7097c9ee51ce4e86b218c5dc699f | [] | no_license | bopopescu/kodiprofile | 64c067ee766e8a40e5c148b8e8ea367b4879ffc7 | 7e78640a569a7f212a771aab6a4a4d9cb0eecfbe | refs/heads/master | 2021-06-11T17:16:15.498281 | 2016-04-03T06:37:30 | 2016-04-03T06:37:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,010 | py | '''
Ice Channel
'''
from entertainment.plugnplay.interfaces import LiveTVIndexer
from entertainment.plugnplay import Plugin
from entertainment import common
class the_vault(LiveTVIndexer):
implements = [LiveTVIndexer]
display_name = "The Vault"
name = "the_vault"
othe... | [
"sokasoka@hotmail.com"
] | sokasoka@hotmail.com |
b26abcb7e4a798915466f32474e2d44d8fdea758 | 4a7462f65826586edccfe5709259603d53da5b10 | /presentation/scripts/test-6.py | 092c5bf4ea0afc58c86889083599969770c3bec5 | [] | no_license | ctn-archive/bekolay-fnme2015 | 846ba3bdfdae121cd1ca10de81d5eae2e570e84f | ad85f5a6f33031d5229344f92ba1df60f4515488 | refs/heads/master | 2021-01-18T01:45:50.708267 | 2015-11-04T22:40:43 | 2015-11-05T09:59:54 | 39,850,277 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 625 | py | import nengo; import numpy as np
from nengo.tests.conftest import Simulator, plt, seed
from nengo.tests.conftest import pytest_generate_tests
def test_ensemble(Simulator, nl, seed, plt):
with nengo.Network(seed=seed) as model:
model.config[nengo.Ensemble].neuron_type = nl()
stim = nengo.Node([0.5])... | [
"tbekolay@gmail.com"
] | tbekolay@gmail.com |
c4972e52a17ca8eb8805acb3b86cdc7e6b6a6934 | 62b84f877ccb4171f558c225fa0fdd4fd2c44d6c | /tests/counter_mnist.py | b97377f0211334b4226a6d8638c506e786fe1952 | [] | no_license | guicho271828/latplan | b6dfb55f3cceac947df770fb623d496111f9ab19 | 75a2fc773de245b422a695b51fccaf17294da123 | refs/heads/master | 2022-10-25T02:02:05.547143 | 2022-03-25T20:42:06 | 2022-03-25T20:59:29 | 96,482,151 | 77 | 19 | null | 2023-03-04T14:10:46 | 2017-07-07T00:11:52 | Python | UTF-8 | Python | false | false | 784 | py | #!/usr/bin/env python3
import numpy as np
import sys
sys.path.append('../../')
from latplan.puzzles.counter_mnist import generate_configs, successors, generate, states, transitions
from plot import plot_image, plot_grid
configs = generate_configs(10)
puzzles = generate(configs)
print(puzzles[9])
plot_image(puzzles[... | [
"guicho2.71828@gmail.com"
] | guicho2.71828@gmail.com |
414441c3ce1089e1e1406ee76644be8bf0e77341 | 271c7959a39f3d7ff63dddf285004fd5badee4d9 | /venv/Lib/site-packages/netaddr/strategy/eui64.py | 03de537533557e72ce24476b3810c9d5fcf1cc2b | [
"MIT"
] | permissive | natemellendorf/configpy | b6b01ea4db1f2b9109fd4ddb860e9977316ed964 | 750da5eaef33cede9f3ef532453d63e507f34a2c | refs/heads/master | 2022-12-11T05:22:54.289720 | 2019-07-22T05:26:09 | 2019-07-22T05:26:09 | 176,197,442 | 4 | 1 | MIT | 2022-12-08T02:48:51 | 2019-03-18T03:24:12 | Python | UTF-8 | Python | false | false | 7,707 | py | #-----------------------------------------------------------------------------
# Copyright (c) 2008 by David P. D. Moss. All rights reserved.
#
# Released under the BSD license. See the LICENSE file for details.
#-----------------------------------------------------------------------------
"""
IEEE 64-bit EUI (Exte... | [
"nate.mellendorf@gmail.com"
] | nate.mellendorf@gmail.com |
af477fc6a0296522ff4102bc09ec1664af163abf | 868e1bc0cbdbab12365c293656ee7a2a1373cac1 | /config.py | f3dc3803dc659577659c8068ac224dd0d5d08ec0 | [
"MIT"
] | permissive | xavierxross/nazurin | 15b811fbca984fe17f8d19fba5ab07c7517e5a69 | 9703781b14f626c39388c716cd412441198eb7e3 | refs/heads/master | 2023-02-17T05:37:03.095408 | 2021-01-13T14:09:49 | 2021-01-13T14:09:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 798 | py | from ast import literal_eval
from os import environ
ENV = environ.get('ENV', 'production')
TOKEN = environ.get('TOKEN')
# Webhook url, eg: https://xxx.herokuapp.com/, should end with '/'
WEBHOOK_URL = environ.get('WEBHOOK_URL')
# Port is given by Heroku
PORT = int(environ.get('PORT', '8443'))
TEMP_DIR = './temp/'
STO... | [
"yyoung2001@gmail.com"
] | yyoung2001@gmail.com |
92410f6f12b802736db44b21188677bab8cbad4f | 6f23adb3da803dda89e21cfa21a024a015ec1710 | /2019/1-2.py | 800457275fe7eb521f7e86398de742615d6dee85 | [] | no_license | Remboooo/adventofcode | 1478252bcb19c0dd19e4fa2effd355ee71a5d349 | 5647b8eddd0a3c7781a9c21019f6f06f6edc09bd | refs/heads/master | 2022-12-15T10:21:29.219459 | 2022-12-13T23:02:03 | 2022-12-13T23:02:03 | 226,883,142 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 402 | py | from argparse import ArgumentParser
def get_fuel(mass):
fuel = max(0, mass // 3 - 2)
if fuel > 0:
fuel += get_fuel(fuel)
return fuel
def main():
argparse = ArgumentParser()
argparse.add_argument("file", type=str)
args = argparse.parse_args()
with open(args.file, "r") as f:
... | [
"rembrand.vanlakwijk@nedap.com"
] | rembrand.vanlakwijk@nedap.com |
d401750857d7f3143f7269271b3de9fba9186096 | 2e682fd72e3feaa70e3f7bf2a3b83c50d783ec02 | /PyTorch/contrib/cv/pose_estimation/Hourglass_for_PyTorch/mmpose-master/demo/bottom_up_img_demo.py | a3738019b2ae94fbc79da7904081f7b92e5575c7 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-unknown-license-reference",
"GPL-1.0-or-later"
] | permissive | Ascend/ModelZoo-PyTorch | 4c89414b9e2582cef9926d4670108a090c839d2d | 92acc188d3a0f634de58463b6676e70df83ef808 | refs/heads/master | 2023-07-19T12:40:00.512853 | 2023-07-17T02:48:18 | 2023-07-17T02:48:18 | 483,502,469 | 23 | 6 | Apache-2.0 | 2022-10-15T09:29:12 | 2022-04-20T04:11:18 | Python | UTF-8 | Python | false | false | 3,366 | py | # -*- coding: utf-8 -*-
# Copyright 2021 Huawei Technologies Co., Ltd
#
# 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 app... | [
"wangjiangben@huawei.com"
] | wangjiangben@huawei.com |
7766359a647d8cdbdc258f8c7528ab053da15bfe | 5c6137c33283e479cb61ad1cf3d5381c528bfbf3 | /11-dnn-keras/mnist_ann.py | 4f21c7800fa78e2da5376b4cf53c9dc5106320d2 | [
"Apache-2.0"
] | permissive | iproduct/course-social-robotics | 4d2ff7e8df701f3d2a009af48c84d160c3dc8bb8 | dcdc6f5a947413510a030b9b89639fc804777c0d | refs/heads/master | 2023-07-20T13:03:19.623265 | 2023-06-09T14:50:01 | 2023-06-09T14:50:01 | 32,006,612 | 15 | 4 | NOASSERTION | 2023-07-13T07:19:01 | 2015-03-11T08:31:43 | JavaScript | UTF-8 | Python | false | false | 1,664 | py | import datetime
from keras import layers
from keras import models
from keras.datasets import mnist
from keras.utils import to_categorical
import tensorflow as tf
import os
if __name__ == '__main__':
os.environ["XLA_FLAGS"] = '--xla_gpu_cuda_data_dir="D:/Program Files/CUDA/v11.2/development"'
physical_devices ... | [
"office@iproduct.org"
] | office@iproduct.org |
dd25971e8d004a3482e8472b283f9ec585583bbc | 1fb9816f9c63a1dcfa5f8b18247e54725bc43ea5 | /django_inmo/apps/solicitudes/models.py | 0634e7918120a45616e303819f20765b4e0bb467 | [] | no_license | juanros13/inmo | c83860e6cb76a4c15f7d2128954adfb040992f9b | 3d70c4539d82056019f9851dbe35616342fc2359 | refs/heads/master | 2020-04-06T06:58:11.401762 | 2016-09-02T04:05:08 | 2016-09-02T04:05:08 | 63,124,876 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,121 | py | import datetime
from django.db import models
from django.contrib.auth.models import User
from apps.inmuebles.models import Departamento
from django.db.models.signals import post_save
class Mantenimiento(models.Model):
usuario_creo = models.ForeignKey(
User
)
departamento = models.ForeignKey(
Departament... | [
"juanros13@gmail.com"
] | juanros13@gmail.com |
179f735b28effe5d26e924e9863035f844aa0393 | 4142b8c513d87361da196631f7edd82f11465abb | /python/1283A.py | d82d8b25daa008c44354bd181c3dca5782eed666 | [] | no_license | npkhanhh/codeforces | b52b66780426682ea1a3d72c66aedbe6dc71d7fe | 107acd623b0e99ef0a635dfce3e87041347e36df | refs/heads/master | 2022-02-08T17:01:01.731524 | 2022-02-07T10:29:52 | 2022-02-07T10:29:52 | 228,027,631 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 200 | py | n = int(input())
for i in range(n):
h, m = list(map(int, input().split()))
res = 0
if m == 0:
res = (24 - h) * 60
else:
res = (23 - h) * 60 + (60 - m)
print(res)
| [
"npkhanh93@gmail.com"
] | npkhanh93@gmail.com |
81cb9106ab0d1bacd68813c487ba163e70be8a05 | 4ef31d0f04f4d6d7725a530bffb1a4b115283d6f | /site/_build/jupyter_execute/notebooks/09-deep-learning1/05-pytorch-mnist.py | 7805d77a7f8ab7a187bc5a2ee4bc298603f5b7ff | [
"MIT"
] | permissive | rpi-techfundamentals/introml_website_fall_2020 | 98bb1cc4712f416b393b996b849f39c660167057 | b85e5c297954bcaae565a8d25a18d2904d40f543 | refs/heads/master | 2023-07-14T16:49:21.625260 | 2020-12-10T17:51:34 | 2020-12-10T17:51:34 | 287,033,509 | 2 | 3 | null | null | null | null | UTF-8 | Python | false | false | 4,492 | py | [](http://rpi.analyticsdojo.com)
<center><h1>Pytorch with the MNIST Dataset - MINST</h1></center>
<center><h3><a href = 'http://rpi.analyticsdojo.com'>rpi.analyticsdojo.com</a></h3></center>
[](https://col... | [
"jkuruzovich@gmail.com"
] | jkuruzovich@gmail.com |
ae59dd6e9cfbeb11a8ca44b432223362fd172702 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03607/s162140997.py | 54020c8894a588eeb5032c387da605123b0a3e76 | [] | 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 | 530 | py | import sys
sys.setrecursionlimit(500000)
def input():
return sys.stdin.readline()[:-1]
def mi():
return map(int, input().split())
def ii():
return int(input())
def i2(n):
tmp = [list(mi()) for i in range(n)]
return [list(i) for i in zip(*tmp)]
def main():
N = ii()
A = [ii() for _ in ra... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
c777e77fd91ee0ea1bd155528af27da135fb9698 | 7b28649a9635c1ef4501117f91a410e44742c175 | /tunobase/core/constants.py | bf503544a57ef18d1a275b841469b1bfcc1f9265 | [] | no_license | unomena/tunobase-core | 311a0e9406c0898a48101d743528ab08faa55d3b | fd24e378c87407131805fa56ade8669fceec8dfa | refs/heads/master | 2016-09-05T22:59:11.254754 | 2016-01-06T08:41:36 | 2016-01-06T08:41:36 | 39,237,113 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 304 | py | '''
CORE APP
'''
STATE_PUBLISHED = 0
STATE_UNPUBLISHED = 1
STATE_STAGED = 2
STATE_DELETED = 3
STATE_CHOICES = (
(STATE_PUBLISHED, 'Published'),
(STATE_UNPUBLISHED, 'Unpublished'),
(STATE_STAGED, 'Staged'),
(STATE_DELETED, 'Deleted'),
)
PERMITTED_STATE = [STATE_PUBLISHED, STATE_STAGED] | [
"euan@unomena.com"
] | euan@unomena.com |
7678faa1454e94cba32949b71761c79f3f38cd97 | 06984002a22f41b6eb63f9bdf3eb3529792d766f | /trunk/keystone-debian/tests/test_exception.py | c74a60c6c56b5e05dbff01f0dc274839404564a6 | [
"Apache-2.0"
] | permissive | lixmgl/Intern_OpenStack_Swift | d6195c25cd59dfe603203f727ed409a61891a3bf | 40c241319c6b9a7aabacc9d927486864d13b8055 | refs/heads/master | 2020-04-14T20:40:15.496239 | 2015-08-06T22:24:38 | 2015-08-06T22:24:38 | 40,329,555 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,696 | py | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 OpenStack LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | [
"lixmgl@gmail.com"
] | lixmgl@gmail.com |
6acc39766857da7618a51b01c84e116ee615a3ff | 817ff801938d25776b2564b3087c8a3c674da1a7 | /NUP153_AnalyseComplex/Mutation_BindingAffinity/chainEFV/G1413M_chainEFV.py | c8b31df94c58e072e505d58db0b8527e3920361b | [] | no_license | yanghaobojordan/HIV1-Capsid | b22e21a9ad530ae11f128f409e298c5ab68871ee | f44f04dc9886e660c1fe870936c48e0e5bb5adc6 | refs/heads/main | 2023-04-09T01:27:26.626676 | 2021-04-23T18:17:07 | 2021-04-23T18:17:07 | 360,968,418 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,501 | py | from pyrosetta import *
from pyrosetta import PyMOLMover
from pyrosetta.toolbox import cleanATOM
from pyrosetta.toolbox import get_secstruct
from pyrosetta.teaching import *
from pyrosetta.toolbox import get_hbonds
from pyrosetta.toolbox import mutate_residue
from pyrosetta.rosetta.protocols.relax import *
from... | [
"yanghaobojordan@gmail.com"
] | yanghaobojordan@gmail.com |
75a3c01092d3f26b7e6532b9259cda3dc5a8da42 | 6e94333f805544e8b0a640e37638139e74084cbe | /effectlayer_demo.py | 99042ae4b4144b59ebe62820ae391049e6e1def5 | [
"MIT"
] | permissive | encukou/gillcup_graphics | 6b41b6afdb8223b1bdf5b02431c21d09cf5c36c8 | e107feff05aa31001316ffdcac3d5dc696f25b34 | refs/heads/master | 2021-01-18T16:28:27.841445 | 2013-09-28T23:39:06 | 2013-09-28T23:39:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,558 | py | #! /usr/bin/env python
from __future__ import division
import math
import gillcup
from gillcup_graphics import Window, run, RealtimeClock, Layer, EffectLayer
from gillcup_graphics import Rectangle
clock = RealtimeClock()
def makeColorrect(parent, i, speed, color):
colorrect = Rectangle(parent, position=(.5, ... | [
"encukou@gmail.com"
] | encukou@gmail.com |
e494056506906db24da3e6c1b863e7a0d64e9b7f | d87483a2c0b50ed97c1515d49d62c6e9feaddbe0 | /.history/test_20210205211907.py | 46965da94a0c9c05d6c85ced3cd7ea5b4ea00084 | [
"MIT"
] | permissive | HopperKremer/hoptrader | 0d36b6e33922414003cf689fb81f924da076a54b | 406793c10bc888648290fd15c7c2af62cf8c6c67 | refs/heads/main | 2023-06-12T15:51:00.910310 | 2021-07-06T16:15:41 | 2021-07-06T16:15:41 | 334,754,936 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 3,784 | py | import requests
import os, sys
from tda import auth, client
from tda.orders.equities import equity_buy_market, equity_buy_limit
from tda.orders.common import Duration, Session
import tda
currentdir = os.path.dirname(os.path.realpath(__file__))
# currentdir = os.path.abspath('')
parentdir = os.path.dirname(currentdir)
... | [
"hopperkremer@gmail.com"
] | hopperkremer@gmail.com |
f68180be7a5d89b9ca9656c4d2d8902e27d08ce4 | 6cd32e8b7ab4116a5132a36268c9ba1486445399 | /app/blog/sample.py | bc084fe37180d0de36037f9966f7f960153ec6f4 | [] | no_license | mongkyo/django_prac | 81c185b597f47959153a17849620a5650fb2e10e | 790e179608b281099943d60a399b40793d9e69f3 | refs/heads/master | 2020-03-30T00:59:18.573469 | 2018-09-28T11:37:50 | 2018-09-28T11:37:50 | 150,553,902 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 283 | py | import os
current_file = os.path.abspath(__file__)
blog_forder = os.path.dirname(current_file)
app_forder = os.path.dirname(blog_forder)
#templates_forder = os.path.join(app_forder, post_list.html)
print(current_file)
print(blog_forder)
print(app_forder)
#print(templates_forder)
| [
"dreamong91@gmail.com"
] | dreamong91@gmail.com |
97880779a3fbbc77db757da3cd217a3858bf47b1 | 3199331cede4a22b782f945c6a71150a10c61afc | /20210517PythonAdvanced/04-generator/gen01.py | ba7c00e986c7ad9a7314cfcec0a21d5154f97993 | [] | no_license | AuroraBoreas/language-review | 6957a3cde2ef1b6b996716addaee077e70351de8 | 2cb0c491db7d179c283dba205b4d124a8b9a52a3 | refs/heads/main | 2023-08-19T23:14:24.981111 | 2021-10-11T12:01:47 | 2021-10-11T12:01:47 | 343,345,371 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 343 | py | "#Python is a protocol orienated lang; every top-level function or syntax has a corresponding duner method implemented;"
import time
def compute(n: int)->list:
rv = list()
for i in range(n):
rv.append(i)
time.sleep(.5)
return rv
if __name__ == "__main__":
for i in compute... | [
"noreply@github.com"
] | AuroraBoreas.noreply@github.com |
ba42e48b971949bce9e5230814036b18659e60a5 | 3d228d5eac44b31d460dd81767b43309b7356577 | /euler/cipher.py | b22f3e3f5dbebcb24d5b4aba07b62794ce277489 | [
"BSD-3-Clause"
] | permissive | lsbardel/mathfun | da65a6f09faacdb4815111dae287c9b974acf928 | 98e7c210409c2b5777e91059c3651cef4f3045dd | refs/heads/master | 2021-05-02T08:56:05.565539 | 2020-07-30T09:14:04 | 2020-07-30T09:14:04 | 26,242,622 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 814 | py | from string import ascii_lowercase
def cipher(codes):
while True:
keys = {}
while True:
s = 0
for c in ascii_lowercase:
if c in keys:
continue
key = ord(c)
i = len(keys)
for code in codes[i:... | [
"luca@quantmind.com"
] | luca@quantmind.com |
608b6f08a6631a536aef3b1583b7532ca1a24787 | c5a618ab198a7cc93b35715af2575ad4932f8dbb | /y_CVPR/z_bn/a.py | c1b06a27b80b369405a01d7f9ebb481c116a0a49 | [] | no_license | JaeDukSeo/Personal_Daily_NeuralNetwork_Practice | f33808a0413e130beae27f80fb4cc524834a8cc5 | f83ad23faefd726c647cc1d78021c25e086581be | refs/heads/master | 2021-09-12T07:20:49.212032 | 2018-04-15T08:15:37 | 2018-04-15T08:15:37 | 114,972,816 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,428 | py | import numpy as np
import tensorflow as tf
import sklearn
import matplotlib.pyplot as plt
import sys
np.random.seed(6789)
# create random data
data = np.random.normal(size=[10,5])
alpa,beta = 1.0,1.0
batch_e = 0.00001
data_mean = np.sum(data)/len(data)
print(data_mean.shape)
mini_var = np.sum(np.square(data-data_m... | [
"jae.duk.seo@ryerson.ca"
] | jae.duk.seo@ryerson.ca |
91c938255952262e25f7b7131e69aa3929ff49a4 | 7c63a96fad4257f4959ffeba0868059fc96566fb | /py/d_beazly-python_cookbook/ch_01-data_structures_and_algorithms/12-determining_the_most_frequently_occuring_itesm/main.py | 1a09301f9f4c6596ff3ebf08d5d2eef0f107d568 | [
"MIT"
] | permissive | ordinary-developer/education | b426148f5690f48e0ed4853adfc3740bd038b72c | 526e5cf86f90eab68063bb7c75744226f2c54b8d | refs/heads/master | 2023-08-31T14:42:37.237690 | 2023-08-30T18:15:18 | 2023-08-30T18:15:18 | 91,232,306 | 8 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,176 | py | def example_1():
words = [
'look', 'into', 'my', 'eyes', 'look', 'into', 'my', 'eyes',
'the', 'eyes', 'the', 'eyes', 'the', 'eyes', 'not', 'around', 'the',
'eyes', "don't", 'look', 'around', 'the' 'eyes', 'look', 'into',
'my', 'eyes', "you're", 'under'
]
from collections im... | [
"merely.ordinary.developer@gmail.com"
] | merely.ordinary.developer@gmail.com |
080664a40b0bc54179cc500c91d7b1c410ab2368 | efcde5b4ea4fbf01a08e4b2b4edb712fae46be48 | /shapes/size_config.py | 4fe0336834ec6fcf32964732df989e4176759495 | [] | no_license | vermashresth/Referential_Shapes | 9611a6450a8d3d65b4dae602fae8e178d5f32f67 | b8fae15561cafa741471065d7920162e4add2e54 | refs/heads/master | 2023-02-23T19:53:59.151580 | 2021-01-27T05:59:57 | 2021-01-27T05:59:57 | 292,020,284 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 167 | py | train_size = 7450
val_size = 827
test_size = 4050
def return_sizes():
global train_size, val_size, test_size
return train_size, val_size, test_size, val_size
| [
"vermashresth@gmail.com"
] | vermashresth@gmail.com |
d06246ae8222a63d97c09c147d260a5bc954bcae | b7f3edb5b7c62174bed808079c3b21fb9ea51d52 | /tools/style_variable_generator/views_generator.py | e9cb4d9aa4779ac7b9c4812bd254cb62193c0d27 | [
"Zlib",
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference",
"LGPL-2.1-only",
"LGPL-2.0-or-later",
"APSL-2.0",
"MIT",
"Apache-2.0",
"LGPL-2.0-only",
"LicenseRef-scancode-unknown"
] | permissive | otcshare/chromium-src | 26a7372773b53b236784c51677c566dc0ad839e4 | 64bee65c921db7e78e25d08f1e98da2668b57be5 | refs/heads/webml | 2023-03-21T03:20:15.377034 | 2020-11-16T01:40:14 | 2020-11-16T01:40:14 | 209,262,645 | 18 | 21 | BSD-3-Clause | 2023-03-23T06:20:07 | 2019-09-18T08:52:07 | null | UTF-8 | Python | false | false | 2,350 | py | # Copyright 2020 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
from base_generator import Color, Modes, BaseGenerator, VariableType
class ViewsStyleGenerator(BaseGenerator):
'''Generator for Views Variabl... | [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
1f62556e20ec9f8343ddcb47fd0b25729b596fee | 5865a8a69c58ca09a5537858f636469dad35971e | /first_project/first_app/migrations/0001_initial.py | d6d8ddcb99c58143f19c729c344bbee45679b62e | [] | no_license | ohduran-attempts/theDisSilent | 3ee757e2c50ced7988fa1787f680e49e8b9a9c58 | 6016b639146412d7e3f0ea2ddf3fae5702d973c1 | refs/heads/master | 2020-03-21T16:29:52.677005 | 2018-07-19T21:06:36 | 2018-07-19T21:06:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,547 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-07-09 06:18
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.Cre... | [
"alvaro.duranb@gmail.com"
] | alvaro.duranb@gmail.com |
5d3a11ad3b206e8da3a8e466159889fc036ca511 | 16785f35ceb0f6336760e2c415047ea95037a8af | /run_game.py | 3bc8533ff445689329ac94947ea5f07ca4743ec5 | [] | no_license | bitcraft/pyweek18 | 07fd1c36c202806cb6412fd54ae7f693e3c64d63 | 9a9b33adf1445b4777565a604a6cffbb434beebe | refs/heads/master | 2021-01-20T12:04:57.211424 | 2015-12-28T18:10:28 | 2015-12-28T18:10:28 | 19,759,835 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,009 | py | from castlebats import config
import os
# load configuration
filename = os.path.join('config', 'castlebats.ini')
config.read(filename)
import logging
logger = logging.getLogger('castlebats.run')
logging.basicConfig(
level=getattr(logging, config.get('general', 'debug-level')),
format="%(name)s:%(filename)s:%(... | [
"leif.theden@gmail.com"
] | leif.theden@gmail.com |
d2b7fb8a90525f2c5372ebe29067cc85a1e85473 | aa3f670fcc2b43d8a5eb8a131082510bed2eb4d8 | /cgi-bin/request/raob.py | 03e604c77af7175b5f30b888cbfef24dff42f9f3 | [
"MIT"
] | permissive | jamayfieldjr/iem | e0d496311d82790ad518c600c2fcffe44e834da1 | 275b77a65f3b12e26e6cbdb230786b9c7d2b9c9a | refs/heads/master | 2020-08-07T11:55:56.256857 | 2019-10-04T04:22:36 | 2019-10-04T04:22:36 | 213,439,554 | 1 | 0 | MIT | 2019-10-07T17:01:20 | 2019-10-07T17:01:20 | null | UTF-8 | Python | false | false | 2,529 | py | #!/usr/bin/env python
"""
Download interface for data from RAOB network
"""
import sys
import cgi
import datetime
import pytz
from pyiem.util import get_dbconn, ssw
from pyiem.network import Table as NetworkTable
def m(val):
"""Helper"""
if val is None:
return 'M'
return val
def fetcher(station... | [
"akrherz@iastate.edu"
] | akrherz@iastate.edu |
e37ae85cde6cdf500f9a4cfc2af4b9e11831abb4 | 05e3c6d28bbaf56f058d95ea0aab0006843b2420 | /swagger_client/models/file_metadata.py | 7f41346fc2bc051237d690812c7b9f89bf2d19df | [] | no_license | TheAdsOnTop/dynamix-python-client | 4ac5bf8bc975e3b1230bdf8ed0900e6b1382e318 | ace7ff34502cbbbb11b0c65bb3385b8c48247082 | refs/heads/master | 2020-03-08T00:10:05.566157 | 2018-04-02T19:02:47 | 2018-04-02T19:02:47 | 127,799,685 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,592 | py | # coding: utf-8
"""
Dynamix
Sign up for Dynamix & grab your token. # noqa: E501
OpenAPI spec version: v0.1.0
Contact: david@theadsontop.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class FileMetadata(object):
"... | [
"akhanna@princeton.edu"
] | akhanna@princeton.edu |
5ca8a48f56293d94fcefe0d3de937b11003af9e6 | 2bc677218d0c13fe0551510b64782f2f001def17 | /tests/unit/testing_utils/test_biased.py | 9231acb98578e0a41978723ab09cfb6f9ccc7645 | [
"MIT"
] | permissive | drizm-team/python-commons | dc6a558c682315f12b7175d9395070c6ffcd3661 | 55e14754222cc1aa8a6c9137f75d529158864fee | refs/heads/master | 2023-02-10T13:59:51.338932 | 2021-01-01T22:58:36 | 2021-01-01T22:58:36 | 306,466,336 | 0 | 0 | MIT | 2021-01-01T19:45:43 | 2020-10-22T21:49:57 | Python | UTF-8 | Python | false | false | 1,106 | py | from drizm_commons.testing import self_to_id
def test__self_to_id():
"""
GIVEN I have a JSONified body
AND that body matches the Drizm HATEOAS format
WHEN I extract the identifier from a valid URI
THEN I should be get back a valid identifier
"""
test_key = 1
test_body = {
"... | [
"kochbe.ber@gmail.com"
] | kochbe.ber@gmail.com |
207cd301afe20337efa820d7f0bb5dbc2f2c8e5b | 52b5773617a1b972a905de4d692540d26ff74926 | /.history/smallestWindow_20200707160948.py | f9b4a901ea9e888d7e99fcd5ee41b198c32465ae | [] | no_license | MaryanneNjeri/pythonModules | 56f54bf098ae58ea069bf33f11ae94fa8eedcabc | f4e56b1e4dda2349267af634a46f6b9df6686020 | refs/heads/master | 2022-12-16T02:59:19.896129 | 2020-09-11T12:05:22 | 2020-09-11T12:05:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,776 | py | def min(s,t):
no_of_chars = 256
count = 0
start = 0
start_index = -1
min_len = float('inf')
print(start,start_index,min_len)
# first check if the length of the string is less than the string of the given pattern
if len(t)> len(s):
return ""
else:
# store the occurr... | [
"mary.jereh@gmail.com"
] | mary.jereh@gmail.com |
a677e63fb993da9014051e73887f7b61716d738e | 00fdef95e46f81e285d786d4d7ce1d9e017f5102 | /python/notes/myPackage/web/urls.py | 17886962283142eb98a1654d4590653ea8e779e4 | [] | no_license | ByeongjunCho/TIL | 76cbff26074104d5c54afda2a8e21a680792cf2f | 44c50dc7b6fbee4dfb3b0fb4bbe1383ef0eb0953 | refs/heads/master | 2023-01-24T21:57:31.848845 | 2020-04-17T04:16:07 | 2020-04-17T04:16:07 | 195,908,293 | 0 | 0 | null | 2023-01-07T11:27:24 | 2019-07-09T01:15:46 | Jupyter Notebook | UTF-8 | Python | false | false | 178 | py | import webbrowser
def make_url(token, method):
return f'https://api.telgram.com/bot{token}/{method}'
def docs():
webbrowser.open('https://telegram.com')
return True | [
"jjgk91@naver.com"
] | jjgk91@naver.com |
a554b9d4babd5f1a1082fb96b093df5f78bfe006 | b9a1be2835bf81a59c46220569b32cfeb9535822 | /MusicSegment/JSRanker/parametersInCondition2.py | d9550cbd7c5658c39bd81bd49878ca2a83333009 | [] | no_license | gifts1912/Project | 838b9c52eb7564679969ecc44933296fa46401ab | bf486420e6ec9f54420747481f7b0fbe60bc7825 | refs/heads/master | 2021-01-12T16:16:19.333663 | 2017-03-31T12:51:52 | 2017-03-31T12:51:52 | 71,970,952 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,485 | py | import pandas as pd
import numpy as np
def loadJSLog(jsLogFile, queryUrlFeas):
with open(jsLogFile, 'r', encoding='utf-8') as fr:
for line in fr:
arr = line.split('\t', 2)
query = arr[1].strip().lower()
log = arr[2].strip().rstrip(';').strip()
if log == "":
... | [
"hengyliu@hotmail.com"
] | hengyliu@hotmail.com |
5fce573ea3661fce8d1a9b4e1d79e857cae2283c | d380e7dfd4c9bb5fd9f238ca48be9f807b4f5db3 | /codes_auto/322.coin-change.py | 4c56b1aff7ec2f295ad97e11aba197fb8b079495 | [] | no_license | zhanjw/leetcode | 98c3d3fda23f100354b9ca030c47a854d3c207f0 | 2e62568dd9c6ce0bff4b0ca888ffff29f5a6feef | refs/heads/master | 2022-12-14T12:49:23.797498 | 2020-09-18T14:31:30 | 2020-09-18T14:31:30 | 296,640,031 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 710 | py | #
# @lc app=leetcode.cn id=322 lang=python
#
# [322] coin-change
#
class Solution(object):
def coinChange(self, coins, amount):
"""
:type coins: List[int]
:type amount: int
:rtype: int
"""
if amount==0:
return 0
dp = [None for _ in range(amount+1)]... | [
"imzhanjw@gmail.com"
] | imzhanjw@gmail.com |
58a2c9b61b424ef7dddb020d73ee279d49b0f40f | 9225ad5fb5dd92af547f4c4e04874bc812620d04 | /0.Dev Training/1.Junior/1. Base Demo/9.生成可控的随机数据集合/sample.py | b3e513365dfc3f9dd87100a93420470389f4bc38 | [] | no_license | skynimrod/dt_python | 6fb50d354d3e8cef995edc459ef45fe42b234c48 | bd822140634ae56d1f2331bde9877c871f62507a | refs/heads/master | 2021-05-16T06:55:32.840279 | 2017-09-15T04:11:10 | 2017-09-15T04:11:10 | 103,612,926 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 467 | py | import pylab
import random
SAMPLE_SIZE = 100
# seed random generator
# if no argument provided
#uses system current time
random.seed()
# store generated random values here
real_rand_vars = []
# pick some random values
real_rand_vars = [ random.random() for val in xrange(SAMPLE_SIZE) ]
# create histogrm from data in... | [
"adamswang_2000@aliyun.com"
] | adamswang_2000@aliyun.com |
11ba134e158504fdf01a45fc99d4732128a6012d | 57b4d38c1e81fae68a50133f74ca05126909ba10 | /app/tests/healthy/test_views.py | 3fb5f22ad03d25cf5123c5ddb48f1dc6d4abbe86 | [] | no_license | frankRose1/flask-api-boilerplate | edb06a339f312e5a202d2ff38a8304e7b3c5ab6e | 3b23bd337a49fee0d7666c89d9fb1fa14f4602c9 | refs/heads/master | 2022-01-22T03:15:25.243212 | 2019-11-09T02:30:38 | 2019-11-09T02:30:38 | 205,987,266 | 0 | 0 | null | 2022-01-06T22:38:10 | 2019-09-03T04:12:15 | Python | UTF-8 | Python | false | false | 282 | py | from flask import url_for
from lib.tests import ViewTestMixin
class TestHealthy(ViewTestMixin):
def test_healthy_response(self):
"""Should respond with a 200"""
response = self.client.get(url_for('HealthyView:get'))
assert response.status_code == 200
| [
"frank.rosendorf1@gmail.com"
] | frank.rosendorf1@gmail.com |
70b4ecc28943ca349c7ef7077d2dc62e6d3ba2c1 | c1646925d393914477aa22e279d20ab8103a5e9f | /fuzzinator/fuzzer/subprocess_runner.py | 8191d1f4b4284dec8ec3e020b49aa25180a40327 | [
"BSD-3-Clause"
] | permissive | harmmachine/fuzzinator | 574d0a6d424a2beb6a305ecb5b8621d4b7a22a2b | 6d0eea40457b93b0fef295e1e14524ad68ee748f | refs/heads/master | 2021-06-08T21:10:51.248453 | 2016-11-14T10:29:22 | 2016-11-14T10:29:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,221 | py | # Copyright (c) 2016 Renata Hodovan, Akos Kiss.
#
# Licensed under the BSD 3-Clause License
# <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>.
# This file may not be copied, modified, or distributed except
# according to those terms.
import json
import shutil
import subprocess
import os
class Subproces... | [
"reni@inf.u-szeged.hu"
] | reni@inf.u-szeged.hu |
e1ff943f227873288abcaa9d018334cfc0af1406 | a2211f0ef8297a77200a0b2eec8ba3476989b7e6 | /itcast/06_Django/day01_Django入门/demo03_Module.py | e363d13f3109bb7c2ac9c46470415e9f547d03a0 | [] | no_license | qq1197977022/learnPython | f720ecffd2a70044f1644f3527f4c29692eb2233 | ba294b8fa930f784304771be451d7b5981b794f3 | refs/heads/master | 2020-03-25T09:23:12.407510 | 2018-09-16T00:41:56 | 2018-09-16T00:42:00 | 143,663,862 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 626 | py | # 图书表结构
# 表名: Book
# 图书名: name
# 图书发布日期: date
# 英雄表结构
# 表名: Hero
# 英雄姓名: name
# 英雄性别: gender
# 英雄简介: introduce
# 所属图书: book
# E-R模型
# E:
# 1.图书
# 2.英雄
# R n:1 ~ 多对一
# Models映射关系
# 1.类对象: 表
# 2.类对象数据属性: 表字段
# 1.因此仅CURD类对象数据属性时才需要migrate, CURD方法无需migrate ~ 不对应数据库数据
# 2.id字段... | [
"1197977022@qq.com"
] | 1197977022@qq.com |
00e5ac08fe0d6db9b3ad6031826c2e0b81bcce83 | 4d05be863b63a56a90b4c46b15069827b33ecaae | /django/venv/Lib/site-packages/pip/_vendor/html5lib/treewalkers/_base.py | 1b1b58b4d9126ec55aa0147c945fac92d6ec1b01 | [] | no_license | leeo1116/PyCharm | e532fa9754056019508cc454214ee1a8ad9b26a9 | b6942c05c27556e5fe47879e8b823845c84c5430 | refs/heads/master | 2022-11-06T00:43:14.882453 | 2017-07-13T04:50:00 | 2017-07-13T04:50:00 | 36,851,636 | 0 | 1 | null | 2022-10-20T10:44:39 | 2015-06-04T06:09:09 | Python | UTF-8 | Python | false | false | 7,062 | py | from __future__ import absolute_import, division, unicode_literals
from pip._vendor.six import text_type, string_types
__all__ = ["DOCUMENT", "DOCTYPE", "TEXT", "ELEMENT", "COMMENT", "ENTITY", "UNKNOWN",
"TreeWalker", "NonRecursiveTreeWalker"]
from xml.dom import Node
DOCUMENT = Node.DOCUMENT_NODE
DOCTYPE... | [
"leeo1116@gmail.com"
] | leeo1116@gmail.com |
47736549784a127f5f6fbf30a3c83f167d46bee4 | 462670fdda0c89ab500a131abd84628ce7281847 | /utils_xyz/sample_group_blockid.py | f46c8876c35b1fadc790972f110753c039c2101a | [
"MIT"
] | permissive | xuyongzhi/dynamic_pointnet | 528d7cc7384c096a6e81ab41c7291e6897e4cfdb | f4a5a6203840babd40783716b127219e4655cbaf | refs/heads/master | 2021-03-27T20:38:54.622833 | 2018-03-26T06:07:27 | 2018-03-26T06:07:27 | 111,261,303 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 470 | py | # xyz Decc 2017
# Do 3d point cloud sample and group by block index
def get_sample_group_idxs(npoint,block_step,nsample):
return sample_idxs,group_idxs
def sample_and_group(npoint,block_step,nsample):
'''
Get npoint sub-blocks with equal stride and <block_step> step. The center of each sub-block is npo... | [
"buaaxyz@yeah.net"
] | buaaxyz@yeah.net |
02f1709794680778775a1bff3b92d7b941023984 | 762cbba14c80f4dd09fa6e5915e094825eef1cae | /653. Two Sum IV - Input is a BST.py | db1433542d4832888a00278cd4eb95174686af67 | [] | no_license | arnabs542/Leetcode-18 | 1faff2564b4a5bb970308187a0b71553fd85a250 | 02d31ab3363c92e8fdde15100bf4a3cbcd43ecd0 | refs/heads/master | 2022-07-26T12:18:38.834287 | 2020-05-19T05:40:48 | 2020-05-19T05:40:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 998 | py | # Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution(object):
def findTarget(self, root, k):
l = []
def helper(node):
if not node:
... | [
"noreply@github.com"
] | arnabs542.noreply@github.com |
93fc017e4cdf01ac3011b9e5e8575f19b95118f6 | 7677c7be75c651eb60e04c9d718981156f995e93 | /scripts/train.py | 7dfd38c380614d5b93c6872dd1c241b8150134a9 | [] | no_license | fgs22002/real-word-errors | 74e2ce37d15c37966cb94fa33dd29c2d1052554b | e5944c70d5bf41c58ae435cc2893e035ff730323 | refs/heads/main | 2023-04-06T20:54:33.325315 | 2021-04-06T16:54:47 | 2021-04-06T16:54:47 | 355,241,936 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,805 | py | """
real word errors
training
@author Daniel Bravo daniel.bravo@um.es
@author Jesica López <jesica.lopez@um.es>
@author José Antonio García-Díaz joseantonio.garcia8@um.es
@author Fernando Molina-Molina <fernando.molina@vocali.net>
@author Francisco García Sánchez <frgarcia@um.es>
"""
from pickle import dump
from fun... | [
"Smolky@gmail.com"
] | Smolky@gmail.com |
a20e2f22d6517c4c5cfd9edc79849337bd656004 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/adjectives/_demented.py | 96964537d8de1cbe3540f4986be959bac0caa3e9 | [
"MIT"
] | permissive | cash2one/xai | de7adad1758f50dd6786bf0111e71a903f039b64 | e76f12c9f4dcf3ac1c7c08b0cc8844c0b0a104b6 | refs/heads/master | 2021-01-19T12:33:54.964379 | 2017-01-28T02:00:50 | 2017-01-28T02:00:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 472 | py |
#calss header
class _DEMENTED():
def __init__(self,):
self.name = "DEMENTED"
self.definitions = [u'unable to think or act clearly because you are extremely worried, angry, or excited by something: ', u'crazy: ']
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.specie... | [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.