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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2dcd6f7f2a1f98bb39c8596f4e950498c9765ccd | 1fc234b59d2b0e1c49fcef5884a8136eb56ac04e | /discrete_probability/PDF.py | ed207d39b5c411a9c31f0e44b615759095c8b22c | [] | no_license | SrMouraSilva/RBMPedalboardBackup | 9a292460c7a0a3811e259ed3aa758ffbe204ab73 | 16438b942a965409a8c86c04e64c71f883b30ccf | refs/heads/master | 2020-04-03T00:25:13.165155 | 2018-10-26T21:51:48 | 2018-10-26T21:51:48 | 154,898,354 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 756 | py | import pandas as pd
from typing import List, Tuple
class PDF(object):
def __init__(self, experiment: pd.DataFrame):
self.experiment = experiment
def __call__(self, variables: List[str]):
pass
def given(self, variables: List[str]) -> 'ConditionalProbability':
return ConditionalPr... | [
"mateus.moura@hotmail.com"
] | mateus.moura@hotmail.com |
4a2f33e9c7714b45151c27e76348439b97ab0ee6 | e77a3618d0afe63a2f00d87b61c3f19d3eba10d8 | /plugins/beebeeto/poc_2014_0221.py | fa9e3d4a6263af231383358eac672a3a12741e48 | [] | no_license | Explorer1092/coco | b54e88a527b29209de7c636833ac5d102514291b | 15c5aba0972ac68dc4c874ddacf5986af5ac2a64 | refs/heads/master | 2020-05-31T07:03:19.277209 | 2019-01-29T14:36:45 | 2019-01-29T14:36:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,058 | py | #!/usr/bin/env python
# coding=utf-8
"""
Site: http://www.beebeeto.com/
Framework: https://github.com/n0tr00t/Beebeeto-framework
"""
import re
import urllib
import urllib2
from time import time
from baseframe import BaseFrame
class MyPoc(BaseFrame):
poc_info = {
# poc相关信息
'poc': {
'i... | [
"834430486@qq.com"
] | 834430486@qq.com |
2dcd570258938d11c114742776270d2967aa0ff3 | 2fd087fbc5faf43940153693823969df6c8ec665 | /pyc_decrypted/latest/dbus/_dbus.py | 0ba1f777f9f8cd555e63eb655b27250266421ba5 | [] | no_license | mickeystone/DropBoxLibrarySRC | ed132bbffda7f47df172056845e5f8f6c07fb5de | 2e4a151caa88b48653f31a22cb207fff851b75f8 | refs/heads/master | 2021-05-27T05:02:30.255399 | 2013-08-27T13:16:55 | 2013-08-27T13:16:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,739 | py | #Embedded file name: dbus/_dbus.py
from __future__ import generators
__all__ = ('Bus', 'SystemBus', 'SessionBus', 'StarterBus')
__docformat__ = 'reStructuredText'
import os
import sys
import weakref
from traceback import print_exc
from dbus.exceptions import DBusException
from _dbus_bindings import BUS_DAEMON_NAME, BUS... | [
"bizonix@me.com"
] | bizonix@me.com |
eae1d5aa871c197f2e4c2314be6a3595cea2021e | d3feeb1f109d4a0d8d5d78bc36f0a92a9daba62e | /apps/organization/migrations/0001_initial.py | 2ae98e4bdde8e2aa97d6ceb86fcfcf74458caac7 | [] | no_license | yhgnice/vbtools | fa93750b6239704d6274326a50c65db7ca202ad4 | 33d67c2a9c89faeaf5688a79680af6fc31555ff7 | refs/heads/master | 2021-01-21T11:15:46.230560 | 2017-03-01T10:18:49 | 2017-03-01T10:18:49 | 83,540,741 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,603 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.8 on 2017-02-14 15:10
from __future__ import unicode_literals
import datetime
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
... | [
"123"
] | 123 |
aa9b04df156993dc5bb435472b42859dfae95690 | 9e988c0dfbea15cd23a3de860cb0c88c3dcdbd97 | /sdBs/AllRun/sc_1717-364/sdB_sc_1717-364_coadd.py | 491849876ccdc3f9dc2eaa7e1310236b158e424d | [] | no_license | tboudreaux/SummerSTScICode | 73b2e5839b10c0bf733808f4316d34be91c5a3bd | 4dd1ffbb09e0a599257d21872f9d62b5420028b0 | refs/heads/master | 2021-01-20T18:07:44.723496 | 2016-08-08T16:49:53 | 2016-08-08T16:49:53 | 65,221,159 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 431 | py | from gPhoton.gMap import gMap
def main():
gMap(band="NUV", skypos=[260.238292,-36.497778], skyrange=[0.0333333333333,0.0333333333333], stepsz = 30., cntfile="/data2/fleming/GPHOTON_OUTPUT/LIGHTCURVES/sdBs/sdB_sc_1717-364/sdB_sc_1717-364_movie_count.fits", cntcoaddfile="/data2/fleming/GPHOTON_OUTPUT/LIGHTCURVES/sdB/sd... | [
"thomas@boudreauxmail.com"
] | thomas@boudreauxmail.com |
de11a72a4bf1877037b75859b5e37148a9c335c4 | 8fcc27160f8700be46296568260fa0017a0b3004 | /client/unittest/test/test_runner.py | 11a734aea40efcb5ca625872f999c1ff368cef69 | [] | no_license | connoryang/dec-eve-serenity | 5d867f4eedfa896a4ef60f92556356cafd632c96 | b670aec7c8b4514fc47cd52e186d7ccf3aabb69e | refs/heads/master | 2021-01-22T06:33:16.303760 | 2016-03-16T15:15:32 | 2016-03-16T15:15:32 | 56,389,750 | 1 | 0 | null | 2016-04-16T15:05:24 | 2016-04-16T15:05:24 | null | UTF-8 | Python | false | false | 7,971 | py | #Embedded file name: e:\jenkins\workspace\client_SERENITY\branches\release\SERENITY\carbon\common\stdlib\unittest\test\test_runner.py
import unittest
from cStringIO import StringIO
import pickle
from .support import LoggingResult, ResultWithNoStartTestRunStopTestRun
class TestCleanUp(unittest.TestCase):
d... | [
"masaho.shiro@gmail.com"
] | masaho.shiro@gmail.com |
ee3e365f9cb19991b8c30e535b0e2e0d8175ea01 | c87a4c8c40ba0711f57ba49461c84daf5707ca9b | /wscript | 79900d156591cbe0812a7379e08644b57187800d | [] | no_license | wwwqqqlll/fully-dynamic-betweenness-centrality | fdecc09b0e07eae1ab3cfeed21d86ec7bc673f3b | 0bb6422f704ad43e1a3d7a37a4b9b83df8f46689 | refs/heads/master | 2023-03-17T23:13:55.895071 | 2017-09-14T19:35:25 | 2017-09-14T19:35:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 551 | #! /usr/bin/env python3
APPNAME= 'fully_dynamic_betweenness_centrality'
VERSION= '0.0.1'
top = '.'
out = 'bin'
def options(opt):
opt.tool_options('compiler_cxx')
opt.tool_options('waf_unit_test')
def configure(conf):
conf.load('compiler_cxx')
conf.check_tool('compiler_cxx')
conf.env.append_v... | [
"flowlight0@gmail.com"
] | flowlight0@gmail.com | |
0ac08c89716350174f18a687e1846eb2ed6ee541 | c8d3d66f7ae240f76c7ee95300939b32c6330352 | /python/grblio/tcpport.py | 2d35364e924728cc42407684e4642eb3db1b5a08 | [] | no_license | cnvogelg/cvmill | 6e07c1eaf86696e5cfd7056ff3a922757dd55ff3 | f97639491943aa98348118ccff5970f1ca170bde | refs/heads/master | 2021-01-10T21:45:48.169826 | 2015-10-17T18:04:03 | 2015-10-17T18:04:03 | 33,114,393 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,106 | py | #!/usr/bin/env python3
import socket
import select
import port
class TcpPort(port.Port):
"""connect the Grbl host via a socat TCP pipe"""
def __init__(self, hostname, hostport=5000, eol="\r\n"):
port.Port.__init__(self, eol)
self.hostname = hostname
self.hostport = hostport
def open(self):
se... | [
"C.Vogelgsang@web.de"
] | C.Vogelgsang@web.de |
8a6f631e2e4a617c4bacc375bbcf0557a3e756ef | eb0711915d6bba2f765f052736e33ac9a9a397a6 | /HE1104/w_model_rms/glee_samp_1.0/samp57/glee_chain.py | aca54bcef4b6f487dfab6002bb9e7c866fddc7d5 | [] | no_license | dartoon/GL_HostGalaxy | cd2166f273ae7e0397a7d2d39f760ab59e86f014 | 7469f1c1e640d176a75cc6e9497920e494ad656a | refs/heads/master | 2016-08-11T13:27:17.545360 | 2016-04-07T19:04:57 | 2016-04-07T19:04:57 | 46,524,027 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 387 | py | import numpy,subprocess
file1 = open('HE57.001.mcmc','r') #should changed with right name
para = numpy.loadtxt(file1)[-30:,0]
file1.close()
i=int(para[0])
#subprocess.call(["echo int(para[0])"],shell=True)
#subprocess.call(["glee -S ${i} HE57.001.001"],shell=True)
#print para.shape
#print para.astype(int)
g=open('... | [
"dingxuheng@mail.bnu.edu.cn"
] | dingxuheng@mail.bnu.edu.cn |
d0fe6e65861aad377033952b65f21df9a02bbe7a | 0fbc5cf8f4903e9e72d7a448a31bfbfe2f54821b | /Chapter12/12.8.py | 8c77f6075216e8a8a7b8dcdbf3fe11f0b3d4723d | [
"MIT"
] | permissive | PacktPublishing/Python-Robotics-Projects | a3a90e6698b0e486a5547ffb6211415c4a0e4f5a | 17221304cb3e15e486af855b442927f64fdcc738 | refs/heads/master | 2023-02-08T16:27:55.723634 | 2023-01-30T09:35:39 | 2023-01-30T09:35:39 | 134,238,783 | 24 | 16 | null | null | null | null | UTF-8 | Python | false | false | 747 | py | import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
S0 = 21
S1 = 22
S2 = 23
S3 = 24
GPIO.setup(S0,GPIO.OUT)
GPIO.setup(S1,GPIO.OUT)
GPIO.setup(S2,GPIO.OUT)
While True:
GPIO.output(S0,1)
GPIO.output(S1,0)
GPIO.output(S2,1)
GPIO.output(S4,1)
time.sleep(1)
GP... | [
"komalk@packtpub.com"
] | komalk@packtpub.com |
16d61e2dc2d30b2062edf9bf30d6c7d4a5763fb5 | 479696ed99f10e449308bf3379e8b3d167365ebe | /spa/forms.py | 04250e8ee2663c3fd252d14b6c8219b9ea99f35f | [
"BSD-2-Clause"
] | permissive | fergalmoran/dss | 7c690ba0b858c3d7d115af54655954ecee64407e | 684fb4030e33212c3ecde774ca86cb74a1ffc8ac | refs/heads/master | 2021-07-06T02:46:49.064282 | 2015-01-04T22:19:31 | 2015-01-04T22:19:31 | 5,353,985 | 0 | 0 | BSD-2-Clause | 2021-06-10T17:35:38 | 2012-08-09T10:03:17 | JavaScript | UTF-8 | Python | false | false | 2,139 | py | from django import forms
from django.contrib.auth.models import User
from django.forms.models import ModelForm
from spa.models.userprofile import UserProfile
class UserForm(ModelForm):
avatar_image_select = forms.ChoiceField(
choices=(
('gravatar', "Use gravatar image."),
('social'... | [
"fergal.moran@gmail.com"
] | fergal.moran@gmail.com |
ca7bd8dbfa94556f4e6d86d74e718738f11b078c | a507b5f72182d0f46f967d8c6816b4b816341b60 | /python/WorksharingSession.UsesCentralModel.py | 89976d13c9874f3170bcee040165a38b6cecfcec | [
"MIT"
] | permissive | BIMpraxis/Journalysis | c00d167a783b636fcf8104738bf84ef36578a1c7 | af0c042b28d01ba5e44dafc2bbe9556434e897b8 | refs/heads/master | 2020-04-18T20:37:44.456123 | 2019-01-26T22:01:22 | 2019-01-26T22:01:22 | 167,742,529 | 0 | 0 | MIT | 2019-01-26T21:46:42 | 2019-01-26T21:46:42 | null | UTF-8 | Python | false | false | 324 | py | import clr
def process_input(func, input):
if isinstance(input, list): return [func(x) for x in input]
else: return func(input)
def WSSessionUsesCentralModel(wssess):
if wssess.__repr__() == 'WorksharingSession': return wssess.UsesCentralModel()
else: return None
OUT = process_input(WSSessionUsesCentralModel,IN... | [
"dieckmann@caad.arch.rwth-aachen.de"
] | dieckmann@caad.arch.rwth-aachen.de |
2f82f686a54d9e5d0f155c31f1dbc15af4e2c8f9 | 5f34e0e59954c0e8991eb8cfb1d58c0cefcf4c68 | /script/Mapper1.py | 0869f0bed1375b84a0b2b4093a4ea18b130c3356 | [] | no_license | ChenddatHKU/PAlib240 | cd31ca5e8e3b5796721cb77d7bc3861a78e1a358 | c38048900b10fe755a70a13f9cd18585d75922e4 | refs/heads/master | 2022-12-10T21:51:57.974611 | 2016-07-07T06:27:49 | 2016-07-07T06:27:49 | 293,680,127 | 0 | 0 | null | 2020-09-08T02:28:09 | 2020-09-08T02:28:09 | null | UTF-8 | Python | false | false | 4,233 | py | #!/usr/bin/python
import os
import sys
import glob
import string
import operator
from string import atof
from itertools import imap
from Bio import SeqIO
def rc(seq):
complements = string.maketrans('acgtrymkbdhvACGTRYMKBDHV', 'tgcayrkmvhdbTGCAYRKMVHDB')
rcseq = seq.translate(complements)[::-1]
return rcseq
def... | [
"wchnicholas@Nicholass-MacBook-Pro.local"
] | wchnicholas@Nicholass-MacBook-Pro.local |
864c00875017a868edaf771c62696c1523eb9c33 | c61798997614f4430a6a56b16e8d17fe75fb2f9c | /Yurii_Khomych/l_12_networking/http/example4_requests.py | bbbd1aeb087ff1dcf127b910a31d9a11e7c46132 | [] | no_license | YuriiKhomych/ITEA_AC | ad944bbe74be88f306a45f38efa70765c5286162 | f9eb147da1135a978929ae370d9c9fcd8dc59d21 | refs/heads/master | 2022-12-18T14:55:56.162451 | 2020-05-03T12:45:02 | 2020-05-03T12:45:02 | 234,373,863 | 0 | 9 | null | 2022-12-08T03:46:33 | 2020-01-16T17:26:50 | Python | UTF-8 | Python | false | false | 295 | py | import requests
# pip install requests
response1 = requests.get("http://localhost:8888")
response2 = requests.put("http://localhost:8888")
response3 = requests.post("http://localhost:8888")
response4 = requests.delete("http://localhost:8888")
response5 = requests.head("http://localhost:8888")
| [
"yuriykhomich@gmail.com"
] | yuriykhomich@gmail.com |
c930dbb97f7c177dc265d89c15a148b09c9a5b7a | 5c62ad2ab20bf950567ede70b7fe40b538b68168 | /Capitulos/Secao_16/atributos.py | 20ed20d46cdaae09233ff93d43fddf4eb43988cd | [] | no_license | Andremarcucci98/Python_udemy_geek_university | 0e9c8f2ff007e3095574d3964f45f5991dbe3437 | 1c487262f85542a82ceb5f222af675b8a00136f1 | refs/heads/master | 2023-03-30T20:18:43.022405 | 2021-04-01T15:41:22 | 2021-04-01T15:41:22 | 353,747,518 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,413 | py | """
POO - Atributos
Atributos -> Representam as características do objeto, ou seja, pelos atributos nós conseguimos representar
computacionalmente os estados de um objeto.
Em Python, dividimos os atributos em tres grupos:
- Atributos de instância;
- Atributos de classe;
- Atributos Dinâmicos;
# Atributo ... | [
"marcuccimaciel.andre@gmail.com"
] | marcuccimaciel.andre@gmail.com |
929d1f1387585f01edaaa96587f151f481d5cb44 | b0856a2d66cc4c71705b8c16c169848070294cf6 | /Summary Ranges.py | ac541772efa8a7aabf421c8fd4beab2846344137 | [] | no_license | jfriend08/LeetCode | 9e378ff015edc3102a4785b0832cf0eeb09f5fc2 | f76d3cf2e7fd91767f80bd60eed080a7bad06e62 | refs/heads/master | 2021-01-21T19:28:25.354537 | 2016-01-15T04:53:11 | 2016-01-15T04:53:11 | 28,518,328 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,100 | py | """
Given a sorted integer array without duplicates, return the summary of its ranges.
For example, given [0,1,2,4,5,7], return ["0->2","4->5","7"].
Credits:
Special thanks to @jianchao.li.fighter for adding this problem and creating all test cases.
"""
class Solution(object):
def summaryRanges(self, nums):
... | [
"ys486@cornell.edu"
] | ys486@cornell.edu |
ff13fbb8d07d76da28b56a59006d1440f8e4a641 | b0f327f70fad635664fd13b17414b5fea61b73f6 | /flask-tutorial/hello_tests/http_methods.py | 3ccf6610a020730c2d38e917c39920e6c9f7cd8a | [] | no_license | chelseyrandolph/flask-web | 7b70953f8d76840c33f6e30fa05072b5459ee8d2 | 1ed5b51ef18b898eb540ceaf4c6fb37ad227c904 | refs/heads/master | 2020-12-06T11:33:56.184928 | 2020-01-09T21:50:50 | 2020-01-09T21:50:50 | 232,452,995 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 333 | py | from flask import request, Flask
app = Flask(__name__)
@app.route('/login', methods=['GET', 'POST'])
def do_the_login():
return 'Logging in'
def show_the_login_form():
return 'Username:\nPassword:'
def login():
if request.method == 'POST':
return do_the_login()
else:
return show_the... | [
"chelseyrrandolph@gmail.com"
] | chelseyrrandolph@gmail.com |
c64f94ddcdfa8c5157ada222b81f8e74d880c758 | 58dd067b747aac2bf6a0f798c76de6312b6915dd | /1_base_OO_net/day25_interface/04_Polymorphism.py | fed82cef4909d524692b362c01e2949f55e129dd | [] | no_license | Nishinomiya0foa/Old-Boys | b4f5d0e6d8b384b55dfb8b8dc21d65152073315a | b771e01bab8dd99f612042e3335f1d36d3657009 | refs/heads/master | 2020-04-24T15:09:35.855357 | 2019-05-19T00:28:24 | 2019-05-19T00:28:24 | 172,054,441 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 921 | py | """多态 Polymorphism
多态:多个不同的类具有共同的方法func,调用方法func,得到的返回值不同。
把这个方法func提取出来,封装为一个接口g。不同类的实例作为参数传入接口g,得到不同的返回值
python,天生支持多态,是多态语言,python崇尚鸭子类型。
鸭子类型:不崇尚继承父类或实现接口而拥有方法或属性,而是依据其本身的方法或属性的集合决定
例如: list类和tuple类,非常相似,也没有采用继承的方式
优点:低耦合
缺点:太过自由
python是一门动态强类型语言。
"""
class WeChat:
def pay(self, mon... | [
"mxstarbucks@sina.com"
] | mxstarbucks@sina.com |
cd2b2ba7963e038c41beeeb56467be21de72616e | f94d95c48589cc8ffb50b4e5cd24bc8847026351 | /sendhut/views.py | 8380871b8a96495c5f42a90165de9013602e82fc | [] | no_license | rpip/sendhut-essentials | 6a3c93edae6f2233a56e64445040287ab97eb011 | fb17b2418bd7a54115cc9847d36656a10895d57a | refs/heads/master | 2021-06-18T17:46:28.395697 | 2019-08-21T21:54:23 | 2019-08-21T21:54:23 | 203,622,656 | 0 | 1 | null | 2021-06-10T21:53:07 | 2019-08-21T16:23:47 | Python | UTF-8 | Python | false | false | 666 | py | from django.shortcuts import render
from sendhut.stores.models import Store
def home(request):
stores = Store.featured.all()
context = {
'page_title': 'Home',
'stores': stores
}
return render(request, 'home.html', context)
def about(request):
return render(request, 'about.html',... | [
"yao.adzaku@gmail.com"
] | yao.adzaku@gmail.com |
af82dbeedab330a88c7be75a7a5f2fd5bb84b030 | d0533b0574494b13606a557620f38f5a2c74ce16 | /venv/lib/python3.7/site-packages/mplfinance/_styledata/default.py | 93deed9a6e48a0a650cd69b8944f407f23590dfd | [
"GPL-1.0-or-later",
"MIT",
"LicenseRef-scancode-other-copyleft"
] | permissive | CatTiger/vnpy | af889666464ab661fb30fdb0e8f71f94ba2d1e41 | 7901a0fb80a5b44d6fc752bd4b2b64ec62c8f84b | refs/heads/master | 2020-09-26T00:37:54.123877 | 2020-07-13T10:15:46 | 2020-07-13T10:15:46 | 226,124,078 | 0 | 0 | MIT | 2020-04-21T03:02:20 | 2019-12-05T14:44:55 | C++ | UTF-8 | Python | false | false | 1,499 | py | style = dict(style_name = 'default',
base_mpl_style= 'seaborn-darkgrid',
marketcolors = {'candle' : {'up':'w', 'down':'k'},
'edge' : {'up':'k', 'down':'k'},
'wick' : {'up':'k', 'down':'k'},
'o... | [
"guozc@133.com"
] | guozc@133.com |
678c1791f35c404611be00fcd77d75f8713773d3 | 9be1f3ffd2339e752f91eee86305076575309e33 | /AGC.py | 8d321f8a50917a8d84243691759588b6d622599a | [] | no_license | Index197511/AtCoder_with_Python | 5b48290bc32ad86aa58f66ad7c0e3510a2ea5518 | 7397e5df42371d1717b77442d3876787facf9641 | refs/heads/master | 2020-04-11T18:48:15.935498 | 2019-06-05T10:57:42 | 2019-06-05T10:57:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 270 | py | n=int(input())
a=list(map(int,input().split()))
cnt=0
for i in range(n):
tot=0
j=i
while True:
if j==(n-1):
break
tot+=a[j]
if tot==0:
cnt+=1
j+=1
if j==(n-1):
break
print(int(cnt))
| [
"hiro.saten@gmail.com"
] | hiro.saten@gmail.com |
db127761ae4ceb1bb63c04c61b631726e6298d19 | 4f7aa44d21ae38093869e79e10f5cdc8842d48b7 | /04-python-academy-files-lab/try_except_finally.py | 986d23e6c750e312790b2ad50d384dde4cdbef7b | [
"Apache-2.0"
] | permissive | iproduct/intro-python | 31e802c2c21a4df3361656f12d267ec52c2d6564 | 7e08e144da2907fcf45dc734ab4e896631625d75 | refs/heads/master | 2023-02-19T11:42:37.522624 | 2023-02-13T15:54:03 | 2023-02-13T15:54:03 | 128,980,155 | 5 | 1 | null | null | null | null | UTF-8 | Python | false | false | 763 | py | import sys
from io import UnsupportedOperation
if __name__ == '__main__':
FILENAME = "demofile.txt"
try:
f = open(FILENAME, "rt")
try:
f.write("Lorum Ipsum" + 12)
except UnsupportedOperation as ex:
print("The file is not open for writing")
print(f"Err... | [
"office@iproduct.org"
] | office@iproduct.org |
268aa267950f36e59e87d3f85502504bad9f0e40 | c34a0e0308b97de8605b3189c4510aa8f265580b | /cocojson/tools/match_imgs.py | ee16d079b9d8b99336b8df97edbbc934e7d83808 | [
"MIT"
] | permissive | TeyrCrimson/cocojson | c1aa671d2e092677abb6de473ffd87c3a18bd3ae | edf4300daadb7f26d15c3ba6be72f60667a4ff3a | refs/heads/main | 2023-06-02T03:41:33.939082 | 2021-06-23T08:36:55 | 2021-06-23T08:36:55 | 379,777,169 | 0 | 0 | MIT | 2021-06-24T02:05:00 | 2021-06-24T02:04:59 | null | UTF-8 | Python | false | false | 1,702 | py | '''
Match images between COCO JSON A and COCO JSON B. Any images in JSON B that is not found in JSON A will be removed (along with associated annotations)
Match will be through image `file_name`.
'''
from warnings import warn
from cocojson.utils.common import read_coco_json, write_json_in_place
def match_imgs_from_f... | [
"lingevan0208@gmail.com"
] | lingevan0208@gmail.com |
babf3556cc545666b1fd5bc0fa2e7c7c866d4d36 | 1dcea2a511f14a43701994f6a7785afd21a20d74 | /Algorithm/238_ProductOfArrayExceptSelf.py | 030464a484918661c1a3907dd92ed2f9a103745f | [] | no_license | lingtianwan/Leetcode2 | 66031e256a2928c6197516f83f14748c52e91b8c | 80a604cc09d5d2d62dd05157d8b829de675e4404 | refs/heads/master | 2021-01-13T11:17:18.238465 | 2017-02-09T01:43:38 | 2017-02-09T01:43:38 | 81,395,927 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 813 | py | # Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements of nums except nums[i].
#
# Solve it without division and in O(n).
#
# For example, given [1,2,3,4], return [24,12,8,6].
#
# Follow up:
# Could you solve it with constant space comple... | [
"lingtian.wan@gmail.com"
] | lingtian.wan@gmail.com |
15a360f877237724019cefa1b220d0b7e37d578b | 1255ba402b4eca4bb58ccfbb994311cac97cbf72 | /official_learning/gpu_learning/using_multiple_gpu02.py | d096c6c1190d9a741523bc7cc6100e4daa2635b7 | [] | no_license | suiup/tensorflow_learning | c5eaf85abc24feeab9b8e7ba6bc1f0e0ae525add | beb9940d951a0b9a902db9f2dcc7f2e63d278e49 | refs/heads/master | 2023-06-07T19:37:13.785541 | 2021-06-27T21:01:36 | 2021-06-27T21:01:36 | 374,089,087 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 661 | py | import tensorflow as tf
#建立可供运行时使用的多个逻辑 GPU 后,我们可以通过 tf.distribute.Strategy 或手动放置来利用多个 GPU。
# 使用 tf.distribute.Strategy
# 使用多个 GPU 的最佳做法是使用 tf.distribute.Strategy。下面是一个简单示例
tf.debugging.set_log_device_placement(True)
strategy = tf.distribute.MirroredStrategy()
with strategy.scope():
inputs = tf.keras.layers.Input... | [
"931857499@qq.com"
] | 931857499@qq.com |
a12a7754231293c6511a2c5d48beba01a1108a01 | 487ce91881032c1de16e35ed8bc187d6034205f7 | /codes/CodeJamCrawler/16_0_3/brusco/c.py | 16ff5c081f90011dc8ddb3c223656bee4d882cf7 | [] | no_license | DaHuO/Supergraph | 9cd26d8c5a081803015d93cf5f2674009e92ef7e | c88059dc66297af577ad2b8afa4e0ac0ad622915 | refs/heads/master | 2021-06-14T16:07:52.405091 | 2016-08-21T13:39:13 | 2016-08-21T13:39:13 | 49,829,508 | 2 | 0 | null | 2021-03-19T21:55:46 | 2016-01-17T18:23:00 | Python | UTF-8 | Python | false | false | 1,263 | py | import math
def trial_division(n):
candidate = 2
# no need to find a divisor by all means, just skip it if not found soon
max_candidate = min(math.sqrt(n), 1000)
while candidate < max_candidate:
if n % candidate == 0:
return candidate
# next candidate
if candidate =... | [
"[dhuo@tcd.ie]"
] | [dhuo@tcd.ie] |
98a16b0699f3317e3568f473dc03c0b82b4daf6d | 8e07f5f06452f9566640d2130a5c1bcefcebd745 | /Django-CRM-master (1)/crm/asgi.py | eaba65d8a0999dd79986c88bea8639f3a360ab81 | [
"MIT"
] | permissive | bot242/djangocrm | 65dbe42a814fd538d77ec9c0cc5626a7d6ce19b4 | 6f5e64b4f65dbb13583d68ef5f6a3feaea51befb | refs/heads/main | 2023-01-23T10:29:32.338620 | 2020-12-02T06:43:35 | 2020-12-02T06:43:35 | 317,773,468 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 196 | py | import os
import django
from channels.routing import get_default_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "crm.settings")
django.setup()
application = get_default_application() | [
"sankarmass619@gmail.com"
] | sankarmass619@gmail.com |
92ffb2c60396fcf2b0da46542c5b53ee324bc361 | 07e8eaeaa6f3493546ba6b499be1593252f3c773 | /examples/optimizers/evolutionary/create_rra.py | 7b31f25940e6988859224e2d5a283e090c9b0ad0 | [
"Apache-2.0"
] | permissive | himanshuRepo/opytimizer | 91dd848fffbe85736d8074169d515e46a8b54d74 | 09e5485b9e30eca622ad404e85c22de0c42c8abd | refs/heads/master | 2023-07-20T18:16:00.565759 | 2021-09-02T19:40:43 | 2021-09-02T19:40:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 291 | py | from opytimizer.optimizers.evolutionary import RRA
# One should declare a hyperparameters object based
# on the desired algorithm that will be used
params = {
'd_runner': 2,
'd_root': 0.01,
'tol': 0.01,
'max_stall': 1000
}
# Creates an RRA optimizer
o = RRA(params=params)
| [
"gth.rosa@uol.com.br"
] | gth.rosa@uol.com.br |
0212b8dcf17fd5ff0a6125d8cc81a9f573a9bf9c | 8946774baf03ddc089f3bdd54c8fdfce2c48b93f | /proadv/api/management/commands/load_search_terms.py | 40fb5053fd2a4da532ead8adc5580fff3718d031 | [] | no_license | olavosamp/proadv_api | fdf9a44955f2e142d06ecf780c0ce76dada376b7 | 483e55164cf354638dc2531a44678942098c8721 | refs/heads/main | 2023-04-13T01:44:34.881869 | 2021-04-20T00:56:11 | 2021-04-20T00:56:11 | 357,301,408 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,287 | py | import json
from api.models import SearchTerm
from api.utils import get_search_term, check_valid_keys
from api.defines import SEARCH_TERM_KEY_DICT
from django.core.management import BaseCommand
class Command(BaseCommand):
help = "Imports search term data from a JSON file with format: [{classificacao: str, termo... | [
"olavosamp@poli.ufrj.br"
] | olavosamp@poli.ufrj.br |
997d1934983b8deab7bab2fa546b9ca180129268 | a3d39c53b1abf4d35c9a9a1d8c8f226572f29bcd | /test/functional/mempool_unbroadcast.py | 4554a5c9859854c3a7cd0de7667a3b11d04b2ecc | [
"MIT"
] | permissive | BakedInside/Beans-Core | afc3a55efa3e14e62a19f4bc4d5ae5a357f5f1de | daa9b2ddbfd3305881749bda7f32146738154260 | refs/heads/master | 2022-07-30T05:42:26.680123 | 2021-05-22T15:35:40 | 2021-05-22T15:35:40 | 369,584,373 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,218 | py | #!/usr/bin/env python3
# Copyright (c) 2017-2020 The Beans Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test that the mempool ensures transaction delivery by periodically sending
to peers until a GETDATA is re... | [
"lanorlasystem@gmail.com"
] | lanorlasystem@gmail.com |
be49460b81c32e70942ea2581bb64a8da075a02b | b91588cda1a129f06aa9493ee6d6a70e4f996b7f | /Production/python/Spring16/SMS-T1tttt_mGluino-1500_mLSP-100_TuneCUETP8M1_13TeV-madgraphMLM-pythia8_cff.py | 3ee5ed60931bbb4ad7c6542352ccff2cb49ba1ca | [] | no_license | muzamilahmad/LeptoQuarkTreeMaker | 2371e93589dbe41b02a93a2533cbf5e955aaa0db | 8e7eed0d03c6770a029eafb9b638e82c600a7425 | refs/heads/master | 2021-01-19T01:02:35.749590 | 2018-02-06T17:27:52 | 2018-02-06T17:27:52 | 65,389,201 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 945 | py | import FWCore.ParameterSet.Config as cms
maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
readFiles = cms.untracked.vstring()
secFiles = cms.untracked.vstring()
source = cms.Source ("PoolSource",fileNames = readFiles, secondaryFileNames = secFiles)
readFiles.extend( [
'/store/mc/RunIISpring16Mi... | [
"kpedro88@gmail.com"
] | kpedro88@gmail.com |
16d8f084b4433e0bb41935d168c212cfd4226d78 | 6a07912090214567f77e9cd941fb92f1f3137ae6 | /cs101/Unit 3/29.py | 5c575716467bd6aff72509a752ed2600fa22f762 | [] | no_license | rrampage/udacity-code | 4ab042b591fa3e9adab0183d669a8df80265ed81 | bbe968cd27da7cc453eada5b2aa29176b0121c13 | refs/heads/master | 2020-04-18T08:46:00.580903 | 2012-08-25T08:44:24 | 2012-08-25T08:44:24 | 5,352,942 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 422 | py | # cs101 ; Unit 3 ; 29
# Define a procedure, union,
# that takes as inputs two lists.
# It should modify the first input
# list to be the set union of the two
# lists. You may assume the first list
# is a set, that is, it contains no
# repeated elements.
# To test, uncomment all lines
# below except those beginn... | [
"raunak1001@gmail.com"
] | raunak1001@gmail.com |
1acd7fc6a279c84694f983315670c8f94cbe2106 | bf52ad6cac5e69a62b141cdf050bffa56f6ab1c9 | /division/app.py | df3d9fca4db57871e10e6271f41753bb35cb99f4 | [] | no_license | diegoguizag1992/ArquitecturaMicroservicios | e931608da6183925e08fa9c066eecdefac3d20f9 | 934b20ec48388dc47634c1b67e06b059eceadd06 | refs/heads/master | 2023-01-14T04:10:23.333673 | 2020-11-23T02:33:17 | 2020-11-23T02:33:17 | 315,170,278 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 226 | py | from flask import Flask
app = Flask(__name__)
@app.route("/division/<int:valor1>/<int:valor2>")
def division(valor1, valor2):
return str(valor1 / valor2)
if __name__ == "__main__":
app.run(host='0.0.0.0',debug=True) | [
"apdaza@gmail.com"
] | apdaza@gmail.com |
f25696cb1a246d1155d0461d4f872a23a144f52f | e48f110e638df31129963ff2a6b4dbba44354d33 | /script/parse_xml_tr.py | d6ec02911c3031ccd4fbcc04286e79962dd8bb1b | [] | no_license | didw/kra | dfa6e0f4d305e56fb11255c8af0554767f981d44 | 2d5ac2bcab5a2b452381c433f4c3c10b8b95e94f | refs/heads/master | 2021-01-11T05:50:49.239175 | 2019-01-06T14:22:36 | 2019-01-06T14:22:36 | 72,058,728 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,254 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
from bs4 import BeautifulSoup
import pandas as pd
import glob
def parse_xml_tr(meet):
data = []
filename = '../xml/getTR_%d.xml' % meet
file_input = open(filename)
print "process in %s" % filename
response_body = file_input.read()
xml_text = Beautifu... | [
"yangjy0113@gmail.com"
] | yangjy0113@gmail.com |
ac29d1a938ea446f3b5cb9bcfabebe28102ba3c6 | e979a08107918af5aae7214cc19927495591cc1d | /demo/Canvas/oval.py | 22e092e4e9b788e7abb795fdf82ef0176c9e7a2e | [] | no_license | jksdou/tkinter-learn | 5b421520bac28736028045c635e78ac364ae134c | 3b19a324e78ce0ce7d5d6f6726e37d2639a60965 | refs/heads/master | 2023-01-22T06:59:03.098433 | 2020-12-07T17:13:06 | 2020-12-07T17:13:06 | 319,378,388 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 416 | py | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
# 使用 Canvas 画椭圆
from tkinter import Tk, Canvas
window = Tk()
window.title("画椭圆")
window.resizable(False, False)
top = 130
bottom = 130
canvas = Canvas(window, width=500, height=500, bg='white')
for i in range(20):
canvas.create_oval(250 - top, 250 - bottom, 250 + to... | [
"doudoudzj@sina.com"
] | doudoudzj@sina.com |
f79cbf0dbb76b761ebc6b09cd7e6840f0ba8bc43 | b969cb8a74e5de2c82cdf795614f4d115e2ed40c | /benchmarks/dynamo/ci_expected_accuracy/update_expected.py | e61d282be558e3344a03c92b36ecfa96fb82e994 | [
"BSD-2-Clause"
] | permissive | vishalbelsare/pytorch | fabd19fff9b1fb4fd2023605540c82f4c1d8a603 | a39ea6f21361e531ce7e703224bfbce7fc564083 | refs/heads/master | 2023-04-30T05:55:06.631379 | 2023-04-17T04:30:36 | 2023-04-17T04:30:36 | 152,814,397 | 0 | 0 | NOASSERTION | 2023-04-17T10:16:58 | 2018-10-12T22:37:31 | C++ | UTF-8 | Python | false | false | 4,734 | py | """
Update commited CSV files used as reference points by dynamo/inductor CI.
Currently only cares about graph breaks, so only saves those columns.
Hardcodes a list of job names and artifacts per job, but builds the lookup
by querying github sha and finding associated github actions workflow ID and CI jobs,
downloadi... | [
"pytorchmergebot@users.noreply.github.com"
] | pytorchmergebot@users.noreply.github.com |
0e916354a1d3704471d2be020f245a8c7aa813cd | 421d58c6b93b81e0724f8f4576119300eb344252 | /influencers/influencers/urls.py | b86f901777f8d82d4ed3860d80d1054aed5fd2a7 | [] | no_license | momen/influencers | 7728228c92a552bdff9ae62f85986ad03bce186e | f9c76cfc2970440112967f9579dc31f77063cb25 | refs/heads/master | 2020-06-03T22:20:03.881411 | 2019-06-15T07:48:43 | 2019-06-15T07:48:43 | 191,754,739 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 571 | py | from django.urls import path
from rest_framework.routers import DefaultRouter
from influencers.influencers.views import (
InfluencerViewSet,
SocialAccountViewSet,
InfluencerAccountsView,
)
app_name = "influencers"
router = DefaultRouter()
router.register(r"socialaccount", SocialAccountViewSet)
router.reg... | [
"momennegm@gmail.com"
] | momennegm@gmail.com |
8e8438167e9bba3b51f29c3b109269ccb9aedc8e | a98a3cbaf20a844406650ba15705fd6635b097da | /tintg/prod_settings/__init__.py | 320eff557c6462c77d01474723d8a8ce149e6397 | [
"Apache-2.0"
] | permissive | phildini/tintg | 9c34364dda85b4cfe63df9357eb9d58535c7b308 | ad82d94f37b301b5ef8062e472bac52bcfe7ad8f | refs/heads/master | 2021-01-01T05:16:36.439279 | 2016-04-21T18:37:23 | 2016-04-21T18:37:23 | 56,353,571 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 882 | py | import dj_database_url
from tintg.settings import *
DEBUG = False
TEMPLATE_DEBUG = False
DATABASES['default'] = dj_database_url.parse(get_env_variable('TINTG_DB_URL'))
SECRET_KEY = get_env_variable('TINTG_SECRET_KEY')
ALLOWED_HOSTS = [
'localhost',
'127.0.0.1',
'.herokuapp.com',
]
SECURE_HSTS_SECONDS =... | [
"pjj@philipjohnjames.com"
] | pjj@philipjohnjames.com |
fc304828e5e04612a37bc0ee4c746750d8aaaa54 | fb1e852da0a026fb59c8cb24aeb40e62005501f1 | /edgelm/fairseq/optim/cpu_adam.py | 5c738e42918a371e239d89b8e14b9bd1841175ee | [
"LicenseRef-scancode-unknown-license-reference",
"MIT",
"LGPL-2.1-or-later",
"LicenseRef-scancode-free-unknown",
"Apache-2.0"
] | permissive | microsoft/unilm | 134aa44867c5ed36222220d3f4fd9616d02db573 | b60c741f746877293bb85eed6806736fc8fa0ffd | refs/heads/master | 2023-08-31T04:09:05.779071 | 2023-08-29T14:07:57 | 2023-08-29T14:07:57 | 198,350,484 | 15,313 | 2,192 | MIT | 2023-08-19T11:33:20 | 2019-07-23T04:15:28 | Python | UTF-8 | Python | false | false | 6,997 | py | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import importlib
from collections.abc import Collection
from dataclasses import dataclass, field
from typing import List
import tor... | [
"tage@sandbox12.t0ekrjpotp2uhbmhwy0wiwkeya.xx.internal.cloudapp.net"
] | tage@sandbox12.t0ekrjpotp2uhbmhwy0wiwkeya.xx.internal.cloudapp.net |
283ffd52d747f154947973d072bee919f2ecc3b4 | 1819b161df921a0a7c4da89244e1cd4f4da18be4 | /WhatsApp_FarmEasy/env/lib/python3.6/site-packages/eth_abi/__init__.py | 7e82401a942db6ef1a962e3df3d8bead7c14f8b3 | [
"MIT"
] | permissive | sanchaymittal/FarmEasy | 889b290d376d940d9b3ae2fa0620a573b0fd62a0 | 5b931a4287d56d8ac73c170a6349bdaae71bf439 | refs/heads/master | 2023-01-07T21:45:15.532142 | 2020-07-18T14:15:08 | 2020-07-18T14:15:08 | 216,203,351 | 3 | 2 | MIT | 2023-01-04T12:35:40 | 2019-10-19T12:32:15 | JavaScript | UTF-8 | Python | false | false | 234 | py | import pkg_resources
from eth_abi.abi import ( # NOQA
decode_abi,
decode_single,
encode_abi,
encode_single,
is_encodable,
is_encodable_type,
)
__version__ = pkg_resources.get_distribution('eth-abi').version
| [
"sanchaymittal@gmail.com"
] | sanchaymittal@gmail.com |
c01f385292ee0918dc05ac627e8ebf46eacdf133 | aae0880c3199c478d5e5cf3cb09a3c81c7d62d6a | /Python-Chat-App/chatup.py | cf08c445d2dbf1f2019f4257b35a86631080e6b4 | [] | no_license | icerahi/rahi-s-Flask-Projects | ca19b302da3d49f8b6d687be1f739032aa5be3ef | 261a5f89434c51ac611297a8d06fb67b89aaebba | refs/heads/master | 2022-01-18T08:15:55.453228 | 2022-01-06T10:04:31 | 2022-01-06T10:04:31 | 177,303,301 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 588 | py | from flask import Flask, render_template
from flask_socketio import SocketIO, emit
app = Flask(__name__)
app.config[ 'SECRET_KEY' ] = 'jsbcfsbfjefebw237u3gdbdc'
socketio = SocketIO( app )
user="rahi"
@app.route( '/')
def hello():
return render_template( './ChatApp.html' ,user=user)
def messageRecived():
print... | [
"zanjarwhite@gmail.com"
] | zanjarwhite@gmail.com |
736725eed55dde6e46164dd2c288107c859d462b | 7548c8efccb43b1d8daec719bd7d8ad4a4d03630 | /Last Substring in Lexicographical Order/Leetcode_1163.py | b4b376a7fef9cf5bbba987db4d11cb5d17b3de1b | [] | no_license | arw2019/AlgorithmsDataStructures | fdb2d462ded327857d72245721d3c9677ba1617b | 9164c21ab011c90944f844e3c359093ce6180223 | refs/heads/master | 2023-02-17T11:50:07.418705 | 2021-01-19T19:37:17 | 2021-01-19T19:37:17 | 204,222,584 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 262 | py | class Solution:
def lastSubstring(self, s: str) -> str:
n = len(s)
maxSeen = ""
for i in range(n):
for j in range(i+1, n+1):
if s[i:j] > maxSeen:
maxSeen = s[i:j]
return maxSeen
| [
"noreply@github.com"
] | arw2019.noreply@github.com |
d811b831a0e884d180f0ed6c73ef9be7f7035b4d | 785a06d576cd4f7486a8a4306481392d0b65f621 | /0x03-python-data_structures/7-add_tuple.py | 236d69a2a5ee75720fa955be0a622f52c463ca58 | [] | no_license | LauraPeraltaV85/holbertonschool-higher_level_programming | 7c3d0a99c2dbd4f2f6951999634dbc2ae9acf1c4 | 264fe99bf5fc128d2faf59057e9062c2408e6065 | refs/heads/master | 2021-07-21T07:49:24.049890 | 2020-08-19T00:07:20 | 2020-08-19T00:07:20 | 207,329,486 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 315 | py | #!/usr/bin/python3
def add_tuple(tuple_a=(), tuple_b=()):
x = list(tuple_a)
y = list(tuple_b)
if len(x) < 2:
for e in range(len(x), 2):
x.append(0)
if len(y) < 2:
for e in range(len(y), 2):
y.append(0)
n = [x[0] + y[0], x[1] + y[1]]
return (tuple(n))
| [
"="
] | = |
c15fa2778f95d2ce92f4f32e1f34aacf0e73e8dd | 7d02813987b49c2a69d92b9b2fdf5148af37274f | /case/About_locust/locustfile3.py | e8227e2096b46427177bb2c33ff615d65bc29962 | [] | no_license | xgh321324/api_test | 29e01cbe5f0b7c2df25fb7e781cedf8031140c72 | 2575495baac3ab90adab7a7a85904c38a78dd4b7 | refs/heads/master | 2022-07-23T19:54:39.320828 | 2022-07-02T09:13:35 | 2022-07-02T09:13:35 | 129,185,513 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,894 | py | #coding:utf-8
from locust import HttpLocust,TaskSet,task
import time
import login_lanting
import Hash
'''测试发表渟说接口的性能'''
#定义用户行为
class User(TaskSet):
#下面是请求头header
header = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.108 Safari/537.36 2345Explorer/8... | [
"34511103+xgh321324@users.noreply.github.com"
] | 34511103+xgh321324@users.noreply.github.com |
fc8469818217fe08269351c9fcc98e6cb3e4d0fb | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /mJpjpgxkxvTY4Qbwf_14.py | f645319a6e0d4c6d6b23568699bd65994ac58ed8 | [] | 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 | 1,221 | py | """
Create a function that takes a 5x5 3D list and returns `True` if it has at
least one Bingo, and `False` if it doesn't.
### Examples
bingo_check([
[45, "x", 31, 74, 87],
[64, "x", 47, 32, 90],
[37, "x", 68, 83, 54],
[67, "x", 98, 39, 44],
[21, "x", 24, 30, 52]
]) ➞ True
... | [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
34cf3416b4a4ed2611d3f51e59388a491836b4e5 | e2a26056efc56aa48522d0d45375b17a9e687c46 | /seismograph/ext/mocker/json_api_mock.py | 5a02a36e227b249cfd748dabf66dc9742d08106f | [] | no_license | pulysak/seismograph | 489f788affb01c3f9f40565ec92c786a319ee11f | 313b74aaa445e8056c732eff3b8cbd6b5692576f | refs/heads/master | 2021-01-18T16:13:07.125954 | 2016-05-06T17:56:34 | 2016-05-06T17:56:34 | 55,637,399 | 0 | 1 | null | 2016-04-06T20:13:53 | 2016-04-06T20:13:53 | null | UTF-8 | Python | false | false | 793 | py | # -*- coding: utf-8 -*-
import re
import json
from .mock import BaseMock
from .base import BaseMockServer
CLEAN_DATA_REGEXP = re.compile(r'^\s{2}|\n|\r$')
FILE_EXTENSIONS = BaseMockServer.__file_extensions__ + ('.json', )
class JsonMock(BaseMock):
__mime_type__ = 'application/json'
__content_type__ = 'ap... | [
"mikhail.trifonov@corp.mail.ru"
] | mikhail.trifonov@corp.mail.ru |
810b327d3d08b2ab36a8903b52b2d06409e9ff01 | 0d37419481a5f3a37d0bbd2c3b1023105c193917 | /tests/loaders/test_factory_command_loader.py | 31cbc65d2e9c0a99b448e93e8c318f6d659606f3 | [
"MIT"
] | permissive | passionsfrucht/cleo | 89e8b4d8595785ac021017815d1d7ebc1fb80da4 | 8dc694ed5ed350403966f93d330654ecb447801b | refs/heads/master | 2023-06-25T20:14:59.578578 | 2021-07-30T15:16:20 | 2021-07-30T15:16:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,151 | py | import pytest
from cleo.commands.command import Command
from cleo.exceptions import CommandNotFoundException
from cleo.loaders.factory_command_loader import FactoryCommandLoader
def command(name: str) -> Command:
command_ = Command()
command_.name = name
return command_
def test_has():
loader = Fa... | [
"sebastien@eustace.io"
] | sebastien@eustace.io |
1f0b3a8eed50e1cd3ee4c3015c77f80304f757f3 | fa4fc25f5ec49433d4162cfbf34a670f39371973 | /backend/PersoRegBackEnd/manage.py | e931fbf4fb184a1d081960cb1602860d00a97246 | [] | no_license | raultr/PerBackbone | 905e7b020cadeec114744cdb39aa9ff890b704bd | e9277886ca6c9fc6aa9233939e0544c1dcf07d37 | refs/heads/master | 2016-08-03T19:40:40.309758 | 2014-11-27T05:58:22 | 2014-11-27T05:58:22 | 26,204,783 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 258 | py | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "PersoRegBackEnd.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| [
"raultr@gmail.com"
] | raultr@gmail.com |
9051d73144ffa7c7785dd0ea1f0e964689305b58 | ef85c7bb57412c86d9ab28a95fd299e8411c316e | /runtime/bindings/python/tests/test_ngraph/test_gather.py | ffa4c20b1d3743b5d5d86692a3379b30b6a541aa | [
"Apache-2.0"
] | permissive | SDxKeeper/dldt | 63bf19f01d8021c4d9d7b04bec334310b536a06a | a7dff0d0ec930c4c83690d41af6f6302b389f361 | refs/heads/master | 2023-01-08T19:47:29.937614 | 2021-10-22T15:56:53 | 2021-10-22T15:56:53 | 202,734,386 | 0 | 1 | Apache-2.0 | 2022-12-26T13:03:27 | 2019-08-16T13:41:06 | C++ | UTF-8 | Python | false | false | 2,717 | py | # Copyright (C) 2018-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import openvino.opset8 as ov
import numpy as np
from tests import xfail_issue_54630
from tests.test_ngraph.util import run_op_node
def test_gather():
input_data = np.array(
[1.0, 1.1, 1.2, 2.0, 2.1, 2.2, 3.0, 3.1, 3.2], np... | [
"noreply@github.com"
] | SDxKeeper.noreply@github.com |
6c3c28ac807f8427e5aebe618184ced6913751fb | 07e6fc323f657d1fbfc24f861a278ab57338b80a | /python/pySimE/space/data/table_ChemicalFuels.py | 5adc81686a9a3146a15ceb9362c724897ff52ed8 | [
"MIT"
] | permissive | ProkopHapala/SimpleSimulationEngine | 99cf2532501698ee8a03b2e40d1e4bedd9a12609 | 47543f24f106419697e82771289172d7773c7810 | refs/heads/master | 2022-09-05T01:02:42.820199 | 2022-08-28T10:22:41 | 2022-08-28T10:22:41 | 40,007,027 | 35 | 4 | null | null | null | null | UTF-8 | Python | false | false | 355 | py |
dict_AirBurnFuel = {
# name energyDensity energyDensity+O2 density
'LH2' : [ 141.86, 15.7622222222, 0.07085 ],
'LCH4': [ 55.6, 11.12, 0.42262 ],
'gasoline': [ 42.8, 0.7197]
}
dict_ChemicalFuelCompositions = {
# name fuel oxidizer energyDensity exhaustVelocity
'LOX/LH2' : ["H2", "O2", ... | [
"ProkopHapala@gmail.com"
] | ProkopHapala@gmail.com |
80a8d87c8b06eed099d2a9ed2758407c5cd9490a | 7b76e80f2057d78a721373e8818e153eecebe8f0 | /Examples/functions/lambda with re.py | 824e7e963ca5fd04df7e567717b169cfd8b5ef9d | [] | no_license | dev-area/Python | c744cf6eb416a74a70ad55d2bcfa8a6166adc45d | 1421a1f154fe314453d2da8b0fafae79aa5086a6 | refs/heads/master | 2023-02-01T10:37:47.796198 | 2020-10-15T19:33:49 | 2020-10-15T19:33:49 | 86,337,870 | 35 | 44 | null | 2023-01-12T09:02:59 | 2017-03-27T13:20:49 | Jupyter Notebook | UTF-8 | Python | false | false | 1,165 | py | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Thu May 11 17:40:55 2017
@author: parallels
"""
def addtax(val):
return val*1.17
nums = [10,200,30]
inters = [1.17,1.18,1.16]
numstax = map(addtax,nums)
print numstax
numstax = map(lambda val:val*1.17,nums)
print numstax
numstax = map(lambda val,... | [
"liranbh@gmail.com"
] | liranbh@gmail.com |
f21a38c18c4969ba4ffb413b52af5cf14d3ccf8c | 55c0df26e4891310a88e5245c41f3ffd1dbcd143 | /list_and_sting9.py | f94e9989913ef9f40170697bbcf4857e2b7152bf | [] | no_license | yiguming/coding | 506446a6ab0d4c63c74a3b90bceeff8d1db78b57 | d3d516a0719c9ba5b5a18d31714dd32601f05f4f | refs/heads/master | 2016-09-03T07:11:11.822498 | 2015-03-07T12:52:56 | 2015-03-07T12:52:56 | 31,662,569 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 182 | py | #!/usr/bin/python
def connectlist(list1,list2):
for item in list2:
list1.append(item)
return list1
list1=[1,2,3,4,5]
list2=[2,3,4,5,1,2]
print connectlist(list1,list2)
| [
"439309415@qq.com"
] | 439309415@qq.com |
56d459bb14c3167b06507f072a6f520affe19dee | 1020a87ba3569c879478b6a88f73da606f204c34 | /greendoge/util/validate_alert.py | 0427b5cf2f4fbde8303fe845c999df00e41390c3 | [
"Apache-2.0"
] | permissive | MIGPOOL/test-blockchain | deeceaa5d7c6d24e528092ef32036aff8149baff | 567fd1265b6a27f2f4e21c7787e39072e4b7c085 | refs/heads/main | 2023-08-22T03:27:19.638361 | 2021-10-26T22:42:42 | 2021-10-26T22:42:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,749 | py | import json
from pathlib import Path
from blspy import AugSchemeMPL, PublicKeyMPL, SignatureMPL
from greendoge.util.byte_types import hexstr_to_bytes
from greendoge.util.hash import std_hash
def validate_alert_file(file_path: Path, pubkey: str) -> bool:
text = file_path.read_text()
validated = validate_aler... | [
"83430349+lionethan@users.noreply.github.com"
] | 83430349+lionethan@users.noreply.github.com |
fd2c477fcf5e490a75267f92c43ca77e689469dc | b4164c87460840fff47ee84929834624d07b346c | /tools.py | c77d1712a27642381dc2faa413e09415a8fa666d | [] | no_license | tlinnet/winpython | 23ffc5b4689731d9ee31a2c22e6924c6af68f545 | febc9eaa4d0ce7dc3d632a90cfb5ca29f72504a1 | refs/heads/master | 2021-01-23T23:45:19.209163 | 2018-03-04T14:44:59 | 2018-03-04T14:44:59 | 122,732,431 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,224 | py | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.mlab as mlab
# https://stackoverflow.com/questions/4700614/how-to-put-the-legend-out-of-the-plot
d = {
'Alder':{
'18-24':0.12,
'25-34':0.16,
'35-44':0.19,
'45-54':0.19,
'55-64':0.17,
... | [
"tlinnet@gmail.com"
] | tlinnet@gmail.com |
ce4ba75c7a043617174f004cdba4560d1e3f1e77 | 76fa6f5571e983de2ed7c71424377442d38ab326 | /enemies/base_enemy.py | 6c53ebea9540ef3a2a4b4d9c7109f085d5eacf17 | [] | no_license | Asingjr2/dungeon_quest_py | 1463f28b94a7a4a0e7263f184803e627bd88b97c | 41c9b41485f552657405ddb977ddfa86a02cc162 | refs/heads/master | 2021-06-11T05:14:00.295784 | 2020-10-19T12:47:55 | 2020-10-19T12:47:55 | 128,494,057 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,456 | py | """Module contains base type for enemies user will face."""
class Enemy(object):
"""Base class of enemy that will attack heroes.
Attributes include name, health, strength, defense, and intelligence.
Methods include checks for living, being on the ground, and description
of all character stats.
... | [
"asingjr2@gmail.com"
] | asingjr2@gmail.com |
1f88bca8dd36585531b75d379ab5f21077a612ed | 7a3c194356437db110671ad163f03df1344a5e87 | /code/validation/common.py | 941d55ff442c7ccadd8612c3d61f2711fa5297ed | [
"MIT"
] | permissive | dmytrov/gaussianprocess | 6b181afdb989415ec929197cdb20efee571ebbcc | 7044bd2d66f44e10656fee17e94fdee0c24c70bb | refs/heads/master | 2022-12-08T22:23:11.850861 | 2020-09-14T19:37:33 | 2020-09-14T19:37:33 | 295,513,701 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,101 | py | import os
import time
import pickle
import logging
import numpy as np
import dataset.mocap as ds
import numerical.numpyext.logger as npl
import ml.dtw.dynamictimewarp as dtw
import matplotlib.pyplot as plt
def DTW_errors(observed, predicted):
"""
observed : [T, N] - observed data
predicted : [T, N] - predi... | [
"dmytro.velychko@gmail.com"
] | dmytro.velychko@gmail.com |
c711d02dde7081b2daf943ff693527fd569f8976 | 50afc0db7ccfc6c80e1d3877fc61fb67a2ba6eb7 | /challenge8(theater_escape)/GameSwap.py | a30610d08430f0282964baf30207ac0ae6496db5 | [
"MIT"
] | permissive | banana-galaxy/challenges | 792caa05e7b8aa10aad8e04369fc06aaf05ff398 | 8655c14828607535a677e2bb18689681ee6312fa | refs/heads/master | 2022-12-26T23:58:12.660152 | 2020-10-06T13:38:04 | 2020-10-06T13:38:04 | 268,851,516 | 11 | 8 | MIT | 2020-09-22T21:21:30 | 2020-06-02T16:24:41 | Python | UTF-8 | Python | false | false | 632 | py | def whichExit(cinema):
currentRow, currentColumn, left, right, i = 0, 0, 0, 0, 0
for row in cinema:
for sit in row:
if sit == 0: currentRow = row.index(sit); currentColumn = cinema.index(row)
for column in range(currentColumn + 1):
for _ in cinema[column]:
if i < curr... | [
"cawasp@gmail.com"
] | cawasp@gmail.com |
4be069bfe0d7d032b935a0fe9cedcb43b976a562 | 60c76946c54317472326214aec8e4c40e65e557f | /apps/courses/apps.py | d4899479cca4763a1de33d02b311b8044ee98ee1 | [] | no_license | Aiyane/Xuehai | 73b3d3043016d05000dd951e5b69165c181d14c6 | 6bf67eb97c1543defaa97e2f77c7b8bd0e89bcb8 | refs/heads/master | 2020-03-23T00:26:18.065304 | 2018-07-14T12:41:30 | 2018-07-14T12:41:30 | 140,863,193 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 141 | py | # -*- coding:utf-8 -*-
from django.apps import AppConfig
class CoursesConfig(AppConfig):
name = 'courses'
verbose_name = u"课程"
| [
"2310091880qq@gmail.com"
] | 2310091880qq@gmail.com |
37d8ec1c84f8b1397fcfb43e3196fa78ce8a2c30 | 40d3f558e2a7180f6ce87a74885ae6261f523201 | /SettingRTSystem/SettingRTSystem/SettingRTSystem.py | f8a98a1ba77313655a112b464c7e129cbd0ee2ca | [] | no_license | n-kawauchi/openrtm_utils | 1e1db8666dfdde335b5f9d7e1015fe4be305dd7a | 309b653075611e5668a371ff5d0820b5dd6207dc | refs/heads/master | 2020-06-13T08:21:27.789797 | 2018-03-27T23:57:41 | 2018-03-27T23:57:41 | 194,598,946 | 0 | 0 | null | 2019-07-01T04:20:49 | 2019-07-01T04:20:49 | null | UTF-8 | Python | false | false | 2,644 | py | #!/bin/env python
# -*- encoding: utf-8 -*-
##
# @file SettingRTCConf.py
# @brief 複合コンポーネント作成支援ツール
import thread
import sys,os,platform
import re
import time
import random
import commands
import math
import imp
import subprocess
import rtctree.tree
import RTC
import OpenRTM_aist
from OpenRTM_aist import ... | [
"TyouKyozyakuTaisitu@yahoo.co.jp"
] | TyouKyozyakuTaisitu@yahoo.co.jp |
05d2b69daf2bd2f12575ea0d0a55ca2d755e4171 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02954/s152942454.py | 4b7a332bd983d684b4ceffe3f57347d3e95b1dc6 | [] | 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 | 379 | py | S = input() + 'R'
R = 0
L = 0
ans = [0] * (len(S))
for i in range(len(S)):
if S[i] == 'R':
R += 1
if L > 0:
ans[i - L] += (L + 1) // 2
ans[i - L - 1] += L // 2
L = 0
elif S[i] == 'L':
L += 1
if R > 0:
ans[i] += R // 2
an... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
f7cb01407737d3666553798bf4aa5a31c452c46f | bc2a85e8dd9244f89e2f1801cc19d570a87c74ed | /CompanyChallenges/company_sp/src/main.py | 5debbfa2009478435dd06d18b476596672888341 | [] | no_license | christian-miljkovic/interview | 1cab113dbe0096e860a3ae1d402901a15e808e32 | 63baa1535b788bc3e924f3c24a799bade6a2eae3 | refs/heads/master | 2023-01-11T14:53:09.304307 | 2020-02-04T17:35:12 | 2020-02-04T17:35:12 | 193,549,798 | 0 | 0 | null | 2023-01-05T05:56:15 | 2019-06-24T17:28:50 | Python | UTF-8 | Python | false | false | 5,406 | py | # import socket library
import socket
import sys
import collections
class Cursor(object):
def __init__(self, screen):
self.top_pad = 0
self.left_pad = 0
self.color = '#0000ff'
self.pixel_size = {'width':8, 'height':14}
# 2D array representing screen
self.screen = screen
self.pos = {'row'... | [
"cmm892@stern.nyu.edu"
] | cmm892@stern.nyu.edu |
27cc29c1b018fb31b488d657b6253e7b2e3dd98b | 08a68e32dc80f99a37a30ddbbf943337546cc3d5 | /.history/count/views_20200419210126.py | 7d44fedad1258f480a5d74dbc0f4f7fcd2ccf24d | [] | no_license | Space20001/word-count-project | dff1b4b44d2f7230070eef0d95dd968b655d92f7 | 795b5e8ad5c59109e96bf7a8e9192efaefa7770e | refs/heads/master | 2022-04-20T17:54:05.511449 | 2020-04-20T15:25:46 | 2020-04-20T15:25:46 | 257,327,368 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 575 | py | from django.shortcuts import render
# Create your views here.
def home(request):
return render(request, 'count/home.html', {})
def counted(request):
fulltext = request.GET['fulltext']
wordlist = fulltext.split()
for word in wordlist:
worddictionary
for word in wordlist:
... | [
"steve.h@blueyonder.com"
] | steve.h@blueyonder.com |
9e7e128d4c376e8aa17e5ff01c2b2c8a16b2cbab | 2db7597686f33a0d700f7082e15fa41f830a45f0 | /Python/巨硬/A37.区间问题-并集.py | 2c9d8793447aa0422993aab6fd38fe6b6ec1ba3e | [] | no_license | Leahxuliu/Data-Structure-And-Algorithm | 04e0fc80cd3bb742348fd521a62bc2126879a70e | 56047a5058c6a20b356ab20e52eacb425ad45762 | refs/heads/master | 2021-07-12T23:54:17.785533 | 2021-05-17T02:04:41 | 2021-05-17T02:04:41 | 246,514,421 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 906 | py | '''
给定一个interval A和一组intervals,然后判断这组intervals里面是否存在一个并集是这个A的超集
'''
'''
[[2, 4], [5, 6],[3,5]]
[1, 4]
一组intervals合并之后,并没有一个区间是可以把[1,4]包括在里面的
'''
# merge
# 56
def merge(intervals):
if len(intervals) < 2:
return intervals
intervals = sorted(intervals, key = lambda x:x[0])
new = [intervals[0]]... | [
"leahxuliu@gmail.com"
] | leahxuliu@gmail.com |
8bf45cd71206323b9373447e206269a9e9297742 | 9678fc0229de38f419964247ba0c8c8c395756c6 | /deepchem/molnet/run_benchmark_low_data.py | 840bbc53115f807459fd91aab7eb0417f47772ed | [
"MIT"
] | permissive | ozgurozkan123/deepchem | 2c3af9022de583b7dc77affce599dfb7b3a0dd81 | 7b6248db5f7172ff2a833a1c7c99f48565befe67 | refs/heads/master | 2023-01-23T11:40:34.545571 | 2017-09-28T21:41:53 | 2017-09-28T21:41:53 | 105,562,133 | 0 | 0 | MIT | 2020-11-14T23:00:38 | 2017-10-02T17:14:51 | Python | UTF-8 | Python | false | false | 4,981 | py | # -*- coding: utf-8 -*-
"""
Created on Mon Mar 06 14:25:40 2017
@author: Zhenqin Wu
"""
from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals
import os
import time
import csv
import numpy as np
import tensorflow as tf
import deepchem
from deepchem.molnet.run_ben... | [
"zqwu@stanford.edu"
] | zqwu@stanford.edu |
1ee5d551c1a0a33fe0978fbc6df59855ac744636 | ded0c895f6e1f8853f2222ae498bdc7ae52ef0e4 | /week-06/rise-time_resistenza.py | 1c1a0eb0e395c940b322ecaea9ffa6fd256801de | [] | no_license | LorenzoLMP/TD2015 | 6a8846b4592b32db81338b8522a10a2dc52531c1 | e39b51d48149d07c3cea682a02eeec4e69ffbabd | refs/heads/master | 2021-01-17T14:47:20.378339 | 2016-05-31T11:33:50 | 2016-05-31T11:33:50 | 43,302,288 | 0 | 0 | null | 2015-09-28T13:58:46 | 2015-09-28T13:23:45 | null | UTF-8 | Python | false | false | 1,077 | py | from pylab import *
from scipy import *
from scipy import optimize
from scipy import misc
#data = genfromtxt('es4_flash_mod')
#data1 = genfromtxt('es4_signal50hz_def1')
#xdata = [1, 10, 98.2, 654, 2200, 14.8, 32.6, 67.1, 46.1]#kOhm
xdata = [1, 10, 14.8, 32.6, 46.1, 67.1, 98.2, 654, 2200]
ydata = [15, 34, 44, 88, 12... | [
"lorenzo.perrone.lmp@gmail.com"
] | lorenzo.perrone.lmp@gmail.com |
1bdb45ae6c22c3c4ce32fcf8b377085dde619b34 | b78ef082335b0a901b3f028746055fc6308990a2 | /Algorithms/Leetcode/904 - Fruit Into Baskets.py | 9d9164a2cca2a82732629e128b6bedd9c261103f | [] | no_license | timpark0807/self-taught-swe | 1a968eab63f73cea30ef2379ffab53980743ed1a | bbfee57ae89d23cd4f4132fbb62d8931ea654a0e | refs/heads/master | 2021-08-14T23:31:14.409480 | 2021-08-10T06:36:06 | 2021-08-10T06:36:06 | 192,797,733 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 757 | py | import collections
class Solution(object):
def totalFruit(self, tree):
"""
:type tree: List[int]
:rtype: int
"""
left = 0
right = 0
max_subarray = 0
count = collections.defaultdict(int)
while right < len(tree):
count[tre... | [
"timpark0807@gmail.com"
] | timpark0807@gmail.com |
5a27886f080eaee5bc8cd830fd82568adc821010 | c0f022b3ff454435c3cda9dea25fae9f2765ddeb | /build_helpers.py | 903445e3ed32be514efec90ac18553c42ff92115 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | fos/fos | fabe3786f4963803f6e1285dd102c5d81b534e66 | 8d33bf0cd60292ad5164973b5285122acbc03b86 | refs/heads/master | 2016-09-06T12:52:45.011875 | 2014-11-11T09:19:38 | 2014-11-11T09:19:38 | 2,089,645 | 5 | 0 | null | 2014-11-11T09:19:39 | 2011-07-22T16:57:14 | Python | UTF-8 | Python | false | false | 2,424 | py | ''' Module to automate cython building '''
import os
from os.path import join as pjoin
from distutils.extension import Extension
def make_cython_ext(modulename,
has_cython,
include_dirs=None,
extra_c_sources=None):
''' Create Cython extension builder f... | [
"garyfallidis@gmail.com"
] | garyfallidis@gmail.com |
e0c920b31fbc64e0f25a96b63931c0d7f99a10aa | dd15e2332d3e981203855b2d9d0eb723f5707410 | /triton/dns/dnssec/algorithms/__init__.py | dedbedf897c4fb434e1e9fac27f8796400fb21e0 | [
"MIT"
] | permissive | Yurzs/triton | db63540c1fdce1b11a33a4ef7f7e7a5f1498ac24 | b64424c193b131721f172f94963d8d79b21804db | refs/heads/master | 2021-07-22T20:28:11.750946 | 2019-10-13T21:47:09 | 2019-10-13T21:47:09 | 209,257,735 | 0 | 1 | MIT | 2020-11-02T14:21:54 | 2019-09-18T08:28:29 | Python | UTF-8 | Python | false | false | 185 | py | from .base import Algorithm
from .ecc import ECDSAP256SHA256, ECCGOST, ECDSAP384SHA384
from .ed import ED448, ED25519
from .rsa import RSASHA256, RSASHA1, RSASHA512, RSASHA1_NSEC3_SHA1
| [
"yurzs@icloud.com"
] | yurzs@icloud.com |
37abc4e7c8314aa9f8914a2906228494a1e1c5fc | 7c5dbe7a2df9fce39a1658c5e2b7ba9a90a9b5f7 | /长佩/wordcount.py | c14b376fbfaef2995c9350e552fc635d6be92b1c | [] | no_license | ydPro-G/Python_spiders | 9566431129cd7f8b2fabc68660111426384bfd69 | c37472c3789ce444180ee1c218f287ce3c032d50 | refs/heads/master | 2023-02-23T20:39:31.279762 | 2021-01-27T05:50:40 | 2021-01-27T05:50:40 | 289,230,419 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,585 | py | import re
import collections
import numpy as np
import jieba
import wordcloud
from PIL import Image
import matplotlib.pyplot as plt
fn = open('CP.txt',encoding='gbk')
string_data = fn.read()
fn.close()
# 文本预处理
pattern = re.compile(u'\t|\n|\.|-|:|;|\)|\(|\?|"') # 定义正则表达式匹配模式
string_data = re.sub(pattern, '', string_da... | [
"46178109+ydPro-G@users.noreply.github.com"
] | 46178109+ydPro-G@users.noreply.github.com |
3d0ad7fa61f71c0e7835ba9dcaf7f29ab2b35392 | d308fffe3db53b034132fb1ea6242a509f966630 | /pirates/piratesgui/RadarObjDef.py | e93baad8c0f3ebf9a28b6f4f2cce0a4f4849e296 | [
"BSD-3-Clause"
] | permissive | rasheelprogrammer/pirates | 83caac204965b77a1b9c630426588faa01a13391 | 6ca1e7d571c670b0d976f65e608235707b5737e3 | refs/heads/master | 2020-03-18T20:03:28.687123 | 2018-05-28T18:05:25 | 2018-05-28T18:05:25 | 135,193,362 | 3 | 2 | null | null | null | null | UTF-8 | Python | false | false | 402 | py | # uncompyle6 version 3.2.0
# Python bytecode 2.4 (62061)
# Decompiled from: Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)]
# Embedded file name: pirates.piratesgui.RadarObjDef
RADAR_OBJ_TYPE_DEFAULT = 0
RADAR_OBJ_TYPE_LANDMARK = 1
RADAR_OBJ_TYPE_QUEST = 2
RADAR_OBJ_TYPE_SHIP = 3
R... | [
"33942724+itsyaboyrocket@users.noreply.github.com"
] | 33942724+itsyaboyrocket@users.noreply.github.com |
b5f49e9874ff2559737ac2b0489f54b6428617d2 | de4f038dd0de465152db16457aa37c8b4e911fb5 | /pandas/tests/indexes/period/test_scalar_compat.py | ac01b4aad81c998687bf92d67b3bbb907b4e22a2 | [
"BSD-3-Clause"
] | permissive | dr-aryone/pandas | 0350c5625fbb854049f086dabdfa198fa6d5929b | ba48fc4a033f11513fa2dd44c946e18b7bc27ad2 | refs/heads/master | 2020-05-27T06:26:23.174532 | 2019-05-25T01:18:04 | 2019-05-25T01:18:04 | 188,521,455 | 1 | 1 | BSD-3-Clause | 2019-05-25T04:42:58 | 2019-05-25T04:42:57 | null | UTF-8 | Python | false | false | 749 | py | """Tests for PeriodIndex behaving like a vectorized Period scalar"""
from pandas import Timedelta, date_range, period_range
import pandas.util.testing as tm
class TestPeriodIndexOps:
def test_start_time(self):
index = period_range(freq='M', start='2016-01-01', end='2016-05-31')
expected_index = d... | [
"jeff@reback.net"
] | jeff@reback.net |
e4b8582a9c46220007caab110d1113d9a128ac69 | 8dca64dd11b23a7d59413ac8e28e92a0ab80c49c | /95. Unique Binary Search Trees II/solution.py | 5880ea8112ddab5737449c11b0348372d774fdf1 | [] | no_license | huangruihaocst/leetcode-python | f854498c0a1d257698e10889531c526299d47e39 | 8f88cae7cc982ab8495e185914b1baeceb294060 | refs/heads/master | 2020-03-21T20:52:17.668477 | 2018-10-08T20:29:35 | 2018-10-08T20:29:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,252 | py | # Definition for a binary tree node.
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def generateTrees(self, n):
"""
:type n: int
:rtype: List[TreeNode]
"""
from functools import lru_cache
... | [
"huangruihaocst@126.com"
] | huangruihaocst@126.com |
4fe2599a9c4e89e3e13d7841a707586ae6840319 | c9ddbdb5678ba6e1c5c7e64adf2802ca16df778c | /cases/synthetic/exp-big-622.py | 3a2dac4d082b65b880dfe497b0580a46a02d08b9 | [] | no_license | Virtlink/ccbench-chocopy | c3f7f6af6349aff6503196f727ef89f210a1eac8 | c7efae43bf32696ee2b2ee781bdfe4f7730dec3f | refs/heads/main | 2023-04-07T15:07:12.464038 | 2022-02-03T15:42:39 | 2022-02-03T15:42:39 | 451,969,776 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,175 | py | # Compute x**y
def exp(x: int, y: int) -> int:
a: int = 0
a2: int = 0
a3: int = 0
a4: int = 0
a5: int = 0
def f(i: int) -> int:
nonlocal a
nonlocal a2
nonlocal a3
nonlocal a4
nonlocal a5
def geta() -> int:
return a
if i <= 0:
... | [
"647530+Virtlink@users.noreply.github.com"
] | 647530+Virtlink@users.noreply.github.com |
3adcb8fc1e79961d293753a37d7cbed5f201f697 | 7a4fc6e37b501a6b79a1fec3e065e63d77d5cad6 | /scripts/gpipe/exons2stats.py | 03dc2cd8cacb1c76fff9f3ebf38e1e7e451da6cf | [
"MIT"
] | permissive | bioCKO/Optic | f7d3d4164d03cff8e6a930d569d899379cb3cacf | 2df92e953b5139ff4e5c383cb4383e6367cd47f1 | refs/heads/master | 2021-05-19T15:11:21.782547 | 2015-09-22T15:46:39 | 2015-09-22T15:46:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,467 | py | ##########################################################################
#
# MRC FGU Computational Genomics Group
#
# $Id$
#
# Copyright (C) 2009 Andreas Heger
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by ... | [
"andreas.heger@gmail.com"
] | andreas.heger@gmail.com |
517bab109d3b890fc212b0e4e817e856b17a8744 | 889d85d5b12d099f3ba5ce0083a828181da9e973 | /2020-08-month-long-challenge/day06.py | 66769c379769d62d8db4f6ca3c7ed84d674f3460 | [
"Unlicense"
] | permissive | jkbockstael/leetcode | def0fca6605e3432b979c145979a3f3de225d870 | 8ef5c907fb153c37dc97f6524493ceca2044ea38 | refs/heads/master | 2021-05-23T08:54:15.313887 | 2020-09-24T20:53:46 | 2020-09-24T20:53:46 | 253,208,398 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,303 | py | #!/usr/bin/env python3
# Day 6: Find All Duplicates in an Array
#
# Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements
# appear twice and others appear once.
# Find all the elements that appear twice in this array.
# Could you do it without extra space and in O(n) runtime?
class Solution:
... | [
"jkb@jkbockstael.be"
] | jkb@jkbockstael.be |
51452deb12793778ae6ebbc8366f2e0842600087 | bad595a92335a51f629c9a4945d68be0a22d21ba | /src/GLC/team/migrations/0005_teamhead.py | d5938a98cfa25b6810293535af6cd8a55b2f2af2 | [] | no_license | Fabricourt/GLC | 21f0afa27b1cbc34c114b4d514b9b8637813ea24 | a1af55972141e2179742e248d6bd12bb154ca95f | refs/heads/master | 2022-12-01T05:43:56.625087 | 2019-07-14T14:33:44 | 2019-07-14T14:33:44 | 185,725,838 | 0 | 0 | null | 2022-11-22T03:48:18 | 2019-05-09T04:24:38 | CSS | UTF-8 | Python | false | false | 989 | py | # Generated by Django 2.2.1 on 2019-05-09 19:27
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('team', '0004_team_team_header'),
]
operations = [
migrations.CreateModel(
name='Teamhead',
... | [
"mfalme2030@gmail.com"
] | mfalme2030@gmail.com |
c67fe6238023902f41611968a1a80044d9f015c6 | 2455062787d67535da8be051ac5e361a097cf66f | /Producers/BSUB/TrigProd_amumu_a5_dR5/trigger_amumu_producer_cfg_TrigProd_amumu_a5_dR5_146.py | e91f8bd9936a35e7eda09f0a5bf5d8e8621bf2c6 | [] | no_license | kmtos/BBA-RecoLevel | 6e153c08d5ef579a42800f6c11995ee55eb54846 | 367adaa745fbdb43e875e5ce837c613d288738ab | refs/heads/master | 2021-01-10T08:33:45.509687 | 2015-12-04T09:20:14 | 2015-12-04T09:20:14 | 43,355,189 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,360 | py | import FWCore.ParameterSet.Config as cms
process = cms.Process("PAT")
#process.load("BBA/Analyzer/bbaanalyzer_cfi")
process.load("FWCore.MessageLogger.MessageLogger_cfi")
process.load('Configuration.EventContent.EventContent_cff')
process.load("Configuration.Geometry.GeometryRecoDB_cff")
process.load("Configuration.St... | [
"kmtos@ucdavis.edu"
] | kmtos@ucdavis.edu |
8125e50786127c92c990c4260f700f56dd0cc45f | c274181853c53c3be24590bfb85605fa2da8c896 | /services/users/project/api/users.py | 5b9aaface633ab67bc9071f8c18118b864e8effb | [] | no_license | zxy-zxy/testdriven-app | 915861db6bb4e5cff975b45931299c81e392b699 | 5b15133032ccac9d97b52695b460418497511d14 | refs/heads/master | 2020-04-16T07:24:29.045575 | 2019-02-12T17:07:49 | 2019-02-12T17:07:49 | 148,199,154 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,944 | py | from flask import (
Blueprint,
jsonify,
request,
render_template,
)
from sqlalchemy import exc
from project.api.models import User
from project import db
from project.api.utils import authenticate, admin_required
users_blueprint = Blueprint('users', __name__, template_folder='./templates')
@users_bl... | [
"sinitsinvanya@gmail.com"
] | sinitsinvanya@gmail.com |
4bc9f1a96de3486487f1c8d329a89abd9556f599 | d8461c32954a63f9f873ecd773d05f2827c8d19b | /kaikeba/AIPython基础/2.文件操作-文件打开的模式详解.py | 4551b46ad0bb28e1a03fc1d463121faed6e88a4e | [] | no_license | xidaodi/AILearn | a5426af12e8e7904fdf1c2074b31c7090f9b7bfd | a397d9dc055daf15d79e3e8e1d958126d6a4250d | refs/heads/master | 2023-03-26T21:20:47.718182 | 2021-03-31T09:14:05 | 2021-03-31T09:14:05 | 328,991,430 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,838 | py | # 。基础操作的方法
'''
1。打开文件 open()
参数1:文件路径
路径 url 统一资源定位符
相对路径: 就像给别人指路一样: 在某某大厦的对面。。。
针对文件的相对路径的表示,从当前目录开始计算
1.txt ==> 具体文件前没有任何表示时,默认为当前目录 和 ./1.txt 是一个位置
./1.txt ==> ./ 代表当前目录中的 1.txt
../1.txt ==> ../ 代表当前目录中的 上一级目录中的1.txt
绝对路径: ... | [
"35069982+xidaodi@users.noreply.github.com"
] | 35069982+xidaodi@users.noreply.github.com |
cf088118d90ff342c3993518783e8407e3511bf7 | 494aad64e72ed100a884c8fcc8c0907ba399c178 | /articles/migrations/0003_auto_20200717_1531.py | 6342e5b845a1bd59c5b789be2fdbdfb8ce2b62a9 | [] | no_license | maziokey/Newspaper-App | 877fc904bcfe94952b139b3fee7f89d1aa42f601 | d2ed1a650a9d297533d6da90e7d96d27e91ff0a0 | refs/heads/master | 2022-11-18T03:13:25.185632 | 2020-07-17T14:56:50 | 2020-07-17T14:56:50 | 280,452,755 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 490 | py | # Generated by Django 3.0.8 on 2020-07-17 14:31
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('articles', '0002_comment'),
]
operations = [
migrations.AlterField(
model_name='comment',
... | [
"okeyluvsu2004@yahoo.com"
] | okeyluvsu2004@yahoo.com |
b15a2ac36edb6d4bc35cb3bfda2ab22bb4447a1b | 29e91d422f0fcad92f0e25b3dbb9efd39dc01162 | /electronic-station/one-line-drawing.py | 25bfea7dd9668580298643bce015ab26a2f3780c | [] | no_license | cielavenir/checkio | c206410b7d8d368e80ad0f66f6314097bd900bcd | e2dfcdef75cd68ca3cced159225b5433570bd85b | refs/heads/master | 2021-01-22T20:34:29.899146 | 2018-02-22T15:16:21 | 2018-02-22T15:16:21 | 85,328,995 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,020 | py | from collections import defaultdict
def dfs(roads,cur,points,num):
for nxt in points[cur]:
num[nxt]+=2
cur_road=list(sorted([cur,nxt]))
r=None
if num[nxt]<=len(points[nxt]) and cur_road not in roads:
r=dfs(roads+[cur_road],nxt,points,num)
num[nxt]-=2
if r!=None: return [cur]+r
if all(len(points[e])==n... | [
"cielartisan@gmail.com"
] | cielartisan@gmail.com |
0ecb7644f9cfbe85cb7f88894fc8700507809cf4 | d3384a81207c1b6cfd0ff304694fec93727a6771 | /dogapp/urls.py | a94e9012c49417f9f7fa3f525881ae1262045f51 | [] | no_license | jucie15/dogapp | 5b36b4032b7af35ef86da49005602a51bceb5eb6 | 1f8be7c704c36d98474fedd327490a3220a704c0 | refs/heads/master | 2021-01-02T22:52:15.729043 | 2017-08-05T22:30:43 | 2017-08-05T22:30:43 | 99,407,258 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 998 | py | """dogapp URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-bas... | [
"jucie15@nate.com"
] | jucie15@nate.com |
d01c453bb0a1eb84cc26061f47cf2668a51900bd | f546b54b3d5120b7cc5bce9a3ec07b4c380548e9 | /calm/dsl/decompile/file_handler.py | e5fee6019f30547d01b63eae04905d36e9f4a14f | [
"Apache-2.0"
] | permissive | gabybeitler/calm-dsl | 000c1861fbaa061243e78f24bc25d6fdbca9a5d0 | bac453413cfcf800eef95d89d5a7323c83654a93 | refs/heads/master | 2021-07-14T09:00:47.938284 | 2021-03-02T14:43:13 | 2021-03-02T14:43:13 | 238,353,395 | 1 | 0 | null | 2020-02-05T02:42:06 | 2020-02-05T02:42:05 | null | UTF-8 | Python | false | false | 1,373 | py | import os
LOCAL_DIR = None
SCRIPTS_DIR = None
SPECS_DIR = None
BP_DIR = None
LOCAL_DIR_KEY = ".local"
SCRIPTS_DIR_KEY = "scripts"
SPECS_DIR_KEY = "specs"
def make_bp_dirs(bp_dir):
if not os.path.isdir(bp_dir):
os.makedirs(bp_dir)
local_dir = os.path.join(bp_dir, LOCAL_DIR_KEY)
if not os.path.i... | [
"abhijeet.kaurav@nutanix.com"
] | abhijeet.kaurav@nutanix.com |
199a1a6fc8c42b985e005e6a0104dca9e08dbc43 | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/421/usersdata/314/87426/submittedfiles/tomadas.py | 182732d078103dd723da0646a6f90c8d7964ae31 | [] | no_license | rafaelperazzo/programacao-web | 95643423a35c44613b0f64bed05bd34780fe2436 | 170dd5440afb9ee68a973f3de13a99aa4c735d79 | refs/heads/master | 2021-01-12T14:06:25.773146 | 2017-12-22T16:05:45 | 2017-12-22T16:05:45 | 69,566,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 406 | py | # -*- coding: utf-8 -*-
import math
#COMECE SEU CODIGO AQUI
t1=int(input('digite t1: '))
t2=int(input('digite t2: '))
t3=int(input('digite t3: '))
t4=int(input('digite t4: '))
for i in range(0,5,1):
while(t1<1 or t2<1 or t3<1 or t4<1):
t1=int(input('digite t1: '))
t2=int(input('digite t2: '))
... | [
"rafael.mota@ufca.edu.br"
] | rafael.mota@ufca.edu.br |
c5e990b0199da83f612a0fa4ac1be8b4bb1546e9 | b0cc185ca50618c64caf97821eda6f264a917a75 | /setup.py | 01cbe2eb3d6531de5dfbc6a7cb6c3e06f9349618 | [] | no_license | AztecSmith/PyEngineIO-Client | fa77ae11a17613b6d27f1de132baa591c7e4a808 | e2c6fcfc6bba4b8c36090ec4629300856aa5d929 | refs/heads/master | 2021-05-27T16:12:04.923656 | 2014-09-30T23:38:51 | 2014-09-30T23:38:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 681 | py | from setuptools import setup, find_packages
setup(
name='PyEngineIO-Client',
version='1.2.1.1-beta',
url='http://github.com/fuzeman/PyEngineIO-Client/',
author='Dean Gardiner',
author_email='me@dgardiner.net',
description='Client for engine.io',
packages=find_packages(),
platforms='an... | [
"gardiner91@gmail.com"
] | gardiner91@gmail.com |
c70332e8ef33875d1f0ec48efb4f286ba2021f3a | 4cdc90a76a5766cff1bcb297bd7ffc038f5c537a | /backend/api/user_auth/serializers.py | b10592f0591018930a0d0dec78e2ca21cbed9fcb | [] | no_license | gnsaddy/djangocicd | 62fca94d4fbb52ac1ffef21cbde6195aa7e9101e | 8b49c2777ff4e2c8cf1b27f76ae1d1efdb924d8b | refs/heads/main | 2023-06-23T21:32:07.681197 | 2021-07-16T15:48:44 | 2021-07-16T15:48:44 | 386,282,665 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,161 | py | from django.contrib import auth
from django.contrib.auth.models import update_last_login
from rest_framework.response import Response
from rest_framework_simplejwt.exceptions import TokenError, AuthenticationFailed
from rest_framework_simplejwt.serializers import TokenObtainPairSerializer
from rest_framework_simpl... | [
"aditya.x510@gmail.com"
] | aditya.x510@gmail.com |
3582fa376bc661315a7806f49fbd0525d5029316 | 53e58c213232e02250e64f48b97403ca86cd02f9 | /16/mc/ExoDiBosonResonances/EDBRTreeMaker/test/crab3_analysisM2500_R_0-4.py | 656892fc959de47eea0dd5f18dd926abc1651b8e | [] | no_license | xdlyu/fullRunII_ntuple_102X | 32e79c3bbc704cfaa00c67ab5124d40627fdacaf | d420b83eb9626a8ff1c79af5d34779cb805d57d8 | refs/heads/master | 2020-12-23T15:39:35.938678 | 2020-05-01T14:41:38 | 2020-05-01T14:41:38 | 237,192,426 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 2,303 | py | from WMCore.Configuration import Configuration
name = 'WWW/sig'
steam_dir = 'xulyu'
config = Configuration()
config.section_("General")
config.General.requestName = 'M2500_R0-4_off'
config.General.transferLogs = True
config.section_("JobType")
config.JobType.pluginName = 'Analysis'
config.JobType.inputFiles = ['Su... | [
"XXX@cern.ch"
] | XXX@cern.ch |
c9dfde608b02ae4645c4a7b55b829cd7113669f6 | a8278268c366567e92e7e42cbd00ac6dc1c7ca8a | /tensorflow_federated/python/core/templates/estimation_process.py | 81051fb96fc071ee2344f7cd4c896382092cdaa5 | [
"Apache-2.0"
] | permissive | tianya3796/federated | 4e743b98912f9890a9d70af6817f3671e5cdd4b9 | 2abc58ad767f119f3f498900f3fffa68e5198c60 | refs/heads/master | 2022-12-27T19:18:11.798188 | 2020-10-09T00:36:41 | 2020-10-09T00:37:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,304 | py | # Copyright 2020, The TensorFlow Federated 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 applicable law o... | [
"tensorflow.copybara@gmail.com"
] | tensorflow.copybara@gmail.com |
8bdb6e215d3fe86a475a3531cf47a6603d0345ca | a5b4d77e760c6131ba1c5f040265a3b08d3c0478 | /enemy_bot/enemy_bot_level8/burger_war/scripts/service_client.py | 0e7341b568e443d724b5aee09e1b16dfaceca475 | [
"BSD-3-Clause"
] | permissive | kenjirotorii/burger_war_kit | 700b511739299a9d90d23c70262ecf4856d234b7 | d9b1b443f220980a4118c13cdf22174696c3db9c | refs/heads/main | 2023-03-21T23:32:24.415502 | 2021-03-11T15:59:12 | 2021-03-11T15:59:12 | 337,704,943 | 0 | 1 | BSD-3-Clause | 2021-03-11T15:59:13 | 2021-02-10T11:36:22 | Python | UTF-8 | Python | false | false | 301 | py | import rospy
from std_srvs.srv import Empty
import time
if __name__ == "__main__":
rospy.wait_for_service("service_call")
service_call = rospy.ServiceProxy("service_call",Empty)
while True:
# 1秒に1回サービスで通信
service_call()
time.sleep(1)
| [
"you@example.com"
] | you@example.com |
07d846906c2039c3f58ea3d83909a09000239748 | b76615ff745c6d66803506251c3d4109faf50802 | /pyobjc-framework-DeviceCheck/setup.py | 3f9d906f3f61730f361afa0e45f1397c1622cbf2 | [
"MIT"
] | permissive | danchr/pyobjc-git | 6ef17e472f54251e283a0801ce29e9eff9c20ac0 | 62b787fddeb381184043c7ff136f1c480755ab69 | refs/heads/master | 2021-01-04T12:24:31.581750 | 2020-02-02T20:43:02 | 2020-02-02T20:43:02 | 240,537,392 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 697 | py | """
Wrappers for the "DeviceCheck" framework on macOS 10.15 and later.
These wrappers don't include documentation, please check Apple's documention
for information on how to use this framework and PyObjC's documentation
for general tips and tricks regarding the translation between Python
and (Objective-)C frameworks
"... | [
"ronaldoussoren@mac.com"
] | ronaldoussoren@mac.com |
5774d3706ab207616029b0bacdc9d82ca94adb58 | ceead28beb1ea6cb56a2bb4472bc1d2396b39e6f | /gen_basis_helpers/analyse_md/std_stats.py | 2cc870c2ead0d8574f15f0ef23ac77a1b049285f | [] | no_license | RFogarty1/plato_gen_basis_helpers | 9df975d4198bff7bef80316527a8086b6819d8ab | 8469a51c1580b923ca35a56811e92c065b424d68 | refs/heads/master | 2022-06-02T11:01:37.759276 | 2022-05-11T12:57:40 | 2022-05-11T12:57:40 | 192,934,403 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,328 | py |
import math
def calcStandardErrorOfMeanForUncorrelatedData(stdDev, nSamples):
""" Gets the standard error of the mean (essentially the standard deviation of the mean value; used to estimate its error margins) assuming sampling points are uncorrelated
Standard.Error = stdDev / sqrt(nSamples)
Args:
stdDev: (f... | [
"richard.m.fogarty@gmail.com"
] | richard.m.fogarty@gmail.com |
d66cd14a44c84ce857dbb8881ecff6b60762089f | 035963a845a82223094f06e5f844d43d03d1cd6a | /exercises/09_functions/task_9_1.py | 033227c9674ca06f63a9311e51eea75962719b91 | [] | no_license | antonRTJ/pyneng-examples-exercises | 6699ab6e44769be40c1542ffc81152c14b70889c | 4422d320f52f3096c14adb0dffcc0db1d317841d | refs/heads/master | 2021-05-05T21:40:08.543998 | 2017-12-23T14:57:09 | 2017-12-23T14:57:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,274 | py | # -*- coding: utf-8 -*-
'''
Задание 9.1
Создать функцию, которая генерирует конфигурацию для access-портов.
Параметр access ожидает, как аргумент, словарь access-портов, вида:
{ 'FastEthernet0/12':10,
'FastEthernet0/14':11,
'FastEthernet0/16':17,
'FastEthernet0/17':150 }
Функция должна возвраща... | [
"nataliya.samoylenko@gmail.com"
] | nataliya.samoylenko@gmail.com |
9e6026334732b244406c434e8fd565792db49317 | 2da8bcfb9a72e507812a8723e38ad6d030c300f1 | /flood_fill_733.py | 3369a85ae7338dc21c709986a4025add7e344ac1 | [] | no_license | aditya-doshatti/Leetcode | 1a4e0f391a7d6ca2d7f8fdc35e535f4ec10fb634 | eed20da07896db471ea6582785335e52d4f04f85 | refs/heads/master | 2023-04-06T02:18:57.287263 | 2023-03-17T03:08:42 | 2023-03-17T03:08:42 | 218,408,346 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,846 | py | '''
733. Flood Fill
Easy
An image is represented by a 2-D array of integers, each integer representing the pixel value of the image (from 0 to 65535).
Given a coordinate (sr, sc) representing the starting pixel (row and column) of the flood fill, and a pixel value newColor, "flood fill" the image.
To perform a "floo... | [
"aditya.doshatti@sjsu.edu"
] | aditya.doshatti@sjsu.edu |
6d1783909b6899d68e06ba478dd41dfb7a7c831e | 72ce57d187fb6a4730f1390e280b939ef8087f5d | /nuitka/build/inline_copy/lib/scons-3.1.0/SCons/Tool/default.py | 866b823aa485784b0ff390b9219a74fe26efc8be | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | tommyli3318/Nuitka | c5b7681b73d96cb8859210ed1a78f09149a23825 | ae52b56024d53159a72a5acbfaac792ca207c418 | refs/heads/develop | 2020-05-02T17:02:10.578065 | 2019-10-27T15:53:32 | 2019-10-27T15:53:32 | 178,086,582 | 1 | 0 | Apache-2.0 | 2019-06-06T00:32:48 | 2019-03-27T22:53:31 | Python | UTF-8 | Python | false | false | 1,753 | py | """SCons.Tool.default
Initialization with a default tool list.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001 - 2019 The SCons Foundation
#
# Permission is hereby granted, free of cha... | [
"kay.hayen@gmail.com"
] | kay.hayen@gmail.com |
e2d0a203ca2e2382431176af8da1ed0ab9efec5b | b18ff1d2a88cdad6d8ca73a8e6c34943f7bee055 | /toolcall/defaults.py | dd6bd85611e6c66052de01dc4bd15b7306bd76f2 | [
"MIT"
] | permissive | thebjorn/toolcall | 9c812d608a67990dfb04b4e8bc1ebfcd4e7440c3 | 2c1597c8224958b4751cfb09f7a1b4439ca6df09 | refs/heads/master | 2021-06-13T21:33:12.495795 | 2019-08-31T10:50:55 | 2019-08-31T10:50:55 | 147,824,176 | 0 | 0 | MIT | 2021-06-10T20:46:47 | 2018-09-07T13:02:31 | HTML | UTF-8 | Python | false | false | 884 | py | # -*- coding: utf-8 -*-
from django.conf import settings
def _get(attr, default=None):
return getattr(settings, attr, default)
if settings.DEBUG:
TOOLCALL_TOKEN_TIMEOUT_SECS = 200
else:
TOOLCALL_TOKEN_TIMEOUT_SECS = _get('TOOLCALL_TOKEN_TIMEOUT_SECS', 10)
TOOLCALL_TOKEN_SIZE = _get('TOOLCALL_TOKEN_SIZE'... | [
"bp@datakortet.no"
] | bp@datakortet.no |
3d7613ea2ecad847eb249f75b64eded8a16d31ab | ad5b72656f0da99443003984c1e646cb6b3e67ea | /tools/mo/openvino/tools/mo/back/LinearToLinearONNXReplacer.py | 7c11672b5a3d3b1b997226463cc4bbc43fa7919e | [
"Apache-2.0"
] | permissive | novakale/openvino | 9dfc89f2bc7ee0c9b4d899b4086d262f9205c4ae | 544c1acd2be086c35e9f84a7b4359439515a0892 | refs/heads/master | 2022-12-31T08:04:48.124183 | 2022-12-16T09:05:34 | 2022-12-16T09:05:34 | 569,671,261 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,346 | py | # Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
from openvino.tools.mo.back.InterpolateReshape import InterpolateConcat, InterpolateReshapeWA
from openvino.tools.mo.back.replacement import BackReplacementPattern
from openvino.tools.mo.graph.graph import Graph
class LinearToLinearONN... | [
"noreply@github.com"
] | novakale.noreply@github.com |
c7fcf71168896ce7ef086bfebc45389f64281412 | e63132f40675ca4f37af653952cac27649e5b548 | /trax/trainer_flags.py | 0ebb9edef726abfa30976eb25c44d82239609bdb | [
"Apache-2.0"
] | permissive | Dithn/trax | 9286b265741700e4e52044c50c01e01f70bf739e | c6513908602e934e5472f299851d84a53c8afcff | refs/heads/master | 2023-04-09T19:15:13.663285 | 2021-04-27T00:14:29 | 2021-04-27T00:15:41 | 234,445,011 | 0 | 0 | Apache-2.0 | 2021-04-27T11:37:58 | 2020-01-17T01:25:16 | Python | UTF-8 | Python | false | false | 3,647 | py | # coding=utf-8
# Copyright 2021 The Trax 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 applicable law or a... | [
"copybara-worker@google.com"
] | copybara-worker@google.com |
f627b1a808d5fa423185b2663584494a0ea59c6d | ff3830556ac86e9f92f8d85379bb8099cff014bd | /application/__init__.py | 5e1224c74053c1fc36922c5780c3dc33e58c72f0 | [] | no_license | tarvitz/test-work | f34153cd794842ea7b479d6b2b3226e65cd03feb | e35e0248cddcaf3d0a59ae7ad87883c146829809 | refs/heads/master | 2016-09-05T11:14:40.147068 | 2014-07-07T10:33:39 | 2014-07-07T10:33:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 185 | py | # coding: utf-8
"""
Initialize Flask app
"""
from flask import Flask
app = Flask(__name__)
app.config.update({
'OBJECTS_ON_PAGE': 20
})
# Pull in URL dispatch routes
import urls | [
"tarvitz@blacklibrary.ru"
] | tarvitz@blacklibrary.ru |
72da1a452e300f4724452c7911137f4739eabc26 | 09d564aaab98f72dce6585e78a0642c9fe3539f4 | /python_xy/test.py | c6d52baf251d2a569af71a4aa24c5d7067ea144d | [] | no_license | everydayxy/xy_py | 4b983b4bccc843602f1ea0b1d5ea9576119604bf | 08b314e7ecb10e13394aa93b92084c53596834f3 | refs/heads/master | 2020-04-03T08:52:44.729729 | 2019-09-20T15:05:35 | 2019-09-20T15:05:35 | 134,683,779 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 952 | py | # #!/usr/bin/env python
# # coding:utf8
#
# f = open('xuqiu20181029.csv','r')
# new_dict = {}
# for line in f:
# parts = line.split('|')
# if int(parts[11]) == 2:
# if parts[2] in new_dict:
# new_dict[parts[2]] += int(parts[10])
# else:
# new_dict[parts[2]] = int(parts[10... | [
"everydayx@163.com"
] | everydayx@163.com |
d2429aa83f66ddc5d8393ba6fb8f875d920982e7 | e2eb7237ba115b18d9dde7fedf35f7c6387f6e2a | /wwp/migrations/versions/fe4855cc93a7_.py | dfa5c7cc5f68dd3b042aae08a83f19ee057836d3 | [] | no_license | dr-hemam/colp1 | 7854398958a43b4d5db708ff6b324c415c117eb2 | 7aab3587a9c4c4ec9442d92d26b175ae8f4fa40c | refs/heads/master | 2020-03-16T13:59:21.948476 | 2018-05-09T05:18:31 | 2018-05-09T05:18:31 | 132,704,471 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 900 | py | """empty message
Revision ID: fe4855cc93a7
Revises: 9f00a5849e88
Create Date: 2017-06-09 09:00:03.546084
"""
# revision identifiers, used by Alembic.
revision = 'fe4855cc93a7'
down_revision = '9f00a5849e88'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
def upgrade():
# ##... | [
"hassan.emam@hotmail.com"
] | hassan.emam@hotmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.