blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 616 | content_id stringlengths 40 40 | detected_licenses listlengths 0 112 | license_type stringclasses 2
values | repo_name stringlengths 5 115 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 777
values | visit_date timestamp[us]date 2015-08-06 10:31:46 2023-09-06 10:44:38 | revision_date timestamp[us]date 1970-01-01 02:38:32 2037-05-03 13:00:00 | committer_date timestamp[us]date 1970-01-01 02:38:32 2023-09-06 01:08:06 | github_id int64 4.92k 681M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 22
values | gha_event_created_at timestamp[us]date 2012-06-04 01:52:49 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[us]date 2008-05-22 07:58:19 2023-08-21 12:35:19 ⌀ | gha_language stringclasses 149
values | src_encoding stringclasses 26
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 3 10.2M | extension stringclasses 188
values | content stringlengths 3 10.2M | authors listlengths 1 1 | author_id stringlengths 1 132 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e792e19c6c071844b8e14e4097606cc35d55f43f | 4f8a363ad77ffa2772d1916673a390719729ff0f | /example/example.py | afc0c571b7435400d8452ab1ee83c2922e2697b0 | [
"MIT"
] | permissive | HannahVMeyer/bgen-reader-py | c9453063a612c2bc7690c97809a1e746f61b8ebc | 2bbdfbec30df98550d53a13d253fb580bc401690 | refs/heads/master | 2020-03-23T07:10:46.479208 | 2018-07-16T12:49:23 | 2018-07-16T12:49:23 | 141,252,940 | 0 | 0 | null | 2018-07-17T07:58:06 | 2018-07-17T07:58:06 | null | UTF-8 | Python | false | false | 288 | py | from bgen_reader import read_bgen
if __name__ == "__main__":
bgen = read_bgen("example.bgen", verbose=False)
print(bgen["variants"].head())
print(bgen["samples"].head())
print(len(bgen["genotype"]))
p = bgen["genotype"][0].compute()
print(p)
print(p.shape)
| [
"danilo.horta@gmail.com"
] | danilo.horta@gmail.com |
051b4d205eb8834085b0c4a3388e32cdf989b777 | 2affcf450f0bab36b74dd7c8b29522ad38955155 | /pyspedas/geotail/load.py | f27b097b0e3fde3d8f21e205f9036251f591478f | [
"MIT"
] | permissive | nargesahmadi/pyspedas | 1148de83641196681ad65b54e43df0d0c185baf2 | 73ebdabcdef0f6e1087a2a5eb18c3e2384c4fb54 | refs/heads/master | 2022-02-16T18:51:35.204137 | 2022-01-10T23:25:20 | 2022-01-10T23:25:20 | 174,030,853 | 0 | 0 | MIT | 2019-03-05T22:34:32 | 2019-03-05T22:34:24 | Python | UTF-8 | Python | false | false | 2,604 | py | from pyspedas.utilities.dailynames import dailynames
from pyspedas.utilities.download import download
from pyspedas.analysis.time_clip import time_clip as tclip
from pytplot import cdf_to_tplot
from .config import CONFIG
def load(trange=['2013-11-5', '2013-11-6'],
instrument='mgf',
datatype='k0',
... | [
"egrimes@igpp.ucla.edu"
] | egrimes@igpp.ucla.edu |
fbfcbd44389dbd78a51781844533eaeed2c8f870 | 248c535f3612c646bccadecafdca649fd788bb1f | /.history/config_20210927032451.py | 7b5c4e98fe697e4cbf006fd39bb5fbefa8c893f3 | [
"MIT"
] | permissive | GraceOswal/pitch-perfect | 3b923e4de5fff1a405dcb54374a1ba0522232025 | d781c6e0f55c11f2a5e5dceb952f6b2de3c47c3b | refs/heads/master | 2023-08-16T01:42:18.742154 | 2021-10-01T06:59:11 | 2021-10-01T06:59:11 | 410,224,294 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 105 | py | import os
from dotenv import load_dotenv as ld
ld()
class Config:
debug = True
SECRET_KEY = O
| [
"graceoswal88@gmail.com"
] | graceoswal88@gmail.com |
6b396ca0c75e591c9c9ba4624a333c13ce6f7238 | 36cebe3f80c547aa43c8c015484d37cd8e70722b | /dingtalk/callback/__init__.py | bd11949f57e96341f0ec3b7a894c6ea0882f23cc | [
"Apache-2.0"
] | permissive | 007gzs/dingtalk-python | 7e62f4a722484f9a98a22fc1ad21edebb6b7fddc | d9bc5d1294fc000cc7339b4b82c212c63a419cc6 | refs/heads/master | 2020-03-14T22:17:34.191090 | 2018-04-26T02:18:13 | 2018-04-26T02:18:13 | 131,817,956 | 1 | 0 | null | 2018-05-02T08:00:54 | 2018-05-02T08:00:53 | null | UTF-8 | Python | false | false | 6,837 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time: 2018/3/1 上午11:20
# @Author: BlackMatrix
# @Site: https://github.com/blackmatrix7
# @File: __init__.py
# @Software: PyCharm
from .crypto import *
from .callback import *
from functools import partial
from ..exceptions import DingTalkExceptions
from ..foundation impo... | [
"codecolor@outlook.com"
] | codecolor@outlook.com |
9ae7ef98bcee9e4b2d7db1dc46125c4be3eda2a4 | b1571f4ee376d789b8094777fd81c4fb47a89cf1 | /AtCoder/練習/others/sumitrust2019/D1.py | d4afae0be30a66063c7a97e2992736d77893989d | [] | no_license | hiroyaonoe/Competitive-programming | e49e43f8853602ba73e658cab423bd91ebbe9286 | 2949e10eec3a38498bedb57ea41a2491916bab1c | refs/heads/master | 2021-06-23T21:56:33.232931 | 2021-05-30T15:27:31 | 2021-05-30T15:27:31 | 225,863,783 | 2 | 0 | null | 2020-06-14T17:54:28 | 2019-12-04T12:37:24 | Python | UTF-8 | Python | false | false | 319 | py | n=int(input())
s=list(map(int,list(input())))
ans=0
for i in range(10):
try:
ss=s[s.index(i)+1:]
for j in range(10):
try:
sss=ss[ss.index(j)+1:]
for k in range(10):
if k in sss:ans+=1
except:pass
except:pass
print(ans) | [
"onoehiroya@gmail.com"
] | onoehiroya@gmail.com |
59f8182ce946966628f9ed37706d098e615c12dc | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_048/ch25_2020_03_31_22_53_41_450736.py | 44e131685efa1784e312a6679f408074c7a2fedb | [] | no_license | gabriellaec/desoft-analise-exercicios | b77c6999424c5ce7e44086a12589a0ad43d6adca | 01940ab0897aa6005764fc220b900e4d6161d36b | refs/heads/main | 2023-01-31T17:19:42.050628 | 2020-12-16T05:21:31 | 2020-12-16T05:21:31 | 306,735,108 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 211 | py | v=float(input("qual a velocidade"))
o=float(input("qual o angulo"))
g=9.8
import math
d=((v**2)*math.sin(2*o))/g
if d<98:
print('Muito perto')
elif 102<d:
print('Muito longe')
else:
print('Acertou!') | [
"you@example.com"
] | you@example.com |
92c29e1e0f95c6c8c50f1bb43c30c205f4387ff9 | 69d407235771f364277f78aeb3a03896804cb690 | /astrobf/run/run_mask.py | 029b428e4d2404ca033b7017c4f8c8dc2fb933f6 | [] | no_license | Hoseung/astroBF | 1bb16de1c867b943751ff0d73dfabc5ab7e723c6 | e04efff26e99886c8b7eba42a897277318338d61 | refs/heads/main | 2023-07-17T12:27:10.184080 | 2021-09-01T05:42:05 | 2021-09-01T05:42:05 | 313,825,096 | 0 | 0 | null | 2021-07-22T15:16:58 | 2020-11-18T04:44:01 | Jupyter Notebook | UTF-8 | Python | false | false | 3,500 | py | import matplotlib.pyplot as plt
import numpy as np
import pickle
import sys, math
from glob import glob
from astropy.io import fits
import astrobf
from astrobf.utils import mask_utils
from astrobf.utils.mask_utils import *
import re
def extract_gid(g_path):
import re
return int(re.split('(\d+)',g_path.split... | [
"hopung@gmail.com"
] | hopung@gmail.com |
d7b5fb914f9642a2d6865e592d26e4871af30805 | 52346de88a47f70ed63335b21ff12748bbbb5cba | /modules/tools/sensor_calibration/sensor_msg_extractor.py | e5393e63fd2d40f25fbec1cb642a465101fcbab4 | [
"Apache-2.0"
] | permissive | lgsvl/apollo-5.0 | 064537e31c5d229c0712bfcd4109af71dbf1d09d | 105f7fd19220dc4c04be1e075b1a5d932eaa2f3f | refs/heads/simulator | 2022-03-08T09:18:02.378176 | 2021-10-01T22:07:57 | 2021-10-01T22:07:57 | 203,249,539 | 86 | 115 | Apache-2.0 | 2022-02-11T02:55:46 | 2019-08-19T21:00:15 | C++ | UTF-8 | Python | false | false | 9,839 | py | #!/usr/bin/env python
###############################################################################
# Copyright 2019 The Apollo 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 ... | [
"xiaoxiangquan@gmail.com"
] | xiaoxiangquan@gmail.com |
655f4b04f3649777766dc6c14c92519d68e90fda | c059c075c4b31d8aa62174734ba78991c4894b26 | /django_fulcrum/__init__.py | 94e2165eca15bc4fc23d3533bea4f7d3c5330386 | [
"Apache-2.0"
] | permissive | ProminentEdge/django-fulcrum | cd9830e56b354986296070e06c20a6544f768807 | af25cca9bc1940f8548ea11174232dadccfcb156 | refs/heads/master | 2021-01-22T05:38:07.368133 | 2017-03-29T12:48:29 | 2017-03-29T12:48:29 | 81,682,887 | 0 | 1 | null | 2017-02-11T21:16:06 | 2017-02-11T21:16:06 | null | UTF-8 | Python | false | false | 672 | py | # Copyright 2016, RadiantBlue Technologies, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | [
"joseph.svrcek@rgi-corp.com"
] | joseph.svrcek@rgi-corp.com |
5ca45df187f441cfea8b0fc1bfeb5024e3f5924a | 4fc9cb4cf01e41c4ed3de89f13d213e95c87dd33 | /angr/procedures/definitions/win32_user32.py | c90a516fc39d8fe72055e94205bd1428b1b90718 | [
"BSD-2-Clause"
] | permissive | mborgerson/angr | ea5daf28576c3d31b542a0e229139ab2494326e9 | 8296578e92a15584205bfb2f7add13dd0fb36d56 | refs/heads/master | 2023-07-24T22:41:25.607215 | 2022-10-19T19:46:12 | 2022-10-20T18:13:31 | 227,243,942 | 1 | 2 | BSD-2-Clause | 2021-04-07T22:09:51 | 2019-12-11T00:47:55 | Python | UTF-8 | Python | false | false | 406,278 | py | # pylint:disable=line-too-long
import logging
from ...sim_type import SimTypeFunction, SimTypeShort, SimTypeInt, SimTypeLong, SimTypeLongLong, SimTypeDouble, SimTypeFloat, SimTypePointer, SimTypeChar, SimStruct, SimTypeFixedSizeArray, SimTypeBottom, SimUnion, SimTypeBool
from ...calling... | [
"noreply@github.com"
] | mborgerson.noreply@github.com |
1f18bb4f0f316c64abea5e788982bfbf7ef4a0b5 | 54f63580a298ffa63520771c734f5b6dd15894bc | /edabit/4_Hard/Next_Prime.py | 1db7b12fc4d3d66d64f66a33297fbc19c046eedb | [] | no_license | CKMaxwell/Python_online_challenge | 048d24128b588d1af3db03379fb462cf7ea908a9 | f13444612d93cf98aff760a6ff01d82a18082725 | refs/heads/master | 2023-01-03T20:19:27.001425 | 2020-10-26T18:25:07 | 2020-10-26T18:25:07 | 287,968,703 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 396 | py | # 20201005 - Next Prime
def next_prime(num):
def prime(current):
check = True
for i in range(2, current//2):
if current % i == 0:
check = False
return check
if prime(num) == True:
return num
else:
while True:
num += 1
... | [
"39400519+CKMaxwell@users.noreply.github.com"
] | 39400519+CKMaxwell@users.noreply.github.com |
622309d302fd71704671b8141ad4a809f708f03b | 2293c76c3d18e2fcd44ded90bd40113d26285663 | /pyeccodes/defs/mars/grib_oper_4i_def.py | c153a52e4f1916249797f9519a5d607539773564 | [
"Apache-2.0"
] | permissive | ecmwf/pyeccodes | b1f121dbddf68d176a03805ed5144ba0b37ac211 | dce2c72d3adcc0cb801731366be53327ce13a00b | refs/heads/master | 2022-04-23T10:37:40.524078 | 2020-04-18T06:30:29 | 2020-04-18T06:30:29 | 255,554,540 | 9 | 3 | null | null | null | null | UTF-8 | Python | false | false | 97 | py | import pyeccodes.accessors as _
def load(h):
h.alias('mars.iteration', 'iterationNumber')
| [
"baudouin.raoult@ecmwf.int"
] | baudouin.raoult@ecmwf.int |
dc3186d2a2455dc2d0a0a9cff49870a71018fe2c | fb86f0dca6e525b8a8ddb63f10b8d220ddd7f7fe | /test/functional/rpc_users.py | e0e558491976166d2bcf20a7ad60b036f1e5687b | [
"MIT"
] | permissive | ORO-mlm/UNO-Core | 14fcdb3c2db4bde256e48ea661ada61579ccf403 | d6e6769ce57466cfc9e7cab681eab880cdb8e3e8 | refs/heads/main | 2023-06-16T08:21:00.808606 | 2021-07-12T07:08:35 | 2021-07-12T07:08:35 | 383,350,655 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,951 | py | #!/usr/bin/env python3
# Copyright (c) 2015-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test multiple RPC users."""
from test_framework.test_framework import UnoTestFramework
from test_frame... | [
"brandon2davincci@gmail.com"
] | brandon2davincci@gmail.com |
c0e2d24a1bc7297c88a9beb74ab0133e4e5aac89 | 9556f7e1d81a305d71a66b9768eba199e396d733 | /CloudVerify/hz_topic/plot.py | 447e8168a5f86e890edab291b63a8088f90bc23a | [] | no_license | gitgaoqian/Python | 301a2823b50ec754a2c1a3f47c39ae8b0b8e6890 | 164f5271044b235d256a9bbe0a34caacf1e81fc8 | refs/heads/master | 2023-01-08T21:23:59.640828 | 2020-11-01T13:06:21 | 2020-11-01T13:06:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,121 | py | # -*- coding: utf-8 -*-
"""
Created on Wed Jan 17 20:41:36 2018
@author: ros
"""
import matplotlib.pyplot as plt
def load_data(fileName):
inFile = open(fileName, 'r')
t=[]
rate=[]
num=1
for line in inFile:
t.append(num) #第一部分,即文件中的第一列数据逐一添加到list X 中
rate.append(float(line.strip('\n'... | [
"734756851@qq.com"
] | 734756851@qq.com |
ed902afbfae4296e1b7fd7cc37f83453df65e33c | 0937646b6ce9249a8d193987f308ce398dc28bd1 | /statistics.py | 4a51b15c3db32e5303a16077cf08ea2c86d4f3e8 | [] | no_license | barry800414/JobTitleNLP | 98622d02b25b1418f28698f7d772c8de96642032 | b379c2052447e6483d17f5db51fb918b37ac7a52 | refs/heads/master | 2021-06-08T19:36:39.044757 | 2016-10-21T03:11:10 | 2016-10-21T03:11:10 | 66,043,111 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 917 | py |
import sys, json
from collections import defaultdict
from getCat import *
with open('jobs.min.json', 'r') as f:
data = json.load(f)
with open('104RawCategory.json', 'r') as f:
rawCat = json.load(f)
to2 = getL3ToL2(rawCat)
to1 = getL2ToL1(rawCat)
L3Cnt = dict()
L2Cnt = defaultdict(int)
L1Cnt = defaultdict(i... | [
"barry800414@gmail.com"
] | barry800414@gmail.com |
4581ca0ff8deedc11195f9b9e61bd3b02094bc6a | f4dcb14111539e9a22300256fd6f8fefc61f2d50 | /src/flua/Compiler/Output/cpp/CPPNamespace.py | dc0efdf08384a361bdec9fa561fa5145d8bb7ac0 | [] | no_license | GWRon/flua | 276c3ea4ce1cfcf68a1000fb44512460b5161c4e | 1cf051f1d5aec3ba4da48442a0d7257d399e5b36 | refs/heads/master | 2021-01-15T17:37:03.914965 | 2012-10-24T12:57:27 | 2012-10-24T12:57:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,462 | py | ####################################################################
# Header
####################################################################
# File: Namespace class
# Author: Eduard Urbach
####################################################################
# License
##########################################... | [
"e.urbach@gmail.com"
] | e.urbach@gmail.com |
ec65f29f39de790b1e38281d3dde053db6f88073 | 4ed5069638a0e684e8e813e4ef34dcfd1b68cd74 | /boj/python/9012.py | 23dfb7c5b49336d327f0b59ebfdff9939db6a327 | [] | no_license | youngerous/algorithm | 11dafe9c54edf83646c915c59b1d7d4d18569005 | fe599d958fdf51b956d2250088a3d5f1c5b22854 | refs/heads/master | 2022-01-27T02:12:49.237009 | 2022-01-16T12:29:40 | 2022-01-16T12:29:40 | 133,662,997 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 501 | py | from sys import stdin
input = stdin.readline
N = int(input())
for _ in range(N):
ps = input().strip()
if ps.count("(") != ps.count(")"):
print("NO")
continue
# 처음부터 stack을 int 0으로 할당하면 시간을 더 줄일 수 있을 것
stack = []
try:
for each in ps:
stack.append(each) if each ==... | [
"youngerous@gmail.com"
] | youngerous@gmail.com |
56de0b2bcdbe8b60bea7a9548e1e13342bb60ec4 | 5d7a3dc27540e04e5cb9c8f4742830c7fca188f0 | /StudentsWork/John_Chan/nvramscrub.py | bf6352993ad50cc77eaa86d8f332f5335355b2ff | [] | no_license | PythonCHB/PythonIntroClass | 1986e553390c6f3504e279cda23744ceacc3a292 | b49d41bd04696d45ef4394b489de408cbd3b3d32 | refs/heads/master | 2020-12-24T17:35:31.408292 | 2014-10-16T18:09:21 | 2014-10-16T18:09:21 | 4,633,372 | 9 | 2 | null | null | null | null | UTF-8 | Python | false | false | 10,182 | py | import isi.app.lib.procs as procs
import isi.hw.hal as hal
import isi.hw.version as hwver
import isi.hw.check.lib.filenames as files
import isi.hw.check.lib.log as loglib
import isi.hw.check.lib.misc as misc
import isi.hw.check.lib.nvram as nvram
import isi.hw.check.lib.ramdisk as ramdisk
import isi.hw.check.lib.syslo... | [
"Chris.Barker@noaa.gov"
] | Chris.Barker@noaa.gov |
692841366fdad59ec8bf6e644ed7a843673fbc53 | 4c61f3bc0620758224bca72d4edec2707b41ecf0 | /tests/test_victorspx.py | a586ffc0109f6fa13675f07e23206ea903e99df4 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | CrispyBacon1999/robotpy-ctre | 6b5ec68606e5b9094669e468fb4f01cd27f05c9d | b57346dda3de46c6f3bf25dddfe166fbf192846f | refs/heads/master | 2020-12-11T11:47:28.578527 | 2020-01-02T00:35:29 | 2020-01-02T00:35:29 | 233,840,408 | 0 | 0 | NOASSERTION | 2020-01-14T12:50:12 | 2020-01-14T12:50:11 | null | UTF-8 | Python | false | false | 424 | py | import pytest
@pytest.fixture(scope="function")
def victor(ctre):
return ctre.WPI_VictorSPX(1)
@pytest.fixture(scope="function")
def cdata(victor, hal_data):
return hal_data["CAN"][1]
def test_victor_init(ctre, hal_data):
assert 1 not in hal_data["CAN"]
ctre.WPI_VictorSPX(1)
assert 1 in hal_da... | [
"dustin@virtualroadside.com"
] | dustin@virtualroadside.com |
a3cd45f7e1323072104c4dc2f72039b303b36d0c | 7ee3aefd7e9d934b18c615b18f50fa25badc8f2a | /tests/test_items.py | c34804df473c9117934e2ab0c1281b1e865249b8 | [
"BSD-2-Clause"
] | permissive | dmcgee/exchangelib | d2074e394bcf91165d2d3c0fe83011da105635f4 | b2f7006835393132bdf2cfb416ba44f847c8bbf2 | refs/heads/master | 2020-12-04T06:34:03.377437 | 2020-01-03T14:17:33 | 2020-01-03T14:18:02 | 231,658,419 | 0 | 0 | BSD-2-Clause | 2020-01-03T20:15:41 | 2020-01-03T20:15:40 | null | UTF-8 | Python | false | false | 120,893 | py | # coding=utf-8
import datetime
from decimal import Decimal
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from keyword import kwlist
import time
import unittest
import unittest.util
from dateutil.relativedelta import relativedelta
from exchangelib.account import SAVE_ONLY, SEND_ONL... | [
"erik@cederstrand.dk"
] | erik@cederstrand.dk |
e99d44683d10030de32eea47d3b31d3a6ce832c4 | 1ec89e2731d84f4fc4210060212ea80b002db277 | /pysph/examples/ghia_cavity_data.py | 0c9ded4878f9770d5ce8010d28b8f98994555831 | [
"BSD-3-Clause"
] | permissive | fight1314/pysph | 15600a3053f5bac41bf9c862914e870d93454e20 | 9bfa8d65cee39fbd470b8231e38e972df199a4da | refs/heads/master | 2020-07-21T20:44:26.866017 | 2019-09-04T20:16:53 | 2019-09-04T20:16:53 | 206,971,679 | 3 | 0 | NOASSERTION | 2019-09-07T13:24:51 | 2019-09-07T13:24:51 | null | UTF-8 | Python | false | false | 3,655 | py | """This module provides a few convenient functions for
the Lid Driven Cavity solutions in the paper:
"High-Re solutions for incompressible flow using the Navier-Stokes
equations and a multigrid method", U Ghia, K.N Ghia, C.T Shin,
JCP, Volume 48, Issue 3, December 1982, Pages 387-411.
"""
import numpy as np
from io i... | [
"prabhu@aero.iitb.ac.in"
] | prabhu@aero.iitb.ac.in |
7661ea76c637070772b50453020cc582db68ef5b | b4ce39af031a93354ade80d4206c26992159d7c7 | /Tutorials/Scope/Converting Local To Global.py | e434a4d9f566cf4f6e62207fb845331355581d81 | [] | no_license | Bibin22/pythonpgms | 4e19c7c62bc9c892db3fd8298c806f9fdfb86832 | e297d5a99db2f1c57e7fc94724af78138057439d | refs/heads/master | 2023-06-15T00:51:14.074564 | 2021-07-12T17:44:47 | 2021-07-12T17:44:47 | 315,982,691 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 108 | py | a = 10
def fname():
global a
a = 15
print('Inside the function', a)
fname()
print('Outside', a) | [
"bibinjoy82@gmail.com"
] | bibinjoy82@gmail.com |
a411c7c8ec083f0a3500bac6c9f4fbebb6cbf0d4 | afdf82890966bd3061db0a2478ad600fb8528475 | /Chapter4/garbage.py | 3ae8e92079e19f310faffcd854cd780535b234ba | [] | no_license | humuhimi/wkwk_nlp | 7cd6653d7cdb2b8f171447c2628b8a517dd65d13 | 48a6ef3745bf2c97c5581034bf85450be5783664 | refs/heads/master | 2022-01-11T09:15:06.378166 | 2019-07-03T08:43:49 | 2019-07-03T08:43:49 | 191,727,302 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 962 | py | # ストップワードの除去:使用頻度の高い言葉を処理対象外にする
import MeCab
# mecab-ipadic-NEologd辞書指定してオブジェクト生成
tagger = MeCab.Tagger()
tagger.parse("")
# 形態素解析の結果をリストで取得、単語ごとにリストの要素に入ってる
node = tagger.parseToNode("機械学習をマスターしたい。")
result = []
#助詞や助動詞は拾わない
while node is not None:
# 品詞情報取得
# Node.featureのフォーマット:品詞,品詞細分類1,品詞細分類2,品詞細分類3,活用形,活... | [
"masa19951009@gmail.com"
] | masa19951009@gmail.com |
cdb0d8b6cd08ee4eb88fdc17d0efedfad34bbef7 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/nouns/_angina.py | a3b48acb4bd4e8c024e14b432ddc21b2b819b361 | [
"MIT"
] | permissive | cash2one/xai | de7adad1758f50dd6786bf0111e71a903f039b64 | e76f12c9f4dcf3ac1c7c08b0cc8844c0b0a104b6 | refs/heads/master | 2021-01-19T12:33:54.964379 | 2017-01-28T02:00:50 | 2017-01-28T02:00:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 420 | py |
#calss header
class _ANGINA():
def __init__(self,):
self.name = "ANGINA"
self.definitions = [u'a condition that causes strong chest pains because blood containing oxygen is prevented from reaching the heart muscle by blocked arteries: ']
self.parents = []
self.childen = []
self.properties = []
self.jso... | [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
74d6da60d8fb42c6a20f8541c42289571346ac04 | 942b0a9a24efa9dfc49ff4743180d9a412070359 | /LEARNING/IMPORT/3_RemoteLoad/base.py | 1150d0f6700110235ce38cf885994b3e832de242 | [] | no_license | atomicoo/python-tutorials | c48cd0e4b2b6e70ba177e40ea847c7b398139b62 | e630c9bb3bcddda874a4c0a5b02c7e4d47e1eb7e | refs/heads/master | 2023-02-02T09:46:21.147516 | 2020-12-17T03:59:06 | 2020-12-17T03:59:06 | 317,762,439 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,842 | py | import sys
from importlib import abc
from importlib.machinery import ModuleSpec
import imp
from urllib.request import urlopen
# Debugging
import logging
logging.basicConfig(format='%(asctime)s - %(pathname)s[line:%(lineno)d] - %(levelname)s: %(message)s',
level=logging.DEBUG)
logger = logging.getLo... | [
"atomicoo95@gmail.com"
] | atomicoo95@gmail.com |
a5cf496490118bc838a7e7ce72e2a774864993cf | 20aadf6ec9fd64d1d6dffff56b05853e0ab26b1f | /l5/L5_pbm9.py | d4eb630c9efd666ed8dafec822a97ccc812ed104 | [] | no_license | feminas-k/MITx---6.00.1x | 9a8e81630be784e5aaa890d811674962c66d56eb | 1ddf24c25220f8b5f78d36e2a3342b6babb40669 | refs/heads/master | 2021-01-19T00:59:57.434511 | 2016-06-13T18:13:17 | 2016-06-13T18:13:17 | 61,058,244 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 404 | py | def semordnilap(str1, str2):
'''
str1: a string
str2: a string
returns: True if str1 and str2 are semordnilap;
False otherwise.
'''
if len(str1) != len(str2):
return False
if len (str1)==1:
return str1 == str2
if str1[0]== str2[-1]:
return semord... | [
"femi1991@gmail.com"
] | femi1991@gmail.com |
e59e2f20fba580c5a353b118da2c2220bc2a4e2a | 9adc810b07f7172a7d0341f0b38088b4f5829cf4 | /rlkit/torch/dqn/double_dqn.py | 74b2f68bcafd5be7ce67a3fd89c50b4e34968553 | [
"MIT"
] | permissive | Asap7772/railrl_evalsawyer | 7ee9358b5277b9ddf2468f0c6d28beb92a5a0879 | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | refs/heads/main | 2023-05-29T10:00:50.126508 | 2021-06-18T03:08:12 | 2021-06-18T03:08:12 | 375,810,557 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,826 | py | import numpy as np
import torch
import rlkit.torch.pytorch_util as ptu
from rlkit.misc.eval_util import create_stats_ordered_dict
from rlkit.torch.dqn.dqn import DQNTrainer
class DoubleDQNTrainer(DQNTrainer):
def train_from_torch(self, batch):
rewards = batch['rewards']
terminals = batch['termina... | [
"alexanderkhazatsky@gmail.com"
] | alexanderkhazatsky@gmail.com |
1e38f163e306125853c3aa311d95f7dac5c202c5 | 18aee5d93a63eab684fe69e3aa0abd1372dd5d08 | /paddle/fluid/eager/auto_code_generator/generator/codegen_utils.py | 0ec006555e47f33e8f74624ace796dde354801f3 | [
"Apache-2.0"
] | permissive | Shixiaowei02/Paddle | 8d049f4f29e281de2fb1ffcd143997c88078eadb | 3d4d995f26c48f7792b325806ec3d110fc59f6fc | refs/heads/develop | 2023-06-26T06:25:48.074273 | 2023-06-14T06:40:21 | 2023-06-14T06:40:21 | 174,320,213 | 2 | 1 | Apache-2.0 | 2022-12-28T05:14:30 | 2019-03-07T10:09:34 | C++ | UTF-8 | Python | false | false | 18,349 | py | # Copyright (c) 2022 PaddlePaddle 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 appli... | [
"noreply@github.com"
] | Shixiaowei02.noreply@github.com |
bd36f5a224dff4b96b3c92eab002514c9b2bacca | 95495baeb47fd40b9a7ecb372b79d3847aa7a139 | /swagger_client/models/application_tag.py | bc362cac4bddba8e4eb3ab58a96ff3a308710541 | [] | no_license | pt1988/fmc-api | b1d8ff110e12c13aa94d737f3fae9174578b019c | 075f229585fcf9bd9486600200ff9efea5371912 | refs/heads/main | 2023-01-07T09:22:07.685524 | 2020-10-30T03:21:24 | 2020-10-30T03:21:24 | 308,226,669 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,524 | py | # coding: utf-8
"""
Cisco Firepower Management Center Open API Specification
**Specifies the REST URLs and methods supported in the Cisco Firepower Management Center API. Refer to the version specific [REST API Quick Start Guide](https://www.cisco.com/c/en/us/support/security/defense-center/products-programmi... | [
"pt1988@gmail.com"
] | pt1988@gmail.com |
d213cd9894b49709b6f412912e23fb194187d63a | c4b636a2fffbf8ef3096e4de9de61b30ea3df72a | /hackerrank/find_tortosian_angle.py | d30648b1f4f0359a1f1c8378e6b8211b53386bd0 | [
"MIT"
] | permissive | FelixTheC/hackerrank_exercises | f63fbbc55a783ee4cecfa04302301a0fb66d45fe | 24eedbedebd122c53fd2cb6018cc3535d0d4c6a0 | refs/heads/master | 2021-01-04T22:10:47.538372 | 2020-11-01T15:57:20 | 2020-11-01T15:57:20 | 240,779,506 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,223 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@created: 07.07.20
@author: felix
"""
import math
class Points:
__slots__ = ['x', 'y', 'z']
def __init__(self, x, y, z):
self.x, self.y, self.z = x, y, z
def __sub__(self, other):
return Points(self.x - other.x,
sel... | [
"felixeisenmenger@gmx.net"
] | felixeisenmenger@gmx.net |
0d1dcd325910aa6bea587ec4fd7d586ad4913797 | 088f692b5981e0f0ff99191f482de3a783ff2260 | /fcc_adtracker/fccpublicfiles/migrations/0028_auto__add_field_state_summary_total_files_entered__add_field_state_sum.py | 4b474d4360d97a101aabce7a9cd2ca52aebac303 | [] | no_license | sunlightlabs/fcc_political_ads | ec0de992a8e15822e3b44bf0897f0568f3880328 | 81a1bb410f5c71b39e31383020e554aafa70f222 | refs/heads/master | 2021-01-02T09:53:38.758905 | 2016-09-13T20:51:15 | 2016-09-13T20:51:15 | 4,089,192 | 2 | 6 | null | null | null | null | UTF-8 | Python | false | false | 45,114 | py | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'state_summary.total_files_entered'
db.add_column('fccpublicfiles_state_summary', 'total_file... | [
"jfenton@sunlightfoundation.com"
] | jfenton@sunlightfoundation.com |
3ac7de780e04dfd3fb4a83d22d22c72c9b191128 | 2e3f09aa3ad09a33cb9133133a2e7aa92578de00 | /GenPIDMatching/test/test_wETL_cfg.py | 5cb68687b035b0a716ba5b46670157d97bb36f40 | [] | no_license | yszhang95/MTDHIAnalysis | 238f470e941d3d5a5a5c91f5e3d496323dc7a1db | de1e76a2a6d9cc43df992bd3e598f82c77aeebc2 | refs/heads/master | 2020-04-19T00:54:11.669859 | 2018-12-03T12:12:37 | 2018-12-03T12:12:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,637 | py | import FWCore.ParameterSet.Config as cms
process = cms.Process("mtdhi")
# initialize MessageLogger and output report
process.load("FWCore.MessageLogger.MessageLogger_cfi")
process.MessageLogger.cerr.FwkReport.reportEvery = cms.untracked.int32(1)
process.options = cms.untracked.PSet( wantSummary =
cms.untracked.boo... | [
"liwei810812@gmail.com"
] | liwei810812@gmail.com |
3291bf56514aaf9d24dd01745b5735be76b4a58e | 6b2a8dd202fdce77c971c412717e305e1caaac51 | /solutions_5738606668808192_1/Python/thomasahle/c.py | eef8d580501ceb9469eb0cf84e9016a7098c1326 | [] | no_license | alexandraback/datacollection | 0bc67a9ace00abbc843f4912562f3a064992e0e9 | 076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf | refs/heads/master | 2021-01-24T18:27:24.417992 | 2017-05-23T09:23:38 | 2017-05-23T09:23:38 | 84,313,442 | 2 | 4 | null | null | null | null | UTF-8 | Python | false | false | 1,164 | py | import sys
read = lambda t=int: list(map(t,sys.stdin.readline().split()))
#def isweakprime(n):
# return all(n%q!=0 for q in [2,3,5,7,11])
#def isprime(n):
# return all(n%q!=0 for q in range(2,int(n**.5)+1))
#def brute(n):
# for i in range(2**(n-2)):
# j = 1<<(n-1) | i<<1 | 1
# bs = [sum(b**i for i in r... | [
"alexandra1.back@gmail.com"
] | alexandra1.back@gmail.com |
2200a43585376dd23f9cbc67bb71411c8aebf3b8 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02272/s422945045.py | 66f42ba322c67f725b33af923bcbd37a20695982 | [] | 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 | 645 | py | def mergeSort(A,left,right,B):
if left + 1 < right:
mid = (left+right)//2
mergeSort(A,left,mid,B)
mergeSort(A,mid,right,B)
merge(A,left,mid,right,B)
def merge(A,left,mid,right,B):
L = A[left:mid]
R = A[mid:right]
L.append(1000000000)
R.append(1000000000)
i = 0
... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
3a0f72906def2d13f98d888604882f44568b1c56 | 66c3ff83c3e3e63bf8642742356f6c1817a30eca | /.vim/tmp/neocomplete/buffer_cache/=+home=+dante=+proyectos=+django-1.9=+veterinaria=+django_apps=+clinica=+models.py | 25bd9104cfe86222f0a9f578ff0fbef6985e82a0 | [] | no_license | pacifi/vim | 0a708e8bc741b4510a8da37da0d0e1eabb05ec83 | 22e706704357b961acb584e74689c7080e86a800 | refs/heads/master | 2021-05-20T17:18:10.481921 | 2020-08-06T12:38:58 | 2020-08-06T12:38:58 | 30,074,530 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,836 | py | {'usr', 'bin', 'env', 'python3', 'coding', 'utf', 'from', '__future__', 'import', 'unicode_literals', 'uuid', 'django', 'db', 'models', 'core', 'urlresolvers', 'reverse', 'utils', 'translation', 'ugettext_lazy', 'as', '_', 'signals', 'pre_save', 'text', 'slugify', 'django_apps', 'compras', 'TimeBuy', 'persona', 'Client... | [
"pacifi.bnr@gmail.com"
] | pacifi.bnr@gmail.com |
7862f8b3d8719a8e3d7345b5a55b8d124eabfb15 | 1902858ae52dcaff33ad6056670d2df933744122 | /Sample_Python_File.py | 5ea4ff989e81614a62b7c184e148129e9c2b5b8f | [] | no_license | gsudarshan1990/codilitypython | 220dabe82917cdab955c9bf7446c7752d5b9474d | 73d601291c86824925daf52c4fee369765a0d176 | refs/heads/master | 2022-11-29T02:11:14.901476 | 2020-08-17T06:01:14 | 2020-08-17T06:01:14 | 288,095,600 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,264 | py | print("Hello World")
string1 = 'Good morning'
print(string1[:3])
print(string1[4:])
message='A kong string with a silly typo'
new_message=message[:2]+'l'+message[3:]
print(new_message)
pets="Dogs & Cats"
print(pets.index('&'))
email="shashank@gmail.com"
old_domain = "gmail.com"
new_domain = "yahoo.com"
def replace... | [
"sudarshan2009@live.in"
] | sudarshan2009@live.in |
1e2ddbfb4d384d155cac17158825e2a855f673cc | 536538af28cfe40e10ff1ce469cd0f81e8b3a8fe | /longest_increasing_path_in_a_matrix.py | 55beead6cedf6fdd763cbdc064334a7ba3d1b00f | [] | no_license | ShunKaiZhang/LeetCode | 7e10bb4927ba8581a3a7dec39171eb821c258c34 | ede2a2e19f27ef4adf6e57d6692216b8990cf62b | refs/heads/master | 2021-09-01T07:41:03.255469 | 2017-12-25T19:22:18 | 2017-12-25T19:22:18 | 104,136,129 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,549 | py | # python3
# Given an integer matrix, find the length of the longest increasing path.
# From each cell, you can either move to four directions: left, right, up or down.
# You may NOT move diagonally or move outside of the boundary (i.e. wrap-around is not allowed).
# Example 1:
# nums = [
# [9,9,4],
# [... | [
"noreply@github.com"
] | ShunKaiZhang.noreply@github.com |
36444e5712a6f02ffbc71f329bf1d966fd9abe0a | ee6ec654937a5f592b373630f58de1a41138ad70 | /nosocod/nodes/node.py | 83d0ba40b2c92132e4cc44d91623886984861afc | [] | no_license | atykhonov/nosocod | eae05b857b5e88f0a590c632d013cb4deea715d4 | 2af67d7280af3344a0b44a8e6ccd1c1fd7a9eb88 | refs/heads/master | 2016-09-16T14:44:33.519300 | 2014-03-10T20:14:51 | 2014-03-10T20:14:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,682 | py | class Node(object):
name = ''
value = ''
actions = []
children = []
parent = None
params = []
linked_with = None
anchored = False
def __init__(self, name, value=None):
self.name = name
# TODO do we realy need this if?
if value:
self.value ... | [
"atykhonov@gmail.com"
] | atykhonov@gmail.com |
9b07f7e39167b54c0126332b3d41fccbbaba53b5 | b175a3abfa14992d9b07d53adc12700ded3b1c02 | /BasicLibs/learnPySpark/ml/random_forest_classifier_example.py | 15bd8a95d0a503d9c4e17628250736e88d0a0344 | [] | no_license | BarryZM/Python-AI | d695a1569e5497da391b578e6638cc11479bfbaa | 251dc4002f9d7e5dd789e62b813651f2006f6ab6 | refs/heads/master | 2023-03-17T15:33:35.530258 | 2020-04-01T10:32:47 | 2020-04-01T10:32:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,306 | py | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | [
"hsw.time@gmail.com"
] | hsw.time@gmail.com |
3ac01903d8060933f7d9834e41fe972c9c808112 | 0672d2aaec261a3e9da3c5596f7a578f3b7605b2 | /tests/test_plugins.py | aeffdb8080dcbb760c7a491583542fbe44cceecc | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] | permissive | elimarkov/coveragepy | dc2f03d68d27badd5a94dc7a5262c68f62a78804 | 4ce893437c9e777216cac981c5909572fa10d9df | refs/heads/master | 2023-03-11T19:26:57.189126 | 2021-03-05T00:37:25 | 2021-03-05T00:37:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 42,370 | py | # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt
"""Tests for plugins."""
import inspect
import os.path
from xml.etree import ElementTree
import pytest
import coverage
from coverage import env
from coverage.bac... | [
"ned@nedbatchelder.com"
] | ned@nedbatchelder.com |
c7bdea3d3ab6180d2b789fd140f141eb2e07ac06 | b1fe502cfd4832b9ddc24f5dccc9c5d6f3e1ef4a | /code/emails2.py | 21dd2dcb13da5666f3fdbebe753f99c95384c365 | [] | no_license | hanxiaoshun/steam_cui | 73fa3273fc057811e76ed5a4f0b65b858d5536d7 | 768b660e27806a90bf43351526b88aa36552877b | refs/heads/master | 2023-01-22T08:15:33.851246 | 2020-11-22T23:47:08 | 2020-11-22T23:47:08 | 309,525,747 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 570 | py | # %3A%2F%2F=://
# %2F=/
# %3D= =
# 'https%3A%2F%2Fstore.steampowered.com%2Faccount%2Fnewaccountverification%3F
# stoken
# %3D385313a17af59bf057c9254f1d024ea2c87193ac543cb821540ed83539596a944d188e14361d8315e303d3833e78a6a7
# %3D385313a17af59bf057c9254f1d024ea2c87193ac543cb821540ed83539596a944d188e14361d8315e303d3833e78... | [
"18301513217@sina.cn"
] | 18301513217@sina.cn |
5781f23b00e1920d30f18bda54f32ff8f34b8b0d | 7c2e677d931a8eb7d7cffc6d54713411abbe83e4 | /AppBuilder9000/AppBuilder9000/FestivalApp/views.py | 36c0495f856bd4c64a0e3c830e04e4f8a1c47923 | [] | no_license | r3bunker/Python_Live_Project | 19e367b3cf74c2279c287fcd3a8a44a27f24041a | d3e06150d7daea6326cc1a4155309d99e4ff6244 | refs/heads/main | 2023-06-12T23:01:50.440371 | 2021-06-16T20:21:03 | 2021-06-16T20:21:03 | 344,883,966 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,444 | py | from django.shortcuts import render, redirect, get_object_or_404
from .models import FestivalReview, USCities
from .forms import ReviewForm
from django.db.models import Q
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
import requests
import json
import os
from django.contrib import messages
fr... | [
"r3bunker@gmail.com"
] | r3bunker@gmail.com |
eea61969e7f6be2c1f7d87af9651d2ae9981a599 | f09dc121f213f2881df3572288b7ee5b39246d73 | /aliyun-python-sdk-objectdet/aliyunsdkobjectdet/request/v20191230/ClassifyVehicleInsuranceRequest.py | 904a71cd6958473b6231aed3ad589f74ad126417 | [
"Apache-2.0"
] | permissive | hetw/aliyun-openapi-python-sdk | 2f31378ad6be0896fb8090423f607e9c7d3ae774 | 7443eacee9fbbaa93c7975c6dbec92d3c364c577 | refs/heads/master | 2023-01-19T22:42:36.214770 | 2020-12-04T10:55:14 | 2020-12-04T10:55:14 | 318,689,093 | 1 | 0 | NOASSERTION | 2020-12-05T03:03:03 | 2020-12-05T03:03:03 | null | UTF-8 | Python | false | false | 1,464 | py | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
2792bbe02ccbe16552038a958ca64abd2b9a6c45 | b708cf2c5145d68fbc45c736568fe152e7dec27e | /apps/store/views.py | 8dda31fbfd77fc5dcb60bd45c6728e7a32db3fa1 | [] | no_license | stillnurs/dropshipper-django-vue | 56036ebf705d91aea58492344d57c2d94ee6c368 | becad05d44342598b4c1f8fba7d19bc6223d6c57 | refs/heads/main | 2023-05-03T08:34:35.771909 | 2021-05-23T12:15:15 | 2021-05-23T12:15:15 | 369,894,968 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,720 | py | import random
from datetime import datetime
from django.shortcuts import render, get_object_or_404, redirect
from django.db.models import Q
from apps.cart.cart import Cart
from .models import Product, Category, ProductReview
def search(request):
query = request.GET.get('query')
instock = request.GET.get('i... | [
"noorsultan.mamataliev@gmail.com"
] | noorsultan.mamataliev@gmail.com |
1e83527a90853e686356fcf1282cefab339f8905 | c9e2bb165d0cc60e47f4d658a05bd77bb5f6fa9a | /unittests/test_wsgi_jinja.py | 6d2b9eea3f7bcddd96ac3abda9a6e82dcc56edce | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | swl10/pyslet | c1eb8a505972e6c16bd01d6f9e7c6cd83f75f123 | b30e9a439f6c0f0e2d01f1ac80986944bed7427b | refs/heads/master | 2021-01-25T09:31:55.480250 | 2018-03-05T18:50:11 | 2018-03-05T18:50:11 | 20,192,341 | 67 | 39 | NOASSERTION | 2020-03-31T05:51:24 | 2014-05-26T16:37:45 | Python | UTF-8 | Python | false | false | 1,661 | py | #! /usr/bin/env python
import logging
import optparse
import os.path
import unittest
from pyslet.wsgi_jinja import JinjaApp
def suite(prefix='test'):
loader = unittest.TestLoader()
loader.testMethodPrefix = prefix
return unittest.TestSuite((
loader.loadTestsFromTestCase(JinjaAppTests),
))
... | [
"steve.w.lay@gmail.com"
] | steve.w.lay@gmail.com |
cc2d2b05587e1040aeb998970bdd7ff6b7119cc7 | 6896fce8ee082f9730c056436e49ef0d16a6ea03 | /leetcode/demo.py | 1311c4dfc429fbf3f35519e1f200bd9bb77d8adf | [] | no_license | Sugeei/python-practice | 5022ae7c34bc04972edebc15936248cb9869ec54 | 048df40500a059e4380f3ecc2581de96c9a1fc9b | refs/heads/master | 2022-12-07T06:34:40.740379 | 2022-11-13T11:48:29 | 2022-11-13T11:48:29 | 121,074,877 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 28 | py | print(9%10)
print(int(9/10)) | [
"215626824@qq.com"
] | 215626824@qq.com |
975a54336d40dfe3e284486a8533f9509cd722a5 | 35be0509b6f98030ef5338033468710de1a536a3 | /cinder/cinder/tests/unit/volume/drivers/netapp/eseries/fakes.py | 1dd6ef505f86346c88ff493988d6a87c5636b3b8 | [
"Apache-2.0"
] | permissive | yizhongyin/OpenstackLiberty | 6f2f0ff95bfb4204f3dbc74a1c480922dc387878 | f705e50d88997ef7473c655d99f1e272ef857a82 | refs/heads/master | 2020-12-29T02:44:01.555863 | 2017-03-02T06:43:47 | 2017-03-02T06:43:47 | 49,924,385 | 0 | 1 | null | 2020-07-24T00:49:34 | 2016-01-19T03:45:06 | Python | UTF-8 | Python | false | false | 35,671 | py | # Copyright (c) - 2015, Alex Meade
# Copyright (c) - 2015, Yogesh Kshirsagar
# Copyright (c) - 2015, Michael Price
# 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 Licens... | [
"yizhongyin@os-easy.com"
] | yizhongyin@os-easy.com |
66ce0e5e6607fb88403194d1679ab6f2ffdbf620 | 4b198f184cbe79abf0c7f9e53054b19a2100c908 | /tests/test_base.py | 04890bf888e42d74bc966f8c7d586d82af3402b1 | [
"Apache-2.0"
] | permissive | zzzz123321/GerapyAutoExtractor | 03095a693770d0f2a9919272db9134466ac314bc | 8d6f44d3d55a590fe971a68a425f20bc792a3947 | refs/heads/master | 2022-11-15T23:19:20.491401 | 2020-07-10T03:19:16 | 2020-07-10T03:19:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 372 | py | import unittest
from os.path import join
class TestBase(unittest.TestCase):
samples_dir = None
def html(self, file_name):
"""
get html content of file
:param file_name:
:return:
"""
file_path = join(self.samples_dir, file_name)
with open(file_path, ... | [
"cqc@cuiqingcai.com"
] | cqc@cuiqingcai.com |
694a05ea0a76734cee806539f4d944a677e2ea02 | 24fe1f54fee3a3df952ca26cce839cc18124357a | /servicegraph/lib/python2.7/site-packages/acimodel-4.0_3d-py2.7.egg/cobra/modelimpl/rtctrl/settagdef.py | d227f1c2fb007ad7995a709552fb6968c7f8a4bc | [] | no_license | aperiyed/servicegraph-cloudcenter | 4b8dc9e776f6814cf07fe966fbd4a3481d0f45ff | 9eb7975f2f6835e1c0528563a771526896306392 | refs/heads/master | 2023-05-10T17:27:18.022381 | 2020-01-20T09:18:28 | 2020-01-20T09:18:28 | 235,065,676 | 0 | 0 | null | 2023-05-01T21:19:14 | 2020-01-20T09:36:37 | Python | UTF-8 | Python | false | false | 5,881 | py | # coding=UTF-8
# **********************************************************************
# Copyright (c) 2013-2019 Cisco Systems, Inc. All rights reserved
# written by zen warriors, do not modify!
# **********************************************************************
from cobra.mit.meta import ClassMeta
from cobra.m... | [
"rrishike@cisco.com"
] | rrishike@cisco.com |
a224e09ae49b8d796c3870bb6502820e4dc8fd10 | ab0585893c7ac6ee649de2359f6c4c64bf76dd32 | /venv/lib/python2.7/site-packages/flask_bootstrap/__init__.py | 1581420430d26107f0e6f7c5bdd8e31121a39421 | [] | no_license | bmcharek/flaskapp | fc8fd8c6cedd2af022a97d40f9013b44b9e4af75 | 943a5c05525c189fa86406998c9f2a32243d4e1e | refs/heads/master | 2021-01-19T11:16:09.165869 | 2014-04-24T00:18:18 | 2014-04-24T00:18:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,526 | py | #!/usr/bin/env python
# coding=utf8
__version__ = '3.0.2.3'
import re
from flask import Blueprint, current_app, url_for
try:
from wtforms.fields import HiddenField
except ImportError:
def is_hidden_field_filter(field):
raise RuntimeError('WTForms is not installed.')
else:
def is_hidden_field_fil... | [
"bmcharek@gmail.com"
] | bmcharek@gmail.com |
e7959ef076b4880b872bfab62cafa5623aa515bf | 215fd5c4f9893d9f38e4e48199ea16d7d6ef9430 | /3.Binary_Tree_DC/3.11_596_Minimum_Subtree.py | 5b834db4fb3005e8aaca52226012ecd8ff9fec06 | [] | no_license | fztest/Classified | fd01622c097ca21b2e20285b06997ff0e9792dd1 | b046d94657c0d04f3803ca15437dfe9a6f6f3252 | refs/heads/master | 2020-03-25T06:34:07.885108 | 2017-05-04T17:22:36 | 2017-05-04T17:22:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,156 | py | """
Description
_________________
Given a binary tree, find the subtree with minimum sum.
Return the root of the subtree.
Example
_________________
Given a binary tree:
1
/ \
-5 2
/ \ / \
0 2 -4 -5
return the node 1.
Appraoch
___________
Same as 589
Complexity
___________
Same as 589
"""
""... | [
"cdzengpeiyun@gmail.com"
] | cdzengpeiyun@gmail.com |
567be9d7609520005a28e920c0fe51f55a8a4a0b | 801f367bd19b8f2ab08669fd0a85aad7ace961ac | /dataset/walker_toy_v5/env/walker2d_vanilla.py | cfe02f70b7b9e5235092d44ffd07be1e35e0d731 | [
"MIT"
] | permissive | Wendong-Huo/thesis-bodies | d91b694a6b1b6a911476573ed1ed27eb27fb000d | dceb8a36efd2cefc611f6749a52b56b9d3572f7a | refs/heads/main | 2023-04-17T18:32:38.541537 | 2021-03-12T19:53:23 | 2021-03-12T19:53:23 | 623,471,326 | 1 | 0 | null | 2023-04-04T12:45:48 | 2023-04-04T12:45:47 | null | UTF-8 | Python | false | false | 2,080 | py | # This is not 100% vanilla, because still we need to replace the xml of new body.
#
import numpy as np
import pybullet
from pybullet_envs.gym_locomotion_envs import WalkerBaseBulletEnv, Walker2DBulletEnv
from pybullet_envs.robot_locomotors import WalkerBase, Walker2D
from pybullet_envs.scene_stadium import MultiplayerS... | [
"sliu1@uvm.edu"
] | sliu1@uvm.edu |
8c7d2605fa31e2598e602df29887780acadec6c4 | 1fe03131ad139e2415fd0c0c73697b4541e5b862 | /.history/src/_fighter_20190422143541.py | e315f2ed7f92c41382f8e6b38aada534afdcad09 | [
"MIT"
] | permissive | vidalmatheus/pyKombat | d83175a7a952663e278a8247d43349f87192fde3 | 6646020c59367ba0424d73a5861e13bbc0daac1f | refs/heads/master | 2021-06-20T09:35:07.950596 | 2020-08-06T14:08:13 | 2020-08-06T14:08:13 | 172,716,161 | 1 | 1 | MIT | 2019-12-25T10:54:10 | 2019-02-26T13:24:31 | Python | UTF-8 | Python | false | false | 37,766 | py |
from pygame_functions import *
import fightScene
import engine
import menu
class Fighter:
fighterNames = ["Sub-Zero", "Scorpion"]
fightMoves = [["w", "s", "a", "d"], ["up", "down", "left", "right"]]
combatMoves = [["j","n","k","m","l","u","f"],["1","4","2","5","3","0","6"]]
danceLimit = 7
walkLi... | [
"matheusvidaldemenezes@gmail.com"
] | matheusvidaldemenezes@gmail.com |
a27ba69e22d7c99a3f4b8a8a2405a4b121524190 | 3f6c16ea158a8fb4318b8f069156f1c8d5cff576 | /.PyCharm2019.1/system/python_stubs/1707563220/select.py | 3a54915c6abc1d9f4af9edb7ddb5279eedcc7d7d | [] | no_license | sarthak-patidar/dotfiles | 08494170d2c0fedc0bbe719cc7c60263ce6fd095 | b62cd46f3491fd3f50c704f0255730af682d1f80 | refs/heads/master | 2020-06-28T23:42:17.236273 | 2019-10-01T13:56:27 | 2019-10-01T13:56:27 | 200,369,900 | 0 | 0 | null | 2019-08-03T12:56:33 | 2019-08-03T11:53:29 | Shell | UTF-8 | Python | false | false | 9,841 | py | # encoding: utf-8
# module select
# from /usr/lib/python3.6/lib-dynload/_asyncio.cpython-36m-x86_64-linux-gnu.so
# by generator 1.147
"""
This module supports asynchronous I/O on multiple file descriptors.
*** IMPORTANT NOTICE ***
On Windows, only sockets are supported; on Unix, all file descriptors.
"""
# no imports
... | [
"sarthakpatidar15@gmail.com"
] | sarthakpatidar15@gmail.com |
b1706d90df624d71e0582505bf071f5ee0114199 | 1ef536d93c6616f9793e57a9ebc6b44248d50202 | /check_managementtttt/check_managementtttt/models/report_check_cash_payment_receipt.py | 68d6f94e2bc4753e85a4150adf9e14ffc5d38c3c | [] | no_license | mohamed4185/Express | 157f21f8eba2b76042f4dbe09e4071e4411342ac | 604aa39a68bfb41165549d605d40a27b9251d742 | refs/heads/master | 2022-04-12T17:04:05.407820 | 2020-03-09T14:02:17 | 2020-03-09T14:02:17 | 246,014,712 | 1 | 3 | null | null | null | null | UTF-8 | Python | false | false | 839 | py | # -*- coding: utf-8 -*-
import datetime
from odoo import tools
from odoo import models, fields, api
import logging
_logger = logging.getLogger(__name__)
class receipt_cash_check(models.AbstractModel):
_name = 'report.check_managementtttt.receipt_check_cash_payment'
@api.model
def _get_report_values(s... | [
"mohamed.abdelrahman@businessborderlines.com"
] | mohamed.abdelrahman@businessborderlines.com |
0d82031e876cc589dc3a35e3b6c95624c3a3dd6c | 1207e317fa2837fa4cdb49150b9b2ca99dada2f3 | /sdfs/newReporting/dashboard/migrations/0010_auto_20191217_1714.py | 4123d095b20050153016a3357a6e69aa24865d6f | [] | no_license | ericniyon/all_in_one_repo | d14cb715776f5c23851d23930145fcb707aaca1d | 9080315fbe9e8226a21bf35c49ff7662b4b095b4 | refs/heads/master | 2022-12-16T17:04:48.602534 | 2020-01-12T00:40:54 | 2020-01-12T00:40:54 | 233,317,032 | 0 | 0 | null | 2022-12-08T01:50:51 | 2020-01-12T00:30:03 | Python | UTF-8 | Python | false | false | 511 | py | # Generated by Django 2.2.2 on 2019-12-17 15:14
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('dashboard', '0009_auto_20191217_1434'),
]
operations = [
migrations.AlterField(
model_name='umu... | [
"niyoeri6@gmail.com"
] | niyoeri6@gmail.com |
ff59d6e66a856d739eb56ea53d9d8223bfe43bf7 | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2127/60833/274342.py | 5e551b298d0556ce07128eab0c947da0b1d6fb95 | [] | no_license | AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 184 | py | lines = []
while True:
try:
lines.append(input())
except:
break
dishu=int(lines.pop(0))
zhishu=int(lines.pop(0).replace(",",""))
mi=dishu**zhishu
print(mi%1337) | [
"1069583789@qq.com"
] | 1069583789@qq.com |
5202b14467cdb9567b35f0d1c4849e1aba84e860 | caba6ab9fc9a4528e58930adc7e0eb44a096bec4 | /product/migrations/0011_auto_20190801_1647.py | 53ea336dd7405720fd222573449c2ab507674993 | [] | no_license | prabaldeshar/productwebsite | 9159edacfb9c8ac5b9fbe50bd700f2a35e0553c7 | f36fd52ec1b239f65c941bd0b5af44f1f8530231 | refs/heads/master | 2020-06-29T19:10:38.478856 | 2019-08-17T04:06:22 | 2019-08-17T04:06:22 | 200,599,983 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 363 | py | # Generated by Django 2.2.2 on 2019-08-01 11:02
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('product', '0010_comment_rating'),
]
operations = [
migrations.RenameField(
model_name='comment',
old_name='rating',
... | [
"prabaldeshar@gmail.com"
] | prabaldeshar@gmail.com |
4f4340a42ad423c4e6730bf0066a175e8764d45a | b683c8f1942a1ab35062620c6013b1e223c09e92 | /txt-Files/C22-Day-22/Question-92.txt | ec1f12d94f4baed689708e13ca358cf3f73ea0f2 | [] | no_license | nihathalici/Break-The-Ice-With-Python | 601e1c0f040e02fe64103c77795deb2a5d8ff00a | ef5b9dd961e8e0802eee171f2d54cdb92f2fdbe8 | refs/heads/main | 2023-07-18T01:13:27.277935 | 2021-08-27T08:19:44 | 2021-08-27T08:19:44 | 377,414,827 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 367 | txt | """
Question 92
Question
Please write a program which accepts a string from
console and print the characters that have even indexes.
Example: If the following string is given as input to the program:
H1e2l3l4o5w6o7r8l9d
Then, the output of the program should be:
Helloworld
Hints
Use list[::2] to iterate a list by ... | [
"noreply@github.com"
] | nihathalici.noreply@github.com |
ba8bb00ef9370173431788113e4ce73b679b9500 | fa824aa50ea827d95eacadaa939680db3f36138e | /backend/accounts/urls.py | a735642f6a5c1ce21751aae014c2789e3dfc6b5e | [] | no_license | samlex20/djavue-iptv | 606401c262c15793087e36de6d5d504571fb233f | 10bcf515d858e1d32518cf8bee09d10f69df0811 | refs/heads/master | 2023-03-15T01:27:21.329673 | 2021-02-13T15:51:08 | 2021-02-13T15:51:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 648 | py | from django.urls import include, path
from rest_framework.routers import DefaultRouter
from .views import UserProfileListCreateView, UserProfileDetailView, UserFavouritesView, UserFavouritesListView
urlpatterns = [
#gets all user profiles and create a new profile
path("all-profiles", UserProfileListCreateView... | [
"pawanpaudel93@gmail.com"
] | pawanpaudel93@gmail.com |
02624e3c9a582e9c59c03d7a00158087380af871 | f60b0c051d8ba5088dc4246679b870f577646bb0 | /58 Wed, 21 Mar 2012 23:59:08.py | ea420daac6eb14e2a31ce05c3584ebc9cd0b4f6d | [] | no_license | joopeed/lp1 | bbd11fe7749356828a16fc45703e010db5d35464 | 117bf769a048ec1dff53f779b26c9e7adec052ba | refs/heads/master | 2021-01-02T22:50:08.600553 | 2014-04-03T21:15:40 | 2014-04-03T21:15:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 311 | py | # Date: Wed, 21 Mar 2012 23:59:08 +0000
# Question 58
# JOAO PEDRO FERREIRA 21211940
meses = ["jan","fev","mar","abr",=
"mai","jun","jul","ago","set&q=
uot;,"out","nov","dez"]
for i in range(12):
n,m = map(float,raw_input().split())
lucro = n-m
if lucro <0:
print meses[i],"%.1f" % lucro
| [
"joopeeds@gmail.com"
] | joopeeds@gmail.com |
c7e6f1e35c1da07a97b1c8c79480961e3759e5d1 | 0951b7ad46683d5fd99ae5611e33117b70d5ba1b | /scg_venv/lib/python3.8/site-packages/plotly/graph_objs/layout/_polar.py | fdc74f39e878cd390d27a87fc98ddfc2d45d899d | [] | no_license | alissonpmedeiros/scg | 035bf833e16e39f56502f2a65633e361c6dc4fa6 | e3e022a14058936619f1d79d11dbbb4f6f48d531 | refs/heads/main | 2023-04-19T05:29:55.828544 | 2022-10-28T08:38:27 | 2022-10-28T08:38:27 | 525,835,696 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 48,791 | py | from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Polar(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout"
_path_str = "layout.polar"
_valid_props = {
"angularaxis",
"bargap... | [
"alissonp.medeiros@gmail.com"
] | alissonp.medeiros@gmail.com |
3b13b3fa6ada044f550736bff33731b5005c6970 | 59c875269e0865ccdf0ed89f46f5e0cdf2b23d73 | /btree_level_avgs.py | 5f659ca67649fd9306add74e2c8be573131e2980 | [] | no_license | mike-jolliffe/Learning | e964f12e33c2013f04510935477f3b00534fd206 | 308889e57e71c369aa8516fba8a2064f6a26abee | refs/heads/master | 2020-12-06T17:20:21.225587 | 2018-07-31T20:22:23 | 2018-07-31T20:22:23 | 95,589,406 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,722 | py | # Definition for a binary tree node.
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
# Create dictionary w/key as level, vals as vals
def __init__(self):
self.level_dict = {}
def averageOfLevels(self, root):
... | [
"michael.a.jolliffe@gmail.com"
] | michael.a.jolliffe@gmail.com |
5be6b8178a4dfc8e0e81bb0f031629338ed91631 | 6c4303314d727ff34f6dc65b8df5a44c133b6660 | /bin/add_subproblem_info_to_annotations.py | 986443f94fb774f41bf41c6503543547c01bd59d | [
"BSD-2-Clause"
] | permissive | mtholder/propinquity | 266bfcaad71470a80d31d7eba53930c0a74cfb1a | 22ec326dbdb9d06e665d0b853f8fdb67ddfc593b | refs/heads/master | 2020-04-06T06:10:36.258830 | 2019-02-06T21:25:00 | 2019-02-06T21:25:00 | 52,227,503 | 2 | 0 | null | 2017-03-15T15:19:33 | 2016-02-21T20:54:21 | Python | UTF-8 | Python | false | false | 955 | py | #!/usr/bin/env python
from peyotl import read_as_json
import codecs
import json
import sys
try:
subproblem_ids_file, in_annotations_file, out_annotations_file = sys.argv[1:]
except:
sys.exit('Expecting 3 arguments:\n subproblem_ids_file, in_annotations_file, out_annotations_file')
import os
bin_dir = os.path.... | [
"mtholder@gmail.com"
] | mtholder@gmail.com |
439ed1e473b23c914296be1445a3ce4c51ac8f1c | 1e0355b293100873cedfcac789655a35180781db | /BOJ16493.py | 5d1038b921fd6a9bf1a4226731345769f521cd07 | [
"MIT"
] | permissive | INYEONGKIM/BOJ | 47dbf6aeb7a0f1b15208866badedcd161c00ee49 | 5e83d77a92d18b0d20d26645c7cfe4ba3e2d25bc | refs/heads/master | 2021-06-14T13:50:04.124334 | 2021-03-09T14:04:14 | 2021-03-09T14:04:14 | 168,840,573 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 462 | py | __import__('sys').setrecursionlimit(100000)
W,n=map(int,__import__('sys').stdin.readline().split())
weight=[0]*n;value=[0]*n
for i in range(n):
w,v=map(int,__import__('sys').stdin.readline().split())
weight[i]=w;value[i]=v
def knapsack(cap, n):
if cap==0 or n==0:
return 0
if weight[n-1]>cap:
... | [
"noreply@github.com"
] | INYEONGKIM.noreply@github.com |
241cb32f5ed9618aa63ae1e8fdae43169081b506 | 2e682fd72e3feaa70e3f7bf2a3b83c50d783ec02 | /PyTorch/contrib/cv/semantic_segmentation/MMseg-swin/mmcv/mmcv/device/mlu/data_parallel.py | 26f74dc6b3ca61208125f7dc60216fac588f26d3 | [
"GPL-1.0-or-later",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | Ascend/ModelZoo-PyTorch | 4c89414b9e2582cef9926d4670108a090c839d2d | 92acc188d3a0f634de58463b6676e70df83ef808 | refs/heads/master | 2023-07-19T12:40:00.512853 | 2023-07-17T02:48:18 | 2023-07-17T02:48:18 | 483,502,469 | 23 | 6 | Apache-2.0 | 2022-10-15T09:29:12 | 2022-04-20T04:11:18 | Python | UTF-8 | Python | false | false | 4,805 | py | # -*- coding: utf-8 -*-
# BSD 3-Clause License
#
# Copyright (c) 2017
# All rights reserved.
# Copyright 2022 Huawei Technologies Co., Ltd
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source ... | [
"wangjiangben@huawei.com"
] | wangjiangben@huawei.com |
bbb35f150f5524d27d0d698f3a2e83cfd3909e2d | bc3c5bb1bd2b6e86ee545198d18a777e8380de0c | /tests/server/test_initiator.py | 3f573bf076f63734b0ed01d208350e4134d97d4d | [
"MIT"
] | permissive | math2001/nine43 | cadeab1ab4264ee423a8b7c30d25955162c27978 | 7749dc63b9717a6ee4ddc1723d6c59e16046fc01 | refs/heads/master | 2020-05-15T21:54:17.797744 | 2019-11-29T22:49:34 | 2019-11-29T22:49:34 | 182,511,335 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,602 | py | import string
import trio
import trio.testing
import server.initiator as initiator
import net
from server.types import Player
from typings import *
def new_half_stream_pair() -> Tuple[net.JSONStream, trio.abc.Stream]:
left, right = trio.testing.memory_stream_pair()
client = net.JSONStream(left)
return cli... | [
"australie.p@gmail.com"
] | australie.p@gmail.com |
83ec28298fc8649b0e87555dd5b7e847615479bd | 34f365117eb1d846fa922c24f3fc650188ce9746 | /bin/bed2scoreToExpandBed.py | 47a35ac1a5dacf9926cd21daed5f5ecf8f6a9b8a | [
"MIT"
] | permissive | PinarSiyah/NGStoolkit | 53ac6d87a572c498414a246ae051785b40fbc80d | b360da965c763de88c9453c4fd3d3eb7a61c935d | refs/heads/master | 2021-10-22T04:49:51.153970 | 2019-03-08T08:03:28 | 2019-03-08T08:03:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 776 | py | #!/usr/bin/env python
import os
import sys
import argparse
from itertools import izip
import bed
parser = argparse.ArgumentParser(description='expanding bed files with scores')
parser.add_argument('-i', required= True, help='input')
parser.add_argument('-o', required= True, help='output')
args = parser.parse_args()
... | [
"adebali@users.noreply.github.com"
] | adebali@users.noreply.github.com |
1fa0fb672f7462963fe48cc954c50fe8db869ad6 | 8b576f16cfd9202f756611001e684657dde3e812 | /01_hellopython/hn_15_whileStar.py | 2b31aaec992654c1d0c429441fc4b6fbc68e37eb | [] | no_license | WenhaoChen0907/Python_Demo | 26cc4d120aaa990c2d26fd518dfe6bcb622b1d77 | 136b8ced40623b0970c2a5bd47852425dcac3e86 | refs/heads/master | 2023-02-23T23:58:09.584321 | 2021-01-30T11:49:50 | 2021-01-30T11:49:50 | 334,374,597 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 509 | py | # 输出小星星
# 方法一
"""
row = 1
while row <= 5:
print("*" * row)
row += 1
"""
# 方法二:循环嵌套
row = 1
while row <= 5:
# 每一行打印的星星和当前行数是一致的
# 增加一个循环,专门负责当前行中,每一列的星
col = 1
while col <= row:
# print函数输出默认换行,想要去掉换行可以使用, end=""
print("*", end="")
col += 1
# 一行打印完成时,添加换行
print... | [
"18738127274@163.com"
] | 18738127274@163.com |
e89c50c2406b82a3479c9267330ff8e81db5ba63 | 4ca821475c57437bb0adb39291d3121d305905d8 | /models/research/object_detection/builders/model_builder_test.py | eb6b636e37abb503086ba0d29e6479d92b69ec5d | [
"Apache-2.0"
] | permissive | yefcion/ShipRec | 4a1a893b2fd50d34a66547caa230238b0bf386de | c74a676b545d42be453729505d52e172d76bea88 | refs/heads/master | 2021-09-17T04:49:47.330770 | 2018-06-28T02:25:50 | 2018-06-28T02:25:50 | 112,176,613 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 31,249 | py | # Copyright 2017 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... | [
"yefcion@163.com"
] | yefcion@163.com |
9621ec41d9db1cd973fd5b6bcd3dceda3b721d04 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02722/s643080348.py | 12af358f61bf63984b21ca359bf673d793d1dadf | [] | 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 | 389 | py | def make_divisors(n):
divisors = []
for i in range(1, int(n**0.5)+1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n//i)
return divisors
n=int(input())
l1=make_divisors(n-1)
l2=make_divisors(n)[2:]
for i in l2:
j=n/i
while j%i==0:
... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
63630a4c6196d7f097af947e60629dcf3546b07c | 00c6ded41b84008489a126a36657a8dc773626a5 | /.history/Sizing_Method/ConstrainsAnalysis/ConstrainsAnalysisPDP1P2_20210713172310.py | 9d6afc895a625c9f6d50854b953304f5dc66d88d | [] | no_license | 12libao/DEA | 85f5f4274edf72c7f030a356bae9c499e3afc2ed | 1c6f8109bbc18c4451a50eacad9b4dedd29682bd | refs/heads/master | 2023-06-17T02:10:40.184423 | 2021-07-16T19:05:18 | 2021-07-16T19:05:18 | 346,111,158 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 22,974 | py | # author: Bao Li #
# Georgia Institute of Technology #
import sys
import os
sys.path.insert(0, os.getcwd())
import numpy as np
import matplotlib.pylab as plt
import Sizing_Method.Other.US_Standard_Atmosphere_1976 as atm
import Sizing_Method.Aerodynamics.ThrustLapse as thrust_lapse
import Sizing_Method.Aerodynamics.Ae... | [
"libao@gatech.edu"
] | libao@gatech.edu |
e22f21d57b4dcbc9dfaa480ff03b9966ff371e2a | 53c35060ba641c399d80ed1daf6d3b1e5c49dab4 | /enso/platform/linux/selection.py | bdda893ac1441b8e74fdab2fdd7c0f13f11bb225 | [
"BSD-2-Clause"
] | permissive | RendijsSmukulis/enso-launcher-continued | c85462a36637a70985938a39c2d3448def8a9af2 | 97b21f4eabbd445c33c6e93c19e7b2a712ea2bca | refs/heads/master | 2021-01-23T03:22:02.651360 | 2017-03-19T03:02:25 | 2017-03-19T03:02:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,356 | py | """
Author : Guillaume "iXce" Seguin
Email : guillaume@segu.in
Copyright (C) 2008, Guillaume Seguin <guillaume@segu.in>.
All rights reserved.
Author : Pavel Vitis "blackdaemon"
Email : pavelvitis@gmail.com
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that... | [
"pavelvitis@gmail.com"
] | pavelvitis@gmail.com |
0785a53b99508b9564fc6135140ca1a59f377301 | 993ef8924418866f932396a58e3ad0c2a940ddd3 | /Production/python/PrivateSamples/EMJ_UL16APV_mMed-1400_mDark-20_kappa-0p16_aligned-down_cff.py | 9b7db73723875f3b194a7d24f0d9f440b2b047af | [] | no_license | TreeMaker/TreeMaker | 48d81f6c95a17828dbb599d29c15137cd6ef009a | 15dd7fe9e9e6f97d9e52614c900c27d200a6c45f | refs/heads/Run2_UL | 2023-07-07T15:04:56.672709 | 2023-07-03T16:43:17 | 2023-07-03T16:43:17 | 29,192,343 | 16 | 92 | null | 2023-07-03T16:43:28 | 2015-01-13T13:59:30 | Python | UTF-8 | Python | false | false | 2,001 | 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( [
'root://cmseos.fnal.gov///store/gr... | [
"enochnotsocool@gmail.com"
] | enochnotsocool@gmail.com |
99d1b2fac8e0f299ee585ed4eebd0b11a45183b3 | 5df9cd8ed8b2ac02606e8f760bb098a85ac40dd6 | /AQI/AQI/spiders/aqi_crawl.py | ecfcf2eed5e27c302ba774c16c202cb361e5750f | [] | no_license | ShaoLay/AQICrawl | 270352d31a41d7b925a4c899642cda21ad12abea | 5abf872fc0495d310514abc029dae799487299e5 | refs/heads/master | 2020-08-14T19:48:56.982460 | 2019-10-23T05:30:24 | 2019-10-23T05:30:24 | 215,224,771 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,669 | py | from scrapy.spiders import CrawlSpider, Rule
from scrapy.linkextractors import LinkExtractor
from AQI.items import AqiItem
class AqiSpider(CrawlSpider):
name = 'aqi_crawl'
allowed_domains = ['aqistudy.cn']
start_urls = ['https://www.aqistudy.cn/historydata/']
rules = (
Rule(LinkExtractor(all... | [
"javs_shao@163.com"
] | javs_shao@163.com |
53b6f8fc41440ab6256d1334cf60ed629b0fce31 | 9381d2a25adac95fab9fc4b8015aadd6c7bed6ca | /ITP1/2_D.py | c35c8e9af2a5a9165517debe9f1a651a661f4d22 | [] | no_license | kazuma104/AOJ | e3ca14bd31167656bcd203d4f92a43fd4045434c | d91cc3313cbfa575928787677e5ed6be63aa8acf | refs/heads/master | 2023-03-20T22:16:22.764351 | 2021-03-18T10:38:08 | 2021-03-18T10:38:08 | 262,047,590 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 141 | py | W,H,x,y,r = map(int, input().split())
if x-r < 0 or y-r < 0:
print("No")
elif x+r > W or y+r > H:
print("No")
else:
print("Yes") | [
"kazuma@info.nara-k.ac.jp"
] | kazuma@info.nara-k.ac.jp |
1dd0526d70e5ef6e0a57ded59b165fd2f43842fa | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2412/60715/301485.py | 69220007da8305e6488cfa5d20eabb5c5fb9f53a | [] | no_license | AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 152 | py | n,s=map(int,input().split())
if(n==2 and s==0):
print(0)
elif(n==4 and s==3):
print(-1)
else:
print(1)
print(5)
print("1 4 2 3 5 ") | [
"1069583789@qq.com"
] | 1069583789@qq.com |
a28da9f95c09fb5f7e3ca5ab6f34efae1ce134b2 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03456/s282790569.py | 9f7fa6c7d4489dd727a1db2d30500f983f65a2ce | [] | 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 | 98 | py | a,b=map(str,input().split())
c=int(a+b)
if (c**(1/2))%1==0:
print('Yes')
else:
print('No') | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
f2229bd1270be63072c3f36c5e4cc704b0eb8c3c | 73ee941896043f9b3e2ab40028d24ddd202f695f | /external/chromium_org/chrome/tools/DEPS | 86737fb82392847aa02de3cf27f22ebea02cf380 | [
"BSD-3-Clause"
] | permissive | CyFI-Lab-Public/RetroScope | d441ea28b33aceeb9888c330a54b033cd7d48b05 | 276b5b03d63f49235db74f2c501057abb9e79d89 | refs/heads/master | 2022-04-08T23:11:44.482107 | 2016-09-22T20:15:43 | 2016-09-22T20:15:43 | 58,890,600 | 5 | 3 | null | null | null | null | UTF-8 | Python | false | false | 185 | include_rules = [
"+breakpad",
"+chrome/browser",
"+chrome/third_party/hunspell/google",
"+chrome/utility/local_discovery",
"+content/browser",
"+content/public/browser",
]
| [
"ProjectRetroScope@gmail.com"
] | ProjectRetroScope@gmail.com | |
3836037d938bd2f19011c61605f118cd7ccee3ef | c045416b1f5c5bc4f0fbfa7d64a7cfa5afe1c3a4 | /magentaT/magenta/pipelines/lead_sheet_pipelines.py | 9fd8562fef751fb1354bf91f555c168f3e618ff7 | [
"Apache-2.0"
] | permissive | Tiasa/CreativeComposer | e037055c232dc6b261b4fd7542cab3865e7ec1c4 | b2ea3d1570b367068021726f1858587a0ad4d09f | refs/heads/master | 2021-06-27T06:59:37.351749 | 2020-10-29T21:54:19 | 2020-10-29T21:54:19 | 143,206,847 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,732 | py | # Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | [
"tiasa.ap.10@gmail.com"
] | tiasa.ap.10@gmail.com |
ad260b2ad0e4ba83bb002b471b76f420bf3405ba | 4be5c172c84e04c35677f5a327ab0ba592849676 | /python/design/queue_using_stacks/queue_using_stacks2.py | 1253bf3342a1290b6fd12967079eda6c6b4ac9b5 | [] | no_license | niranjan-nagaraju/Development | 3a16b547b030182867b7a44ac96a878c14058016 | d193ae12863971ac48a5ec9c0b35bfdf53b473b5 | refs/heads/master | 2023-04-06T20:42:57.882882 | 2023-03-31T18:38:40 | 2023-03-31T18:38:40 | 889,620 | 9 | 2 | null | 2019-05-27T17:00:29 | 2010-09-05T15:58:46 | Python | UTF-8 | Python | false | false | 3,921 | py | '''
Implement a queue using stacks
Approach:
An enqueue-efficient implementation using two stacks
Enqueue is O(1), dequeue is O(n)
Enqueue(x):
Push to S1
Dequeue():
if S2 has elements (they are already in queue-order)
return S2.pop()
Otherwise (S2 is empty)
Push all items from S1 to S2, S2 now has ... | [
"vinithepooh@gmail.com"
] | vinithepooh@gmail.com |
9ae449345867c9bc92cd38cb3903702d56fb8014 | d7016f69993570a1c55974582cda899ff70907ec | /sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2021_07_01/aio/operations/_iot_hub_operations.py | 3c8aa30ade98d05854c566a78a8b9912ca0c2835 | [
"MIT",
"LicenseRef-scancode-generic-cla",
"LGPL-2.1-or-later"
] | permissive | kurtzeborn/azure-sdk-for-python | 51ca636ad26ca51bc0c9e6865332781787e6f882 | b23e71b289c71f179b9cf9b8c75b1922833a542a | refs/heads/main | 2023-03-21T14:19:50.299852 | 2023-02-15T13:30:47 | 2023-02-15T13:30:47 | 157,927,277 | 0 | 0 | MIT | 2022-07-19T08:05:23 | 2018-11-16T22:15:30 | Python | UTF-8 | Python | false | false | 13,705 | py | # pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRe... | [
"noreply@github.com"
] | kurtzeborn.noreply@github.com |
9ca63456aabc1b850ca2345a6625a7699eae6610 | 71d4fafdf7261a7da96404f294feed13f6c771a0 | /mainwebsiteenv/lib/python2.7/site-packages/psycopg2/tests/test_bug_gc.py | fcad0f599090b4ba1dabca0b3a0599da294da7c6 | [] | no_license | avravikiran/mainwebsite | 53f80108caf6fb536ba598967d417395aa2d9604 | 65bb5e85618aed89bfc1ee2719bd86d0ba0c8acd | refs/heads/master | 2021-09-17T02:26:09.689217 | 2018-06-26T16:09:57 | 2018-06-26T16:09:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,773 | py | #!/usr/bin/env python
# bug_gc.py - test for refcounting/GC bug
#
# Copyright (C) 2010-2011 Federico Di Gregorio <fog@debian.org>
#
# psycopg2 is free software: you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation, e... | [
"me15btech11039@iith.ac.in.com"
] | me15btech11039@iith.ac.in.com |
0c4c6b2d2404135d8229d93244b95ea8ac0bf89f | 870599f68f29701f6dc0c9911183ee1127a0e8f1 | /attend/util.py | de85823500fe59f84b6604edb5067152ca94ff88 | [] | no_license | rubenvereecken/attend | dc8168df8fde45421ed1f02a8dc519fc07b836ee | d5fedeec589956ba86c11a93709ad2c7d4f01fcf | refs/heads/master | 2021-03-27T20:50:00.543071 | 2017-09-29T09:42:16 | 2017-09-29T09:42:16 | 95,661,311 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,130 | py | import inspect
import numpy as np
import attend
import time
from functools import partial
# parse_timestamp = partial(time.strptime, format=attend.TIMESTAMP_FORMAT)
parse_timestamp = lambda x: time.strptime(x, attend.TIMESTAMP_FORMAT)
def pick(dic, l):
'''
Pick from dictionary all the keys present in a list o... | [
"rubenvereecken@gmail.com"
] | rubenvereecken@gmail.com |
12ff517076961d3280a395ff8024086c0c6154b7 | 56fd2d92b8327cfb7d8f95b89c52e1700343b726 | /odin/utilities/mixins/strategy_mixins/features_mixins.py | 78f57281f4bf3ad86d7fe2d11595c0fc2708bdf0 | [
"MIT"
] | permissive | stjordanis/Odin | fecb640ccf4f2e6eb139389d25cbe37da334cdb6 | e2e9d638c68947d24f1260d35a3527dd84c2523f | refs/heads/master | 2020-04-15T09:13:17.850126 | 2017-02-09T00:25:55 | 2017-02-09T00:25:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 538 | py | import pandas as pd
from ....strategy import AbstractStrategy
class DefaultFeaturesMixin(AbstractStrategy):
"""Default Features Mixin Class
This just creates an empty dataframe containing as the index the symbols
available on each day of trading and no columns.
"""
def generate_features(self):
... | [
"jamesbrofos@gmail.com"
] | jamesbrofos@gmail.com |
4bdb997b1a9edc8482e96a303102a09e4fd12614 | 7d5b51afb991787f3b373c3b931a06a5bbd1deaa | /Dynamic Programming/2011.py | f0bbda3160a48b68c40316799b97402cad79f969 | [] | no_license | inkyu0103/BOJ | cb7549855702ba7a744d9121d12f5d327469acd6 | 0d889b9cc36a95e8e802d22a7b0ec87dbf80b193 | refs/heads/master | 2023-09-02T05:32:50.704738 | 2023-08-24T08:07:12 | 2023-08-24T08:07:12 | 247,743,620 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 364 | py | # 2011 암호코드
import sys
input = sys.stdin.readline
arr = [0] + list(map(int, list(input().rstrip())))
N = len(arr)
dp = [0] * N
dp[0] = 1
mod = 1000000
for i in range(1, N):
if arr[i]:
dp[i] = (dp[i - 1] + dp[i]) % mod
case = arr[i - 1] * 10 + arr[i]
if 10 <= case <= 26:
dp[i] = (dp[i - 2... | [
"inkyu0103@gmail.com"
] | inkyu0103@gmail.com |
ab0c84236e64680d0eb83c624708d4e489ad1ee3 | 45c170fb0673deece06f3055979ece25c3210380 | /toontown/quest_original/Quests.py | 20f49852427f51699e790a85a9d4c0ef7d327c72 | [] | no_license | MTTPAM/PublicRelease | 5a479f5f696cfe9f2d9dcd96f378b5ce160ec93f | 825f562d5021c65d40115d64523bb850feff6a98 | refs/heads/master | 2021-07-24T09:48:32.607518 | 2018-11-13T03:17:53 | 2018-11-13T03:17:53 | 119,129,731 | 2 | 6 | null | 2018-11-07T22:10:10 | 2018-01-27T03:43:39 | Python | UTF-8 | Python | false | false | 176,321 | py | #Embedded file name: toontown.quest.Quests
from otp.otpbase import OTPGlobals
from toontown.toonbase import ToontownBattleGlobals
from toontown.toonbase import ToontownGlobals
from toontown.battle import SuitBattleGlobals
from toontown.coghq import CogDisguiseGlobals
import random
from toontown.toon import NPCToons
imp... | [
"linktlh@gmail.com"
] | linktlh@gmail.com |
1adddccff76d4ac8f1a4fb4fabee0bfe6a4b1109 | d5292505eb7b8b93eca743eb187a04ea58d6b6a3 | /venv/Lib/site-packages/networkx/convert.py | c25cde82fba68bbd0569f0c9e64cf4d4b24741ae | [
"Unlicense"
] | permissive | waleko/facerecognition | 9b017b14e0a943cd09844247d67e92f7b6d658fa | ea13b121d0b86646571f3a875c614d6bb4038f6a | refs/heads/exp | 2021-06-03T10:57:55.577962 | 2018-09-04T19:45:18 | 2018-09-04T19:45:18 | 131,740,335 | 5 | 1 | Unlicense | 2020-01-19T10:45:25 | 2018-05-01T17:10:42 | Python | UTF-8 | Python | false | false | 13,424 | py | """Functions to convert NetworkX graphs to and from other formats.
The preferred way of converting data to a NetworkX graph is through the
graph constuctor. The constructor calls the to_networkx_graph() function
which attempts to guess the input type and convert it automatically.
Examples
--------
Create a graph wit... | [
"a.kovrigin0@gmail.com"
] | a.kovrigin0@gmail.com |
c31eab571b99a610289be0215b55c0b96a403c9d | 92429015d9a1f1cea9b9bf2c9f1a8a7a07586af5 | /attack_methods/feat_test_interface.py | 9cb5c53ae4fc13ba93a936aded8839b658eb5c61 | [] | no_license | arthur-qiu/adv_vis | 46a953ce6c3d562137c8e566bc9b523e25bc5bbd | ba46c00cf38ca5186d7db84844892036ed714eaf | refs/heads/master | 2021-01-03T23:00:45.065108 | 2020-04-05T03:47:01 | 2020-04-05T03:47:01 | 240,272,320 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,488 | py | import torch
import torch.nn as nn
import torch.nn.functional as F
from attack_methods import pgd, feature_targets
class Restart_PGD(nn.Module):
def __init__(self, epsilon, num_steps, step_size, num_restart = 10, data_min = -1.0, data_max = 1.0):
super().__init__()
self.epsilon = epsilon
s... | [
"Arthur"
] | Arthur |
75a04e3f175dcf1ab31fe1ed4681128d03f5a5e7 | b56eaf7a603cbb850be11dbbed2c33b954dedbcb | /ctools/pysc2/bin/battle_net_maps.py | 031964f9d15ee9e1b9c03452b2cab3efdf37a247 | [
"Apache-2.0"
] | permissive | LFhase/DI-star | 2887d9c5dd8bfaa629e0171504b05ac70fdc356f | 09d507c412235a2f0cf9c0b3485ec9ed15fb6421 | refs/heads/main | 2023-06-20T20:05:01.378611 | 2021-07-09T16:26:18 | 2021-07-09T16:26:18 | 384,499,311 | 1 | 0 | Apache-2.0 | 2021-07-09T16:50:29 | 2021-07-09T16:50:28 | null | UTF-8 | Python | false | false | 1,250 | py | #!/usr/bin/python
# Copyright 2019 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | [
"opendilab@gmail.com"
] | opendilab@gmail.com |
6736bae8e9a339384d9187263901c8a806725b7c | c76d46dcde554eaed0f79cafde00cce973b481e3 | /user_dashboard/templatetags/dash_extra.py | 47f23524cacfe2cb23d3a65a74d184822aba44c8 | [] | no_license | dharati-code/microapi | 26e2e9adb935d68a9ca663b69f0dd9c70e017c0b | 8c4848856bd680e7c8493b80fa5938b317d9e474 | refs/heads/master | 2023-02-04T13:46:25.235108 | 2020-12-22T14:17:31 | 2020-12-22T14:17:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 459 | py | from django import template
from user_dashboard.models import Configs
register = template.Library()
@register.filter
def get_item(dictionary, key):
return dictionary.get(key)
@register.filter
def get_configs(confobj, pie):
pe = confobj.get(konfigd_api=pie)
return pe
@register.filter
def get_status(onj, ... | [
"phemmylintry@gmail.com"
] | phemmylintry@gmail.com |
6350f193e0270a17e76912867183fe6569906bb1 | fbb67b247799b724dd60415026828ec247576f9f | /demo/assignments/word_freq.py | 759be0e803b112ce19d0545ee90a83e5bb4c09c4 | [] | no_license | srikanthpragada/PYTHON_31_MAY_2021 | 845afca884cac9a30d3e87068f0dab275c056974 | 55a4a168521bc93d331fd54b85ab4faa7e4f1f02 | refs/heads/master | 2023-06-13T03:22:23.946454 | 2021-07-10T14:17:42 | 2021-07-10T14:17:42 | 373,483,617 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 130 | py | st = "how do you do how did you do last year"
words = st.split(" ")
for w in set(words):
print(f"{w:10} {words.count(w)}")
| [
"srikanthpragada@gmail.com"
] | srikanthpragada@gmail.com |
e2547859689ea3739bc06cb400f57095ca59c69d | 89bcfc45d70a3ca3f0f1878bebd71aa76d9dc5e2 | /simpleSpider/xpath_demo/neteasy163.py | 05e4e31d9f71d741cf48616cd3548eb9a4f52c92 | [] | no_license | lichao20000/python_spider | dfa95311ab375804e0de4a31ad1e4cb29b60c45b | 81f3377ad6df57ca877463192387933c99d4aff0 | refs/heads/master | 2022-02-16T20:59:40.711810 | 2019-09-10T03:13:07 | 2019-09-10T03:13:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,857 | py | # coding: utf-8
from lxml import etree
import requests
import pymysql
import uuid
class NeteasyRank(object):
def __init__(self):
self.url = 'http://news.163.com/rank/'
self.headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko)'
... | [
"64174469@qq.com"
] | 64174469@qq.com |
645f53ecc1c87df1360824cfed175d4a363d1601 | 985b64cb54d3d36fc6f9c0926485199d08bc35c0 | /sortosm.py | f71c73d0a50c3eaf71f966a8af555fc36e37ec03 | [
"BSD-2-Clause"
] | permissive | TimSC/osm-to-gps-map | 05bef69e8755be4e266dc4e9e7582e0c1fd94d36 | 2bad808be37404fbef7a1d2fa0ce2db27ffdebe8 | refs/heads/master | 2022-08-26T04:24:56.270120 | 2022-08-17T02:30:44 | 2022-08-17T02:30:44 | 10,490,170 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,026 | py | import xml.etree.ElementTree as ET
import bz2, sys
def SortOsm(inFina, outFina):
fi = bz2.BZ2File(inFina)
root = ET.fromstring(fi.read())
fi.close()
objDict = {}
for obj in root:
if 'id' in obj.attrib:
i = int(obj.attrib['id'])
#print obj.tag, i
if obj.tag not in objDict:
objDict[obj.tag] = {}
... | [
"tim2009@sheerman-chase.org.uk"
] | tim2009@sheerman-chase.org.uk |
8e951d78f9c8a8df3ede9c12bd2fa10966bcb7ce | edfb1065a9c355bdb9e53e17276af8a58844ea06 | /readthedocs/profiles/views.py | 7329901056e0b9ca20702092255315b82f7eef7a | [
"MIT"
] | permissive | cglewis/readthedocs.org | e1f8192085bc7873e6f5a3ddc1ad5e4e37008a83 | 97665144d06792fba83193ccc1cde0367190e782 | refs/heads/master | 2023-04-04T23:24:20.996581 | 2014-08-09T18:03:30 | 2014-08-09T18:03:30 | 22,791,996 | 0 | 0 | MIT | 2023-04-04T00:16:37 | 2014-08-09T18:03:06 | Python | UTF-8 | Python | false | false | 12,308 | py | """
Views for creating, editing and viewing site-specific user profiles.
"""
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.core.exceptions import ObjectDoesNotExist
from django.core.urlresolvers import reverse
from django.http import Http404
from dja... | [
"eric@ericholscher.com"
] | eric@ericholscher.com |
82e5e9a09fa717768d05f8393a81f380a0bf8834 | 07ec5a0b3ba5e70a9e0fb65172ea6b13ef4115b8 | /lib/python3.6/site-packages/tensorflow/python/training/input.py | 2304925ca8931d85101039fd238a00588a2a0731 | [] | no_license | cronos91/ML-exercise | 39c5cd7f94bb90c57450f9a85d40c2f014900ea4 | 3b7afeeb6a7c87384049a9b87cac1fe4c294e415 | refs/heads/master | 2021-05-09T22:02:55.131977 | 2017-12-14T13:50:44 | 2017-12-14T13:50:44 | 118,736,043 | 0 | 0 | null | 2018-01-24T08:30:23 | 2018-01-24T08:30:22 | null | UTF-8 | Python | false | false | 130 | py | version https://git-lfs.github.com/spec/v1
oid sha256:5456569a54cde4607762afc196ac29a5d763a71eab509d9896a77e6bb8d33539
size 60349
| [
"seokinj@jangseog-in-ui-MacBook-Pro.local"
] | seokinj@jangseog-in-ui-MacBook-Pro.local |
7a4f58d873d4ef63c94868b482e144f66ed6c748 | fb28a622b21f5127c83c7fe6193b6312294b2dbe | /apps/car/views.py | 34819052aab28c8706a817a794c9556158666698 | [] | no_license | laoyouqing/video | 0cd608b1f9d3a94da4a537867fafce6f7dcd1297 | 9aa7ecf17f0145437408a8c979f819bb61617294 | refs/heads/master | 2022-12-19T11:02:01.343892 | 2019-08-21T04:00:13 | 2019-08-21T04:00:13 | 203,500,521 | 0 | 0 | null | 2022-12-08T06:03:17 | 2019-08-21T03:40:13 | Python | UTF-8 | Python | false | false | 2,005 | py | from django.shortcuts import render
# Create your views here.
from django_redis import get_redis_connection
from rest_framework import viewsets, status
from rest_framework.generics import GenericAPIView
from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response
from rest_framew... | [
"lingo.lin@foxmail.com"
] | lingo.lin@foxmail.com |
a63520698af13ffbf16e3bdb315e8a135cc8d278 | 40804cfe754f4a0c99055e81966367f5a8641fac | /rotate_list.py | 38847325d29fa93ffdf8778d1c9c7420ce5b297b | [] | no_license | raochuan/LintCodeInPython | a3731b9a14c623278c8170fedd7be85fd7acfbfb | e57869437287bcc7619411f9d3d965a83e2bfacb | refs/heads/master | 2021-01-17T23:57:47.709879 | 2016-08-02T07:21:36 | 2016-08-02T07:21:36 | 64,736,138 | 1 | 0 | null | 2016-08-02T07:48:56 | 2016-08-02T07:48:54 | Python | UTF-8 | Python | false | false | 815 | py | # -*- coding: utf-8 -*-
class Solution:
# @param head: the list
# @param k: rotate to the right k places
# @return: the list after rotation
def rotateRight(self, head, k):
# write your code here
if not head:
return head
list_len = 0
tail = None
node =... | [
"linying_43151@163.com"
] | linying_43151@163.com |
3465049bccb803e10ef5fdde087a7d9139c12762 | cccfb7be281ca89f8682c144eac0d5d5559b2deb | /tools/perf/page_sets/desktop_ui/download_shelf_story.py | 93cc95aaf9b6b55b32f7984b2d41cee2d80f646c | [
"BSD-3-Clause",
"LGPL-2.0-or-later",
"MPL-1.1",
"APSL-2.0",
"MIT",
"Zlib",
"GPL-2.0-only",
"Apache-2.0",
"LGPL-2.0-only",
"LicenseRef-scancode-unknown",
"LicenseRef-scancode-unknown-license-reference",
"LGPL-2.1-only"
] | permissive | SREERAGI18/chromium | 172b23d07568a4e3873983bf49b37adc92453dd0 | fd8a8914ca0183f0add65ae55f04e287543c7d4a | refs/heads/master | 2023-08-27T17:45:48.928019 | 2021-11-11T22:24:28 | 2021-11-11T22:24:28 | 428,659,250 | 1 | 0 | BSD-3-Clause | 2021-11-16T13:08:14 | 2021-11-16T13:08:14 | null | UTF-8 | Python | false | false | 5,621 | py | # Copyright 2021 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
from page_sets.desktop_ui.browser_utils import Resize
from page_sets.desktop_ui.js_utils import MEASURE_JS_MEMORY
from page_sets.desktop_ui.mu... | [
"chromium-scoped@luci-project-accounts.iam.gserviceaccount.com"
] | chromium-scoped@luci-project-accounts.iam.gserviceaccount.com |
4287c198601ca5886f6c18af6d37e2e322a38868 | 5af1de35dc2b79ecfa823f3ce3bb1097ec29bbd7 | /src/map/map_info/tests.py | 899ed1151fa1a972ca3d943e25543c19998fe114 | [
"BSD-2-Clause"
] | permissive | daonb/oMap | 7b79f4e1fc2886523e5a5c1aab249b802bf30505 | a904ddee91d2ef4c54cae0ad7ba83fb3cb2150ab | refs/heads/master | 2021-01-21T01:52:12.233153 | 2011-06-22T11:52:18 | 2011-06-22T11:52:18 | 1,933,319 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,799 | py | import re
from django.test import TestCase
from django.test.client import Client
from django.core.urlresolvers import reverse
from django.contrib.gis.geos import *
from django.contrib.auth.models import User, AnonymousUser
from django import template
#from knesset.mks.server_urls import mock_pingback_server
from djang... | [
"bennydaon@gmail.com"
] | bennydaon@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.