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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b5bfc185e3c0e76fb33a254d444155ab0931f2c8 | f723b36a64d7c5ccd2a4937d02f05279fc9e907c | /calls/urls.py | 48317b35fa4b2d6bacf2ee72c3c3734774b5c08e | [] | no_license | DmitrySham/grand-django-site | 92259098d209954ee5f5c994989f6c1f7c9826f4 | e65988c441e9fb37fd15126d28301c47643b501d | refs/heads/master | 2023-01-22T08:37:08.921212 | 2023-01-13T15:05:30 | 2023-01-13T15:05:30 | 184,014,992 | 0 | 0 | null | 2022-12-04T20:45:03 | 2019-04-29T06:44:37 | JavaScript | UTF-8 | Python | false | false | 145 | py | from django.urls import path
from calls import views
urlpatterns = [
path('ajax/call/request/', views.call_request, name='calls_request')
]
| [
"[email protected]"
] | |
86b082d38e2f308f0a9eb3f9b74eb82523828273 | b478d1e63cce432b6fd3692c0aa7a84f411ae9dc | /meta_py3/main.py | b2fcdb9da12e44315b927e032eb6c0442104b5d4 | [] | no_license | yiqing95/py_study | 8d414aa00b4ac31070fe5667a98815980eee46d0 | 6ce6b46ad729a795bc9253d6339169e62ef47766 | refs/heads/master | 2016-09-06T17:45:26.081269 | 2015-01-12T15:22:29 | 2015-01-12T15:22:29 | 20,810,777 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 198 | py | from meta_py3 import example2
__author__ = 'yiqing'
from meta_py3.example import *
from meta_py3.helper import printHr
p = Point(3,4)
print(p.x)
printHr()
obj = example2.MyClass(3)
print(obj.x)
| [
"[email protected]"
] | |
17e37b200e4daabdb7bde731b5f7ece860ff30f5 | 9f440599da392a55d7d5b2b7ce571bc3f2dc881e | /rhea/cores/usbext/fpgalink/__init__.py | 40502351eaf29688fab9e182e67fd1cd214d5167 | [
"MIT"
] | permissive | zignig/rhea | 713559f688f85e1304ab43c2b871553da3bf01ae | e0d04ff4fcbd57dfeb6f84fa8f87d6b03caee590 | refs/heads/master | 2020-04-06T06:53:33.541215 | 2016-03-15T12:45:23 | 2016-03-15T12:45:23 | 53,943,632 | 1 | 0 | null | 2016-03-15T12:42:06 | 2016-03-15T12:42:06 | null | UTF-8 | Python | false | false | 196 | py |
from __future__ import absolute_import
from . import _fpgalink_fx2 as fpgalink
from ._fpgalink_fx2 import get_interfaces
from ._fpgalink_fx2 import fpgalink_fx2
from ._fl_convert import convert
| [
"[email protected]"
] | |
64abbd79020cfe186e38c100a66432f254b6f63c | 835e428d1cbe87adf945897ff75f77e93b500d12 | /demonstrations/tutorial_qnn_module_torch.py | b8b5b8ea0148840cf4f468e8203d1730eb4e4f74 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | quantshah/qml | 9acb3c932610e30a28369fe72ee49683ac301219 | 45533ef6f6d7b9cfa0384302fe52b5ead772b923 | refs/heads/master | 2022-11-30T08:26:12.972709 | 2022-11-18T19:59:59 | 2022-11-18T19:59:59 | 218,805,085 | 0 | 0 | Apache-2.0 | 2019-10-31T16:02:07 | 2019-10-31T16:02:06 | null | UTF-8 | Python | false | false | 11,188 | py | """
Turning quantum nodes into Torch Layers
=======================================
.. meta::
:property="og:description": Learn how to create hybrid ML models in PennyLane using Torch
:property="og:image": https://pennylane.ai/qml/_images/PyTorch_icon.png
.. related::
tutorial_qnn_module_tf Turning quantu... | [
"[email protected]"
] | |
92103249322b421545629318572a095a6464b746 | 46bd3e3ba590785cbffed5f044e69f1f9bafbce5 | /env/lib/python3.8/site-packages/supervisor/tests/test_dispatchers.py | 3f88376a16df1a07247d1fe031d2147a0cb4d10c | [] | no_license | adamkluk/casper-getstarted | a6a6263f1547354de0e49ba2f1d57049a5fdec2b | 01e846621b33f54ed3ec9b369e9de3872a97780d | refs/heads/master | 2023-08-13T11:04:05.778228 | 2021-09-19T22:56:59 | 2021-09-19T22:56:59 | 408,036,193 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 130 | py | version https://git-lfs.github.com/spec/v1
oid sha256:b2039ef9d32ffde70df065c6a333cb150fa31e79786df3f98287dc41938ad1e1
size 53720
| [
"[email protected]"
] | |
7401b94189214c99484961a6a267429cd5e290fb | 19f27f432b968521c7bee497a96f2b01963da293 | /manage.py | 0ff8346ecebe236c0d31d614ad2ceeab700db026 | [] | no_license | ethanlee6/myw | eae3eb751f4b06e06ce1dd2a21adf9272f1bf72f | 74c60ebea5519c18d7495c2ee8064b4a576b9b89 | refs/heads/master | 2021-01-24T18:39:43.481407 | 2017-03-15T12:15:01 | 2017-03-15T12:15:01 | 84,459,667 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 775 | py | import os
from flask.ext.script import Manager, Server
from flask.ext.script.commands import ShowUrls
from flask.ext.migrate import Migrate, MigrateCommand
from webapp import create_app
from webapp.models import db, User, Post, Tag, Comment
# default to dev config
env = os.environ.get('WEBAPP_ENV', 'dev')
app = crea... | [
"[email protected]"
] | |
bb4411845beac8ed6a855d3894786bb21f41fa05 | 5179b07b8d1a31df18612ce55d35c56b851cead8 | /tools/train.py | b0290aace7813a3edf21acd4895698b235e05300 | [
"Apache-2.0"
] | permissive | hamidehkerdegari/VFS | 3e9c427c4a8ae0a6b66a3a1378bac5c6f9daaf51 | 8e055cc191578706f05b7484facf44be6fb1525a | refs/heads/master | 2023-08-24T09:40:46.678233 | 2021-09-26T18:24:38 | 2021-09-26T18:24:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,658 | py | import argparse
import copy
import os
import os.path as osp
import time
import warnings
import mmcv
import torch
from mmcv import Config, DictAction
from mmcv.runner import init_dist, set_random_seed
from mmaction import __version__
from mmaction.apis import train_model
from mmaction.datasets import build_dataset
fro... | [
"[email protected]"
] | |
8a73c785a44ece6263c3e40dfde840832bed6655 | 65c03709b91ce8f006641b30d481b4fda651520e | /Coding/3_indexing_slicing.py | a52c46b665b5ac657b828965eb9a307d71a3bd84 | [] | no_license | ahad-emu/python-code | 332121ad289b169ca8099c88bde13d7121be1030 | 135805c78de38eaf1bd5500b44625b36b7b653c0 | refs/heads/master | 2020-09-09T01:01:41.313964 | 2020-07-04T16:31:37 | 2020-07-04T16:31:37 | 221,296,928 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 502 | py | #indexing....
my_string = "hello World"
print(my_string)
print(my_string[0]) #index zero
print(my_string[7]) #index seven
print(my_string[8]) #index eight
print(my_string[-1]) #last index
print(my_string[-2]) #second last index
#slicing....
my_string = "ABCDEFGHIJKL"
print(my_string)
print(my_strin... | [
"[email protected]"
] | |
d1194035877ccf46cd000542fa0cb83f128378d8 | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2847/60900/255175.py | 9f7f8927fa27a8621f5be9e8716e364de835126c | [] | 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 | 192 | py | n = input()
str1 = input()
nums = str1.split(" ")
str2 = input()
nums2 = str2.split(" ")
count = 0
for i in range(int(nums2[0]),int(nums2[1])):
count = count + int(nums[i-1])
print(count) | [
"[email protected]"
] | |
fbf24e42c6d7e8f22c1daee7c96ee466bdb31af8 | 7dc05dc9ba548cc97ebe96ed1f0dab8dfe8d8b81 | /branches/0.4/pida/core/application.py | 94dcd60a715f1aa4cab7fa59b29e7d1b46b9eb49 | [] | no_license | BackupTheBerlios/pida-svn | b68da6689fa482a42f5dee93e2bcffb167a83b83 | 739147ed21a23cab23c2bba98f1c54108f8c2516 | refs/heads/master | 2020-05-31T17:28:47.927074 | 2006-05-18T21:42:32 | 2006-05-18T21:42:32 | 40,817,392 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,003 | py | # -*- coding: utf-8 -*-
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
#Copyright (c) 2005 Ali Afshar [email protected]
#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 restr... | [
"aafshar@ef0b12da-61f9-0310-ba38-b2629ec279a7"
] | aafshar@ef0b12da-61f9-0310-ba38-b2629ec279a7 |
cc8f3b6012f30c1bdad4f411f454e6e816b04bde | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02549/s176160941.py | bdc2e8e51f883ca3eca69259dc2774ce9724f789 | [] | 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 | 491 | py | N, K = map(int, input().split())
L = [0] * K
R = [0] * K
for i in range(0, K):
L[i], R[i] = map(int, input().split())
moves = [0] * N
moves[0] = 1
rui_wa = [0] * N
rui_wa[0] = 1
for i in range(1, N):
for j in range(0, K):
l = max(i - L[j], 0)
r = max(i - R[j], 0)
if i - L[j] < 0:
... | [
"[email protected]"
] | |
5de0b81f7eb9ffcb6f37c172ee267011003055f3 | 8a03b8459902d1bf0806f8d3387fb962bb57cf58 | /User_create/Negative_changepwd.py | b654fadc05e357cbb963c843646791c0392766c4 | [] | no_license | chetandg123/cQube | f95a0e86b1e98cb418de209ad26ae2ba463cfcbc | a862a1cdf46faaaff5cad49d78c4e5f0454a6407 | refs/heads/master | 2022-07-18T12:43:06.839896 | 2020-05-22T13:23:52 | 2020-05-22T13:23:52 | 258,089,042 | 0 | 0 | null | 2020-05-08T16:28:26 | 2020-04-23T03:55:52 | HTML | UTF-8 | Python | false | false | 1,828 | py | import time
import unittest
from selenium import webdriver
from Data.Paramters import Data
class Click_ChangePwd(unittest.TestCase):
def setUp(self):
self.driver = webdriver.Chrome(Data.Path)
self.driver.maximize_window()
self.driver.implicitly_wait(10)
self.driver.get(Data.URL)
... | [
"[email protected]"
] | |
7229a9c285b03df22f176624c5e0f5b54b27a88d | a2fab78b021469748337bdbe46d60f4b2dccf6b9 | /day04/03.字符串的遍历.py | c5d627376bea9ed9bd537324019d43ced7a0f603 | [] | no_license | yywecanwin/PythonLearning | 06175886b42f6ec6be5ee8fa379365779e8e14e6 | f59d381692f22b3c7cf605aec88500f6c0267ffc | refs/heads/master | 2020-08-01T13:03:17.458829 | 2020-02-11T02:53:33 | 2020-02-11T02:53:33 | 211,006,180 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 628 | py | # -*- coding: utf-8 -*-
# author:yaoyao time:2019/9/28
"""
字符串的遍历:
一个一个的得到里面的元素
"""
s = "hello python"
"""
# 遍历的方式1:
# 1.定义一个变量i 表示元素的索引,赋值为0,因为元素的索引是从0开始的
i = 0
# 2.while循环遍历字符串
while i <= len(s)-1:
#3.在循环中, 根据索引得到元素, 把元素打印出来
print(s[i])
# 4.在循环中,让i加1,是为了让索引加1,便于下次循环时得到下一个元素
i += 1
"""
"""
for 变量... | [
"[email protected]"
] | |
e03b7ef67849e583abb795e43e173297706316ff | 798960eb97cd1d46a2837f81fb69d123c05f1164 | /symphony/cli/pyworkforce/graphql/input/check_list_category.py | 8ab69aef97666923166c55f03daa8d9166c133bc | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | kyaaqba/magma | 36d5fa00ce4f827e6ca5ebd82d97a3d36e5f5b5b | fdb7be22a2076f9a9b158c9670a9af6cad68b85f | refs/heads/master | 2023-01-27T12:04:52.393286 | 2020-08-20T20:23:50 | 2020-08-20T20:23:50 | 289,102,268 | 0 | 0 | NOASSERTION | 2020-08-20T20:18:42 | 2020-08-20T20:18:41 | null | UTF-8 | Python | false | false | 590 | py | #!/usr/bin/env python3
# @generated AUTOGENERATED file. Do not Change!
from dataclasses import dataclass
from datetime import datetime
from functools import partial
from gql.gql.datetime_utils import DATETIME_FIELD
from numbers import Number
from typing import Any, Callable, List, Mapping, Optional
from dataclasses_j... | [
"[email protected]"
] | |
6a51492ded638f3df2d2790b30ce3d10c9e269b9 | 5eddc2a278cb8f54da00db186c784e03a7b3011f | /csaapi/apps/farm_site/services.py | 5fa5b1565b3fc591b00038169efacb6de7334198 | [] | no_license | quinceleaf/csa-member-management | 350a48262cead1f03199c5c021a958fb410a791b | 8df57aa190935e79916b64d2a3de9e4e6c2d357d | refs/heads/main | 2023-06-18T11:10:47.633613 | 2021-07-20T03:47:55 | 2021-07-20T03:47:55 | 387,568,813 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 88 | py |
def create_subscription(*, )
pass
# fan out payments
# fan out deliveries | [
"[email protected]"
] | |
9ac78261b3e0bfe904692b30ec71925efb1b2fd5 | e203ddace08580170e3b4de9c79588209e857c1c | /books.py | 23233198dc918f7183dbddd721d36fc2b0141ebf | [] | no_license | stradtkt/OOPTreehouse-Python | e17f3fd48840049b8b741aa0e30e54d1409804b2 | 84e0ef2142118bf44c416a3b1dde3519ff57fd15 | refs/heads/main | 2023-02-26T15:03:27.053205 | 2021-02-04T13:04:26 | 2021-02-04T13:04:26 | 334,620,181 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 457 | py | class Book:
def __init__(self, title, author):
self.title = title
self.author = author
def __str__(self):
return '{}: {}'.format(self.title, self.author)
class Bookcase:
def __init__(self, books=None):
self.books = books
@classmethod
def create_bookcase(cls, book_... | [
"[email protected]"
] | |
24ee0c3b5ba31c62359bb82634292671f9df0b24 | e6b4b9dcca11d6a8abd110cd681b2712f9843030 | /src/env/dm_control/dm_control/composer/observation/observable/base_test.py | 0f519c2ba2e7da274db7fe54fd6ede820fd6dc34 | [
"MIT",
"Apache-2.0"
] | permissive | nicklashansen/svea-vit | a1b1d74fba88aaa94c876d354e7d6ed60cd3f064 | 33d3ea2682409ee82bf9c5129ceaf06ab01cd48e | refs/heads/main | 2023-07-21T18:35:08.439052 | 2023-07-11T20:09:50 | 2023-07-11T20:09:50 | 379,015,671 | 16 | 3 | MIT | 2023-07-11T20:09:52 | 2021-06-21T17:43:32 | Python | UTF-8 | Python | false | false | 5,914 | py | # Copyright 2018 The dm_control Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | [
"[email protected]"
] | |
a48262df7b31b657505b623ed8035c6792e85210 | c0ffc02a5c72bea9a86d15e4a1ff01a7b67b6858 | /2nd11.py | 6c0435486d72ef0e986b5f69acf172236e6c785b | [] | no_license | db2398/2nd | 6f39d05a0b3f9f2aba050f35f9a9e83ba7e1511f | 404942c046ab894df1b52016ac7d4d49651f8295 | refs/heads/master | 2020-06-11T16:53:30.291296 | 2019-07-01T09:13:00 | 2019-07-01T09:13:00 | 194,029,475 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 55 | py | c,d=map(int,input().split())
result=c**d
print(result)
| [
"[email protected]"
] | |
d2dc956bbc48eb170fbbda451cf3630d7b8168b1 | 5545d3c3e910ccb5b45b2277a71ad3c3ea3caedc | /jamenson/runtime/Attic/runtime.py | 85f8fe28ad0310322de14198533d79ebdb9fe6a4 | [
"Apache-2.0"
] | permissive | matthagy/Jamenson | 61de19c71da6e133bf7d8efbb933a1036cf1e6f5 | 18a0fdd60b3d56ed4a6d4e792132535324490634 | refs/heads/master | 2016-09-11T04:31:28.895242 | 2013-04-04T00:14:44 | 2013-04-04T00:14:44 | 1,781,863 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,969 | py |
'''objects used by runtime
'''
from itertools import count
import string
class symbol(object):
#instance cache for `is based comparisions and `id based hashing
_cache = {}
__slots__ = ['printForm']
@classmethod
def raw(cls, printForm):
self = object.__new__(cls)
self.printForm ... | [
"[email protected]"
] | |
042e1d38d801465d0ca7ae7a6feda110a7e5825c | 5cea76d53779d466f19a5cf0b51e003586cc4a7b | /python开发技术详解/源文件/02/2.4/2.4.1/number_type.py | 12972ea330682a3ae610b87a14be45e5770f2447 | [] | no_license | evan886/python | 40152fdb4885876189580141abe27a983d04e04d | d33e996e93275f6b347ecc2d30f8efe05accd10c | refs/heads/master | 2021-06-28T12:35:10.793186 | 2021-05-26T14:33:40 | 2021-05-26T14:33:40 | 85,560,342 | 2 | 1 | null | 2017-10-11T05:31:06 | 2017-03-20T09:51:50 | JavaScript | GB18030 | Python | false | false | 326 | py | #!/usr/bin/python
# -*- coding: UTF-8 -*-
# 下面的两个i并不是同一个对象
i = 1
print id(i)
i = 2
print id(i)
# 整型
i = 1
print type(i)
# 长整型
l = 9999999990
print type(l)
# 浮点型
f = 1.2
print type(f)
# 布尔型
b = True
print type(b)
# 复数类型
c = 7 + 8j
print type(c)
| [
"[email protected]"
] | |
f04777412a8523157317d3eac4f93709fc5b3593 | 1da23d3bc4a7e21d81fe26c6b9f2b7f50711239b | /server/rating/calculation/online.py | 54cb691486cf77569c23edf725df62292f77533f | [
"MIT"
] | permissive | eIGato/mahjong-portal | 42dc62d3f98656ba15c02c3060f351f03ac3304a | 550a2a872c4287adab6ce30c3440dc2141430a20 | refs/heads/master | 2021-07-10T01:52:35.089662 | 2020-10-21T11:45:40 | 2020-10-21T11:45:40 | 212,129,601 | 0 | 0 | MIT | 2019-10-01T15:19:36 | 2019-10-01T15:19:36 | null | UTF-8 | Python | false | false | 573 | py | from player.models import Player
from rating.calculation.rr import RatingRRCalculation
from tournament.models import Tournament, TournamentResult
class RatingOnlineCalculation(RatingRRCalculation):
TOURNAMENT_TYPES = [Tournament.ONLINE]
SECOND_PART_MIN_TOURNAMENTS = 3
def get_players(self):
play... | [
"[email protected]"
] | |
766acc5663cd498b1b0e9bc3c0a1d75f176b8b8b | 83003007b7bc12493e2bca2b5c78be5ea86df56c | /Day56-Day70/Day60/rabbit.py | df44054acbf7a81a072a6cb377f8dbb2ea4dd6e6 | [] | no_license | a6361117/code | fa7fe2f33c522ad38d92e6c429b50ef8a271bb1e | bd8bf877416acc5400dbda90212b7e83020ff643 | refs/heads/master | 2022-09-07T22:22:24.765271 | 2020-05-26T14:27:47 | 2020-05-26T14:27:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,264 | py |
#绘制兔
from turtle import *
speed(10)
#兔的面部
color('pink')
pensize(5)
circle(radius=100)#脸
#眼睛
pencolor('black')
#左眼
pu()
goto(-45,92)
pd()
begin_fill()
color((0,0,0),(0,0,0.1))
circle(radius=15)
#右眼
pu()
goto(45,92)
pd()
circle(radius=15)
end_fill()
#鼻子
pu()
goto(20,60)
color('pink')
pd()
begin_fill()
goto(-20,60... | [
"[email protected]"
] | |
fc3617765023ab1000296d388685479f6ba1ca6f | 743d1918178e08d4557abed3a375c583130a0e06 | /src/CPSCAnalysis/getCPSCRelated.py | e63093d367e5958dd952311a6b852f55229f43a2 | [] | no_license | aquablue1/dns_probe | 2a027c04e0928ec818a82c5bf04f485a883cfcb3 | edd4dff9bea04092ac76c17c6e77fab63f9f188f | refs/heads/master | 2020-03-25T19:40:07.346354 | 2018-11-17T05:31:43 | 2018-11-17T05:31:43 | 144,094,014 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,508 | py | """
" Get the original CPSC related DNS traffic from original data files.
" Since CPSC DNS (ns1/2.cpsc.ucalgary.ca) mostly involved in the inbound traffic.
" Therefore only the inbound traffic is considered.
" By Zhengping on 2018-08-10
"""
from src.util.FolderReader import folderReader
from src.util.FileReader import... | [
"[email protected]"
] | |
c15ff70830104dc267e24f059b88cd1002f1879d | ecae7275fd43ec93ca5771083e05ae864685faf9 | /DataScience/pandas/2column1.py | eb1bc2f91c3de96c00fb9272b9179e11d6d5d730 | [] | no_license | shamoldas/pythonBasic | 104ca8d50099c2f511802db1f161f6d050f879cc | 3a7252a15f6d829f55700ec2ff7f7d153f3ec663 | refs/heads/main | 2023-01-09T06:38:55.357476 | 2020-11-11T12:27:31 | 2020-11-11T12:27:31 | 311,960,017 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 314 | py |
# importing pandas
import pandas as pd
df = pd.DataFrame({'Last': ['Gaitonde', 'Singh', 'Mathur'],
'First': ['Ganesh', 'Sartaj', 'Anjali']})
print('Before Join')
print(df, '\n')
print('After join')
df['Name'] = df['First'].str.cat(df['Last'], sep =" ")
print(df)
| [
"[email protected]"
] | |
a0ba64b046817c1d4b87a37d70ac854c54c543fe | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_192/ch160_2020_06_19_20_23_54_764349.py | e8c31d19b6bb9456664ada3169ee602ac3e1ff52 | [] | 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 | 218 | py | import math
x = 0
for x in range(0, 90):
python = math.sin(x)
bhaskara = (4*x*(180 - x))/(40500 - x*(180 - x))
modulo = bhaskara - python
if python != bhaskara:
print(max(abs(modulo))
| [
"[email protected]"
] | |
ce01006fc28f38174aeae02dffe49f0214c5ae14 | 9554891e5e91fa9d7f75df0f28ae1d220c552478 | /tests/settings.py | 0bfc93f139030f93750f7d8315cca6601c124b85 | [
"MIT"
] | permissive | kmmbvnr/django-polymodels | 2e79cd72c68935a7e83953e0864ced1cb4a530c5 | 7a9b64b1851fea23a64d3d9421a69911e1669a49 | refs/heads/master | 2022-06-21T04:27:15.836175 | 2020-05-07T03:12:18 | 2020-05-07T10:36:06 | 261,932,926 | 1 | 0 | MIT | 2020-05-07T02:44:49 | 2020-05-07T02:44:48 | null | UTF-8 | Python | false | false | 245 | py | from __future__ import unicode_literals
SECRET_KEY = 'not-anymore'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
},
}
INSTALLED_APPS = [
'django.contrib.contenttypes',
'polymodels',
'tests',
]
| [
"[email protected]"
] | |
2958f0f909860b6534a0178f12383d7da22b1669 | 4bd4bacecee33cada173e427b5ecb1d758bafaad | /src/scalarizr/externals/chef/auth.py | ceb60cae41ffdfa7437210aa80b15e234cc31fef | [] | no_license | kenorb-contrib/scalarizr | 3f2492b20910c42f6ab38749545fdbb79969473f | 3cc8b64d5a1b39c4cf36f5057f1a6a84a9a74c83 | refs/heads/master | 2022-11-26T10:00:58.706301 | 2017-11-02T16:41:34 | 2017-11-02T16:41:34 | 108,550,233 | 0 | 2 | null | 2020-07-24T11:05:36 | 2017-10-27T13:33:46 | Python | UTF-8 | Python | false | false | 2,435 | py | from __future__ import with_statement
import base64
import datetime
import hashlib
import re
def _ruby_b64encode(value):
"""The Ruby function Base64.encode64 automatically breaks things up
into 60-character chunks.
"""
b64 = base64.b64encode(value)
for i in xrange(0, len(b64), 60):
yield b6... | [
"[email protected]"
] | |
33a33cfd3f32dd9321b486aeb4d948593d5c76b2 | b15178f2ec828894c3b2d31b3ff6164be37ab875 | /setup.py | a511bad7d960a83c9af9d54df61c11eb837181ee | [
"CC0-1.0",
"LicenseRef-scancode-public-domain"
] | permissive | biomodels/BIOMD0000000007 | 08e9de5d8d6745cde85d337c385e0f41f53906d3 | 1c03559e6e807621fa757386ea03dfae2c0ca312 | refs/heads/master | 2021-01-25T06:05:51.198922 | 2014-10-16T05:13:44 | 2014-10-16T05:13:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 377 | py | from setuptools import setup, find_packages
setup(name='BIOMD0000000007',
version=20140916,
description='BIOMD0000000007 from BioModels',
url='http://www.ebi.ac.uk/biomodels-main/BIOMD0000000007',
maintainer='Stanley Gu',
maintainer_url='[email protected]',
packages=find_packages(... | [
"[email protected]"
] | |
d827e99e9bfe24739b29b9efd7b67641f05c3576 | ff3e0d75fda9a1a94fd8ba7618c0aab499b8393d | /musicians/migrations/0004_auto_20200813_0055.py | 255088a50889f0134f21340a8b9558fc20ab73a7 | [
"MIT"
] | permissive | victorsemenov1980/DjangoFullStack | bbe2897c20633b3eba8db807442eb0921668e6f1 | 655a3a9980057913c1aeeb1cd54683ccf12ad901 | refs/heads/master | 2023-04-05T23:34:13.836215 | 2021-04-22T18:08:51 | 2021-04-22T18:08:51 | 289,705,449 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,423 | py | # Generated by Django 3.1 on 2020-08-13 00:55
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('musicians', '0003_info'),
]
operations = [
migrations.RemoveField(
model_name='service',
name='Featured',
),
... | [
"[email protected]"
] | |
0ab52593e61a8c030d9e303a4c84011ce9f94f21 | 75e24fc71cf0833bb6040fa5037a0523c67d4581 | /nlplingo/active_learning/metrics.py | 5c880ba632dbf6cfbae101db65920c9732147a90 | [
"Apache-2.0"
] | permissive | BBN-E/nlplingo | 53d5ff2aa17d03a1c6db8afc8ed2b0cf683b1c55 | 32ff17b1320937faa3d3ebe727032f4b3e7a353d | refs/heads/main | 2022-12-19T19:28:11.666850 | 2020-10-09T01:16:32 | 2020-10-09T01:16:32 | 302,090,268 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 467 | py | import numpy as np
def best_vs_second_best(predictions):
"""Computes best vs second best metric
:type predictions: numpy.nparray
:rtype: numpy.nparray
"""
pred_sorted_arg = np.argsort(-predictions, axis=1)
best_vs_second_best_score = 1 - abs(
predictions[range(predictions.shape... | [
"[email protected]"
] | |
a2ae33df39f4c18bf1122e51783c1b3641f8a71b | 0a004fc3fe8e36fd7ce0ed2cc7e8140982315e03 | /unsupervised_learning/0x00-dimensionality_reduction/0-pca.py | 96f2f628a740e86a328e4e2a17f3fdae39d1650a | [] | no_license | pafuentess/holbertonschool-machine_learning | 266ed4f05e106e194cdafe39544e48904f6538f4 | 3bffd1391b3fc790f0137d0afbe90eb8e2f7d713 | refs/heads/master | 2023-03-26T15:12:14.721409 | 2021-03-20T20:28:15 | 2021-03-20T20:28:15 | 279,388,813 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 284 | py | #!/usr/bin/env python3
""" doc """
import numpy as np
def pca(X, var=0.95):
""" doc """
U, sigma, V = np.linalg.svd(X)
a_sum = np.cumsum(sigma)
dim = [i for i in range(len(sigma)) if((a_sum[i]) / a_sum[-1]) >= var]
ndim = dim[0] + 1
return V.T[:, :ndim]
| [
"[email protected]"
] | |
6c13a2bb9c012badbf065b7117c98cf2344d8b14 | f7f834e68ce816011ae30be0883deef090fbeeed | /camp/Z_Template_2018/Day 5 - Space Invaders/space_invaders.py | be8cc7bd451a55706eed78c51f0099e5ac7b5db7 | [] | no_license | Rosebotics/PythonGameDesign2019 | 97b568cf999dea8642e254a22e528539946118e3 | 2f03476df940257adc2928f0c985c01daa5166f4 | refs/heads/master | 2020-06-04T04:42:35.656392 | 2019-06-22T16:21:57 | 2019-06-22T16:21:57 | 191,875,778 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,301 | py | import pygame, sys, random, time
from pygame.locals import *
class Missile:
def __init__(self, screen, x):
# TODO: Save the screen into a field
# TODO: Save the x into a field
# TODO: Set the y to 591 as a field (which is just above the fighter)
# TODO: Set a field called exploded ... | [
"[email protected]"
] | |
7c7ec50d29b03c3642ab2ceba8b96c4be5487afb | 669e9241b02bdaa303fbc2fd4023b90d4d179a59 | /Basketball Scoreboard/challenge1.py | 72070c13f348ee839784ae72678555d7d2e7e973 | [] | no_license | benjaminpotter/HatchProjects | 0854cf46ae7c3781468116a5d63b703dd54ae68c | 7f6a948d3474c755d071751b725c059e6c7f3553 | refs/heads/master | 2022-01-28T16:58:03.449073 | 2019-08-16T13:47:30 | 2019-08-16T13:47:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 997 | py | def setup():
size(400, 400)
threePoint = 0
fieldGoal = 0
freeThrow = 0
def drawScoreboard():
global threePoint, fieldGoal, freeThrow
background(0, 0, 0)
noFill()
stroke(255, 0, 0)
rect(30, 337, 110, 34)
rect(155, 337, 110, 34)
rect(278, 337, 116, 34)
fill(255)
textSize(22)
... | [
"[email protected]"
] | |
08b01af01392cb5b5e0ab0605c707494fea4e10e | 05c9f1af21a698e09f7ec37a075624250e907262 | /samples/cloud_loadbalancers/session_persistence.py | 65361528513dff78dabf813b885ccaf5a90b79a5 | [
"Apache-2.0"
] | permissive | pycontribs/pyrax | 5f5a1d6816f5a831b1ae4b74ffaf438a1c0269a6 | 2397136b75e6fcc906ee406e9c1bc7aaef94387a | refs/heads/master | 2023-08-28T16:43:21.037208 | 2022-09-21T15:14:38 | 2022-09-21T15:14:38 | 5,975,139 | 10 | 27 | Apache-2.0 | 2021-07-12T21:23:11 | 2012-09-27T01:05:57 | Python | UTF-8 | Python | false | false | 1,492 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c)2012 Rackspace US, 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.ap... | [
"[email protected]"
] | |
67e621ecfca50542026a0bc3eba12f59122ad3b5 | efd3564def48ae6e5fff6068da21fc61f88486ee | /iam/models.py | fe44011c6227b49f36f6ae826fa39489099e4904 | [
"MIT"
] | permissive | druuu/IAM-Manager | 0c4e4f75879d44f4519e3c4655778f532e4455cb | 5ed542ed52ff6e18ea70122510fc9d5e6998159d | refs/heads/master | 2021-01-16T19:18:10.412258 | 2016-05-12T10:02:14 | 2016-05-12T10:02:14 | 58,738,368 | 0 | 0 | null | 2016-05-13T12:29:36 | 2016-05-13T12:29:36 | null | UTF-8 | Python | false | false | 115 | py | from __future__ import unicode_literals
from django.db import models
from django.contrib.auth.models import User
| [
"[email protected]"
] | |
7ff4f342c296f14581f59bf952c57db0709b0254 | 0cc4eb3cb54f8394c127ace62d3108fdb5230c85 | /.spack-env/view/lib/python3.7/site-packages/jedi/third_party/typeshed/third_party/2and3/Crypto/PublicKey/__init__.pyi | 26410a457f1a06184022094247938b2894f9cbe2 | [] | no_license | jacobmerson/spack-develop-env | 5b2d76f58c0b64ae97c64f77a3c4d33a770c71c8 | 5fca20ca343b1a76f05fc635c87f94ed25417d94 | refs/heads/master | 2022-07-04T02:22:50.264727 | 2020-05-06T05:13:50 | 2020-05-06T05:13:50 | 261,657,112 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 213 | pyi | /lore/mersoj/spack/spack/opt/spack/linux-rhel7-x86_64/gcc-7.3.0/py-jedi-0.17.0-zugnvpgjfmuk5x4rfhhxlsknl2g226yt/lib/python3.7/site-packages/jedi/third_party/typeshed/third_party/2and3/Crypto/PublicKey/__init__.pyi | [
"[email protected]"
] | |
570cc838272c8d6af88062cc6f7e249fd0b36979 | ea57ef44636ce151b3ef5322466cdfcb02482515 | /pendulum/constants.py | abc6ec06eacd7553dcf6ee58a8d094672a79966c | [
"MIT"
] | permissive | Sn3akyP3t3/pendulum | acb3dc5067576c4569a08b1d8a8ecfce918b4724 | 7ce170bdc64199d74e09e347402983f1bb015f63 | refs/heads/master | 2020-03-22T01:15:01.160870 | 2018-07-01T15:49:09 | 2018-07-01T15:49:09 | 139,292,657 | 0 | 0 | MIT | 2018-07-01T01:46:00 | 2018-07-01T01:46:00 | null | UTF-8 | Python | false | false | 2,836 | py | # The day constants
SUNDAY = 0
MONDAY = 1
TUESDAY = 2
WEDNESDAY = 3
THURSDAY = 4
FRIDAY = 5
SATURDAY = 6
# Number of X in Y.
YEARS_PER_CENTURY = 100
YEARS_PER_DECADE = 10
MONTHS_PER_YEAR = 12
WEEKS_PER_YEAR = 52
DAYS_PER_WEEK = 7
HOURS_PER_DAY = 24
MINUTES_PER_HOUR = 60
SECONDS_PER_MINUTE = 60
SECONDS_PER_HOUR = MINUT... | [
"[email protected]"
] | |
1e1d7ca3bfe15837aaed003514b62088a040f6d2 | 868ac4e558cf5fe945e8b557564f34f79b3ad01e | /purity_fb/purity_fb_1dot11/models/snmp_agent_response.py | 3eb0a329ee36e940b618e7040ff1ee601a4825ff | [
"Apache-2.0"
] | permissive | mabdelhafez/purity_fb_python_client | f4253ce8497fb3cff648e0a0cd1e567f48129fa7 | a9856875b3df43b4302a2e4addd1a6b71f51f5ce | refs/heads/master | 2022-04-20T09:24:22.031408 | 2020-04-20T22:11:32 | 2020-04-20T22:15:44 | 257,372,596 | 0 | 0 | NOASSERTION | 2020-04-20T18:40:24 | 2020-04-20T18:40:23 | null | UTF-8 | Python | false | false | 4,171 | py | # coding: utf-8
"""
Pure Storage FlashBlade REST 1.11 Python SDK
Pure Storage FlashBlade REST 1.11 Python SDK, developed by [Pure Storage, Inc](http://www.purestorage.com/). Documentations can be found at [purity-fb.readthedocs.io](http://purity-fb.readthedocs.io/).
OpenAPI spec version: 1.11
Contact... | [
"[email protected]"
] | |
52890da7dbeb50e2962006085b369e2b130e3485 | f5ffd566166948c4202eb1e66bef44cf55a70033 | /test/test_array_of_role_no_i_ds.py | ce70095d1ed2d0425958c0329fc4b10467e24d33 | [] | no_license | skyportal/skyportal_client | ed025ac6d23589238a9c133d712d4f113bbcb1c9 | 15514e4dfb16313e442d06f69f8477b4f0757eaa | refs/heads/master | 2023-02-10T02:54:20.757570 | 2021-01-05T02:18:03 | 2021-01-05T02:18:03 | 326,860,562 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,321 | py | """
Fritz: SkyPortal API
SkyPortal provides an API to access most of its underlying functionality. To use it, you will need an API token. This can be generated via the web application from your profile page or, if you are an admin, you may use the system provisioned token stored inside of `.tokens.yaml`. ### ... | [
"[email protected]"
] | |
293ff497bc9c02162313472b028ec2ddb6e186bc | dd7dc458691dcff1b2493c927acd62695c2187c4 | /lib/python2.7/site-packages/envisage/ui/workbench/workbench_plugin.py | 224c2068f00fc03f60552f917b2f9ce3c91fd991 | [] | no_license | stephenosullivan/science | 16e0c7fb441af29810cad630e6187961ad57398e | 164e82df0655337ac4966273d9cc489d002d8987 | refs/heads/master | 2021-03-27T09:52:05.330679 | 2015-07-25T04:51:25 | 2015-07-25T04:51:25 | 39,672,995 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,048 | py | """ The Envisage workbench plugin. """
# Enthought library imports.
from envisage.api import ExtensionPoint, Plugin, ServiceOffer
from traits.api import Callable, List
# This module's package.
PKG = '.'.join(__name__.split('.')[:-1])
class WorkbenchPlugin(Plugin):
""" The Envisage workbench plugin.
The w... | [
"[email protected]"
] | |
e15921c3602f09639e1a75b780376560ca94e509 | 0dc816af0b9feecc4ba672eca979654caa0c91bc | /main/ordinance/views.py | a7404d9f30bb4aefab716237a5b288cab1a41885 | [] | no_license | Stelmaszv/remote-learning | b57589ed5bde8387c0d114951b13ad37ebf80f68 | ae567c473e50826edb98a4b434e63cc446be0852 | refs/heads/master | 2022-11-25T17:08:15.658486 | 2020-08-07T14:43:59 | 2020-08-07T14:43:59 | 256,490,629 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,921 | py | from core.baseview import baseCreate,baseListView,baseShowView,baseUpdateView;
from core.decorators import login_required,login_manager,login_educator
from authorization.forms import educator,manager
from .forms import Lesson as LessonForm,TasksSolution,TasksSetRote,AccountForm,DashbordForm
from .models import Lesson,T... | [
"[email protected]"
] | |
995f17f49f0cc20090ed4da3fc31fdabd4c2e5df | 6a61ef12621c8a917d160db62415487fe2c469f7 | /aliyun-python-sdk-outboundbot/aliyunsdkoutboundbot/request/v20191226/DeleteJobGroupRequest.py | 6edfb7caf350c296ba47360d1600bde52a8e0e09 | [
"Apache-2.0"
] | permissive | zhangwp-cn/aliyun-openapi-python-sdk | f0b15369665a956490534c942676ed15410196f7 | a560e38f97351db05d13f0588f7bdfb4292ed3ae | refs/heads/master | 2022-09-08T13:31:26.842867 | 2020-06-04T03:23:30 | 2020-06-04T03:23:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,607 | 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... | [
"[email protected]"
] | |
b1c06b4f2309fc8aaaf3b6ce7edbcf6c31ace1aa | e456ec1f174091a1024dd0ebd7c8f011b3399367 | /Test.py | 0045530c15143de17da121041d45b4836a662166 | [] | no_license | Gummy27/Forritun | 414e98c0020bdf71a8c2a9b3757ece19c0d01172 | 6a312db6e5a451fac1e6830d7e249663739f15f2 | refs/heads/master | 2023-02-15T03:01:00.307741 | 2021-01-07T11:01:37 | 2021-01-07T11:01:37 | 177,342,511 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 57 | py | s1 = "1"
s2 = "2"
print(f'Hérna kemur númerið 1: {1}') | [
"[email protected]"
] | |
0b4681cbbbd15b1ae82f979dfb0855a484f541fc | 8e3b452b08139f25be824fae2b8b7aabb158d888 | /6.00.1.x/Week3/Lecture5/lectureCode_Lec5-towers.py | 13861370c38b6bf6a8bbf93b0af680633678f9d6 | [] | no_license | prasannabe2004/MITx | d38a11e38a0abb73ffa37dccb363f779011155ab | 1954b5fc31004c94f46fc8194b7fa773108c4493 | refs/heads/master | 2020-05-16T19:14:00.963550 | 2015-08-07T18:50:12 | 2015-08-07T18:50:12 | 25,537,861 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 285 | py | def printMove(fr, to):
print('move from ' + str(fr) + ' to ' + str(to))
def Towers(n, fr, to, spare):
if n == 1:
printMove(fr, to)
else:
Towers(n-1, fr, spare, to)
Towers(1, fr, to, spare)
Towers(n-1, spare, to, fr)
Towers(5, 'f','t','s') | [
"[email protected]"
] | |
2e9e653a3ba5f6b2d39e8bc2a9b81531627f0d53 | be5c86e8fe3f5836b7d2097dd5272c72b5b28f15 | /binary-search/Python/0069-sqrtx(调试代码).py | 34fb4dc1e8fd789b231dfc3dc042a189448bc516 | [
"Apache-2.0"
] | permissive | lemonnader/LeetCode-Solution-Well-Formed | d24674898ceb5441c036016dc30afc58e4a1247a | baabdb1990fd49ab82a712e121f49c4f68b29459 | refs/heads/master | 2021-04-23T18:49:40.337569 | 2020-03-24T04:50:27 | 2020-03-24T04:50:27 | 249,972,064 | 1 | 0 | Apache-2.0 | 2020-03-25T12:26:25 | 2020-03-25T12:26:24 | null | UTF-8 | Python | false | false | 1,303 | py | class Solution:
def mySqrt(self, x: int) -> int:
if x == 0:
return 0
left = 1
right = x // 2
while left < right:
# 调试代码开始:为了仔细观察区间左右端点,我们每进入一次循环,让线程休眠 1 秒
import time
time.sleep(1)
print('调试代码,观察区间左右端点、中位数,和进入的分支: left = {}... | [
"[email protected]"
] | |
21e37b4f7a6e38423629ff7f88949c775997a74a | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02536/s375378291.py | 93ecd40e03e6ad422973faf79ca95508b26c6569 | [] | 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 | 1,207 | py | import sys
sys.setrecursionlimit(10 ** 9)
class UnionFind():
def __init__(self, n):
self.n = n
self.root = [-1]*(n+1)
self.rank = [0]*(n+1)
def find(self, x):#親となる要素を探索
if self.root[x] < 0:
return x
else:
self.root[x] = self.find(self.root[x])#再帰... | [
"[email protected]"
] | |
e1508f8201b4113f896bf0ace8208bf541a2431b | de4d88db6ea32d20020c169f734edd4b95c3092d | /aiotdlib/api/types/sponsored_message.py | d0baa01e34edffdfdd0b1242e871c3ddd8921c86 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | thiagosm/aiotdlib | 5cc790a5645f7e4cc61bbd0791433ed182d69062 | 4528fcfca7c5c69b54a878ce6ce60e934a2dcc73 | refs/heads/main | 2023-08-15T05:16:28.436803 | 2021-10-18T20:41:27 | 2021-10-18T20:41:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,493 | py | # =============================================================================== #
# #
# This file has been generated automatically!! Do not change this manually! #
# ... | [
"[email protected]"
] | |
58735fe65a67b7f724a8be2f26ad1e17b44edd41 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03285/s132035467.py | cb2b23dc5e61a4328b3cff2153a67f2c568cb830 | [] | 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 | 118 | py | n=int(input())
for i in range(n):
for j in range(n):
if i*4+j*7==n:
print('Yes')
exit()
print('No') | [
"[email protected]"
] | |
af66f3e9667cc2d7a9aca8543be26bbdbeffb849 | af9c0aafa10b7901533de0b32177ab80b4782d3f | /notes/code/youtube/comments_one_video.py | 0ae8f2715bd2cd2765d7e2162e6561247db18f41 | [
"MIT"
] | permissive | Akramz/msds692 | d1d33298b7599950e95838c0fc9ddbd47a98ed5b | 42f4c2a0dc7569152bac2439e9b6385f2f101f7b | refs/heads/master | 2023-01-25T00:44:11.197544 | 2020-12-05T22:05:14 | 2020-12-05T22:05:14 | 319,362,758 | 1 | 0 | MIT | 2020-12-07T15:31:12 | 2020-12-07T15:31:11 | null | UTF-8 | Python | false | false | 708 | py | import sys
from googleapiclient.discovery import build
DEVELOPER_KEY = sys.argv[1]
YOUTUBE_API_SERVICE_NAME = "youtube"
YOUTUBE_API_VERSION = "v3"
video_id = "gU_gYzwTbYQ" # bonkers the cat
# code from https://developers.google.com/youtube/v3/docs/comments/list
youtube = build(YOUTUBE_API_SERVICE_NAME, YOUTUBE_API_... | [
"[email protected]"
] | |
1b14e0893000f94e90a7478eb66d700400cb0141 | 7882860350c714e6c08368288dab721288b8d9db | /1일차/if(8번문제).py | 9db67865be7d0871db81bafb600eeaa1d088a3f2 | [] | no_license | park-seonju/Algorithm | 682fca984813a54b92a3f2ab174e4f05a95921a8 | 30e5bcb756e9388693624e8880e57bc92bfda969 | refs/heads/master | 2023-08-11T18:23:49.644259 | 2021-09-27T10:07:49 | 2021-09-27T10:07:49 | 388,741,922 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 192 | py | result=[]
for i in range(100,301):
a=int(i/100) # int로 해야함
b=int(i/10)
if(a % 2 == 0 and b % 2 == 0 and i % 2 == 0):
result.append(str(i))
print(",".join(result))
| [
"[email protected]"
] | |
76283425866e43198277a6f4f43dcc74ae590214 | e1009433697344f0ce6ec953f086be698fa4e6c4 | /parsmodel.py | 10d1dbeb9a2e033a4397f7c7bf345fec03e56af2 | [] | no_license | bladas/online-store | 7e848bad1137cf7886cec6bf7563867e5f8f5e36 | 6fd68e0d1318b796b05a94fa5547d5e87a2b0172 | refs/heads/master | 2023-05-02T07:11:55.614313 | 2020-01-06T14:20:19 | 2020-01-06T14:20:19 | 216,340,778 | 0 | 0 | null | 2023-04-21T20:38:49 | 2019-10-20T10:00:46 | Python | UTF-8 | Python | false | false | 2,339 | py | import json
from home.models import Category, UnderCategory, Product
def create(json, Category, UnderCategory, Product):
with open('citrus.json', 'r') as json_file:
data = json.load(json_file)
for elem in data:
print(elem.get('name'))
print(elem.get('category'))
... | [
"[email protected]"
] | |
56d37d047190975695cb0168c225c11656be6066 | d94b6845aeeb412aac6850b70e22628bc84d1d6d | /routing_transformer/routing_tf_api.py | ddc35172d2adda48e5cb8cb0ef32aaa4146d4629 | [
"CC-BY-4.0",
"Apache-2.0"
] | permissive | ishine/google-research | 541aea114a68ced68736340e037fc0f8257d1ea2 | c1ae273841592fce4c993bf35cdd0a6424e73da4 | refs/heads/master | 2023-06-08T23:02:25.502203 | 2023-05-31T01:00:56 | 2023-05-31T01:06:45 | 242,478,569 | 0 | 0 | Apache-2.0 | 2020-06-23T01:55:11 | 2020-02-23T07:59:42 | Jupyter Notebook | UTF-8 | Python | false | false | 7,727 | py | # coding=utf-8
# Copyright 2023 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | [
"[email protected]"
] | |
8365348c8c8d72df578af246b3fea656a5feed86 | 727f1bc2205c88577b419cf0036c029b8c6f7766 | /out-bin/py/google/fhir/labels/bundle_to_label.runfiles/com_google_fhir/external/pypi__apache_beam_2_9_0/apache_beam/runners/direct/bundle_factory.py | 032aadc4fe49359d4995e2916d7a25262bdded85 | [
"Apache-2.0"
] | permissive | rasalt/fhir | 55cf78feed3596a3101b86f9e9bbf6652c6ed4ad | d49883cc4d4986e11ca66058d5a327691e6e048a | refs/heads/master | 2020-04-13T00:16:54.050913 | 2019-01-15T14:22:15 | 2019-01-15T14:22:15 | 160,260,223 | 0 | 0 | Apache-2.0 | 2018-12-03T22:07:01 | 2018-12-03T22:07:01 | null | UTF-8 | Python | false | false | 154 | py | /home/rkharwar/.cache/bazel/_bazel_rkharwar/c4bcd65252c8f8250f091ba96375f9a5/external/pypi__apache_beam_2_9_0/apache_beam/runners/direct/bundle_factory.py | [
"[email protected]"
] | |
f951e1cff4773f3d7bbafa8a8da8f51e39292a6b | 6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4 | /cyzbSvpfSzDjGi4TB_6.py | 3dc41e9ce3d55a84ccef17f3ab0f837b05e5f6c6 | [] | no_license | daniel-reich/ubiquitous-fiesta | 26e80f0082f8589e51d359ce7953117a3da7d38c | 9af2700dbe59284f5697e612491499841a6c126f | refs/heads/master | 2023-04-05T06:40:37.328213 | 2021-04-06T20:17:44 | 2021-04-06T20:17:44 | 355,318,759 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 74 | py |
def harmonic(n):
return round(sum([1/x for x in range(1, n+1)] ), 3 )
| [
"[email protected]"
] | |
d01c60729dde3704ca76f6163bb970a349a73025 | 2ee66e6485f0c68adb6367b3697c4a3cb32c9b7e | /tests/test_mpi.py | b945048d2f32120065d20655192115c3e52a001e | [
"MIT"
] | permissive | yuriyi/devito | 8836f741b360946ce2b439b88b78bf267279e90b | d0a29b3ad3653c20f88b35c2780471cef107b7a2 | refs/heads/master | 2020-04-01T05:49:17.221770 | 2018-10-13T18:34:46 | 2018-10-13T18:34:46 | 152,920,977 | 0 | 0 | MIT | 2018-10-13T22:52:12 | 2018-10-13T22:52:12 | null | UTF-8 | Python | false | false | 38,484 | py | import numpy as np
import pytest
from conftest import skipif_yask
from devito import (Grid, Constant, Function, TimeFunction, SparseFunction,
SparseTimeFunction, Dimension, ConditionalDimension,
SubDimension, Eq, Inc, Operator)
from devito.ir.iet import Call, Conditional, FindN... | [
"[email protected]"
] | |
6ecd7aef7feeaf0c0a1b5b863f5a9956e43c4838 | 99094cc79bdbb69bb24516e473f17b385847cb3a | /58.Length of Last Word/Solution.py | 6a986db084927025fd5e816d63158989ce2edd7a | [] | no_license | simonxu14/LeetCode_Simon | 7d389bbfafd3906876a3f796195bb14db3a1aeb3 | 13f4595374f30b482c4da76e466037516ca3a420 | refs/heads/master | 2020-04-06T03:33:25.846686 | 2016-09-10T00:23:11 | 2016-09-10T00:23:11 | 40,810,940 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 248 | py | __author__ = 'Simon'
class Solution(object):
def lengthOfLastWord(self, s):
"""
:type s: str
:rtype: int
"""
li = s.split()
if li:
return len(li[-1])
else:
return 0 | [
"[email protected]"
] | |
ff44601100038aba800c66cb8d18e73458d7b4df | bdf86d69efc1c5b21950c316ddd078ad8a2f2ec0 | /venv/Lib/site-packages/twisted/application/runner/_runner.py | 66f1f11ee0f27fe0b61e6dfa8b9fee0befdaa03b | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | DuaNoDo/PythonProject | 543e153553c58e7174031b910fd6451399afcc81 | 2c5c8aa89dda4dec2ff4ca7171189788bf8b5f2c | refs/heads/master | 2020-05-07T22:22:29.878944 | 2019-06-14T07:44:35 | 2019-06-14T07:44:35 | 180,941,166 | 1 | 1 | null | 2019-06-04T06:27:29 | 2019-04-12T06:05:42 | Python | UTF-8 | Python | false | false | 5,763 | py | # -*- test-case-name: twisted.application.runner.test.test_runner -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Twisted application runner.
"""
from os import kill
from signal import SIGTERM
from sys import stderr
from attr import attrib, attrs, Factory
from twisted.logger import (
... | [
"[email protected]"
] | |
2f6c2bce524bc945e8b1906c4fd08726bca5888c | 41dc19883789f45b6086399a1ae23995f53b4b2c | /BayesMadeSimple/distribution.py | dea353cbb2da5a315f6990d03872b1985e04638a | [
"MIT"
] | permissive | sunny2309/scipy_conf_notebooks | f86179ddcd67168b709c755cc01862ed7c9ab2bd | 30a85d5137db95e01461ad21519bc1bdf294044b | refs/heads/master | 2022-10-28T17:27:42.717171 | 2021-01-25T02:24:05 | 2021-01-25T02:24:05 | 221,385,814 | 2 | 0 | MIT | 2022-10-20T02:55:20 | 2019-11-13T06:12:07 | Jupyter Notebook | UTF-8 | Python | false | false | 16,338 | py | """
Pmf: Represents a Probability Mass Function (PMF).
Cdf: Represents a Cumulative Distribution Function (CDF).
Copyright 2019 Allen B. Downey
MIT License: https://opensource.org/licenses/MIT
"""
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from scipy.interpolate im... | [
"[email protected]"
] | |
af7f3350737682e5f14e67fac76f11d84afe65b1 | edd8ad3dcb6ee9b019c999b712f8ee0c468e2b81 | /Python 300/08. Iteration Statement/144.py | 641f2af3cf169953aeb4921da394052b49442b99 | [] | no_license | narinn-star/Python | 575cba200de35b9edf3832c4e41ccce657075751 | 14eba211cd3a9e9708a30073ba5b31d21d39eeef | refs/heads/master | 2023-05-25T22:57:26.079294 | 2021-06-07T15:29:39 | 2021-06-07T15:29:39 | 331,647,462 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 88 | py | #for문 _ animals
lists = ['dog', 'cat','parrot']
for i in lists:
print(i, len(i)) | [
"[email protected]"
] | |
d1ac6305dbd6d50b835b3c72c2b048137df5ea1f | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/81/usersdata/212/47049/submittedfiles/dec2bin.py | 6411c5dd71bf68dde30b00d10c31f9fc65086a43 | [] | 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 | 138 | py | # -*- coding: utf-8 -*-
p=int(input('digite o valor do menor número:'))
q=int(input('digite o valor do maior número:'))
n=1%10
print(n)
| [
"[email protected]"
] | |
46451d297fa736664316b7c35106ff642cada2ff | cbb7f79a50b05e2ab670ae19bbd1c3b8dead437d | /dict_ordem.py | d24ab507f66b1828b5ff9371ba46aa626fa734e0 | [] | no_license | lfbessegato/Python_Avancado | 3b680d65fe543bd915b5798a85be1f7dadfad4c4 | bb73b99d64f92693a6fe71748f2c24aaabe7d4e1 | refs/heads/master | 2022-09-07T20:28:07.037656 | 2020-05-29T20:24:07 | 2020-05-29T20:24:07 | 265,316,529 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 178 | py | from collections import OrderedDict
# Ordered -> Mantém a Ordem
d = OrderedDict()
d['python'] = 10
d['java'] = 5
d['php'] = 6
d['C'] = 10
for key in d:
print(key, d[key])
| [
"[email protected]"
] | |
c5a55686d52aef4a636fcd08c7d52bca631af994 | 8c3ba133fa34cf2f936ba9176459690008e9e1fb | /imagepy/menus/Window/widgets_plgs.py | 4a05938af587349c3a114d2efe75198b21d28d8b | [
"BSD-2-Clause"
] | permissive | qixinbo/imagepy | fcd272b231b3f49fafd51425f46e826a73841c1f | a2722443dfddf2b0b81b44512427b8a273a7424c | refs/heads/master | 2023-03-16T15:58:57.330418 | 2022-09-03T13:35:46 | 2022-09-03T13:35:46 | 519,933,892 | 0 | 0 | BSD-4-Clause | 2022-08-01T02:02:26 | 2022-08-01T02:02:25 | null | UTF-8 | Python | false | false | 532 | py | from sciapp.action import Free
class Widgets(Free):
"""ImageKiller: derived from sciapp.action.Free"""
title = 'Widgets'
asyn = False
def run(self, para = None):
self.app.switch_widget()
class ToolBar(Free):
title = 'Toolbar'
asyn = False
def run(self, para = None):
self.app.switch_toolbar()
class Tabl... | [
"[email protected]"
] | |
f6fa771d57a3a10af786708c35aa3393e0e40935 | 9c2ca939f29b861afec382cd17a462775a3974d0 | /run_worker.py | fcec489b5ac3ac725751dac7c59693090a0cba6f | [
"BSD-2-Clause"
] | permissive | merrlyne/gchatautorespond | 1e2009823e16289ea2cea709cfee5cd2a3e97459 | a7f8d7b715ca9851a65588a268ce39addb906b6d | refs/heads/master | 2020-03-20T12:49:18.882038 | 2018-03-29T18:38:58 | 2018-03-29T18:38:58 | 137,441,551 | 0 | 1 | null | 2018-06-15T04:38:49 | 2018-06-15T04:38:49 | null | UTF-8 | Python | false | false | 1,564 | py | from gevent import monkey
monkey.patch_all()
import django
django.setup()
import logging
from threading import Thread
from django.conf import settings
from gevent.wsgi import WSGIServer
from raven.contrib.flask import Sentry
from gchatautorespond.lib.chatworker.worker import Worker, app
from gchatautorespond.lib.ch... | [
"[email protected]"
] | |
b2a8e001c69a95a4fb2a947d732d78d6d7d8c012 | 632b94beca62f7c8af5ae1d1e8e095a352600429 | /build/ros_controllers/ros_controllers/position_controllers/catkin_generated/pkg.installspace.context.pc.py | 4ddc4e67bff606fc70fdb62976ffda91a4cd6eb2 | [] | no_license | Haoran-Zhao/US_UR3 | d9eb17a7eceed75bc623be4f4db417a38f5a9f8d | a0c25e1daf613bb45dbd08075e3185cb9cd03657 | refs/heads/master | 2020-08-31T07:02:45.403001 | 2020-05-27T16:58:52 | 2020-05-27T16:58:52 | 218,629,020 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 507 | py | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "${prefix}/include".split(';') if "${prefix}/include" != "" else []
PROJECT_CATKIN_DEPENDS = "controller_interface;forward_command_controller".replace(';', ' ')
PKG_CONFIG_LIBRARIES_WITH_PREFIX = "-lpos... | [
"[email protected]"
] | |
2fea31c0cd40ed40aa5a152c571bd75391e2bf24 | b47f2e3f3298388b1bcab3213bef42682985135e | /experiments/heat-3d/tmp_files/6909.py | efaecf45f0b280f386864f84a69acd803b7e70e3 | [
"BSD-2-Clause"
] | permissive | LoopTilingBenchmark/benchmark | 29cc9f845d323431e3d40e878cbfc6d1aad1f260 | 52a3d2e70216552a498fd91de02a2fa9cb62122c | refs/heads/master | 2020-09-25T09:45:31.299046 | 2019-12-04T23:25:06 | 2019-12-04T23:25:06 | 225,975,074 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 375 | py | from chill import *
source('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/polybench/polybench-code/stencils/heat-3d/kernel.c')
destination('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/experiments/heat-3d/tmp_files/6909.c')
procedure('kernel_heat_3d')
loop(0)
tile(0,2,8,2)
tile(0,4,64,3)
tile(0,6... | [
"[email protected]"
] | |
c6061d5f295fed6a46483bf27ca17b45bf838027 | 4c7ea6295a487ec18543e82f66e08a3a2a2fd124 | /apps/logs/action/action_monster_level_reward.py | 8a7e07ee77cf001a6d538be71ca87a390ab9e53c | [] | no_license | robot-nan/GameLogServer | 16217689d88ac5353a61881b03adb1b372cc3e16 | ff2afd6d29e9dce6157a66ff62b4d1ea97d04184 | refs/heads/master | 2021-11-07T21:27:30.494271 | 2015-09-23T15:01:55 | 2015-09-23T15:01:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,292 | py | # -*- coding:utf-8 -*-
"""
宠物等级奖励
"""
from apps.logs.action import action_base
from apps.utils import game_define
def log(user, gold, stone, equip_str, item_str):
"""
输出日志
"""
action = game_define.EVENT_ACTION_GET_MONSTER_LEVEL
cur_gold = user.player.get_gold()
cur_stone = user.player... | [
"[email protected]"
] | |
96b3f469a19190afd2c4b5b108d36137e49ac8d2 | 055581f9d6c81eda2f73ea05b90b7a2256da1219 | /parts/zodiac/zope/interface/common/tests/test_import_interfaces.py | 876383faf7234e93c6a5f7995278350ec5f54606 | [] | no_license | Tosti770/zodiac | 488a91c3e872a62d09a3ebb22a951dadcbd1c2df | af0380e20eb90699a84e3b7c6cb2085a1fb81667 | refs/heads/master | 2020-04-13T06:54:26.333228 | 2014-03-03T20:10:11 | 2014-03-03T20:10:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 121 | py | /home/ruben/zodiac/eggs/zope.interface-4.0.5-py2.7-linux-x86_64.egg/zope/interface/common/tests/test_import_interfaces.py | [
"[email protected]"
] | |
3bc24697dee04be43497c122b3028c6926362734 | b213fbd2f4f628aa0f2387c846673ac68e18aa91 | /Binary_Search/600.py | 4e544b47614dc36d42421f95f4fbc7fd3ea4e675 | [
"MIT"
] | permissive | wilbertgeng/LintCode_exercise | 94309b4451e34f1931fce6c2ae90d0c2e7c41d35 | e7a343b746e98ca3b4bc7b36655af7291f3150db | refs/heads/main | 2023-05-13T06:06:50.887791 | 2021-05-26T20:33:51 | 2021-05-26T20:33:51 | 347,850,106 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,701 | py | """600. Smallest Rectangle Enclosing Black Pixels
"""
class Solution:
"""
@param image: a binary matrix with '0' and '1'
@param x: the location of one of the black pixels
@param y: the location of one of the black pixels
@return: an integer
"""
def minArea(self, image, x, y):
# write... | [
"[email protected]"
] | |
a1d78a24879670100945b229da0affe9517608fe | c04a7a9627e2914c92d48d473ada6214e9044d9b | /music_spider/common/DbManager.py | d2f4f7289ff12e8ab9a1e32b5ff778e9af2a161b | [] | no_license | xsren/uplooking_spider | b00194399f927a21cb395698fadd076413e39754 | e4d9cfed8c9f28458df5806d583109e58b9391d6 | refs/heads/master | 2020-03-24T11:20:20.500996 | 2018-08-18T09:12:37 | 2018-08-18T09:12:37 | 142,682,770 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 9,791 | py | # coding:utf8
import sys
import time
import traceback
from queue import Queue
from pymongo import UpdateOne, ReplaceOne, InsertOne, UpdateMany
from pymongo.errors import BulkWriteError
from twisted.internet import reactor, defer
# 本地库
sys.path.append('../main')
import settings
import common
class DbManager:
de... | [
"[email protected]"
] | |
21a3244c094f2c6fdba9b385874dde119094b631 | 525690b220962de7f6253dd1dc557717cffc3441 | /openstack/tests/unit/cloud_eye/test_cloudeye_service.py | 35b73816fe5fdd9edf0eaeabe9ed72d39d48f02c | [
"Apache-2.0"
] | permissive | huaweicloudsdk/sdk-python | bb8dc2bc195d0bdaddf13fef484e3f28aeb2681f | 60d75438d71ffb7998f5dc407ffa890cc98d3171 | refs/heads/master | 2021-06-05T00:04:59.030371 | 2018-09-30T09:40:49 | 2018-09-30T09:40:49 | 110,813,153 | 20 | 18 | NOASSERTION | 2020-07-23T17:01:59 | 2017-11-15T09:31:50 | Python | UTF-8 | Python | false | false | 1,102 | py | # 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
# distributed under t... | [
"[email protected]"
] | |
0e4635e67e5d0d55f1378f08260a7f06ee2e70cc | c6292c1dd68f0c4dd3389628de0d2b786fa0ee64 | /0x06-python-classes/0-square.py | 4c030f02dd19538abaad2c6f969458caac16080a | [] | no_license | mj31508/holbertonschool-higher_level_programming2 | 835be695b568cd189c1448c54218a0201830005f | 3fa47001c041cd0c74f88c3a19677e126bee37b4 | refs/heads/master | 2021-07-06T22:31:05.040354 | 2017-09-29T05:28:45 | 2017-09-29T05:28:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 79 | py | #!/usr/bin/python3
"""
Defines empty class Square
"""
class Square:
pass
| [
"[email protected]"
] | |
9005aa6da759029734d49699d61f6dfb82e382ee | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/adjectives/_subordinating.py | f414e402006d840f8543ad90d26aa0594767e83c | [
"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 | 285 | py |
from xai.brain.wordbase.adjectives._subordinate import _SUBORDINATE
#calss header
class _SUBORDINATING(_SUBORDINATE, ):
def __init__(self,):
_SUBORDINATE.__init__(self)
self.name = "SUBORDINATING"
self.specie = 'adjectives'
self.basic = "subordinate"
self.jsondata = {}
| [
"[email protected]"
] | |
b204c2541423dde521dadee3fceaa2623a7ebe59 | 7a4ed01a40e8d79126b26f5e8fca43c8e61e78fd | /Geeky Shows/Core Python/128.reduce_Function[159].py | de2e40159a3a8f0c556f8d593fb761aa271c252a | [] | no_license | satyam-seth-learnings/python_learning | 5a7f75bb613dcd7fedc31a1567a434039b9417f8 | 7e76c03e94f5c314dcf1bfae6f26b4a8a6e658da | refs/heads/main | 2023-08-25T14:08:11.423875 | 2021-10-09T13:00:49 | 2021-10-09T13:00:49 | 333,840,032 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 113 | py | from functools import reduce
a=[10,20,30,40,50]
result=reduce(lambda n,m:n+m,a)
print(result)
print(type(result)) | [
"[email protected]"
] | |
e4f116f2d1e3e8c08ce2c7c35289d60e7a2455e5 | 3b2940c38412e5216527e35093396470060cca2f | /top/api/rest/SimbaAdgroupsChangedGetRequest.py | 5b87c69b8afb5cee0f9b6ef7edd9ba1abccebb0d | [] | no_license | akingthink/goods | 842eb09daddc2611868b01ebd6e330e5dd7d50be | ffdb5868a8df5c2935fc6142edcdf4c661c84dca | refs/heads/master | 2021-01-10T14:22:54.061570 | 2016-03-04T09:48:24 | 2016-03-04T09:48:24 | 45,093,302 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 398 | py | '''
Created by auto_sdk on 2015-01-20 12:44:31
'''
from top.api.base import RestApi
class SimbaAdgroupsChangedGetRequest(RestApi):
def __init__(self,domain='gw.api.taobao.com',port=80):
RestApi.__init__(self,domain, port)
self.nick = None
self.page_no = None
self.page_size = None
self.start_time = ... | [
"[email protected]"
] | |
5d857613084649081412e62cd5a3dd7998e0f1ec | a66460a46611483dfbdc94c7996893f427e60d97 | /ansible/my_env/lib/python2.7/site-packages/ansible/modules/cloud/amazon/ec2_ami_facts.py | fe8b57e7640e37f06e0f2c3b8a4e942fbe51bad9 | [
"MIT"
] | permissive | otus-devops-2019-02/yyashkin_infra | 06b57807dde26f94f501828c07503d6bf1d70816 | 0cd0c003884155ac922e3e301305ac202de7028c | refs/heads/master | 2020-04-29T02:42:22.056724 | 2019-05-15T16:24:35 | 2019-05-15T16:24:35 | 175,780,718 | 0 | 0 | MIT | 2019-05-15T16:24:36 | 2019-03-15T08:37:35 | HCL | UTF-8 | Python | false | false | 8,737 | py | #!/usr/bin/python
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'}
DOCUMENTATION = '''
---
module: ec2_a... | [
"[email protected]"
] | |
284b16862546a04753ca39ee352a14563fc28272 | eaf97194e79c31d80f7786b64bbf621581a95dec | /example.py | bba3baa0753070fdc4a03e7eb9cbacab6300db59 | [] | no_license | codesharedot/levolution-price | 333902c32137f9a82bd9d21b26575d646e0f4bb9 | 60c9d52fa42190e4fa929ead32ca611766906005 | refs/heads/master | 2020-08-02T14:26:47.832555 | 2019-09-27T19:27:47 | 2019-09-27T19:27:47 | 211,388,241 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 616 | py | import requests
import json
from forex_python.converter import CurrencyRates
import os
c = CurrencyRates()
rate = c.get_rate('USD', 'EUR')
print(rate)
levolution_api_url = 'https://api.coinmarketcap.com/v1/ticker/levolution/'
response = requests.get(levolution_api_url)
response_json = response.json()
print(response_... | [
"[email protected]"
] | |
df3847d46c128ea4255e64467cb577d4e348b21b | 469e3e8de616263bab857df1050d426f40c30d5c | /module3.py | 5d847f0e4e820befd42f51495c91329a0d3b6499 | [
"MIT"
] | permissive | listenzcc/QuickPythonConfig | d487e3c35e906f84503d8992152ee79909d0da30 | ff883c1dd2b7a23a114ec794e3d711fd5d1d15c1 | refs/heads/main | 2023-01-07T20:30:39.060803 | 2020-11-10T08:52:10 | 2020-11-10T08:52:10 | 306,575,328 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 371 | py | # Example of using customized Config object
from Package.defines import Config
config = Config()
config.reload_logger('develop')
config.reload_cfg()
def main():
print('---------------------------------------------------------')
print(config.peek())
config.set('Module 3', 'says', 'It should be ... | [
"[email protected]"
] | |
6f45e31cd38fe22467cfb6b9bef6d61c3073ffef | 38c76d29799896a8335bd83b6220acd71d5d8bed | /pyeuler/p053.py | 32ec8ddbb6ba17ace49313419244944a5c2dde50 | [] | no_license | oozk/pyeuler | c010505624bb95043883faa55a776d954c0496dc | 74fd549985722f6d53a1394179d094a106c70689 | refs/heads/master | 2023-04-13T17:50:23.187918 | 2023-04-05T13:00:44 | 2023-04-05T13:00:44 | 261,848,886 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 373 | py | #!/usr/bin/env python3
###
# Problem 53
# https://projecteuler.net/problem=53
###
from math import factorial
def p053(l):
factorials = dict((i, factorial(i)) for i in range(0, l+1))
n_choose_r = lambda n, r: factorials[n] / factorials[r] / factorials[n-r]
return sum(1 for n in range(1, l+1) for r in rang... | [
"[email protected]"
] | |
d8a83a203ad3e39efa214b7786b7be640e6c5c2d | af192ea16aad4264a92039d594d72acca91d0e33 | /tests/tests.py | d329884aa00948981f710044b18f363c5eea0ca8 | [
"MIT"
] | permissive | TakumiHQ/emoji-unicode | ceed81325829e2c44b6d1b04c4dbc7257cc95c86 | 85e8193f05f822641a58eb539b765481b084f83c | refs/heads/master | 2021-01-18T16:08:52.817116 | 2015-11-20T13:10:44 | 2015-11-20T13:10:44 | 66,449,921 | 1 | 0 | null | 2016-08-24T09:17:27 | 2016-08-24T09:17:27 | null | UTF-8 | Python | false | false | 6,812 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import unittest
import logging
import os
import json
import io
from emoji_unicode import replace, normalize, Emoji
from emoji_unicode.utils import code_point_to_unicode, unicode_to_code_point
from emoji_unicode import data_parser
logging.disable(loggin... | [
"[email protected]"
] | |
81692c3527f89a21d770bcf0dfe69059814ffe59 | 64f5c0f229e1b1186f12d75b4ba21c07adfcf152 | /index/models.py | fc2791e3989c627bacd03d10534b92d43824f717 | [] | no_license | Emehinola/intouch | 22dd3a81c935956914362604b8fd60d6d7cd2a46 | d370a48c21b93aed797c32a0621c3fa8bda89857 | refs/heads/master | 2023-01-24T22:37:41.862324 | 2020-12-13T08:54:55 | 2020-12-13T08:54:55 | 318,006,792 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 397 | py | from django.db import models
# Create your models here.
# home page view, i.e the surveys views
class HomeViewCount(models.Model):
views = models.IntegerField(default=0) # number of views or visits
time = models.DateTimeField(auto_now_add=True)
class Meta:
ordering = ['-time']
verbose_... | [
"[email protected]"
] | |
e0a422afafd0c518668c019f26bccbc9e6a9bb01 | 6572f29c4472f1bd131dfb0fba441cb5b641ec83 | /django/mysite_personal_models/blog/urls.py | 6bdac35817b4968ca9cf7207271375c46c4feef1 | [] | no_license | kan-abhulimen/jango-training | 1ccbe04c9f2f481d4482e9fdfd50b1a5b43cc7ae | 734087392cd9635f00596a7955882f4849883930 | refs/heads/master | 2020-03-07T18:37:44.332426 | 2018-01-27T16:11:29 | 2018-01-27T16:11:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 545 | py | from django.conf.urls import url, include
from django.views.generic import ListView, DetailView
from blog.models import Post
urlpatterns = [
url(r'^$', ListView.as_view(
queryset=Post.objects.all().order_by("-date")[:25],
template_... | [
"[email protected]"
] | |
c442740a0bcbc288556a64daa57037c8a3f469ab | d0326c87cda35a4c80d1bb137894a33ca3f1bcc9 | /jetracer/nvidia_racecar.py | ec1631454f4df2f3fb9181022e6a30c9bf3caab6 | [
"MIT"
] | permissive | tokk-nv/jetracer | 5a36fcf809348b609331d369d71cca20010c954a | e83f11522f75d5f89486442ce2e36624e20970a7 | refs/heads/master | 2023-07-03T21:58:25.670731 | 2021-08-09T23:33:58 | 2021-08-09T23:33:58 | 321,274,145 | 1 | 0 | MIT | 2021-06-01T20:47:28 | 2020-12-14T07:59:07 | Jupyter Notebook | UTF-8 | Python | false | false | 1,115 | py | from .racecar import Racecar
import traitlets
from adafruit_servokit import ServoKit
class NvidiaRacecar(Racecar):
i2c_address = traitlets.Integer(default_value=0x40)
steering_gain = traitlets.Float(default_value=-0.65)
steering_offset = traitlets.Float(default_value=0)
steering_channel = traitle... | [
"[email protected]"
] | |
47955f0cfeb6ad8ef9ded6bffccc8aa706933bee | acb8e84e3b9c987fcab341f799f41d5a5ec4d587 | /langs/5/l5d.py | d8160fd04b64e99d78c07839a70756ef5e92a3dc | [] | no_license | G4te-Keep3r/HowdyHackers | 46bfad63eafe5ac515da363e1c75fa6f4b9bca32 | fb6d391aaecb60ab5c4650d4ae2ddd599fd85db2 | refs/heads/master | 2020-08-01T12:08:10.782018 | 2016-11-13T20:45:50 | 2016-11-13T20:45:50 | 73,624,224 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 486 | py | import sys
def printFunction(lineRemaining):
if lineRemaining[0] == '"' and lineRemaining[-1] == '"':
if len(lineRemaining) > 2:
#data to print
lineRemaining = lineRemaining[1:-1]
print ' '.join(lineRemaining)
else:
print
def main(fileName):
with open(fileName) as f:
for line in f:
... | [
"[email protected]"
] | |
e6334f2a64f9a1b31d53af7cad6ac3abe5758f7d | 8cce0b5a4be09783016906a36192c52e9daa84aa | /cv_workshops/13-section/7-clazz.py | 4640afbe5beea856e54129e53ebbe39d9916db00 | [
"MIT"
] | permissive | Castrol68/opencv-practice | fcc9495553d3a10fb045c396697391a5d2a06f36 | 83d76132d004ebbc96d99d34a0fd3fc37a044f9f | refs/heads/master | 2023-08-31T07:18:51.497902 | 2020-05-03T17:43:12 | 2020-05-03T17:43:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,057 | py | #!/usr/bin/env python3
# -*- coding=utf-8 -*-
import tensorflow as tf
"""
TensorFlow - hello world
使用安装的TensorFlow 2.0并导入
"""
def main():
# 导入数据集, 数据集下载地址为: http://yann.lecun.com/exdb/mnist/
mnist = tf.keras.datasets.mnist
(x_train, y_train), (x_test, y_test) = mnist.load_data()
# 将... | [
"[email protected]"
] | |
6ec621dff6324b2822383c42b374ac54637d859a | dc72e1eb44cfaed330d9477d0c27bee307a81e4a | /Jackpointnew/hand/scripts.py | 47913e46358e99f954ce1218749325896b5b7a09 | [] | no_license | bussiere/JackPointFInal | ba200d85606e17b423535af20a58c04bf5afa550 | c414480fee519e68aece68068e941278fe10cf0a | refs/heads/master | 2021-07-24T14:25:56.982106 | 2013-07-08T11:10:41 | 2013-07-08T11:10:41 | 5,333,141 | 0 | 0 | null | 2021-06-10T17:45:33 | 2012-08-07T20:29:46 | Python | UTF-8 | Python | false | false | 3,808 | py | from django.contrib.auth.models import User
from django.contrib.auth import authenticate
from django.contrib.auth.decorators import login_required
from django.contrib import auth
from skill.models import Skill
from carac.models import Carac
from item.models import Item
from carac.forms import CaracFormChoice
from skill... | [
"[email protected]"
] | |
6a069aad4eae164b7a135b62b70c4a3ad36591d9 | 75d8667735782cd1d0eb4877e52c89da5cd92dde | /nova/tests/unit/virt/vmwareapi/test_configdrive.py | 9462d39ae2ad4d8c8a8ebadc31116bba226df242 | [
"Apache-2.0"
] | permissive | bopopescu/nova-token | ffecfd3ec561936b7d9d7e691bc57383cde05436 | ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2 | refs/heads/master | 2022-11-22T09:53:31.073483 | 2016-05-14T02:47:01 | 2016-05-15T22:02:55 | 282,105,621 | 0 | 0 | Apache-2.0 | 2020-07-24T02:42:19 | 2020-07-24T02:42:18 | null | UTF-8 | Python | false | false | 14,534 | py | begin_unit
comment|'# Copyright 2013 IBM Corp.'
nl|'\n'
comment|'# Copyright 2011 OpenStack Foundation'
nl|'\n'
comment|'#'
nl|'\n'
comment|'# Licensed under the Apache License, Version 2.0 (the "License"); you may'
nl|'\n'
comment|'# not use this file except in compliance with the License. You may obtain'
nl|'\n... | [
"[email protected]"
] | |
68a6ad72b6ba110b69031ee89e2ee46750bbdae1 | 74be41563cba82ec784aed3c893a53261a428ab1 | /myapp/ocr_api/views.py | db6910d7ae1c32dea6bf6323e19f1305a4a8f71f | [] | no_license | Bakushin10/Django | e06ad485084d917886a50e5f3c38f8b049c85fb1 | 184db43f58e4679c2a556f9603f5e3bec61da1eb | refs/heads/master | 2022-12-12T13:34:24.391273 | 2019-11-05T14:33:29 | 2019-11-05T14:33:29 | 202,837,195 | 0 | 0 | null | 2022-12-08T06:53:31 | 2019-08-17T04:55:27 | Python | UTF-8 | Python | false | false | 5,626 | py | import os, sys, json
from PIL import Image, ImageDraw2
from django.shortcuts import render
from django.shortcuts import render, HttpResponseRedirect
from django.http import HttpResponse, JsonResponse
from ocr_api.models import OCRInputModel, JsonOCRInputModel
from ocr_api.serializers import OCRInputModelSeriali... | [
"[email protected]"
] | |
b1f831dc5b99ada2504bfeae16902b81d431db0e | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03470/s172972650.py | 57f94dcf85afe314754def063304ba328d8d9803 | [] | 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 | 140 | py | N = int(input())
d = sorted([int(input()) for i in range(N)])
ans = 1
for i in range(N-1):
if d[i] < d[i+1]:
ans += 1
print(ans) | [
"[email protected]"
] | |
be170dcc3bdd5793fcc52084d7dd6184d1ea3928 | 51aa2894c317f60726fe9a778999eb7851b6be3e | /120_design_patterns/014_command/_exercises/templates/4-Command Pattern/Assignment/Solution/security_commands.py | dccb3920efff4cf8a244e3bb8df5cf9715871ec1 | [] | no_license | pranaymate/Python_Topics | dd7b288ab0f5bbee71d57080179d6481aae17304 | 33d29e0a5bf4cde104f9c7f0693cf9897f3f2101 | refs/heads/master | 2022-04-25T19:04:31.337737 | 2020-04-26T00:36:03 | 2020-04-26T00:36:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 455 | py | # ____ a__.s... ______ S..
# ____ c_a.. ______ AC..
#
#
# c_ SecurityArmCommand AC..
# ___ - security
# __ no. isi.. ? S..
# r_ T..
# ? ?
#
# ___ execute
# s____.a..
#
# ___ undo(
# s___.di..
#
#
# c_ SecurityDisarmCommand(AbsCommand):
# ___ - security
# ... | [
"[email protected]"
] | |
76b7b7fd8b8e98790d7b81290bc4cc77bea998c9 | a74a592d3e34c0cb2e19363a92410c520dc0ecda | /backend/course/models.py | 1ed6ffe755403a8dcb6cbf4e3dc54d87f002688f | [] | no_license | crowdbotics-apps/youthbuild-course-a-18675 | 5e4f0231b6127b215576c87593b8a073518200de | 4f17bfa2f588be23f24d862ca86fba569908e90e | refs/heads/master | 2022-11-08T20:55:36.094513 | 2020-07-07T19:33:25 | 2020-07-07T19:33:25 | 277,903,947 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,850 | py | from django.conf import settings
from django.db import models
class Course(models.Model):
"Generated Model"
author = models.ForeignKey(
"users.User", on_delete=models.CASCADE, related_name="course_author",
)
title = models.CharField(null=True, blank=True, max_length=256,)
description = mod... | [
"[email protected]"
] | |
a3b0628f021f81f748f640274f9ddface28f23ea | 500b03fa6cb776c1d51db4a3a3aa252ddf5a50e6 | /book_exercise/py_intro/basics/Chapter 4: If statement/num_close.py | d5a70064327dbf0d92c9c632d600f35af5edadad | [] | no_license | carloslvm/learning-python | b3796a0a5b751baae8c551a9f6fe262f98980691 | 07f885454cf21b7d215a58da7fcb907715e546bd | refs/heads/master | 2022-07-27T21:39:11.937801 | 2022-07-09T17:47:56 | 2022-07-09T17:47:56 | 163,447,616 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 364 | py | #!/usr/bin/python3
# Guessing a float number
num = 10.000
user_num = float(input('Try to guess the float number: '))
if user_num == 10.001 or user_num == 9.999:
print('You were close.')
elif user_num != 10.001 and user_num != 9.999:
print('You were not close.')
elif user_num == num:
print('That\'s corre... | [
"[email protected]"
] | |
677767ca7ceb624e8d26a88b9ec1aea211c9eb4c | 29f5b2d3a3582afad36ce03d23ac8e25743c7a1d | /quickstart.py | 4e6bea7265daf75d13f0f31247acd9327aebbe9f | [] | no_license | kylinRao/djangowebbuild | 9b1e1f32ae8b8872e950ff91658296d92113597e | 75a06b8e35d50176d824e3a4e790a79796c28f70 | refs/heads/master | 2021-01-19T04:32:49.411920 | 2016-06-08T01:33:38 | 2016-06-08T01:33:38 | 60,658,778 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,301 | py | from __future__ import print_function
import httplib2
import os
from apiclient import discovery
import oauth2client
from oauth2client import client
from oauth2client import tools
try:
import argparse
flags = argparse.ArgumentParser(parents=[tools.argparser]).parse_args()
except ImportError:
flags = None
... | [
"[email protected]"
] | |
0006232e66e9b267c54344acf505f520ca34f480 | 0adf94fc39a02018165b62e93dd83edddd041230 | /.history/configurations/settings_20190226153809.py | 75cf74155e05e00a2fbe0afc31d36aded4447481 | [] | no_license | SabitDeepto/BrJobs | 1e3baa143331cf46b9c70911c6644d1efd4fffd6 | 1a458c8c667f8093a2325d963e5542655467c7aa | refs/heads/master | 2020-04-24T08:02:26.350007 | 2019-03-17T05:53:30 | 2019-03-17T05:53:30 | 171,818,024 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,011 | py | """
Django settings for configurations project.
Generated by 'django-admin startproject' using Django 2.1.3.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
impor... | [
"[email protected]"
] | |
8bbe10ec9f9d538ff2af58beaee2fe77b23096dc | 5785d7ed431b024dd910b642f10a6781df50e4aa | /revise-daily/educative.io/medium-dp/longest-common-subsequence/11_edit_distance.py | 0afe28a66ab6ed5f3dc9fc015d21e758fbb667d4 | [] | no_license | kashyapa/interview-prep | 45d77324446da34d99bf8efedb3544b367b5523e | 7060c090c40602fb9c4778eace2078e1b51e235b | refs/heads/master | 2023-07-28T13:12:49.515299 | 2021-09-06T14:33:25 | 2021-09-06T14:33:25 | 403,706,510 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,004 | py | def find_min_operations(s1, s2):
return find_min_operations_recursive(s1, s2, 0, 0)
def find_min_operations_dp(s1, s2):
n1, n2 = len(s1), len(s2)
dp = [[-1 for _ in range(n2 + 1)] for _ in range(n1 + 1)]
# if s2 is empty, we can remove all the characters of s1 to make it empty too
for i1 in range... | [
"[email protected]"
] | |
b532081aaa769fc56e4142beaeafe9cc3c22fc13 | ff4ab3a8aac4d26534d1d980f85f7b4ca3e0905b | /config.py | b909dff713e1be51064f9d8b0ab0d5244ecb1a54 | [] | no_license | pandeynandancse/Named_Entity_Reognition_BERT | be19db084079d035a59356cdf6ede8153f856055 | a6205240d312f6ca02b3ef5c8cc34512126815f0 | refs/heads/master | 2022-11-29T09:33:32.747433 | 2020-08-11T15:54:51 | 2020-08-11T15:54:51 | 286,786,451 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 444 | py | import transformers
MAX_LEN = 128
TRAIN_BATCH_SIZE = 32
VALID_BATCH_SIZE = 8
EPOCHS = 10
BASE_MODEL_PATH = "../input/bert_base_uncased"
MODEL_PATH = "model.bin"
TRAINING_FILE = "../input/ner_dataset.csv"
#also can grab tokenizer from tokenizers library that is also from hugging face
TOKENIZER = transformers.Ber... | [
"[email protected]"
] | |
ffa2ae378f1565ed2e05a6f4d0a4a43f0bf68c78 | c9ddbdb5678ba6e1c5c7e64adf2802ca16df778c | /cases/synthetic/sieve-big-1095.py | 05e4945e404661ab2c9357d6ed718b6d3fb30b48 | [] | no_license | Virtlink/ccbench-chocopy | c3f7f6af6349aff6503196f727ef89f210a1eac8 | c7efae43bf32696ee2b2ee781bdfe4f7730dec3f | refs/heads/main | 2023-04-07T15:07:12.464038 | 2022-02-03T15:42:39 | 2022-02-03T15:42:39 | 451,969,776 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 31,742 | py | # A resizable list of integers
class Vector(object):
items: [int] = None
size: int = 0
def __init__(self:"Vector"):
self.items = [0]
# Returns current capacity
def capacity(self:"Vector") -> int:
return len(self.items)
# Increases capacity of vector by one element
def incr... | [
"[email protected]"
] | |
60979a8ade62ba28d58cd3e3ed95c34182d3d71e | 63b79c404d83e4980891c488f4d9592558ecda35 | /assets/src/ba_data/python/bastd/ui/coop/__init__.py | 3262255308ce6f45e4b6dc0da8fd42ee5b06cf20 | [
"MIT"
] | permissive | kakekakeka/ballistica | 56e8879cd5b4b990e5e05da3dfd300d7cbb45446 | 3ffeff8ce401a00128363ff08b406471092adaa9 | refs/heads/master | 2022-11-14T08:11:57.160782 | 2020-07-01T05:43:13 | 2020-07-01T05:49:44 | 276,755,445 | 2 | 0 | MIT | 2020-07-02T22:18:37 | 2020-07-02T22:18:36 | null | UTF-8 | Python | false | false | 1,178 | py | # Copyright (c) 2011-2020 Eric Froemling
#
# 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, merge, publish,... | [
"[email protected]"
] | |
1d92cd4caf466194bc8dd0b7e0808a2f847ca1c2 | 093781f6a182c4988bb72c518e9747b723528e65 | /14_pooling.py | dc3c8a0f6d26c083f847ea87a72901437bc557b4 | [] | no_license | cjy02044027/quincy-pytorch | 889d821685865687853df8c080352e534ac71b0d | c6a226196ec3d7d23121291c3b5696ea57152f57 | refs/heads/master | 2023-01-12T10:46:39.394664 | 2020-02-14T06:23:10 | 2020-02-14T06:23:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,296 | py | #!usr/bin/env python
# -*- coding:utf-8 _*-
"""
@version:
author:yanqiang
@time: 2019/04/09
@file: main.py
@description: 最大池化和平均池化
"""
import torch
from torch import nn
print(torch.__version__)
# 二维最大池化层和平均池化层
def pool2d(X, pool_size, mode='max'):
"""
池化层
:param X:
:param pool_size:
:param mode:... | [
"[email protected]"
] | |
f3a07f02268fdfe27b330e612e8b7945659aa549 | 77c7c1bb838fe3c7972e1fd54aab21ce50da0654 | /bhp045/apps/cancer_subject/models/subject_off_study_mixin.py | 5d0ff6fbd5c6fd21124adcf8aafec5f26650affd | [] | no_license | botswana-harvard/cancer | 394124fe4cb8ae5e03ca70842a13e20220201be9 | 410cdd637d1da5b9d5081da02697eb1d03ae0984 | refs/heads/master | 2021-01-21T18:24:58.316116 | 2017-05-22T13:11:05 | 2017-05-22T13:11:05 | 92,045,682 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 236 | py | from edc.subject.off_study.mixins.off_study_mixin import OffStudyMixin
class SubjectOffStudyMixin(OffStudyMixin):
def get_off_study_cls(self):
from .subject_off_study import SubjectOffStudy
return SubjectOffStudy
| [
"[email protected]"
] | |
6abde58c2c7813da0693cc6347cd6916351e7fd8 | 4c2def4621865535d36e6beb605691a6d53628d4 | /ask_weather/action.py | af6d79fd48a1e8ad45ce006213b73d645d5dcce1 | [] | no_license | liaozhihui/work | 4485722c73a796c25896bb083d84d0e4f79e05c5 | 61a11d591875e17818b1b303d3552818441efafc | refs/heads/master | 2020-07-16T17:04:07.788674 | 2019-09-02T10:13:28 | 2019-09-02T10:13:28 | 205,828,908 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 328 | py | from rasa_core_sdk import Action
from rasa_core_sdk.events import SlotSet
class ActionAskWeather(Action):
def name(self):
return 'action_ask_weather'
def run(self, dispatcher, tracker, domain):
dispatcher.utter_message(f'您问的天气地点是哪里呢')
return [SlotSet('city', '深圳')]
| [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.