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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
98f76ec619a2e488aa99de17c4447d474c1cb2e1 | 3f6c16ea158a8fb4318b8f069156f1c8d5cff576 | /.PyCharm2019.1/system/python_stubs/-1046095393/atexit.py | 3b4fb40c097ce9444aa1ae283f0da5efbfc50ffd | [] | no_license | sarthak-patidar/dotfiles | 08494170d2c0fedc0bbe719cc7c60263ce6fd095 | b62cd46f3491fd3f50c704f0255730af682d1f80 | refs/heads/master | 2020-06-28T23:42:17.236273 | 2019-10-01T13:56:27 | 2019-10-01T13:56:27 | 200,369,900 | 0 | 0 | null | 2019-08-03T12:56:33 | 2019-08-03T11:53:29 | Shell | UTF-8 | Python | false | false | 4,738 | py | # encoding: utf-8
# module atexit
# from (built-in)
# by generator 1.147
"""
allow programmer to define multiple exit functions to be executedupon normal program termination.
Two public functions, register and unregister, are defined.
"""
# no imports
# functions
def register(func, *args, **kwargs): # real signature... | [
"sarthakpatidar15@gmail.com"
] | sarthakpatidar15@gmail.com |
17a0b25b7520802c0316a50b66f74a804df1a76e | caaf56727714f8c03be38710bc7d0434c3ec5b11 | /tests/components/abode/test_light.py | 6506746783c2c8bc154c57ee3317833d02c7ff28 | [
"Apache-2.0"
] | permissive | tchellomello/home-assistant | c8db86880619d7467901fd145f27e0f2f1a79acc | ed4ab403deaed9e8c95e0db728477fcb012bf4fa | refs/heads/dev | 2023-01-27T23:48:17.550374 | 2020-09-18T01:18:55 | 2020-09-18T01:18:55 | 62,690,461 | 8 | 1 | Apache-2.0 | 2023-01-13T06:02:03 | 2016-07-06T04:13:49 | Python | UTF-8 | Python | false | false | 4,040 | py | """Tests for the Abode light device."""
from homeassistant.components.abode import ATTR_DEVICE_ID
from homeassistant.components.light import (
ATTR_BRIGHTNESS,
ATTR_COLOR_TEMP,
ATTR_RGB_COLOR,
DOMAIN as LIGHT_DOMAIN,
)
from homeassistant.const import (
ATTR_ENTITY_ID,
ATTR_FRIENDLY_NAME,
ATT... | [
"noreply@github.com"
] | tchellomello.noreply@github.com |
5efc101cdbf8e412920f0ccebaf0c2a572e6f7ba | af6e7f0927517375cb4af833f4c52e301bad0af5 | /corpus_processor/topic_aware/filter_qa_corpus_by_topic_list.py | 90d3fa8fa6d532a86b504d45378701a28a47ca24 | [] | no_license | wolfhu/DialogPretraining | 470334fd815e1299981b827fdc933d237a489efd | eeeada92146d652d81ca6e961d1298924ac8435d | refs/heads/main | 2023-06-25T15:22:54.728187 | 2021-07-21T01:40:23 | 2021-07-21T01:40:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,834 | py | # encoding: utf-8
import sys
from util.trie import Trie
tag_file_path = '/home/t-yuniu/xiaoice/yuniu/dataset/processed/domain/sport/keywords'
# Tag 黑名单
tag_black_dict = {}
# tag_black_dict.setdefault('游戏', True)
tag_trie = Trie()
def detect_tag(sentence):
"""
Judge if sentence contain as least a tag.
... | [
"yuwu1@microsoft.com"
] | yuwu1@microsoft.com |
4dad72ebc7956f2e83c677733d880dec2b2fd50f | 2f98aa7e5bfc2fc5ef25e4d5cfa1d7802e3a7fae | /python/python_10938.py | 978f85ef643f608646c73eface82e3ca6748bc7b | [] | no_license | AK-1121/code_extraction | cc812b6832b112e3ffcc2bb7eb4237fd85c88c01 | 5297a4a3aab3bb37efa24a89636935da04a1f8b6 | refs/heads/master | 2020-05-23T08:04:11.789141 | 2015-10-22T19:19:40 | 2015-10-22T19:19:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 117 | py | # Installing psycopg2 on Mountain Lion (brew + pip)
defaults write com.apple.versioner.python Prefer-32-Bit -bool no
| [
"ubuntu@ip-172-31-7-228.us-west-2.compute.internal"
] | ubuntu@ip-172-31-7-228.us-west-2.compute.internal |
08de5456e8af14a088ef40511b9b3774b8805421 | a7807e4a49a06b748cff273fe8c0dc79b5e64ca8 | /orby/Scripts/django-admin.py | e15c2e9f1d2447bd8344d9aa8ae6a8f207aaf426 | [] | no_license | orhunakar01/labotestalep | 0cb864522821f9d4f168996db15a38fc166d57b3 | 6c6958d49e65d30d5f80c09ee1618c8cc7dd8100 | refs/heads/master | 2023-03-23T00:32:49.474106 | 2021-03-16T18:46:08 | 2021-03-16T18:46:08 | 348,455,136 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 695 | py | #!c:\users\orhun\desktop\djangologin\orby\scripts\python.exe
# When the django-admin.py deprecation ends, remove this script.
import warnings
from django.core import management
try:
from django.utils.deprecation import RemovedInDjango40Warning
except ImportError:
raise ImportError(
'django-admin.py wa... | [
"orhunakar@yandex.com"
] | orhunakar@yandex.com |
66aefdce6c1839e0f4b8dfbe62df72f1d60af25d | b15d2787a1eeb56dfa700480364337216d2b1eb9 | /accelbyte_py_sdk/api/match2/operations/backfill/accept_backfill.py | e35c0aa725d1ba4f04c748c7ad397734654b2930 | [
"MIT"
] | permissive | AccelByte/accelbyte-python-sdk | dedf3b8a592beef5fcf86b4245678ee3277f953d | 539c617c7e6938892fa49f95585b2a45c97a59e0 | refs/heads/main | 2023-08-24T14:38:04.370340 | 2023-08-22T01:08:03 | 2023-08-22T01:08:03 | 410,735,805 | 2 | 1 | MIT | 2022-08-02T03:54:11 | 2021-09-27T04:00:10 | Python | UTF-8 | Python | false | false | 8,605 | py | # Copyright (c) 2021 AccelByte Inc. All Rights Reserved.
# This is licensed software from AccelByte Inc, for limitations
# and restrictions contact your company contract manager.
#
# Code generated. DO NOT EDIT!
# template file: ags_py_codegen
# pylint: disable=duplicate-code
# pylint: disable=line-too-long
# pylint:... | [
"elmernocon@gmail.com"
] | elmernocon@gmail.com |
94e3d38dd3a5674a0272aeb4ea010d9f7a9abfd2 | 7dcdd5de0640f07b01b1707c134ec0bd168f641d | /fedora_college/modules/content/views.py | b1019c221326d657588aa1b01f790aaa7115edba | [
"BSD-3-Clause"
] | permissive | MSheezan/fedora-college | 8e3e741f6ddac481c2bb7bbcde1e70e2b4b56774 | 07dbce3652c6c1796fb0f7b208a706c9e9d90dc1 | refs/heads/master | 2021-01-15T22:38:16.831830 | 2014-06-26T07:04:33 | 2014-06-26T07:04:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,439 | py | # -*- coding: utf-8 -*-
import re
#import time
from unicodedata import normalize
from flask import Blueprint, render_template
from flask import redirect, url_for, g
from sqlalchemy import desc
from fedora_college.core.database import db
from fedora_college.modules.content.forms import * # noqa
from fedora_college.core... | [
"hammadhaleem@gmail.com"
] | hammadhaleem@gmail.com |
c2eab84e232f590469f2bb0cea19a803ec121d0f | 2fabc9255adbe1cc055eb4b2402f8526f389f257 | /model/modules.py | 86464633b715d37b344f74882941fce2b5d70ab8 | [
"MIT"
] | permissive | asr2021/WaveGrad2 | 657323be12d16667fc0a3b7f2a168101e6e913cb | ba7715d760999093dd99283f48971c5115210b51 | refs/heads/main | 2023-06-02T18:48:56.830462 | 2021-06-23T07:22:10 | 2021-06-23T08:10:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,959 | py | import os
import torch
import torch.nn as nn
import numpy as np
import torch.nn.functional as F
from .blocks import (
ZoneOutBiLSTM,
LinearNorm,
ConvBlock,
)
from text.symbols import symbols
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
class TextEncoder(nn.Module):
""" Text ... | [
"keonlee9420@gmail.com"
] | keonlee9420@gmail.com |
ee4ca603bda625183659e699f11fd7d710b1f6e2 | 0e1e643e864bcb96cf06f14f4cb559b034e114d0 | /Exps_7_v3/W_w_Mgt_to_C/pyramid_tight_crop_size256_pad60_jit15/pyr_2s/bce_s001_tv_s0p1_L4/step10_a.py | eb5df86c53b26c8ee94837558fc32d4559cdad0a | [] | no_license | KongBOy/kong_model2 | 33a94a9d2be5b0f28f9d479b3744e1d0e0ebd307 | 1af20b168ffccf0d5293a393a40a9fa9519410b2 | refs/heads/master | 2022-10-14T03:09:22.543998 | 2022-10-06T11:33:42 | 2022-10-06T11:33:42 | 242,080,692 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,105 | py | #############################################################################################################################################################################################################
##################################################################################################################... | [
"s89334roy@yahoo.com.tw"
] | s89334roy@yahoo.com.tw |
166670300dc3fb39d4e1883bb546d056fe08ce1f | dd09f3ad02785935043b56ea3ef85ed603f4065d | /Sorting_Function/Selection_Sorting.py | 6f03147ffab2db72cf7d3f242eb1efd76270e240 | [] | no_license | RishavMishraRM/Data_Structure | ed70f5a04c2fa8153433e830ef54deb7b9c8bf21 | 0d31d16b48989359d5fef79b00aac1b9ca112a22 | refs/heads/main | 2023-06-27T02:40:18.031146 | 2021-07-25T19:01:51 | 2021-07-25T19:01:51 | 330,320,897 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 365 | py | def selection_sort(A):
n = len(A)
for i in range(n-1):
position = i
for j in range(i+1, n):
if A[j] < A[position]:
position = j
temp = A[i]
A[i] = A[position]
A[position] = temp
A = [3, 5, 8, 9, 6, 2]
print('Original Array:',A)
... | [
"noreply@github.com"
] | RishavMishraRM.noreply@github.com |
2fb93afe829de7491a458ced6b6568ea178817ff | 488e0934b8cd97e202ae05368c855a57b299bfd1 | /Django/advanced/change_admin/change_admin/settings.py | 52ac0975d8daac947ffc100a34d19c9282aa57ff | [] | no_license | didemertens/udemy_webdev | 4d96a5e7abeec1848ecedb97f0c440cd50eb27ac | 306215571be8e4dcb939e79b18ff6b302b75c952 | refs/heads/master | 2020-04-25T00:24:45.654136 | 2019-04-13T16:00:47 | 2019-04-13T16:00:47 | 172,377,429 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,184 | py | """
Django settings for change_admin project.
Generated by 'django-admin startproject' using Django 2.1.7.
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/
"""
import ... | [
"d.g.j.mertens@gmail.com"
] | d.g.j.mertens@gmail.com |
94469e411f69931b1aa7dec9d60e62e9d87a7eff | 3e917645a0e1375189c8ee8c1e93ed15348111ef | /projects/usxp/archive/parrallel/parallel_nibble_v2.py | 792bbb8be009b4feb157af5c7e2bf1c7bf54ad07 | [] | no_license | mbougie/gibbs | d4544e688ce2b63530535e1f5102328aece30e0d | 39d5dc0866fc0dd149d0cf1f22bfd20911a9d29e | refs/heads/master | 2021-01-12T06:59:27.214123 | 2020-01-07T15:48:12 | 2020-01-07T15:48:12 | 83,906,717 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,710 | py | import arcpy
from arcpy import env
from arcpy.sa import *
import multiprocessing
import os
import glob
import sys
import time
import logging
from multiprocessing import Process, Queue, Pool, cpu_count, current_process, Manager
import general as gen
# arcpy.env.overwriteOutput = True
arcpy.env.scratchWorkspace = "in_m... | [
"mbougie@wisc.edu"
] | mbougie@wisc.edu |
82d8e508bea9d27e596ec5fd5f94d4d16fc0ca40 | 085406a6754c33957ca694878db9bbe37f84b970 | /网络编程/08-ssh_socket_client.py | b91da548705606b59b6c0eb6b8d70cdbb3050767 | [] | no_license | dewlytg/Python-example | 82157958da198ce42014e678dfe507c72ed67ef0 | 1e179e4037eccd9fefabefd252b060564a2eafce | refs/heads/master | 2021-01-01T18:36:08.868861 | 2019-01-18T10:39:08 | 2019-01-18T10:39:08 | 98,375,528 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,041 | py | #!/usr/bin/env python
"""
socket client for ssh
"""
import socket
client = socket.socket()
client.connect(("localhost",9999))
while True:
#支持客户端循环发送数据到服务端
cmd = input(">>:").strip()
if len(cmd) == 0:continue
client.send(cmd.encode()) #python3中必须把字符串转换为bytes类型,这里可以理解字符串类型是utf-8
cm... | [
"gang.tang@cutt.com"
] | gang.tang@cutt.com |
1c633bb83ec340755424794ca77ec8a5cecdcbf1 | c253e3c94b66e85d52b1c274e649a8431db0d7d5 | /IT-Lab/assignment-6/codes/1.py | ab5c61b8787c25c90e6d39eaf115480cc804383b | [] | no_license | Abhinal/college-assignments | bfecc9d8dd05b7da5348def9990f42ff28329328 | a93aeee086eb681f946cc343869610e4588af307 | refs/heads/master | 2023-08-16T12:04:35.543135 | 2021-10-22T16:27:33 | 2021-10-22T16:31:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 101 | py | lst = []
i = 0
while i < 5:
player = input()
lst.append(player)
i += 1
print(lst) | [
"ayushdubey70@gmail.com"
] | ayushdubey70@gmail.com |
15efb02d15bd410d19b8018e6c307a75b9f04eb4 | 5fdcb39eaa9d1f44e2ba0130bc0d6ece3f5ff354 | /code/cheshire3/record.py | 728ddee847b4f75341864dad4eff2244263dd3c4 | [] | no_license | Cheshire-Grampa/cheshire3 | 0a653d6372497290d938e098b6acf8366348133f | 616ab36cd8442cd5f4712a9fccf65ca7ae9f692c | refs/heads/master | 2020-12-25T07:26:16.366754 | 2012-06-06T09:52:53 | 2012-06-06T10:32:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 41,269 | py |
from cheshire3.baseObjects import Record
from cheshire3.exceptions import C3Exception
from cheshire3.utils import flattenTexts, elementType
from cheshire3.marc_utils import MARC, MARC8_to_Unicode
import unicodedata
import types, utils, os, re, sys
from cStringIO import StringIO
from xml.sax.saxutils import escape
fro... | [
"info@cheshire3.org"
] | info@cheshire3.org |
5c2482df35a2b3e2793446e744596a4eff53075d | 920ab19b73a7cba21d340a49d9d24e2d1eeabf3d | /idpsreact/bin/automat-visualize | 518eafa6739f15f864b7d8624057a1b909d8f1e5 | [
"MIT"
] | permissive | DTrafford/IDPS | 5fa2b73f2c47cbf50b90a1a786c10f7d69c995b4 | 1eaccfc218adcb7231e64271731c765f8362b891 | refs/heads/master | 2022-12-16T16:28:34.801962 | 2020-03-30T18:08:09 | 2020-03-30T18:08:09 | 234,163,829 | 0 | 0 | MIT | 2020-09-10T06:26:02 | 2020-01-15T20:10:09 | Python | UTF-8 | Python | false | false | 281 | #!/Users/sangit/Downloads/django-react-boilerplate-master/idpsreact/bin/python3
# -*- coding: utf-8 -*-
import re
import sys
from automat._visualize import tool
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(tool())
| [
"d.trafford@outlook.com"
] | d.trafford@outlook.com | |
95e69f614829e398941039bb5e7c6b54d7912473 | 6a7e9e0e9c08132166f566bd88ae1c46ff8f9c0a | /azure-mgmt-resource/azure/mgmt/resource/policy/v2018_03_01/operations/policy_definitions_operations.py | 35d46e882383af32ab876701a41bdc8be7b23c00 | [
"MIT"
] | permissive | ashirey-msft/azure-sdk-for-python | d92381d11c48f194ec9f989f5f803db614fb73f2 | e04778e13306dad2e8fb044970215bad6296afb6 | refs/heads/master | 2020-03-23T06:05:39.283442 | 2018-09-15T00:18:26 | 2018-09-15T00:18:26 | 141,188,192 | 0 | 1 | MIT | 2018-07-16T20:02:52 | 2018-07-16T20:02:52 | null | UTF-8 | Python | false | false | 31,610 | 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 ... | [
"lmazuel@microsoft.com"
] | lmazuel@microsoft.com |
6684ca9dd67bacb41767bd65a1c0c1f2dd8193ce | e07f6ac5559d09eb6f5393650af135c7474f5003 | /recent_news.py | e27c23ffb42fa9cdf553ea3b1d714c6870d9ef68 | [] | no_license | Money-fin/backend | 21e188f3f59ccaa216d1ea4bb7b78f670831cb6f | 909961dc33df84ba3663e622bfdf6ab98f915f5f | refs/heads/master | 2022-12-04T08:32:10.094335 | 2020-08-29T09:57:28 | 2020-08-29T09:57:28 | 291,008,543 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,527 | py | import requests
import sys
sys.path.append("/home/jylee/backend")
import urllib
import os
from bs4 import BeautifulSoup
import numpy as np
import pandas as pd
from helper import KafkaHelper
def new_crawl(link, kafka=False):
url = link
item_info = requests.get(url).text
soup = BeautifulSoup(item_info, 'html.pars... | [
"hyanghope@naver.com"
] | hyanghope@naver.com |
d309ba906885b2264436cea4fe7c0b1cb6487058 | 9edaf93c833ba90ae9a903aa3c44c407a7e55198 | /travelport/models/special_equipment_1.py | d0b34a9eefba484eaeb14ea03e11c478e502ee89 | [] | no_license | tefra/xsdata-samples | c50aab4828b8c7c4448dbdab9c67d1ebc519e292 | ef027fe02e6a075d8ed676c86a80e9647d944571 | refs/heads/main | 2023-08-14T10:31:12.152696 | 2023-07-25T18:01:22 | 2023-07-25T18:01:22 | 222,543,692 | 6 | 1 | null | 2023-06-25T07:21:04 | 2019-11-18T21:00:37 | Python | UTF-8 | Python | false | false | 1,577 | py | from __future__ import annotations
from dataclasses import dataclass, field
from travelport.models.type_element_status_1 import TypeElementStatus1
__NAMESPACE__ = "http://www.travelport.com/schema/common_v52_0"
@dataclass
class SpecialEquipment1:
"""
Parameters
----------
key
type_value
S... | [
"chris@komposta.net"
] | chris@komposta.net |
e8611029177ec93e595d82b86b795cbc307b7108 | d4ab63e2ff846ff509ab3b8a191381bdf8197325 | /project/test_main.py | 8544ed907817ff34f90b366519a3db4337d52c5e | [] | no_license | ibrobabs/task | c2c95d8c83340a38be0ff8a1d7d3da55de33a097 | 82adc4fa54ab9c3606b2770325454916c7f75693 | refs/heads/master | 2021-01-18T17:45:31.392805 | 2017-04-01T05:22:24 | 2017-04-01T05:22:24 | 86,812,161 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,298 | py | import os
import unittest
from project import app, db
from project.config import basedir
from project.models import User
TEST_DB = 'test.db'
class MainTests(unittest.TestCase):
#Setup and Teardown
def setUp(self):
app.config['TESTING'] = True
app.config['WTF_CSRF_ENABLED'] = False
# app.config['DEBUG'] = F... | [
"babskolawole@gmail.com"
] | babskolawole@gmail.com |
37e7b65b2eb87e028e91d5e800045af24ea8b6c0 | b0a217700c563c4f057f2aebbde8faba4b1b26d2 | /software/glasgow/arch/jtag.py | 7c4fe835ca1a2bd2417ce6ed37892e998c03caf9 | [
"0BSD",
"Apache-2.0"
] | permissive | kbeckmann/Glasgow | 5d183865da4fb499099d4c17e878a76192b691e7 | cd31e293cb99ee10a3e4a03ff26f6f124e512c64 | refs/heads/master | 2021-09-15T15:59:38.211633 | 2018-11-15T22:36:04 | 2018-11-22T21:13:59 | 157,077,707 | 3 | 0 | NOASSERTION | 2018-11-11T12:33:49 | 2018-11-11T12:33:48 | null | UTF-8 | Python | false | false | 250 | py | # Ref: IEEE 1149.1
from bitarray import bitarray
from ..support.bits import *
__all__ = [
# DR
"DR_IDCODE",
]
DR_IDCODE = Bitfield("DR_IDCODE", 4, [
("present", 1),
("mfg_id", 11),
("part_id", 16),
("version", 4),
])
| [
"whitequark@whitequark.org"
] | whitequark@whitequark.org |
97450e3407268358d4f64aefe3120b8487b3401e | 425db5a849281d333e68c26a26678e7c8ce11b66 | /maths/fast_pow_and_matrix_multi.py | 987f29bb269b191cf1b8759d9bc80770e1b3e800 | [
"MIT"
] | permissive | lih627/python-algorithm-templates | e8092b327a02506086414df41bbfb2af5d6b06dc | a61fd583e33a769b44ab758990625d3381793768 | refs/heads/master | 2021-07-23T17:10:43.814639 | 2021-01-21T17:14:55 | 2021-01-21T17:14:55 | 238,456,498 | 29 | 8 | null | null | null | null | UTF-8 | Python | false | false | 2,500 | py | import random
def fpowx(x, n):
"""
quick pow: x ** n
"""
res = 1
while n:
if n & 1:
res = res * x
# compute x^2 x^4 x^8
x *= x
n >>= 1
return res
def fmulti(m, n, mod=10 ** 9 + 7):
"""
并没有提速的效果
只是对于其他语言 如c
防止溢出
对 python 没有任何帮助
... | [
"lih627@outlook.com"
] | lih627@outlook.com |
2fae047ea5b7af3cba687716d80fa7aab18a4d0a | 4d259f441632f5c45b94e8d816fc31a4f022af3c | /date/tt.py | 9f4bc74af2f7f817b5cc2a96f52b570bd76401f0 | [] | no_license | xiaoruiguo/lab | c37224fd4eb604aa2b39fe18ba64e93b7159a1eb | ec99f51b498244c414b025d7dae91fdad2f8ef46 | refs/heads/master | 2020-05-25T01:37:42.070770 | 2016-05-16T23:24:26 | 2016-05-16T23:24:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 40 | py | a=['1','2','3']
s = ['sss'*3]+a
print s
| [
"junmein@junmeinde-macbook-pro-3.local"
] | junmein@junmeinde-macbook-pro-3.local |
f4506a41f21652bd250f6896810cd6fbdec72bfb | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03042/s013075072.py | 044f87c3be49952ef7be8bf867e28108c9b4cd05 | [] | 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 | 186 | py | s=int(input())
a=s//100
b=s%100
if a>0 and a<=12:
if b>0 and b<=12:
print("AMBIGUOUS")
else:
print("MMYY")
else:
if b>0 and b<=12:
print("YYMM")
else:
print("NA") | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
62b6273166486acf1ece5437a98e41a0350b1124 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/verbs/_celebrating.py | 305a78d8f0d008577d0f029e5a82a8910f663133 | [
"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 | 261 | py |
from xai.brain.wordbase.verbs._celebrate import _CELEBRATE
#calss header
class _CELEBRATING(_CELEBRATE, ):
def __init__(self,):
_CELEBRATE.__init__(self)
self.name = "CELEBRATING"
self.specie = 'verbs'
self.basic = "celebrate"
self.jsondata = {}
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
2f0cb96aaa337f7309712bd930d65de11673c433 | 55c250525bd7198ac905b1f2f86d16a44f73e03a | /Python/Pytest/pytest-django/pytest_django/plugin.py | cbfe15f79cb04f0e152ebe02bc8b4d3886108f5f | [
"BSD-3-Clause"
] | permissive | NateWeiler/Resources | 213d18ba86f7cc9d845741b8571b9e2c2c6be916 | bd4a8a82a3e83a381c97d19e5df42cbababfc66c | refs/heads/master | 2023-09-03T17:50:31.937137 | 2023-08-28T23:50:57 | 2023-08-28T23:50:57 | 267,368,545 | 2 | 1 | null | 2022-09-08T15:20:18 | 2020-05-27T16:18:17 | null | UTF-8 | Python | false | false | 130 | py | version https://git-lfs.github.com/spec/v1
oid sha256:4b9c174912c01ae59fb496601d8c4ecf26765ee33134d079295304c25873875a
size 26008
| [
"nateweiler84@gmail.com"
] | nateweiler84@gmail.com |
1731a6bc44fffbafb6437d4bb39a9bb76acfeb29 | 45c170fb0673deece06f3055979ece25c3210380 | /toontown/coghq/BossbotCountryClubMazeRoom_Battle00.py | 218b80966c9553066709cc1c2f781554cc97b785 | [] | no_license | MTTPAM/PublicRelease | 5a479f5f696cfe9f2d9dcd96f378b5ce160ec93f | 825f562d5021c65d40115d64523bb850feff6a98 | refs/heads/master | 2021-07-24T09:48:32.607518 | 2018-11-13T03:17:53 | 2018-11-13T03:17:53 | 119,129,731 | 2 | 6 | null | 2018-11-07T22:10:10 | 2018-01-27T03:43:39 | Python | UTF-8 | Python | false | false | 2,389 | py | #Embedded file name: toontown.coghq.BossbotCountryClubMazeRoom_Battle00
from toontown.coghq.SpecImports import *
GlobalEntities = {1000: {'type': 'levelMgr',
'name': 'LevelMgr',
'comment': '',
'parentEntId': 0,
'cogLevel': 0,
'farPlaneDistance': 1500,
'modelFilename': 'ph... | [
"linktlh@gmail.com"
] | linktlh@gmail.com |
c5020aa411c33ba9eb808cd247fe814f9c0ece17 | 8f5f92beeaefcd9effc93da87b26acb5ea159274 | /xtorch/modules/seq2seq_encoders/seq2seq_encoder.py | edcdada140696dba36c224bbb20440c20a1c8b5f | [
"MIT"
] | permissive | altescy/xtorch | 15f984bf08654dc00fc1be603cca696676428cc1 | bcbbbe645f4d62c211af5b3555c526cc60792c32 | refs/heads/main | 2023-04-12T15:45:52.192602 | 2021-04-25T11:35:45 | 2021-04-25T11:35:45 | 361,373,990 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 805 | py | from typing import Optional
import torch
class Seq2seqEncoder(torch.nn.Module):
def forward(
self,
inputs: torch.Tensor,
mask: Optional[torch.BoolTensor] = None,
) -> torch.Tensor:
"""
Parameters
==========
inputs: `torch.Tensor`
Tensor of s... | [
"altescy@fastmail.com"
] | altescy@fastmail.com |
e32d9ecd5addc70ef1833cfb869c834a230a4f2c | 7f97814acd76ca96aee877fd70d401380f848fae | /7_training/re_start_end.py | e5842c00b391813441ccd2346854697e29805bbb | [] | no_license | tberhanu/all_trainings | 80cc4948868928af3da16cc3c5b8a9ab18377d08 | e4e83d7c71a72e64c6e55096a609cec9091b78fa | refs/heads/master | 2020-04-13T12:12:21.272316 | 2019-03-16T04:22:20 | 2019-03-16T04:22:20 | 163,195,802 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 485 | py | """
https://www.hackerrank.com/challenges/re-start-re-end/problem?h_r=next-challenge&h_v=zen
"""
# Enter your code here. Read input from STDIN. Print output to STDOUT
import re
s, k = input(), input()
i = 0
found = False
while i < len(s):
string = s[i:]
match = re.match(r'{}'.format(k), string)
if match ==... | [
"tberhanu@berkeley.edu"
] | tberhanu@berkeley.edu |
edcbbc430b0d1a558d19be8a4a2625b7c762eb20 | 5add80be09ee754fced03e512a9acc214971cddf | /python-code/openvx-learning/helloworld.py | 61352b55542a81f5e56cc66c6767ea1beb6c1d65 | [
"Apache-2.0"
] | permissive | juxiangwu/image-processing | f774a9164de9c57e88742e6185ac3b28320eae69 | c644ef3386973b2b983c6b6b08f15dc8d52cd39f | refs/heads/master | 2021-06-24T15:13:08.900960 | 2019-04-03T10:28:44 | 2019-04-03T10:28:44 | 134,564,878 | 15 | 5 | null | null | null | null | UTF-8 | Python | false | false | 935 | py | from pyvx import vx
context = vx.CreateContext()
images = [
vx.CreateImage(context, 640, 480, vx.DF_IMAGE_UYVY),
vx.CreateImage(context, 640, 480, vx.DF_IMAGE_S16),
vx.CreateImage(context, 640, 480, vx.DF_IMAGE_U8),
]
graph = vx.CreateGraph(context)
virts = [
vx.CreateVirtualImage(graph, 0, 0, vx.DF_IM... | [
"kkoolerter@gmail.com"
] | kkoolerter@gmail.com |
d92df5cd630581d42b06e50bdc1070c5d414a17c | 9647524c0f4d93fb1c8a992c20fe9f9d2710cde3 | /2-content/Python/intro_programming-master/scripts/remove_input_references.py | 2ab8878b1a362f079adf49a971ef71aa7677a4ea | [
"MIT"
] | permissive | bgoonz/web-dev-notes-resource-site | 16161aa68e8eecafeaba4dc7abeb957aaee864c5 | e7dc9c30393597cb39830c49c3f51c1486b97584 | refs/heads/master | 2023-09-01T14:04:20.867818 | 2021-06-17T07:56:20 | 2021-06-17T07:56:20 | 329,194,347 | 7 | 5 | MIT | 2021-07-05T06:36:49 | 2021-01-13T04:34:20 | JavaScript | UTF-8 | Python | false | false | 1,306 | py | # This script removes the input reference numbers from html pages.
# They play a useful role in scientific notebooks, but they are really
# just visual clutter in this project.
# Could be an nbconvert setting, but it's an easy enough scripting job.
import os
import sys
print("\nStripping input reference numbers fro... | [
"bryan.guner@gmail.com"
] | bryan.guner@gmail.com |
dd55eae4011f0cb80d47c940385e7a3ff85cd7a3 | 602fa0e4ce194d3073d78230c61f7053281f9f9b | /code/python/src/categories/catutil.py | df03a0027b66f8d76d4265de7c7074d56b487bab | [] | no_license | ziqizhang/wop | 111cfdda1686a874ff1fc11a453a23fb52d43af1 | ea0c37f444de9f2d5303f74b989f6d1a09feb61d | refs/heads/master | 2022-09-14T20:14:11.575021 | 2021-12-10T21:23:24 | 2021-12-10T21:23:24 | 166,239,995 | 2 | 1 | null | 2022-09-01T23:11:13 | 2019-01-17T14:33:51 | Python | UTF-8 | Python | false | false | 2,128 | py | import pandas as pd
from nltk import PorterStemmer, WordNetLemmatizer
import numpy
from categories import cleanCategories as cc
stemmer = PorterStemmer()
lemmatizer = WordNetLemmatizer()
#0=stem; 1=lem; else=nothing
def normalise_categories(in_file_name, col, stem_or_lem):
df = pd.read_csv(in_file_name, header=0,... | [
"ziqizhang.email@gmail.com"
] | ziqizhang.email@gmail.com |
d384f24b5c0b0b257f66b1db1a63854c59b95395 | 3e4c69317323bca865b025503b60bf83d3ae65f8 | /tests/server/blueprints/variants/test_variant_views_variant.py | c1fd7fe078f8967099df90b24cb215c5a79a60ac | [
"BSD-3-Clause"
] | permissive | tapaswenipathak/scout | f59beaa997a45487ac96c3b3e560b5e5aa9b30ae | c9b3ec14f5105abe6066337110145a263320b4c5 | refs/heads/master | 2020-05-30T11:13:25.662300 | 2019-05-28T09:26:25 | 2019-05-28T09:26:25 | 189,694,812 | 1 | 0 | BSD-3-Clause | 2019-06-01T05:36:35 | 2019-06-01T05:36:34 | null | UTF-8 | Python | false | false | 1,207 | py | # -*- coding: utf-8 -*-
import logging
from flask import url_for
log = logging.getLogger(__name__)
def test_server_variant(app, real_adapter):
# GIVEN an initialized app
# GIVEN a valid user, institute, case and variant
adapter = real_adapter
variant_obj = adapter.variant_collection.find_one()
... | [
"rasi.chiara@gmail.com"
] | rasi.chiara@gmail.com |
d0a3f8fea955cd6b7239c30eb4bde72572683e27 | f2f88a578165a764d2ebb4a022d19e2ea4cc9946 | /pyvisdk/do/guest_authentication.py | f16ac39d82372db0665b605fca27476d5d281d82 | [
"MIT"
] | permissive | pombredanne/pyvisdk | 1ecc68a1bf264095f72f274c776e5868fb302673 | de24eb4426eb76233dc2e57640d3274ffd304eb3 | refs/heads/master | 2021-01-21T16:18:39.233611 | 2014-07-28T19:50:38 | 2014-07-28T19:50:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,039 | py |
import logging
from pyvisdk.exceptions import InvalidArgumentError
########################################
# Automatically generated, do not edit.
########################################
log = logging.getLogger(__name__)
def GuestAuthentication(vim, *args, **kwargs):
'''GuestAuthentication is an abstract base... | [
"guy@rzn.co.il"
] | guy@rzn.co.il |
dd42b52d712e69767f647a33a975f897d68b913f | 5a52ccea88f90dd4f1acc2819997fce0dd5ffb7d | /alipay/aop/api/domain/OssDirectoryDetail.py | 7b7aed746981c86b4885e7159246c6f7d6a7017c | [
"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,270 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class OssDirectoryDetail(object):
def __init__(self):
self._acl = None
self._file_id = None
self._file_name = None
self._last_modified = None
@property
def acl(... | [
"jishupei.jsp@alibaba-inc.com"
] | jishupei.jsp@alibaba-inc.com |
93013a6c44645ef61cb45e633030c20663c3fde6 | 8ef8e6818c977c26d937d09b46be0d748022ea09 | /cv/classification/torchvision/pytorch/train.py | 1c16c81bc51ace035a2653350c088a3888b0904f | [
"Apache-2.0"
] | permissive | Deep-Spark/DeepSparkHub | eb5996607e63ccd2c706789f64b3cc0070e7f8ef | 9d643e88946fc4a24f2d4d073c08b05ea693f4c5 | refs/heads/master | 2023-09-01T11:26:49.648759 | 2023-08-25T01:50:18 | 2023-08-25T01:50:18 | 534,133,249 | 7 | 6 | Apache-2.0 | 2023-03-28T02:54:59 | 2022-09-08T09:07:01 | Python | UTF-8 | Python | false | false | 15,577 | py | # Copyright (c) 2022 Iluvatar CoreX. All rights reserved.
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
import warnings
warnings.filterwarnings('ignore')
import datetime
import os
import logging
import time
import torch
import torch.utils.data
try:
from apex import amp as apex_amp
excep... | [
"jia.guo@iluvatar.ai"
] | jia.guo@iluvatar.ai |
dfc0cc855a774de8fa89bf5d0af2e7761c1399da | cf0ab8503d4d704045070deea1e2125375711e86 | /apps/apikeys/v1/urls.py | 1a8b15c264dc105260d2432da2775b98a3fb3a99 | [] | no_license | faierbol/syncano-platform | c3c6468600115752fd9fa5e46a0ad59f75f6bc9c | 879111874d1ef70418b4890cf970720b0a2be4d8 | refs/heads/master | 2023-07-20T10:13:40.066127 | 2021-02-08T15:01:13 | 2021-02-08T15:01:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 198 | py | # coding=UTF8
from rest_framework.routers import SimpleRouter
from apps.apikeys.v1 import views
router = SimpleRouter()
router.register('api_keys', views.ApiKeyViewSet)
urlpatterns = router.urls
| [
"rk@23doors.com"
] | rk@23doors.com |
42bdb6a885ac58d51bad36beea8877307f7902a5 | eda9187adfd53c03f55207ad05d09d2d118baa4f | /algo/Transfer_Learning/Transfer_learning.py | 725a6e82bceb8aa1d09e9cb263fc2fdf9da6aea1 | [] | no_license | HuiZhaozh/python_tutorials | 168761c9d21ad127a604512d7c6c6b38b4faa3c7 | bde4245741081656875bcba2e4e4fcb6b711a3d9 | refs/heads/master | 2023-07-07T20:36:20.137647 | 2020-04-24T07:18:25 | 2020-04-24T07:18:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,586 | py | # -*- coding:utf-8 -*-
# /usr/bin/python
'''
-------------------------------------------------
File Name : Transfer_learning
Description : 迁移学习
Envs : pytorch
Author : yanerrol
Date : 2020/2/17 09:58
-------------------------------------------------
Change Activity:
... | [
"2681506@gmail.com"
] | 2681506@gmail.com |
57bfefceefd25252047dcd608dff497f0c347b82 | 988dd821269be12c2f56f62b0c35546fd3050537 | /python/quaternions/rotations.py | 852c8839c1435519fcbc0675bd055c4d8af732b7 | [] | no_license | gdiazh/adcs_models | fb19f541eeb9b01ae49ec98719c508d084e4fd7a | 51d0829cc777d2e345e4fabe406ec7f54e661117 | refs/heads/master | 2020-03-28T13:04:56.174852 | 2018-09-28T22:08:25 | 2018-09-28T22:08:25 | 148,364,081 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,050 | py | #!/usr/bin/python
__author__ = 'gdiaz'
import matplotlib as mpl
from plotVectors import PlotVectors
import numpy as np
class Rotation(object):
def __init__(self):
self.vectors = PlotVectors()
self.a = [0, 0, 0]
def rotate_z(self, a, yaw):
Az = np.matrix([[np.cos(yaw), -np.sin(yaw), 0... | [
"g.hernan.diaz@gmail.com"
] | g.hernan.diaz@gmail.com |
f281fed287dbd357fea0ab3bb3bd35efc0794cf4 | 51d65cbed3df1e9e3a0d51f79590ee12f88291d1 | /object_detection/inference_over_image.py | 0bbbdb9954ca69ffd0cf92de7a7cbb7577cf8043 | [
"MIT"
] | permissive | apacha/Mensural-Detector | f9332c23854263c6a3f89e8b92f3f666f8377ed8 | 05c91204cf268feaae84cd079dbe7a1852fba216 | refs/heads/master | 2022-09-23T21:20:53.376367 | 2022-08-31T08:36:35 | 2022-08-31T08:36:35 | 137,372,669 | 12 | 6 | null | null | null | null | UTF-8 | Python | false | false | 6,444 | py | import numpy as np
import tensorflow as tf
import argparse
from PIL import Image
from object_detection.utils import ops as utils_ops, label_map_util, visualization_utils as vis_util
if tf.__version__ < '1.4.0':
raise ImportError('Please upgrade your tensorflow installation to v1.4.* or later!')
def load_image_i... | [
"alexander.pacha@gmail.com"
] | alexander.pacha@gmail.com |
524db47926d6c1b18a65735cec61aad5f9e91b97 | d2c163f246d28b8519f8c89de23556e43be91684 | /www/ad_board/urls.py | 9309b9dfb201f43c13a2ec3d393148de00aea612 | [] | no_license | boogiiieee/Iskcon | d7a2b8bdc3002ef3306fc5e7ddc577504d8533c9 | b672dbafee06af3ee6d646c75f442d97133f5ec9 | refs/heads/master | 2021-09-04T03:11:06.770094 | 2018-01-15T04:21:36 | 2018-01-15T04:21:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 388 | py | # -*- coding: utf-8 -*-
from django.conf.urls.defaults import patterns, include, url
urlpatterns = patterns('ad_board.views',
url(r'^$', 'full', name='ad_board_url'),
url(r'^category/(?P<id>[0-9]+)/$', 'category', name='category_ad_board_url'),
url(r'^(?P<id>[0-9]+)/$', 'item', name='ad_board_item_url'),
url(r'... | [
"shalyapinalexander@gmail.com"
] | shalyapinalexander@gmail.com |
198442838c9414d3f62f9b0af071a325589a66ae | 8840b69e4341f4ed030c8b33151db205b8db3640 | /flask_minijax.py | a5036e1c916ae910ed2af7e28ecdc01b86534110 | [
"MIT"
] | permissive | FidgetYou/proj3-anagrams | b5fe7ccc333bca0895c12590142b9f0e30f10b83 | 86923a696794b7098940023d57aaef679a52b3ac | refs/heads/master | 2021-01-11T01:03:32.507679 | 2016-10-18T01:58:25 | 2016-10-18T01:58:25 | 70,846,302 | 0 | 0 | null | 2016-10-13T20:39:51 | 2016-10-13T20:39:50 | null | UTF-8 | Python | false | false | 1,317 | py | """
Tiny demo of Ajax interaction
"""
import flask
from flask import request # Data from a submitted form
from flask import url_for
from flask import jsonify # For AJAX transactions
import json
import logging
import argparse # For the vocabulary list
import sys
###
# Globals
###
app = flask.Flask(__name__)
import ... | [
"michal.young@gmail.com"
] | michal.young@gmail.com |
6d346848a2eed9d5be67fdb017a17285227f874a | bd5a3b59a5ca9f0c0394c8bf90e818c3967778d9 | /vre/apps/xauth/urls.py | 2ba5dfc62bf27aafa163e3cf36365c4b0ea01be0 | [] | no_license | BlickLabs/vre | 85f377c04406c163464f7ddade7eafb579f1dfb1 | 6f3644fb9295f6355057cfa64a1156a329b4b4b8 | refs/heads/develop | 2020-05-22T04:28:31.913667 | 2018-07-06T21:12:14 | 2018-07-06T21:12:14 | 62,763,239 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 297 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.conf.urls import url
from . import views
urlpatterns = [
url(regex=r'^login/$',
view=views.LoginView.as_view(),
name='login'),
url(regex=r'^logout/$',
view=views.logout_view,
name='logout'),
]
| [
"mauriciodinki@gmail.com"
] | mauriciodinki@gmail.com |
de57cedbc86dec255b93ebc77daf153a873f5256 | 1422a57e98aba02321b772d72f8f0ada6d8b8cba | /friday/friday-vendor/vendor-scripts/test-resources/scripts/pylib/hue_turn_on_light.py | 152b15f1a6ee7c7306946bab089ea4f1578d9421 | [
"MIT"
] | permissive | JonasRSV/Friday | e1908a411aa133bc5bd2f383b0a995f7e028092d | f959eff95ba7b11525f97099c8f5ea0e325face7 | refs/heads/main | 2023-05-15T03:33:21.542621 | 2021-06-12T10:34:50 | 2021-06-12T10:34:50 | 315,309,991 | 7 | 2 | null | null | null | null | UTF-8 | Python | false | false | 196 | py | import phue
import sys
if __name__ == "__main__":
b = phue.Bridge(config_file_path="credentials.json")
b.set_light(int(sys.argv[1]), parameter={"on": True, "bri": 200}, transitiontime=5)
| [
"jonas@valfridsson.net"
] | jonas@valfridsson.net |
1a94d4955bc1347ae86d5992a523abcfbfb17267 | 5da2c116d3d0dc4f3811cec144c9f8b5a74afede | /lncrawl/assets/user_agents.py | fbec17aabe02c7b79f52106cf5ee397fca225e17 | [
"Apache-2.0"
] | permissive | NNTin/lightnovel-crawler | a08bd252f2e72f41f931f0b2165f906b64d33692 | 451e816ab03c8466be90f6f0b3eaa52d799140ce | refs/heads/master | 2021-06-23T12:07:43.668329 | 2021-04-25T01:51:26 | 2021-04-25T01:51:26 | 361,695,538 | 2 | 0 | Apache-2.0 | 2021-04-26T16:48:21 | 2021-04-26T09:40:46 | null | UTF-8 | Python | false | false | 6,302 | py | # -*- coding: utf-8 -*-
user_agents = [
# "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0",
# "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:15.0) Gecko/20100101 Firefox/15.0.1",
# "Mozilla/5.0 (X11; CrOS x86_64 8172.45.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.6... | [
"dipu.sudipta@gmail.com"
] | dipu.sudipta@gmail.com |
c43501f1134f44d9e0c3c38a8ce719ea17e5bbcb | 3253da5603971958d69df0ed442e3341a8d3bff4 | /1-Iniciante/1914.py | 67fa34c039b20ad33bd528808a4ce2d4016000af | [] | no_license | CleitonSilvaT/URI_Python | 1c73ec0852ae87c6138baa148ad8c2cb56bb723e | a8510bab2fa8f680b54058fafebff3a2727617d9 | refs/heads/master | 2021-06-20T08:18:50.104839 | 2021-05-20T08:59:19 | 2021-05-20T08:59:19 | 213,665,657 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 959 | py | # -*- coding: utf-8 -*-
if __name__ == '__main__':
# Entrada
casos_teste = int(input())
while(casos_teste > 0):
# Entrada
dados = input()
escolha = dados.split(' ')
# nomepessoa1 - escolha[0]
# escolhapessoa1 - escolha[1]
# nomepessoa2 - escolha[2]
#... | [
"cleitonsilvatavares@gmail.com"
] | cleitonsilvatavares@gmail.com |
b672c87e3458490ceb0e8b3852355a8c15a2c399 | d1fadc514274711a7986a6b3caaaee7e8d48b4a6 | /plot_scripts/scratch29.py | 9b454212d7485e7e1237f495490e6b1a3e2c0169 | [
"MIT"
] | permissive | lbaiao/sys-simulator-2 | 24d940db6423070818c23b6ffefbc5da4a1030a0 | 94f00d43309fe7b56dac5099bd4024695ba317b6 | refs/heads/master | 2021-08-20T08:30:06.864473 | 2021-06-30T10:37:26 | 2021-06-30T10:37:26 | 230,333,523 | 1 | 0 | null | 2021-06-30T10:37:27 | 2019-12-26T22:02:59 | Jupyter Notebook | UTF-8 | Python | false | false | 1,688 | py | import pickle
import matplotlib.pyplot as plt
import numpy as np
filepath = 'D:/Dev/sys-simulator-2/data/scratch29.pickle'
file = open(filepath, 'rb')
data = pickle.load(file)
aux_range = [10,15,20]
action_counts_total = data['action_counts_total']
d2d_spectral_effs = data['d2d_speffs_avg_total']
mue_success_rate = ... | [
"lucasbaiao@gmail.com"
] | lucasbaiao@gmail.com |
0ec404b9b92a1950ead916d9356841cf3bb18eb4 | d7bf691c35d7bf2a5707e47d7aca98b509e02eb9 | /pddlstream/algorithms/algorithm.py | 7a29c0eba6f399ea3752c4684788b164a65873f9 | [
"MIT"
] | permissive | himanshisyadav/pddlstream | 7d43c16da903504a0232408a7d8077fd4da95d87 | 1038e702f1d4625791f1da7867d6226b02af8c3a | refs/heads/master | 2020-04-11T11:48:19.324553 | 2018-11-14T18:28:27 | 2018-11-14T18:28:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,291 | py | import time
from collections import OrderedDict, deque, namedtuple, Counter
from pddlstream.algorithms.downward import parse_domain, get_problem, task_from_domain_problem, \
parse_lisp, sas_from_pddl, parse_goal
from pddlstream.algorithms.search import abstrips_solve_from_task
from pddlstream.language.constants im... | [
"caelan@mit.edu"
] | caelan@mit.edu |
2445240430a4f61b9f76afca22102c4397f33bd7 | 6fcfb638fa725b6d21083ec54e3609fc1b287d9e | /python/gkioxari_RstarCNN/RstarCNN-master/lib/datasets/attr_bpad.py | 1d8c0fb80696afdd175613117b34dc6d6c4573fd | [] | no_license | LiuFang816/SALSTM_py_data | 6db258e51858aeff14af38898fef715b46980ac1 | d494b3041069d377d6a7a9c296a14334f2fa5acc | refs/heads/master | 2022-12-25T06:39:52.222097 | 2019-12-12T08:49:07 | 2019-12-12T08:49:07 | 227,546,525 | 10 | 7 | null | 2022-12-19T02:53:01 | 2019-12-12T07:29:39 | Python | UTF-8 | Python | false | false | 10,478 | py | # --------------------------------------------------------
# Fast R-CNN
# Copyright (c) Microsoft. All rights reserved.
# Written by Ross Girshick, 2015.
# Licensed under the BSD 2-clause "Simplified" license.
# See LICENSE in the project root for license information.
# -------------------------------------------------... | [
"659338505@qq.com"
] | 659338505@qq.com |
6e412c2830f0c0210c5542502eff73dfa2776a76 | 1b78ca7f3250ebed418717c6ea28b5a77367f1b8 | /411.minimum-unique-word-abbreviation/minimum-unique-word-abbreviation.py | 70887cecba089f780017d17a96ca6739c187979c | [] | no_license | JaniceLC/lc-all-solutions | ced854f31b94f44c0b03a0677988805e3b9ee718 | 3f2a4ee8c09a8890423c6a22c73f470eccf979a2 | refs/heads/master | 2020-04-05T19:53:31.307528 | 2018-11-12T04:18:45 | 2018-11-12T04:18:45 | 157,155,285 | 0 | 2 | null | 2018-11-12T04:13:22 | 2018-11-12T04:13:22 | null | UTF-8 | Python | false | false | 1,290 | py | class Solution(object):
def minAbbreviation(self, target, dictionary):
"""
:type target: str
:type dictionary: List[str]
:rtype: str
"""
def dfs(w, start, res):
res.append(w)
for i in xrange(start, len(w)):
for l in re... | [
"jedihy@yis-macbook-pro.local"
] | jedihy@yis-macbook-pro.local |
8cf1337f8036de2054ba11a4c1ef5921ff9e2863 | 641f76328bfeb7e54f0793a18c5b7c00595b98fd | /apps/goods/migrations/0015_auto_20181019_1007.py | a9bf43d5073534905d8a89c4b1ee68ce1ac10451 | [
"Apache-2.0"
] | permissive | lianxiaopang/camel-store-api | 1d16060af92eb01607757c0423377a8c94c3a726 | b8021250bf3d8cf7adc566deebdba55225148316 | refs/heads/master | 2020-12-29T13:23:18.118617 | 2020-02-09T08:38:53 | 2020-02-09T08:38:53 | 238,621,246 | 0 | 0 | Apache-2.0 | 2020-02-07T14:28:35 | 2020-02-06T06:17:47 | Python | UTF-8 | Python | false | false | 1,439 | py | # Generated by Django 2.1.2 on 2018-10-19 02:07
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('goods', '0014_auto_20181011_1646'),
]
operations = [
migrations.AlterModelOptions(
name='goodscategory',
options={'o... | [
"lyh@gzqichang.com"
] | lyh@gzqichang.com |
d01b1468d7aaf781d587e8b861611e92d26f28dd | e8f99a162207cba82d4e0f969d7bcdb2b9d8b522 | /imooc/python3_shizhan/ten/c1.py | 6a78a3e875eb35796ea35e07c606f9f44d0ef637 | [] | no_license | TesterCC/Python3Scripts | edb5446278ebf13edb64336001081941ca27d67d | 58be67e1ffc74ef50289a885aa4ad05f58e2c383 | refs/heads/master | 2023-08-30T21:16:38.328045 | 2023-08-17T11:23:08 | 2023-08-17T11:23:08 | 93,401,996 | 6 | 3 | null | null | null | null | UTF-8 | Python | false | false | 721 | py | #!/usr/bin/env python
# -*- coding:utf-8 -*-
__author__ = 'MFC'
__time__ = '18/5/2 21:48'
"""
第10章 正则表达式与JSON
正则表达式
JSON XML
正则表达式是一个特殊的字符序列,一个字符串是否与我们所设定的这样的字符序列相匹配。
快速检索文本、实现一些替换文本的操作
1.检查一串数字是否是电话号码
2.检测一个字符串是否符合email
3.把一个文本里指定的单词替换为另外一个单词
如果正则用的6,可以不用很多内置方法
"""
a = 'C|C++|Java|C#|Python|Javascript'
# Python... | [
"liyanxi07@gmail.com"
] | liyanxi07@gmail.com |
b4e2926b4134199eaadf96a67e52631ed4a9bbce | 427200bdf814d859665f449542fe6c9c1de5a96c | /doc/source/conf.py | a9715d0ad0714672009bacc401a85b5984fd9da9 | [
"BSD-3-Clause"
] | permissive | giltis/pyRafters | c54f6c4c8f02370ad168a3c90d1ce490077b5d78 | 94bf0e1d671ce58f6cbc09600e99a6d2a4b0127c | refs/heads/master | 2021-01-22T13:22:19.768905 | 2014-03-28T13:40:24 | 2014-03-28T13:40:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,737 | py | # -*- coding: utf-8 -*-
#
# PyLight documentation build configuration file, created by
# sphinx-quickstart on Thu Jan 30 13:08:54 2014.
#
# 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.
#
# A... | [
"tcaswell@bnl.gov"
] | tcaswell@bnl.gov |
a502baacd568f4ec8f715ef459a5d0689434064b | 5e557741c8867bca4c4bcf2d5e67409211d059a3 | /torch/distributed/elastic/agent/server/local_elastic_agent.py | c84df1a8e434267abf07aca90210e89b834c1b00 | [
"BSD-2-Clause",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"BSL-1.0",
"Apache-2.0"
] | permissive | Pandinosaurus/pytorch | a2bb724cfc548f0f2278b5af2fd8b1d2758adb76 | bb8978f605e203fbb780f03010fefbece35ac51c | refs/heads/master | 2023-05-02T20:07:23.577610 | 2021-11-05T14:01:30 | 2021-11-05T14:04:40 | 119,666,381 | 2 | 0 | NOASSERTION | 2021-11-05T19:55:56 | 2018-01-31T09:37:34 | C++ | UTF-8 | Python | false | false | 9,100 | py | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
import os
import shutil
import signal
import tempfile
from typing import Any, Dict, Opti... | [
"facebook-github-bot@users.noreply.github.com"
] | facebook-github-bot@users.noreply.github.com |
197926393868d21e6ae154a9dd519b9c67bbad9c | cd014fae6791f51a9a382f34dbdcee6d61d84e30 | /64_eqf_fveqf_fvf_fvegf/64.py | 64fae91ef51cb384faf818ac502876f63733d358 | [
"Apache-2.0"
] | permissive | ckclark/Hackquest | 1505f50fc2c735db059205d1c9bbba1832cc5059 | 65ed5fd32e79906c0e36175bbd280d976c6134bd | refs/heads/master | 2021-01-16T19:32:29.434790 | 2015-09-29T13:39:04 | 2015-09-29T13:39:04 | 42,388,846 | 13 | 5 | null | null | null | null | UTF-8 | Python | false | false | 460 | py | lines = [x.strip() for x in open('64.txt').readlines()]
for shift in [16]: #range(len(lines[0])):
out_graph = []
for line in lines:
out_line = []
for i in range(len(line) - shift):
if line[i] == line[i + shift]:
out_line.append(' ')
else:
o... | [
"clark.ck@gmail.com"
] | clark.ck@gmail.com |
5920ba78e09eb4f5be44b465dda4879c3b817140 | 1bfebc7e1c95cd3c25024b6b1adbf518e55513bf | /src/pykit/strutil/test/test_hex.py | 111d8a160a9a91f0c53b0653ae2f85d8536d8489 | [
"MIT"
] | permissive | bsc-s2/ops | a9a217a47dad558285ca8064fa29fdff10ab4ad7 | 6fb8ad758b328a445005627ac1e5736f17088cee | refs/heads/master | 2021-06-24T09:32:49.057026 | 2020-11-02T06:50:01 | 2020-11-02T06:50:01 | 123,527,739 | 8 | 0 | MIT | 2020-09-03T04:58:26 | 2018-03-02T03:54:20 | Python | UTF-8 | Python | false | false | 5,256 | py | #!/usr/bin/env python2
# coding: utf-8
import os
import unittest
from pykit import strutil
from pykit.strutil import Hex
from pykit import ututil
from pykit import utfjson
dd = ututil.dd
class TestHex(unittest.TestCase):
def test_init(self):
byte_length = 3
cases = (
(0, 0),
... | [
"drdr.xp@gmail.com"
] | drdr.xp@gmail.com |
9ecc842f23895f3713c99a55702174b7192797fa | 31e7aa5176876e6caf7ff9b37336b39292c9dd5b | /selfdrive/controls/lib/pathplanner.py | de43c041805990c89541efeab04f50f6241ea132 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | avolmensky/openpilot | 02d822f7eb50bb74368c794a3d580f95a53c2ca4 | dc61915529aabfad62061e784f277af311013cf1 | refs/heads/devel | 2021-12-15T01:43:10.994332 | 2020-02-14T01:30:43 | 2020-02-14T02:33:40 | 191,065,999 | 2 | 9 | MIT | 2019-06-26T10:13:29 | 2019-06-09T23:32:13 | C | UTF-8 | Python | false | false | 9,158 | py | import os
import math
from common.realtime import sec_since_boot, DT_MDL
from selfdrive.swaglog import cloudlog
from selfdrive.controls.lib.lateral_mpc import libmpc_py
from selfdrive.controls.lib.drive_helpers import MPC_COST_LAT
from selfdrive.controls.lib.lane_planner import LanePlanner
from selfdrive.config import ... | [
"user@comma.ai"
] | user@comma.ai |
ea9891c42ef6fc7f1ca7896c9b1e6aadd4fe3db7 | 38221ca553059a83ed8f64e2cb25181ed88da275 | /deeppavlov/models/spelling_correction/levenstein/tabled_trie.py | 502376482ef26e8fc4feca5ddd880788e9dcc39f | [
"Apache-2.0",
"Python-2.0"
] | permissive | stenpiren/DeepPavlov | 7153ce828225d9d1fdf1c171794efe463f2e9dea | fe59facab4854f2fe56ed126e27eb9696ad6dfd8 | refs/heads/master | 2020-03-23T10:08:53.962961 | 2018-07-16T22:10:17 | 2018-07-16T22:10:17 | 141,427,836 | 1 | 0 | Apache-2.0 | 2018-07-18T11:50:30 | 2018-07-18T11:50:30 | null | UTF-8 | Python | false | false | 19,969 | py | import copy
from collections import defaultdict
import numpy as np
class Trie:
"""
Реализация префиксного бора (точнее, корневого направленного ациклического графа)
Атрибуты
--------
alphabet: list, алфавит
alphabet_codes: dict, словарь символ:код
compressed: bool, индикатор сжатия
c... | [
"seliverstov.a@gmail.com"
] | seliverstov.a@gmail.com |
50b28d0ed7daa7be97decf477b846c80cd2df47e | 4f0385a90230c0fe808e8672bb5b8abcceb43783 | /框架/crawler/scrapy/scrapy_demo/scrapy_demo/spiders/quotes.py | 8c9928611b92d882b2c0eebf7d5163ee20e145da | [] | no_license | lincappu/pycharmlearningproject | 4084dab7adde01db9fa82a12769a67e8b26b3382 | b501523e417b61373688ba12f11b384166baf489 | refs/heads/master | 2023-07-10T05:21:15.163393 | 2023-06-29T14:02:35 | 2023-06-29T14:02:35 | 113,925,289 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,268 | py | # -*- coding: utf-8 -*-
import os
import sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
import scrapy
from scrapy_demo import items
from scrapy_demo import settings
import scrapy.settings
from scrapy.mail import MailSender
# 这是最普通的爬虫形式,
# class QuotesSpider... | [
"lincappu@163.com"
] | lincappu@163.com |
ec31acbdb0cf41622d1a325d3f894382ad8fd78f | d4fa331d7d8a00865f99ee2c05ec8efc0468fb63 | /alg/remove_k_digits.py | f25427c08b7db78277402c25b6aa25fed1054238 | [] | no_license | nyannko/leetcode-python | 5342620c789a02c7ae3478d7ecf149b640779932 | f234bd7b62cb7bc2150faa764bf05a9095e19192 | refs/heads/master | 2021-08-11T04:11:00.715244 | 2019-02-05T15:26:43 | 2019-02-05T15:26:43 | 145,757,563 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 537 | py | class Solution(object):
def removeKdigits(self, num, k):
"""
:type num: str
:type k: int
:rtype: str
"""
if len(num) <= k:
return '0'
stack = []
for i in num:
while stack and k > 0 and stack[-1] > i:
stack.pop()... | [
"9638293+nyannko@users.noreply.github.com"
] | 9638293+nyannko@users.noreply.github.com |
1f97596a4534396f4848c29caeee8100eb7f788e | de1abd0ebbb817aa5f23d369e7dda360fd6f1c32 | /chapter3/scrapy/wikiSpider/wikiSpider/settings.py | 9bf879252847b3f89efa7323e1c40f4f86ae3b30 | [] | no_license | CodedQuen/Web-Scraping-with-Python- | 33aaa2e3733aa1f2b8c7a533d74f5d08ac868197 | 67f2d5f57726d5a943f5f044480e68c36076965b | refs/heads/master | 2022-06-13T01:34:39.764531 | 2020-05-05T11:07:01 | 2020-05-05T11:07:01 | 261,435,932 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,258 | py | # -*- coding: utf-8 -*-
# Scrapy settings for wikiSpider project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# http://doc.scrapy.org/en/latest/topics/settings.html
# http://scrapy.readthedocs.or... | [
"noreply@github.com"
] | CodedQuen.noreply@github.com |
ba1cba5c8a2a1b7898a46fb6a4abeebd84541336 | 51885da54b320351bfea42c7dd629f41985454cd | /abc075/c.py | 18f98c98169acb0c09d089c7c2b89ef4b8bc0bd0 | [] | no_license | mskt4440/AtCoder | dd266247205faeda468f911bff279a792eef5113 | f22702e3932e129a13f0683e91e5cc1a0a99c8d5 | refs/heads/master | 2021-12-15T10:21:31.036601 | 2021-12-14T08:19:11 | 2021-12-14T08:19:11 | 185,161,276 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,777 | py | #
# abc075 c
#
import sys
from io import StringIO
import unittest
from collections import deque
class TestClass(unittest.TestCase):
def assertIO(self, input, output):
stdout, stdin = sys.stdout, sys.stdin
sys.stdout, sys.stdin = StringIO(), StringIO(input)
resolve()
sys.stdout.seek... | [
"mskt4440@gmail.com"
] | mskt4440@gmail.com |
70e19baa27259958c38615665bee3f6c8ac77d48 | b8cc6d34ad44bf5c28fcca9e0df01d9ebe0ee339 | /入门学习/threading_dead_lock-eg.py | 277a2b79b337003460067bedae3cb0eeca00cd29 | [] | no_license | python-yc/pycharm_script | ae0e72898ef44a9de47e7548170a030c0a752eb5 | c8947849090c71e131df5dc32173ebe9754df951 | refs/heads/master | 2023-01-05T06:16:33.857668 | 2020-10-31T08:09:53 | 2020-10-31T08:09:53 | 296,778,670 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,591 | py | """
import threading
import time
lock_1 = threading.Lock()
lock_2 = threading.Lock()
def func_1():
print("func_1 starting......")
lock_1.acquire()
print("func_1 申请了 lock 1 ......")
time.sleep(2)
print("func_1 等待 lock_2 .......")
lock_2.acquire()
print("func_1 申请了 lock 2 ......")
lock_... | [
"15655982512.com"
] | 15655982512.com |
90d662d9b82ee1a8490bdc09aa96fc25d2c0ce6e | 832852c679816673f708860929a36a20ca8d3e32 | /Configurations/HighMass/Full2017/configuration_mm.py | 1ee0bb7d5dbf9cfab8779a7973ed2065f8bd52d3 | [] | no_license | UniMiBAnalyses/PlotsConfigurations | c4ec7376e2757b838930dfb2615e1dc99a64e542 | 578fe518cfc608169d3418bcb63a8342d3a24390 | refs/heads/master | 2023-08-31T17:57:45.396325 | 2022-09-01T10:13:14 | 2022-09-01T10:13:14 | 172,092,793 | 0 | 13 | null | 2023-04-27T10:26:52 | 2019-02-22T15:52:44 | Python | UTF-8 | Python | false | false | 905 | py | # example of configuration file
treeName= 'Events'
tag = 'Full2017_mm'
# used by mkShape to define output directory for root files
outputDir = 'rootFile_'+tag
# file with TTree aliases
aliasesFile = 'aliases.py'
# file with list of variables
variablesFile = 'variables.py'
# file with list of cuts
cutsFile = 'cut... | [
"dennis.roy@cern.ch"
] | dennis.roy@cern.ch |
e1c8772a70ff0b7a5ead0b6c73d8adda9807dd1a | 28c598bf75f3ab287697c7f0ff1fb13bebb7cf75 | /testgame.mmo/genesis/spawn/spawnmain.py | d1a6e96ee033931ad1e1cf4df3507ff6d4965fc9 | [] | no_license | keaysma/solinia_depreciated | 4cb8811df4427261960af375cf749903d0ca6bd1 | 4c265449a5e9ca91f7acf7ac05cd9ff2949214ac | refs/heads/master | 2020-03-25T13:08:33.913231 | 2014-09-12T08:23:26 | 2014-09-12T08:23:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 338 | py |
import races
import animal
import npc
"""
#Critter Pack
#http://www.mmoworkshop.com/trac/mom/wiki/Store
"""
#import critters
"""
#Monster Pack Examples
#http://www.mmoworkshop.com/trac/mom/wiki/Store
"""
#import monsters
"""
Mythical Creature Pack Examples
http://www.mmoworkshop.com/trac/mom/wiki/Store
"""
#im... | [
"mixxit@soliniaonline.com"
] | mixxit@soliniaonline.com |
0ce5054c29d7414e6c56e074af1b1ef1b32afe58 | f95e73867e4383784d6fdd6a1c9fe06cffbfd019 | /CheckIO/HOME/pawn_brotherhood.py | 4b0929a05d3c3562eadcb0a6374c8a5fdf00444c | [] | 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 | 554 | py | #!/usr/bin/env python
# *-* coding:UTF-8 *-*
def safe_pawns(pawns):
cnt=0
for l in pawns:
col,row=l.lower()
if int(row)==1:
continue
if col>='b' and chr(ord(col)-1)+str(int(row)-1) in pawns or col<='g' and chr(ord(col)+1)+str(int(row)-1) in pawns:
cnt+=1
return cnt
if __name__ == '__main__... | [
"llinxiaohui@126.com"
] | llinxiaohui@126.com |
6fef01c2498c9a9b7a52d8a294080b7fe61d6627 | 487ce91881032c1de16e35ed8bc187d6034205f7 | /codes/CodeJamCrawler/CJ/16_2_1_Dom_ju.py | c726b4de6450f76ad915989d09c20461a1c9a8cd | [] | 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 | 538 | py | DOWNLOAD_DIR = "/Users/Dom/Downloads/"
def jopen( filename ):
return open( DOWNLOAD_DIR+filename+".in", "r")
def jout( filename, results, linebreaks=False ):
f = open(DOWNLOAD_DIR+filename+".out","w")
for n in range(len(results)):
f.write( "Case #" + str(n+1) + ": " )
if isinstance(n, list... | [
"[dhuo@tcd.ie]"
] | [dhuo@tcd.ie] |
1e4f57cb7ae54552f4520fc68b828043c2167752 | e41c10e0b17265509fd460f860306784522eedc3 | /basic_config.py | 8e0791dbf7f899d792c04ef3414e39b0ef1d7b41 | [
"CC0-1.0"
] | permissive | hyyc116/research_paradigm_changing | c77ecf2533a6b2e2cd3f74fc3d3073454bffc55c | eac69c45a7a17eb70ace185fa22831ac785e504e | refs/heads/master | 2020-11-24T05:48:07.973347 | 2019-12-18T12:17:02 | 2019-12-18T12:17:02 | 227,992,284 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,102 | py | #coding:utf-8
import os
import sys
import json
from collections import defaultdict
from collections import Counter
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from scipy.optimize import curve_fit
from sklearn.metrics import r2_score
import math
import numpy as np
import random
import logging... | [
"hyyc116@gmail.com"
] | hyyc116@gmail.com |
fc9e559deb7f5bddce6f8748ac93e3cc190dfb31 | 0130533e0f40a0f1cf476f519a3673b10ceabff3 | /teste/maximo.py | b0fd9c6f4d4edd354a14ef1c57bb97f12fe9654e | [] | no_license | danielcanuto/revisao_python | d79c8fbf475e1cea12ca9719d02868666e0591db | 3dbd2af74c7cc94f8e1962acb4069f40d0e71772 | refs/heads/main | 2023-03-02T04:37:30.777336 | 2021-02-11T11:16:54 | 2021-02-11T11:16:54 | 337,031,753 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 141 | py | def maior(x, y):
if x > y:
return x
else:
return y
def maximo(x, y, z):
a = maior(x, y)
return maior(a, z)
| [
"danielpscanuto83@gmail.com"
] | danielpscanuto83@gmail.com |
abcfc7f85883e49ffa5113a31431886ddf533f5c | 5b1b478b0e7b8069762855baa8a2a4f6ff48ebf4 | /src/reviews/forms.py | bf83b29d371abc3b2b2686430c5fe69d7b383f5e | [
"MIT"
] | permissive | junaidq1/greendot | 9e4a0402fcee7182ca7531a0dd4a48edb43f79c5 | cd9e7791523317d759e0f5f9cf544deff34a8c79 | refs/heads/master | 2020-04-06T06:54:07.994376 | 2016-09-11T18:33:15 | 2016-09-11T18:33:15 | 61,906,579 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,047 | py | from django import forms
from .models import Review, Employee
from registration.forms import RegistrationFormUniqueEmail #this is to edit the registration redux form
# class ReviewForm(forms.ModelForm):
# class Meta:
# model = Review
# fields = [
# "content",
# "employee",
# "work_again",
# ]
#actual rev... | [
"junaidq1@gmail.com"
] | junaidq1@gmail.com |
e1c50ce55b94d0b8974045c6d12124d2db102332 | 21b39d50e4df56ea01453001845d1580729af1df | /jdcloud_sdk/services/redis/apis/DescribeClientListRequest.py | 450146bb94baa2db571d11a497779f82c80cb4ac | [
"Apache-2.0"
] | permissive | Tanc009/jdcloud-sdk-python | ef46eac7731aa8a1839b1fc1efd93249b7a977f0 | 8b045c99bc5b73ca7348e950b6f01e03a27982f5 | refs/heads/master | 2021-08-09T14:49:16.177709 | 2021-06-25T02:38:41 | 2021-06-25T02:38:41 | 141,714,695 | 0 | 0 | Apache-2.0 | 2018-07-20T13:21:17 | 2018-07-20T13:21:16 | null | UTF-8 | Python | false | false | 1,572 | py | # coding=utf8
# Copyright 2018 JDCLOUD.COM
#
# 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 ... | [
"tancong@jd.com"
] | tancong@jd.com |
425bbfbbe5ae1399dac988c42a53fa836aa09111 | cbfddfdf5c7fa8354162efe50b41f84e55aff118 | /venv/lib/python3.7/site-packages/nltk/tokenize/punkt.py | f0dcaca359521808d4344948c5389317ab0fdec1 | [
"MIT",
"Apache-2.0"
] | permissive | tclerico/SAAC | 8d2245221dd135aea67c5e079ac7eaf542b25e2f | 2f52007ae8043096662e76da828a84e87f71091e | refs/heads/master | 2022-12-09T21:56:33.430404 | 2019-02-20T14:23:51 | 2019-02-20T14:23:51 | 153,152,229 | 3 | 0 | MIT | 2022-09-16T17:52:47 | 2018-10-15T17:13:29 | Python | UTF-8 | Python | false | false | 62,162 | py | # Natural Language Toolkit: Punkt sentence tokenizer
#
# Copyright (C) 2001-2018 NLTK Project
# Algorithm: Kiss & Strunk (2006)
# Author: Willy <willy@csse.unimelb.edu.au> (original Python port)
# Steven Bird <stevenbird1@gmail.com> (additions)
# Edward Loper <edloper@gmail.com> (rewrite)
# Joel... | [
"timclerico@gmail.com"
] | timclerico@gmail.com |
7c6e2ad300adefc46b95d659f9cefe698aeb499b | 20f951bd927e4e5cde8ef7781813fcf0d51cc3ea | /fossir/modules/events/contributions/models/subcontributions.py | 9ff806fba366acfa3d3ecfa78f127ae91c426fa9 | [] | no_license | HodardCodeclub/SoftwareDevelopment | 60a0fbab045cb1802925d4dd5012d5b030c272e0 | 6300f2fae830c0c2c73fe0afd9c684383bce63e5 | refs/heads/master | 2021-01-20T00:30:02.800383 | 2018-04-27T09:28:25 | 2018-04-27T09:28:25 | 101,277,325 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 4,998 | py |
from __future__ import unicode_literals
from fossir.core.db import db
from fossir.core.db.sqlalchemy.attachments import AttachedItemsMixin
from fossir.core.db.sqlalchemy.descriptions import DescriptionMixin, RenderMode
from fossir.core.db.sqlalchemy.notes import AttachedNotesMixin
from fossir.core.db.sqlalchemy.util... | [
"hodardhazwinayo@gmail.com"
] | hodardhazwinayo@gmail.com |
6305acaf43a088e91df5df323d21cd70ced14c36 | a062669a7f37412f016534ae30bd41e9efe6afa5 | /product/migrations/0013_auto_20201127_0026.py | 8b034f4bd8a91d3a1e265777d20c4ce041f762fb | [] | no_license | techappg/meat_fun_backend | 7c05045ae0ca6a442eb6e24693a800ca98447e9b | e16da0ec1ccfb583a43f534ad9fd6cb79fe1e6c1 | refs/heads/main | 2023-04-16T22:42:38.183722 | 2021-04-22T07:37:07 | 2021-04-22T07:37:07 | 360,430,038 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 396 | py | # Generated by Django 3.1 on 2020-11-27 08:26
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('product', '0012_auto_20201127_0024'),
]
operations = [
migrations.AlterField(
model_name='contact_us',
n... | [
"techappg@gmail.com"
] | techappg@gmail.com |
ed6a4ab01226c402541becc7afe28423eff22758 | 036a41c913b3a4e7ae265e22a672dd89302d3200 | /0201-0300/0248/0248_Python_1.py | 760cb2e6b8f7b3dda42f9d212933b86444a78d20 | [] | no_license | ChangxingJiang/LeetCode | e76f96ebda68d7ade53575354479cfc33ad4f627 | a2209206cdd7229dd33e416f611e71a984a8dd9e | refs/heads/master | 2023-04-13T15:23:35.174390 | 2021-04-24T05:54:14 | 2021-04-24T05:54:14 | 272,088,506 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,018 | py | class Solution:
# 已知开始范围,计算两个数之间的数量
@staticmethod
def num1(low, high, middle=False):
if middle:
return len([str(i) for i in [0, 1, 8] if int(low) <= i <= int(high)])
else:
return len([str(i) for i in [0, 1, 6, 8, 9] if int(low) < i < int(high)])
# 计算各个位的数量
@s... | [
"1278729001@qq.com"
] | 1278729001@qq.com |
9277ddc026afe786dbfa6c7fce9b98dc97c38959 | 19cec240505e27546cb9b10104ecb16cc2454702 | /linux/app/web/python/wikicode/dc/__init__.py | 92f91ec3adc810b7ed3614687a82c4219108541c | [] | no_license | imosts/flume | 1a9b746c5f080c826c1f316a8008d8ea1b145a89 | a17b987c5adaa13befb0fd74ac400c8edbe62ef5 | refs/heads/master | 2021-01-10T09:43:03.931167 | 2016-03-09T12:09:53 | 2016-03-09T12:09:53 | 53,101,798 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,572 | py | import sys, socket, os, wikicode
import flume.flmos as flmo
from wikicode import to_rpc_proxy
class Declassifier (object):
def config (self):
"""
This is a CGI program used to configure the declassifier
"""
import wikicode
class Config (wikicode.extension):
def r... | [
"imosts"
] | imosts |
3e200464fcd0c7743e17cb6998f1810928aa115a | a2b6bc9bdd2bdbe5871edb613065dd2397175cb3 | /Cookbook/Array/岛屿数量.py | 571395c6c2f6f2f328b0dda10d09b4a6f34e41e6 | [] | no_license | Asunqingwen/LeetCode | ed8d2043a31f86e9e256123439388d7d223269be | b7c59c826bcd17cb1333571eb9f13f5c2b89b4ee | refs/heads/master | 2022-09-26T01:46:59.790316 | 2022-09-01T08:20:37 | 2022-09-01T08:20:37 | 95,668,066 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,635 | py | '''
给你一个由 '1'(陆地)和 '0'(水)组成的的二维网格,请你计算网格中岛屿的数量。
岛屿总是被水包围,并且每座岛屿只能由水平方向和/或竖直方向上相邻的陆地连接形成。
此外,你可以假设该网格的四条边均被水包围。
示例 1:
输入:grid = [
["1","1","1","1","0"],
["1","1","0","1","0"],
["1","1","0","0","0"],
["0","0","0","0","0"]
]
输出:1
示例 2:
输入:grid = [
["1","1","0","0","0"],
["1","1","0","0","0"],
["0","0... | [
"sqw123az@sina.com"
] | sqw123az@sina.com |
8cb78ff77c9fbf845afbc5b63f5cb829ce8da914 | 0ffb18f4d58961ca675d8294eb2154f69061989f | /auto_process_ngs/test/test_analysis.py | 6b0aeb3108c417fc199c12786a9c0484bc38a1cd | [] | no_license | nandr0id/auto_process_ngs | a794e904e6d24b0e0403941b44c884374f95850e | 9b09f20b344d0ee87227e8771a479aa7c04f1837 | refs/heads/master | 2020-06-26T03:23:53.225029 | 2019-06-12T12:11:32 | 2019-06-12T12:11:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 52,655 | py | #######################################################################
# Tests for analysis.py module
#######################################################################
import unittest
import tempfile
import shutil
import zipfile
import pickle
import cloudpickle
from bcftbx.JobRunner import SimpleJobRunner,GEJob... | [
"peter.briggs@manchester.ac.uk"
] | peter.briggs@manchester.ac.uk |
8b822886de793fad5cc78d1bdeeab56f9dfb7197 | 85f1488f3d0996b83292f74b3672793f2778503f | /notebooks/Model Diagnostics.py | 96d24d2bbf464d6e372c397f7b713a044f8955dd | [] | no_license | ceshine/jigsaw-toxic-2019 | 33f66d6643aeeeb20599ab95368ce2c1f6500543 | 34d5df28e1b820725f964fbbdfe039daea31c0d7 | refs/heads/master | 2022-02-22T10:50:51.444794 | 2019-08-04T04:13:00 | 2019-08-04T04:13:00 | 198,053,856 | 7 | 2 | null | null | null | null | UTF-8 | Python | false | false | 5,796 | py | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import sys
sys.path.append("..")
# In[2]:
from pathlib import Path
from functools import partial
import numpy as np
import pandas as pd
import torch
import joblib
from torch.utils.data import DataLoader
from toxic.inference_bert import get_token_ids
from toxic.da... | [
"shuanck@gmail.com"
] | shuanck@gmail.com |
fa091d4a5b67cc3425553a4c3c7993b379d5a42c | 2a2505108cd429d39746050d0100f4963dcd9c69 | /src/compas/geometry/bbox/__init__.py | b19dd1d59cd854d5d9397b2cf4ef284c580ed6d6 | [
"MIT"
] | permissive | adacko/compas | 677095bea007c22a98b44af3281131b445cb1ae1 | 47c443ad3825897ec7ed932ec20734c2f08ef120 | refs/heads/master | 2020-07-23T00:55:51.348907 | 2019-09-09T16:44:18 | 2019-09-09T16:44:18 | 207,390,442 | 0 | 1 | MIT | 2019-09-09T19:40:41 | 2019-09-09T19:40:41 | null | UTF-8 | Python | false | false | 260 | py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import compas
from .bbox import *
if not compas.IPY:
from .bbox_numpy import *
__all__ = [name for name in dir() if not name.startswith('_')]
| [
"vanmelet@ethz.ch"
] | vanmelet@ethz.ch |
7f3da45e043ef6602769afea0a533af86f8f6f8f | 48e1ac111f48bf27b03625f81887a8eaef4d505d | /old/google-cloud-sdk/platform/gsutil/gslib/commands/du.py | afc399c6c2a24fe25420a2093c4b0f2484b10adf | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | altock/dev | 74350528ea570925e8fbc584c64939cae86f6ea7 | 90d87b2adb1eab7f218b075886aa620d8d6eeedb | refs/heads/master | 2021-07-10T08:31:48.080736 | 2017-04-15T03:04:12 | 2017-04-15T03:04:12 | 23,088,790 | 0 | 1 | null | 2020-07-25T04:32:05 | 2014-08-18T22:33:25 | Python | UTF-8 | Python | false | false | 8,808 | py | # Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | [
"sjs382@cornell.edu"
] | sjs382@cornell.edu |
c26747d4798c12a9061590246550915c3f49b876 | f7c7063e1a22b773a271a953c013a3c5303b70b3 | /src/litter_trap.py | f5802491a1ff00f278838b9b59f2b0dfe66141a0 | [] | no_license | Ewan82/ah_data | e0cce8fffafd91eb6fca8ce6af602d3230535f87 | d5961f284187acda8d1317bb4fd50f32c85bb591 | refs/heads/master | 2021-01-19T01:55:47.530127 | 2016-11-04T11:07:09 | 2016-11-04T11:07:09 | 40,532,005 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 277 | py | import numpy as np
import matplotlib.mlab as mlab
def convert_csv2rec(file_no):
return mlab.csv2rec('../litter_traps/litterscans/file0'+str(file_no)+'.csv')
def remove_false_data(area_arr, tol=2.0):
idx = np.where(area_arr < tol)
return np.delete(area_arr, idx) | [
"ewan.pinnington@gmail.com"
] | ewan.pinnington@gmail.com |
13c31e9d950cf3be9f2b388eecebe51ef72bd351 | b1c7a768f38e2e987a112da6170f49503b9db05f | /stockkeeping/migrations/0010_auto_20181101_1545.py | 34ef7c9e3a98255c3676811073ad0d7d44aad3d4 | [] | no_license | Niladrykar/bracketerp | 8b7491aa319f60ec3dcb5077258d75b0394db374 | ca4ee60c2254c6c132a38ce52410059cc6b19cae | refs/heads/master | 2022-12-11T04:23:07.504966 | 2019-03-18T06:58:13 | 2019-03-18T06:58:13 | 176,218,029 | 1 | 0 | null | 2022-12-08T03:01:46 | 2019-03-18T06:27:37 | JavaScript | UTF-8 | Python | false | false | 417 | py | # Generated by Django 2.0.6 on 2018-11-01 10:15
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('stockkeeping', '0009_auto_20181101_1544'),
]
operations = [
migrations.AlterField(
model_name='purchase_total',
name... | [
"niladry.kar85@gmail.com"
] | niladry.kar85@gmail.com |
78dc4511525e97dd533b1940967724911ec49d65 | e71fa62123b2b8f7c1a22acb1babeb6631a4549b | /xlsxwriter/test/table/test_table07.py | 121beef77b97ead58a919c1640b8c21d77b0c360 | [
"BSD-2-Clause"
] | permissive | timgates42/XlsxWriter | 40480b6b834f28c4a7b6fc490657e558b0a466e5 | 7ad2541c5f12b70be471b447ab709c451618ab59 | refs/heads/main | 2023-03-16T14:31:08.915121 | 2022-07-13T23:43:45 | 2022-07-13T23:43:45 | 242,121,381 | 0 | 0 | NOASSERTION | 2020-02-21T11:14:55 | 2020-02-21T11:14:55 | null | UTF-8 | Python | false | false | 2,017 | py | ###############################################################################
#
# Tests for XlsxWriter.
#
# SPDX-License-Identifier: BSD-2-Clause
# Copyright (c), 2013-2022, John McNamara, jmcnamara@cpan.org
#
import unittest
from io import StringIO
from ..helperfunctions import _xml_to_list
from ...table import Tab... | [
"jmcnamara@cpan.org"
] | jmcnamara@cpan.org |
e6b8cf1ed34c95782fbc04f4582bc9f07d7f5f4b | 49813760337894f578bd6cf4f3ee76c32bd1d7ba | /guvip137.py | 09bad993fe97e3d711650c82615084b0ace982a6 | [] | no_license | devigajsrr/codekata | e1256cf7fd88a0c7cefd02dea11305391143253a | a9ae003a7d3c8865b1d4e9aae73723a5fedf79be | refs/heads/master | 2020-05-23T01:01:09.927231 | 2019-07-20T11:31:51 | 2019-07-20T11:31:51 | 186,580,561 | 0 | 3 | null | null | null | null | UTF-8 | Python | false | false | 66 | py | n=int(input())
n=list(bin(n))
n=n[::-1]
print(n.index("1")+1)
| [
"noreply@github.com"
] | devigajsrr.noreply@github.com |
eadf86477e07dc6fcb83e07e480e090199897cee | e43e8bd052a613f158e29339aaa7e3bdec40b6fb | /models/faster_rcnn_inception_resnet_v2_keras_feature_extractor_test.py | a3c33c28e62db57565d0119cf742f97bb5d8df3d | [] | no_license | sakshijain032/Harmful-Object-Detection | 249f586ffbc7de99f6647689bae230f3b79694b3 | 8e1711fc1596b451f97b5ff2f7690453a888c848 | refs/heads/master | 2022-12-24T18:40:41.795010 | 2020-10-01T17:34:42 | 2020-10-01T17:34:42 | 293,727,797 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,612 | 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... | [
"sakshijain032@gmail.com"
] | sakshijain032@gmail.com |
d0a334ca6c19f583a7c9f4aa5a63c23ce53c9460 | 077a17b286bdd6c427c325f196eb6e16b30c257e | /00_BofVar-unit-tests/07_64/remenissions-work/exploit-BofVar-1.py | 3e5efa3d0d010a0028daecc2f04b08bca5fc6cab | [] | no_license | KurSh/remenissions_test | 626daf6e923459b44b82521aa4cb944aad0dbced | 9dec8085b62a446f7562adfeccf70f8bfcdbb738 | refs/heads/master | 2023-07-08T20:25:04.823318 | 2020-10-05T06:45:16 | 2020-10-05T06:45:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 776 | py | from pwn import *
import time
import sys
import signal
import sf
target = process("./chall-test_BofVar-07-x64")
gdb.attach(target, execute="verify_exploit")
bof_payload = sf.BufferOverflow(arch=64)
bof_payload.set_input_start(0x48)
bof_payload.add_int32(0x14, 0xdead)
bof_payload.add_int32(0x10, 0xdeae)
bof_payload.a... | [
"ryancmeinke@gmail.com"
] | ryancmeinke@gmail.com |
3b3394be7b0f7c6c13b2006438556a5f0c7303ff | 7848e1b778ca0f3921aeeb0aeee44b398711b1f0 | /funtesting/mock/__init__.py | 495f052105769c8dfec9019cc49217d5fe565c55 | [] | no_license | fatelei/funtesting | a3a292ddfa30d9fbad47ee293768558b9e45fe8d | 748f4b5767cc16929408b19a5b62a812b48a0dd5 | refs/heads/master | 2021-01-10T12:09:38.809451 | 2016-02-21T03:59:15 | 2016-02-21T03:59:15 | 51,986,949 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 158 | py | # -*- coding: utf8 -*-
"""
funtesting.mock
~~~~~~~~~~~~~~~
Mock modules.
"""
from .mock_redis import mock_redis
__all__ = [
"mock_redis"
]
| [
"fatelei@gmail.com"
] | fatelei@gmail.com |
22c9b2072eee710b0af8c948145defea4346aa03 | 4aa7a4d0525095725eb99843c83827ba4806ceb1 | /keras/keras110_5_LeakyReLU.py | 213ecbe46b4073d61f4b984af0b9f92698fdaafd | [] | no_license | seonukim/Study | 65a70f5bdfad68f643abc3086d5c7484bb2439d4 | a5f2538f9ae8b5fc93b5149dd51704e8881f0a80 | refs/heads/master | 2022-12-04T17:04:31.489771 | 2020-08-21T00:35:15 | 2020-08-21T00:35:15 | 260,144,755 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 283 | py | # activation - LeakyReLU
import numpy as np
import matplotlib.pyplot as plt
x = np.arange(-6, 6, 0.01)
def leakyrelu(x): # Leaky ReLU(Rectified Linear Unit)
return np.maximum(0.1 * x, x) #same
plt.plot(x, leakyrelu(x), linestyle = '--', label = 'Leaky ReLU')
plt.show() | [
"92.seoonooo@gmail.com"
] | 92.seoonooo@gmail.com |
8e0ed00e073de8a5bccb6b2d7fe1eef2ede522de | 9e4df2b26e899f2d3e044e71bc4193958b02314b | /app/migrations/0027_auto_20200930_0118.py | bb05747fde99e2ecc6d9acb7db6fe524b26b1a36 | [
"MIT"
] | permissive | hosseinmoghimi/phoenix | afea0a73cdf257fcf89c75d85c5ab1890d957a83 | 43fc49421a50563acc1884981d391b0d6a5d5d72 | refs/heads/master | 2023-01-11T11:12:30.308822 | 2020-11-15T13:52:21 | 2020-11-15T13:52:21 | 295,109,751 | 1 | 5 | MIT | 2020-11-15T13:50:12 | 2020-09-13T08:31:01 | HTML | UTF-8 | Python | false | false | 701 | py | # Generated by Django 3.1 on 2020-09-29 21:48
from django.db import migrations
import tinymce.models
class Migration(migrations.Migration):
dependencies = [
('app', '0026_auto_20200930_0117'),
]
operations = [
migrations.AlterField(
model_name='jumbotron',
name='... | [
"hossein.moghimi.ce@gmail.com"
] | hossein.moghimi.ce@gmail.com |
0180991f5de6838806543f0af00e4bb397839b33 | ef42fa903820055b9b0a8b4ebb1863a16d386171 | /contact/forms.py | ee057df7c2a82d279ab2da12b60a6da4f9beac72 | [] | no_license | sinjorjob/django-simple-capture-inquery-form | 2537c8e03bc2c0118f772b69a59866ffb34d7cac | 8bd2900a6bdf97b97ddca7b7240b42f478e14884 | refs/heads/master | 2023-07-02T14:40:43.840669 | 2021-08-10T21:24:24 | 2021-08-10T21:24:24 | 394,784,208 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,570 | py | from django import forms
from captcha.fields import CaptchaField, CaptchaTextInput
from django.core.mail import send_mail #追加
from config import settings #追加
from django.urls import reverse #追加
import smtplib #追加
class ContactForm(forms.Form):
name = forms.CharField(label="氏名")
email = forms.E... | [
"sinforjob@gmail.com"
] | sinforjob@gmail.com |
b31f2e087a126b2a9b582dd32e0bb4f40cfde091 | eb68003893970fd5cedb684e45e8a5357907efda | /CIFAR100/prune80.py | 1d110432338f048d54b53678863336d5df911d67 | [] | no_license | byh1321/machine-learning-hardware-simulation | 7ffc6dbb7483119ace39694055892378caf19da5 | 165ae42e01877b49d4ebc3656782dc6c70ee16d2 | refs/heads/master | 2021-09-03T20:03:48.770465 | 2018-01-11T15:46:02 | 2018-01-11T15:46:02 | 110,343,218 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 23,951 | py | """
some parts of code are extracted from "https://github.com/kuangliu/pytorch-cifar"
I modified some parts for our experiment
"""
from __future__ import print_function
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
import torchvision.datasets as dset
import torch.backends.cudnn as... | [
"byh1321@naver.com"
] | byh1321@naver.com |
626ccb2e51e4602bed82ff9ee6f72b36dc9f0add | 0e647273cffc1fb6cbd589fa3c7c277b221ba247 | /configs/hpt-pretrain/bdd/byol_r50_bs2048_accmulate2_ep200/500-iters.py | 215d809fb24ebc2a34d497fc2f4750a359313eda | [
"Apache-2.0"
] | permissive | Berkeley-Data/OpenSelfSup | e9976bf011b69ebf918506ba184f464b1073ec13 | 221191b88d891de57725b149caf237ffef72e529 | refs/heads/master | 2023-05-12T07:34:52.268476 | 2021-04-08T00:58:37 | 2021-04-08T00:58:37 | 343,654,823 | 0 | 1 | Apache-2.0 | 2021-04-08T00:58:37 | 2021-03-02T05:20:27 | Python | UTF-8 | Python | false | false | 237 | py | _base_="../byol-base-bdd-config.py"
# this will merge with the parent
model=dict(pretrained='data/basetrain_chkpts/byol_r50_bs2048_accmulate2_ep200.pth')
# epoch related
total_iters=500*2
checkpoint_config = dict(interval=total_iters)
| [
"taeil.goh@gmail.com"
] | taeil.goh@gmail.com |
5898c1034a4038ecddbfd07e7567ec2b0facdbee | 03c9bb7e3cc687afecd57c6c6e3d5c1d54ed7ab0 | /smilejakdu/3week/3day/MaximumSubarray.py | 745fb6d684c6125416fb3fa0eafd62e8a9348e99 | [] | no_license | smilejakdu/python_algorithm_study | 541aa3de77e9f432d41b5627790a6f3e10f5a07d | 5119b31b6ae781e12bf97134ca6f10fec662abd8 | refs/heads/master | 2023-04-06T15:41:41.156021 | 2020-08-10T08:58:34 | 2020-08-10T08:58:34 | 282,879,639 | 0 | 0 | null | 2020-08-01T07:04:38 | 2020-07-27T11:36:31 | Python | UTF-8 | Python | false | false | 897 | py | ''':arg
Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum.
Input: [-2,1,-3,4,-1,2,1,-5,4],
Output: 6
Explanation: [4,-1,2,1] has the largest sum = 6.
'''
nums = [-2, 1, -3, 4, -1, 2, 1, -5, 4]
''':arg
maxcurr = nums[0]
max... | [
"ash982416@gmail.com"
] | ash982416@gmail.com |
62be29a83225382074ef88884da70792ec0067e6 | 00ce0f4d0c380d60cb336484200153636b249120 | /tests/agents/trade/test_case_mixin.py | 271f41ecbbe4a1c7723057a2e8fabc60c2e0e0c9 | [
"MIT"
] | permissive | tezheng/hearthbreaker | 21784aeba11f557703e22a23af54886c496d3fec | 169ad0d00e62300054e7cbaf5562d750f28730a8 | refs/heads/master | 2021-01-15T14:30:05.542012 | 2014-09-24T20:03:12 | 2014-09-24T20:03:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,925 | py | import random
from tests.agents.trade.test_helpers import TestHelpers
from hearthbreaker.agents.trade.trade import Trades
class TestCaseMixin:
def setUp(self):
TestHelpers.fix_create_minion()
random.seed(1857)
def add_minions(self, game, player_index, *minions):
player = game.players[... | [
"daniel.yule@gmail.com"
] | daniel.yule@gmail.com |
4a14238ab6b800f0cc73e526e8139c895d15f7b4 | ea3bf64156bbb79544bfd6b42bbcd3eda453ac31 | /extra-credit/Testing Room Locking System in Hotels/incorrect_impl_testkeycard_second_key_returns_second_key.py | cacf95a3697cc0bbbb510a65b0a6e8e07b6dec7f | [
"CC-BY-4.0"
] | permissive | Jackiexiong/software-testing-course | 563ffc8543fdcff9500f64944fd76e7c0c8e1144 | 3803851dcf9f7bbd0f0b89fca6c9c5e3a48f22e0 | refs/heads/master | 2021-07-08T02:10:25.915964 | 2017-10-04T20:50:51 | 2017-10-04T20:50:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,847 | py | import re
class Key(object):
"Key used in keycards and locks"
pass
class KeyCard(object):
"Keycard used to open a lock"
def __init__(self, first_key, second_key):
"""
Constructs a KeyCard with the given keys
Args:
first_key: in the keycard to be created
... | [
"rvprasad@ksu.edu"
] | rvprasad@ksu.edu |
85cb80c6b44a3d07bee31bad87c5d4102559bde4 | 5cb98473ea9972d0a9a0278cde9b6ee8264f9bac | /01. Jump to python/chap05/mod3_driver.py | 5994fc46b1cc9b334106b3ade0789c1d901e08d6 | [] | no_license | libus1204/bigdata2019 | fd85dbcd8c89db991ab5c3efa11ff85466a823f8 | 5e9a6fa2c340c1fcd2840889ba40c7b805926558 | refs/heads/master | 2020-04-21T10:56:33.519490 | 2019-04-15T05:28:19 | 2019-04-15T05:28:19 | 169,503,607 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 45 | py | from mod2 import mod3
print(mod3.sum2(1, 2)) | [
"libus1204@naver.com"
] | libus1204@naver.com |
87d413d7af90828f2782af0f4e847016caecc553 | b403c7fe56209472855dff451f0b6283d5471008 | /Supplemental_Material/PythonProjects/myFunctions/isItOdd.py | 14037a63dbb500f808f9316903acca319e7bc678 | [] | no_license | Sandbox4KidsTM/Python_Basics | 842bde52796896e913fdb5cc349034c52092555f | 68c95547ec1567958fc8069e6a4bb119e436211a | refs/heads/master | 2020-03-23T01:06:29.363196 | 2018-08-10T04:32:58 | 2018-08-10T04:32:58 | 140,901,128 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 173 | py | #checks if a user-entered number if odd
a = int(input("enter a num: "))
if a % 2 == 0: #% modulus rep
print("number is EVEN")
else:
print("number is ODDDDD") | [
"mitchslabrenz@gmail.com"
] | mitchslabrenz@gmail.com |
89e353022fef9fffa9f5835f74ae7501b8c1d990 | 3960fa9721ff97c8da99d010e27118ab0bc1201d | /tests/storage/fake_storage.py | c1437e781c494d82c715effbb93b4b9fafedaf40 | [
"Apache-2.0"
] | permissive | iamjoshbinder/plaso | d3ebbc216b4d89c8f8f6ab50f059b6db7bcca599 | 762aa1d1eb17760ef5e2708a48dff2acad7001ea | refs/heads/master | 2021-08-08T13:23:10.146862 | 2017-11-09T10:44:09 | 2017-11-09T10:44:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,362 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""Tests for the fake storage."""
import unittest
from plaso.containers import errors
from plaso.containers import event_sources
from plaso.containers import reports
from plaso.containers import sessions
from plaso.containers import tasks
from plaso.lib import definitions
fro... | [
"joachim.metz@gmail.com"
] | joachim.metz@gmail.com |
f18208cbe2c56461d40b39d71cffbfaf1b0fee2b | 6af6a6fb7d0759be524f2592a470d91947e0e2bc | /RandomForest/src/dataset/sp_010_1e2.py | 699dc20994db4aa94c5f33202f7ef75e147f7653 | [] | no_license | wasit7/ImageSearch | 5094e56db46af0d05cf76e5b5110c5b92d5198fd | 3cd7ab3fa3c89873c0b49b1311ed5e7c5f4b8939 | refs/heads/master | 2020-05-17T01:12:24.616821 | 2015-08-10T07:26:44 | 2015-08-10T07:26:44 | 22,672,379 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,887 | py | """
Contain class that provide spiral dataset to random forest.
@author: Krerkkiat
updated by Wasit
"""
import numpy as np
class SpiralDataset:
'''
Provide Spiral Dataset to Random Forest
'''
def __init__(self, clmax, spc):
'''
Initial routine.
Parameter(s):
clma... | [
"wasit7@gmail.com"
] | wasit7@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.