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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3c2d4f70f2f7b140cb2fb4fe4330a6d2fdb52a14 | d9eb516d18f7336c73d556cfcb4e38abc93a8248 | /nwpc_monitor_web/app/api/api_test.py | 4af8c71945144dbbe5aece3d22ced74d3565f95a | [] | no_license | cash2one/nwpc-monitor-platform | c555c544e676059ba05f063ef71065b8783fd9ff | ca7ad8751cd59f4f42337c52e50424ba06876987 | refs/heads/master | 2021-06-23T11:49:58.799933 | 2017-08-14T03:29:21 | 2017-08-14T03:29:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 833 | py | from flask import request, jsonify, json
import gzip
from nwpc_monitor_web.app.api import api_app
@api_app.route("/test/gzip")
def gzip_hello_page():
return "This page is used to test gzip on request body."
@api_app.route("/test/gzip/normal", methods=['POST'])
def get_normal_data():
message = request.form['... | [
"perillaroc@gmail.com"
] | perillaroc@gmail.com |
f4803af085f5d10fc471178bdbd2010304291f53 | a3c68eafdb433c981f2b90e86f895e4f121c69fb | /lintcode/900-二叉搜索树中最接近的值.py | b2b3535ffd2d8a212daffa7bb99c8a41187b45fb | [] | no_license | Cassiexyq/Program-Exercise | ccc236ea76ca99ddc6fe0c4c47edebc3d557cfad | e962cc3add047d61df275dd3e22a091018fd964a | refs/heads/master | 2020-04-25T20:27:33.561226 | 2019-09-22T15:29:35 | 2019-09-22T15:29:35 | 173,050,531 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,126 | py | # -*- coding: utf-8 -*-
# @Author: xyq
"""
Definition of TreeNode:
递归判断这棵树,如果当前结点值小于目标值,只可能是当前结点值或右子树的值,如果当前结点值大于目标值,只可能是当前结点值或左子树的值
"""
class TreeNode:
def __init__(self, val):
self.val = val
self.left, self.right = None, None
class Solution:
"""
@param root: the given BST
@param ta... | [
"cassiexuan_yq@163.com"
] | cassiexuan_yq@163.com |
21ee4ec4148cb4f5d1c6568bc725075124605545 | 851e32d7dbfc43737625c4bf23ef7e785732cfdf | /src/main.py | 98bbff032cfdf4ca5834b6acecb472dc850089d9 | [
"CC0-1.0"
] | permissive | ytyaru/Python.PySide2.QScrollArea.20200501084013 | 37d765de2845d24598ec9ac9bade07972464ca59 | 8a70445443e140ed8910cba4bdfcd7a6842ec692 | refs/heads/master | 2022-05-20T12:46:23.698689 | 2020-04-30T23:56:46 | 2020-04-30T23:56:46 | 260,343,033 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 933 | py | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import sys, os
from PySide2.QtWidgets import*
from PySide2.QtGui import*
from PySide2 import QtCore
import PySide2
def get_img_path():
here = os.path.dirname(os.path.abspath(__file__))
parent = os.path.dirname(here)
return os.path.join(parent, 'res', 'img.png')
a... | [
"yttry0@gmail.com"
] | yttry0@gmail.com |
5228de27fb90b54abd559f265233cc629783ad00 | c3856325644c582625fef74ce798fcbe0355ad4d | /workflow/rules/VariantCall/Genotyping.smk | c791f4ca119de4043f5499d1c77a7f5223db291a | [] | no_license | mahajrod/AVAVpipe | fcd1eaa4e8214a23113334a9c63e3e15c0e6182f | 18354c343e2285b1086380f3aefce03a9083a463 | refs/heads/master | 2023-03-29T03:48:02.364703 | 2021-04-03T03:42:47 | 2021-04-03T03:42:47 | 345,326,778 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,844 | smk | localrules: create_sample_file
rule haplotypecaller_gvcf:
input:
region=reference_recalibration_region_dir_path / "intervals/region_{region_id}.list",
bam=rules.applybsqr.output.bam,
bai=rules.applybsqr.output.bai,
reference=config["reference"],
output:
gvcf=temp(snpcal... | [
"mahajrod@gmail.com"
] | mahajrod@gmail.com |
ade1298871e666e27b391430372bd5836464737a | 3ff9821b1984417a83a75c7d186da9228e13ead9 | /No_0122_Best Time to Buy and Sell Stock II/by_price_gain_collection_based_on_list_and_sum.py | 2213134e6082ff8e4b717a78ad5b331cbdf3dd0a | [
"MIT"
] | permissive | brianchiang-tw/leetcode | fd4df1917daef403c48cb5a3f5834579526ad0c2 | 6978acfb8cb767002cb953d02be68999845425f3 | refs/heads/master | 2023-06-11T00:44:01.423772 | 2023-06-01T03:52:00 | 2023-06-01T03:52:00 | 222,939,709 | 41 | 12 | null | null | null | null | UTF-8 | Python | false | false | 2,229 | py | '''
Description:
Say you have an array for which the ith element is the price of a given stock on day i.
Design an algorithm to find the maximum profit. You may complete as many transactions as you like (i.e., buy one and sell one share of the stock multiple times).
Note: You may not engage in multiple transactions... | [
"brianchiang1988@icloud.com"
] | brianchiang1988@icloud.com |
90e882a47d44fbce8782d95b4dffbb2d9f53edeb | eb6c8428a8ef76c310e224adf604a2090aa84407 | /dashboard/dashboard/pinpoint/handlers/new.py | 06da483f60e223aa5277d63354429a65b1b693f8 | [
"BSD-3-Clause"
] | permissive | saadmahboob/catapult | d5809669f9600aeb1e39ff09ced4206c61474913 | 123b9d8ec2a233053e908750d1ce04c7c16fc3d8 | refs/heads/master | 2021-01-20T06:08:06.482685 | 2017-08-25T21:39:52 | 2017-08-25T21:39:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,405 | py | # Copyright 2016 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 json
import webapp2
from dashboard.api import api_auth
from dashboard.pinpoint.handlers import quest_generator
from dashboard.pinpoint.models import ... | [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
782b8859d7efbb57fdff7907d597c122d2c57d78 | 037a03d4b8b81bc39dc41cb4f3726f8297c8b672 | /0263.py | 4c1c7303e2e3fc208a7b7b71710861f2a6628ea9 | [] | no_license | Agchai52/Leetcode1 | ee3433ef6f6c3ddd800204c25a456dc7c3fd0053 | 9535d038bee690b7c7aeca352a4ab32d188684bb | refs/heads/master | 2021-08-22T02:59:45.632548 | 2020-05-21T00:31:45 | 2020-05-21T00:31:45 | 185,273,962 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 564 | py | class Solution(object):
def isUgly(self, num):
"""
:type num: int
:rtype: bool
"""
'''
1. num, mod = num / 2 or / 3 or / 5, %2 or %3 or %5
2. while num != 1, if mod == 1
3. num <= 0 return False
'''
if num <= 0: return False
if ... | [
"noreply@github.com"
] | Agchai52.noreply@github.com |
72ecf1bbef78ab913ad0732a134a9125ac9af106 | 03a2c1eb549a66cc0cff72857963eccb0a56031d | /leetcode/all-possible-full-binary-trees.py | 1253725a56852cb9657589735d8547ebbb789ceb | [] | 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 | 820 | py | # Definition for a binary tree node.
from typing import List
class TreeNode:
def __init__(self, val=0, left=None, right=None):
self.val = val
self.left = left
self.right = right
class Solution:
def allPossibleFBT(self, N: int) -> List[TreeNode]:
if N % 2 == 0:
ret... | [
"sunghyo.jung@navercorp.com"
] | sunghyo.jung@navercorp.com |
5cf169c88f9617cf622480494fde3c9f3025f2db | a9d6a3b0fe418e4e5cc131ebc05f9b56c0e4543e | /chapter04-threads/chapter4_threading_function.py | 345f671d197b3a4c0d4f5338ee0982b387d82631 | [] | no_license | Kianqunki/Python_CorePythonApplicationsProgramming | 34a36ba64bdc303814de507c4fcfc3c81ff88b5f | 77263c1fde0d02aade180f7e73d2cdee1d170d58 | refs/heads/master | 2021-05-07T02:41:44.567088 | 2014-10-27T17:43:51 | 2014-10-27T17:43:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 620 | py | import threading
from time import sleep, ctime
def loop(loop_id, secs):
print('start loop', loop_id, 'at:', ctime())
sleep(secs)
print('loop', loop_id, 'done at:', ctime())
def main():
print("starting time", ctime())
threads = []
t1 = threading.Thread(target=loop, args=(1, 4))
threads.app... | [
"georstef@gmail.com"
] | georstef@gmail.com |
50ff1ad07162521c9a9e7a755bc28535f6d0ee9e | 6d14f197ff95a6626cbb15588db1e60d37b93a81 | /数字转化为每个数的集合递归.py | 9cb61b09f461ad9edf82d9f23f5079ede61b742e | [] | no_license | sonichuang/My-py-file | 144b35bf4a7dd907fe7801802221421659671910 | 4cfd0bf7e0569f5b082d867a0798f3850493f204 | refs/heads/master | 2020-04-17T04:19:36.461705 | 2019-04-23T13:48:54 | 2019-04-23T13:48:54 | 166,225,284 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 162 | py | # 我的递归的做法
def get(x):
k = []
if x:
k.append(x%10)
return get(x//10) + k
else:
return k
t = int(input('input a number:'))
print(get(t))
| [
"huangshijinsonic@gmail.com"
] | huangshijinsonic@gmail.com |
0cd963e133be4653290a73653215a3e405c37c7b | 31f30239345e869e13111c1e5c5ec4ea032aa9ea | /0x01-warm_up/1-dictionary_of_list_of_dictionaries.py | fac1a43f2b91b5a2f41e6ddcd79db7b0ab34d99d | [] | no_license | Dkazem91/holbertonschool-interviews | a187970e8cb2750f72b06717331e13114a43ad8a | 0088b0b02cb8d06f118639d87c1b4de4b23ebcba | refs/heads/master | 2020-03-31T10:39:11.493231 | 2018-10-08T23:06:19 | 2018-10-08T23:06:19 | 152,143,116 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 634 | py | #!/usr/bin/python3
# dictionary of dictionaries and API calls
import json
import requests
if __name__ == "__main__":
f = open("todo_all_employees.json", "w")
send = {}
ids = requests.get('https://jsonplaceholder.typicode.com/users').json()
tasks = requests.get('https://jsonplaceholder.typicode.com/todo... | [
"Dkazemian@gmail.com"
] | Dkazemian@gmail.com |
53311970e736947d52fc92b4310677cf6ecd10da | 2a8abd5d6acdc260aff3639bce35ca1e688869e9 | /telestream_cloud_qc_sdk/test/test_active_format_descriptor_test.py | 8563ecbe7cb7d078aa53bde8370cca49e98e01a7 | [
"MIT"
] | permissive | Telestream/telestream-cloud-python-sdk | 57dd2f0422c83531e213f48d87bc0c71f58b5872 | ce0ad503299661a0f622661359367173c06889fc | refs/heads/master | 2021-01-18T02:17:44.258254 | 2020-04-09T11:36:07 | 2020-04-09T11:36:07 | 49,494,916 | 0 | 0 | MIT | 2018-01-22T10:07:49 | 2016-01-12T11:10:56 | Python | UTF-8 | Python | false | false | 1,585 | py | # coding: utf-8
"""
Qc API
Qc API # noqa: E501
The version of the OpenAPI document: 3.0.0
Contact: cloudsupport@telestream.net
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
import datetime
import telestream_cloud_qc
from telestream_cl... | [
"cloudsupport@telestream.net"
] | cloudsupport@telestream.net |
5af26f995f23f62d34708d8a1e9b80aced484962 | 99094cc79bdbb69bb24516e473f17b385847cb3a | /264.Ugly Number II/Solution.py | caf8e0c4c5129aa2b5f915a4478ce417918682d6 | [] | no_license | simonxu14/LeetCode_Simon | 7d389bbfafd3906876a3f796195bb14db3a1aeb3 | 13f4595374f30b482c4da76e466037516ca3a420 | refs/heads/master | 2020-04-06T03:33:25.846686 | 2016-09-10T00:23:11 | 2016-09-10T00:23:11 | 40,810,940 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,795 | py | __author__ = 'Simon'
class Solution(object):
# def nthUglyNumber(self, n):
# """
# :type n: int
# :rtype: int
# """
# OPT = []
# OPT.append(1)
# L1 = []
# L2 = []
# L3 = []
# L1.append(2)
# L2.append(3)
# L3.append(5)
... | [
"simonxu14@gmail.com"
] | simonxu14@gmail.com |
ef756af68074ab1bd26ee928f3f77842144103cb | c07aa8344b7adea209aa364e09241915fc189648 | /practice10e.py | 3aa6c09553d94cdda97332a3583bed938411c330 | [] | no_license | harmansehmbi/Project10 | 0c52763d63e29bb2698df28a28d1118de9f56fb0 | 06379f1c73a8c3224963801f589a4c773783c637 | refs/heads/master | 2020-06-12T10:50:49.458786 | 2019-06-28T13:14:29 | 2019-06-28T13:14:29 | 194,276,383 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 627 | py | # Inheritance
class Parent:
def __init__(self, fname, lname):
self.fname = fname
self.lname = lname
print(">> Parent Constructor Executed")
def showDetails(self):
print(">>Hello", self.fname, self.lname)
class Child(Parent): # Relationship --> IS-A
def __init__(self, veh... | [
"51370954+harmansehmbi@users.noreply.github.com"
] | 51370954+harmansehmbi@users.noreply.github.com |
45c20f141092860fc3fb4106908badd0a2d6d07c | 156c892cadfc60adba7722bdb56cf6c6dac8e19b | /06_classification/architecture/models.py | 38034bfbf5e6c32851743a993e34dda7d98066de | [
"MIT"
] | permissive | krakowiakpawel9/computer-vision-course | ad263fbbf081bf733d172477b744fd2f872ae790 | 798e84aaf2520bac564d5e042ee48d5ba3491d08 | refs/heads/master | 2022-12-09T02:53:05.926564 | 2021-10-17T07:15:20 | 2021-10-17T07:15:20 | 225,365,578 | 2 | 5 | MIT | 2022-12-08T03:15:48 | 2019-12-02T12:04:27 | Jupyter Notebook | UTF-8 | Python | false | false | 838 | py | from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Conv2D
from tensorflow.keras.layers import MaxPooling2D
from tensorflow.keras.layers import Flatten
from tensorflow.keras.layers import Dense
class LeNet5:
def __init__(self, input_shape):
self.input_shape = input_shape
... | [
"krakowiakpawel9@gmail.com"
] | krakowiakpawel9@gmail.com |
03b025fe02031ee7a8c0afe0bb4188aed0d4ff09 | 63ace5832d453e325681d02f6496a0999b72edcb | /examples/bip86.py | 73719ffcab8854740f85afef63d20bbbc690e01a | [
"MIT"
] | permissive | ebellocchia/bip_utils | c9ec04c687f4247e57434319e36b2abab78f0b32 | d15c75ddd74e4838c396a0d036ef6faf11b06a4b | refs/heads/master | 2023-09-01T13:38:55.567370 | 2023-08-16T17:04:14 | 2023-08-16T17:04:14 | 251,130,186 | 244 | 88 | MIT | 2023-08-23T13:46:19 | 2020-03-29T20:42:48 | Python | UTF-8 | Python | false | false | 1,324 | py | """Example of keys derivation using BIP86."""
from bip_utils import Bip39MnemonicGenerator, Bip39SeedGenerator, Bip39WordsNum, Bip44Changes, Bip86, Bip86Coins
ADDR_NUM: int = 5
# Generate random mnemonic
mnemonic = Bip39MnemonicGenerator().FromWordsNumber(Bip39WordsNum.WORDS_NUM_24)
print(f"Mnemonic string: {mnemon... | [
"54482000+ebellocchia@users.noreply.github.com"
] | 54482000+ebellocchia@users.noreply.github.com |
43d040790aea0b3922e3a5f563fcc1daac78441d | 05b0162d5ee7ab74f71ad4f21d5188a8735dfaef | /plugins/modules/device_administration_conditions_for_authentication_rule_info.py | 35d0d93dbca91131fa0f51ab962a1077fd52e574 | [
"MIT"
] | permissive | steinzi/ansible-ise | 567b2e6d04ce3ca6fbdbb6d0f15cd1913a1e215a | 0add9c8858ed8e0e5e7219fbaf0c936b6d7cc6c0 | refs/heads/main | 2023-06-25T15:28:22.252820 | 2021-07-23T14:21:40 | 2021-07-23T14:21:40 | 388,820,896 | 0 | 0 | MIT | 2021-07-23T14:03:07 | 2021-07-23T14:03:06 | null | UTF-8 | Python | false | false | 2,785 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 2021, Cisco Systems
# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
DOCUMENTATION = r"""
---
module: device_administration_conditions_for_authentication_rule_info
short_description: Information module for Device Adm... | [
"wastorga@altus.co.cr"
] | wastorga@altus.co.cr |
771fc6098f1802b8e35a0e783e947604ed0a2b8f | 2d276785c3663d4798be462115291c4706dbd255 | /Python从菜鸟到高手/chapter21/demo21.17.py | be5cc43e7fe719bc7ce925e483a866e7d4386c22 | [] | no_license | bupthl/Python | 81c92433bd955663e6cda5fe7cab5ea3d067c3de | bdb33aeeb179a43100b9ef7129a925c63a133fd3 | refs/heads/master | 2022-02-21T11:02:40.195265 | 2019-08-16T05:49:18 | 2019-08-16T05:49:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,569 | py | '''
--------《Python从菜鸟到高手》源代码------------
欧瑞科技版权所有
作者:李宁
如有任何技术问题,请加QQ技术讨论群:264268059
或关注“极客起源”订阅号或“欧瑞科技”服务号或扫码关注订阅号和服务号,二维码在源代码根目录
如果QQ群已满,请访问https://geekori.com,在右侧查看最新的QQ群,同时可以扫码关注公众号
“欧瑞学院”是欧瑞科技旗下在线IT教育学院,包含大量IT前沿视频课程,
请访问http://geekori.com/edu或关注前面提到的订阅号和服务号,进入移动版的欧瑞学院
“极客题库”是欧瑞科技旗下在线题库,请扫描源代码根目录中的小程序码安装“极客... | [
"registercn@outlook.com"
] | registercn@outlook.com |
220b3af5c34c9e5e93d20649552883d51ae2fd50 | 04ad0c1987ff1a2c57025fea93edc4db6ed0583b | /acctTracker/db_setup.py | c29255e45c4a3ccff6d429fb5114e0b29800b7d9 | [] | no_license | elronF/WebAppProject | 1ec08f00c934a5ea8a5172b882406144dfab6b78 | 3717243acc49249ff7a895063ec1cae1ffb5f65c | refs/heads/master | 2020-04-01T18:51:25.489294 | 2018-12-04T05:37:14 | 2018-12-04T05:37:14 | 153,519,459 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,833 | py | import sys
from sqlalchemy import Column, ForeignKey, Integer, String, UniqueConstraint
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship
from sqlalchemy import create_engine
import psycopg2
Base = declarative_base()
class Owner(Base):
__tablename__ = 'o... | [
"vagrant@vagrant.vm"
] | vagrant@vagrant.vm |
df2268355419277e266589f45e8bc92afdd65a95 | 5ac7ea7e67da7726dbf7cec59a7b45ece9c935f9 | /Module 8/15.1 method overloading.py | 9cfed92871c3c2f5750abd7ffb27327214cdfebc | [] | no_license | Vipulhere/Python-practice-Code | 61cc7a0246a28506c29857589e6b90dd5cbf952b | d47362241474527061e1beccb3d60f12ab7e2e5a | refs/heads/main | 2023-08-13T04:45:43.819247 | 2021-10-15T09:27:15 | 2021-10-15T09:27:15 | 313,358,144 | 7 | 3 | null | null | null | null | UTF-8 | Python | false | false | 298 | py | class cars():
def __init__(self):
self.name="BMW"
def show_detail(self):
print(self.name)
class BMW(cars):
def __init__(self):
self.name="This is BMW Name"
def show_detail(self):
print(self.name)
c=cars()
c1=BMW()
c1.show_detail()
c.show_detail() | [
"noreply@github.com"
] | Vipulhere.noreply@github.com |
f08d9d453b49df74219dca035e8fc5c53064cb7a | 1ff0f9a3c6e33a3ec9d617fa5ebc0b33c38243b3 | /picoctf-2018/quackme_200/solution.py | e51b532b1ee6de9eb5dbcd0da832ec3ffedf9d0a | [] | no_license | james9909/PracticeCTF | 2187d6c26cf7387f32360d7e1c7b41211ff3e9b3 | dfa1f03c9d7a3c157a019b681bac04d2e1244fab | refs/heads/master | 2022-05-10T17:07:47.061155 | 2022-04-04T23:52:46 | 2022-04-04T23:52:46 | 34,630,061 | 37 | 14 | null | 2022-04-04T23:52:47 | 2015-04-26T20:30:27 | Python | UTF-8 | Python | false | false | 510 | py | enc = "\x29\x06\x16\x4f\x2b\x35\x30\x1e\x51\x1b\x5b\x14\x4b\x08\x5d\x2b\x50\x14\x5d\x00\x19\x17\x59\x52\x5d"
key = "You have now entered the Duck Web"
dec = ""
for x in range(len(enc)):
dec += chr(ord(enc[x]) ^ ord(key[x]))
print(dec)
"""
Browsing the disassembly, we see that our input is being xor'd with the str... | [
"jameswang9909@hotmail.com"
] | jameswang9909@hotmail.com |
4f1c4c708baf91f15a2f05fd5a01db9058ece5a9 | 0fccee4c738449f5e0a8f52ea5acabf51db0e910 | /genfragments/EightTeV/Tprime/TprimeToTHinc_M_1400_TuneZ2star_8TeV_madgraph_cff.py | 02f0cbcc3da031fd5d6f36b739437611a55b8e39 | [] | no_license | cms-sw/genproductions | f308ffaf3586c19b29853db40e6d662e937940ff | dd3d3a3826343d4f75ec36b4662b6e9ff1f270f4 | refs/heads/master | 2023-08-30T17:26:02.581596 | 2023-08-29T14:53:43 | 2023-08-29T14:53:43 | 11,424,867 | 69 | 987 | null | 2023-09-14T12:41:28 | 2013-07-15T14:18:33 | Python | UTF-8 | Python | false | false | 4,742 | py | import FWCore.ParameterSet.Config as cms
from Configuration.Generator.PythiaUEZ2starSettings_cfi import *
generator = cms.EDFilter("Pythia6HadronizerFilter",
pythiaHepMCVerbosity = cms.untracked.bool(False),
maxEventsToPrint = cms.untracked.int32(0),
pythiaPylistVerbosity = cms.untracked.int32(0),
comE... | [
"sha1-5c9a4926c1ea08b633689ec734e2440da58b8c56@cern.ch"
] | sha1-5c9a4926c1ea08b633689ec734e2440da58b8c56@cern.ch |
cc6b69db17de0274380268b6fc80951fe0bfff87 | 651a296c8f45b5799781fd78a6b5329effe702a0 | /test_mat/sylvester_kac.py | 44297e14ba7d8cb43ac23f9c86e2cc1734fbb66c | [] | no_license | pdhhiep/Computation_using_Python | 095d14370fe1a01a192d7e44fcc81a52655f652b | 407ed29fddc267950e9860b8bbd1e038f0387c97 | refs/heads/master | 2021-05-29T12:35:12.630232 | 2015-06-27T01:05:17 | 2015-06-27T01:05:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,631 | py | #! /usr/bin/env python
#
def sylvester_kac ( n ):
#*****************************************************************************80
#
## SYLVESTER_KAC returns the SYLVESTER_KAC matrix.
#
# Formula:
#
# If J = I - 1
# A(I,J) = N + 1 - I
# If J = I + 1
# A(I,J) = I
#
# Example:
#
# N = 5,
#
# 0 1 ... | [
"siplukabir@gmail.com"
] | siplukabir@gmail.com |
db11aeda9733268b92c31c9cff4627aa0b75d680 | 5dc33db00ba62bea9850315b5c72f1c0c741901e | /Python/JianzhiOffer/question6_1.py | b4593accaeec0c5d58d03577fe02e0b609470294 | [] | no_license | czx94/Algorithms-Collection | b8d0b06c60138e7d996c91643e3bdb3236462aed | 8fb6c1d947046dabd58ff8482b2c0b41f39aa988 | refs/heads/master | 2021-06-09T04:53:10.601593 | 2021-05-20T14:04:54 | 2021-05-20T14:04:54 | 181,836,499 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 800 | py | '''
Print each node of a linkedlist from end to start
'''
from LinkedList import LinkedList
import numpy as np
# stack
def solution1(linkedlist):
print('Stack solution')
stack = []
root = linkedlist.root
while root:
stack.append(root.val)
root = root.next
while stack:
val =... | [
"czxplp@gmail.com"
] | czxplp@gmail.com |
62441cdd535497b26c470a8e6c58afebad67efc7 | 9b1446b26e81a79c303f9799fb6a91785c7adb03 | /.history/Code/dictogram_20200209185851.py | b2984114a1041e53aed656c00030a876b61bda19 | [] | no_license | SamirIngley/CS1.2-Tweet-Gen | 017ea15b1113881a156ff24682828bc654eb6c81 | bcd95fa63e05849cbf8e36230d8e31032b99daaa | refs/heads/master | 2020-12-14T20:19:57.733290 | 2020-08-04T23:19:23 | 2020-08-04T23:19:23 | 234,856,234 | 0 | 0 | null | 2020-06-05T21:13:04 | 2020-01-19T07:05:55 | Python | UTF-8 | Python | false | false | 4,706 | py | #!python
from __future__ import division, print_function # Python 2 and 3 compatibility
import random
class Dictogram(dict):
"""Dictogram is a histogram implemented as a subclass of the dict type."""
def __init__(self, word_list=None):
"""Initialize this histogram as a new dict and count given wor... | [
"samir.ingle7@gmail.com"
] | samir.ingle7@gmail.com |
9e527a1512634636ccd9e40f263b0a7ab2ea8b6a | 61d08e23fbb62e16f7bd9d43673b1cf4e0558c37 | /miraScripts/mayaTools/lighting_tool/OF/tools/rename.py | c84e06e533fd45419ca04b08cfa200cd3c416973 | [] | no_license | jonntd/mira | 1a4b1f17a71cfefd20c96e0384af2d1fdff813e8 | 270f55ef5d4fecca7368887f489310f5e5094a92 | refs/heads/master | 2021-08-31T12:08:14.795480 | 2017-12-21T08:02:06 | 2017-12-21T08:02:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,064 | py | import os
import re
from Qt.QtWidgets import *
from Qt.QtCore import *
from Qt.QtGui import *
from Qt import __binding__
import maya.cmds as mc
def undo(func):
def _undo(*args, **kwargs):
try:
mc.undoInfo(ock=1)
result = func(*args, **kwargs)
except Exception, e:
... | [
"276575758@qq.com"
] | 276575758@qq.com |
444d5c83bf5a92fecc3409cdda40126119132720 | edc1f1369794a4a1c499c6e9d5fe49a712657611 | /algorithms/leetcode_all/020.valid-parentheses/valid-parentheses.py | f3d37dfa31c05f969f5f8f1dda166ff88addb8e4 | [] | no_license | williamsyb/mycookbook | 93d4aca1a539b506c8ed2797863de6da8a0ed70f | dd917b6eba48eef42f1086a54880bab6cd1fbf07 | refs/heads/master | 2023-03-07T04:16:18.384481 | 2020-11-11T14:36:54 | 2020-11-11T14:36:54 | 280,005,004 | 2 | 0 | null | 2023-03-07T02:07:46 | 2020-07-15T23:34:24 | Python | UTF-8 | Python | false | false | 389 | py | class Solution(object):
def isValid(self, s):
"""
:type s: str
:rtype: bool
"""
stack = []
d = ["()", "[]", "{}"]
for i in xrange(0, len(s)):
stack.append(s[i])
if len(stack) >= 2 and stack[-2]+stack[-1] in d:
stack.pop(... | [
"william_sun1990@hotmail.com"
] | william_sun1990@hotmail.com |
b771b04cf2673c78434a7baa850db141197fe690 | 847273de4b1d814fab8b19dc651c651c2d342ede | /.history/Sudoku_II_004_20180620133813.py | 06b0b160e198df5586c64a56f59f67a2ddb1b43a | [] | no_license | Los4U/sudoku_in_python | 0ba55850afcffeac4170321651620f3c89448b45 | 7d470604962a43da3fc3e5edce6f718076197d32 | refs/heads/master | 2020-03-22T08:10:13.939424 | 2018-07-04T17:21:13 | 2018-07-04T17:21:13 | 139,749,483 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,961 | py | from random import randint
sudoku1 = [
[5, 9, 8, 6, 1, 2, 3, 4, 7],
[2, 1, 7, 9, 3, 4, 8, 6, 5],
[6, 4, 3, 5, 8, 7, 1, 2, 9],
[1, 6, 5, 4, 9, 8, 2, 7, 3],
[3, 2, 9, 7, 6, 5, 4, 1, 8],
[7, 8, 4, 3, 2, 1, 5, 9, 6],
[8, 3, 1, 2, 7, 6, 9, 5, 4],
[4, 7, 2, 8, 5, 9, 6, 3, 1],
[9, 5, 6, 1,... | [
"inz.kamil.wos@gmail.com"
] | inz.kamil.wos@gmail.com |
8eed19fb6d0c869d5b8a75af08b7271969d8fa28 | 1b596568ef6ced06173e60c71f01141682329ac4 | /log_example | 64493e12e5a625a4bf7201d031b380d159b2dc61 | [] | no_license | pfuntner/gists | 4eb1847ef22d3d9cb1e17e870a8434c376c4dbfc | 3322c922bd43480b4cc2759b1c31e5c76668c7ef | refs/heads/master | 2020-04-17T08:40:29.444378 | 2019-01-18T16:23:49 | 2019-01-18T16:23:49 | 166,421,209 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 825 | #! /usr/bin/env python
import logging
import argparse
parser = argparse.ArgumentParser()
group = parser.add_mutually_exclusive_group()
group.add_argument('-v', '--verbose', dest='verbose', action='count', help='Enable debugging - multiple uses prints more messages')
group.add_argument('--loglevel', dest='loglevel', ... | [
"jpfuntne@cisco.com"
] | jpfuntne@cisco.com | |
139b90b03a2ada07657e2c3171fbe3ad6dcaa6e5 | 3043a21e89b67e7f3d1e420358ab6af41fc203b4 | /0x00-python_variable_annotations/9-element_length.py | d4bc71ac28747753dd3bba1aea9999c25a8bbdd4 | [] | no_license | zacwoll/holbertonschool-web_back_end | 846ece845725d702d8a6ee0a1696e6d823362fd6 | ece925eabc1d1e22055f1b4d3f052b571e1c4400 | refs/heads/main | 2023-05-20T12:54:07.215103 | 2021-06-03T21:21:53 | 2021-06-03T21:21:53 | 348,202,950 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 232 | py | #!/usr/bin/env python3
""" duck type """
from typing import Iterable, Sequence, Tuple, List
def element_length(lst: Iterable[Sequence]) -> List[Tuple[Sequence, int]]:
""" some function """
return [(i, len(i)) for i in lst] | [
"zacwoll@gmail.com"
] | zacwoll@gmail.com |
249b96eba8bb51de0b655e2fd71e2e05b7cf0d86 | 0f07107b016d2aee64788966b9f0d322ac46b998 | /moya/tests/test_expressionrange.py | bea67e69ae54228897fd3b831ebbcd0022c27df1 | [
"MIT"
] | permissive | fkztw/moya | 35f48cdc5d5723b04c671947099b0b1af1c7cc7a | 78b91d87b4519f91dfdd2b40dab44e72f201a843 | refs/heads/master | 2023-08-09T09:20:21.968908 | 2019-02-03T18:18:54 | 2019-02-03T18:18:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,481 | py | import unittest
from moya.context import Context
from moya.context.expressionrange import *
class TestExpressionRange(unittest.TestCase):
def test_exclusive_integer(self):
c = Context()
r = ExclusiveIntegerRange(c, 2, 4)
self.assertEqual(list(r), [2, 3])
self.assertEqual(len(r), 2)... | [
"willmcgugan@gmail.com"
] | willmcgugan@gmail.com |
2c94b107dcb549b0b2b8d15b941c9e3eb7c61da7 | 6838d66f8dec23db63923f375438af2dd9fb22fe | /justaminute.py | 315de96a4935263987691525c56a328c3ba21444 | [] | no_license | xCiaraG/Kattis | 795ef7c463c60f362068f0d0e7c8ec8da4a69d19 | ec08aa588f61d78937fb3c63bdb803e999fc9c36 | refs/heads/master | 2021-01-22T21:27:54.736451 | 2020-10-25T17:44:09 | 2020-10-25T17:44:09 | 85,432,383 | 9 | 9 | null | 2020-10-25T17:44:10 | 2017-03-18T21:13:13 | Python | UTF-8 | Python | false | false | 315 | py | n = int(input())
total_minutes = 0
total_actual = 0
for i in range(0, n):
time = list(map(float, input().strip().split()))
total_minutes += time[0]*60
total_actual += time[1]
average = total_actual/total_minutes
if average <= 1:
print("measurement error")
else:
print("{:.9f}".format(average))
| [
"ciara.godwin3@mail.dcu.ie"
] | ciara.godwin3@mail.dcu.ie |
7e1090859245e3a7d13cb11ff24180715a977bab | 46577285b990bb2711cc718b99a24f78c53a7da7 | /백준/직사각형 네개의 합집합의 면적 구하기.py | 17e6be380d969c06d18319c88204f087210604dc | [] | no_license | suwonraison900206/TIL | 890f02ff768c3a7d6ed647a27ba8da96b0cc06b4 | 2153623238bcc6965ec6983df9e7b207cc5aa361 | refs/heads/master | 2022-06-08T09:51:12.289608 | 2022-05-18T12:04:56 | 2022-05-18T12:04:56 | 235,004,266 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 508 | py | temp = list(map(int,input().split()))
k = [[0]*10 for _ in range(10)]
print(k)
print(k[1][2])
cnt = 0
for j in range(1,4):
for q in range(2,4):
k[j][q] = 1
print(k)
for u in range(2,5):
for q in range(3,7):
k[u][q] = 1
print(k)
for x in range(3,6):
for q in range(1,5):
k[x][q] = 1
... | [
"suwonraison@gmail.com"
] | suwonraison@gmail.com |
404b7a80d6b3cb46638300d4b2454c46500eef2d | facb8b9155a569b09ba66aefc22564a5bf9cd319 | /wp2/merra_scripts/01_netCDF_extraction/merra902Combine/300-tideGauge.py | c6d03e5fa08cd36ecff6936bf0d19713697e1ecb | [] | no_license | moinabyssinia/modeling-global-storm-surges | 13e69faa8f45a1244a964c5de4e2a5a6c95b2128 | 6e385b2a5f0867df8ceabd155e17ba876779c1bd | refs/heads/master | 2023-06-09T00:40:39.319465 | 2021-06-25T21:00:44 | 2021-06-25T21:00:44 | 229,080,191 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,376 | py | # -*- coding: utf-8 -*-
"""
Created on Tue Jun 17 11:28:00 2020
--------------------------------------------
Load predictors for each TG and combine them
--------------------------------------------
@author: Michael Tadesse
"""
import os
import pandas as pd
#define directories
# dir_name = 'F:\\01_erainterim\\01_er... | [
"michaelg.tadesse@gmail.com"
] | michaelg.tadesse@gmail.com |
1f8d9044beaaeefc144c85c76b2f906444c20f2e | e57d7785276053332c633b57f6925c90ad660580 | /sdk/storage/azure-storage-blob/tests/test_ors_async.py | f60a213704044e8da44c35ef8dcca533770c122a | [
"MIT",
"LicenseRef-scancode-generic-cla",
"LGPL-2.1-or-later"
] | permissive | adriananeci/azure-sdk-for-python | 0d560308497616a563b6afecbb494a88535da4c5 | b2bdfe659210998d6d479e73b133b6c51eb2c009 | refs/heads/main | 2023-08-18T11:12:21.271042 | 2021-09-10T18:48:44 | 2021-09-10T18:48:44 | 405,684,423 | 1 | 0 | MIT | 2021-09-12T15:51:51 | 2021-09-12T15:51:50 | null | UTF-8 | Python | false | false | 4,206 | 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.
# --------------------------------------------------------------------... | [
"noreply@github.com"
] | adriananeci.noreply@github.com |
53d84ddbe8c7e20a0deb62c8a428f73af9ac2648 | 4677038af88d83a7c0ed693d1eba7ac371a83b7a | /pymworks/protocol/utils.py | 5c98ceae0294677ba19cd083e7d16a7160a2a0b6 | [] | no_license | jgattupa/pymworks | f0035bf4f234c6bdc7d3691b6b01055c25666db1 | 879d0b74f0179f138a543ce32426d3c3f24720c4 | refs/heads/master | 2021-01-18T20:49:37.971271 | 2014-08-01T23:26:34 | 2014-08-01T23:26:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 728 | py | #!/usr/bin/env python
import os
from .. import utils
def load(fn):
return utils.ETree(file=fn)
def resolve_protocol(e):
if isinstance(e, (str, unicode)):
return load(os.path.expanduser(e))
return e
def parse_exp(v):
for c in ['(', ')', '+', '-', '/', '#GT', '#LT',
'#AND', '... | [
"brettgraham@gmail.com"
] | brettgraham@gmail.com |
b719c2a9f2ce469506e6d70bb6f58840df2c61e7 | 3c44ddbe867d953a5f27c8c073e1ea5e995b5873 | /deep_logistics/agent_storage.py | 978d15db27491456d332dd3f6d89b657071c14c5 | [] | no_license | cair/deep-warehouse | 37f6a3510638b36c276abb62b6b770d0ba6186af | 93cb7329c28733083b48ab6afd3de91676852175 | refs/heads/master | 2022-03-10T16:45:59.553325 | 2022-02-20T17:28:19 | 2022-02-20T17:28:19 | 167,932,576 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 683 | py | from deep_logistics.agent import Agent
class AgentStore:
def __init__(self, env):
self.env = env
self.agents = []
def __iter__(self):
return iter(self.agents)
def __getitem__(self, item):
return self.agents[item]
def __len__(self):
return len(self.agents)
... | [
"per@sysx.no"
] | per@sysx.no |
0cc4192a5634a04f7b4bb3a9570016eade195fd2 | 6b9084d234c87d7597f97ec95808e13f599bf9a1 | /models/TransT/variants/feature_pyramid/merged_cross_attention_block.py | 99d2fd7178cdf5dd29aa6a159fbf6f5803a5fcac | [] | no_license | LitingLin/ubiquitous-happiness | 4b46234ce0cb29c4d27b00ec5a60d3eeb52c26fc | aae2d764e136ca4a36c054212b361dd7e8b22cba | refs/heads/main | 2023-07-13T19:51:32.227633 | 2021-08-03T16:02:03 | 2021-08-03T16:02:03 | 316,664,903 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,218 | py | import torch.nn as nn
from .merged_cross_attention import PVTMergedCrossAttention
from .mlp import Mlp
from timm.models.layers import DropPath
class MergedCrossAttentionBlock(nn.Module):
def __init__(self, dim, num_heads, mlp_ratio=4., qkv_bias=False, qk_scale=None, drop=0., attn_drop=0.,
drop_p... | [
"linliting06@live.com"
] | linliting06@live.com |
f3d95decf351fcba2c1ca4ccd73a100f4237fddd | f08e50d55bbbb90e4c8f9a8811eaede98ede2694 | /erpbee/stock/report/item_prices/item_prices.py | 714657ea479826fb88f9efb5d3c54087178d2331 | [] | no_license | mohrezbak/erpbee | bc48472a99a7f4357aa7b82ff3a9c1a4c98ba017 | 1134156ad337fd472e14cf347479c17bd8db7b33 | refs/heads/main | 2023-02-12T01:32:07.858555 | 2021-01-08T17:25:23 | 2021-01-08T17:25:23 | 327,872,762 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,599 | py | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import msgprint, _
from frappe.utils import flt
def execute(filters=None):
if not filters: filters = {}
columns = get_colu... | [
"bakhtiar2k6@gmail.com"
] | bakhtiar2k6@gmail.com |
1f8f1b351c221042799045a477a769f0c46e8f74 | 23fddc940a266c2d1d0e0b1687c36cdbcc9d54d9 | /app/game/action/node/_fight_start_logic.py | 3d1c8be535b28283aed27bdd665e3c365f498c63 | [] | no_license | Cuick/traversing | 210fcfb1c780037de59343fffeb4fa4d3f2eae32 | c78982580af7f63c8bff4dcb37005b7f7c682b5b | refs/heads/master | 2021-01-10T17:38:37.899460 | 2016-11-18T06:06:55 | 2016-11-18T06:06:55 | 55,397,540 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 7,524 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
重用开始战斗相关代码。
"""
from app.game.component.fight.stage_factory import get_stage_by_stage_type
from app.game.redis_mode import tb_character_info
from gfirefly.server.logobj import logger
from app.battle.battle_unit import BattleUnit
#from app.battle.battle_process import Ba... | [
"zxzxck@163.com"
] | zxzxck@163.com |
7309d042603cb51df3e768ebbb4ad3420d5c3475 | 96d1876d2c18fdac86e8f84bb6684296122a8962 | /test.py | 8630c5c3f7d8ab2f88015f4dc4ea33198c798376 | [] | no_license | jschnab/real-estate-scraping | 756636922a02f0670a1e5b574bf7d7be9200ea02 | 8334470f3b49d1b983be56ccecba040b20028001 | refs/heads/master | 2023-03-15T04:00:38.278259 | 2020-10-24T02:12:28 | 2020-10-24T02:12:28 | 213,277,448 | 1 | 0 | null | 2020-10-24T02:12:29 | 2019-10-07T02:10:11 | Python | UTF-8 | Python | false | false | 651 | py | import sys
from tor_sqs_browser import Browser
from nytimes.browse import *
from nytimes.parse_soup import *
def main():
crawler = Browser(
base_url="https://www.nytimes.com",
stop_test=is_last_page,
get_browsable=wrapper_next_page,
get_parsable=get_listings,
get_page_id=... | [
"jonathan.schnabel31@gmail.com"
] | jonathan.schnabel31@gmail.com |
7871008023436bf19c0167767ce0c4bda40228cf | 75d4ad310511c1468fc596bffd64b68a2574cf95 | /blog/migrations/0010_auto_20200903_1825.py | bdf51e1058bca71f3f28258fc323e21c3108b114 | [] | no_license | famousowhedo/learnignite | 8fce5e4d55e9d19109c9ed1a32ae1ead6a3c1881 | c8cf8711d406849c11cf441babf12ff6887e6992 | refs/heads/master | 2022-12-07T11:31:27.504068 | 2020-09-05T03:32:24 | 2020-09-05T03:32:24 | 292,993,347 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 432 | py | # Generated by Django 3.1 on 2020-09-03 18:25
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('blog', '0009_auto_20200903_1824'),
]
operations = [
migrations.AlterField(
model_name='course',
... | [
"you@example.com"
] | you@example.com |
821861404863ce42172f4e1f0ffdb84c1d1f38e1 | f1c2a606938392b6e66a86f20f5db060f1099c18 | /empapp_1/urls.py | 40d1e68a06ec60089b042350fe203599c947c2e7 | [] | no_license | aynulislam/Some_API_Create | 26393ecd3f61892517110282d5cd3aaf848eb066 | e8301a4d6861278dc1782329bc28cee2bc9dd855 | refs/heads/master | 2020-08-22T07:10:35.505533 | 2019-10-20T10:40:26 | 2019-10-20T10:40:26 | 216,344,976 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 273 | py | from django import views
from .views import DesignationAPIView, EmployeeAPIView
from django.urls import path
urlpatterns = [
path('Designation/', DesignationAPIView, name="Designation"),
path('Employee/<int:pk>', EmployeeAPIView, name="Employee"),
]
| [
"noreply@github.com"
] | aynulislam.noreply@github.com |
ad52cd1a0e01e511094c6a0642d7dea089a298af | dea48ecac82d241e7960f52794eb8a29e5d2e428 | /jianzhioffer/数组/最大递增序列长度_连续and不连续.py | 8d261b7e2545d02289bb0dd6ebc1ecbac945b5bc | [] | no_license | yxx94/2020- | e2302bed32c5d7d1e8b559ef378fc60408687934 | e63431cfc3d8c8903bb383144dd0c5ed5d71aa5c | refs/heads/master | 2020-09-03T09:04:08.795099 | 2019-09-19T08:12:51 | 2019-09-19T08:12:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,483 | py | #coding=utf-8
##### 要求递增子序列连续
# 时复 O(n)
a = [10, 80, 6, 3, 4, 7, 1, 5, 11, 2, 12, 30, 31]
concoll = [0]
for i in range(len(a) - 1):
if a[i] < a[i+1]:
count = concoll[-1] + 1
concoll.append(count)
else:
concoll.append(1)
maxcou = max(concoll)
print maxcou
##### 递增子序列可不连续
'''
[1,6,2,3... | [
"jiachen0212@163.com"
] | jiachen0212@163.com |
6dc0b8db25f11ecb1ec374db52f151526d3ce060 | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_014/ch42_2020_03_29_22_30_07_552136.py | 44857793d4db8e0ea56474d72cd167cbf74ff5c8 | [] | 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 | 319 | py | lista_palavras = [] * 10
palavra = input('Fale uma palavra: ')
while palavra != 'fim':
lista_palavras.append(palavra)
palavra = input('Fale outra palavra: ')
i = 0
while i < len(lista_palavras):
palavra = lista_palavras[i]
if len(palavra) > 1 and palavra[0] == 'a':
print (palavra)
i += 1 | [
"you@example.com"
] | you@example.com |
7b3d5a3df2d97f581290a02d843bcbf302fde66b | 3d020fd4cc9fe7f2d5e83850a6c81a4884b995b8 | /python/Hadronizer_TuneCP5_13TeV_HToZATo2L2B_pythia8_PSweights_cff.py | 5e6a00a0ba8d892dd27b95ac0dc8cc331a60de8b | [] | no_license | kjaffel/NanoGenScripts | 8cd0454f7d02346a4a6f83dd4088be30a923b05c | 1d368defa4cec85e462ef268acf0385b387c9d55 | refs/heads/master | 2023-07-15T04:23:48.099918 | 2021-08-25T11:33:07 | 2021-08-25T11:33:07 | 348,656,837 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,359 | py | import FWCore.ParameterSet.Config as cms
externalLHEProducer = cms.EDProducer("ExternalLHEProducer",
args = cms.vstring(''),
nEvents = cms.untracked.uint32(1000),
numberOfParameters = cms.uint32(1),
outputFile = cms.string('cmsgrid_final.lhe'),
scriptName = cms.FileInPath('GeneratorInterface/LHEInte... | [
"khawla.jaffel@cern.ch"
] | khawla.jaffel@cern.ch |
cc964cf2e9b24c79fcc02254a5474753061dcb50 | 62e58c051128baef9452e7e0eb0b5a83367add26 | /x12/3050/889003050.py | cd6e4689ea1607dfdb04791747ece216306af46f | [] | no_license | dougvanhorn/bots-grammars | 2eb6c0a6b5231c14a6faf194b932aa614809076c | 09db18d9d9bd9d92cefbf00f1c0de1c590fe3d0d | refs/heads/master | 2021-05-16T12:55:58.022904 | 2019-05-17T15:22:23 | 2019-05-17T15:22:23 | 105,274,633 | 0 | 0 | null | 2017-09-29T13:21:21 | 2017-09-29T13:21:21 | null | UTF-8 | Python | false | false | 1,343 | py | from bots.botsconfig import *
from records003050 import recorddefs
syntax = {
'version' : '00403', #version of ISA to send
'functionalgroup' : 'QG',
}
structure = [
{ID: 'ST', MIN: 1, MAX: 1, LEVEL: [
{ID: 'G42', MIN: 1, MAX: 1},
{ID: 'N9', MIN: 0, MAX: 10},
... | [
"jason.capriotti@gmail.com"
] | jason.capriotti@gmail.com |
da2ab0c2dec52cad72d33019513e3341e899b3cb | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02596/s431031550.py | 0f7aa0665c6229afa67fb320f03392e10fcc8d96 | [] | 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 | 289 | py | def solve(string):
n, k = 7, int(string)
if k % 2 == 0 or k % 5 == 0:
return "-1"
for i in range(k):
if not n % k:
return str(i + 1)
n = (10 * n + 7) % k
if __name__ == '__main__':
import sys
print(solve(sys.stdin.read().strip()))
| [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
67e6772698fc2c5e6a89a0abecb9d5b7cc68ac26 | bd8bc57159de1e077b1dacddad4bd0dab5df57ae | /qrcodelist/migrations/0001_initial.py | 9073675e7997e68b235f0d8982d4a93878c0b897 | [
"Apache-2.0"
] | permissive | Klaymr/GreaterWMS | ac22e9c9395f2ba5d6f7535601743df39d113384 | 7ddf0e8bf3447edf7e27aea16afec6483fb21dbc | refs/heads/master | 2023-01-07T07:07:24.171838 | 2020-11-17T05:41:26 | 2020-11-17T05:41:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 693 | py | # Generated by Django 2.2.12 on 2020-07-19 15:08
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='QrCodeList',
fields=[
('id', models.AutoFi... | [
"singosgu@gmail.com"
] | singosgu@gmail.com |
7ce1a72eb9d888db890e4ad8374dde35e6d0897d | f07a42f652f46106dee4749277d41c302e2b7406 | /Data Set/bug-fixing-5/efa78b4ff4b4c68f4bce8a0c02c82134c4cb1bd6-<test_module_utils_basic_ansible_module__symbolic_mode_to_octal>-fix.py | 162d7965b94dc276ce7e786c4a606e6c6a653821 | [] | 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 | 1,563 | py | def test_module_utils_basic_ansible_module__symbolic_mode_to_octal(self):
from ansible.module_utils import basic
basic._ANSIBLE_ARGS = None
am = basic.AnsibleModule(argument_spec=dict())
mock_stat = MagicMock()
mock_stat.st_mode = 16384
self.assertEqual(am._symbolic_mode_to_octal(mock_stat, 'a+r... | [
"dg1732004@smail.nju.edu.cn"
] | dg1732004@smail.nju.edu.cn |
bbe72c369e4f7997567ed223479d14a4db8e78c8 | 74eb4f8153804ab27fcfc8c1412d64607ebc1536 | /pyapprox/tests/test_approximate.py | 1b1edfb48e45b98aafe1375aff62e2bdd768ac56 | [
"MIT"
] | permissive | samtx/pyapprox | 2d3c09f35de58f51eb5e9346acbb65ca0e5c242b | c926d910e30fbcfed7d0621175d3b0268d59f852 | refs/heads/master | 2023-01-27T11:41:28.064288 | 2020-11-09T20:46:40 | 2020-11-09T20:46:40 | 269,163,376 | 0 | 0 | MIT | 2020-06-03T18:23:12 | 2020-06-03T18:23:11 | null | UTF-8 | Python | false | false | 7,820 | py | import unittest
from scipy import stats
from pyapprox.approximate import *
from pyapprox.benchmarks.benchmarks import setup_benchmark
import pyapprox as pya
class TestApproximate(unittest.TestCase):
def setUp(self):
np.random.seed(1)
def test_approximate_sparse_grid_default_options(self):
nvars... | [
"29109026+jdjakem@users.noreply.github.com"
] | 29109026+jdjakem@users.noreply.github.com |
a89aad82400ab9f0b4905f0e287eaa219d14dfc4 | 9f24e060c7721f5fdc2195d8060f653db4e88a33 | /OpenCV-Python-Tutorial/cv-Tkinter-GUI/opencv-with-tkinter.py | 68d0215027290254f133eee43d448c208b9113d3 | [] | no_license | menzec/htht | 16052b8bad48d73a08388408f51ca6bed95c3861 | f3f19577534b05b4410bb37f6456aab4637d2e6d | refs/heads/master | 2020-04-26T03:56:14.115135 | 2019-03-01T09:55:06 | 2019-03-01T09:55:06 | 173,284,085 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,580 | py | # -*- coding: utf-8 -*-
# @Time : 2018/2/8 15:56
# @Author : play4fun
# @File : opencv-with-tkinter.py
# @Software: PyCharm
"""
opencv-with-tkinter.py:
https://www.pyimagesearch.com/2016/05/23/opencv-with-tkinter/
不需要
pip install image
"""
# import the necessary packages
from tkinter import *... | [
"menzc@outlook.com"
] | menzc@outlook.com |
c92b344b84e219edd8fde57641028f1dd92ef093 | 0a567d3417fbdf68fdbd1bf4ef9778518e898678 | /genderClassifier.py | 4cc96d01fa12228c898be846767061c24e56f48a | [] | no_license | maxberggren/sinus | 1d8890009f1eb28d49688883836d0ec2822163ad | 5f85858c0f48927486a3f96d8251ffedbfc3e553 | refs/heads/master | 2020-05-16T11:32:42.516246 | 2016-02-16T09:59:36 | 2016-02-16T09:59:36 | 24,930,665 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,441 | py | from __future__ import print_function
from pprint import pprint
from time import time
import logging
from sklearn.datasets import fetch_20newsgroups
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.feature_extraction.text import TfidfTransformer
from sklearn.linear_model import SGDClassifier
f... | [
"maxberggren@gmail.com"
] | maxberggren@gmail.com |
4954cdbacf8c6acc46c5811e497d40545e3f10a8 | e2f507e0b434120e7f5d4f717540e5df2b1816da | /021-tuple-vs-list.py | ebe65a1d6fac2f2d4ba71e6b71c93f5ccf0db3c6 | [] | no_license | ash/amazing_python3 | 70984bd32ae325380382b1fe692c4b359ef23395 | 64c98940f8a8da18a8bf56f65cc8c8e09bd00e0c | refs/heads/master | 2021-06-23T14:59:37.005280 | 2021-01-21T06:56:33 | 2021-01-21T06:56:33 | 182,626,874 | 76 | 25 | null | null | null | null | UTF-8 | Python | false | false | 135 | py | # Tuples vs lists
# Similar but different
var1 = [2, 4, 6, 8] # list
var2 = (2, 4, 6, 8) # tuple
print(type(var1))
print(type(var2))
| [
"andy@shitov.ru"
] | andy@shitov.ru |
f5db7fd8a9f22cb63c83e38171bca4846959715a | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02700/s876239680.py | d2f6a79dacbdfd6ebfea049548aad9f2217693ab | [] | 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 | 204 | py | A, B, C, D = list(map(int, input().split()))
win = ''
while True:
C = C - B
if C <= 0:
win = 'Yes'
break
A = A - D
if A <= 0:
win = 'No'
break
print(win) | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
88cf4246b277e81c908dad205921830cda1584cf | dd27efb2b54a9ca87985dc4969f647f30273aa72 | /Searching/Binary_search.py | becb8a6caf89e1a8467303526484e2197ffc3993 | [] | no_license | Prakashchater/Daily-Practice-questions | c47dd3deec16fa968be0b4adcd1cf296c21adcee | f60b3044c36e4fa14b140614e302ede16be778fd | refs/heads/main | 2023-04-18T18:44:52.813481 | 2021-05-09T18:17:31 | 2021-05-09T18:17:31 | 351,801,239 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 804 | py | #Recursive way
# def binary(arr,target,left, right):
# if right >= 1:
# mid = (left + right) // 2
# if arr[mid] == target:
# return mid
# elif arr[mid] > target:
# return binary(arr,target,left,mid-1)
# else:
# return binary(arr,target,mid+1,right)... | [
"prakashchater@gmail.com"
] | prakashchater@gmail.com |
637b64e91be718813de8efe9b8e820998e441c3a | 27e890f900bd4bfb2e66f4eab85bc381cf4d5d3f | /plugins/module_utils/facts/virtual/freebsd.py | bdef3006c5b9317d74b3beb49bcc5f4bde19cb52 | [] | no_license | coll-test/notstdlib.moveitallout | eb33a560070bbded5032385d0aea2f3cf60e690b | 0987f099b783c6cf977db9233e1c3d9efcbcb3c7 | refs/heads/master | 2020-12-19T22:28:33.369557 | 2020-01-23T18:51:26 | 2020-01-23T18:51:26 | 235,865,139 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,207 | py | # This file is part of Ansible
#
# Ansible 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 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that ... | [
"wk@sydorenko.org.ua"
] | wk@sydorenko.org.ua |
6a37886dd8875a19269dd10c9aff30aad7e0a344 | b00873d36e44128ce30623da0ee3b556e4e3d7e7 | /data_structure/binary_tree_with_next.py | 38627859b41e07c735ae9f669cce37abcc3fc708 | [
"MIT"
] | permissive | Satily/leetcode_python_solution | b4aadfd1998877b5086b5423c670750bb422b2c8 | 3f05fff7758d650469862bc28df9e4aa7b1d3203 | refs/heads/master | 2021-07-18T07:53:10.387182 | 2021-07-17T06:30:09 | 2021-07-17T06:30:09 | 155,074,789 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 161 | py | class Node:
def __init__(self, val, left, right, next):
self.val = val
self.left = left
self.right = right
self.next = next
| [
"houjiaxu@xiaomi.com"
] | houjiaxu@xiaomi.com |
6cea93fa60e30a2e6d8f45364e10ee8e09204506 | 137ba8a70dfcf94dfe7aeef1599341ecc06ca48f | /student_result/2018/03_data_analysis/23/makingStatistics.py | 19e0815625a1be0ea6eb549a59a92e0028581dfd | [] | no_license | smtamh/oop_python_ex | e1d3a16ade54717d6cdf1759b6eba7b27cfc974e | bd58ee3bf13dad3de989d5fd92e503d5ff949dd9 | refs/heads/master | 2020-09-22T08:35:19.847656 | 2019-11-13T02:47:06 | 2019-11-13T02:47:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,535 | py | import csv
import operator
from sys import exit
# file을 열기 위해서 시도해보고, 없으면 알려주고 있으면 data로 변경
try:
f = open('2017년_3월_역별_일별_시간대별_승차인원.csv', encoding='cp949')
except FileNotFoundError:
print("파일이 없어요...")
exit(0)
else:
data = csv.reader(f)
try:
# 공공 데이터의 첫줄은 이게 어떤 데이터인지 적혀있는 칼럼줄 관리용 변수
first_row ... | [
"kadragon@sasa.hs.kr"
] | kadragon@sasa.hs.kr |
f96f5becd7bd765e7f9622c7a824b9874bd1c601 | 42c48f3178a48b4a2a0aded547770027bf976350 | /google/ads/google_ads/v3/services/payments_account_service_client_config.py | b7c380c80141520fd16fa559bd9870a52b0940d8 | [
"Apache-2.0"
] | permissive | fiboknacky/google-ads-python | e989464a85f28baca1f28d133994c73759e8b4d6 | a5b6cede64f4d9912ae6ad26927a54e40448c9fe | refs/heads/master | 2021-08-07T20:18:48.618563 | 2020-12-11T09:21:29 | 2020-12-11T09:21:29 | 229,712,514 | 0 | 0 | Apache-2.0 | 2019-12-23T08:44:49 | 2019-12-23T08:44:49 | null | UTF-8 | Python | false | false | 819 | py | config = {
"interfaces": {
"google.ads.googleads.v3.services.PaymentsAccountService": {
"retry_codes": {
"idempotent": [
"DEADLINE_EXCEEDED",
"UNAVAILABLE"
],
"non_idempotent": []
},
"retry_params": {
"default": {
"initial_retry_delay... | [
"noreply@github.com"
] | fiboknacky.noreply@github.com |
42a9e04d357f8dfd10ea4d2e207ef19b805c6971 | 5c1ec474c579ad1280a2f6f71aaa5a9191f82f32 | /src/transmittals/migrations/0007_auto_20151104_1002.py | 2269a555c4ec5b82a8167e84e1180d3b1bef7ddb | [
"MIT"
] | permissive | Talengi/phase | bcc51837e6131fd65308728aa79380c37305d1a7 | 60ff6f37778971ae356c5b2b20e0d174a8288bfe | refs/heads/master | 2022-12-09T15:42:14.459215 | 2021-06-28T08:12:21 | 2021-06-28T08:12:21 | 9,164,756 | 8 | 7 | NOASSERTION | 2022-12-08T01:18:49 | 2013-04-02T07:28:30 | Python | UTF-8 | Python | false | false | 713 | py | # -*- coding: utf-8 -*-
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('transmittals', '0006_auto_20151102_1511'),
]
operations = [
migrations.AlterModelOptions(
name='outgoingtransmittalrevision',
options={},
... | [
"thibault@miximum.fr"
] | thibault@miximum.fr |
bd2a0e28dded58ff6b977af4fc8276077205c093 | 4fa1a00bf3e3b6f7f5415a15ad93be6a702ff519 | /tests/unit/raptiformica/actions/spawn/test_start_compute_type.py | 8d5e8aba3d956e8e380dbc4ca35cb6f1c2f37dce | [
"MIT"
] | permissive | vdloo/raptiformica | 887a58f6842238c5fa62416b47439e9519e1e1bc | e2807e5e913312034161efcbd74525a4b15b37e7 | refs/heads/master | 2020-04-05T12:12:21.222189 | 2020-01-24T07:50:43 | 2020-01-24T07:59:44 | 64,013,772 | 21 | 2 | MIT | 2020-01-24T07:50:44 | 2016-07-23T11:45:47 | Python | UTF-8 | Python | false | false | 2,673 | py | from raptiformica.actions.spawn import start_compute_type
from tests.testcase import TestCase
class TestStartComputeType(TestCase):
def setUp(self):
self.retrieve_start_instance_config = self.set_up_patch(
'raptiformica.actions.spawn.retrieve_start_instance_config'
)
self.retri... | [
"rickvandeloo@gmail.com"
] | rickvandeloo@gmail.com |
9284ae9101f53194f31142295de5f7708c5fd96b | 462137348c3013fd1f389ae23557425d22497b36 | /24_days/Day 11/Question40.py | 6771623197488823cc33a9a153fa317d9179d323 | [] | no_license | wmemon/python_playground | f05b70c50c2889acd6353ba199fd725b75f48bb1 | 3b424388f92f81d82621645ee7fdbd4ac164da79 | refs/heads/master | 2022-11-23T05:09:30.828726 | 2020-07-28T12:47:03 | 2020-07-28T12:47:03 | 283,192,556 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 285 | py | """
Write a program which accepts a string as input to print "Yes" if the string is
"yes" or "YES" or "Yes", otherwise print "No".
"""
# My use case will have some extra yes combinations.
if input("Please enter the string : ").upper() == "YES":
print("Yes")
else:
print("No")
| [
"wmemon100@gmail.com"
] | wmemon100@gmail.com |
d0d9ff6dff0239125de02f38a5cfc05731bd0d5c | f0181afd2eea9b086ce9487fb8d7fd949282140a | /matplotlib graphs/plot_16S_coverage.py | 19851813b19604658bd9e26bcdee383ff0ad8950 | [
"MIT"
] | permissive | linsalrob/EdwardsLab | 4a571676859c8b7238e733a0d3ad98ceb2e83c63 | 3c466acc07f1a56b575860ad26c92f900b272a53 | refs/heads/master | 2023-08-20T17:13:35.466103 | 2023-08-17T09:17:36 | 2023-08-17T09:17:36 | 25,702,093 | 36 | 25 | MIT | 2020-09-23T12:44:44 | 2014-10-24T18:27:16 | Python | UTF-8 | Python | false | false | 1,303 | py | import matplotlib.pyplot as plt
import numpy
x = []
y = []
with open('/home/redwards/Desktop/genus_species_analysis/ecoli_coverage.tsv', 'r') as fin:
#with open('/home/redwards/Desktop/genus_species_analysis/pseudo_coverage.txt', 'r') as fin:
for l in fin:
p=l.strip().split("\t")
x.append(float(p[0]))
... | [
"raedwards@gmail.com"
] | raedwards@gmail.com |
b509123e763f848a534faef6ca7bf66fbac38cd5 | 49a259e069a8a5a930914dd338ecd8d80d58802c | /tests/settings.py | a49998d36d18c8bb6562037dab919dba8dfa5288 | [
"MIT"
] | permissive | furious-luke/django-test-without-migrations | 4d8e5e4abc32581ad3c891b4d5cdbd34344486ca | e8e01d23728480b1bb252ca9618d94ac50aa0acb | refs/heads/master | 2022-12-03T23:47:59.579641 | 2020-08-22T03:58:27 | 2020-08-22T03:58:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 384 | py | # coding: utf-8
ALLOWED_HOSTS = ['*']
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
INSTALLED_APPS = (
'tests.myapp',
'test_without_migrations',
)
SITE_ID=1,
SECRET_KEY='secret'
MIDDLEWARE_CLASSES = (
'django.middleware.common.Common... | [
"henrique@bastos.net"
] | henrique@bastos.net |
8fd0aad80716033de237a858d69f03d893286add | e51742f3b8026d6ae44761445689ac47f1f2e495 | /generate_total_res.py | 0e2aefc56b4f39192a95a2a5c0507475062570e0 | [] | no_license | igridchyn/neuro-analysis | a2979692ea6a2c99dc0991bc371125f0ec6edb5d | c0b1bb6abc9b34328aa515ce4a9098f3cbc9f05a | refs/heads/main | 2023-06-26T09:48:46.250806 | 2021-07-29T09:34:53 | 2021-07-29T09:34:53 | 390,671,932 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,948 | py | #!/usr/bin/env python
import os
from sys import argv
import struct
import numpy as np
if len(argv) < 3:
print 'USAGE: (1)<fet base> (2)<output file: total res>'
print 'GENERATE TOTAL RES FILE OUT OF THE SPIKE TIMESTAMPS IN THE FET FILES, NEEDS TETR CONFIG'
exit(0)
# read tetrode config - number of channels per te... | [
"igor.gridchin@gmail.com"
] | igor.gridchin@gmail.com |
9b89017fe47bd60ff1ff9a950185dd96ca98b877 | 35e86125620183b15854ecca27a369b3ac17bf90 | /src/libs/send_email.py | 841ea79cd95328f244f8ae7174b72adeaf78247a | [
"Apache-2.0"
] | permissive | chu888chu888/Yearning | 4dfaa59abb4ce75316f519a0f46860c1385510f9 | 6813ced9cb333261da0481b1fa19698d6fd413d1 | refs/heads/master | 2020-03-16T07:40:24.778042 | 2018-05-07T13:13:22 | 2018-05-07T13:13:22 | 132,580,877 | 1 | 0 | Apache-2.0 | 2018-05-08T08:48:32 | 2018-05-08T08:48:32 | null | UTF-8 | Python | false | false | 5,358 | py | from libs import util
from email.header import Header
from email.mime.text import MIMEText
from email.utils import parseaddr, formataddr
import smtplib
conf = util.conf_path()
from_addr = conf.mail_user
password = conf.mail_password
smtp_server = conf.smtp
smtp_port = conf.smtp_port
class send_email(object):
de... | [
"392183@qq.com"
] | 392183@qq.com |
cd06efa75d8d5a00ea430b8b91512719d32770f0 | bb6ebff7a7f6140903d37905c350954ff6599091 | /third_party/WebKit/Source/modules/modules.gyp | 54427584d19150459e863f0f92c412ac4be1d441 | [
"LGPL-2.0-or-later",
"GPL-1.0-or-later",
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | permissive | PDi-Communication-Systems-Inc/lollipop_external_chromium_org | faa6602bd6bfd9b9b6277ce3cd16df0bd26e7f2f | ccadf4e63dd34be157281f53fe213d09a8c66d2c | refs/heads/master | 2022-12-23T18:07:04.568931 | 2016-04-11T16:03:36 | 2016-04-11T16:03:36 | 53,677,925 | 0 | 1 | BSD-3-Clause | 2022-12-09T23:46:46 | 2016-03-11T15:49:07 | C++ | UTF-8 | Python | false | false | 6,397 | gyp | #
# Copyright (C) 2013 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and th... | [
"mrobbeloth@pdiarm.com"
] | mrobbeloth@pdiarm.com |
8f58b764cd10075c01b9acb32c25776d37936d9c | 6457989f738d52b8186628fa02c2243a569aaae9 | /golem/core/report.py | 1fbb265a59f0bc6251f03394b4f9bd8b724dc504 | [
"MIT"
] | permissive | matamehta/golem | 381941ff2d3e63bdffe81f8e52ff45f528ea7eb1 | 6314b31d8f0fb304a9f2d7dbcacf07d7ab3e01c6 | refs/heads/master | 2021-09-04T03:41:38.820326 | 2018-01-15T11:55:33 | 2018-01-15T11:55:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,073 | py | """Generate the report structure, json and screenshots"""
import json
import os
import uuid
def create_suite_execution_directory(workspace, project, suite_name, timestamp):
"""Create direcoty to store report for suite.
<workspace>/projects/<project>/reports/<suite_name>/<timestamp>/
"""
execution_dire... | [
"feo.luciano@gmail.com"
] | feo.luciano@gmail.com |
96a798e5581075e392ee35938448d26883a9f1f1 | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /m8cikaKtFFsCZgsbL_2.py | fc662b71d5d16a6bd08875a495babe80ebc5882b | [] | no_license | daniel-reich/turbo-robot | feda6c0523bb83ab8954b6d06302bfec5b16ebdf | a7a25c63097674c0a81675eed7e6b763785f1c41 | refs/heads/main | 2023-03-26T01:55:14.210264 | 2021-03-23T16:08:01 | 2021-03-23T16:08:01 | 350,773,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,241 | py | """
Given a set of 3 jugs of water that have capacities of _a_ , _b_ , and _c_
liters, find the minimum number of operations performed before each jug has
_x_ , _y_ , and _z_ liters. Only jug C will start completely filled.
An operation is any of the following: A jug is emptied, a jug is filled, or
water is poured ... | [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
0eee46f7d9008342f548f607d4c34cb4c7a6f240 | 17ef6c9ead83c2a2c18fe029ae3f6ba90d57b8f4 | /supervised_learning/0x02-tensorflow/7-evaluate.py | 1dbd2a4d21f495287ce86a4dbf4648887c3bcae0 | [] | no_license | shincap8/holbertonschool-machine_learning | ede0c2be6df44f91c125c4497cf5ac1b90f654fe | cfc519b3290a1b8ecd6dc94f70c5220538ee7aa0 | refs/heads/master | 2023-03-26T07:00:10.238239 | 2021-03-18T04:39:01 | 2021-03-18T04:39:01 | 279,436,819 | 0 | 3 | null | null | null | null | UTF-8 | Python | false | false | 742 | py | #!/usr/bin/env python3
"""evaluates the output of a neural network"""
import tensorflow as tf
def evaluate(X, Y, save_path):
"""evaluates the output of a neural network"""
with tf.Session() as sess:
saver = tf.train.import_meta_graph(save_path + ".meta")
saver.restore(sess, save_path)
... | [
"shincap8@gmail.com"
] | shincap8@gmail.com |
0c4e3ecfd3618f83151f657b725d8b650a772191 | c6d852e5842cf6f74123445d20ff03876377ae26 | /lemon/python22/lemon_10_190906_文件和异常/lemon_190906_练习.py | 84c1e3a5697fe35286db96156072cd549231c8a0 | [] | no_license | songyongzhuang/PythonCode_office | 0b3d35ca5d58bc305ae90fea8b1e8c7214619979 | cfadd3132c2c7c518c784589e0dab6510a662a6c | refs/heads/master | 2023-02-13T14:06:10.610935 | 2021-01-14T09:11:32 | 2021-01-14T09:11:32 | 327,183,429 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,853 | py | # --*-- coding : utf-8 --*--
# Project : python_lemon_作业
# Current file : lemon_190906.py
# Author : 大壮
# Create time : 2019-09-07 07:46
# IDE : PyCharm
# TODO 成长很苦,进步很甜,加油!
"""
# 导入模块,路径处理
import os
# 获取现在的文件夹路径
# 在哪里运行就打印运行的路径,在哪里运行的python, 就是获取这个文件夹
# 获取当前的工作目录,这种方式很少使用
# print(os.getcwd())
#... | [
"songyongzhuang9@163.com"
] | songyongzhuang9@163.com |
9f0c61d141e15d5bda4ae5c8a3d3a1dc93e46a3a | 9c6d3acf0843446c2c26a2cf701031946576482e | /pywhich | 3019c3d0b57b2ef7cf6ced55d48f4fa9b712df25 | [] | no_license | kumar303/toolbox | 5165c55358e108ca4370372ff564f2959b741f97 | 9ed0af6f11f15b248fc36f9d87c45a55b4178a84 | refs/heads/master | 2021-07-08T17:56:22.177215 | 2016-09-19T04:17:07 | 2016-09-19T04:17:07 | 6,014,625 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,791 | #!/usr/bin/env python
import sys
import subprocess
import os
import optparse
import inspect
from pprint import pprint
def print_path():
print "PYTHONPATH: %s" % os.getenv('PYTHONPATH', None)
pprint(sys.path)
def main():
"""prints __file__ for module w/ various options"""
p = optparse.OptionParser(
... | [
"kumar.mcmillan@gmail.com"
] | kumar.mcmillan@gmail.com | |
1ff0410d1fad86254f59a327b50ce3a9b6d0eb9a | 5532cef9f8f9aa5fc70967dae7bff6f854872333 | /네트워크.py | 3df35a38d3a28b44f803072f3c7c46dfb062ef60 | [] | no_license | shinhaeran/Algorithm | e279903a98b6fa70ac0ffefc106ea9476d05a71a | 63147d9a6b6057fe359899d1074ec3e3f55ffc68 | refs/heads/master | 2021-06-20T05:47:23.052542 | 2021-01-14T16:34:27 | 2021-01-14T16:34:27 | 164,627,627 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 522 | py | def solution(n, computers):
answer = 0
from collections import deque
q = deque()
visit = [False for _ in range(n)]
for j in range(n):
if visit[j] == False:
q.appendleft(j)
visit[j] = True
while q:
node = q.pop()
for i ... | [
"haeran97@naver.com"
] | haeran97@naver.com |
77f63e4b110f5ab90eee9fa693cb875e91c470d1 | c67bd5f97fb35b2a5df95cb431f48780cdcb4d55 | /functional_tests/management/commands/create_session.py | a59471cb1ebb651b794d7156434e65f45ebd9175 | [] | no_license | ibrobabs/tdd | 6cd2a2d0d6992938a24ccd800311b7531703728d | 368d521039bf3b70b81eab286f45ebe3eed313eb | refs/heads/master | 2021-08-22T08:50:10.116194 | 2017-11-29T20:12:03 | 2017-11-29T20:12:03 | 111,754,369 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 788 | py | from django.conf import settings
from django.contrib.auth import BACKEND_SESSION_KEY, SESSION_KEY, get_user_model
from django.contrib.sessions.backends.db import SessionStore
from django.core.management.base import BaseCommand
User = get_user_model()
class Command(BaseCommand):
def add_arguments(self, parser)... | [
"babskolawole@gmail.com"
] | babskolawole@gmail.com |
a4eed4214bc25f6e769da2017dbeee161ec01dc5 | 70450f0c551adf47b450468e424f4f90bebfb58d | /dataclasses/resources/test/test_linear_tree.py | 48f2e0e7be39bb6c93defc05bc95c21772df6453 | [
"MIT"
] | permissive | hschwane/offline_production | ebd878c5ac45221b0631a78d9e996dea3909bacb | e14a6493782f613b8bbe64217559765d5213dc1e | refs/heads/master | 2023-03-23T11:22:43.118222 | 2021-03-16T13:11:22 | 2021-03-16T13:11:22 | 280,381,714 | 0 | 0 | MIT | 2020-07-17T09:20:29 | 2020-07-17T09:20:29 | null | UTF-8 | Python | false | false | 3,145 | py | #!/usr/bin/env python
import sys, os
infiles = sys.argv[1:]
if len(infiles) == 0:
infiles = [os.path.expandvars('$I3_TESTDATA/dataclasses/9036_coinc.i3.bz2')]
import unittest, math
from icecube import icetray, dataio, dataclasses
from icecube.dataclasses import I3LinearizedMCTree, I3MCTree
class LinearTreeTest(uni... | [
"aolivas@umd.edu"
] | aolivas@umd.edu |
7da4176db0a193e31b87080155d1f1c5431f0cb0 | 673bf701a310f92f2de80b687600cfbe24612259 | /misoclib/com/liteeth/test/mac_core_tb.py | fe6451bd52e926d0514ca3b1c34b58697fdbc224 | [
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | mogorman/misoc | d78340a9bf67feaede20e8cac473bcfddbd186a3 | 4ec49e2aadcff0c3ca34ebd0d35013d88f4d3e1f | refs/heads/master | 2021-01-18T05:38:39.670977 | 2015-03-10T05:37:52 | 2015-03-10T05:37:52 | 30,672,191 | 1 | 0 | null | 2015-02-11T22:05:05 | 2015-02-11T22:05:05 | null | UTF-8 | Python | false | false | 2,217 | py | from migen.fhdl.std import *
from migen.bus import wishbone
from migen.bus.transactions import *
from migen.sim.generic import run_simulation
from misoclib.com.liteeth.common import *
from misoclib.com.liteeth.mac.core import LiteEthMACCore
from misoclib.com.liteeth.test.common import *
from misoclib.com.liteeth.test... | [
"florent@enjoy-digital.fr"
] | florent@enjoy-digital.fr |
d820de41a632d5b4955afd754238bc982d0cf9b1 | 288a00d2ab34cba6c389b8c2444455aee55a8a95 | /tests/expect-fail23/recipe-578426.py | 60637cc14c38e9c26bd1f1a842b644f93d3eea1e | [
"BSD-2-Clause"
] | permissive | JohannesBuchner/pystrict3 | ffd77b7bbc378bd4d8f21b5c6bd69a0d64a52ddb | 18b0dd369082422f9bf0f89c72e7acb53a49849c | refs/heads/master | 2023-08-14T06:37:37.954880 | 2023-07-13T11:16:38 | 2023-07-13T11:16:38 | 268,571,175 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,762 | py | # Logistic Map Fractal
# http://en.wikipedia.org/wiki/Logistic_map
# FB - 20130118
import random
import math
from PIL import Image, ImageDraw
imgx = 800; imgy = 800
image = Image.new("RGB", (imgx, imgy))
draw = ImageDraw.Draw(image)
pixels = image.load()
maxIt = 256
xa = -0.5; xb = 1.5
ya = -1.0; yb = 1.0
zEsc = 1000
r... | [
"johannes.buchner.acad@gmx.com"
] | johannes.buchner.acad@gmx.com |
1e34c89001d9c56791e2c92e76576ca73596f8a4 | 1e013dc5f0de0f61e27f2867557803a01c01f4da | /Language/python/python_source_analysis/10/1_if_control.py | d03c33afb41a9966807a16eef551686442994b67 | [] | no_license | chengyi818/kata | a2941ce8675c6e7a47169a0eae4c757d3f6f5bf9 | a7cb7ad499037bcc168aaa0eaba857b33c04ef14 | refs/heads/master | 2023-04-10T18:39:09.518433 | 2023-01-08T15:22:12 | 2023-01-08T15:22:12 | 53,040,540 | 1 | 0 | null | 2023-03-25T00:46:51 | 2016-03-03T10:06:58 | C++ | UTF-8 | Python | false | false | 167 | py | a = 1
if a > 10:
print("a > 10")
elif a <= -2:
print("a <= -2")
elif a != 1:
print("a != 1")
elif a == 1:
print("a == 1")
else:
print("unknown a")
| [
"chengyi818@foxmail.com"
] | chengyi818@foxmail.com |
98dfeb6a3b6a918f46e6f92af1d4b1d42784d49f | 8839bd1f2e35726b6c8066985690fa2fa86b09a6 | /3.pyWiFi-ESP32/1.基础实验/2.按键/main.py | 91baf700c6b37572d1b5dd3430a59b957bf8fbdf | [
"MIT"
] | permissive | elektrik-elektronik-muhendisligi/MicroPython-Examples-1 | a9532b06aba470f7f26f841929f4fb145549f70b | f7b08e95ff73e3417af21918c9c6bcf2f83281c6 | refs/heads/master | 2021-05-25T22:58:36.207098 | 2020-04-01T09:50:53 | 2020-04-01T09:50:53 | 253,956,073 | 1 | 0 | null | 2020-04-08T01:39:46 | 2020-04-08T01:39:45 | null | UTF-8 | Python | false | false | 615 | py | '''
实验名称:按键
版本:v1.0
日期:2019.8
作者:01Studio
说明:通过按键改变LED的亮灭状态
'''
from machine import Pin
import time
LED=Pin(2,Pin.OUT) #构建LED对象,开始熄灭
KEY=Pin(0,Pin.IN,Pin.PULL_UP) #构建KEY对象
state=0 #LED引脚状态
while True:
if KEY.value()==0: #按键被按下
time.sleep_ms(10) #消除抖动
if KEY.value()==0: #确认按键被按下
state... | [
"237827161@qq.com"
] | 237827161@qq.com |
b91a8a0d33e8b2ae6e9ad85643f0c5c3958d728b | a7bdecf855e98bd859ddd7275415b150b8fca2e3 | /OLDBOY/work/atm/atm/core/auth.py | ec5509375b03298c7092df6a2062cd78cfb13969 | [] | no_license | qgw258/python | dfa0cb21e4438f2e36d64d716753bf8ae45892b8 | 266d873dadd9bd60a42f43334cd92037d1aaf1cd | refs/heads/master | 2023-02-16T01:43:16.611105 | 2020-12-09T08:59:27 | 2020-12-09T08:59:27 | 281,035,465 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,054 | py | #!_*_coding:utf-8_*_
import os
from core import db_handler
from conf import settings
from core import logger
import json
import time
def login_required(func):
"验证用户是否登录"
def wrapper(*args,**kwargs):
#print('--wrapper--->',args,kwargs)
if args[0].get('is_authenticated'):
return f... | [
"admin@example.com"
] | admin@example.com |
e6f4170cfd5261d3f2545655d590490c7a07f63c | ca5de66d73dcf62b3d3f9014f4577ed3119054c5 | /ivy/debugger.py | a521676b0bc0dc0397a710ef815d44c612f3eea6 | [
"Apache-2.0"
] | permissive | MZSHAN/ivy | 172dea365e8a903d3548b786cbb0f10d4fd03406 | 02ac7e8ee2202563049116186fe6595313d65cc1 | refs/heads/master | 2023-08-20T19:02:57.389728 | 2021-10-23T12:34:54 | 2021-10-23T12:34:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,458 | py | # global
import ivy
import pdb
import logging
# local
from ivy.wrapper import _wrap_or_unwrap_methods, NON_WRAPPED_METHODS
queue_timeout = None
debug_mode_val = False
# Methods #
def _wrap_method_for_debugging(fn):
if hasattr(fn, '__name__') and (fn.__name__[0] == '_' or fn.__name__ in
... | [
"daniel.lenton11@imperial.ac.uk"
] | daniel.lenton11@imperial.ac.uk |
7f8ebaaad81f62f16eb72bd6727799abbb2751f5 | 387ad3775fad21d2d8ffa3c84683d9205b6e697d | /testsuite/trunk/epath/print_ep_001.py | 96f85a9378956c0aaaa711313dcef7b4fefbfba3 | [] | no_license | kodiyalashetty/test_iot | 916088ceecffc17d2b6a78d49f7ea0bbd0a6d0b7 | 0ae3c2ea6081778e1005c40a9a3f6d4404a08797 | refs/heads/master | 2020-03-22T11:53:21.204497 | 2018-03-09T01:43:41 | 2018-03-09T01:43:41 | 140,002,491 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 804 | py | #!/usr/bin/env python
"""
(C) Copyright IBM Corp. 2008
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This
file and program are licensed under a BSD style license. See
the Copy... | [
"suntrupth@a44bbd40-eb13-0410-a9b2-f80f2f72fa26"
] | suntrupth@a44bbd40-eb13-0410-a9b2-f80f2f72fa26 |
163dabeaddbcfe77c740efbd2d6099cfe3bdcd9b | 49c986c1a7351d51fd6654f09d4493fa8dffc6cd | /이코테/C13/20-2.py | c5c84ac371ceb22fa3466ee9728353ba24690976 | [] | no_license | beomseok-kang/Algorithms-Python | 53ca2cdbb718e2817eb0086662aea55cd3868559 | e06a015e3a8c909643e2fa60808d5157fbb7c3bd | refs/heads/master | 2022-12-24T04:42:04.586375 | 2020-10-03T09:09:23 | 2020-10-03T09:09:23 | 291,429,167 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,432 | py | from itertools import combinations
n = int(input())
board = []
teachers = []
spaces = []
for i in range(n):
board.append(list(input().split()))
for j in range(n):
if board[i][j] == 'T':
teachers. append((i, j))
if board[i][j] == 'X':
spaces.append((i, j))
def watch(x, y, direction):
if dire... | [
"beom.kang17@gmail.com"
] | beom.kang17@gmail.com |
0593f5c98010c322b4fbdaa70491c4256a7d8ec5 | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/helpers/typeshed/stdlib/@python2/cookielib.pyi | 0f813c128cc4c7423b35f34e65350c4f70f32d70 | [
"Apache-2.0",
"MIT"
] | permissive | JetBrains/intellij-community | 2ed226e200ecc17c037dcddd4a006de56cd43941 | 05dbd4575d01a213f3f4d69aa4968473f2536142 | refs/heads/master | 2023-09-03T17:06:37.560889 | 2023-09-03T11:51:00 | 2023-09-03T12:12:27 | 2,489,216 | 16,288 | 6,635 | Apache-2.0 | 2023-09-12T07:41:58 | 2011-09-30T13:33:05 | null | UTF-8 | Python | false | false | 4,664 | pyi | from typing import Any
class Cookie:
version: Any
name: Any
value: Any
port: Any
port_specified: Any
domain: Any
domain_specified: Any
domain_initial_dot: Any
path: Any
path_specified: Any
secure: Any
expires: Any
discard: Any
comment: Any
comment_url: Any
... | [
"intellij-monorepo-bot-no-reply@jetbrains.com"
] | intellij-monorepo-bot-no-reply@jetbrains.com |
b4fde5bc3bf9a74a38f4c7f5e40f5fea26c32763 | cf7025ff7d02604ea146775a35894733d8338593 | /home/helpers.py | 7fa9c814f5825f1c174536ddb898867f2fce9613 | [] | no_license | boxabhi/CodeKeen-starter | 7af6e13ec780df8a571e52d6cf10e16ac4717c3d | ac8be93494cf7013366ba7ad8cbd172d47feb466 | refs/heads/main | 2023-06-18T14:56:30.771286 | 2021-07-25T15:45:05 | 2021-07-25T15:45:05 | 382,294,773 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,109 | py |
from django.db.models.query import QuerySet
from django.db.models.query_utils import InvalidQuery
from faker import Faker
fake = Faker()
from .models import *
import random
import datetime
def generate_fake_data():
for i in range(0 , 20):
departments = Department.objects.all()
rand_index = random... | [
"abhijeetg40@gmail.com"
] | abhijeetg40@gmail.com |
1bd560ba36e7197c81e5416af55f1f2b5f61a34e | 7bc6445331289ea9143e2ba282599389a595386a | /Courses/Pytorch Udacity/intro-to-pytorch/helper.py | 1711e4ad5631d7135b42fb6451d2ebbb0391fd5e | [
"MIT"
] | permissive | develooper1994/DeepLearningCaseStudies | b90ef1290a93876e2eb54b49e5d5ecdd12baab54 | 3bed182790031278bb2721dfe4986e462a2d5d50 | refs/heads/master | 2020-09-25T04:56:26.952956 | 2020-05-03T12:57:46 | 2020-05-03T12:57:46 | 260,541,706 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,874 | py | import matplotlib.pyplot as plt
import numpy as np
from torch import nn, optim
from torch.autograd import Variable
def test_network(net, trainloader):
criterion = nn.MSELoss()
optimizer = optim.Adam(net.parameters(), lr=0.001)
dataiter = iter(trainloader)
images, labels = dataiter.next()
# Creat... | [
"selcukcaglar08@gmail.com"
] | selcukcaglar08@gmail.com |
bd2c19adf442436f6af1e0a7f27a4f0468336b25 | 838fb9231a67c45cef7dfdb326a5d2db9310156c | /Unconstrained_Firstorder_Optimization/homebrew_hybrid2.py | 5819cacb2c5e3f4890b7e4219d5072de7726e7ba | [] | no_license | iluvjava/Serious-Python-Stuff | 24427f44ded0978753f163b8277858dfa2a27caa | 7ad7af07786392764f36ae5d90ad15252b3c5bdc | refs/heads/main | 2023-06-27T19:27:41.132046 | 2021-08-03T07:06:00 | 2021-08-03T07:06:00 | 377,302,076 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,996 | py | """
First order optimizer.
Use finite diff to approximate Hessian.
Use both newton's or accelerated gradient, which ever is better.
When gradient is small, it start to random sample using local hessian and the sequence of descned parameters.
"""
import numpy as np
import matplotlib.pyplot as plt
clas... | [
"victor1301166040@gmail.com"
] | victor1301166040@gmail.com |
59a4d22d545818b6ef46572e11400d0ca3ae0d7a | 8ae0b37c3913fb344c1c2bb161b0a8b346e2f298 | /leetcode/Q050_PowxN.py | 43d1f256bf2f74a808eba5e999b8e7b759dffdf3 | [] | no_license | jiaz/leetpy | 76330a0e4f234bface88b3a6a5476cd24d7776ea | 94e8b0c2ebbf593dbca1b253e08c588f27679bd3 | refs/heads/master | 2021-01-10T09:07:45.549361 | 2015-11-26T06:44:50 | 2015-11-26T06:44:50 | 46,908,974 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 256 | py | # -*- coding: utf-8 -*-
# Implement pow(x, n).
#
#
# Link:
# https://leetcode.com/problems/powx-n/
class Solution(object):
def myPow(self, x, n):
"""
:type x: float
:type n: int
:rtype: float
"""
| [
"jiaji.zh@gmail.com"
] | jiaji.zh@gmail.com |
047d4665fd17ef65ab70bc153876d7438b1b2609 | 1e4d75d2a7267cb4d01d39ea7c6367bfd5c51842 | /coupons/models.py | 01e2ae251d4069e19e1a7e8a770b27ecbf44ac4b | [] | no_license | Grayw0lf/my-shop | 9340e6cc47b1c77ff143d278013c46780767ae4a | ad1ea4d9db27196f263656bb01d52562678f9247 | refs/heads/master | 2022-11-27T23:00:44.726712 | 2020-03-17T18:09:43 | 2020-03-17T18:09:43 | 248,040,250 | 1 | 0 | null | 2022-11-22T04:40:09 | 2020-03-17T18:08:23 | Python | UTF-8 | Python | false | false | 490 | py | from django.db import models
from django.core.validators import MaxValueValidator, MinValueValidator
class Coupon(models.Model):
code = models.CharField(max_length=50, unique=True)
valid_from = models.DateTimeField()
valid_to = models.DateTimeField()
discount = models.IntegerField(validators=[MinValue... | [
"akosheev@rambler.ru"
] | akosheev@rambler.ru |
25565d51e4f038b1cf663fa91e9c5da4d5b876f6 | 93a9c36e85bd753608516efe581edf96bbdc3580 | /posts/views.py | 5bcfd7c020267c9572588e30dc58d7af29001b1c | [] | no_license | zhouf1234/django_obj | bef6a13fc3d183070725fcb937da7a0c4a688e1c | bb10edc03dfdbe692b6293ffc3e1d33a374604cf | refs/heads/master | 2020-05-05T03:05:24.838804 | 2019-04-05T10:18:27 | 2019-04-05T10:18:27 | 179,660,674 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,380 | py | from django.shortcuts import render
import json
from django.http import HttpResponse
from django.http import JsonResponse
from school.models import Schools
from .models import Posts,Tag
# Create your views here.
#文章列表展示
def postsList(request):
posts = Posts.objects.filter(is_status=1)
context ={'posts':posts}
... | [
"="
] | = |
8f59c92b70f4ae93805a85a751b28ec73ab940d0 | 2662c2c0a86b9f39c3122209c65015e7ca08ab38 | /tests/conftest.py | b4483890e7c1ce981501a76c90a6674f637bee0c | [
"MIT"
] | permissive | hyanwong/pyslim | c5eb0c2689e36147f2612619bb6ee8e6d57d5d63 | 7203b743e30e330729a73fa9b23f971565095202 | refs/heads/main | 2023-03-09T13:15:55.706829 | 2021-01-09T23:07:38 | 2021-01-09T23:07:38 | 328,613,475 | 0 | 0 | MIT | 2021-01-11T09:34:19 | 2021-01-11T09:34:19 | null | UTF-8 | Python | false | false | 1,129 | py | """
To make pytest run this setup/teardown code it needs to go here, I guess.
"""
import os
import random
import pytest
from . import example_files, run_slim_script
@pytest.fixture(scope="session", autouse=True)
def setup_slim_examples():
# Make random tests reproducible.
random.seed(210)
# run SLiM
... | [
"petrel.harp@gmail.com"
] | petrel.harp@gmail.com |
03498f89afc9c95c9b12379518efabdc209319a9 | 88853b9b6c3ae0c12cbd5bf83be3d48f2fe0159e | /document/eggs_package/deploy_egg/gflux/gcustomer/apps/gcustomer/management/commands/import_storegood_from_fact_trans.py | 69879f4b28f979e6da7060d719b398bad071e016 | [] | no_license | laoyin/nyf | 9151da3368c2e636501bcf1ad52f895fe446c04b | a2b12f54827b6088548f060881b6dafa2d791a3a | refs/heads/master | 2021-01-17T17:11:14.174968 | 2015-09-28T01:12:28 | 2015-09-28T01:12:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,073 | py | # coding=utf-8
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
from django.core.management.base import BaseCommand
import logging,pdb
from django.conf import settings
import django_gearman_commands
from gcustomer.utils import get_none_fuel_last_10,get_none_fuel_top_10
from gcustomer.models import *
from gflux.a... | [
"niyoufa@tmlsystem.com"
] | niyoufa@tmlsystem.com |
78619c22c68d4e82f0a99d87ab8cc9d424abcb15 | a59231cdf10a83b9f7a6a670fff24f52cb3b4642 | /Cisco/Stack/valid-parentheses.py | 590b6cc012117668689d5a75acacdd810628e05a | [] | no_license | jadenpadua/ICPC | afae2b3e7c4eb2a5c841bfbadb6c6c8c06599f40 | 6f4edeb36391c4afdde9f8f15e39a25895183f95 | refs/heads/master | 2020-09-12T06:17:12.508460 | 2020-09-11T23:05:11 | 2020-09-11T23:05:11 | 222,338,314 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 525 | py | class Solution:
def isValid(self, s: str) -> bool:
stack = []
ht = {"(":")", "{":"}", "[":"]"}
opening = "({["
closing = ")}]"
for i in range(len(s)):
if len(stack) == 0 and s[i] in closing:
return False
if s[i] in opening:
... | [
"noreply@github.com"
] | jadenpadua.noreply@github.com |
d58c0ca64546bc18a40bb3065a14fa7fbe7e8b5a | a140fe192fd643ce556fa34bf2f84ddbdb97f091 | /.history/전달값과 반환값_20200705101852.py | 70e2e8a10f17f79a0b03c2e4146b4f82eb3b267b | [] | no_license | sangha0719/py-practice | 826f13cb422ef43992a69f822b9f04c2cb6d4815 | 6d71ce64bf91cc3bccee81378577d84ba9d9c121 | refs/heads/master | 2023-03-13T04:40:55.883279 | 2021-02-25T12:02:04 | 2021-02-25T12:02:04 | 342,230,484 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 934 | py | def open_account():
print("새로운 계좌가 개설되었습니다.")
def deposit(balance, money): # 입금
print("입금이 완료되었습니다. 잔액은 {0} 원입니다.".format(balance + money))
return balance + money
def withdraw(balance, money) # 출금
if balance >= money: # 잔액이 출금보다 많으면
print("출금이 완료되었습니다. 잔액은 {0} 원입니다.".format(balance - money... | [
"sangha0719@gmail.com"
] | sangha0719@gmail.com |
17a9b272ce5a0cbf942565037edd27b5f0b68a1a | 1a937b899af949d23e667782a7360b9de1634456 | /SoftUni/Data Structure Efficiency/performance_test/test.py | 9a3578888c79683efd31e74e5cf7b83efcdbe079 | [] | no_license | stanislavkozlovski/data_structures_feb_2016 | c498df6ea7cb65d135057a300e0d7e6106713722 | adedac3349df249fe056bc10c11b0b51c49e24bb | refs/heads/master | 2021-07-06T17:37:18.117104 | 2017-09-30T19:01:51 | 2017-09-30T19:01:51 | 75,526,414 | 2 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,213 | py | from datetime import datetime
import sys
from performance_test.asizeof import asizeof
from performance_test.ordered_set import OrderedSet
from sortedcontainers import SortedSet
test_count = 10000
# test with different elements, add, remove and search
sset_start = datetime.now()
sset = SortedSet()
for i in range(tes... | [
"familyguyuser192@windowslive.com"
] | familyguyuser192@windowslive.com |
9409552114456334acb3fd1ddb037067682e418e | 4bc6028ed8ba403b69adfd6f5cbd139baece0f4d | /basic_python/machine_learn/chapter01/matrix4.py | 90101f10603b9a8a7c333433b5071cd1b50eab3e | [] | no_license | xrw560/learn-pyspark | 0ef9ed427ff887ceed1c5e5773bf97ed25ecae04 | 618d16dafd73165e714111670119d9cdecc0bf1f | refs/heads/master | 2020-03-07T00:12:36.885000 | 2019-01-04T09:51:32 | 2019-01-04T09:51:32 | 127,152,051 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 794 | py | # -*- coding: utf-8 -*-
"""
矩阵的其他操作:行列数、切片、复制、比较
"""
import sys
import os
import time
from numpy import *
# 配置utf-8输出环境
reload(sys)
sys.setdefaultencoding('utf-8')
mymatrix = mat([[1, 2, 3], [4, 5, 6], [7, 8, 9]])
[m, n] = shape(mymatrix) # 矩阵的行列数
print "矩阵的行数和列数:", m, n
myscl1 = mymatrix[0] # 按行切片
print "按行切片:", ... | [
"ncutits@163.com"
] | ncutits@163.com |
63b8b3f1473b600a71483e331bf765e189922e38 | e89309b66ac7950508aba78247d0776435b7e0f2 | /py/services/revenue/main.py | daa3d1708e8e259ecf8d44d0ffd2f3adb677d8c4 | [] | no_license | adalekin/otusdemo | 2bdcab1191d4985b0da0c5d15f0a2d96149cbc65 | 60b4dbb664c3fe7c2068b9c8691ce99b7c0d1780 | refs/heads/master | 2023-08-05T08:38:17.359421 | 2021-09-15T16:53:51 | 2021-09-15T16:53:51 | 406,182,186 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,672 | py | import asyncio
import json
import aiohealthcheck
import httpx
from aiokafka import AIOKafkaConsumer
from aiorun import run
from schemas.event import EventFired
from revenue import settings
def _deserializer(serialized):
return json.loads(serialized)
async def _get_account_id_by_user_id(client, user_id):
r... | [
"adalekin@gmail.com"
] | adalekin@gmail.com |
ec02f3e0d3f6a1a74fb152b750896a3e5fba551a | cd57ad36685cc188ea42219bd220905e23e61f4c | /chatterbot/response_selection.py | ebb3d6af924aaab68598657be7b7ba02d7607020 | [
"BSD-3-Clause"
] | permissive | gitCommitWiL/ChatterBot | fa404848c7eb8f8ffb07c80c7d3ec47aeb2fe177 | 4f2275ec8a6e3546c4251db9e9938f7b3fd29e68 | refs/heads/master | 2021-04-22T14:52:18.175648 | 2020-03-26T11:22:16 | 2020-03-26T11:22:16 | 249,854,439 | 2 | 0 | BSD-3-Clause | 2020-03-25T01:02:46 | 2020-03-25T01:02:46 | null | UTF-8 | Python | false | false | 2,950 | py | """
Response selection methods determines which response should be used in
the event that multiple responses are generated within a logic adapter.
"""
import logging
def get_most_frequent_response(input_statement, response_list, storage=None):
"""
:param input_statement: A statement, that closely matches an i... | [
"gunthercx@gmail.com"
] | gunthercx@gmail.com |
e303cf1201005115382e02b5679d71751de79e53 | 578db86c51d44ebddd0dc7b1738985b3dc69eb74 | /corehq/form_processor/migrations/0067_auto_20170915_1506.py | 3adde484546ee34e02e1d427359da4231da3bb15 | [
"BSD-3-Clause"
] | permissive | dimagi/commcare-hq | a43c7dd32b5f89c89fd5aa1b1359ab7301f4ff6b | e7391ddae1af1dbf118211ecb52c83fc508aa656 | refs/heads/master | 2023-08-16T22:38:27.853437 | 2023-08-16T19:07:19 | 2023-08-16T19:07:19 | 247,278 | 499 | 203 | BSD-3-Clause | 2023-09-14T19:03:24 | 2009-07-09T17:00:07 | Python | UTF-8 | Python | false | false | 458 | py | # Generated by Django 1.10.7 on 2017-09-15 15:06
from django.db import migrations
from corehq.util.django_migrations import AlterUniqueTogetherIfNotExists
class Migration(migrations.Migration):
dependencies = [
('form_processor', '0066_auto_20170818_2020'),
]
operations = [
AlterUnique... | [
"skelly@dimagi.com"
] | skelly@dimagi.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.