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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4830116877968ecd4ebc6659f852aff6af73f637 | 69d05e7788a6facf4e5777c4b3819fa43d0f1df0 | /gui/brain_labeling_gui_thalamus_v2.py | e8041a84ea17c4b97c081da7271935a7fb7af6a9 | [] | no_license | xl1393/MouseBrainAtlas | e238d06a5b51ca037a25e3f79fb422f7a7367222 | 1e875f9f872d38c916de3e460c1e88f2ef07fa32 | refs/heads/master | 2021-05-09T05:14:40.721154 | 2018-01-27T09:24:46 | 2018-01-27T09:24:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 55,987 | py | #! /usr/bin/env python
import sys
import os
from datetime import datetime
import time
import json
from collections import defaultdict, OrderedDict
import numpy as np
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from shapely.geometry import Polygon as ShapelyPolygon
from shapely.geometry import Point as Shapel... | [
"[email protected]"
] | |
e3115e42846e195446fc894e10dd6ac61f5d1618 | 513021ba2ba48a30245c6c76406f034c69f4f366 | /4_Podstawowa wiedza o języku/4.33_String.py | a63127c53ddf9c57b6f1bc74ae339871af085873 | [] | no_license | rucpata/udemy-python_poczatkujacy | d789c3ff0fa9f8794c97e537aa58d8a273601023 | f65053e6efac7e30bae862f6555ab08fcf7385a4 | refs/heads/master | 2022-03-07T11:33:09.284281 | 2019-10-29T14:09:19 | 2019-10-29T14:09:19 | 218,301,894 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 68 | py | atext='This is a text'
atext.endswith('ext')
atext.endswith('ext.')
| [
"[email protected]"
] | |
e46ce34addebb050347cdd470f4cd7e400c7e47f | 1f91f88b17b35a9306b6a279ec338921a22c78d0 | /team_scripts/nakama_exp078_EffNetB7.py | 2f9a4e189977fac7f91c32181c22497ed4064c8c | [
"MIT"
] | permissive | yuv4r4j/kaggle-rfcx | 64d02102a78a295e14e8a904e2a34bb7772d2cb4 | c3573d014d99312b58882e7b939de6c1055129b1 | refs/heads/main | 2023-03-03T01:38:14.999693 | 2021-02-18T10:31:29 | 2021-02-18T10:31:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 42,264 | py | import os
import random
import time
import warnings
import audiomentations as A
import kornia.augmentation as K
import librosa
import numpy as np
import pandas as pd
import soundfile as sf
import timm
import torch
import torch.nn as nn
import torch.nn.functional as F
from pathlib import Path
from sklearn.model_selec... | [
"[email protected]"
] | |
7e2178bbaea5a74da95f3e91c473d6314be0c123 | 53dd5d2cfb79edc87f6c606bbfb7d0bedcf6da61 | /.history/EMR/EMRryzd_1_20190410143150.py | 447c8d147b75b36af2f0e17929c25c3b55f8321c | [] | no_license | cyc19950621/python | 4add54894dc81187211aa8d45e5115903b69a182 | d184b83e73334a37d413306d3694e14a19580cb0 | refs/heads/master | 2020-04-11T20:39:34.641303 | 2019-07-02T12:54:49 | 2019-07-02T12:54:49 | 162,078,640 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,494 | py | #-*- coding: UTF-8 -*-
#本文件用于提取目标目录中的所有txt,并提取关键词所在行到指定目录,并提取关键词新建文件
import time
import math
import os
import sys
import os, os.path,shutil
import codecs
import EMRdef
import re
emrtxts = EMRdef.txttq(u'D:\DeepLearning ER\EHR')#txt目录提取
zljhs = []
for emrtxt in emrtxts:
f = open(emrtxt,'r',errors="ignore")#中文加入e... | [
"[email protected]"
] | |
df6dd2353e401871a241b24c6eb060b31bf936ce | 96b03f66f55b2f733f3da5defbd5b37d2a02bc8a | /modules/calc900_200.py | c57ba2ff7df493abc68557412c554913c82f8ea8 | [] | no_license | th3fall3n0n3/my_first_calc_extended | 641e66119c2b7055ea47a55ebd3559077394fc90 | c2c0dfe50ebc59ea20bb595db50ef63d603d54af | refs/heads/master | 2016-09-13T18:08:15.841173 | 2016-05-14T15:18:08 | 2016-05-14T15:18:08 | 58,811,146 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 863,801 | py | def calc(num1, sign, num2):
if num1 == 900 and sign == '+' and num2 == 200:
print('900+200 = 1100')
if num1 == 900 and sign == '+' and num2 == 201:
print('900+201 = 1101')
if num1 == 900 and sign == '+' and num2 == 202:
print('900+202 = 1102')
if num1 == 900 and sign == '+' and n... | [
"[email protected]"
] | |
b3091967ca2295a42f480875d29c9828ca79c371 | ee53b0262007b2f0db0fe15b2ad85f65fafa4e25 | /Leetcode/594. Longest Harmonious Subsequence.py | ce388e0d7f6aef49ca1706ff198232b0568caac0 | [] | no_license | xiaohuanlin/Algorithms | bd48caacb08295fc5756acdac609be78e143a760 | 157cbaeeff74130e5105e58a6b4cdf66403a8a6f | refs/heads/master | 2023-08-09T05:18:06.221485 | 2023-08-08T11:53:15 | 2023-08-08T11:53:15 | 131,491,056 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,487 | py | '''
We define a harmonious array is an array where the difference between its maximum value and its minimum value is exactly 1.
Now, given an integer array, you need to find the length of its longest harmonious subsequence among all its possible subsequences.
Example 1:
Input: [1,3,2,2,5,2,3,7]
Output: 5
Explanation... | [
"[email protected]"
] | |
f56ec2e37f5245dcb7f44bca1b5244795ec53b15 | 3185dc605853fdaf942fd06e206225793b198638 | /剑指offer/No33_二叉搜索树的后序遍历.py | 3f91cd02bac6390558ce1f02fee1723e7f138edf | [] | no_license | fank-cd/books_exercise_code | cb81ee8ec8167a5f5e3bfc58d3c1d6d931ca9286 | 1e8109adb82f741df1203658d4bf272f09a651b8 | refs/heads/master | 2021-07-11T01:15:11.980179 | 2020-06-29T04:01:53 | 2020-06-29T04:01:53 | 156,671,075 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,113 | py | # 题目:输入一个整数数组,判断该数组是不是某二叉搜索
# 树的后序遍历结果。如果是则返回true,否则返回false。
# 假设输入的数组的任意两个数字都不相同。
# 后续遍历:左右根
# 思路:最后一位是根节点,比根节点小的是左子树,大的是右子树
def verify_sequence_of_BST(sequence):
if not isinstance(sequence, list) or len(sequence) == 0:
return False
root = sequence[-1] # 根节点
for index, element in enumerate(sequ... | [
"[email protected]"
] | |
7b44dc1ca5547e96f889aa391f271ffc1af3a36b | f77b0f2cc709b9670e6b4dc7145a6ea5368585d2 | /project/services/__init__.py | db39b8c13a29c94642f59828bc1ba56e2a186ac3 | [] | no_license | sgammon/StonerHub | 45ccac6bd349200bbc75c494002c3ffeb082dcb8 | a81f7fdd2c7118c6cea3c25ef9f53f272d27b0cc | refs/heads/master | 2021-01-20T10:54:47.546251 | 2011-11-07T12:02:20 | 2011-11-07T12:02:20 | 2,664,437 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 209 | py | # -*- coding: utf-8 -*-
from apptools import BaseService
import protorpc
from protorpc import remote
from protorpc import messages
from protorpc import message_types
class RemoteService(BaseService):
pass | [
"[email protected]"
] | |
3081ad286ed7ba0b6f961edb970e6c68a711da17 | 43c5eafff817c3b130d8b4ec16c992d86208500c | /lino_avanti/lib/tickets/models.py | d831bc25bd9a0efddf3a6883c015383e6dfc9eaa | [
"BSD-2-Clause"
] | permissive | khchine5/avanti | a8b9e9e75ac593a00b11ffa5bd5cfd00f06db6c0 | 5a5f9d1ddfa20ae0eb8fa33cb906daf78d9568b1 | refs/heads/master | 2021-01-11T17:29:16.012089 | 2018-08-23T05:46:52 | 2018-08-23T05:46:52 | 79,784,948 | 0 | 0 | BSD-2-Clause | 2018-08-19T12:28:12 | 2017-01-23T08:28:46 | Python | UTF-8 | Python | false | false | 1,287 | py | # -*- coding: UTF-8 -*-
# Copyright 2016-2017 Luc Saffre
# License: BSD (see file COPYING for details)
from lino_xl.lib.tickets.models import *
from lino.api import _
Ticket.hide_elements('closed')
# class Ticket(Ticket):
# class Meta(Ticket.Meta):
# app_label = 'tickets'
# abstract = dd.is_abstr... | [
"[email protected]"
] | |
020682c50ddf142dd210fcb7c0c287518d456cfd | f62fd455e593a7ad203a5c268e23129473d968b6 | /python-watcher-1.0.1/watcher/api/controllers/v1/__init__.py | 16279551e21185f3c32f42077fb0cddb05a9009b | [
"Apache-2.0",
"CC-BY-3.0"
] | permissive | MinbinGong/OpenStack-Ocata | 5d17bcd47a46d48ff9e71e2055f667836174242f | 8b7650128cfd2fdf5d6c8bc4613ac2e396fb2fb3 | refs/heads/master | 2021-06-23T05:24:37.799927 | 2017-08-14T04:33:05 | 2017-08-14T04:33:05 | 99,709,985 | 0 | 2 | null | 2020-07-22T22:06:22 | 2017-08-08T15:48:44 | Python | UTF-8 | Python | false | false | 7,004 | py | # -*- encoding: utf-8 -*-
#
# 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 agreed to in writing, soft... | [
"[email protected]"
] | |
bc9c483d2db8d0a17d8feb2d6bf122ae4ee9d04a | 3e2addcbdbccf688abfe3c653cc9bc8a57255fbb | /subword/get_vocab.py | 7b71bf7f0609c1cf9f676db9398ec067465c9e32 | [
"MIT"
] | permissive | Germey/TextSummarization | 3ffb01401051642c579d7ce6b169a41fca4b48d2 | ffe221eea45838fbc2e12cd30e51fa48cf2ed070 | refs/heads/master | 2021-04-06T15:00:20.288387 | 2020-01-29T03:33:53 | 2020-01-29T03:33:53 | 124,391,071 | 1 | 1 | null | 2020-09-25T18:50:12 | 2018-03-08T12:52:25 | Python | UTF-8 | Python | false | false | 320 | py | #! /usr/bin/env python
from __future__ import print_function
import sys
from collections import Counter
c = Counter()
for line in sys.stdin:
for word in line.strip().split(' '):
if word:
c[word] += 1
for key,f in sorted(c.items(), key=lambda x: x[1], reverse=True):
print(key+" "+ str(f))
| [
"[email protected]"
] | |
75e25c09247507829e56bc9b21b111cf87fc5c63 | 6fe2d3c27c4cb498b7ad6d9411cc8fa69f4a38f8 | /algorithms/algorithms-python/leetcode/Question_0050_Pow_x_n.py | e16603e02ca49194c4b65741a35009f0423d53c7 | [] | no_license | Lanceolata/code | aae54af632a212c878ce45b11dab919bba55bcb3 | f7d5a7de27c3cc8a7a4abf63eab9ff9b21d512fb | refs/heads/master | 2022-09-01T04:26:56.190829 | 2021-07-29T05:14:40 | 2021-07-29T05:14:40 | 87,202,214 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 467 | py | #!/usr/bin/python
# coding: utf-8
class Solution(object):
def myPow(self, x, n):
"""
:type x: float
:type n: int
:rtype: float
"""
if n < 0:
return 1 / x * 1 / self.myPow(x, -(n + 1))
elif n == 0:
return 1.0
elif n == 1:
... | [
"[email protected]"
] | |
f5526ecba7d57516aec200d40fd864392e91210b | 6437a3a4a31ab9ad233d6b2d985beb50ed50de23 | /PythonistaAppTemplate/PythonistaKit.framework/pylib/site-packages/reportlab/lib/units.py | a7c5a26403519ebfbc9404e5677ea6143b7c68bb | [] | no_license | sreyemnayr/jss-lost-mode-app | 03ddc472decde3c17a11294d8ee48b02f83b71e7 | 3ff4ba6fb13f4f3a4a98bfc824eace137f6aabaa | refs/heads/master | 2021-05-02T08:50:10.580091 | 2018-02-08T20:32:29 | 2018-02-08T20:32:29 | 120,813,623 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,660 | py | #\input texinfo
#\input texinfo
#\input texinfo
#\input texinfo
#\input texinfo
#\input texinfo
#\input texinfo
#\input texinfo
#\input texinfo
#\input texinfo
#\input texinfo
#\input texinfo
#\input texinfo
#\input texinfo
#\input texinfo
#\input texinfo
#\input texinfo
#\input texinfo
#\input texinfo
#\input texinfo
... | [
"[email protected]"
] | |
5773aa56ca5ed8607d8fc9025b01c63b5333b19c | 199115509359d0849d9debb12db4eced6081dbed | /emotion_chatbot/speechtotext.py | 6394875fcb7f550ba787d59f0aea71ef9c1de8ee | [] | no_license | Sapphirine/202005-1-EmotionRecognitionsystem | 1ea1df3ddcd43bf5b25e76b534c75778a8d8b921 | ca4efb89ed762f16202476d39314051cf12a1b7e | refs/heads/master | 2022-08-29T20:00:21.097719 | 2020-05-16T05:05:11 | 2020-05-16T05:05:11 | 264,354,185 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 808 | py | import speech_recognition as sr
import pyaudio
import audioop
import os
import math
from os import system
import threading
def transcribe_audio():
with sr.Microphone() as source:
# read the audio data from the default microphone
r = sr.Recognizer()
#print("Chatbot : Hey! How can I help?")
... | [
"[email protected]"
] | |
9836ce05d70663e0bb8deeacba460ad5decb951f | 2a8a6327fb9a7ce8696aa15b197d5170661fb94f | /test/test_payment_debit_memo_application_unapply_request_type.py | c404017728cdfd5eacfaba72202a427d5f79d3e4 | [] | no_license | moderndatainc/zuora-client | 8b88e05132ddf7e8c411a6d7dad8c0baabaa6dad | d50da49ce1b8465c76723496c2561a3b8ebdf07d | refs/heads/master | 2021-09-21T19:17:34.752404 | 2018-08-29T23:24:07 | 2018-08-29T23:24:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 38,940 | py | # coding: utf-8
"""
Zuora API Reference
# Introduction Welcome to the reference for the Zuora REST API! <a href=\"http://en.wikipedia.org/wiki/REST_API\" target=\"_blank\">REST</a> is a web-service protocol that lends itself to rapid development by using everyday HTTP and JSON technology. The Zuora REST A... | [
"[email protected]"
] | |
e90d3914edcfc23c1e31112856f99c98b766538b | a450d455fc1da6f3a89eebb562cc2fb28784b129 | /docs/conf.py | 36714ac69f1de680f841bad04edc215e5a835504 | [
"MIT"
] | permissive | hawkthorne/bearweb | 6c62e0143ab6a19bee6cf340dfec81664f201dcb | 1533acd9c7610d9ea01e8413853cca70843b9d63 | refs/heads/master | 2021-05-28T05:54:55.533462 | 2014-03-16T23:12:01 | 2014-03-16T23:12:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,778 | py | # -*- coding: utf-8 -*-
#
# stackmachine documentation build configuration file, created by
# sphinx-quickstart on Sun Feb 17 11:46:20 2013.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
... | [
"[email protected]"
] | |
dfdafec9f08b465c99582efafef3c5f0429c748a | 70c10c5eeeb038d87841289f109775a9ec5ddc9b | /Day8/thread_lock.py | ab3ea522b2969168d19431f244cdd1e35f9d5c6c | [] | no_license | chenshuo666/pythonWell | a68fdae5fab891dd235c7656892ac85eaf9163c5 | ae4cd795c5cf925830b5f7df8c7668bec5b2904c | refs/heads/master | 2022-12-09T21:35:00.343591 | 2018-09-10T06:04:45 | 2018-09-10T06:04:45 | 130,060,002 | 1 | 0 | null | 2022-12-08T00:44:33 | 2018-04-18T12:38:02 | JavaScript | UTF-8 | Python | false | false | 431 | py | #!/usr/bin/python
#-*- coding:utf-8 -*-
# Author:Sebastian Williams
import time
import threading
lock=threading.RLock()
num=0
def run(n):
lock.acquire()
global num
num+=1
lock.release()
t_obj=[]
for i in range(50):
t=threading.Thread(target=run,args=("t-%s"%i,))
t.setDaemon(True) #将当前线程设置成守... | [
"[email protected]"
] | |
70f10f1add937c50d07e5e8235e15a6fb0fa56cf | d771ec4626a32f6122b155d24eba1320db230fbd | /web_frameworks/django/mysite/serializer_relations/apps.py | 7ec3af488ec96ebd4370ff3a54dd351853e5a9c1 | [] | no_license | axu4github/Templates | 9351983f8f7f65b9b2ca354909ce0d2198d23120 | 37e7a7182f14c98eb5cbc1202af3fd74df2bc297 | refs/heads/master | 2022-12-11T12:26:19.213955 | 2019-03-03T04:10:08 | 2019-03-03T04:10:08 | 154,787,446 | 0 | 0 | null | 2022-12-08T01:17:45 | 2018-10-26T06:27:54 | Python | UTF-8 | Python | false | false | 114 | py | from django.apps import AppConfig
class SerializerRelationsConfig(AppConfig):
name = 'serializer_relations'
| [
"[email protected]"
] | |
e8f740e26272bafd38b053bb5e8e1737f5b16837 | d62863d049c0206bfa744ca4c9e886030bfce1ab | /apps/sw_shop/sw_order/views.py | 2eb7cbc57083cb103a5b7c6b5f867553d8a37e5f | [] | no_license | jurgeon018/box | 51738b99e640202936ed72357d3c67d2517e589b | 50b84a0afa73fab85a00eef54194f3c126d15397 | refs/heads/master | 2021-07-17T13:37:08.665292 | 2020-10-15T09:50:33 | 2020-10-15T09:50:33 | 232,013,297 | 0 | 1 | null | 2020-03-27T02:16:44 | 2020-01-06T03:01:34 | Python | UTF-8 | Python | false | false | 937 | py | from django.shortcuts import render, redirect
from .models import Payment, Order
from box.core.sw_currency.models import Currency
from django.http import JsonResponse
def liqpay_callback(request):
try:
from box.apps.sw_payment.liqpay.utils import create_liqpay_transaction
except:
# except RuntimeError:
... | [
"[email protected]"
] | |
4609643ace645f4f97139036b9c90ce0a8d8ba63 | a073e730e32b75f5d4e02f6bcf8defcaa9c5da97 | /backend/fashion_candy_18064/settings.py | bba67dbee4f4084134baf664a6af612e2792240d | [] | no_license | crowdbotics-apps/fashion-candy-18064 | a962d38c9cbc27a90428dda3f962edbb32b5e427 | 87b8ef7ce8c9e29c8b543cfc5b0a0af8191f52a8 | refs/heads/master | 2022-10-21T06:00:25.083275 | 2020-06-13T01:15:59 | 2020-06-13T01:15:59 | 271,917,534 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,884 | py | """
Django settings for fashion_candy_18064 project.
Generated by 'django-admin startproject' using Django 2.2.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
... | [
"[email protected]"
] | |
7b285f649b01ce696d22c4fbd5cb8dae8b8d1286 | e63a36870512edb7fd947b809631cf153b028997 | /doc/source/conf.py | eed13ab7549cb2d023a203b106150682f25abb0b | [
"Apache-2.0"
] | permissive | titilambert/surveil | 632c7e65d10e03c675d78f278822015346f5c47a | 8feeb64e40ca2bd95ebd60506074192ecdf627b6 | refs/heads/master | 2020-05-25T13:36:59.708227 | 2015-06-29T14:07:07 | 2015-06-29T14:07:07 | 38,249,530 | 1 | 0 | null | 2015-06-29T13:38:04 | 2015-06-29T13:38:03 | null | UTF-8 | Python | false | false | 2,531 | py | # -*- coding: utf-8 -*-
# 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 agreed to in writing, software... | [
"[email protected]"
] | |
d675945d9dcc0f99396a02cefb496fc58d518c2b | edb906c10790abc1eba4047bca557aa173616f10 | /business/serializer.py | 9c6d69a222cb016743cecfb85d7e3c1b365aab12 | [] | no_license | Wakarende/neighbourhood | 743d26ee76a79018865a15c523f390c35812b73c | 29003acc8f760046a33f1b3313b5a016a007890d | refs/heads/master | 2023-05-13T12:43:53.257053 | 2021-06-08T06:59:09 | 2021-06-08T06:59:09 | 373,812,884 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 219 | py | from rest_framework import serializers
from .models import BusinessModel
from django.db import models
class BusinessSerializer(serializers.ModelSerializer):
class Meta:
model=BusinessModel
fields='__all__'
| [
"[email protected]"
] | |
54916cd6aef8b96949a3900348ef5e689648aa2c | 1ed4e96c20da03fbd3aa4f18d4b004a59d8f89e5 | /Repo/venv/Lib/site-packages/torch/utils/file_baton.py | d474bfb4a810ea042d978407b1239dea9dd3f8b9 | [] | no_license | donhatkha/CS2225.CH1501 | eebc854864dc6fe72a3650f640787de11d4e82b7 | 19d4dd3b11f8c9560d0d0a93882298637cacdc80 | refs/heads/master | 2023-07-19T13:27:17.862158 | 2021-02-08T07:19:05 | 2021-02-08T07:19:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,625 | py | import os
import sys
import time
if sys.version < '3.3':
# Note(jiayq): in Python 2, FileExistsError is not defined and the
# error manifests it as OSError.
FileExistsError = OSError
class FileBaton:
'''A primitive, file-based synchronization utility.'''
def __init__(self, lock_file... | [
"[email protected]"
] | |
894489a6d159e040d5ca697e4bb1fadf471b887c | 1dacbf90eeb384455ab84a8cf63d16e2c9680a90 | /lib/python2.7/site-packages/_pytest/recwarn.py | 753bfd18742651b338e79169aab68ed417785218 | [
"Python-2.0",
"Apache-2.0",
"BSD-3-Clause",
"LicenseRef-scancode-unknown"
] | permissive | wangyum/Anaconda | ac7229b21815dd92b0bd1c8b7ec4e85c013b8994 | 2c9002f16bb5c265e0d14f4a2314c86eeaa35cb6 | refs/heads/master | 2022-10-21T15:14:23.464126 | 2022-10-05T12:10:31 | 2022-10-05T12:10:31 | 76,526,728 | 11 | 10 | Apache-2.0 | 2022-10-05T12:10:32 | 2016-12-15T05:26:12 | Python | UTF-8 | Python | false | false | 7,173 | py | """ recording warnings during test function execution. """
import inspect
import py
import sys
import warnings
import pytest
@pytest.yield_fixture
def recwarn(request):
"""Return a WarningsRecorder instance that provides these methods:
* ``pop(category=None)``: return last warning matching the ... | [
"[email protected]"
] | |
175217a2e8693dc6abc2fb06bf86ba8bf7c9fb06 | 8f807e00570227aff15cadb9fb9cfbd46d5c5ab1 | /uninas/tasks/abstract.py | 45d13cc9cf1959a227e08f67a526d0632340edd4 | [
"MIT"
] | permissive | MLDL/uninas | cbe704e6e992af9f1c683f36cdbeab5919289c9b | 06729b9cf517ec416fb798ae387c5bd9c3a278ac | refs/heads/main | 2023-04-19T06:49:23.213220 | 2021-04-26T12:20:04 | 2021-04-26T12:20:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,040 | py | import os
import shutil
import logging
import random
from typing import Union, List
import numpy as np
import torch
from uninas.utils.args import ArgsInterface, Argument, MetaArgument, Namespace, sanitize, save_as_json
from uninas.utils.misc import split
from uninas.utils.loggers.python import LoggerManager, log_headli... | [
"[email protected]"
] | |
b891c1b843660a251c2fc198054adab99dfba8ab | 289bc4207b1c3efe3b99ac637d1ddfb88e28a5be | /Section05/debug_example.py | cdd21ee0a121d1d8cc04721135fa4e495be7ebd1 | [
"MIT"
] | permissive | PacktPublishing/-Hands-on-Reinforcement-Learning-with-TensorFlow | f5e41ed9e218f721b179e0b1d9aaa3c27957d38a | 6de9980db2bfc761524c27606e6495c093ddf516 | refs/heads/master | 2021-06-20T19:31:45.442884 | 2021-01-15T08:59:53 | 2021-01-15T08:59:53 | 145,985,316 | 11 | 3 | null | null | null | null | UTF-8 | Python | false | false | 1,935 | py | import numpy as np
import tensorflow as tf
from tensorflow.python import debug as tf_debug
learning_rate = 0.01
num_epochs = 1000
train_X = np.asarray(
[3.3, 4.4, 5.5, 6.71, 6.93, 4.168, 9.779, 6.182, 7.59, 2.167,
7.042, 10.791, 5.313, 7.997, 5.654, 9.27, 3.1])
train_Y = np.asarray(
[1.7, 2.76, 2.09, 3.... | [
"[email protected]"
] | |
cfc1119d27d112c18ef8a4cf62a55b777689fd7e | 57775b4c245723078fd43abc35320cb16f0d4cb6 | /Leetcode/hash-table/find-words-that-can-be-formed-by-characters.py | 5d7dfafa4509bc65009744a92a838b98562774db | [] | no_license | farhapartex/code-ninja | 1757a7292ac4cdcf1386fe31235d315a4895f072 | 168fdc915a4e3d3e4d6f051c798dee6ee64ea290 | refs/heads/master | 2020-07-31T16:10:43.329468 | 2020-06-18T07:00:34 | 2020-06-18T07:00:34 | 210,668,245 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 481 | py | class Solution:
def countCharacters(self, words: List[str], chars: str) -> int:
n = 0
for word in words:
y = chars
flag = False
for w in word:
if w in y:
y = y.replace(w,"",1)
else:
flag = Tru... | [
"[email protected]"
] | |
755a2aaad8acce2a42387f5c5739b2381f4c4253 | 8fe6a6790013eed7ca470414c398ea4848e798c4 | /src/datasets.py | c9a59f9a12256e6e0655c82d503fc40b155f989a | [
"MIT"
] | permissive | sovit-123/SSD300-VGG11-on-Pascal-VOC-2005-Data | d7aef30277076561c46d5f8a3d07985e09b9f13c | cb21c4c3e762a0184611b1a1659e7e730ef31932 | refs/heads/master | 2022-12-02T11:51:59.256715 | 2020-08-06T16:08:24 | 2020-08-06T16:08:24 | 284,756,098 | 3 | 0 | null | 2020-08-06T05:40:31 | 2020-08-03T16:53:09 | Python | UTF-8 | Python | false | false | 2,345 | py | import torch
import json
import os
from torch.utils.data import Dataset, DataLoader
from PIL import Image
from utils import transform
class PascalVOCDataset(Dataset):
"""
Custom dataset to load PascalVOC data as batches
"""
def __init__(self, data_folder, split):
"""
:param data_folder... | [
"[email protected]"
] | |
3c54d18e1ddff0980eaddc81064f2886f30343da | 80052e0cbfe0214e4878d28eb52009ff3054fe58 | /e2yun_addons/extra-addons/merp_picking_wave/wizard/message_wizard.py | 0e5a598da22cd2017115952c6a2839e8fa5675d9 | [] | no_license | xAlphaOmega/filelib | b022c86f9035106c24ba806e6ece5ea6e14f0e3a | af4d4b079041f279a74e786c1540ea8df2d6b2ac | refs/heads/master | 2021-01-26T06:40:06.218774 | 2020-02-26T14:25:11 | 2020-02-26T14:25:11 | 243,349,887 | 0 | 2 | null | 2020-02-26T19:39:32 | 2020-02-26T19:39:31 | null | UTF-8 | Python | false | false | 977 | py | # Copyright 2019 VentorTech OU
# Part of Ventor modules. See LICENSE file for full copyright and licensing details.
from odoo import models, fields as oe_fields, api, _
class MessageWizard(models.TransientModel):
_name = 'message.wizard'
message = oe_fields.Text()
@api.model
def default_get(self, ... | [
"[email protected]"
] | |
8f53dfcc7f2f3305bc737e1491065fa5815c5aa6 | 660328cb139ce1f90da70dbe640df62bf79bcc61 | /infra/src/stages/train_stage_base.py | 05241ecd3f6f9cd28a02c5b6c310f1a38a27c433 | [
"MIT-0"
] | permissive | cyrilhamidechi/amazon-frauddetector-mlops-multiaccount-cdk | 0801f4b844bd9b8e80776748c1056db83c9023fb | 379def0a571452b7920a9aaa56bccc2bfb39c523 | refs/heads/main | 2023-04-23T13:49:37.413348 | 2021-05-10T18:37:41 | 2021-05-10T18:37:41 | 366,139,181 | 0 | 0 | NOASSERTION | 2021-05-10T18:25:59 | 2021-05-10T18:25:58 | null | UTF-8 | Python | false | false | 2,432 | py | # ***************************************************************************************
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. *
# *
# Permission is hereby granted, free of charge, to... | [
"[email protected]"
] | |
d65784b7ec0cdad3d8e2ac0b3c31ebe3e21c263e | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/nouns/_embassy.py | 8c0f88ca692520c38a075b1fcc908e831280b60a | [
"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 | 397 | py |
#calss header
class _EMBASSY():
def __init__(self,):
self.name = "EMBASSY"
self.definitions = [u'the group of people who represent their country in a foreign country: ', u'the building that these people work in: ']
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.spe... | [
"[email protected]"
] | |
57b68e4a74604876334affc613d1d972667cfbe0 | c6431cdf572dd10f0f4d45839e6081124b246f90 | /code/lc3.py | 2ec290d3bc538c94abd8a7e80c92e02c5ff01e14 | [] | no_license | bendanwwww/myleetcode | 1ec0285ea19a213bc629e0e12fb8748146e26d3d | 427846d2ad1578135ef92fd6549235f104f68998 | refs/heads/master | 2021-09-27T19:36:40.111456 | 2021-09-24T03:11:32 | 2021-09-24T03:11:32 | 232,493,899 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,052 | py | """
给定一个字符串,请你找出其中不含有重复字符的 最长子串 的长度。
示例 1:
输入: "abcabcbb"
输出: 3
解释: 因为无重复字符的最长子串是 "abc",所以其长度为 3。
示例 2:
输入: "bbbbb"
输出: 1
解释: 因为无重复字符的最长子串是 "b",所以其长度为 1。
示例 3:
输入: "pwwkew"
输出: 3
解释: 因为无重复字符的最长子串是 "wke",所以其长度为 3。
请注意,你的答案必须是 子串 的长度,"pwke" 是一个子序列,不是子串。
"""
class Solution(object):
def lengthOfLongestSubstri... | [
"[email protected]"
] | |
903a77f4a02718a688e108e05b286348b1c99a65 | eef243e450cea7e91bac2f71f0bfd45a00c6f12c | /.history/worker_master_20210128031009.py | 16168c2cf8a83eb1dfb82220fd383d845e05ab9a | [] | no_license | hoaf13/nlp-chatbot-lol | 910ab2ea3b62d5219901050271fc1a1340e46a2f | 18cb64efa9d6b4cafe1015f1cd94f4409271ef56 | refs/heads/master | 2023-05-08T04:17:19.450718 | 2021-02-02T02:37:38 | 2021-02-02T02:37:38 | 332,535,094 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 493 | py | import redis
red = redis.StrictRedis(host='localhost',port=6379,db=0)
queue = list()
def str_to_bool(str):
if str == b'False':
return False
if str == b'True':
return True
return None
while True:
# check supplier product status
is_new = str_to_bool(red.get("new_product_worker1"))... | [
"[email protected]"
] | |
509601af0ae5337e7f8b9fc2f49be25dda28dc54 | 4acc08d2c165b5d88119df6bb4081bcfaca684f7 | /PythonPrograms/python_program/multiple_matrix.py | c88486026ddb4fe56be352d8cd4c3a355b0923f6 | [] | no_license | xiaotuzixuedaima/PythonProgramDucat | 9059648f070db7304f9aaa45657c8d3df75f3cc2 | 90c6947e6dfa8ebb6c8758735960379a81d88ae3 | refs/heads/master | 2022-01-16T04:13:17.849130 | 2019-02-22T15:43:18 | 2019-02-22T15:43:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 516 | py | # Python Program to Multiply Two Matrices ????
l = [[1,2,3],
[2,3,4],
[3,4,5]]
m = [[3,4,5],
[5,6,7],
[6,7,8]]
for i in range(3):
for j in range(len(l)):
sum = 0
for k in range(len(m)):
sum=sum + l[i][k] * m[k][j]
print(sum,end=" ")
print()
'''
output ==
l = [[1,2... | [
"[email protected]"
] | |
83503bae694f4bdf6c82b15e366f28e0066e3537 | 93e9bbcdd981a6ec08644e76ee914e42709579af | /depth-first-search/323_Number_of_Connected_Components_in_an_Undirected_Graph.py | 4009e47f32f8f461cc7dbd9fe5c9d094309c835b | [] | no_license | vsdrun/lc_public | 57aa418a8349629494782f1a009c1a8751ffe81d | 6350568d16b0f8c49a020f055bb6d72e2705ea56 | refs/heads/master | 2020-05-31T11:23:28.448602 | 2019-10-02T21:00:57 | 2019-10-02T21:00:57 | 190,259,739 | 6 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,112 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
https://leetcode.com/problems/number-of-connected-components-in-an-undirected-graph/description/
Given n nodes labeled from 0 to n - 1 and a list of undirected edges
(each edge is a pair of nodes)
write a function to find the number of
connected components in an und... | [
"[email protected]"
] | |
20afedb1b001619332e9d7e143861e7ec13ba57a | 45e97bd0c32042504052342bc1ae4e66a30d4d9a | /corepy/chapter13/demo5-trackInstance.py | 34e5d0f1d27f10ca12c701e54330defcbeef7adc | [] | no_license | vonzhou/py-learn | acf20c5183bff9788fcae9e36abdcd6f9bc553da | f0794164105dddbdffe082dfc90520f8778cbec3 | refs/heads/master | 2016-09-10T01:29:30.551541 | 2015-12-08T08:53:46 | 2015-12-08T08:53:46 | 27,669,547 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 373 | py |
''' P343'''
class InsCnt(object):
count = 0 #count是一个类属性
def __init__(self):
InsCnt.count += 1
def __del__(self):
InsCnt.count -= 1
def howMany(self):
return InsCnt.count
c1 = InsCnt()
print c1.howMany()
c2 = c1
print c2.howMany()
c3 = InsCnt()
print howMany()
del c1
del c2
print howMany()
del c3
... | [
"[email protected]"
] | |
8eb17eeafb990dd19724e7110b8af45955b7f221 | aa37b7aec635fd62707c90a7b536926e20cddaef | /test/functional/test_runner.py | 59b3e989a6b2fc8b11611cac66ce1fcd22c7d4aa | [
"MIT"
] | permissive | planbcoin/planbcoin | d85b9345998c9a2221ea0b44ed0dec86c7d3dc1e | 7d132eebdce94f34ca2e74278b5ca09dc012d164 | refs/heads/master | 2020-12-02T20:58:31.167685 | 2017-08-06T17:57:51 | 2017-08-06T17:57:51 | 96,237,224 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 20,194 | py | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The PlanBcoin developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Run regression test suite.
This module calls down into individual test cases via subprocess. It will
forw... | [
"[email protected]"
] | |
2c6c3a09d95945c7a9f020b9df2ee127ebe4414a | 00e29479dc7c45a9e019f96c90a69a49af618ccf | /src/api-engine/src/api/routes/user/views.py | 42300c55ed400a24f4c2f80abe33262434251b0a | [
"Apache-2.0",
"CC-BY-4.0"
] | permissive | yunchaozou/cello | 8dd081db2ce5d9b8975d553d4491d329790588ef | 68158f572c688f1710813c4df47fad28c3d4276c | refs/heads/master | 2020-04-22T08:40:53.157301 | 2019-02-08T22:35:35 | 2019-02-08T22:35:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,549 | py | #
# SPDX-License-Identifier: Apache-2.0
#
import logging
from rest_framework import viewsets, status
from rest_framework.decorators import action
from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response
from drf_yasg.utils import swagger_auto_schema
from api.routes.network.se... | [
"[email protected]"
] | |
0fac751aa2481ed3243e8b4ecef04a4bc1c5f709 | 1d0c89ecaa7598e5cb6a26a20a1bdd5f51d60123 | /apps/venta/views.py | 4d70ba59937d3b4dd2807cc2520c3a70b605026b | [] | no_license | chrisstianandres/american_audio | a1fee70e798a151fcbfd492ed75878a8524c783b | ee31f01af4212cc2484188003900648064811fcb | refs/heads/master | 2023-02-01T02:36:59.824789 | 2020-12-09T23:17:45 | 2020-12-09T23:17:45 | 307,203,032 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 27,972 | py | import json
from datetime import datetime
from django.db import transaction
from django.db.models import Sum, Count
from django.db.models.functions import Coalesce
from django.http import JsonResponse, HttpResponse, HttpResponseRedirect
from django.shortcuts import render
from django.urls import reverse_lazy
from djan... | [
"[email protected]"
] | |
ac605461478c38b29888febfb314e4ce4df02cb0 | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2223/60595/241841.py | 6076414ea5c1392865c888fc83043dbdc578bc50 | [] | 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 | 121 | py | num=input()
if(num=="1,2,4,7"):
print("[0, -4]")
elif(num=="1,2,2,4"):
print("[2, 3]")
else:
print("[2, 1]")
| [
"[email protected]"
] | |
0f638cb37c3cfe9526b6699975d791d2e7f0eaff | 487ce91881032c1de16e35ed8bc187d6034205f7 | /codes/CodeJamCrawler/16_0_3_neat/16_0_3_yesdongil_main_big.py | 207b07db4c346d26f784da03b2499dd769587875 | [] | no_license | DaHuO/Supergraph | 9cd26d8c5a081803015d93cf5f2674009e92ef7e | c88059dc66297af577ad2b8afa4e0ac0ad622915 | refs/heads/master | 2021-06-14T16:07:52.405091 | 2016-08-21T13:39:13 | 2016-08-21T13:39:13 | 49,829,508 | 2 | 0 | null | 2021-03-19T21:55:46 | 2016-01-17T18:23:00 | Python | UTF-8 | Python | false | false | 1,846 | py | import os
import sys
import math
import itertools
def xrange(start, stop):
i = start
while i < stop:
yield i
i += 1
def is_prime(value) :
ret = 0
if (value % 2) == 0 :
ret = 2
elif (value % 3) == 0 :
ret = 3
else :
limit = int(math.sqrt(value))
index_limi... | [
"[[email protected]]"
] | |
edeee6602b190ca18e61ad5f160a964b27d00952 | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_256/ch34_2020_04_23_17_53_27_919517.py | ee3644d60592c2aae2ec473d6ba51ecadb41d2fe | [] | 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 | 486 | py | def eh_primo(n):
if n == 0 or n == 1:
return False
elif n == 2:
return True
for i in range(3, n, 2):
if n%2==0:
return False
elif n%i==0:
return False
else:
return True
def maior_primo_menor_que(n):
p = -1
while n>0:
i... | [
"[email protected]"
] | |
fafe549264abbc0749503ca3d08dbbc62fe4299b | 91d1a6968b90d9d461e9a2ece12b465486e3ccc2 | /lambda_write_f/function-event-invoke-config_delete.py | 15016e42d8d9604bacece336bdaec2f86610b9a1 | [] | no_license | lxtxl/aws_cli | c31fc994c9a4296d6bac851e680d5adbf7e93481 | aaf35df1b7509abf5601d3f09ff1fece482facda | refs/heads/master | 2023-02-06T09:00:33.088379 | 2020-12-27T13:38:45 | 2020-12-27T13:38:45 | 318,686,394 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,010 | py | #!/usr/bin/python
# -*- codding: utf-8 -*-
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
from common.execute_command import write_parameter
# url : https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/describe-instances.html
if __name__ == '__main__... | [
"[email protected]"
] | |
4e42e313b4e8f4517cca59865a67badc6b525b39 | 200df6cda6e54d56a4c800e10e6d5f248d7d59f2 | /02-算法思想/广度优先搜索/778.水位上升的泳池中游泳(H).py | 0d5613ed1b63a75e2a20984da04124b0b0f7e70b | [] | no_license | jh-lau/leetcode_in_python | b9b9a47d0b3ce29c3c56836b39decc3ec4487777 | 1d1876620a55ff88af7bc390cf1a4fd4350d8d16 | refs/heads/master | 2023-04-17T15:01:49.925774 | 2021-04-24T01:17:39 | 2021-04-24T01:17:39 | 192,735,826 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,600 | py | """
@Author : liujianhan
@Date : 20/9/26 19:31
@Project : leetcode_in_python
@FileName : 778.水位上升的泳池中游泳(H).py
@Description : 在一个 N x N 的坐标方格 grid 中,每一个方格的值 grid[i][j] 表示在位置 (i,j) 的平台高度。
现在开始下雨了。当时间为 t 时,此时雨水导致水池中任意位置的水位为 t 。你可以从一个平台游向四周相邻的任意一个平台,
但是前提是此时水位必须同时淹没这两个平台。假定你可以瞬间移动无... | [
"[email protected]"
] | |
8f6544b242c2b325c60dfe4ba718e842a1bd5da5 | 99c4d4a6592fded0e8e59652484ab226ac0bd38c | /code/batch-2/dn4 - krajevne funkcije/M-17221-2470.py | 10d80965dddb932bac3c85dd6f23dabfac539c8c | [] | no_license | benquick123/code-profiling | 23e9aa5aecb91753e2f1fecdc3f6d62049a990d5 | 0d496d649247776d121683d10019ec2a7cba574c | refs/heads/master | 2021-10-08T02:53:50.107036 | 2018-12-06T22:56:38 | 2018-12-06T22:56:38 | 126,011,752 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,073 | py | # Tu pišite svoje funkcije:
from math import *
def koordinate(ime, kraji):
for kraj in kraji:
if(kraj[0] == ime):
return (kraj[1], kraj[2])
return None
def razdalja_koordinat(x1, y1, x2, y2):
return sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
def razdalja(ime1, ime2, kraji... | [
"[email protected]"
] | |
d4a5b1ba6b6f1f3a11524fac579af53d35e04cf7 | b18660ec434f8ebafeb5397690aa1b4c0a1cb528 | /train_ALL_LSTM.py | 528fe8ecf051ad46dbbf40705f292c601be2e094 | [] | no_license | wp0517/pytorch_SRU | 5d46956406c7b64431b736981f4565264ca9aa29 | 96be5b4f4f0b73a4e0532bb18d726655af0fdb50 | refs/heads/master | 2020-04-09T12:06:47.847348 | 2018-06-17T00:53:05 | 2018-06-17T00:53:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,866 | py | import os
import sys
import torch
import torch.autograd as autograd
import torch.nn.functional as F
import torch.nn.utils as utils
import torch.optim.lr_scheduler as lr_scheduler
import shutil
import random
import hyperparams
import time
torch.manual_seed(hyperparams.seed_num)
random.seed(hyperparams.seed_num)
def tra... | [
"[email protected]"
] | |
793c15be2778bfa6a0852f657ea403fc51e685ba | a3f793a53361d08f3e0cdedc7fab9df40e201eef | /main.py | a53882b59400172fbcb656c830535363798e384d | [] | no_license | songshanshi/imoocc_py3 | 156db4f072bc956f45cbcc8c61fca964be8acfb9 | 6f3491ce857c541bf55d5ed8993265b7dd4dee09 | refs/heads/master | 2020-04-28T02:25:18.241155 | 2018-10-16T07:20:15 | 2018-10-16T07:20:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,917 | py | #!/usr/bin/env python
# -*- coding:utf-8 -*-
#########################################################################
# Author:Jeson
# Email:[email protected]
import datetime
import os
import re
import yaml
PROJECT_ROOT = os.path.realpath(os.path.dirname(__file__))
# import sys
os.environ["DJANGO_SETTINGS_MODULE"] =... | [
"[email protected]"
] | |
2bb1e7e593dfb67298aa570a9c0e2c150b0dc54b | d0bd9c3c5539141c74e0eeae2fa6b7b38af84ce2 | /src/cogent3/parse/__init__.py | 7559bc6dcc006e4be1bcd02096d3c56f55fc2512 | [
"BSD-3-Clause"
] | permissive | KaneWh1te/cogent3 | 150c72e2f80a6439de0413b39c4c37c09c9966e3 | 115e9eb5700627fdb24be61441a7e3e155c02c61 | refs/heads/master | 2023-07-29T00:32:03.742351 | 2021-04-20T04:32:00 | 2021-04-20T04:32:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 956 | py | #!/usr/bin/env python
__all__ = [
"blast",
"cigar",
"clustal",
"dialign",
"ebi",
"fasta",
"gcg",
"genbank",
"gff",
"locuslink",
"ncbi_taxonomy",
"newick",
"nexus",
"paml",
"paml_matrix",
"phylip",
"rdb",
"record",
"record_finder",
"sequenc... | [
"[email protected]"
] | |
41a00bab3f061077909f54d74dc574355af1929d | 1b77eaf078321b1320d72aa36a4357568101e4ca | /江南大学教务处/test.py | 93ac06b18e5699d2285b3f417e63ee409aaa3bec | [] | no_license | BEE-JN/python_homework | 92ffc1216a380d124901fd64cc541f70813847dc | 8ba4ea79cbd422f40e6f9f1cc5fed4d75715d207 | refs/heads/master | 2020-03-23T08:02:47.863607 | 2018-07-17T15:30:21 | 2018-07-17T15:30:21 | 141,305,118 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 187 | py | import requests
import time
url = "https://survey.zkeycc/pku/xsdc/?dm=bk"
if __name__=='__main__':
while 1:
r=requests.get(url)
print(r.content)
time.sleep(1) | [
"[email protected]"
] | |
96c1f73d17d18f7906615ca48bc2e2d25d8b7259 | caa06eca3eef2549d5088f6487201f734b35822e | /multi_ie/EE/model/multi_pointer_net.py | 0d2334ed6d7a09e87757e36528cedd3c228713c5 | [] | no_license | kelvincjr/shared | f947353d13e27530ba44ea664e27de51db71a5b6 | 4bc4a12b0ab44c6847a67cbd7639ce3c025f38f8 | refs/heads/master | 2023-06-23T19:38:14.801083 | 2022-05-17T09:45:22 | 2022-05-17T09:45:22 | 141,774,490 | 6 | 1 | null | 2023-06-12T21:30:07 | 2018-07-21T02:22:34 | Python | UTF-8 | Python | false | false | 7,694 | py | # _*_ coding:utf-8 _*_
import warnings
import numpy as np
import torch
import torch.nn as nn
from transformers import BertModel
from transformers import BertPreTrainedModel
from .layernorm import ConditionalLayerNorm
#from utils.data_util import batch_gather
warnings.filterwarnings("ignore")
def batch_gather(data: ... | [
"[email protected]"
] | |
b865fa83e9b8e72b08e144110aa75b200cf807d4 | 7ec04fc867d0a48fffc05c65bff9217cfe211fe7 | /HW/统计字符串/countHotal.py | 31f95d4500041b28fa209a1a7c4dae778ad024c5 | [] | no_license | Cherry93/pythonPractic | 3b9d1f99803503073bbb2f3a58009665338bd278 | 2889183af6c9a01ab47895b23e2d6ce8c288fd4d | refs/heads/master | 2021-08-31T16:41:56.655989 | 2017-12-22T03:53:18 | 2017-12-22T03:53:18 | 115,008,198 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 520 | py | '''
统计加州旅馆中所有单词出现的次数,并降序打印
'''
import collections
file = input("Enter a filename:")
with open(file, 'r') as fpr:
content = fpr.read()
content = content.replace("\n", '')
content1 = content.split()
print(content1)
print(content1[0].lower())
print(len(content1))
list =[]
for i in range(0,len(content1)):
list.a... | [
"[email protected]"
] | |
c7eee2a22a1efb7ddb4b5278189a0424acae6d63 | 14ebcf98e7c64505839e0b7bbab89e32af7abe1e | /deep4rec/datasets/census.py | 4d58743074fe1b8d1eb3004a4a18b2d8469a1f62 | [
"Apache-2.0"
] | permissive | Luiz-FS/Deep4Rec | b021fbc36e377e1055e46e9a52f68c32018894f8 | 78c5ca74f0e0d06a9f4bb2f267817b69abd40d1d | refs/heads/master | 2020-09-03T14:27:45.828007 | 2019-11-18T01:10:30 | 2019-11-18T01:10:30 | 219,484,411 | 0 | 0 | Apache-2.0 | 2019-11-18T01:10:31 | 2019-11-04T11:22:00 | Python | UTF-8 | Python | false | false | 6,110 | 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 applica... | [
"[email protected]"
] | |
e469b1c0df202afbdf63411ba8abdbd4527e1190 | 493f99b210303d019f62195ae8dde9d02ee1b81f | /indy_node/test/api/test_rich_schema_objects_reply.py | 56dbda7791bdd23e1fda9ccddcde4b9f7330077d | [
"Apache-2.0"
] | permissive | darklordz-217/indy-node | 745baa357fe739bac20433cb2daa0f7c5a2f2caf | 4d2f6a9dc0ff136117f8766a4f2cf70b239404e0 | refs/heads/master | 2022-10-06T17:01:12.414734 | 2020-06-11T08:49:17 | 2020-06-11T08:49:17 | 271,472,931 | 2 | 0 | Apache-2.0 | 2020-06-11T09:04:23 | 2020-06-11T06:48:21 | Python | UTF-8 | Python | false | false | 2,499 | py | import json
import pytest
from indy_common.constants import JSON_LD_CONTEXT, RS_CONTEXT_TYPE_VALUE, RICH_SCHEMA, RICH_SCHEMA_ENCODING, \
RICH_SCHEMA_MAPPING, RICH_SCHEMA_CRED_DEF, RS_CRED_DEF_TYPE_VALUE, RS_MAPPING_TYPE_VALUE, \
RS_ENCODING_TYPE_VALUE, RS_SCHEMA_TYPE_VALUE, RICH_SCHEMA_PRES_DEF, RS_PRES_DEF_T... | [
"[email protected]"
] | |
bcfcfd42d82934ef66bd39ecc5139583c6a927df | f62ff90d7850af458d8f12386fc9ee9134dbe7c1 | /Plots/Showplots/Model_3/Current_Voltage_Curves.py | 2d9023dab4df536df56c4202551adad30523eb73 | [] | no_license | AlexSchmid22191/EIS_R_Sim | 51b431f078cb455fc38637c192436c0523449565 | 851b061e60811e1e58a5b2fd4e393e529c3f86ac | refs/heads/master | 2023-06-27T17:40:59.177270 | 2021-07-22T11:50:27 | 2021-07-22T11:50:27 | 380,768,174 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,606 | py | from matplotlib.pyplot import subplots, show
from matplotlib.style import use
from numpy import load, log10
use('../Show.mplstyle')
data = load('../../../Currents_Resistances_Model_3/Current_Data_Model_3.npy')
fig_hi, ax_hi = subplots(nrows=2, figsize=(6, 8))
fig_me, ax_me = subplots(nrows=2, figsize=(6, 8))
fig_lo,... | [
"[email protected]"
] | |
690fe2ffb43edf1febae8410ba150129ce00cce0 | 3419067388879d8a6542df01cb0278ae90b021a2 | /py100day/Day01-15/Day04/code/for2.py | 22c96886304fa47ecee9b5c39f3f60d9a36a21f1 | [] | no_license | oweson/python-river-master | faa31c5248e297a92054cc302e213e2b37fb8bd5 | cf9e99e611311b712465eb11dec4bb8f712929b2 | refs/heads/master | 2021-06-21T15:47:01.755957 | 2019-10-02T00:08:05 | 2019-10-02T00:08:05 | 205,607,518 | 0 | 0 | null | 2021-06-10T21:55:20 | 2019-08-31T23:39:55 | Python | UTF-8 | Python | false | false | 173 | py | """
用for循环实现1~100之间的偶数求和
Version: 0.1
Author: 骆昊
Date: 2018-03-01
"""
# 步长是2
sum = 0
for x in range(2, 101, 2):
sum += x
print(sum)
| [
"[email protected]"
] | |
1026e1d0f5add5bf40edc076405f2e409f26c5ce | 2f2682f778512a75a1ff49d7e267c2f4d355c48e | /geoprocess/controllers.py | 7be119b34c9b20b609770261e464a475b5996a9b | [] | no_license | beatcovid/geoprocess | 4a44f46b900c2e0ffed0dab18008e7884e759e3b | c2a7b1e4ede06583679db9dadebe2066b0274e54 | refs/heads/master | 2023-04-13T13:45:48.572825 | 2020-05-27T03:08:14 | 2020-05-27T03:08:14 | 260,215,049 | 0 | 1 | null | 2023-03-29T00:36:19 | 2020-04-30T13:11:38 | Python | UTF-8 | Python | false | false | 4,538 | py | import csv
import email.utils
import json
import logging
import os
import sys
from datetime import datetime
from pprint import pprint
from dotenv import load_dotenv
from pymongo import MongoClient
from geoprocess.find_psma import find_lga, find_sa3
from geoprocess.google_geo import google_geocode, lookup_placeid, pla... | [
"[email protected]"
] | |
c0bccab0f33fe2f6323731cddd1742ba4d45275c | aa410a95773aeea73e75f0e701db5cdc0eda890b | /weapons.py | cf6e4eb05ba6ad8a453e07637018051ed6eac5f8 | [] | no_license | predominant/zombsole | ccc00893b7739c5341c43fc28375415fa628b885 | a04ff40a144cb1f63d8aa29ccf0b06ecccc2bc7f | refs/heads/master | 2021-01-21T19:29:05.322551 | 2014-03-26T05:38:15 | 2014-03-26T05:38:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 710 | py | # coding: utf-8
from core import Weapon
def _new_weapon_class(name, max_range, damage_range):
'''Create new weapon class.'''
class NewWeapon(Weapon):
def __init__(self):
super(NewWeapon, self).__init__(name,
max_range,
... | [
"[email protected]"
] | |
2eac0fe3402f79f389178ebe792a10a16f7c1a4a | 039f2c747a9524daa1e45501ada5fb19bd5dd28f | /AGC001/AGC001c.py | 6f3fb7892212fb5a2683a833717ea55a344d0dfd | [
"Unlicense"
] | permissive | yuto-moriizumi/AtCoder | 86dbb4f98fea627c68b5391bf0cc25bcce556b88 | 21acb489f1594bbb1cdc64fbf8421d876b5b476d | refs/heads/master | 2023-03-25T08:10:31.738457 | 2021-03-23T08:48:01 | 2021-03-23T08:48:01 | 242,283,632 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 168 | py | #AGC001c
def main():
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10**6)
# map(int, input().split())
if __name__ == '__main__':
main() | [
"[email protected]"
] | |
eaeef1d5a47d3ff5621d988c694458cf63dc39a6 | ceab178d446c4ab55951c3d65d99815e9fdee43a | /archive/coding_practice/python/ticks_plot.py | 83e7d35370f009514aa95366b78a92f4f61f0afa | [] | no_license | DeneBowdalo/AtmosChem_Tools | 01ecedb0df5c5d6e01966a0c3d8055826f5ac447 | 220c2f697a4f4c1e5443c336ede923b2004fe9f5 | refs/heads/master | 2021-01-10T18:05:30.800218 | 2017-02-06T16:08:14 | 2017-02-06T16:08:14 | 43,529,442 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 183 | py | import matplotlib.pyplot as plt
x = [5,3,7,2,4,1,11,25,33]
plt.plot(x)
plt.xticks(range(len(x)), ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i']);
plt.yticks(range(1,36,2));
plt.show()
| [
"[email protected]"
] | |
def39a55d547e1131e0f8dcf639f5da81e09bb90 | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /cGaTqHsPfR5H6YBuj_0.py | c3936bfae1158025ccd064458e0c9c17ee2d0b5e | [] | 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 | 818 | py | """
Given a list of ingredients `i` and a flavour `f` as input, create a function
that returns the list, but with the elements `bread` around the selected
ingredient.
### Examples
make_sandwich(["tuna", "ham", "tomato"], "ham") ➞ ["tuna", "bread", "ham", "bread", "tomato"]
make_sandwich(["cheese", "le... | [
"[email protected]"
] | |
b01ea9b981eaf809aed4db02cdf99add3ef4992e | a4753147801dbabfec45f6f9f47572cda77efb81 | /debugging-constructs/ibmfl/util/data_handlers/mnist_pytorch_data_handler.py | 29cc18afb938e575e71025d9007fd67f722221b9 | [
"MIT"
] | permissive | SEED-VT/FedDebug | e1ec1f798dab603bd208b286c4c094614bb8c71d | 64ffa2ee2e906b1bd6b3dd6aabcf6fc3de862608 | refs/heads/main | 2023-05-23T09:40:51.881998 | 2023-02-13T21:52:25 | 2023-02-13T21:52:25 | 584,879,212 | 8 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,460 | py | """
Licensed Materials - Property of IBM
Restricted Materials of IBM
20221069
© Copyright IBM Corp. 2022 All Rights Reserved.
"""
import logging
import numpy as np
from ibmfl.data.data_handler import DataHandler
from ibmfl.util.datasets import load_mnist
logger = logging.getLogger(__name__)
class MnistPytorchDataHan... | [
"[email protected]"
] | |
7eced97eac47dfd2ce21cee31fe289634f7a5bf7 | eac6dc8eb8e5f088500f425a7323cd35a4f99bd6 | /src/courses/migrations/0012_course_active.py | af89db3155df4d47be9b84b4c843f0b847c617a6 | [] | no_license | aminhp93/django_serverup_2 | a14195af756799795282028ba611dbccc3848870 | aef31722e882367c731e9e48fc8af8740befc112 | refs/heads/master | 2020-05-27T01:54:15.268661 | 2017-02-25T21:58:36 | 2017-02-25T21:58:36 | 82,514,017 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 451 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-19 18:06
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('courses', '0011_auto_20170219_1749'),
]
operations = [
migrations.AddField(... | [
"[email protected]"
] | |
ba63f7efdf10aab9c7481c9a2bee33143ac12df2 | 2037235643046608bf883f11c1bc448e2df8a4a3 | /HuaYing/practice/test14.py | a18f331036c28c57f36f4079f83d4f9d3c4a6650 | [] | no_license | Hardworking-tester/HuaYingAutoTest | 7e46dfb0729961cee0da06762fc0be11724ad80b | c1f0cf7aa4433f482bbae88d1a5637b9859359ca | refs/heads/master | 2021-01-10T18:38:37.788736 | 2015-09-05T10:37:10 | 2015-09-05T10:37:10 | 41,957,309 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,368 | py | #encoding:utf-8
from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
br=webdriver.Firefox()
# br.maximize_window()
br.get("http://www.xebest.com:8000")
elements=br.find_elements_by_class_name("nav-arrow")
element1=elements[4]
if element1.is_displayed():
print ("网站导航链接已定位到"... | [
"[email protected]"
] | |
636022ef17714db27f131c08daa673606f4185d8 | 511b7b19ec49be34bec240ee7c7cf4178cd36ca3 | /gasolinestation/migrations/0013_auto_20200304_0909.py | fb6c52a8156995aa62443e5a937be261f2953067 | [] | no_license | francisguchie/360POS | 58de516fe52e83d6b99bd195d22c8aa902daee18 | 68f9e20ac263c75ec0c9b0fe75d7f648b8744ea8 | refs/heads/master | 2023-02-08T16:38:42.667538 | 2020-03-12T16:05:00 | 2020-03-12T16:05:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 657 | py | # Generated by Django 3.0.3 on 2020-03-04 09:09
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('gasolinestation', '0012_transactionsales'),
]
operations = [
migrations.AddField(
model_name='transactionsales',
nam... | [
"[email protected]"
] | |
5ef08391fa1fa480f963802b9e34f6077002e815 | d12b59b33df5c467abf081d48e043dac70cc5a9c | /ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/interface_ddc6ed85db77afb3c40ee4824b274478.py | 7eb7f7341abf23ea8aaaf6c991a7897c8183a845 | [
"MIT"
] | permissive | ajbalogh/ixnetwork_restpy | 59ce20b88c1f99f95a980ff01106bda8f4ad5a0f | 60a107e84fd8c1a32e24500259738e11740069fd | refs/heads/master | 2023-04-02T22:01:51.088515 | 2021-04-09T18:39:28 | 2021-04-09T18:39:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 35,852 | py | # MIT LICENSE
#
# Copyright 1997 - 2020 by IXIA Keysight
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify,... | [
"[email protected]"
] | |
86089daeedc71651ae0564812bf24553d130050a | f399fbac7e35dcc2c2f2ad4d3202b0839d9b7d48 | /user/send_mail.py | 0cb781b2301d5d6442e6f1cfdfd49aada05a621f | [] | no_license | AktanKasymaliev/django-toilets-service | 480f56b652a88e1422290de8906f0bb6d5693cff | 225d71b164c36bab5fded86390b17ce265694a17 | refs/heads/main | 2023-07-14T12:46:12.399114 | 2021-08-23T17:14:04 | 2021-08-23T17:14:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,328 | py | from django.template.loader import render_to_string
from django.utils.html import strip_tags
from django.core.mail import send_mail
from django.contrib.sites.shortcuts import get_current_site
from django.core.mail import EmailMultiAlternatives
from decouple import config
from django.utils.http import urlsafe_base64_dec... | [
"[email protected]"
] | |
2ed87c256e5bf9f70115c96c9aec2798f8b5a5af | 14913a0fb7e1d17318a55a12f5a181dddad3c328 | /63.snake.py | 990234c17a8d9d056195b13ae470723aa887b84e | [] | no_license | Jesuisjavert/Algorithm | 6571836ec23ac3036565738c2bee94f416595f22 | 730549d19e66e20b3474a235a600958a8e036a0e | refs/heads/master | 2023-02-16T06:34:50.984529 | 2020-09-25T09:40:30 | 2020-09-25T09:40:30 | 330,849,371 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 168 | py | import sys
sys.stdin = open('input.txt','r')
T = int(input())
for testcase in range(1,T+1):
arr = [list(map(int, input().split())) for _ in range(4)]
print(arr) | [
"[email protected]"
] | |
beed14a3c1aff89d035020396a37556f4cf88ed1 | 24d8cf871b092b2d60fc85d5320e1bc761a7cbe2 | /wicd/rev519-537/right-branch-537/wicd/backends/be-wireless/threadedwirelessinterface.py | ab1a5d1e45f9fa860b190118e1d14d918ce5832a | [] | no_license | joliebig/featurehouse_fstmerge_examples | af1b963537839d13e834f829cf51f8ad5e6ffe76 | 1a99c1788f0eb9f1e5d8c2ced3892d00cd9449ad | refs/heads/master | 2016-09-05T10:24:50.974902 | 2013-03-28T16:28:47 | 2013-03-28T16:28:47 | 9,080,611 | 3 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,698 | py | from misc import WicdError
from baseinterface import needsidle
from encryptablewirelessinterface import EncryptableWirelessInterface
from asyncrunner import AsyncManager, AsyncError
class ThreadedWirelessInterface(EncryptableWirelessInterface):
def __init__(self, interface_name):
EncryptableWirelessInterfac... | [
"[email protected]"
] | |
be7975289ea7397570ae5a442d590aae139acd82 | 214dde26c268d1d0b7991318c5e2d43aa27af89b | /backlooking/order_analysis.py | c7b7acc13a43f9796ee1e1050048258fb6cc19ad | [] | no_license | hellobiek/smart_deal_tool | f1846903ac402257bbe92bd23f9552970937d50e | ba8aad0a37843362f5833526921c6f700fb881f1 | refs/heads/master | 2022-09-04T04:41:34.598164 | 2022-08-04T22:04:09 | 2022-08-04T22:04:09 | 88,258,362 | 36 | 14 | null | null | null | null | UTF-8 | Python | false | false | 3,559 | py | #-*- coding: utf-8 -*-
import os
import sys
from os.path import abspath, dirname
sys.path.insert(0, dirname(dirname(abspath(__file__))))
import datetime
import const as ct
import pandas as pd
from futu import TrdEnv
from datetime import datetime
from base.cdate import get_dates_array
from tools.markdown_table import Ma... | [
"[email protected]"
] | |
ba7f120c0d5551658bacbd572127dbb325214ffa | 11b420a9e6dbe371167227f41ef8e344e3382612 | /ConvNets/Comparison_Plots/Pooled_Images/Pooled_Images.py | 15a23b6ae92fc9bdfccb8654ccf3350027e0953e | [
"MIT"
] | permissive | tarek-ullah/Active-Learning-Bayesian-Convolutional-Neural-Networks | 7092386758b68dc922efaa2c2eba055930bf2896 | f8b68038bd3b97c473e9c1de6b6cdee4538021f4 | refs/heads/master | 2021-01-13T06:57:19.343775 | 2016-11-02T12:22:16 | 2016-11-02T12:22:16 | 81,338,773 | 1 | 0 | null | 2017-02-08T14:34:15 | 2017-02-08T14:34:15 | null | UTF-8 | Python | false | false | 3,650 | py | from __future__ import print_function
from keras.datasets import mnist
from keras.preprocessing.image import ImageDataGenerator
from keras.models import Sequential
from keras.layers.core import Dense, Dropout, Activation, Flatten
from keras.layers.convolutional import Convolution2D, MaxPooling2D
from keras.optimizers i... | [
"[email protected]"
] | |
54c162b29e9001c19ac7d6dca301deb9f0baaeda | 69e318f2b60175108bc74ee669bfe16287a71cb6 | /plugins/modules/fortios_firewall_vipgrp46.py | c17473a84beae56fcf18f1d94f460da32776abe1 | [] | no_license | chillancezen/ansible-galaxy-fortios-collection | 5268a5fd97fb4594772349b8d89cb818ec54b3bd | 66a331cd4493d1b0f49798d5c2cd6ef5aeba84d3 | refs/heads/master | 2022-04-09T19:20:59.073193 | 2020-03-26T07:17:09 | 2020-03-26T07:17:09 | 250,185,374 | 0 | 0 | null | 2020-03-26T07:06:16 | 2020-03-26T07:06:16 | null | UTF-8 | Python | false | false | 11,486 | py | #!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
# Copyright 2019 Fortinet, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Lic... | [
"[email protected]"
] | |
eee47352250b1354c790e2f7624fae5c7205dbdd | d45b87ba22649cb9c0f003479112c50a7ce09ba0 | /Counting Sort 3.py | 65bd53aba0bb44a886e5ed534ec574b1d9fdc902 | [] | no_license | chishui/HackerRankAlgorithmsChallenge | 7458f6553f52846b9de5b68c0f692f72be13dfa8 | 611096a0c362675ce68598065ea3fe0abbbe5b99 | refs/heads/master | 2020-12-24T13:35:43.829308 | 2014-09-02T10:36:57 | 2014-09-02T10:36:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 311 | py | #https://www.hackerrank.com/challenges/countingsort3
N = input()
li = [int(raw_input().strip().split()[0]) for i in range(0, N)]
li.sort()
last = -1
index = 0
out = []
for i in range(0, 100):
while index < len(li) and i >= li[index] :
index = index + 1
out.append(index)
print ' '.join(map(str, out))
| [
"[email protected]"
] | |
79e89da491df1b01cf2db1375aa85bf04472dfce | f29a31354a66798e2c398fc2a01bc285b6e35dfb | /NeuralNetworks/l-IntroToNeuralNetworks/Perceptrons.py | 8b97e96224a7febd95bb5ca02c32f3a2c2cb5e9d | [] | no_license | ajpiter/UdacityDeepLearning | 2fd8b6ba7f29aa03ab9dfdd557dbdcc692e7ada0 | eb343a8be223f4bcc15a87483f7945023c2c9a0e | refs/heads/master | 2021-01-02T09:00:34.221125 | 2017-08-28T16:32:45 | 2017-08-28T16:32:45 | 99,121,250 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,764 | py | #Perceptrons
#Also known as neurons
#Inputs
#Weights
#Start out as random values, then as the neural network learns more about the input data and results the network adjusts the weights
#The process of adjusting the weights is called training the neural network
#The higher the weight the more important it is in ... | [
"[email protected]"
] | |
72655e0d239fb7752d956948112e58f2ba5f52b8 | 3637fe729395dac153f7abc3024dcc69e17f4e81 | /reference/ucmdb/discovery/os_platform_discoverer.py | 02d93f540190842835fd968afa055cc09e7172c3 | [] | no_license | madmonkyang/cda-record | daced6846c2456f20dddce7f9720602d1583a02a | c431e809e8d0f82e1bca7e3429dd0245560b5680 | refs/heads/master | 2023-06-15T08:16:46.230569 | 2021-07-15T16:27:36 | 2021-07-15T16:27:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,272 | py | # coding=utf-8
'''
Created on Dec 27, 2013
@author: ekondrashev
'''
import logger
import entity
import command
import flow
import post_import_hooks
import service_loader
from service_loader import load_service_providers_by_file_pattern
class Platform(entity.Immutable):
def __init__(self, name):
self.name... | [
"[email protected]"
] | |
27fac4f1aaf8414c571f63b38f3416535871b864 | e7fcc1d64cd95805918ab1b5786bf81a92f973ef | /2020/day06/test_day06.py | dcfa4fa5d4d7f186a72866d92f905fc5c31bff00 | [] | no_license | trolen/advent-of-code | 8145c1e36fea04e53d4b7a885efcc2da71fbfe57 | 0a4e022a6a810d86e044a15036a2f5778f0d38af | refs/heads/master | 2023-02-26T13:11:58.341006 | 2023-02-20T23:22:27 | 2023-02-20T23:22:27 | 54,579,550 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 881 | py | #! /usr/bin/env python3
import unittest
import day06
class TestDay06(unittest.TestCase):
def setUp(self):
self.raw_data = [
'abc',
'',
'a',
'b',
'c',
'',
'ab',
'ac',
'',
'a',
... | [
"[email protected]"
] | |
cdb896df7dafbf9b574f7853ffe03b2a0ab849e0 | 5c4cc78698a8cdadb10c45799a67c95ca17a4d5a | /custom_components/usage.py | f93d2655364330efe4fac2599f2b0bc5244848ee | [] | no_license | gitumarkk/dash-custom-components-blog | fb044f14735d686bbf0c3e07b863c0eb39830c6b | 3a94e3fd7e3047eb082be901f2c2962b42b27964 | refs/heads/main | 2023-05-31T06:40:33.337975 | 2021-06-11T06:22:31 | 2021-06-11T06:22:31 | 375,925,178 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 524 | py | import custom_components
import dash
from dash.dependencies import Input, Output
import dash_html_components as html
app = dash.Dash(__name__)
app.layout = html.Div([
custom_components.MyCustomComponent(
id='input',
value='my-value',
label='my-label'
),
html.Div(id='output')
])
@... | [
"[email protected]"
] | |
191db6f8ca5bb50f81b0a602940e6003d3f27b1b | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/4/usersdata/112/1803/submittedfiles/swamee.py | 0993e51e919e7a77d0aa3da61db48e12e1ca660d | [] | no_license | rafaelperazzo/programacao-web | 95643423a35c44613b0f64bed05bd34780fe2436 | 170dd5440afb9ee68a973f3de13a99aa4c735d79 | refs/heads/master | 2021-01-12T14:06:25.773146 | 2017-12-22T16:05:45 | 2017-12-22T16:05:45 | 69,566,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 448 | py | # -*- coding: utf-8 -*-
from __future__ import division
import math
f= input('Digite o valor de f:')
L= input('Digite o valor de L:')
Q= input('Digite o valor de Q:')
DeltaH= input('Digite o valor de Delta H')
v= input('Digite o valor de v')
g= 9.81
e= 0.000002
D= ((8*f*L*Q)*(2/5))/((math.pi)**2(g*DeltaH))
Rey= (4*Q)... | [
"[email protected]"
] | |
cc86bef58c7d155debfcde3377df2e4dbe6dfa6d | bf32d19e5cf9650099d4f3a05f24ad3f5d0332a3 | /datagen.py | 0b65a8b378b3d8b516ff0d137a9bda72e359cbef | [] | no_license | DableUTeeF/dictionaries | 5d01b7936ff567c6ca6aac45394370a8168ad816 | c529727325232291a4103d4b1bc72c888cec05f1 | refs/heads/master | 2023-04-11T05:46:31.548797 | 2021-04-22T06:06:55 | 2021-04-22T06:06:55 | 343,296,934 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 22,290 | py | from torch.utils.data import Dataset
from torchtext.vocab import Vocab, Counter
import torch
from nltk.corpus import wordnet as wn, stopwords
from torch.nn.utils.rnn import pad_sequence
from torch.utils.data.sampler import SubsetRandomSampler
import numpy as np
import pandas as pd
import re
from transformers import Aut... | [
"[email protected]"
] | |
b31b2e1e03da902449ac1d6c84e33183f1d07823 | 7e372094fde657891fdfad0e1fe2f3d9693bdf64 | /instapi/exceptions.py | 097eba4057636202fd4eb326edc7e7e743aaa204 | [
"MIT"
] | permissive | uriyyo/instapi | b92c95a8adc2cdb73fc563649d3d14752c1e42c4 | f15b45727a08fd9b203c71b2a8c9d103478a50dc | refs/heads/develop | 2023-06-30T17:46:25.307092 | 2023-06-26T08:43:57 | 2023-06-26T08:43:57 | 203,244,044 | 37 | 4 | MIT | 2023-09-08T03:08:27 | 2019-08-19T20:17:36 | Python | UTF-8 | Python | false | false | 100 | py | class ClientNotInitedException(Exception):
pass
__all__ = [
"ClientNotInitedException",
]
| [
"[email protected]"
] | |
312460ac8bca6af84350206ee751570d59d027a3 | 1a639d185f9c883b7bebf33c577c58b22ac93c7e | /graphics/moving_pan.py | 37ad05954d8428b128a6f418e6a6d7232f4c8994 | [] | no_license | gofr1/python-learning | bd09da5b5850b1533a88b858690ed4380b55d33e | 19343c985f368770dc01ce415506506d62a23285 | refs/heads/master | 2023-09-02T15:42:27.442735 | 2021-11-12T10:17:13 | 2021-11-12T10:17:13 | 237,828,887 | 0 | 0 | null | 2021-11-12T10:17:14 | 2020-02-02T20:03:42 | Python | UTF-8 | Python | false | false | 767 | py | from superwires import games
path_to_images = '../../Pictures/img/'
games.init(screen_width = 640, screen_height = 480, fps = 50)
class Pan(games.Sprite):
'''Pan moving with mouse'''
def update(self):
'''Move object to mouse position'''
self.x = games.mouse.x
self.y = games.mouse.y
... | [
"[email protected]"
] | |
930727de4fc9a819568fa813409d808229907aeb | 3da246077831519b40aa45ce6bb6ac63fc1a17fe | /models/regularizers.py | e6a7729c1644ee207936c4e77bc1e6134614ea4c | [] | no_license | jamesoneill12/SupervisedMetaEmbedding | b4d9728ce501e4661f1d9f9191affb7dbe8daab3 | 9d379d7bb9049e475bffb78f2e1df2d0ed72684d | refs/heads/master | 2022-11-12T23:28:17.058219 | 2020-07-04T00:47:18 | 2020-07-04T00:47:18 | 277,012,140 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,967 | py | import torch
from torch.nn import Parameter
import torch.nn as nn
from torch.autograd import Variable
import numpy as np
"""module, weights, dropout=0, variational=False"""
def dropconnect(module, weights, p=None, dim=None, method='standard'):
"""module, weights, dropout=0, variational=False"""
if method ==... | [
"[email protected]"
] | |
f7d11bab716283917a00ac4cf88bbe0e1409eb96 | 1818aaf61380ed516097cb40ab378d36e3c1a06a | /tests/unit/validate/example_templates/component/unnamed/a.py | 9c803aa2b037621b19d514b789ef78274e3bddc3 | [
"Apache-2.0"
] | permissive | JackBurdick/crummycm | a4504ba3efd42e4d93c62120ad4fece89c6b3ae2 | ffa9dad9b5c4c061d3767d700e90d5e34f92eac8 | refs/heads/main | 2023-01-18T20:07:24.102504 | 2020-11-25T00:56:57 | 2020-11-25T00:56:57 | 304,761,597 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,462 | py | from crummycm.validation.types.placeholders.placeholder import KeyPlaceholder
from crummycm.validation.types.dicts.foundation.unnamed_dict import UnnamedDict
from crummycm.validation.types.values.element.numeric import Numeric
from crummycm.validation.types.values.element.text import Text
# from crummycm.validation.ty... | [
"[email protected]"
] | |
87610080866d9cad3191923528acbeeed82d6233 | 547548a6ae8db52b1b183d6f3ba3ad63f4247962 | /train/gen/kl/paths.py | 5bc1abac26c206f66572dc7988a9abdd8620b8c0 | [
"MIT"
] | permissive | jeffkrupa/SubtLeNet | 21870c8cc88080c101edffb414832d863c299455 | e0e74b7a0a1c76fd6d6e21c80ce57302a2cd6b6f | refs/heads/master | 2022-06-25T16:33:36.427635 | 2022-06-10T16:15:53 | 2022-06-10T16:15:53 | 187,670,116 | 0 | 2 | MIT | 2019-08-02T20:26:20 | 2019-05-20T15:44:13 | Python | UTF-8 | Python | false | false | 288 | py | #basedir = '/fastscratch/snarayan/genarrays/v_deepgen_3/'
#figsdir = '/home/snarayan/public_html/figs/deepgen/v3/'
basedir = '/data/t3serv014/snarayan/deep//v_deepgen_4_small/'
figsdir = '/home/snarayan/public_html/figs/deepgen/v4_kl/'
from os import system
system('mkdir -p '+figsdir)
| [
"[email protected]"
] | |
81a9468e822101750e73217c4b2e6d17f02e75b2 | 7a3fc3ea3dd71e4ec85ac73e0af57ae976777513 | /.history/flaskblog_20210524215327.py | 3dc704c3d526e4ab9cbfa1dbab452f4fb649c5bb | [] | no_license | khanhdk0000/first_proj | 72e9d2bbd788d6f52bff8dc5375ca7f75c0f9dd0 | bec0525353f98c65c3943b6d42727e3248ecfe22 | refs/heads/main | 2023-05-12T10:36:08.026143 | 2021-06-05T15:35:22 | 2021-06-05T15:35:22 | 374,148,728 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 285 | py | from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
@app.route('/home')
def hello_world():
return render_template('home.html')
@app.route('/about')
def about():
return render_template('home.html')
if __name__ == '__main__':
app.run(debug=True) | [
"[email protected]"
] | |
40801f7d40c23e8ef9fd71aef06229192814b53d | 738b6d6ec4572f5848940b6adc58907a03bda6fb | /tests/pymcell4_positive/3000_reports_check/model.py | 03fdbc184e2cc0fea4c8bae504524b1bb53ba093 | [
"MIT",
"Unlicense",
"LicenseRef-scancode-public-domain"
] | permissive | mcellteam/mcell_tests | 09cd1010a356e0e07c88d7e044a73c5606c6e51a | 34d2d967b75d56edbae999bf0090641850f4f4fe | refs/heads/master | 2021-12-24T02:36:24.987085 | 2021-09-24T14:19:41 | 2021-09-24T14:19:41 | 174,733,926 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,470 | py | #!/usr/bin/env python3
import sys
import os
MCELL_PATH = os.environ.get('MCELL_PATH', '')
if MCELL_PATH:
sys.path.append(os.path.join(MCELL_PATH, 'lib'))
else:
print("Error: variable MCELL_PATH that is used to find the mcell library was not set.")
sys.exit(1)
import mcell as m
params = m.bngl_utils.load... | [
"[email protected]"
] | |
6cb5a5e75a9c8324286d70e2893b91e427710002 | 60cbdf1f9771159f872e632017fa736800784297 | /Codewars/Find-the-odd-int.py | c1567718b97f70ca035fd5cb5332e8b15ddf1595 | [] | no_license | AG-Systems/programming-problems | 6ea8c109f04c4d22db6e63fe7b665894c786242a | 39b2d3546d62b48388788e36316224e15a52d656 | refs/heads/master | 2023-04-16T16:59:20.595993 | 2023-04-05T01:25:23 | 2023-04-05T01:25:23 | 77,095,208 | 10 | 3 | null | 2019-10-14T16:16:18 | 2016-12-22T00:03:14 | Python | UTF-8 | Python | false | false | 355 | py | def find_it(seq):
hashtable = {}
for x in seq:
if x in hashtable:
hashtable[x] += 1
else:
hashtable[x] = 1
for key,val in hashtable.items():
if val % 2 != 0:
return key
"""
def find_it(seq):
for i in seq:
if seq.count(i)%2!=0:
... | [
"[email protected]"
] | |
c41845008487c6093767f0afb04faa5273492412 | 2729fff7cb053d2577985d38c8962043ee9f853d | /bokeh/sampledata/tests/test_perceptions.py | fd7da155b0a33f279e0b263f36c4dea9d66e1929 | [
"BSD-3-Clause"
] | permissive | modster/bokeh | 2c78c5051fa9cac48c8c2ae7345eafc54b426fbd | 60fce9003aaa618751c9b8a3133c95688073ea0b | refs/heads/master | 2020-03-29T01:13:35.740491 | 2018-09-18T06:08:59 | 2018-09-18T06:08:59 | 149,377,781 | 1 | 0 | BSD-3-Clause | 2018-09-19T02:02:49 | 2018-09-19T02:02:49 | null | UTF-8 | Python | false | false | 2,212 | py | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2017, Anaconda, Inc. All rights reserved.
#
# Powered by the Bokeh Development Team.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#---------------------------------------------------... | [
"[email protected]"
] | |
e55a27dca2368a2b46c0c89ab0d91c9214f68154 | 9f2f386a692a6ddeb7670812d1395a0b0009dad9 | /python/paddle/fluid/tests/unittests/ipu/test_print_op_ipu.py | 3189e060d58373250ba776271009bcab004e762b | [
"Apache-2.0"
] | permissive | sandyhouse/Paddle | 2f866bf1993a036564986e5140e69e77674b8ff5 | 86e0b07fe7ee6442ccda0aa234bd690a3be2cffa | refs/heads/develop | 2023-08-16T22:59:28.165742 | 2022-06-03T05:23:39 | 2022-06-03T05:23:39 | 181,423,712 | 0 | 7 | Apache-2.0 | 2022-08-15T08:46:04 | 2019-04-15T06:15:22 | C++ | UTF-8 | Python | false | false | 3,306 | 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... | [
"[email protected]"
] | |
847583d24105d7141eccf2797b87b466cbd57b01 | 99f43f4591f63d0c57cd07f07af28c0b554b8e90 | /python/프로그래머스/직사각형만들기.py | 16bef1835142eb60413503e1b66a432aafa71fc8 | [] | no_license | SINHOLEE/Algorithm | 049fa139f89234dd626348c753d97484fab811a7 | 5f39d45e215c079862871636d8e0306d6c304f7e | refs/heads/master | 2023-04-13T18:55:11.499413 | 2023-04-10T06:21:29 | 2023-04-10T06:21:29 | 199,813,684 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 543 | py | def solution(v):
v = sorted(v)
x_dic = {}
y_dic = {}
for x, y in v:
if x_dic.get(x) is None:
x_dic[x] = 1
else:
x_dic[x] += 1
if y_dic.get(y) is None:
y_dic[y] = 1
else:
y_dic[y] += 1
answer = []
for x, cnt in x_dic... | [
"[email protected]"
] | |
325e307598c52d6975a86c8edc8054b6e0fe4a67 | ded10c2f2f5f91c44ec950237a59225e8486abd8 | /.history/2/matrix_squaring_20200423012150.py | d1a2e804abef8dfd13862f5b3c728acfea003b0a | [] | 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 | 35,543 | py | # -*- coding: utf-8 -*-
from __future__ import division
import os
import numpy as np
import matplotlib.pyplot as plt
from time import time
import pandas as pd
# Author: Juan Esteban Aristizabal-Zuluaga
# date: 20200414
def rho_free(x,xp,beta):
"""Uso: devuelve elemento de matriz dsnsidad para el caso de una p... | [
"[email protected]"
] | |
d7fae122e7f8a84921a3b1fe45c07f443c21ff43 | 89b2f5b08c441d4af0a63ed2ec1a5889bc92f0f7 | /NI_DJANGO_PROJECTS/urls_and_templates/second__app/urls.py | cfec6a5b99b358adb0edc6eaa0de920d58001cc6 | [] | no_license | KoliosterNikolayIliev/Softuni_education | 68d7ded9564861f2bbf1bef0dab9ba4a788aa8dd | 18f1572d81ad9eb7edd04300deb8c81bde05d76b | refs/heads/master | 2023-07-18T09:29:36.139360 | 2021-08-27T15:04:38 | 2021-08-27T15:04:38 | 291,744,823 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 105 | py | from django.urls import path
from second__app import views
urlpatterns = [
path('', views.index)
]
| [
"[email protected]"
] | |
099107a1fc7a937fe06c9e7494308aa4d7f2223e | 26d030d1a8134f1900d11054dc63c674dc2beec8 | /main.py | 0895f7c340f491aad10624532b6215a61944c9a2 | [
"MIT"
] | permissive | kendricktan/pychip8 | 1ea1259abb61485c0db9bd26dda0201c2369452d | c9eb4f950f4546dbad0ca84f1c393d822a925a10 | refs/heads/master | 2021-04-27T15:44:17.064807 | 2018-02-23T14:28:13 | 2018-02-23T14:28:13 | 122,475,722 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 133 | py | from pychip8.emulator import Chip8
if __name__ == '__main__':
rom_name = 'pong.rom'
chip8 = Chip8(rom_name)
chip8.run() | [
"[email protected]"
] | |
4589205cd366b6f298b02d86f9c43531f17d96f3 | 5d61acc1f9595047861f76b916cd28a167496f9e | /Configuration/GenProduction/python/ThirteenTeV/GMSB/GMSB_L500TeV_Ctau1200cm_Pythia8_13TeV_cff.py | 4c40005548ada354e0fd1851954fd8435b425dbe | [
"Apache-2.0"
] | permissive | zhangzc11/cms-gmsb-sps8-configs | 1bbd3cf2a45ee187f3e41ff51c409976fd59f586 | 838e6aac1d13251e050c0ee8c4ed26ca0c6cef7e | refs/heads/master | 2020-06-24T05:28:46.872990 | 2019-09-24T20:05:33 | 2019-09-24T20:05:33 | 198,862,590 | 0 | 0 | Apache-2.0 | 2019-07-25T16:03:09 | 2019-07-25T16:03:08 | null | UTF-8 | Python | false | false | 59,260 | py |
SLHA_TABLE = '''
# ISAJET SUSY parameters in SUSY Les Houches Accord 2 format
# Created by ISALHA 2.0 Last revision: H Baer 27 May 2014
Block SPINFO # Program information
1 ISASUGRA/ISASUSY from ISAJET # Spectrum Calculator
2 7.88 02-JAN-2018 11:01:14 # Version number
Block MODSEL # Model se... | [
"[email protected]"
] | |
28bf6dde8bb5f2f4f836584daa7697bbbb60659a | 5679731cee36c537615d285ed72810f4c6b17380 | /492_ConstructTheRectangle.py | 864fd723b3b57af7cb42b67c170b150f6a55bac9 | [] | no_license | manofmountain/LeetCode | 6b76105190a9b62df65a7b56b6def4120498b9fa | 718f688b3d316e8c10ef680d9c21ecd518d062f8 | refs/heads/master | 2021-01-12T03:41:48.318116 | 2017-07-18T12:35:58 | 2017-07-18T12:35:58 | 78,252,164 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 412 | py | import math
class Solution(object):
def constructRectangle(self, area):
"""
:type area: int
:rtype: List[int]
"""
width, res = int(math.sqrt(area)), list()
while width != 0:
if area % width == 0:
res.append(area / width)
... | [
"[email protected]"
] | |
0a2e966187b89beb9f8331300b18f5e41d660407 | 69c882c678103b182988fb60d3e898d569980f1c | /Day 6/day6prog14.py | 6b4f901785e52ff819f090084f7e227d01a62b68 | [] | no_license | gittygupta/stcet-python | 44be9d91cdd6215879d9f04497214819228821be | e77456172746ee76b6e2a901ddb0c3dbe457f82a | refs/heads/master | 2022-03-05T11:37:08.720226 | 2019-12-01T00:56:03 | 2019-12-01T00:56:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 202 | py | def fact(x):
pro = 1
for i in range(1, x+1):
pro *= i
return pro
def perm(n, r):
return (fact(n)/(fact(n - r) * fact(r)))
n = input("n = ")
r = input("r = ")
print(perm(n, r))
| [
"[email protected]"
] | |
eb5d7aba99ce10ed488f5be198476d799554acb2 | f4434c85e3814b6347f8f8099c081ed4af5678a5 | /sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/aio/operations/_private_link_resources_operations.py | 95f8c439d59dff4da2f06f3595ae038121fa0f85 | [
"LicenseRef-scancode-generic-cla",
"MIT",
"LGPL-2.1-or-later"
] | permissive | yunhaoling/azure-sdk-for-python | 5da12a174a37672ac6ed8e3c1f863cb77010a506 | c4eb0ca1aadb76ad892114230473034830116362 | refs/heads/master | 2022-06-11T01:17:39.636461 | 2020-12-08T17:42:08 | 2020-12-08T17:42:08 | 177,675,796 | 1 | 0 | MIT | 2020-03-31T20:35:17 | 2019-03-25T22:43:40 | Python | UTF-8 | Python | false | false | 8,751 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | [
"[email protected]"
] | |
931e52355a9877de357fa0e0b6a602e2de02d64e | 5a52ccea88f90dd4f1acc2819997fce0dd5ffb7d | /alipay/aop/api/response/AlipayBossFncInvoiceBatchqueryResponse.py | cfe0f6e638e1c8ae763e1e65af4347042e876024 | [
"Apache-2.0"
] | permissive | alipay/alipay-sdk-python-all | 8bd20882852ffeb70a6e929038bf88ff1d1eff1c | 1fad300587c9e7e099747305ba9077d4cd7afde9 | refs/heads/master | 2023-08-27T21:35:01.778771 | 2023-08-23T07:12:26 | 2023-08-23T07:12:26 | 133,338,689 | 247 | 70 | Apache-2.0 | 2023-04-25T04:54:02 | 2018-05-14T09:40:54 | Python | UTF-8 | Python | false | false | 2,739 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
from alipay.aop.api.domain.MultiCurrencyMoneyOpenApi import MultiCurrencyMoneyOpenApi
from alipay.aop.api.domain.ArInvoiceOpenApiResponse import ArInvoiceOpenApiResponse
class AlipayBossFncInvo... | [
"[email protected]"
] | |
1e47736427d5b29ddbed8c696b895ae76e78410d | 5da5473ff3026165a47f98744bac82903cf008e0 | /packages/google-cloud-vm-migration/samples/generated_samples/vmmigration_v1_generated_vm_migration_finalize_migration_async.py | 9725b31782e691f5713fa20467e00eb66fe54fa1 | [
"Apache-2.0"
] | permissive | googleapis/google-cloud-python | ed61a5f03a476ab6053870f4da7bc5534e25558b | 93c4e63408c65129422f65217325f4e7d41f7edf | refs/heads/main | 2023-09-04T09:09:07.852632 | 2023-08-31T22:49:26 | 2023-08-31T22:49:26 | 16,316,451 | 2,792 | 917 | Apache-2.0 | 2023-09-14T21:45:18 | 2014-01-28T15:51:47 | Python | UTF-8 | Python | false | false | 1,993 | py | # -*- coding: utf-8 -*-
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | [
"[email protected]"
] | |
c586bd5693c7518eb1d938ce2ad960a01f98d250 | f95e73867e4383784d6fdd6a1c9fe06cffbfd019 | /ProjectEuler/p004_Largest_palindrome_product.py | 5d8c9510aee2afac0a0864fbbfc27608ef991779 | [] | no_license | linxiaohui/CodeLibrary | da03a9ed631d1d44b098ae393b4bd9e378ab38d3 | 96a5d22a8c442c4aec8a064ce383aba8a7559b2c | refs/heads/master | 2021-01-18T03:42:39.536939 | 2018-12-11T06:47:15 | 2018-12-11T06:47:15 | 85,795,767 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 342 | py | #!/usr/bin/env python
# -*- coding:utf-8 -*-
import timeit
def PE004():
M=0
for i in range(100,10000):
for j in range(i+1,1000):
k=i*j
#if k==int(str(k)[::-1]) and k>M :
if k>M and k==int(str(k)[::-1]) :
M=k
print M
print timeit.tim... | [
"[email protected]"
] | |
6e3669121fdd67488f4e7ec58aa121cf467f15dc | f8ffac4fa0dbe27316fa443a16df8a3f1f5cff05 | /Regex/Matching_Anything_But_New_Line.py | 9d1b4802c8910f717e3f7aafecd4dfcb1cc4b4c3 | [] | no_license | ankitniranjan/HackerrankSolutions | e27073f9837787a8af7a0157d95612028c07c974 | e110c72d3b137cf4c5cef6e91f58a17452c54c08 | refs/heads/master | 2023-03-16T19:06:17.805307 | 2021-03-09T16:28:39 | 2021-03-09T16:28:39 | 292,994,949 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 411 | py | # Your task is to write a regular expression that matches only and exactly strings of form: abc.def.ghi.jkx, where each variable a,b,c,d,e,f,g,h,i,j,k,x can be
# any single character except the newline.
regex_pattern = r"^.{3}\..{3}\..{3}\..{3}$" # Do not delete 'r'.
import re
import sys
test_string = in... | [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.