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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4496d5f07d39a193ef3fbfd8710da46756d19ecc | c62dbc5715fe80e106a666a8f7a6aeb051d0b40e | /analytical_solution.py | 016425a97e584c740f05ad933c74f8b757d5a4e2 | [] | no_license | mishaukr7/MM_LAB_5 | 14ebb2c8553cfb1f1b13293e6160294fb2684a9c | 610a623d1a63ddf0c231575c2b78c4fc1bb4a454 | refs/heads/master | 2021-08-23T15:16:34.096484 | 2017-12-05T09:03:46 | 2017-12-05T09:03:46 | 113,076,772 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 500 | py | import math
def analytical_method_find_solution_free(t0, N0, r, T):
N = []
time = []
for t in range(t0, T+1):
N_new = N0*math.exp(r*(t-20))
N.append(N_new)
time.append(t)
return time, N
def analytical_method_find_solution_limited(t0, N0, r, k, T):
N = []
time = []
... | [
"mishaukr22@gmail.com"
] | mishaukr22@gmail.com |
e92090672df6dbc77947cca8dd3f20b98894a501 | 98c6ea9c884152e8340605a706efefbea6170be5 | /examples/data/Assignment_2/rffada002/question2.py | 5ad1e0412877bdf376192722edcf2c9130f0adb5 | [] | no_license | MrHamdulay/csc3-capstone | 479d659e1dcd28040e83ebd9e3374d0ccc0c6817 | 6f0fa0fa1555ceb1b0fb33f25e9694e68b6a53d2 | refs/heads/master | 2021-03-12T21:55:57.781339 | 2014-09-22T02:22:22 | 2014-09-22T02:22:22 | 22,372,174 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,664 | py | print ("Welcome to the 30 Second Rule Expert")
print ("------------------------------------")
print ("Answer the following questions by selecting from among the options.")
seen=input("Did anyone see you? (yes/no)\n")
if (seen == 'no'):
sticky=input("Was it sticky? (yes/no)\n")
if (sticky == 'no'):
... | [
"jarr2000@gmail.com"
] | jarr2000@gmail.com |
6d164cfc391db5ee4400cf4280c951a39b8e146a | 443585e4fc146308b18bc2f9234d0947da38d3e5 | /practice/yj/csv/Quiz2.py | cc4f15f0435d1e5ad3b650c79dc1a5fe19b07be9 | [] | no_license | ggyudongggyu/20201208commit | b524c4a7fb241cacaacffa5882c55d1d0ccba11f | fbb58a8ed06f454a2a79a9b8c75deabaec62b317 | refs/heads/master | 2023-02-02T21:59:51.518218 | 2020-12-24T14:32:21 | 2020-12-24T14:32:21 | 319,578,473 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 400 | py | from matplotlib.pyplot import *
title('plot graph')
plot([1, 2, 3, 4], [10, 20, 30, 40], marker='.', color= 'green', label = '1st')
plot([1, 2, 3, 4], [30, 15, 25, 10], marker= '^' ,color = 'pink', label = '2nd')
# plot([1, 2, 3, 4], [15, 25, 15, 25], linestyle= '-.' ,color = 'red', label = '3rd')
# plot([1, 2, 3, 4], ... | [
"donggyu0219@gmail.com"
] | donggyu0219@gmail.com |
daaf7110d0464d08291fb7f7a191cb8182631fa6 | 27040f0d537c1898c9f1fce4db68b24588840987 | /7. Reverse Integer.py | 834d39db9bf66caba7c2392e1009abf6fb37a850 | [] | no_license | xtanmaygarg/LeetCodeSolutions | 0197474e92d4ef14676342d00933e764f8b29581 | 5fd06d2f0da222977c1ae6e4d219a682b3596341 | refs/heads/master | 2021-06-14T09:39:37.795785 | 2020-12-04T10:44:07 | 2020-12-04T10:44:07 | 254,488,075 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 252 | py | class Solution:
def reverse(self, x: int) -> int:
if x >= 0:
res = int(str(x)[::-1])
else:
res = -int(str(x)[1:][::-1])
if -2**31 <= res <= (2**31-1):
return res
return 0
| [
"xtanmaygarg@gmail.com"
] | xtanmaygarg@gmail.com |
7cd5bf667dfd5853848da023118f67243641925b | e1adcd0173cf849867144a511c029b8f5529b711 | /ros_ws/Archive/ProductFiles20180213/positionControlPackage.py | c6e35e7f5eaadfa197321d29d10af5ea39366fea | [] | no_license | adubredu/cartbot_arm_subsystem | 20a6e0c7bacc28dc0486160c6e25fede49f013f2 | 3e451272ddaf720bc7bd24da2ad5201b27248f1c | refs/heads/master | 2022-01-04T23:01:25.061143 | 2019-05-14T16:45:02 | 2019-05-14T16:45:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,466 | py | import argparse
import sys
import struct
import time
import json
import rospy
from math import *
from std_msgs.msg import (
UInt16,
)
from StringIO import StringIO
import baxter_interface as baxter
import speech_recognition as SR
from geometry_msgs.msg import (
PoseStamped,
Pose,
Point,
Quate... | [
"alphonsusbq436@gmail.com"
] | alphonsusbq436@gmail.com |
efd021c0316156776876ce0abeeb3c3283a39a3d | eea3f04dc73d4536083c74cac4478835a31c4a94 | /chinese_song_generation/data_utils.py | 75424c8a5cc4c880bf635faf9ab900953138832f | [] | no_license | yscoder-github/news-generate | 15d5f9acecc92add201fb3c53aa211c0aa474e1f | 6b8a98375db984dea9edb4abff72191477bdb406 | refs/heads/master | 2023-05-26T19:58:00.797573 | 2019-07-18T01:30:36 | 2019-07-18T01:30:36 | 187,489,859 | 4 | 4 | null | 2023-05-22T22:14:54 | 2019-05-19T14:50:32 | Python | UTF-8 | Python | false | false | 5,906 | py | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"yscoder@foxmail.com"
] | yscoder@foxmail.com |
2d7098cb8174e3779d78a54cffcff3d299651034 | 5174346f6bd374cc8873a41ed336b7545756d753 | /examples/prompts/toolbar-prompt.py | ff31c5f2951a01c99352e655915d09e1f94ff7bc | [
"BSD-3-Clause"
] | permissive | calebstewart/python-prompt-toolkit | f06dd911399b75e9d4985b485a3e9897c04bf1d6 | 3f9f9a927b2d1a208e59af73e574825df2901e69 | refs/heads/master | 2022-07-02T16:23:24.682709 | 2020-05-14T22:45:14 | 2020-05-14T22:45:14 | 263,998,820 | 1 | 0 | null | 2020-05-14T18:51:02 | 2020-05-14T18:51:01 | null | UTF-8 | Python | false | false | 260 | py | #!/usr/bin/env python
"""
Prompt for user input as a toolbar which disappears after submission.
"""
from prompt_toolkit import prompt
if __name__ == "__main__":
answer = prompt(message="prompt$ ", prompt_in_toolbar=True)
print(f"You said: {answer}")
| [
"caleb.stewart94@gmail.com"
] | caleb.stewart94@gmail.com |
a44c312b288d21db66156e2ee38ac70257256d20 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02918/s539072224.py | 2dbe24e4788b05696bc3160ba49b9b37d37af922 | [] | 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 | 810 | py | import sys
import numpy as np
input = lambda: sys.stdin.readline().rstrip()
INF = 10**9 + 1
def solve():
N, K = map(int, input().split())
S = np.array(list(input()), dtype='str')
if N == 1:
print(0)
exit()
ri = INF
kc = 0
fs = S[0]
if fs == 'R':
nfs = 'L'
else... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
fb2dac07af82c220e6e4a2f95942ed4fa435a178 | 6ffa236a008d1cd1dc70f2c8ea0544d20ec350ee | /aries_cloudagent/messaging/issue_credential/v1_0/messages/credential_stored.py | 59973aa3320b3ad20a261d63f724ad3d305ab2b3 | [
"Apache-2.0"
] | permissive | blockpass-identity-lab/aries-fl-demo | 99e849f782dd80e729e3fe24c3af2881c5c49dca | 310b748c1ac2e814ec6f97c46ddbb9985584e0fc | refs/heads/master | 2022-07-06T18:37:16.007582 | 2020-04-23T15:48:33 | 2020-04-23T15:48:33 | 221,698,330 | 5 | 0 | Apache-2.0 | 2021-02-26T02:40:03 | 2019-11-14T12:58:58 | Python | UTF-8 | Python | false | false | 911 | py | """A credential stored message."""
# from marshmallow import fields
from ....agent_message import AgentMessage, AgentMessageSchema
from ..message_types import CREDENTIAL_STORED
HANDLER_CLASS = (
"aries_cloudagent.messaging.issue_credential.v1_0.handlers."
"credential_stored_handler.CredentialStoredHandler"
)... | [
"srklump@hotmail.com"
] | srklump@hotmail.com |
8b3a97ebe43ae145f472de830429cf5e306e5269 | 5c902cfea2856b5b591a9e4de4ecf7d66d01c3a0 | /백준/기초1/수학1/나머지.py | 36861f45235b2a9988962ca407e259b38e24cc23 | [] | no_license | VIXXPARK/pythonAlgorithm | 9cbedf1e9dc387756bed1793081be90e77daf9e8 | 8675fc0e078d90620ecf9dae95c1ccd6bcd36d37 | refs/heads/main | 2023-05-29T10:41:51.900075 | 2021-06-17T23:28:51 | 2021-06-17T23:28:51 | 316,072,889 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 140 | py | import sys
a,b,c= map(int,sys.stdin.readline().rstrip().split())
print((a+b)%c)
print(((a%c)+(b%c))%c)
print((a*b)%c)
print(((a%c)*(b%c))%c) | [
"vixx170627@gmail.com"
] | vixx170627@gmail.com |
4c2bdb7c3c1f0ffd2ca09b91c2b25d6b3bd6dc4c | ebd5c4632bb5f85c9e3311fd70f6f1bf92fae53f | /PORMain/pirates/effects/DarkPortal.py | 0cf27ecf8deadbcfe7623641ee7db325b3b0db04 | [] | no_license | BrandonAlex/Pirates-Online-Retribution | 7f881a64ec74e595aaf62e78a39375d2d51f4d2e | 980b7448f798e255eecfb6bd2ebb67b299b27dd7 | refs/heads/master | 2020-04-02T14:22:28.626453 | 2018-10-24T15:33:17 | 2018-10-24T15:33:17 | 154,521,816 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,813 | py | from panda3d.core import TransparencyAttrib
# File: D (Python 2.4)
from direct.interval.IntervalGlobal import *
from PooledEffect import PooledEffect
from EffectController import EffectController
from otp.otpbase import OTPRender
import random
class DarkPortal(PooledEffect, EffectController):
def __init__(self):... | [
"brandoncarden12345@gmail.com"
] | brandoncarden12345@gmail.com |
93048f8876fc96b4c7fd4bda1e6719756d628118 | 222d4f2dfb63a66b5de274b785cb92393a2e0fe9 | /after6pm_191113/04.py | 17381eb6ff56e9032c7c90fbf870c88dae44464e | [] | no_license | GyuReeKim/PycharmProjects | fd2584c3ff1369510a7f246f2089cefb77035d9d | dd4f0e15b4e72c68b054489c54f24fa0ba5b9ed3 | refs/heads/master | 2020-07-03T11:44:54.951147 | 2019-11-21T00:07:43 | 2019-11-21T00:07:43 | 201,894,857 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 217 | py | # 연구소
# 벽세우기
import sys
sys.stdin = open('04.txt', 'r')
def f(i, j, lab):
pass
N, M = map(int, input().split())
lab = [list(map(int, input().split())) for _ in range(N)]
print(lab)
f(0, 0, lab) | [
"starkim96@naver.com"
] | starkim96@naver.com |
524b26645d22e5350ca96393ae4a8f8c7410257e | 4c76dbfaa8f2ca33945e303be90b579c79bd4008 | /renesola/apps/freight/management/commands/build_angular_js.py | 50d8bdd16a9ceccc64c3c8823bb5058badf95821 | [] | no_license | fogcitymarathoner/renasola | 42c32243df4e4c1246d9a85cfb9251aed2264309 | 9089dcc0ffc57a76799f5e99244df644256e08ea | refs/heads/master | 2021-01-11T00:32:40.358446 | 2016-10-10T18:49:50 | 2016-10-10T18:49:50 | 70,517,907 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 362 | py | __author__ = 'marc'
from django.core.management.base import BaseCommand
from django.conf import settings
import os
from renesola_lib.angular_helpers import build_js
class Command(BaseCommand):
"""
field delimiter ';'
text delmiter '"'
"""
args = ''
help = ''
def handle(self, ... | [
"marc@fogtest.com"
] | marc@fogtest.com |
d54db077ad045ae5605a1a04b178f9fac106b3ab | 30a456e3012c663782d2a07a0ff67c377d63790d | /data/ass2json.py | 08561f2f6f0db1ff52593268932f24b680e40cf8 | [
"MIT"
] | permissive | akx/my-video | 41099725fd96f369a1e8e671667e2e7be3256f42 | b1135809f81a34026536d1a8532390dc5f1c7945 | refs/heads/master | 2021-01-24T10:30:53.608241 | 2016-10-01T18:30:34 | 2016-10-01T18:30:34 | 69,733,122 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,283 | py | import argparse
import re, json
import sys
K_RE = re.compile(r'(\{\\k([0-9]+)\})')
def parse_time(dt):
h, m, s, hs = [float(int(p, 10)) for p in re.split('[:.,]', dt)]
return h * 60 * 60 + m * 60 + s * 1 + hs / 100.0
def parse_ass(infp):
for line in infp:
if not line.startswith('Dialogue:'):
... | [
"akx@iki.fi"
] | akx@iki.fi |
cb7fb08c690282edfd833933070c697f756dcb10 | 0fccee4c738449f5e0a8f52ea5acabf51db0e910 | /genfragments/ThirteenTeV/ADD/ADDmonoPhoton_MD_1_d_8_TuneCUETP8M1_13TeV_pythia8_cfi.py | 302e89726365a986e9049cc298156fb6aa79d2a4 | [] | 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 | 1,425 | py | import FWCore.ParameterSet.Config as cms
from Configuration.Generator.Pythia8CommonSettings_cfi import *
from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import *
generator = cms.EDFilter("Pythia8GeneratorFilter",
maxEventsToPrint = cms.untracked.int32(1),
pyt... | [
"sheffield@physics.rutgers.edu"
] | sheffield@physics.rutgers.edu |
45aad19c79479fd3824ea58eb7d7717279b0b008 | 6858cbebface7beec57e60b19621120da5020a48 | /ply/modimport.py | f82d08c44b979f0b39be6a4dfe34acf53fbfc6e1 | [] | no_license | ponyatov/PLAI | a68b712d9ef85a283e35f9688068b392d3d51cb2 | 6bb25422c68c4c7717b6f0d3ceb026a520e7a0a2 | refs/heads/master | 2020-09-17T01:52:52.066085 | 2017-03-28T07:07:30 | 2017-03-28T07:07:30 | 66,084,244 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 233 | py | >>> import tokrules
>>> lexer = lex.lex(module=tokrules)
>>> lexer.input("3 + 4")
>>> lexer.token()
LexToken(NUMBER,3,1,1,0)
>>> lexer.token()
LexToken(PLUS,'+',1,2)
>>> lexer.token()
LexToken(NUMBER,4,1,4)
>>> lexer.token()
None
>>> | [
"dponyatov@gmail.com"
] | dponyatov@gmail.com |
4d620495621fd8734bc2f5085f0814fab0602439 | db6d37fcf5545acd3dd9910674c0f43c90410e0a | /iterminal/controllers.py | 88f3f762f83c05c23a9cf06bbd3546a14f2d520a | [] | no_license | capalmer1013/i | 629bb44b4640fc91be883ca2e47c6a3d81f51a0b | 4e0bc895ad232cad7dfefefec35a67346da6794b | refs/heads/master | 2023-02-23T02:35:44.270400 | 2022-04-27T03:04:21 | 2022-04-27T03:04:21 | 86,883,795 | 0 | 0 | null | 2023-02-16T00:32:58 | 2017-04-01T04:29:44 | Python | UTF-8 | Python | false | false | 519 | py | import curses
from iterminal.constants import UP, DOWN, LEFT, RIGHT
def inputController(stdscr, p):
while True:
key = stdscr.getch()
#stdscr.addstr(0, 0, str(key))
dirDict = {curses.KEY_UP: UP, curses.KEY_DOWN: DOWN, curses.KEY_LEFT: LEFT, curses.KEY_RIGHT: RIGHT}
shootDict = {ord(... | [
"capalmer1013@gmail.com"
] | capalmer1013@gmail.com |
5588811602468117dcf4c2c815b823cd9c66efd6 | 0bb474290e13814c2498c086780da5096453da05 | /abc151/C/main.py | de4737e84810f2b025becf5752de28655a3a7833 | [] | no_license | ddtkra/atcoder | 49b6205bf1bf6a50106b4ae94d2206a324f278e0 | eb57c144b5c2dbdd4abc432ecd8b1b3386244e30 | refs/heads/master | 2022-01-25T15:38:10.415959 | 2020-03-18T09:22:08 | 2020-03-18T09:22:08 | 208,825,724 | 1 | 0 | null | 2022-01-21T20:10:20 | 2019-09-16T14:51:01 | Python | UTF-8 | Python | false | false | 1,054 | py | #!/usr/bin/env python3
import sys
sys.setrecursionlimit(10000000)
INF = 1<<32
def solve(N: int, M: int, p: "List[int]", S: "List[str]"):
dp = [[0, 0] for i in range(N+1)]
for i in range(M):
if S[i] == 'AC':
dp[p[i]][0] = 1
else:
if dp[p[i]][0] == 0:
... | [
"deritefully@gmail.com"
] | deritefully@gmail.com |
f17025743fc841a91077662b31a3cb066d361be2 | a5e5d39f42f468d35f18aab3e78c3c090046b0df | /apps/contacts/forms.py | 72c512374bed6f2e74a37ac9c50a2a1151e9ee6e | [] | no_license | WayneLambert/portfolio | 66198dfc18b3f254e6bc726575903c3e8f570dc4 | 7e02165386e4784f81e15bae0325a77cf45f410d | refs/heads/main | 2023-02-04T18:08:13.559223 | 2023-01-29T14:13:59 | 2023-01-29T14:13:59 | 180,239,669 | 5 | 1 | null | 2023-02-04T07:07:10 | 2019-04-08T22:02:22 | JavaScript | UTF-8 | Python | false | false | 568 | py | from django import forms
from captcha.fields import ReCaptchaField
from captcha.widgets import ReCaptchaV3
from apps.contacts.models import Contact
class ContactForm(forms.ModelForm):
class Meta:
model = Contact
fields = ('first_name', 'last_name', 'email', 'message')
captcha = ReCaptchaFi... | [
"wayne.a.lambert@gmail.com"
] | wayne.a.lambert@gmail.com |
9eeb6493e7ffc4de7c553d77979a09da3caeaa1e | 8e1668e35a8df9968ab14d16db089b51dbe6dd51 | /python/algorithms/contests/four_divisors.py | 77b0e61ed7442f35a879a90753b56c9b384e7f7b | [] | no_license | Chalmiller/competitive_programming | f1ec0184d1ff247201522ab90ca8e66b3f326afc | b437080d1ba977c023baf08b7dc5c3946784e183 | refs/heads/master | 2021-03-24T05:11:59.383916 | 2020-08-24T22:07:41 | 2020-08-24T22:07:41 | 247,519,998 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 557 | py | from typing import *
class Solution:
def sumFourDivisors(self, nums: List[int]) -> int:
divisors = 0
for i in nums:
num_divisor = []
for j in range(i+1):
if len(num_divisor) > 4:
break
if i%(j+1) == 0:
... | [
"chalmiller1@gmail.com"
] | chalmiller1@gmail.com |
854a857b9eedc99be8a2332e23c37f43e09f4bc4 | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /FjiriGn8gc5RE8Xm2_7.py | efeef575fedcd049a250bbc0cfb0345e324e582a | [] | 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,014 | py | """
Write a function that takes `fuel` (liters), `fuel_usage` (liters/100km),
`passengers`, `air_con` (boolean) and returns maximum distance that car can
travel.
* `fuel` is the number of liters of fuel in the fuel tank.
* `fuel_usage` is basic fuel consumption per 100 km (with the driver inside only).
* Ever... | [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
759453a9942cf164858e0646369370b634ed8630 | 751300a23242cfe393f86ff489339ffc81319efc | /speaker_spotting/speaker_spotting_oracle_cluster2-dev.py | 9ee8cd16ac65ab6ad961b195a92ffb3714d90be2 | [] | no_license | yinruiqing/speaker_spotting | bc349791a59c6caa2a840fb39aa1d4c1221f99e9 | c2fbdcbf2885d9545abe8bf1e19b2c412b0680ee | refs/heads/master | 2021-05-04T14:39:33.213405 | 2018-05-03T10:28:11 | 2018-05-03T10:28:11 | 120,207,231 | 2 | 4 | null | null | null | null | UTF-8 | Python | false | false | 4,962 | py |
# coding: utf-8
# ```bash
# $ pip install pyannote.metrics==1.4.1
# $ pip install pyannote.db.odessa.ami==0.5.1
# ```
import clustering
import numpy as np
from pyannote.audio.features import Precomputed
precomputed = Precomputed('/vol/work1/bredin/speaker_spotting/embeddings')
from pyannote.database import get_pr... | [
"yinruiqing110@gmail.com"
] | yinruiqing110@gmail.com |
537b1e6af4b96fd09dba3bd4344c38fb66b9ca65 | d4e9a392d7465a5c10417364dd91cd5dd3c5d935 | /app/preprocess.py | d0fbfc80e4a532a5803e9d7632c2c1743c42d9e6 | [] | no_license | MaayanLab/harmonizome-ml | 045f866bac4683a23dd8a393e48f9f09bb08c35d | 5cebd194d771b1d7eabeb65a1c81ce0c78bf7a80 | refs/heads/master | 2020-03-21T13:26:26.132737 | 2020-03-05T22:46:38 | 2020-03-05T22:46:38 | 138,605,770 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,905 | py | #!/usr/bin/env python
import os
import nbformat
from flask import render_template
from . import app
from .model import build_fields
from .runtime import ipynb_import_from_file
from .template.nbtemplate_parse import parse_fields
from .util import app_dir, globalContext
@app.template_filter('filter')
def reverse_filter... | [
"u8sand@gmail.com"
] | u8sand@gmail.com |
a99dbdf037c0559627072edbf0cd2f7e24983bb2 | 01f77b70dfb8817a913414fd25d9ed44ba3cd1f4 | /oscar_invoices/urls.py | 1bc931c736f24795068621e2e1d47790be762a5e | [] | no_license | luiz158/django-oscar-invoices | ca2cf8b70347000399c5316532aca7e52d0f77a3 | 9cc3425410641a95832bda93155e4d2bfa95ac7e | refs/heads/master | 2023-07-02T22:21:03.318698 | 2020-10-06T16:01:02 | 2020-10-06T16:01:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 190 | py | from django.urls import re_path
from . import views
app_name = "oscar_invoices"
urlpatterns = [
re_path(r"invoice/(?P<pk>\d+)/", views.InvoicePreviewView.as_view(), name="invoice"),
]
| [
"sasha@sasha0.ru"
] | sasha@sasha0.ru |
40c7a96a66c6ce84439222e54679cc51149bc0ba | a86293a2033c06410aa8ed19bcbce8ca55ea3c55 | /src/client_libraries/python/dynamics/customerinsights/api/models/cds_org_info.py | e414e4e2f31a4ed4afa9f160f9258d839d0aa435 | [
"LicenseRef-scancode-generic-cla",
"MIT"
] | permissive | ramotheonly/Dynamics365-CustomerInsights-Client-Libraries | a3ca28aa78d2b5509e65d9895ff4a0d42d05f611 | e00632f7972717b03e0fb1a9e2667e8f9444a0fe | refs/heads/main | 2023-08-02T08:09:04.063030 | 2021-09-28T22:42:15 | 2021-09-28T22:42:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,154 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from ... | [
"michaelajohnston@mac.com"
] | michaelajohnston@mac.com |
b92defed3b5e8993f941de86c1d080d39aa48810 | c73beb04d101ca8d98c9126b1c47b4f19cc35066 | /week1/calculator.py | f7f372af8b41c269b4a182934923f6716834ac12 | [] | no_license | fywest/python | a5ecf62e1f8cdf59c936da81b478c371f169aec4 | cd97438679d8e129b3cb75d76226b16e7e7850ac | refs/heads/master | 2022-12-13T06:15:04.021492 | 2019-05-28T19:21:18 | 2019-05-28T19:21:18 | 130,403,136 | 0 | 0 | null | 2022-12-08T05:08:55 | 2018-04-20T19:02:57 | Python | UTF-8 | Python | false | false | 929 | py | import sys
if __name__=='__main__':
if len(sys.argv)<2:
print("please input salary amount")
exit(1)
print(sys.argv[1])
try:
amount=int(sys.argv[1])
tax=0.0
amount_fortax=0.0
amount_fortax=amount-0-3500
if amount_fortax<=0:
tax=0;
e... | [
"fywest2109@hotmail.com"
] | fywest2109@hotmail.com |
ad796b01f49b7944d7c81a65fdb929ca1235c040 | 64ec8731553aa08c33373b212bbe431b1a23b97c | /test/util/util_spatial.py | 74e2b2692deec5adc94efe1ca8e6186db7ba6e48 | [
"BSD-3-Clause",
"MIT"
] | permissive | ChetanNathwani/pyrolite | 98947fde265b25beea839f24495d68bbdb726eed | 8de9c67855305115517418e127bf26de84ff062d | refs/heads/master | 2023-07-26T18:57:28.024540 | 2021-07-08T09:19:02 | 2021-07-08T09:19:02 | 367,300,779 | 0 | 0 | NOASSERTION | 2021-05-14T09:23:47 | 2021-05-14T08:35:50 | null | UTF-8 | Python | false | false | 7,785 | py | import unittest
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
try:
import cartopy.crs as ccrs
HAVE_CARTOPY = True
except ImportError:
HAVE_CARTOPY = False
from pyrolite.util.spatial import *
from pyrolite.util.math import isclose # nan-equalling isclose
class TestGreatCircleDis... | [
"morgan.j.williams@hotmail.com"
] | morgan.j.williams@hotmail.com |
a0cb1eee0ce7279e519465175cbaff109ed4fb60 | e3365a497b6f3afa7afc36381f7a7d1752f09610 | /.venv/bin/jupyter-notebook | 70ee2fde73f1c59914cde9b01c22c06f382ee6ce | [] | no_license | MohamadSheikhAlshabab/Chess_Board- | 4229f7044831b79a8b8b6662a2aea5753d11c7dc | ee2e69d4567b69559584d0b074d91a25793db2f7 | refs/heads/master | 2022-12-08T05:10:59.482582 | 2020-09-04T16:34:18 | 2020-09-04T16:34:18 | 291,529,208 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 250 | #!/home/mohamad/401/chess_board/.venv/bin/python3
# -*- coding: utf-8 -*-
import re
import sys
from notebook.notebookapp import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
| [
"alshabab.moh@gmail.com"
] | alshabab.moh@gmail.com | |
9ad30ee9734df856d50edf0d943d9924d00ca67a | 1c8bcd2d8e129a92e3328f47d2a452814c033327 | /kaggle/otto-group-product-classification-challenge/script_30.py | 2250ea4fb9cf07c4c72a3fb83dcb6c31ab8ca81f | [
"MIT"
] | permissive | josepablocam/janus-public | 425334706f9a4519534779b7f089262cf5cf0dee | 4713092b27d02386bdb408213d8edc0dc5859eec | refs/heads/main | 2023-03-08T15:21:12.461762 | 2021-02-25T20:53:02 | 2021-02-25T20:53:02 | 314,606,918 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,253 | py | import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
from sklearn.model_selection import train_test_split
from sklearn.feature_extraction.text import TfidfTransformer
import lightgbm as lgb
pd.set_option('display.max_columns', 100)
pd.set_option('display.max_rows',... | [
"jcamsan@mit.edu"
] | jcamsan@mit.edu |
ecbea36070dd712629e55b616938b75491ba10b9 | 3a8f8bef453f5eb01cc6f22d8bb140d7791024df | /command/tcommand.py | add4fd8bf60184b1755ced53d3534642b3e2870a | [] | no_license | thomasvs/python-command | 23a68de2ce596a7eed5a2740a5ee1471f62ed569 | 4c31072e9f5f68e22c92cdc8f0a02d911b7e5fc0 | refs/heads/master | 2020-05-02T11:29:24.459355 | 2014-09-07T22:23:58 | 2014-09-07T22:23:58 | 5,668,726 | 0 | 3 | null | null | null | null | UTF-8 | Python | false | false | 5,146 | py | # -*- Mode: Python -*-
# vi:si:et:sw=4:sts=4:ts=4
"""
A helper class for Twisted commands.
"""
from twisted.internet import defer
from twisted.python import failure
import command
class TwistedCommand(command.Command):
"""
I am a Command that integrates with Twisted and its reactor.
Instead of implemen... | [
"thomas (at) apestaart (dot) org"
] | thomas (at) apestaart (dot) org |
79f50a378ab45f7801f359d695045b821ff47443 | b7125b27e564d2cc80a2ce8d0a6f934aa22c8445 | /.history/sudoku_20201101154742.py | c093972aa62bcc31bf99b51feb72a76950605747 | [] | no_license | JensVL96/Puzzle-solver-for-fun | 4c15dcd570c3705b7ac555efb56b52913e81083c | 6d8a4378a480372213a596a336a4deca727a00fc | refs/heads/master | 2021-07-15T05:19:42.185495 | 2020-11-08T13:59:49 | 2020-11-08T13:59:49 | 224,855,888 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,829 | py | # -*- coding: utf-8 -*-
from __future__ import print_function
from config import *
from create_board import *
from solve_bloard import *
from display_board import *
from string import *
from math import floor
import pygame as pg
import numpy as np
# For error highlighting
def set_highlight(row, col, blk, lock):
g... | [
"jle040@uit.no"
] | jle040@uit.no |
d4533f4cdf53a8a902ef0e5e52f13d6ae690bf32 | cfc3fa658f826d02308453e557d82758895399c2 | /datasets/id_newspapers_2018/id_newspapers_2018.py | 96a294e8fc22502654396c9ba5f85efe68734ddd | [
"Apache-2.0",
"CC-BY-4.0"
] | permissive | meehawk/datasets | cac530ec0e17514c01cdff30302521d6303ed93b | b70141e3c5149430951773aaa0155555c5fb3e76 | refs/heads/master | 2023-03-29T12:51:54.700891 | 2021-04-08T17:22:53 | 2021-04-08T17:22:53 | 355,996,122 | 9 | 0 | Apache-2.0 | 2021-04-08T17:31:03 | 2021-04-08T17:31:02 | null | UTF-8 | Python | false | false | 4,123 | py | # coding=utf-8
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
#
# 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/lice... | [
"noreply@github.com"
] | meehawk.noreply@github.com |
94e2c2a401b125a43cee98d701cd7ec13826b551 | 773dc03117f8b0d51f7a10e2a4577229c8be6ba3 | /migrations/models/36_20230108160220_update.py | 825e7924ebf0640cde169d23190cb1cc5555254b | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | tcprescott/sahasrahbot | 382cdff058d63feb5f42dbbd7729eb4b08c4d1bd | 64a125d948873d0faa5ea3f2d306075ad9e013be | refs/heads/master | 2023-08-31T15:33:01.533206 | 2023-08-31T01:58:48 | 2023-08-31T01:58:48 | 178,310,225 | 22 | 43 | MIT | 2023-09-01T08:45:52 | 2019-03-29T01:34:45 | Python | UTF-8 | Python | false | false | 380 | py | from tortoise import BaseDBAsyncClient
async def upgrade(db: BaseDBAsyncClient) -> str:
return """
ALTER TABLE `ranked_choice_election` ADD `private` BOOL NOT NULL DEFAULT 0;
DROP TABLE IF EXISTS `twitch_channels`;"""
async def downgrade(db: BaseDBAsyncClient) -> str:
return """
ALT... | [
"tcprescott@gmail.com"
] | tcprescott@gmail.com |
c2ee27335ec1db4df52d38e9bcdabfb39e334cc2 | 8239e45b6b031839dcd464bc80a6c8d17ed2f7b7 | /cloudarmy/contrib/conditions/environment.py | 53177af7d135ab208dc6fbe1359908ca766b4a45 | [] | no_license | geeknam/cloudarmy | 401efaee8c8e5e916ddff757edcc657698d9687f | 4363d5bdf8719a8f8bab8104c8ea7d2247d15746 | refs/heads/master | 2021-07-11T19:44:41.769661 | 2016-03-14T12:43:47 | 2016-03-14T12:43:47 | 52,852,867 | 3 | 1 | null | 2021-03-25T21:40:17 | 2016-03-01T06:11:43 | Python | UTF-8 | Python | false | false | 278 | py | from troposphere import Ref, Equals
class EnvironmentCondition(object):
conditions = {
"IsProduction": Equals(
Ref("EnvironmentType"), "production"
),
"IsStaging": Equals(
Ref("EnvironmentType"), "staging"
),
}
| [
"emoinrp@gmail.com"
] | emoinrp@gmail.com |
04c39588a75c7d1646fb96aeb656bbb9548a976f | c1b56d50c68bf32e900349cbab4bfd043a79a237 | /Pythagorean Triplet.py | 231f1b5449311249ea7648796d95434b151ff9d6 | [] | no_license | divanshu79/GeeksForGeeks-solutions | c7a5f0be04e8376e72f933c35fb2d09641fe7130 | caf77aad9c53d5d05c87318806097d750864a6e3 | refs/heads/master | 2020-03-25T07:56:14.997786 | 2018-08-05T06:37:22 | 2018-08-05T06:37:22 | 143,589,282 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 614 | py | from collections import defaultdict
for _ in range(int(input())):
n = int(input())
arr = list(map(int, input().split()))
def_dict = defaultdict(int)
sq_list = []
for i in arr:
def_dict[i*i] = 1
sq_list.append(i*i)
sum_list = []
flag = 0
for i in range(n-1):... | [
"noreply@github.com"
] | divanshu79.noreply@github.com |
189638b913ac8e4f95628be830208ded60454bf1 | 994e5b7156a8c1429238facc1463ad1846f1a89a | /models/official/nlp/xlnet/xlnet_config.py | 95ab092442ef4f4b96e61d91ed391051469e8441 | [
"Apache-2.0"
] | permissive | TrellixVulnTeam/Felect_M46O | f0c2a9a6c48695705e0b68c92c3a414bacfaa599 | 6d8b80e216c40233d2c1b9e51fe6f605a3b5ef4b | refs/heads/main | 2023-04-22T11:33:59.448117 | 2021-05-06T13:01:12 | 2021-05-06T13:01:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,317 | py | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | [
"noreply@github.com"
] | TrellixVulnTeam.noreply@github.com |
bc2ec15906048fc42b645664a4552aa614fffaec | 4cbe0eef8694a7f5443e6d276577d3ca08d15456 | /cpt1/noneLenDemo.py | a713e854c6074bac6033c4576a506fd818583169 | [] | no_license | GSIL-Monitor/PythonLearning | 2bf313e366e395df1d27164fe79e16e948094583 | 3f20f9cdff1cef368baa6a2374e6b2cbe3871aa4 | refs/heads/master | 2020-04-19T09:11:45.169704 | 2018-11-28T09:55:01 | 2018-11-28T09:55:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 134 | py | s=None
s1 = ''
s2 = ' '
print(len(s1))
print(len(s2))
print(len(s2.strip()))
# print(len(s))
t1 = t2 = t3 = None
print(t1, t2, t3)
| [
"249398363@qq.com"
] | 249398363@qq.com |
29eaf7dca764f8db0e109f82e350645c5ee1f812 | c741f04141784a2571d2d27d95e0d994e4584ab1 | /learning/py3/连接mysql/PyMySQL/test3.py | f72ccb6eb48887eb51cf2b269456a0e175b90e48 | [] | no_license | haodonghui/python | bbdece136620bc6f787b4942d6e1760ed808afd4 | 365062ba54297c81093b7f378742e76d438658b7 | refs/heads/master | 2022-02-03T23:52:37.288503 | 2022-01-27T05:23:25 | 2022-01-27T05:23:25 | 191,729,797 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 313 | py | from pythonmysql3 import DB
if __name__ == '__main__':
with DB(host='59.110.228.110', port=3306, database='test_tea_uc_0', user='test_tea_uc_0',
passwd='L~+SJ*F^kon[t+10l6') as db:
db.execute('select * from uc_user limit 0,10')
print(db)
for i in db:
print(i)
| [
"haodonghui@yestae.com"
] | haodonghui@yestae.com |
3ccbf8883c86965571f090c36bced556f00efdd1 | f60ec2c12c6d56be853bec9c222b8ea91b170130 | /apps/pig/src/pig/models.py | a38ff955d4c0be321ef26bdb2d085598b63d858f | [
"Apache-2.0"
] | permissive | jackerxff/hue | b33911f62129cc949096dd48b3fdcf0584bbba69 | 2418050cafd75aab043900c28a867f5c13bc1c0e | refs/heads/master | 2020-12-29T02:54:39.947205 | 2013-04-05T21:25:07 | 2013-04-05T21:26:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,071 | py | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | [
"romain@cloudera.com"
] | romain@cloudera.com |
1d1c6159d39366e7b2130cca2ed83d36fab067c6 | c96c79bb7ca3e71d609eab20ed8d68cff8ee7fe7 | /DataStructurePrograms/bankingCashCounter.py | 0049a83ecb8431b52e5fdb75741a8707cd5863a8 | [] | no_license | NikhilDusane222/Python | 25c9eb50bcd5e0e8679ece41d97129b9100e9a91 | 0183c4211a28bbddb6792978cf55da89a682f67a | refs/heads/master | 2021-05-18T13:07:07.059428 | 2020-04-12T17:23:57 | 2020-04-12T17:23:57 | 251,254,080 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,721 | py | #Class Queue
class Queue:
def __init__(self):
self.balance = 0
print("Welcome to the Bank Cash Counter..")
print("This is a Banking portal")
#Function for deposite amount
def enqueue_deposit(self):
amount = int(input("Enter amount to be Deposited: "))
self.balance +=... | [
"you@example.com"
] | you@example.com |
fb9d2de4608618a90483dce7880ec25859319581 | eb4070d3dda38df8b6d4118343db59d559e58df6 | /week-1/Examples/plot_bostonjuly2012temps.py | 7106e6e834e9c292ae22013b1fc5392a53e0f201 | [] | no_license | RaviTezu/MITx-6.00.2x | df767115085e4f28cfaac20ec90c18453517ed5a | 6effafa89e15e1d59c9302c4a3c9f6ce96da0faa | refs/heads/master | 2021-01-10T16:15:03.999778 | 2016-04-20T11:40:46 | 2016-04-20T11:40:46 | 53,061,225 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,099 | py | from __future__ import print_function
import os
import pylab
# It is assumed that the 'julyTemps.txt' file is present along the side of this script and this script is
# executed at the root.
PWD = os.getcwd()
FILE_NAME = 'julyTemps.txt'
FILE = PWD + '/' + FILE_NAME
HIGH = []
LOW = []
def load_file(inFile=FILE):
... | [
"ravi-teja@live.com"
] | ravi-teja@live.com |
03cdb1d4773ac7b2357bc6f611f33df1c00e995b | d5eb2fe5d49b581562ae2bc660d08ca80a03d331 | /PythonSandbox/src/leetcode/lc235_lowest_common_ancestor_bst.py | 8a95af9b55836848b2011fec66cdb18da8f848ba | [] | no_license | mcxu/code-sandbox | fd5aa2e593057901d281a0e74db8957777b06cf3 | a785231582bda8578f79982e2dcddd2f2ab559b4 | refs/heads/master | 2023-07-10T02:07:24.180947 | 2023-07-08T03:31:48 | 2023-07-08T03:31:48 | 130,493,607 | 4 | 2 | null | 2023-01-15T22:53:29 | 2018-04-21T16:49:40 | Python | UTF-8 | Python | false | false | 1,624 | py | class Solution:
def lowestCommonAncestor(self, root: 'TreeNode', p: 'TreeNode', q: 'TreeNode') -> 'TreeNode':
if root == None:
return 0
deepestValidDepthSoFar = 0
validNode = root
# iterative dfs
stack = [(root, 0)] # (node, depth)
while stack:
... | [
"michaelxu79@gmail.com"
] | michaelxu79@gmail.com |
d21a1e0fda886e68b04b7b6fb2aae7d62a280eea | 09e57dd1374713f06b70d7b37a580130d9bbab0d | /benchmark/startQiskit1046.py | 63eee4eecc3a2149468ba16560b7bb2f0123e5f6 | [
"BSD-3-Clause"
] | permissive | UCLA-SEAL/QDiff | ad53650034897abb5941e74539e3aee8edb600ab | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | refs/heads/main | 2023-08-05T04:52:24.961998 | 2021-09-19T02:56:16 | 2021-09-19T02:56:16 | 405,159,939 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,157 | py | # qubit number=5
# total number=51
import cirq
import qiskit
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import FakeVigo
from math import log2,floor, sqrt, pi
import numpy as np
import networkx as ... | [
"wangjiyuan123@yeah.net"
] | wangjiyuan123@yeah.net |
98b24527a49dde6f431800e65ba9394fb4c3a89e | 503d2f8f5f5f547acb82f7299d86886691966ca5 | /atcoder/abc288_e.py | 70c4f614907f574c7e19042d8ed2d2ab4cc3fcdb | [] | no_license | Hironobu-Kawaguchi/atcoder | 3fcb649cb920dd837a1ced6713bbb939ecc090a9 | df4b55cc7d557bf61607ffde8bda8655cf129017 | refs/heads/master | 2023-08-21T14:13:13.856604 | 2023-08-12T14:53:03 | 2023-08-12T14:53:03 | 197,216,790 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,214 | py | # https://atcoder.jp/contests/abc288/tasks/abc288_d
# from numba import njit
# from functools import lru_cache
import sys
input = sys.stdin.buffer.readline
INF = 1001001001001001
N, M = map(int, input().split())
A = list(map(int, (input().split())))
C = list(map(int, (input().split())))
X = list(map(int, (input().spl... | [
"hironobukawaguchi3@gmail.com"
] | hironobukawaguchi3@gmail.com |
89938fbcb47e0b7757adcf91ed9a35f11cc37eeb | a27e43d263375f1ea42d496e18af01f5ad46990e | /modules/initialize.py | d7767bbf8a118b8f1b6dc24808d627c54abdcc1f | [] | no_license | Klim314/Quetzalcoatl | 74565556a26d548f28118137e81866f7dc7a4e7a | 0d78183235207bc9c44c7c099722f5a7203e1d9c | refs/heads/master | 2016-08-06T08:57:19.802511 | 2015-06-24T08:29:53 | 2015-06-24T08:29:53 | 36,220,505 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 366 | py | #!/usr/bin/env python3
"""
initialize.py
loads the pubdip.ini file
returns a dictionary containing all terms
"""
def execute(target):
res = dict()
with open(target) as f:
for i in f:
if i[0] == '#':
continue
temp = i.split('=')
res[temp[0]] = temp[1].strip()
return res
if __name__ == "__main__":
... | [
"klim314@gmail.com"
] | klim314@gmail.com |
91a5b6e81692b41a2ffffebed1fa5a58a9cc4ca7 | 2097293065bb28452b221a5f635bac63c69a3e80 | /pizza.py | 60599550eb351267a25b0b28131179907e104ba8 | [
"MIT"
] | permissive | kafkoders/hashcode-pizza | eb2ca3944f62c9c21853b8d0dc2cd34a984984bf | 513452f35299885f396a49113264523a0a6cceae | refs/heads/master | 2020-04-23T22:16:53.542636 | 2019-02-24T19:46:38 | 2019-02-24T19:46:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,483 | py | import pandas as pd
import numpy as np
import math
input_files = ['d_big']
def create_pizza_dataset(file_):
flag = False
elements_ = []
with open(file_ + '.in') as input_:
for line in input_:
if flag is False:
rows, cols, min_ingredients, max_cells = line.split(' ')
... | [
"alvarob96@usal.es"
] | alvarob96@usal.es |
34a80c8dab37022c77f53a2aea2077a2f51aa81b | a0e33f22ed416429e5ed003896d410ab0e82d3eb | /polymodels/managers.py | a08e4ba298a2da0d63b9bcbbeaadcc69656423fd | [
"MIT"
] | permissive | fusionbox/django-polymodels | 37982506c6ea58ae85f44da676cd990b4babc6fd | 0e6caf3932b2d8337d15f9755983c94743317e12 | refs/heads/master | 2020-12-25T10:59:02.520899 | 2016-01-22T00:13:22 | 2016-01-22T00:13:22 | 50,145,841 | 0 | 0 | null | 2016-01-22T00:13:14 | 2016-01-22T00:13:14 | null | UTF-8 | Python | false | false | 2,968 | py | from __future__ import unicode_literals
from django.core.exceptions import ImproperlyConfigured
from django.db import models
class PolymorphicQuerySet(models.query.QuerySet):
def select_subclasses(self, *models):
self.type_cast = True
relateds = set()
accessors = self.model.subclass_acces... | [
"charette.s@gmail.com"
] | charette.s@gmail.com |
90b417bedd17743c79571e8607da6f6a022d1f12 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03024/s808391195.py | bd7e39cfcdbb36cf608ec3f0dbb696430bf5c305 | [] | 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 | 163 | py | s = list(input())
counter = 0
k = len(s)
for i in range(k):
if s[i] == "o":
counter += 1
if counter+(15-k) >= 8:
print("YES")
else:
print("NO") | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
6e69b5b44498b70dbb7ec604c2bc824d7cd54d73 | 31e10d5f9bbdf768a2b6aae68af0c2105b43120c | /web+多线程/miniweb框架/web服务器/application/utils.py | fc5a398094a52747dd43aa00a08d209b8d724c5b | [] | no_license | 664120817/python-test | 6d0ce82923b3e7974f393fc8590c5e47e4117781 | 418085378ca0db8019e4fa3b5564daebed0e6163 | refs/heads/master | 2023-02-16T13:10:55.403774 | 2022-08-02T17:01:52 | 2022-08-02T17:01:52 | 200,843,808 | 8 | 11 | null | 2023-02-15T16:53:44 | 2019-08-06T12:08:19 | Python | UTF-8 | Python | false | false | 435 | py | def create_http_response(status,response_body):
# 拼接响应
request_line = "HTTP/1.1 {}\r\n".format(status) # 请求行
request_header = "Server:python80WS/2.1;charset=UTF-8 \r\n" # 请求头
request_header += "Content-Type:text/html\r\n"
request_blank = "\r\n" # 请求空行
request_data = (request_line + request_h... | [
"51182039+664120817@users.noreply.github.com"
] | 51182039+664120817@users.noreply.github.com |
ee9ea4d11f545f46aa88dcf699a6500010c37f2d | c6d9e353d19e0b92da72602ce274493dbb179525 | /Setup_custom.py | ca095135168082bb68b2205c98650d75d777c9fc | [
"BSL-1.0",
"Python-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | davidbrownell/Common_cpp_Common | a337f0d589316f28950e93acd518d4e82b7cc14a | 7346273b79628514af1c584c447003a638def15d | refs/heads/master | 2022-03-01T19:31:12.571884 | 2022-01-03T17:56:37 | 2022-01-03T17:56:37 | 187,749,343 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,579 | py | # ----------------------------------------------------------------------
# |
# | Setup_custom.py
# |
# | David Brownell <db@DavidBrownell.com>
# | 2018-05-03 22:12:13
# |
# ----------------------------------------------------------------------
# |
# | Copyright David Brownell 2018-22.
# | Distributed... | [
"db@DavidBrownell.com"
] | db@DavidBrownell.com |
be89e3bb2bcbb432edbcf5ef7805532ee5823d5d | 30dc32fd39cf71c76fc24d53b68a8393adcac149 | /OWDTestToolkit/apps/Marketplace/__main.py | a24d1a6405e92cfdd242bbf8fe55cd7389288a89 | [] | no_license | carlosmartineztoral/OWD_TEST_TOOLKIT | 448caefdc95bc3e54aad97df0bff7046ffb37be1 | 50768f79488735eba8355824f5aa3686a71d560a | refs/heads/master | 2021-01-15T17:14:03.614981 | 2013-06-11T12:48:18 | 2013-06-11T12:48:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,357 | py | from OWDTestToolkit.global_imports import *
import installApp ,\
searchForApp ,\
selectSearchResultApp
class Marketplace (
installApp.main,
searchForApp.main,
selectSearchResultApp.main):
def __in... | [
"roy.collings@sogeti.com"
] | roy.collings@sogeti.com |
6d2f69de2487fa86a348999f7695b0190ce4b725 | 78d7d7aeb78a8cea6d0e10b89fc4aa6c46c95227 | /3995.py | a3eefaf7f66a32547cbdcc5db18db51791b52a02 | [] | no_license | GenryEden/kpolyakovName | 97db13ef93061a8c2afc6cc5acd91337f79063f1 | c5d7f631ae7ec8770e56170574b82ea2b7d8a4d9 | refs/heads/master | 2023-05-23T21:22:51.983756 | 2021-06-21T08:56:49 | 2021-06-21T08:56:49 | 350,466,773 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 267 | py | def check(x):
if sum([int(s) for s in oct(x)[2:]]) % 19 != 0:
return False
m = 1
for s in oct(x)[2:]:
m *= int(s)
return m % 5 == 0
cnt = 0
minimal = 0
for x in range(12345, 67890+1):
if check(x):
cnt += 1
if cnt == 1:
minimal = x
print(cnt, minimal) | [
"a926788@gmail.com"
] | a926788@gmail.com |
4220d040287852ff2cb51884d1f88a13f9e80009 | af9268e1ead8cdb491868c14a2240d9e44fb3b56 | /last-minute-env/lib/python2.7/site-packages/django/contrib/admin/templatetags/admin_static.py | 62b8691f9c135756c86c3975ad0fb508ab08de89 | [] | no_license | frosqh/Cousinade2017 | d5154c24c93ca8089eeba26b53c594e92cb6bd82 | c34d5707af02402bf2bb7405eddc91297da399ff | refs/heads/master | 2021-01-20T07:57:34.586476 | 2017-10-22T18:42:45 | 2017-10-22T18:42:45 | 90,074,802 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 315 | py | from django.template import Library
from django.templatetags.static import static as _static
register = Library()
@register.simple_tag
def static(path):
# Backwards compatibility alias for django.templatetags.static.static().
# Deprecation should start in Django 2.0.
return _static(path)
| [
"frosqh@gmail.com"
] | frosqh@gmail.com |
558a6dcac84f11a72034f4701f4143645c0414fd | 63b864deda44120067eff632bbb4969ef56dd573 | /object_detection/fast rcnn/roi.py | f7f8c76fbc257a5e40c8450b8615c8b335e4a852 | [] | no_license | lizhe960118/Deep-Learning | d134592c327decc1db12cbe19d9a1c85a5056086 | 7d2c4f3a0512ce4bd2f86c9f455da9866d16dc3b | refs/heads/master | 2021-10-29T06:15:04.749917 | 2019-07-19T15:27:25 | 2019-07-19T15:27:25 | 152,355,392 | 5 | 2 | null | 2021-10-12T22:19:33 | 2018-10-10T03:06:44 | Jupyter Notebook | UTF-8 | Python | false | false | 1,310 | py | import numpy as np
import torch
import torch.nn as nn
class ROIPool(nn.Module):
def __init__(self, output_size):
super().__init__()
self.maxpool = nn.AdaptiveMaxPool2d(output_size)
self.size = output_size
def forward(self, images, rois, roi_idx):
# images:特征图 image_batchsize * ... | [
"2957308424@qq.com"
] | 2957308424@qq.com |
bd6d1d5a395d1a59e39358b8164d34d56dbcb1cb | 82e78f606f8c203cb77b1e3e8fd3b13158f31af8 | /thenewboston/transactions/validation.py | 8612d11da9a8ba93fe0d80accb79bbd627413987 | [
"MIT"
] | permissive | rajat4665/thenewboston-python | 1f0b8aea02fb8dbfb2eea60cd1ef07ac12fad667 | df842c793fe7bfd8731fd8746abf25747c9e569e | refs/heads/master | 2022-11-26T00:46:54.848608 | 2020-07-26T00:12:06 | 2020-07-26T00:12:06 | 283,263,021 | 0 | 0 | MIT | 2020-07-28T16:07:08 | 2020-07-28T16:07:07 | null | UTF-8 | Python | false | false | 403 | py | def validate_transaction_exists(*, amount, error, recipient, txs):
"""
Check for the existence of a Tx
"""
tx = next((tx for tx in txs if tx.get('amount') == amount and tx.get('recipient') == recipient), None)
if not tx:
raise error({
'error_message': 'Tx not found',
... | [
"buckyroberts@gmail.com"
] | buckyroberts@gmail.com |
df9384d60dcde3fb318a9b646d98debfab15d79a | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03578/s404612965.py | ac57b84158a4259a926ce398a0358c3c359d58d5 | [] | 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 | 740 | py | # -*- coding: utf-8 -*-
import sys
from collections import deque, defaultdict
from math import sqrt, factorial
# def input(): return sys.stdin.readline()[:-1] # warning not \n
# def input(): return sys.stdin.buffer.readline().strip() # warning bytes
# def input(): return sys.stdin.buffer.readline().decode('utf-8')
de... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
69c5f69164eed21cf0ed953345f5fed4d702daf5 | 1633258aff76252b660534eae6d70a9e95a468ec | /cost_management/urls.py | 4443c8d4c8e5ca1952519e7048671ed5a7cfe38d | [] | no_license | kxplorer/banglai-django | 7077117f66128cb2bbaa8d50c1a28c076b303987 | 0d764f744ef165b078e856eb9374dba93cb614e8 | refs/heads/master | 2021-09-24T20:27:14.726832 | 2018-09-16T08:50:42 | 2018-09-16T08:50:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 341 | py | from django.urls import path
from . import views
urlpatterns = [
path('list/', views.my_expense, name='cost-list'),
path('add/', views.add_expense, name='add-expense'),
path('edit/<int:expense_id>/', views.edit_expense, name='edit-expense'),
path('delete/<int:expense_id>/', views.delete_expense, name='... | [
"harun1393@gmail.com"
] | harun1393@gmail.com |
ed531ac39f4e836f0ef9223d8913f55327376982 | 8c825730f6fd253e58902b150a9800de8f766943 | /capture/noworkflow/now/cmd/cmd_history.py | 2e5d8da0a5ca9eab5b4e964956f6cef37e97c90f | [
"MIT"
] | permissive | rmparanhos/noworkflow | aeb92695c34e65edf9cc4d4dc31d80467b085773 | 8f703a14503345568e91957659b43654036f8154 | refs/heads/master | 2020-05-17T12:39:04.231204 | 2019-06-21T03:42:49 | 2019-06-21T03:42:49 | 183,716,529 | 0 | 0 | null | 2019-04-27T01:58:31 | 2019-04-27T01:58:31 | null | UTF-8 | Python | false | false | 1,849 | py | # Copyright (c) 2016 Universidade Federal Fluminense (UFF)
# Copyright (c) 2016 Polytechnic Institute of New York University.
# This file is part of noWorkflow.
# Please, consult the license terms in the LICENSE file.
"""'now history' command"""
from __future__ import (absolute_import, print_function,
... | [
"joaofelipenp@gmail.com"
] | joaofelipenp@gmail.com |
cb0abb7803753d6eb75cdac081833a6020167949 | 821f403a3afc9055d40893eca033c369a4c3831e | /Easy/No206.py | c2200da24597a13f4e107a7fd6caac6856ee93e2 | [] | no_license | kikihiter/LeetCode2 | 29f91b6992a01ba23e7da04b2b2c862410cc563b | 7167f1a7c6cb16cca63675c80037682752ee2a7d | refs/heads/master | 2023-05-01T03:45:44.482932 | 2021-05-19T13:12:16 | 2021-05-19T13:12:16 | 277,283,525 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 519 | py | # Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution(object):
def reverseList(self, head):
"""
:type head: ListNode
:rtype: ListNode
"""
temp = None # 空,用来存储上一... | [
"noreply@github.com"
] | kikihiter.noreply@github.com |
dff0eb2acf4da0a475156ff795a327f9c89bcde3 | a5ada23f0c9d429cd7afa2351368e46bc23255e4 | /meta_models/meta_layers/conv3d_meta_layer.py | b3542d2d43a0dafcd10873c1e253f60dafba31d8 | [
"MIT"
] | permissive | AnacletoLAB/meta_models | ef6df0205f88832897e7ebdcd8057635b90024a9 | 9c70eb0bf080f0ec4bd24b7764f0f71d92d467d5 | refs/heads/master | 2023-04-11T14:01:47.678710 | 2021-04-27T08:25:53 | 2021-04-27T08:25:53 | 286,005,232 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,515 | py | """Class implementing meta-model for a Conv3D Layer."""
from typing import Dict
from tensorflow.keras.layers import (Activation, BatchNormalization, Conv3D,
Layer)
from .regularized_meta_layer import RegularizedMetaLayer
from ..utils import distributions
class Conv3DMetaLayer(Re... | [
"cappelletti.luca94@gmail.com"
] | cappelletti.luca94@gmail.com |
04747c7c8266e99f1a85acf17f1ae88fef5da79d | 03d68f032ab0e8cf269413d0309fc6d36281504f | /src/l2hmc/utils/tensorflow/history.py | d66fe35509b67f88da6d0b9dd0b405dac0889a21 | [
"Apache-2.0"
] | permissive | saforem2/l2hmc-qcd | 560026cd4d63f786247170a2b8641a7402b7e81e | 46ada488bc5c8b0a31be0bf23ea11b95b3b06767 | refs/heads/main | 2023-09-06T03:20:19.577196 | 2023-08-23T19:26:58 | 2023-08-23T19:26:58 | 176,870,361 | 57 | 8 | Apache-2.0 | 2023-08-23T18:56:02 | 2019-03-21T04:32:54 | Jupyter Notebook | UTF-8 | Python | false | false | 1,812 | py | """
tensorflow/history.py
Implements tfHistory, containing minor modifications from base History class.
"""
from __future__ import absolute_import, print_function, division, annotations
from typing import Any
import tensorflow as tf
import numpy as np
from l2hmc.utils.history import BaseHistory
class History(BaseH... | [
"saforem2@gmail.com"
] | saforem2@gmail.com |
ef89ebbee0f0db544ff5bf1b817aff77405ecae0 | 7d274ce8dae971228a23157a409b561020c22f66 | /tools/packages/SCons/Tool/sunc++.py | 00fb8c85284d59226fd62f3cfb8e577783661690 | [] | no_license | Eigenlabs/EigenD-Contrib | a212884d4fdf9ae0e1aeb73f6311606212e02f94 | 586fe17471571802295c792697f255e6cab51b17 | refs/heads/master | 2020-05-17T07:54:48.668925 | 2013-02-05T10:20:56 | 2013-02-05T10:20:56 | 3,239,072 | 3 | 2 | null | null | null | null | UTF-8 | Python | false | false | 4,744 | py | """SCons.Tool.sunc++
Tool-specific initialization for C++ on SunOS / Solaris.
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, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons ... | [
"jim@eigenlabs.com"
] | jim@eigenlabs.com |
74aeddee7276ced1388155ecfd993003fe1085f4 | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /NhPYFqfQcFXWvdH8t_5.py | f7d2eb52db8c7a1424e591f89c82b393d52cea0d | [] | 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,614 | py | """
A positive integer multiplied times its inverse is always equal to 1:
`17*(1/17)==1`. Modular arithmetic has a similar inverse function, although,
for modulus `m`, we are confined to integers from 0 to m-1. The modular
multiplicative inverse of 3 modulus 5 is equal to 2 because `(3*2)%5==1`.
Another example: the... | [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
654671700188a0cf97b551f4f3716dcebb0ade85 | 48832d27da16256ee62c364add45f21b968ee669 | /res/scripts/client/gui/wgnc/events.py | 7291b9a2e8cb59d82254603badc1df9740d57f17 | [] | no_license | webiumsk/WOT-0.9.15.1 | 0752d5bbd7c6fafdd7f714af939ae7bcf654faf7 | 17ca3550fef25e430534d079876a14fbbcccb9b4 | refs/heads/master | 2021-01-20T18:24:10.349144 | 2016-08-04T18:08:34 | 2016-08-04T18:08:34 | 64,955,694 | 0 | 0 | null | null | null | null | WINDOWS-1250 | Python | false | false | 957 | py | # 2016.08.04 19:53:34 Střední Evropa (letní čas)
# Embedded file name: scripts/client/gui/wgnc/events.py
import Event
class _WGNCEvents(object):
__slots__ = ('__eManager', 'onItemShowByDefault', 'onItemShowByAction', 'onItemUpdatedByAction', 'onProxyDataItemShowByDefault')
def __init__(self):
super(_W... | [
"info@webium.sk"
] | info@webium.sk |
66c71b03c28c724553f740d6e72d6d54448e2888 | 9b64f0f04707a3a18968fd8f8a3ace718cd597bc | /huaweicloud-sdk-bcs/huaweicloudsdkbcs/v2/model/show_blockchain_detail_request.py | 0799bf411b855abd953b527d517b0231e35885cf | [
"Apache-2.0"
] | permissive | jaminGH/huaweicloud-sdk-python-v3 | eeecb3fb0f3396a475995df36d17095038615fba | 83ee0e4543c6b74eb0898079c3d8dd1c52c3e16b | refs/heads/master | 2023-06-18T11:49:13.958677 | 2021-07-16T07:57:47 | 2021-07-16T07:57:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,836 | py | # coding: utf-8
import re
import six
class ShowBlockchainDetailRequest:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value is js... | [
"hwcloudsdk@huawei.com"
] | hwcloudsdk@huawei.com |
1345771bc1b47bd1670f09a40a36343b34214e39 | f3110c8d0d1a232a0511ec559695882c1eb8594e | /DJANGO/quiz/views.py | 884b75847a4fa12c352577e3ce03ff8523cc36d7 | [] | no_license | SeungWookHan/Flutter-DRF | feb1394d52961824eac2a6e88c667a0e03375c47 | c793ccdacee1a4053a33471c226ff2ce8c5797dc | refs/heads/master | 2023-02-04T23:15:45.945139 | 2020-12-29T15:50:02 | 2020-12-29T15:50:02 | 324,955,539 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 570 | py | from rest_framework.response import Response
from rest_framework.decorators import api_view
from .models import Quiz
from .serializers import QuizSerializer
import random
# Create your views here.
@api_view(['GET'])
def helloAPI(request):
return Response("hello world!")
@api_view(['GET'])
def randomQuiz(request, ... | [
"hswook12@me.com"
] | hswook12@me.com |
ba1076a3246d6802d9ea52c4729fe3b0503f4722 | 60448d1467b5a2531bab91e8bc721294a397e754 | /nmrpyschedule/generator.py | 6ae0f758186b260b88d0c9eb2eb10be36e7e9cae | [] | no_license | mattfenwick/NMRPySchedule | 8c7fda460b32f09138f08f15d302df4096075fb9 | 22e3399e9964137cb3e382b5805d457bb82e751f | refs/heads/master | 2021-01-18T16:32:23.013635 | 2013-06-11T15:36:29 | 2013-06-11T15:36:29 | 10,610,035 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,688 | py | '''
@author: matt
'''
import itertools
import math
def uniform(ranges):
'''
Generate a table of n-dimensional points containing all grid points within the given ranges.
Includes both boundaries.
'''
theNums = [range(low, high + 1) for (low, high) in ranges]
return itertools.product(*theNums)
... | [
"mfenwick100@gmail.com"
] | mfenwick100@gmail.com |
3b4f8d5f9825913e31189eddb81b7034aebe454f | 46669c775591b38f71382f690cb93a4879366595 | /src/020_create_xml.py | 2cdeed0319fdbdfe0862a1c99e4fb20e25ad7850 | [
"CC-BY-4.0"
] | permissive | kouigenjimonogatari/kouigenjimonogatari.github.io | e234abe0e4145bbe879756f6af19a546c01a2ff4 | c0ec798d550bda5670d8af15c4028ff925e6495d | refs/heads/master | 2022-10-12T19:52:05.229525 | 2022-10-04T09:34:51 | 2022-10-04T09:34:51 | 223,747,725 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,077 | py | import sys
import urllib
import json
import argparse
import urllib.request
import unicodedata
import collections
import os
import xml.etree.ElementTree as ET
import csv
import glob
import urllib.parse
def get_mdata(manifest):
print(manifest)
res = urllib.request.urlopen(manifest)
# json_loads() でPythonオブジェ... | [
"na.kamura.1263@gmail.com"
] | na.kamura.1263@gmail.com |
7920769fb9df2c743760034190be86dff1f1947a | 65c0ef56c2e2c3e1646a610f49e6dd06f2c6102d | /src/libs/cmd/implement/emulator/fastboot.py | e8c8437bb490f5e1cb28f6289ccb8449e2873cad | [
"MIT"
] | permissive | VirtualVFix/AndroidTestFramework | d3411f328a793ee7b007c4736983204aae81b739 | 1feb769c6aca39a78e6daefd6face0a1e4d62cd4 | refs/heads/master | 2020-08-11T14:48:12.454415 | 2019-10-12T10:20:43 | 2019-10-12T10:20:43 | 214,582,560 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 648 | py | # All rights reserved by forest fairy.
# You cannot modify or share anything without sacrifice.
# If you don't agree, keep calm and don't look at code bellow!
__author__ = "VirtualV <https://github.com/virtualvfix>"
__date__ = "09/22/17 14:27"
from .cmd import Cmd
from libs.cmd.implement.base.fastboot import Fastboot... | [
"github.com/virtualvfix"
] | github.com/virtualvfix |
1926722da71183f936fd15d9c412fe2e5f789af4 | 35fb71dd7b67fcee5e01e090e5f2a04dbbf30a15 | /network_base/week01/day02/lqueue.py | a2b102948e76f64e135371e6dfc924f57c1832a7 | [] | no_license | zlz2013/zlz | 3119795848ed9cc43708482a2aa3e764c1312394 | 228d04a30b0782d859323e507ddd0c7459635bfb | refs/heads/master | 2020-06-05T17:44:47.975328 | 2019-09-10T11:57:23 | 2019-09-10T11:57:23 | 192,500,784 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 967 | py | """
lqueue.py 链式队列
重点代码
思路分析:
1.基于链表模型完成链式栈
2.链表开端作为队头,尾端作为队尾
"""
class LQueueError(Exception):
pass
class Node:
def __init__(self,data,next=None):
self.data=data
self.next=next
#链式队列类
class LQueue:
def __init__(self):
#初始头尾指向一个没有实际意义的节点
self.front=self.rear=Node(N... | [
"229165631@qq.com"
] | 229165631@qq.com |
1e738f57abaf2f4bade3d418917aad39cbae070f | 7649278f4bda14aaf4ec02b7ae58094e16d98618 | /Project/scripts/cartpole_eval.py | 61018275f50b4f2d739e06cf8596805d284be6f9 | [] | no_license | peng00bo00/optlearningcontrol | 1877381ca749f17caf75ede02a5cb263cbddaa79 | 44eff6d17e4da0b0adc85e5e84cf4b8edb8a1bb8 | refs/heads/master | 2021-01-06T18:44:58.981575 | 2020-05-19T17:44:34 | 2020-05-19T17:44:34 | 241,445,231 | 0 | 0 | null | 2020-02-18T19:11:08 | 2020-02-18T19:11:08 | null | UTF-8 | Python | false | false | 1,121 | py | import numpy as np
import tensorflow as tf
import gym
from gym import wrappers
import os
import matplotlib.pyplot as plt
## environment
env = gym.make('CartPole-v0')
env = wrappers.Monitor(env, '../animations/', force=True)
env.reset()
## GPU configuration
gpus = tf.config.experimental.list_physical_devices('GPU')
f... | [
"pengbo_tongji@126.com"
] | pengbo_tongji@126.com |
874a69d989a964f5f0210a7eafbf994cd3c38d0c | 6ddcdda679089b228d55ef098addfe8193287d88 | /py/lpthw/test.py | 500c610d2d9010ee315cb403153222d93a1680c9 | [
"MIT"
] | permissive | danyfang/SourceCode | 518e4715a062ed1ad071dea023ff4785ce03b068 | 8168f6058648f2a330a7354daf3a73a4d8a4e730 | refs/heads/master | 2021-06-06T16:36:50.999324 | 2021-04-23T08:52:20 | 2021-04-23T08:52:20 | 120,310,634 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 547 | py | #!/usr/bin/python
from __future__ import division
#lambda function to calculate factor
x = int(raw_input("Please input an integer\n > "))
print reduce(lambda x,y: x*y, range(1,x+1))
def add(x,y):
return x+y
def sub(x,y):
return x-y
def mul(x,y):
return x*y
def div(x,y):
return x/y
operator = {"+":add, "-":su... | [
"danyfang7@gmail.com"
] | danyfang7@gmail.com |
57e2ee283d3febe993b10065b968ba9f581b5a55 | 6a52db9b913c3677dfbcd55776e1a14cddde359d | /parceiros/migrations/0006_auto_20181117_0309.py | 3ab094723e58de570f6ab1ca3fb06592a7e4d342 | [] | no_license | tiagocordeiro/casaconceito-sie | 47a2922f328fa7c9e13e84dae1b6a9135edd6236 | 892e42a655bb4ef08952c5be167e281720f40b49 | refs/heads/master | 2023-08-31T14:48:21.396973 | 2021-05-11T18:18:07 | 2021-05-11T18:18:07 | 140,175,770 | 0 | 0 | null | 2023-09-13T15:14:42 | 2018-07-08T14:38:35 | HTML | UTF-8 | Python | false | false | 497 | py | # Generated by Django 2.1.3 on 2018-11-17 05:09
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('parceiros', '0005_auto_20181117_0251'),
]
operations = [
migrations.AlterField(
model_name='ind... | [
"tiago@mulhergorila.com"
] | tiago@mulhergorila.com |
20da8a1571be3297fdc2a8720ab6d9c6f804eede | a0801d0e7325b31f0383fc68517e208680bb36d6 | /Kattis/anagramcounting.py | 362adbaa6dfaa8948b5b2fb3c59253bb2a0f31b6 | [] | no_license | conormccauley1999/CompetitiveProgramming | bd649bf04438817c7fa4755df2c2c7727273b073 | a7e188767364be40f625612af3d16182f2d8d4de | refs/heads/master | 2023-05-14T13:19:32.678134 | 2023-05-11T16:07:33 | 2023-05-11T16:07:33 | 179,089,010 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 340 | py | from collections import Counter
_f = { 0: 1 }
def f(n):
if n not in _f:
_f[n] = n * f(n - 1)
return _f[n]
def g(s):
cs = Counter(s)
vs = cs.values()
l = len(s)
r = f(l)
for v in vs:
r //= f(v)
return r
while True:
try:
i = input()
print(g(i))
ex... | [
"conormccauley1999@gmail.com"
] | conormccauley1999@gmail.com |
aab5320af9b48f92a2e321db7cb26674e6d0a401 | 24f2696aab87f1632705a7c8b2d3b866e26aa3ee | /LCA_236.py | 281941167ef5ab53585044747e11fcdfbd20eb5e | [] | no_license | adiggo/leetcode_py | 44a77a0b029f4d92bd0d8e24cad21ceea52e7794 | 4aa3a3a0da8b911e140446352debb9b567b6d78b | refs/heads/master | 2020-04-06T07:05:21.770518 | 2016-07-01T16:00:40 | 2016-07-01T16:00:40 | 30,397,276 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 637 | py | # Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution(object):
def lowestCommonAncestor(self, root, p, q):
"""
:type root: TreeNode
:type p: TreeNode
:t... | [
"adiggo@gmail.com"
] | adiggo@gmail.com |
4af9fff107581efba17158a157bc33c7f8d43be6 | f5390652068c736aea061a0979f27ba32b51784f | /Web/Web/views.py | dfd74dd32a7e1fe8b04516a9a481ccbc516c7484 | [] | no_license | kho903/Project_Reflux | 172c9bd7062f4cc9f84c576412557435f63906b5 | 0f1cdab08bc71d4c219b34839f63cc96f7c90d47 | refs/heads/master | 2022-12-14T03:29:21.008229 | 2020-09-02T09:24:16 | 2020-09-02T09:24:16 | 286,716,990 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 512 | py | from django.contrib.auth.forms import UserCreationForm
from django.urls import reverse_lazy
from django.views.generic.base import TemplateView
from django.views.generic import CreateView
class HomeView(TemplateView):
template_name = 'home.html'
class UserCreateView(CreateView):
template_name = 'registration... | [
"gmldnr2222@naver.com"
] | gmldnr2222@naver.com |
8ad3db0ec4061062900fc2e03cbbae10b8f45f56 | 498d889585187ca56018b15f38880b8a671442b8 | /utils.py | 5c6fc73da2244ffe9d611253c389cb6fc386f278 | [] | no_license | mandasdasdasd/excel-fe | b89b06681bd7c91000f491a5f85f0c8577ac0fc3 | a81eb0085192c0932992745284c24efda9859241 | refs/heads/master | 2022-12-24T01:53:03.351947 | 2019-12-04T10:09:14 | 2019-12-04T10:09:14 | 205,658,439 | 0 | 0 | null | 2022-12-11T05:10:56 | 2019-09-01T10:01:07 | Vue | UTF-8 | Python | false | false | 218 | py | import hmac, random
class Encryption(object):
def __init__(self):
self.key = "bigdata"
def hmac_md5(self, s):
return hmac.new(self.key.encode('utf-8'), s.encode('utf-8'), 'MD5').hexdigest()
| [
"you@example.com"
] | you@example.com |
c9ec417f68e16aaa3a781bc04a7e47b8cffff73c | c8c0d3e83dbec83ccb89a751dc3e656bb482a2ce | /ZombieGame/modules/coordinates.py | 2e949bd8c3dcf4cac12328f9fe1025eaec8889dd | [] | no_license | Yamase31/python-zombie-game | 80658bcfcb05b819265dfc75c5563391f19b1861 | dfd931ecf5caac9348b652862fc0b018979491d9 | refs/heads/main | 2023-07-07T08:58:43.314898 | 2021-08-10T00:33:36 | 2021-08-10T00:33:36 | 394,479,044 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,382 | py |
# Quick coordinate class to contain both x and y
# Overrides == for easy comparison
class Coordinates(object):
def __init__(self, x, y):
self.x = x
self.y = y
def __eq__(self, other):
return self.x == other.x and self.y == other.y
def __sub__(self, other):
if typ... | [
"noreply@github.com"
] | Yamase31.noreply@github.com |
a01b71e2dae640d49f54d02cf08acedbab149c70 | 961931333838aebe8bd17c30c19f3994e32d76ce | /src/leetcode/bfs/279. Perfect Squares.py | 128380fcb8630cd5d95ab5e6415f0e7e36e9fcdd | [] | no_license | MTGTsunami/LeetPython | 5161f9e31dc2ab1855123c2a3a151eb6f4d889bc | f7f3839f631f08a9e5bf8a02398b940f82e43e67 | refs/heads/master | 2023-04-17T16:59:45.621291 | 2021-04-26T07:24:50 | 2021-04-26T07:24:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,624 | py | """
Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to n.
Example 1:
Input: n = 12
Output: 3
Explanation: 12 = 4 + 4 + 4.
Example 2:
Input: n = 13
Output: 2
Explanation: 13 = 4 + 9.
"""
class MySolution(object): # A little bit larger than O(n) ... | [
"mtgtsunami1219@gmail.com"
] | mtgtsunami1219@gmail.com |
2c12a85637d4448821f4e08fab01976870d8fdca | b3330bd3365767b89afb9c432f4deb722b39ac1c | /python/sort/selection_sort/selection_sort_10.py | d0142c054e2de0f2b0945ab15e296cef179f94f5 | [] | no_license | hguochen/algorithms | 944df332d5b39220bd59cbd62dc74b12e335fb9e | 703e71a5cd9e002d800340df879ed475a404d092 | refs/heads/master | 2022-02-27T12:11:10.607042 | 2022-02-18T21:04:00 | 2022-02-18T21:04:00 | 13,767,503 | 5 | 7 | null | null | null | null | UTF-8 | Python | false | false | 733 | py | # selection sort
def selection_sort(array):
"""
Divides the array into unsorted and sorted sublist. Left sublist contains
list of sorted elements, right sublist contains list of unsorted elements.
Find the least element in unsorted list and put in sorted list.
"""
# traverse the array
fo... | [
"hguochen@gmail.com"
] | hguochen@gmail.com |
2db11fc713334d1c4d17ecf444cf9726e26cc5dd | 055cf8aeec011f67580bf92a83d94ee6919648cd | /migrations/versions/ad28a44f93c4_initial_migration.py | 18999b6182f1570c2b30ca638cbdbed3b8a6a43e | [
"MIT",
"LicenseRef-scancode-other-permissive"
] | permissive | RisperAkinyi/BlogPost | df82c8fec558425ca1bbce65aa90464176aefb87 | f8ee4c887fceae8e70410b66a12bc5680cf26044 | refs/heads/master | 2022-09-30T19:09:27.969983 | 2019-08-13T07:36:26 | 2019-08-13T07:36:26 | 201,879,164 | 0 | 0 | MIT | 2022-09-16T18:07:44 | 2019-08-12T07:22:39 | Python | UTF-8 | Python | false | false | 2,128 | py | """Initial Migration
Revision ID: ad28a44f93c4
Revises:
Create Date: 2019-08-09 11:05:50.912878
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'ad28a44f93c4'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto ... | [
"email@example.com"
] | email@example.com |
08a41f586570d5ba0baa10410a977b1169ac947f | 4be9a5bdb8e051001b78c8f127ccc1a7f85c14e7 | /mapping/migrations/0033_auto_20170129_0939.py | 90fce4536a94b43eded5f95299f301669aa5c874 | [] | no_license | quentin-david/heimdall | f72a85606e7ab53683df2023ef5eaba762198211 | 84a429ee52e1891bc2ee4eb07a084dff209c789c | refs/heads/master | 2021-01-21T10:26:28.895663 | 2017-07-21T19:19:46 | 2017-07-21T19:19:46 | 83,432,596 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 503 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-01-29 09:39
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('mapping', '0032_servicewebserver_reverse_proxy'),
]
operations = [
migratio... | [
"david@hemdgsa01.local.lan"
] | david@hemdgsa01.local.lan |
6be743b4b02d6eb6d7f62aab46ff57260ffa042b | f92dfdebb4bf6bc108f51783333520c35afa66da | /api-web/src/www/application/management/commands/publish_rabbitmq_genome_gene.py | 23f7465ee4e41b1adf971b243ae030a6a568b6ea | [] | no_license | duytran92-cse/nas-genodata | 4d8659a135913d226842ff6a013324714ead0458 | 80c88f42145f729c5862a5293012e71548182e1d | refs/heads/master | 2022-11-13T17:24:03.769605 | 2020-06-14T18:59:36 | 2020-06-14T18:59:36 | 272,264,593 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,305 | py | import json, pika, os
from application.models import *
from urad_api import registry
from urad_api_standard.commands import Command as BaseCommand
from django.conf import settings
import json
from application.modules.gene import components as gene_components
from django.db import connection
class Command(BaseCommand)... | [
"thanh.tran@etudiant.univ-lr.fr"
] | thanh.tran@etudiant.univ-lr.fr |
a43e6873d5770d466c0143a8d8e3abdff3975ac4 | 4bc19f4dd098ebedcb6ee78af0ae12cb633671fe | /static/views.py | 608e8568b487fbee9eb1251fbf226fbe6d45ec5b | [] | no_license | StanislavKraev/rekvizitka | 958ab0e002335613a724fb14a8e4123f49954446 | ac1f30e7bb2e987b3b0bda4c2a8feda4d3f5497f | refs/heads/master | 2021-01-01T05:44:56.372748 | 2016-04-27T19:20:26 | 2016-04-27T19:20:26 | 57,240,406 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 514 | py | from django.http import Http404
from django.shortcuts import render_to_response
from rek.static.models import StaticPage
from django.template.context import RequestContext
def render(request, page_alias=''):
page = StaticPage.objects.get(alias=page_alias, enabled=True)
if not page:
raise Http40... | [
"kraevst@yandex.ru"
] | kraevst@yandex.ru |
e2a4d4248d4f5b48e5c69c52e0dad41e541340ba | 33cfcb4561e7320ae0e893fbe774c7eb0a2effe8 | /eg15.01.py | c94d345080db1688fdbb1a237e7fd737f5e8db93 | [] | no_license | Jueee/aByteOfPython | 9c8bc01f0707daef29e52467db0c3f5a94747119 | ae1a4a4b181612463ccdcd0d89c961f22f7ece20 | refs/heads/master | 2021-05-31T14:26:00.790823 | 2016-02-17T05:41:20 | 2016-02-17T05:41:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 877 | py | #!/usr/bin/python
# Filename: list_comprehension.py
# 通过列表综合,可以从一个已有的列表导出一个新的列表。
listone = [2, 3, 4]
listtwo = [2*i for i in listone if i > 2]
print(listtwo)
# 在函数中接收元组和列表
# 当要使函数接收元组或字典形式的参数的时候,有一种特殊的方法,它分别使用*和**前缀。
# 这种方法在函数需要获取可变数量的参数的时候特别有用。
# 由于在args变量前有*前缀,所有多余的函数参数都会作为一个元组存储在args中。
# 如果使用的是**前缀,多余的参数则会被认为是一个... | [
"hellojue @foxmail.com"
] | hellojue @foxmail.com |
5da2bd8dc2830c9ae5ea68845892e133cd447295 | 09e57dd1374713f06b70d7b37a580130d9bbab0d | /benchmark/startCirq2210.py | 06f183066edd0d13b690b7e34154e944725a31e0 | [
"BSD-3-Clause"
] | permissive | UCLA-SEAL/QDiff | ad53650034897abb5941e74539e3aee8edb600ab | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | refs/heads/main | 2023-08-05T04:52:24.961998 | 2021-09-19T02:56:16 | 2021-09-19T02:56:16 | 405,159,939 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,734 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 5/15/20 4:49 PM
# @File : grover.py
# qubit number=4
# total number=28
import cirq
import cirq.google as cg
from typing import Optional
import sys
from math import log2
import numpy as np
#thatsNoCode
from cirq.contrib.svg import SVGCircuit
# Symbols for... | [
"wangjiyuan123@yeah.net"
] | wangjiyuan123@yeah.net |
39f29b37f7444cf60b0b9e2cbd3307132c1c48c6 | d094ba0c8a9b1217fbf014aa79a283a49aabe88c | /env/lib/python3.6/site-packages/pandas/tests/io/parser/test_skiprows.py | 1df2ca4fad4d87539cdcdee874cb25a6cd3ce18e | [
"Apache-2.0"
] | permissive | Raniac/NEURO-LEARN | d9274e0baadd97bb02da54bdfcf6ca091fc1c703 | 3c3acc55de8ba741e673063378e6cbaf10b64c7a | refs/heads/master | 2022-12-25T23:46:54.922237 | 2020-09-06T03:15:14 | 2020-09-06T03:15:14 | 182,013,100 | 9 | 2 | Apache-2.0 | 2022-12-09T21:01:00 | 2019-04-18T03:57:00 | CSS | UTF-8 | Python | false | false | 6,948 | py | # -*- coding: utf-8 -*-
"""
Tests that skipped rows are properly handled during
parsing for all of the parsers defined in parsers.py
"""
from datetime import datetime
import numpy as np
import pytest
from pandas.compat import StringIO, lrange, range
from pandas.errors import EmptyDataError
from pandas import DataF... | [
"leibingye@outlook.com"
] | leibingye@outlook.com |
c6f9bfe889eb0278f68b7a17049662d5605c5285 | 5af277b5819d74e61374d1d78c303ac93c831cf5 | /axial/logging_utils.py | ef723570c0f02a331ebfc7220811665417690c53 | [
"Apache-2.0"
] | permissive | Ayoob7/google-research | a2d215afb31513bd59bc989e09f54667fe45704e | 727ec399ad17b4dd1f71ce69a26fc3b0371d9fa7 | refs/heads/master | 2022-11-11T03:10:53.216693 | 2020-06-26T17:13:45 | 2020-06-26T17:13:45 | 275,205,856 | 2 | 0 | Apache-2.0 | 2020-06-26T16:58:19 | 2020-06-26T16:58:18 | null | UTF-8 | Python | false | false | 4,459 | py | # coding=utf-8
# Copyright 2020 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | [
"copybara-worker@google.com"
] | copybara-worker@google.com |
54157e46485cfe84e785669c8a896e72e4eba04c | 22fc34523f4de64a1e1eea707e01da79e425a043 | /srtmprofile/core/urls.py | 3eb617af2639a39dc20d463863e4fff390506028 | [
"MIT"
] | permissive | marcellobenigno/srtmprofile | 04cdcf4a1f127462dd37d94ec5f368b0f304b932 | 52a2550976ce4ecad2921e53a72ac2ec8a8459b5 | refs/heads/master | 2021-04-03T05:25:54.097968 | 2018-03-15T11:05:02 | 2018-03-15T11:05:02 | 124,605,246 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 261 | py | from django.conf.urls import url
from . import views
app_name = 'core'
urlpatterns = [
url(r'^$', views.home, name='home'),
url(r'^roads.geojson$', views.roads_geojson, name='roads_geojson'),
url(r'^(?P<pk>\d+)/$', views.detail, name='detail'),
]
| [
"benigno.marcello@gmail.com"
] | benigno.marcello@gmail.com |
6a6d137d3c8dc70d14aa023a752ffba6f170d4fd | 91af1af67ed219e583b209b40ae5dd34d6f7f355 | /train_net.py | 90d770c1765c7f52a585ded8af49a5bf767545db | [] | no_license | jack20951948/Deep-Clustering | d6f5bfdd97be1f07f114371eafd9f8643ebb6e30 | 4dd8b4d3fef72e597cd142406d343450cf2dd517 | refs/heads/main | 2023-06-28T02:18:58.915727 | 2021-07-18T07:18:10 | 2021-07-18T07:18:10 | 387,109,398 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,555 | py | '''
Script to train the model
'''
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from datetime import datetime
import os.path
import time
import numpy as np
import tensorflow as tf
import ipdb
from datagenerator2 import DataGenerator
from model import Mode... | [
"j20951948@gmail.com"
] | j20951948@gmail.com |
92c3a0d5822904b02ee02cf30204b593268f8d36 | ded10c2f2f5f91c44ec950237a59225e8486abd8 | /.history/2/matrix_squaring_20200413235341.py | 1cded98ea6504881b7ef71c0979704ed33286f9f | [] | no_license | jearistiz/Statistical-Physics-Projects | 276a86407b32ded4e06b32efb2fadbd8eff8daed | d9c5b16a50856e148dc8604d92b6de3ea21fc552 | refs/heads/master | 2022-11-05T03:41:23.623050 | 2020-06-28T06:36:05 | 2020-06-28T06:36:05 | 254,909,897 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,000 | py | # -*- coding: utf-8 -*-
from __future__ import division
import numpy as np
import matplotlib.pyplot as plt
from time import time
import pandas as pd
def rho_free(x,xp,beta):
"""
Uso: devuelve elemento de matriz dsnsidad para el caso de una partícula libre en un toro infinito.
"""
return (2.*np.pi*beta)... | [
"jeaz.git@gmail.com"
] | jeaz.git@gmail.com |
52a5fc44063f2e73239719204651a2f2b4b3e5e5 | 767b5482f3c5b9c2c85575c711e37561f5b8f198 | /engine/engine_lib/encoderlib.py | 27d186e1e4d625fe001279e1c8110f2ff708818f | [] | no_license | zhupite233/scaner | 8e39c903f295d06195be20067043087ec8baac4f | 7c29c02bca2247a82bcbb91cc86955cc27998c95 | refs/heads/master | 2020-05-18T03:23:03.459222 | 2019-04-15T04:29:10 | 2019-04-15T04:29:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,332 | py | #!/usr/bin/env python
"""
This is the encoding / decoding functions collection for DharmaEncoder. It
allows you to encode and decode various data formats.
(c) 2010 Nathan Hamiel
Email: nathan{at}neohaxor{dot}org
Hexsec Labs: http://hexsec.com/labs
This program is free software: you can redistribute it and/or modify
it... | [
"lixiang@yundun.com"
] | lixiang@yundun.com |
2e3138b7aebe9b0d818303c674da9144988dee2d | 2b0eab74af8d23244ff11699830f9bb10fbd717a | /helpers/mixins/unpack_tags_mixin.py | 5e6e4c11c733fc5368427ac90ddb23bf2e781302 | [] | no_license | alexandrenorman/mixeur | c7e25cd20b03c78b361cb40e3e359a6dc5d9b06b | 95d21cd6036a99c5f399b700a5426e9e2e17e878 | refs/heads/main | 2023-03-13T23:50:11.800627 | 2021-03-07T15:49:15 | 2021-03-07T15:49:15 | 345,384,858 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,277 | py | from .unpack_ids_mixin import UnpackIdsMixin
class UnpackTagsMixin(UnpackIdsMixin):
"""
Mixin to apply on a ModelViewSet which transform registered fields from string containing ids to list of objects
"1,2,3" => [<Obj id=1>, <Obj id=2>, <Obj id=3>]
If a string passed, it will create a new instance of ... | [
"norman@xael.org"
] | norman@xael.org |
05af6eb6e60b4748045485fcbf36d751acf72583 | 0c7ff0ec35ba2bb38f99ef6ecb261ec33466dd52 | /Day1/day1Project.py | 2d1e56254a4ef4fd53ab5a15fdd51db183e510ec | [] | no_license | TheKinshu/100-Days-Python | 15cbacc608ee349cc9733a7032e10a359bebb731 | 293ad6b3e5f5208da84efbc5b2d2d395a5a53421 | refs/heads/master | 2023-04-18T08:21:30.361800 | 2021-05-02T18:48:39 | 2021-05-02T18:48:39 | 351,582,416 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 534 | py | #1. Create a greeting for your program.
print("Welcome to the Band Name Generator.")
#2. Ask the user for the city that they grew up in.
city = input("What's name of the city you gre up in?\n")
#3. Ask the user for the name of a pet.
pet = input("What's your pet's name?\n")
#4. Combine the name of their city and pet... | [
"kc007919@gmail.com"
] | kc007919@gmail.com |
d2534e7f9ed2539c6ec7228c87061771a60c4676 | 1d11288ec1a5d98dcf66c4ca45072ffd29901de0 | /mrp_extend/models/mrp_bom_line.py | 0731280072097855fc742fa848452a84c7f6fb29 | [] | no_license | pyrun13/addons | 14202e273c802cee391a68474a6bdc7cf062b25c | b81650d81e0a227dd4fc460846e53ce5e61a8cc1 | refs/heads/master | 2020-09-07T21:48:18.673226 | 2019-11-12T16:15:06 | 2019-11-12T16:15:06 | 220,921,425 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 412 | py | from odoo import models, fields, api, exceptions
class MrpBomLine(models.Model):
_inherit = 'mrp.bom.line'
attrition_rate = fields.Float(string='损耗率(%)')
def write(self, vals):
attrition_rate = vals.get('attrition_rate', 0)
if attrition_rate < 0:
raise exceptions.ValidationEr... | [
"xiongjianhong@gmail.com"
] | xiongjianhong@gmail.com |
d9431f1fb2020f8d301376bed93ef53f3204cbf1 | 0c110eb32f2eaea5c65d40bda846ddc05757ced6 | /python_scripts/pimriscripts/mastersort/scripts_dir/p7432_run2M1.py | 39656c11ebf8cd9db049ce6d7b9a74d8b7e3f30a | [] | no_license | nyspisoccog/ks_scripts | 792148a288d1a9d808e397c1d2e93deda2580ff4 | 744b5a9dfa0f958062fc66e0331613faaaee5419 | refs/heads/master | 2021-01-18T14:22:25.291331 | 2018-10-15T13:08:24 | 2018-10-15T13:08:24 | 46,814,408 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,193 | py | from __future__ import with_statement
import os, csv, shutil,tarfile, uf, dcm_ops
dest_root = '/ifs/scratch/pimri/soccog/test_working'
dst_path_lst = ['7432', 'run2M1']
uf.buildtree(dest_root, dst_path_lst)
uf.copytree('/ifs/scratch/pimri/soccog/old/SocCog_Raw_Data_By_Exam_Number/2480/e1331017/s1388354_5610_2M1_s30', '... | [
"katherine@Katherines-MacBook-Pro.local"
] | katherine@Katherines-MacBook-Pro.local |
0203f8b7a170b9c90a9503a129644d67e720066b | de121a951947f70f402079d288a78d35c85747b2 | /exercises/exercises_04.py | 79cb7651e375b500210a4054a4ae7430a01afd4a | [] | no_license | tpurnachander/requests-workshop | 56899be6c5520fb947d91676c11864d09b4489d6 | dac134558f141c482e0a52f19fdce37b7e7ba928 | refs/heads/master | 2023-03-10T19:00:31.012280 | 2021-02-19T12:08:54 | 2021-02-19T12:08:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,359 | py | import requests
import xml.etree.ElementTree as et
# Exercise 4.1
# Create a function create_xml_body_from_string()
# that returns a docstring (with triple double quotes)
# containing the following XML document:
# <payee>
# <name>John Smith</name>
# <address>
# <street>My street</street>
# <ci... | [
"bas@ontestautomation.com"
] | bas@ontestautomation.com |
a5e2debc3b4de63242c2bc5f62e4db0ae3a58645 | 44f07b81df56d7ea44775784a9697648fe481478 | /day8/faceapp/facedetect.py | ab3e244e889618a394e6791b7b7b4edf81d25532 | [] | no_license | shaadomanthra/cbpython-advanced | 436510c70deca4e1ef01517f87bba0e392583a88 | 86b613f89ca0b0cd8b243c157af1a2807e6ce605 | refs/heads/master | 2022-11-30T23:33:45.938854 | 2020-08-12T11:20:03 | 2020-08-12T11:20:03 | 276,316,817 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 841 | py | ## detect face and draw rectangles
# import packages (pip install opencv-python)
from cv2 import cv2
import sys
# path for image and cascade
imagePath = 'images/f1.jpg'
cascPath = "haarcascade_frontalface_default.xml"
# Create the haar cascade
faceCascade = cv2.CascadeClassifier(cascPath)
# Read the image & convert... | [
"packetcode@gmail.com"
] | packetcode@gmail.com |
001b8e5d7167d9f7ae30d9510713bbc363cc653b | da934e0010380fdc6894063540f61b0ebc2c9ded | /nova/crypto.py | 1f35ffa3915dad74a002a55998c536549c4b8d2d | [
"Apache-2.0"
] | permissive | bopopescu/cc-2 | ed4f1dfe3c98f476ff619058d99855a16272d36b | 37444fb16b36743c439b0d6c3cac2347e0cc0a94 | refs/heads/master | 2022-11-23T03:57:12.255817 | 2014-10-02T06:10:46 | 2014-10-02T06:10:46 | 282,512,589 | 0 | 0 | Apache-2.0 | 2020-07-25T19:36:05 | 2020-07-25T19:36:05 | null | UTF-8 | Python | false | false | 7,863 | py | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright [2010] [Anso Labs, LLC]
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | [
"anotherjesse@gmail.com"
] | anotherjesse@gmail.com |
ad21dddcaff52dd22e77f283ff4e11ab18a76100 | b8d0b260960e1c43b883049d68c15a7183df200b | /5_py_blog/blog_app/tests.py | ebafc4198267b4929abd66e68f76098e08839139 | [] | no_license | JAreina/python-django | 59ac92d0694522c1d096bed636409d9405c5caba | 66c7c301dec448217df6516198723e1ce987eab7 | refs/heads/master | 2020-03-27T18:34:59.821701 | 2018-09-07T07:49:35 | 2018-09-07T07:49:35 | 146,931,202 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,739 | py |
# Create your tests here.
from django.contrib.auth import get_user_model
from django.test import Client, TestCase
from django.urls import reverse
from .models import Post
class BlogTests(TestCase):
def setUp(self):
self.user = get_user_model().objects.create_user(
username='testuser',
... | [
"jareinafdez@gmail.com"
] | jareinafdez@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.