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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0821cd819be9e85ea5c74fffa2859d8149cac83f | 012a09b3f76dd2d1854bd8b38ee5c1d0ea254e4e | /src/script/create_user.py | 209e441a4edb7e573b840aaf571b4b42dc776c18 | [] | no_license | yezj/Paladin | 1215106c578cea239305ebe5d9666cf010e0a57b | f347f50d6491eac6c92f70af8c2a71720dcf7774 | refs/heads/master | 2020-04-18T17:27:00.602660 | 2019-10-22T06:27:39 | 2019-10-22T06:27:39 | 167,655,028 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 163,620 | py | # -*- coding: utf-8 -*-
import uuid
import requests
NICKNAME = [
"赵 艺芯",
"赵 彦龙",
"赵 君昊",
"赵 子扬",
"赵 雨晴",
"赵 元起",
"赵 威璜",
"赵 梓云",
"赵 伯奢",
"赵 子伯",
"赵 公威",
"赵 曜岩",
"赵 昕阳",
"赵 晨欣",
"赵 世元",
"赵 子远",
"赵 元宗",
"赵 子义",
"赵 仲宣",
"赵 孔休",
"赵 义权",
"赵 文向",
"赵 佐治",
"赵 文则",
"赵 文谦",
"赵 ... | [
"test@test.com"
] | test@test.com |
803ff5ac5b0cdf521eddb1c05b2ba9f5a0625e88 | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2518/60667/257400.py | 5a34f96a54c8f08657b63d8da8e6099b6338fb0a | [] | 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 | 330 | py | import math
houses = list(map(int, input().split(',')))
heaters = list(map(int, input().split(',')))
dist = []
for i in range(len(houses)):
dist.append(len(houses))
for heater in heaters:
for i in range(len(houses)):
dist[i] = min(dist[i], math.fabs(houses[i] - heater))
print(int(max(dist))) ... | [
"1069583789@qq.com"
] | 1069583789@qq.com |
3b36ccf527d7f2266c29d77220345506c88dfb84 | 4a8bfa3407aa98a04ede3162f85467b1b5012fe7 | /aiogram/api/types/input_venue_message_content.py | ae89bf991e07eb8b472c705371a17a215d91e73c | [] | no_license | aiogram/tg-codegen | 07ec80814eec46f464d2490fd27b7b6b27257f1b | ba3c2f893591d45dda418dd16e0646e260afdf14 | refs/heads/master | 2022-12-09T10:44:10.781570 | 2021-11-07T23:33:25 | 2021-11-07T23:33:25 | 218,523,371 | 24 | 5 | null | 2022-12-08T08:47:43 | 2019-10-30T12:33:21 | Python | UTF-8 | Python | false | false | 1,278 | py | from __future__ import annotations
from typing import TYPE_CHECKING, Optional
from .input_message_content import InputMessageContent
if TYPE_CHECKING:
pass
class InputVenueMessageContent(InputMessageContent):
"""
Represents the `content <https://core.telegram.org/bots/api#inputmessagecontent>`_ of a ve... | [
"jroot.junior@gmail.com"
] | jroot.junior@gmail.com |
2aebcd46bf5395a3b680783cacda6f9c826dd5e0 | ac085e82a957da4e59beefe52fae06e8e0077e09 | /gen3va/endpoints/api/download_api.py | 9979505563b22fad1ad79b4ccb1bdbb559c60975 | [] | no_license | MaayanLab/gen3va | 9cb670f971690c911a09f633c49c2e8a35d69afc | b08755993633f5bfc710be088da327813b8df1fc | refs/heads/master | 2022-05-13T13:13:35.151752 | 2022-04-15T15:04:13 | 2022-04-15T15:04:13 | 67,866,413 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,028 | py | """Manages downloads.
"""
import os
import zipfile
import StringIO
from flask import Blueprint, Response
from substrate import Tag
from gen3va import database
from gen3va.config import Config
download_api = Blueprint('download_api',
__name__,
url_prefix='%s/downloa... | [
"ggundersen@gmail.com"
] | ggundersen@gmail.com |
a68246a09171e570c3cc0605b6f72b9b8bf385af | 48e124e97cc776feb0ad6d17b9ef1dfa24e2e474 | /sdk/python/pulumi_azure_native/engagementfabric/v20180901preview/channel.py | d75bf027941cf1de54160c62d8d0642667c65226 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | bpkgoud/pulumi-azure-native | 0817502630062efbc35134410c4a784b61a4736d | a3215fe1b87fba69294f248017b1591767c2b96c | refs/heads/master | 2023-08-29T22:39:49.984212 | 2021-11-15T12:43:41 | 2021-11-15T12:43:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,820 | py | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
__... | [
"noreply@github.com"
] | bpkgoud.noreply@github.com |
8f367326fc506820a4dc0f6116e2f02a0c3a3d1e | 9d84fa1d80c4248ad304f4b1ac32cb6adfa7a0f1 | /mk_dti_report.py | d07b0c8c0884dd676b8f1e4a0fc95068c4a97fd6 | [
"MIT"
] | permissive | poldrack/dtiqa | 6a504848af736eb2c585a337568c41a11812c0b6 | 3b44e3dbec4cace8fb4bb2fcdf43e4f64a649898 | refs/heads/master | 2021-01-10T21:01:33.025637 | 2015-07-13T21:20:31 | 2015-07-13T21:20:31 | 39,037,793 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,707 | py | """
make report for QA using reportlab module
"""
from reportlab.pdfgen import canvas
import numpy as N
import time
import os
def mk_dti_report(infile,dtidir,datavars):
#imgsnr,meansfnr,spikes,badvols):
timestamp=time.strftime('%B %d, %Y: %H:%M:%S')
report_header=[]
report_header.a... | [
"poldrack@gmail.com"
] | poldrack@gmail.com |
5bd5a62e7c57b3658b7b1fd7f54e5fffc4ca9fc9 | a14ec6e367e6a471bfc74c066fb958ef585bc269 | /2019/04/common.py | 89c29d75ecf7bdfd829c92b56ca0d45e14d2a616 | [] | no_license | jimhendy/AoC | 90641814ed431f46a8500ff0f022c6c957567563 | a1727f88bc2e6f739d65902dce188377966b3fb4 | refs/heads/master | 2023-09-02T14:48:39.860352 | 2023-08-28T08:09:19 | 2023-08-28T08:09:19 | 225,152,422 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 443 | py | import numpy as np
import pandas as pd
def possibles(inputs):
Min, Max = (int(i) for i in inputs.split("-"))
return pd.DataFrame([list(str(i)) for i in np.arange(Min, Max)]).astype(int)
def diffs(possibles):
return possibles.diff(axis=1).fillna(0)
def counts(possibles):
counts = {
i: possi... | [
"jimhendy88@gmail.com"
] | jimhendy88@gmail.com |
714cd772a4ca796aa9b65938d2bdb2ed0f9c22da | 5509d3b5bbcc393684f7d2fc7fc11bb12ed1911a | /env/lib/python2.7/site-packages/venusian/compat/pkgutil_26.py | 706e048c703ea6b48dc2bbb28484c11057eb85f2 | [] | no_license | jundong/CRManager | 99fd6c0eda084354d9237e11d07ef82124c22e1e | 4306bf4d2b29b19d4b3092aab152192f7d623a19 | refs/heads/master | 2021-01-21T04:47:26.125045 | 2016-07-29T15:07:04 | 2016-07-29T15:07:04 | 50,995,792 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 21,962 | py | """Utilities to support packages."""
# NOTE: This module must remain compatible with Python 2.3, as it is shared
# by setuptools for distribution with Python 2.3 and up.
if 1: # pragma: no cover
import os
import sys
import imp
import os.path
from types import ModuleType
__all__ = [
'... | [
"jundong.xu@spirent.com"
] | jundong.xu@spirent.com |
82b357f3e1c30701a2183d9943222fe1aee5969e | 7b44c55ea74a4a407251117dbbc7ac09b4cb3a4c | /experiments/run_scripts/policy_plasticity/ModelMAML/model_batch_maml_polopt.py | 379ce2cf0e0063beb8da037750ce8a4bbb8f8e29 | [
"LicenseRef-scancode-generic-cla",
"MIT"
] | permissive | AaronStone24/model_ensemble_meta_learning | 1c48b039a8c533fd1802bff50988dec635288206 | 51d522cc68e4685135c4770fe43175c4b3a63122 | refs/heads/master | 2023-05-27T15:47:32.862283 | 2023-05-10T07:04:44 | 2023-05-10T07:04:44 | 636,159,846 | 0 | 0 | null | 2023-05-04T08:47:34 | 2023-05-04T08:47:33 | null | UTF-8 | Python | false | false | 27,115 | py | import rllab.misc.logger as logger
import tensorflow as tf
import time
import numpy as np
import os
import joblib
from rllab_maml.algos.base import RLAlgorithm
from rllab_maml.sampler.stateful_pool import singleton_pool
from sandbox.ours.sampler import RandomVectorizedSampler, MAMLModelVectorizedSampler, MAMLVectoriz... | [
"jonas.rothfuss@gmx.de"
] | jonas.rothfuss@gmx.de |
7e5988d2abc9de3328191dcf4a48925e1114b43a | 1dbc955c3d717476fa75a48cc87a05e2eceb0002 | /easy/min_depth.py | bc408df46fa538cc996dbb3442ff9a4ebdd9d9e3 | [] | no_license | gregorysimpson13/leetcode | e68eaee2ba38a1edff119eda1ccdeacc0c400d26 | ae88b9f9979a5643497cb2dfeb90d19a1bcdb137 | refs/heads/master | 2023-03-31T23:58:58.940234 | 2021-04-11T14:37:31 | 2021-04-11T14:37:31 | 258,632,884 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,013 | py | # 111. Minimum Depth of Binary Tree - EASY
# https://leetcode.com/problems/minimum-depth-of-binary-tree/submissions/
# Given a binary tree, find its minimum depth.
# The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.
# Note: A leaf is a node with no c... | [
"gregorysimpson13@gmail.com"
] | gregorysimpson13@gmail.com |
51ea9c030f677af42fd38725debf843d3c69b260 | 8bcf973008b1d7549f59501a1667909848ea87dd | /Day0822/ORM2/app01/views.py | 3ad1248d70ac91299eaef1087bd98c2d4840af27 | [] | no_license | simplesmall/Python-FullStack | 74ffeb2119eecb7fcb21a136d01aaaf2bcc2c24c | 210844ef6443a5543d49a20dbec2db9a9b960230 | refs/heads/master | 2022-12-17T00:56:40.515335 | 2019-11-15T02:07:57 | 2019-11-15T02:07:57 | 221,816,447 | 0 | 1 | null | 2022-12-13T19:22:26 | 2019-11-15T01:10:55 | Python | UTF-8 | Python | false | false | 10,201 | py | from django.shortcuts import render, HttpResponse, redirect
# Create your views here.
from app01.models import Book, Publish, Author, AuthorDetail,Emp
def index(request):
return HttpResponse("OKK")
def addrecord(request):
'''
添加记录
'''
pub_obj = Publish.objects.filter(name="南京出版社")... | [
"simplesmall@outlook.com"
] | simplesmall@outlook.com |
2d0c20dbdb1d0b69c0e130f7c0b4fb5917f56aed | e2bbbf67487fddfd4648c3f37d84849efee5bfaa | /backend/hazardest/game/tests/test_trick.py | 644cfa0ee7485c64b02fe2197757d46af891215b | [] | no_license | JordanSlaman/hazardest | 2a6f813e86c58fdee2a4b6cde0b9634c2750b57a | 07d055d9cc8423f5fc45fc2992f8a8798d054cf2 | refs/heads/master | 2022-09-01T17:35:22.414359 | 2022-08-07T22:47:23 | 2022-08-07T22:47:23 | 98,753,092 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,107 | py | from django.test import TestCase
from ..models.game import Game
from ..models.hand import Hand
from ..models.trick import Trick
from ..utils.create_cards import create_cards
from .fixtures import create_game_with_players
class TrickModelTests(TestCase):
def setUp(self):
create_cards()
self.tes... | [
"jordan.slaman@gmail.com"
] | jordan.slaman@gmail.com |
2623b29fb1f656b795b705e7ca7f4f8ed1255c7b | 0e25dc15ae9efce8bfd716d4d2041da07767968b | /qbench/benchmarks/QLib/OPENQL_converted/benstein_vazirani_41b_secret_16.py | fc9be6f9ad7d194f78cb38cb05d15e7415b54a28 | [] | no_license | alxhotel/crossbar-bench | f608fc0062b4f8a5162ec33d61c0204aaf27b6ff | 3bf7536e7697d29c3089b0ba564ba22d39698b88 | refs/heads/master | 2021-07-13T16:06:50.085838 | 2020-10-04T23:39:05 | 2020-10-04T23:39:05 | 213,409,122 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 5,090 | py | from openql import openql as ql
import os
import argparse
def circuit(config_file, new_scheduler='yes', scheduler='ASAP', uniform_sched= 'no', sched_commute = 'yes', mapper='base', moves='no', maptiebreak='random', initial_placement='no', output_dir_name='test_output', optimize='no', measurement=True, log_level='LOG_W... | [
"alxmorais8@msn.com"
] | alxmorais8@msn.com |
2b70ed9dffd63b20564f11772482485422f9afc9 | 18508cea9458b2879017b44e6f18520cd8cf4f6c | /UCMDBPython/src/vmware_vim_utils.py | f9c6f4dbc0a79a0b86699ef93132b0a6c6dd4272 | [] | no_license | kvt11/dd-git | 7d4935962e06d835ad0023c4abb185876a5a9e77 | 49aafa7081b861c5f6d0e1753b425e78948116d0 | refs/heads/master | 2022-11-23T19:03:19.763423 | 2016-04-04T14:54:18 | 2016-04-04T14:54:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 74,849 | py | #coding=utf-8
from modeling import HostBuilder
import logger
import modeling
import errormessages
import netutils
import re
from appilog.common.system.types import ObjectStateHolder
from com.hp.ucmdb.discovery.library.scope import DomainScopeManager
from com.hp.ucmdb.discovery.library.clients import BaseClie... | [
"bluesteelkc@gmail.com"
] | bluesteelkc@gmail.com |
a5c147f2b13a9262b93ad5d48796d82c3012edfb | 04e5b6df2ee3bcfb7005d8ec91aab8e380333ac4 | /Lib/objc/StoreKit.py | 4b919a9b01a65ef35f5ae3e2e78d36703567db64 | [
"MIT"
] | permissive | ColdGrub1384/Pyto | 64e2a593957fd640907f0e4698d430ea7754a73e | 7557485a733dd7e17ba0366b92794931bdb39975 | refs/heads/main | 2023-08-01T03:48:35.694832 | 2022-07-20T14:38:45 | 2022-07-20T14:38:45 | 148,944,721 | 884 | 157 | MIT | 2023-02-26T21:34:04 | 2018-09-15T22:29:07 | C | UTF-8 | Python | false | false | 5,635 | py | """
Classes from the 'StoreKit' framework.
"""
try:
from rubicon.objc import ObjCClass
except ValueError:
def ObjCClass(name):
return None
def _Class(name):
try:
return ObjCClass(name)
except NameError:
return None
SKCloudServiceController = _Class("SKCloudServiceController... | [
"adrilabbelol@gmail.com"
] | adrilabbelol@gmail.com |
23a9af8c3a7546c53ad2b85b5f514b566b53d151 | c36679186f669c6e3bd1c106c96d4a17be1f5ab1 | /Practice_Telusko/121.py | ddb01801081aec49788165b80cbbbe017000e1b4 | [] | no_license | touhiduzzaman-tuhin/python-code-university-life | 60a3d671b200a6f5222c6d176c13c5f20f013509 | 6d2e3d90d430faa5c83fe79e7fb1ebe516994762 | refs/heads/master | 2023-03-22T15:18:10.636203 | 2021-03-06T18:52:04 | 2021-03-06T18:52:04 | 332,467,190 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 244 | py | x = int(input("Enter A Number : "))
if x == 0:
print("Zero Number")
elif x >= 0:
print("Positive Number")
if x % 2 == 0:
print("Even Number")
else:
print("Odd Number")
else:
print("Negative Number") | [
"touhiduzzamantuhin95@gmail.com"
] | touhiduzzamantuhin95@gmail.com |
f0457a3c6eba2170502ff89f45eef7cd3dcb14d9 | 36bfa8c212270b3c1eaab77210a525f0bbef6874 | /podoc/ast/__init__.py | 2bb4bd02683ba6fae13666a16f9937b333aa96eb | [
"BSD-3-Clause"
] | permissive | podoc/podoc | ce7b22571251ae90b56d272eff0277ec6090ea75 | 1868e7f82a521b1722dca528802acedf9010b11a | refs/heads/master | 2021-01-17T15:18:12.158127 | 2018-02-12T15:16:10 | 2018-02-12T15:16:10 | 41,724,522 | 54 | 9 | BSD-3-Clause | 2018-02-04T15:08:13 | 2015-09-01T07:44:50 | Python | UTF-8 | Python | false | false | 338 | py | # -*- coding: utf-8 -*-
# flake8: noqa
"""JSON plugin."""
#-------------------------------------------------------------------------------------------------
# Imports
#-------------------------------------------------------------------------------------------------
from ._ast import ASTNode, ASTPlugin, PandocPlugin... | [
"cyrille.rossant@gmail.com"
] | cyrille.rossant@gmail.com |
6f337a988d6c798586c741832f986ede08989829 | a964f0f3f93a84d5195042d3c1bb2288e8b62161 | /muddery/server/dao/event_data.py | 3bec35efc460fb681d575e820864148aa197845a | [
"BSD-3-Clause"
] | permissive | nobodxbodon/muddery | 474433791b75d2f2130e6b758fb3126e2d56230b | 4b4c6c0dc5cc237a5df012a05ed260fad1a793a7 | refs/heads/master | 2023-06-19T19:28:39.252340 | 2021-07-14T15:07:47 | 2021-07-14T15:07:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 436 | py | """
Query and deal common tables.
"""
from muddery.server.dao.base_query import BaseQuery
from muddery.server.dao.worlddata import WorldData
class EventData(BaseQuery):
"""
Object's event data.
"""
table_name = "event_data"
@classmethod
def get_object_event(cls, object_key):
"""
... | [
"luyijun999@gmail.com"
] | luyijun999@gmail.com |
bb6a8c6681d3591410ec011af26b33133b0dec73 | 2f98aa7e5bfc2fc5ef25e4d5cfa1d7802e3a7fae | /python/python_2376.py | d781f9e9cec34f15d0ca267954c8f71c05c73516 | [] | 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 | 30 | py | # Cookies with urllib
Cookie:
| [
"ubuntu@ip-172-31-7-228.us-west-2.compute.internal"
] | ubuntu@ip-172-31-7-228.us-west-2.compute.internal |
2192bb616634a4295e7ef0cd9808e3bbab101988 | e629795e54c7f0bf79c9128adc8bc9154bebfb19 | /dynamic_programming/leetcode/python/leet_code_1289.py | 4b2f08063b0352438dfb7adf0f552bae3817f7f6 | [] | no_license | sm2774us/leetcode_hackerrank_codesignal_practice | 1aff675b8b3e6b58e3bb2f81c46c8646da50589f | bdc2407f391a8bc08e3a119227c384f3e15bb693 | refs/heads/main | 2023-07-19T21:59:31.638152 | 2021-08-25T12:29:59 | 2021-08-25T12:29:59 | 392,862,836 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 886 | py | from typing import List
class Solution:
def minFallingPathSum(A):
rows = len(A)
cols = len(A[0])
prv_row_min1 = prv_row_min2 = 0
prev_pos1 = -1
for i in range(rows):
curr_row_min1 = curr_row_min2 = float('inf')
for j in range(cols):
if ... | [
"sm2774us@gmail.com"
] | sm2774us@gmail.com |
bdb032f9ec951da8035b9e788b89c0624320bc26 | e1243b212be599a801e8d1fb5fd00e0ab0db974d | /models/EDSR_freq.py | fa798b278b49185c4ded544307b278cd3d6168e4 | [] | no_license | hyungminr/PyTorch_SISR | d17358ca94ccf7a82223a3b383b7529f1bfff0cd | 5aa22c3f68d262eb7ff80618cb3a75a7b488dacc | refs/heads/master | 2023-04-17T04:15:58.591604 | 2021-04-27T01:02:20 | 2021-04-27T01:02:20 | 328,836,251 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,452 | py | from models.EDSR import EDSR
from models.EDSR import MeanShift
import math
import torch.nn as nn
import torch
class EDSR_freq(nn.Module):
def __init__(self, scale=2, num_feats=64, kernel=3, padding=1, bias=True):
super().__init__()
self.model_image = EDSR(scale=scale, num_feats=32)
... | [
"raingold1347@snu.ac.kr"
] | raingold1347@snu.ac.kr |
2c7b84585721c3bf19fe1bdbef14fec4e8afedae | 743da4642ac376e5c4e1a3b63c079533a5e56587 | /examples/noisychannel/rerank_generate.py | fd1d26b3ebfdf86311c6764d22205b691d21210b | [
"MIT"
] | permissive | tmtmaj/Exploiting-PrLM-for-NLG-tasks | cdae1b6e451b594b11d8ecef3c1cd4e12fe51c9b | e8752593d3ee881cf9c0fb5ed26d26fcb02e6dd5 | refs/heads/main | 2023-06-16T08:26:32.560746 | 2021-07-14T17:50:19 | 2021-07-14T17:50:19 | 371,899,601 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,442 | py | #!/usr/bin/env python3 -u
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""
Generate n-best translations using a trained model.
"""
from contextlib import redirect_stdout
impor... | [
"qkrwjdgur09@naver.com"
] | qkrwjdgur09@naver.com |
a9ee77da3ed775af437905f8a77e31c68934d890 | b47c136e077f5100478338280495193a8ab81801 | /Lights/adafruit-circuitpython-bundle-6.x-mpy-20210310/examples/motorkit_dc_test.py | acee534bc1f2a7feb18935e5d4caa5d3f8df88a2 | [
"Apache-2.0"
] | permissive | IanSMoyes/SpiderPi | 22cd8747cc389f674cc8d95f32b4d86f9b7b2d8e | cc3469980ae87b92d0dc43c05dbd579f0fa8c4b1 | refs/heads/master | 2023-03-20T22:30:23.362137 | 2021-03-12T17:37:33 | 2021-03-12T17:37:33 | 339,555,949 | 16 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,059 | py | # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT
import time
import board
from adafruit_motorkit import MotorKit
kit = MotorKit(i2c=board.I2C())
kit.motor1.throttle = 0
while True:
print("Forward!")
kit.motor1.throttle = 0.5
time.sleep(1)
... | [
"ians.moyes@gmail.com"
] | ians.moyes@gmail.com |
50e73f4718d3047767bd32a558235cc11004ff42 | f07a42f652f46106dee4749277d41c302e2b7406 | /Data Set/bug-fixing-1/56b0c712ecb8ed28e63886a27ac24cb72334d327-<get_device>-fix.py | 7e5ac765baf394538173d3b221ff38bdbfa43683 | [] | no_license | wsgan001/PyFPattern | e0fe06341cc5d51b3ad0fe29b84098d140ed54d1 | cc347e32745f99c0cd95e79a18ddacc4574d7faa | refs/heads/main | 2023-08-25T23:48:26.112133 | 2021-10-23T14:11:22 | 2021-10-23T14:11:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,416 | py |
def get_device(*args):
'Gets the device from a device object, an ID integer or an array object.\n\n .. note::\n\n This API is deprecated. Please use\n :func:`~chainer.cuda.get_device_from_id`\n or :func:`~chainer.cuda.get_device_from_array` instead.\n\n This is a convenient utility to s... | [
"dg1732004@smail.nju.edu.cn"
] | dg1732004@smail.nju.edu.cn |
75d822e59f72d9e13076734236f48c4e1dafc564 | 12112cdb7efa8a7026925f3eea9bf096b098ed3b | /yy_api/dao/address.py | 6517613dac58761ab644934790528a0fc6197e79 | [] | no_license | smallstrong0/Earth | c377f43216515b21191778c8a529c1c073bd8954 | c81c2e0e0ea18af62ef8f81b2ea84d2cc0faed8d | refs/heads/master | 2021-05-16T00:08:12.047520 | 2019-07-27T01:39:48 | 2019-07-27T01:39:48 | 106,982,264 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 877 | py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
import core.mongo as db_core
import tool.c_utils
import tool.t_utils
collection = db_core.DbUtils().db.address
"""
字段规则
ctime
mtime
address_id 地址唯一id
user_id 用户ID全局唯一 UUID生成
name 收货人姓名
phone 电话
qq qq号
we_chat 微信号
address 地址
place 具体门牌号
"""
def create(dic={}):
dic['... | [
"393019766@qq.com"
] | 393019766@qq.com |
212fd46f2e5f7911e6424e3b7c2bc3491bab7a3b | f8b9e5de8823ff810ec445b6fa6d0e34f7b6319f | /Django/Users_project/apps/Users_app/migrations/0001_initial.py | 01e46249e25ed13984f49c592311b5448c9212d9 | [] | no_license | amalfushi/Python | 6c042443a8aeae15fc96a41a692abdbea05db863 | 067c2cef722457e884833f77baf9f44f45a4a165 | refs/heads/master | 2021-01-24T04:08:21.278071 | 2018-02-26T06:25:59 | 2018-02-26T06:25:59 | 122,923,686 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 879 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-10-18 14:59
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='User',... | [
"dustin.p.schroeder@gmail.com"
] | dustin.p.schroeder@gmail.com |
2f7a6efeb9a5d3c242058dcae19f31ce8c0190c8 | b4f5055ab8c61098a66cfb10095d835acbb373b7 | /dataaccess/basedao.py | 3075a4cdbe3bb3d571997f4822803471207d9fc9 | [] | no_license | shmyhero/option | f9f01f98144e5f58023ddacfd133647a019b63a2 | 436027c8b33a7bc25cebcf16daa6962eb079c220 | refs/heads/master | 2021-03-16T09:03:04.229299 | 2017-11-29T08:15:02 | 2017-11-29T08:15:02 | 111,675,273 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,013 | py | import traceback
import datetime
import mysql.connector
from utils.logger import Logger
from common.pathmgr import PathMgr
from common.configmgr import ConfigMgr
class BaseDAO(object):
def __init__(self):
self.logger = Logger(self.__class__.__name__, PathMgr.get_log_path())
@staticmethod
def get... | [
"elwin.luo@tradehero.mobi"
] | elwin.luo@tradehero.mobi |
610705888444eecd4a25200c9dd46b8ac12f5337 | 6eb207074705bacb36457d713e1dc06555192380 | /plot_ppi_blockage_map.py | ff52f40610dd5525e69260d3983ba9dba9563685 | [] | no_license | ritvje/lidar-xband-article-scripts | 22574adb29d2645fab31003ae8cd654363f6cb0a | ad6ec0997b09609c494316e2ae285296ffdde0eb | refs/heads/main | 2023-04-07T01:31:49.337350 | 2023-02-07T07:55:01 | 2023-02-07T07:55:01 | 491,413,099 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,484 | py | """Plot a 2-panel figure of radar and lidar availability PPIs.
Looks for files in directory `inpath` called
- xband_obs_pct_{startdate}_{enddate}_pct.txt
- xband_obs_pct_{startdate}_{enddate}_range.txt
- xband_obs_pct_{startdate}_{enddate}_azimuth.txt
- lidar_obs_pct_{startdate}_{enddate}_pct.txt
- lidar_obs_pct_{star... | [
"jenna.ritvanen@fmi.fi"
] | jenna.ritvanen@fmi.fi |
638543371020bc4e2ed3cc60c96f65e4fd382168 | 3292017df3ff6c7190d5c5a60ecf5f8936cb7b90 | /checkio/Dropbox/Break Rings/test_break_rings.py | 6901be0675a8ff2873ac7103b90f6f5e11117248 | [
"MIT"
] | permissive | KenMercusLai/checkio | 1e9cdfe70ccaf5315db36391c4710533d99cf9aa | 5082ab0c6a7ae2d97963568a6f41589332e88029 | refs/heads/master | 2022-05-12T18:22:22.604531 | 2022-05-11T09:00:28 | 2022-05-11T09:00:28 | 22,260,056 | 39 | 22 | NOASSERTION | 2022-05-11T08:42:05 | 2014-07-25T14:40:06 | Python | UTF-8 | Python | false | false | 11,561 | py | import unittest
from break_rings import break_rings
class Tests(unittest.TestCase):
TESTS = {
"Basics": [
{"input": [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [4, 6]], "answer": 3},
{"input": [[1, 2], [1, 3], [1, 4], [2, 3], [2, 4], [3, 4]], "answer": 3},
{"input": [[5, ... | [
"ken.mercus.lai@gmail.com"
] | ken.mercus.lai@gmail.com |
59c5e626e9a7066e4b46f04bc311d2d0bb6b243e | 13f78c34e80a52442d72e0aa609666163233e7e0 | /Other/ICPC Live Archive/7526/input_gen.py | e02dee7416064f5e4eaed6e55e6ef4f49cc2d0f0 | [] | no_license | Giantpizzahead/comp-programming | 0d16babe49064aee525d78a70641ca154927af20 | 232a19fdd06ecef7be845c92db38772240a33e41 | refs/heads/master | 2023-08-17T20:23:28.693280 | 2023-08-11T22:18:26 | 2023-08-11T22:18:26 | 252,904,746 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 660 | py | import random
def genTestCase(out):
ROWS = random.randint(200, 300)
COLS = random.randint(200, 300)
SPARE_ROWS = random.randint(0, int(ROWS / 5))
SPARE_DIODES = random.randint(0, int(ROWS * COLS / 7))
out.write("{} {} {} {}\n".format(ROWS, COLS, SPARE_ROWS, SPARE_DIODES))
ZERO_DENSITY = random.... | [
"43867185+Giantpizzahead@users.noreply.github.com"
] | 43867185+Giantpizzahead@users.noreply.github.com |
cb7b18e29e9988f4058c89a85ff27762dd7ea458 | eb1a2e24ecdbe9be8a6aac153fe1980b19dcbe4a | /sameline.py | db7711b6a73bb522e178afdfcfdba7a0d80d7476 | [] | no_license | sushmithasushi/playerlevel | 1e7363e63bd75deba79b96a659db7736c93ed6a2 | 612ea4483a5c5d7c3c3a8564e0b7ce0df08a686a | refs/heads/master | 2020-06-19T07:03:06.457910 | 2019-07-24T04:28:31 | 2019-07-24T04:28:31 | 196,608,802 | 0 | 0 | null | 2019-07-12T16:08:51 | 2019-07-12T16:08:51 | null | UTF-8 | Python | false | false | 206 | py | num1=input().split()
n2=input().split()
n3=input().split()
if(num1[0]==n2[0]==n3[0] or num1[1]==n2[1]==n3[1] or (num1[0]==num1[1] and n2[0]==n2[1] and n3[0]==n3[1])):
print('yes')
else:
print('no')
| [
"noreply@github.com"
] | sushmithasushi.noreply@github.com |
7de4e0db9696917074e2cac47616c5de30351365 | 1f33bcbd545b82bc64e7f7b5ef2052798b02b279 | /Quiz:Program1/quiz.py | f90e3289eeff403a20c20b0baeae41159bfc7583 | [] | no_license | jlevy44/LearningScripts | 107369798605641a24a5a29c9f8f249d5396e0b6 | fe7ce46a995cd6b7e40099a4b2db558a549de446 | refs/heads/master | 2021-01-01T19:19:11.849540 | 2017-09-27T00:19:54 | 2017-09-27T00:19:54 | 98,566,879 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 365 | py | def is_true(i):
if i==2:
return True
else:
return False
print(is_true(2))
def lalala(i):
return lambda y: i**2
print(lalala(5))
print('alpha' > 'beta')
d='hello'
for p in d: print(p)
print(d[-2:2])
def add(x,y):
print x+y
add(2,6)
def make_scalar(c):
return lambda n: c*(n)
... | [
"joshualevy44@berkeley.edu"
] | joshualevy44@berkeley.edu |
21120623aaae1cf3c80e160d93a4a917c30ebcfc | ece0d321e48f182832252b23db1df0c21b78f20c | /engine/2.80/scripts/templates_py/ui_previews_dynamic_enum.py | 39a3750bfee6404d1a45d3c448143682e5ad1b80 | [
"GPL-3.0-only",
"Font-exception-2.0",
"GPL-3.0-or-later",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-public-domain-disclaimer",
"Bitstream-Vera",
"LicenseRef-scancode-blender-2010",
"LGPL-2.1-or-later",
"GPL-2.0-or-lat... | permissive | byteinc/Phasor | 47d4e48a52fa562dfa1a2dbe493f8ec9e94625b9 | f7d23a489c2b4bcc3c1961ac955926484ff8b8d9 | refs/heads/master | 2022-10-25T17:05:01.585032 | 2019-03-16T19:24:22 | 2019-03-16T19:24:22 | 175,723,233 | 3 | 1 | Unlicense | 2022-10-21T07:02:37 | 2019-03-15T00:58:08 | Python | UTF-8 | Python | false | false | 4,092 | py | # This sample script demonstrates a dynamic EnumProperty with custom icons.
# The EnumProperty is populated dynamically with thumbnails of the contents of
# a chosen directory in 'enum_previews_from_directory_items'.
# Then, the same enum is displayed with different interfaces. Note that the
# generated icon previews d... | [
"admin@irradiate.net"
] | admin@irradiate.net |
9fd7c3ec34570c9b399747c13d244594b46a245a | 26aa4bdbc12ee99d187c94226af732d7487e30fa | /backend/weathered_shape_26383/settings.py | 6f52b6bc0ee24fd25fd10775d3917d2cc9a51ac4 | [] | no_license | crowdbotics-apps/weathered-shape-26383 | 25e722172a9e0c9305e96962c010f81b06692df4 | 86c617b71b1789e1b49212ee3f83859e526d8740 | refs/heads/master | 2023-04-17T01:20:00.812312 | 2021-05-08T13:33:10 | 2021-05-08T13:33:10 | 365,522,338 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,129 | py | """
Django settings for weathered_shape_26383 project.
Generated by 'django-admin startproject' using Django 2.2.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""... | [
"team@crowdbotics.com"
] | team@crowdbotics.com |
d40bb63a0564eb02be11362b9c6a638abb65d150 | e5e2b7da41fda915cb849f031a0223e2ac354066 | /sdk/python/pulumi_azure_native/containerservice/v20200701/agent_pool.py | 8251a0a40d2242bfa0e0bf39684334d89914e23d | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | johnbirdau/pulumi-azure-native | b7d3bdddeb7c4b319a7e43a892ddc6e25e3bfb25 | d676cc331caa0694d8be99cb90b93fa231e3c705 | refs/heads/master | 2023-05-06T06:48:05.040357 | 2021-06-01T20:42:38 | 2021-06-01T20:42:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 42,405 | py | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | [
"noreply@github.com"
] | johnbirdau.noreply@github.com |
4b6a6d58de4e10eca11deabb352f84f61028a2b2 | 5fb3db282628d15567c11e8f99abb5259fb30c24 | /codemod/base.py | bf80a9f5e1d13bf802f8abe67079eab729c680be | [
"Apache-2.0"
] | permissive | solcolin/codemod | 66c17e1f3e0c6f2117260cb2550301864bafdcf8 | df92fb09d9b5d1b5434d3f383466ad77e2965259 | refs/heads/master | 2021-01-21T18:43:25.537933 | 2015-12-21T13:43:26 | 2015-12-21T13:43:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 35,317 | py | #!/usr/bin/env python2
# Copyright (c) 2007-2008 Facebook
#
# 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... | [
"rochacbruno@gmail.com"
] | rochacbruno@gmail.com |
3f5aafbcf9931ad72e65de3c2d356b6fddbf2328 | 55e11b61b3230f7442dd2c8f2c16754ad50dcaf6 | /code/SLFN/training.py | 801ed20b9e22b128eae974493e8cffee9b990256 | [] | no_license | manuwhs/B-ADSNs | f70f534ebf1389f2fe51c4d46978ca1c24bbb671 | 6fe0c8456f71dbeb72b172baccdbf98caaa86d7c | refs/heads/master | 2021-04-28T03:06:26.873816 | 2018-04-18T21:54:08 | 2018-04-18T21:54:08 | 122,131,782 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,058 | py | # -*- coding: utf-8 -*-
"""
Created on Tue Mar 24 01:31:58 2015
@author: montoya
"""
import numpy as np
from sklearn import cross_validation
import paramClasses as paC
from time import time # For the random seed
def train (self):
# Adapt the labels so that they are correct (-1 or 0 and transform multivaria... | [
"manuwhs@bitbucket.org"
] | manuwhs@bitbucket.org |
654d7d6f7c0da9cba7eba0bd180f21513014fd75 | 684dcc0478abc504e32059efac049fe0bf3ca7e0 | /build/android/apk_operations.py | bfd5f54c05842ded53218d65485b174850d58790 | [
"BSD-3-Clause"
] | permissive | Agi-Developer/chromium | 86f751fb858b5eae535c589b26d3e8b353459dee | 8466ad258c8499e315df51d42f3b387bc327a7b6 | refs/heads/master | 2023-02-27T00:14:34.120092 | 2018-06-25T22:38:08 | 2018-06-25T22:38:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 47,414 | py | #!/usr/bin/env python
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Using colorama.Fore/Back/Style members
# pylint: disable=no-member
import argparse
import collections
import json
import logging
imp... | [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
c700458f0091d7453e741f1c4bd9c0cf550770d1 | f576f0ea3725d54bd2551883901b25b863fe6688 | /sdk/ml/azure-ai-ml/azure/ai/ml/_restclient/v2022_02_01_preview/models/_models_py3.py | 7d13ec5c1d65b60a1cb7e121af13f4f876fde286 | [
"LicenseRef-scancode-generic-cla",
"MIT",
"LGPL-2.1-or-later",
"LicenseRef-scancode-python-cwi",
"PSF-2.0",
"LGPL-2.0-or-later",
"GPL-3.0-or-later",
"GPL-1.0-or-later",
"LicenseRef-scancode-warranty-disclaimer",
"LGPL-2.1-only",
"Python-2.0",
"MPL-2.0",
"LicenseRef-scancode-other-copyleft",
... | permissive | Azure/azure-sdk-for-python | 02e3838e53a33d8ba27e9bcc22bd84e790e4ca7c | c2ca191e736bb06bfbbbc9493e8325763ba990bb | refs/heads/main | 2023-09-06T09:30:13.135012 | 2023-09-06T01:08:06 | 2023-09-06T01:08:06 | 4,127,088 | 4,046 | 2,755 | MIT | 2023-09-14T21:48:49 | 2012-04-24T16:46:12 | Python | UTF-8 | Python | false | false | 698,083 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | [
"noreply@github.com"
] | Azure.noreply@github.com |
d1ad790afa900acbcfab2baee1841aa7e9952ce7 | 4926535b3e0d2fe8a80bf231f72347abff6dcee4 | /experiments/spatial.py | 31164bbbb7f0f2a8b3630e61e75e76ba06247078 | [] | no_license | yangarbiter/blindguess | 1f2a34b0eb30fc53ab9be5c01fa1c184b8eb2ff9 | 86e49749ba62132a263dfea3743513b23895b03e | refs/heads/master | 2021-01-16T10:17:51.582682 | 2020-02-25T18:43:31 | 2020-02-25T18:43:31 | 243,076,622 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,862 | py | import os
import logging
import torch
from bistiming import Stopwatch
from mkdir_p import mkdir_p
import numpy as np
from sklearn.preprocessing import OneHotEncoder
from .utils import set_random_seed, load_model
from lolip.utils import estimate_local_lip_v2
from lolip.variables import get_file_name
logging.basicConf... | [
"yangarbiter@gmail.com"
] | yangarbiter@gmail.com |
eda928275e1b9cc5238c2f7b986b78ac46b584e3 | 313203cd01705e08bc8967246bfeacb7fa5cd6c9 | /Untitled Folder 2/newpython/strings.py | f45458de85baa2979b96b808132d94e5001b35d1 | [] | no_license | Nitesh101/Nitesh_old_backup | 17d9c8e8f9694c0ef4d995de7cbb694080523b22 | a0b0263e204f2f46c51e6f20990024396eb0ccb7 | refs/heads/master | 2020-03-19T20:51:51.587343 | 2018-09-21T09:42:11 | 2018-09-21T09:42:11 | 136,919,866 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,262 | py | #!/usr/bin/python
"""
str = 'Votarytech Learning Center'
print str.replace("Center","1")
print str.find("L")
print str.update('4','8')
print str[0:8],str[10::]
print str[1:20]
"""
list = ["this","is","python"]
print "To find index of list : "
print list.index("is")
list = ["this","is","python"]
print "To remove elem... | [
"m.veeranitesh@gmail.com"
] | m.veeranitesh@gmail.com |
2b690281a2c912dd8a40b26f3e3d47ba473e10c7 | 28691ec55ebce9ec7045d12ea9675932ce12d671 | /py2rhino-project/branches/sandbox2/py2rhino/_make/data/parser_out/utility/sleep.py | 747d42de5841701c0bad6df9d9e9bcd690ec7cdc | [] | no_license | ianclarksmith/design-automation | 1e71315193effc0c18b4a8b41300bda6f41a3f09 | e27cc028fe582395f4a62f06697137867bb0fc33 | refs/heads/master | 2020-04-22T22:28:39.385395 | 2009-10-26T02:48:37 | 2009-10-26T02:48:37 | 37,266,915 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,072 | py | sleep = {
"input_folder_name": "Utility_Methods",
"input_file_name": "Sleep",
"output_package_name": "utility",
"output_module_name": "sleep",
"doc_html": """
Suspends the execution of a running script for the specified interval.
""",
"syntax_html": {
0: ("lngMil... | [
"patrick.ht.janssen@d56020b2-6ac5-11de-89a9-0b20f3e2dceb"
] | patrick.ht.janssen@d56020b2-6ac5-11de-89a9-0b20f3e2dceb |
809efa968327ec2b765eba788b2c0355bfbae597 | 07c5656f004b6a444e22ff7b4c3b6802d027f759 | /week_3/class_0228/learn_import.py | fa67da2fb5f09d290d59e56d72ed750a06f0a45b | [] | no_license | EuniceHu/python15_api_test | de2a0f0bec8057edb27c8d1f82a438da3e9c105c | 1313e56ddfa67a2490e703a1a5ef4a6967565849 | refs/heads/master | 2020-05-20T13:30:41.686327 | 2019-05-14T11:00:52 | 2019-05-14T11:00:52 | 185,599,046 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 211 | py | #-*- coding:utf-8 _*-
"""
@author:小胡
@file: learn_import.py
@time: 2019/03/02
"""
# 导入module_import模块
# import week_3.class_0228.module_import
# print(week_3.class_0228.module_import.name) | [
"hongdh1122@163.com"
] | hongdh1122@163.com |
4b0b8b40b54edefa3452bf0836965eec78601e79 | 0c9e8b42a1e0a6f010a6c38489c7c96b3b783991 | /photo/tests.py | 57ff49f4b1663ad73d11612a2994277554b8212c | [
"MIT"
] | permissive | Derrick-Nyongesa/Photo-Gallery | 4690ff3bd427415236fd5147188e2f452b87d487 | bbd8774bf7e8d1f9f32aa9e02d12af20e8cb0e70 | refs/heads/main | 2023-05-02T20:54:58.462766 | 2021-05-17T07:05:06 | 2021-05-17T07:05:06 | 366,949,013 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,422 | py | from django.test import TestCase
from .models import Image,Category,Location
# Create your tests here.
class TestImage(TestCase):
def setUp(self):
self.location = Location(name='Nairobi')
self.location.save_location()
self.category = Category(name='food')
self.category.save_categor... | [
"nyongesaderrick@gmail.com"
] | nyongesaderrick@gmail.com |
64a6de091d8defdd83efab73dcacb5a3d0e4d9a2 | e50244b666bc6af028beb3c1a83de70e7c61edd0 | /L1/L1.py | e70b76e021489eff37ea41e71b021b4c15c88804 | [] | no_license | justaleaf/ML-2020 | 21e9b3026b1dd25d0727e9868e026eca7a3301c8 | 234c2a5e16dcc2d1f71483f57ec3c806cd6fdff0 | refs/heads/main | 2023-01-24T12:32:25.070338 | 2020-11-05T11:57:05 | 2020-11-05T11:57:05 | 305,983,518 | 0 | 0 | null | 2020-10-21T10:08:33 | 2020-10-21T10:08:32 | null | UTF-8 | Python | false | false | 5,384 | py | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import numpy as np
import pandas as pd
from tabulate import tabulate
from IPython.core.debugger import set_trace
from IPython.display import display
from matplotlib import pyplot as plt
from sklearn import preprocessing
# In[2]:
df = pd.read_csv('../data/heart_fail... | [
"thexcloud@gmail.com"
] | thexcloud@gmail.com |
a27316b1c3a96c08649b135d42376f0518fe896a | 73e147e1d49656fafba5d4bf84df5ded2c4dca73 | /team_9/cocos/test/test_layer_rotate.py | 686cddc35f9dbf85bfe18864a85263644c578451 | [
"LGPL-2.1-only",
"CC-BY-NC-4.0",
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-proprietary-license",
"CC-BY-NC-SA-2.0",
"BSD-3-Clause"
] | permissive | Donnyvdm/dojo19 | 2278747366c57bfc80eb9ee28ca617ec0a79bae3 | 3cf043a84e3ad6d3c4d59cd9c50b160e1ff03400 | refs/heads/master | 2020-07-26T12:22:15.882800 | 2019-09-15T20:34:36 | 2019-09-15T20:34:36 | 208,642,183 | 1 | 0 | BSD-3-Clause | 2019-09-15T18:57:53 | 2019-09-15T18:57:52 | null | UTF-8 | Python | false | false | 704 | py | from __future__ import division, print_function, unicode_literals
# This code is so you can run the samples without installing the package
import sys
import os
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
#
testinfo = "t 0.1, s, t 0.5, s, t 1.5, s, t 2.1, s, q"
tags = "Layer, RotateBy"
import co... | [
"a.campello@wellcome.ac.uk"
] | a.campello@wellcome.ac.uk |
2dac7ea615bd751bd0c4315c3a059a77790feec3 | 4bc2af514877135a222826b2c5ac48632045f2fa | /jenkins/update_mysql.py | c05b16d304495222a0c459566afbcffa9cb12ba7 | [] | no_license | 18734865664/python | 1853481ac1dcd515f691cfc11557f76fbbb083de | 25bc355ddb2abefc5a3736fb99e6345138ebbefc | refs/heads/master | 2020-03-17T09:37:57.469741 | 2018-06-28T08:41:37 | 2018-06-28T08:41:37 | 133,482,315 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,007 | py | #! /usr/local/python3/bin/python3
# encodig: utf-8
import pymysql
import sys
sys.path.insert(0, '/data/nfs/python/learn_python/jenkins/')
from get_file_list import getFileList
from get_args import getJenkinsArgs
import get_args
class update_mysql():
def __init__(self):
self.mysql_host = "10.100.137.179"
... | [
"you@example.com"
] | you@example.com |
bd82bc93bbe5236c83258907b964786f94993fba | 78144baee82268a550400bbdb8c68de524adc68f | /Production/python/Fall17/StealthSHH_2t4b_mStop-1150_mSo-100_TuneCP2_13TeV-madgraphMLM-pythia8_cff.py | 1ac912d68f2b4a277560f5b985a265b3464358f5 | [] | no_license | tklijnsma/TreeMaker | e6989c03189b849aff2007bad22e2bfc6922a244 | 248f2c04cc690ef2e2202b452d6f52837c4c08e5 | refs/heads/Run2_2017 | 2023-05-26T23:03:42.512963 | 2020-05-12T18:44:15 | 2020-05-12T18:44:15 | 263,960,056 | 1 | 2 | null | 2020-09-25T00:27:35 | 2020-05-14T15:57:20 | null | UTF-8 | Python | false | false | 1,581 | py | import FWCore.ParameterSet.Config as cms
maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
readFiles = cms.untracked.vstring()
secFiles = cms.untracked.vstring()
source = cms.Source ("PoolSource",fileNames = readFiles, secondaryFileNames = secFiles)
readFiles.extend( [
'/store/mc/RunIIFall17Mini... | [
"Chris_Madrid@Baylor.edu"
] | Chris_Madrid@Baylor.edu |
98d038b91f190b29f651a48eb083b8182feee660 | c1bd12405d244c5924a4b069286cd9baf2c63895 | /azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/tag.py | b1eef24ccd54891a5c4e373cc43537a5efa21229 | [
"MIT"
] | permissive | lmazuel/azure-sdk-for-python | 972708ad5902778004680b142874582a284a8a7c | b40e0e36cc00a82b7f8ca2fa599b1928240c98b5 | refs/heads/master | 2022-08-16T02:32:14.070707 | 2018-03-29T17:16:15 | 2018-03-29T17:16:15 | 21,287,134 | 1 | 3 | MIT | 2019-10-25T15:56:00 | 2014-06-27T19:40:56 | Python | UTF-8 | Python | false | false | 1,527 | 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 ... | [
"laurent.mazuel@gmail.com"
] | laurent.mazuel@gmail.com |
53a44bbbbdc69fae4e85ce4a0a8ddc355ef5e24e | 06cabd66791a5ee15bb3ba4b04d8bc8dea5bfda0 | /2016-08-16-UCNPs-SigmaAldrich-Penta/AnalysisPenta28kv.py | 611b41ba2d5d1f7b6d9b03779b15b19731053779 | [] | no_license | claiello/python_data_analysis | f7405dfd15f0dccd2089b1878af40b9d075071d2 | 0b8d3cc5717243e72214dc24a7fc823220e13179 | refs/heads/master | 2020-04-17T20:36:51.720891 | 2017-04-23T10:00:08 | 2017-04-23T10:00:08 | 66,181,455 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 34,202 | py | import os
import sys
sys.path.append("/usr/bin") # necessary for the tex fonts
sys.path.append("../Python modules/") # necessary for the tex fonts
import scipy as sp
import scipy.misc
import matplotlib
#matplotlib.use("Agg")
import matplotlib.pyplot as plt
import h5py
import numpy as np
from BackgroundCorrection import... | [
"claiello@gmail.com"
] | claiello@gmail.com |
b5595d5d7348a72d9b7433a750d364865b2ef7b7 | 2ae420ff508e7e6799dbd0b9e0c71be96ef2ced9 | /pyre_extensions/__init__.py | c84f0ed282dd1e45df78c74712bcd532e404169e | [
"MIT"
] | permissive | njayinthehouse/pyre-check | 5c8ab3ee2048ad395652d2079c5dcbcee288fbfc | 14872ab61ffef3fe61490c4cf0e098954157a5ac | refs/heads/master | 2020-05-31T17:23:56.392622 | 2019-06-05T05:06:58 | 2019-06-05T05:10:37 | 186,618,634 | 0 | 0 | null | 2019-05-14T12:35:46 | 2019-05-14T12:35:46 | null | UTF-8 | Python | false | false | 1,059 | py | def ParameterSpecification(name):
"""This kind of type variable captures callable parameter specifications
(known as argspecs in the runtime and inspect library) instead of types,
allowing the typing of decorators which transform the return type of the
given callable.
For example:
from typin... | [
"facebook-github-bot@users.noreply.github.com"
] | facebook-github-bot@users.noreply.github.com |
d4c6454dd5d3cfb9f950a4eb640378ff7e298582 | 16197783050cb044729f8a4073f6a137658cf831 | /lesson23___/lesson20/iter_class.py | 68463ffc0b1a07c822ad9e774bf4970d94b2e3f0 | [] | no_license | AlexseyPivovarov/python_scripts | 04c053d531e1d36266e82b8b9dc75161a0bcdcf9 | 99d849c834c647cf669e55f5b8f32d984a288091 | refs/heads/master | 2020-04-07T02:26:31.520861 | 2018-11-17T11:21:02 | 2018-11-17T11:21:02 | 157,976,592 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 549 | py | class Foo:
a=1
b=2
def __init__(self,a,b):
self.a = a
self.b = b
def __iter__(self):
yield self.a
yield self.b
# return (item for item in (self.a,self.b,))
def generator(self):
return iter(self)
class FooFoo(Foo):
def __init__(self,*args):
... | [
"a.peevovarov@gmail.com"
] | a.peevovarov@gmail.com |
3972ca7ba5760c2af411c970167427094f32caf0 | 51e6720d5bc219df3ce9bc899fe04ca71d6e86af | /Python/POO I/Cinema.py | 0140e3000714059ddb4dc507936c847a7d7b3a57 | [] | no_license | ThiagoCComelli/POO | 7466d8272ccc742400d55603e70a9b3be16e80a1 | 2f878d2d2674e11ea584f6c23b94bd27dea26d65 | refs/heads/master | 2020-06-03T15:29:04.704709 | 2020-01-10T01:39:04 | 2020-01-10T01:39:04 | 191,628,147 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,866 | py | # -*- coding: utf-8 -*-
class Cinema():
def __init__(self,nome,endereco):
self.__nome = nome
self.__endereco = endereco
self.__funcionarios = []
self.__salas = []
self.__filmes = []
self.__sessoes = []
def getNome(self):
return self.__nome
def getEnde... | [
"thiago.comelli@outlook.com"
] | thiago.comelli@outlook.com |
429ac7ba8eb6de79c8e5918dfb728409774bf846 | 25f16d9e3416e186f677e425d7c3c19fb1b6b76a | /qt5_exercises/concurrent/bad_example_1.py | fccb43f8a4882055a4ed050ebd0b638cfb424564 | [] | no_license | amisaka/pyqt5Samples | 662b33255f9fd3522a8600e23b1f5e742eef769e | 40f295232a726b4d67cc3124dcf6ac46a2efe9c8 | refs/heads/master | 2023-08-27T18:11:58.162821 | 2021-11-03T14:06:10 | 2021-11-03T14:06:10 | 419,336,692 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 971 | py | import sys
import time
from PyQt5.QtCore import QTimer
from PyQt5.QtWidgets import (
QApplication,
QLabel,
QMainWindow,
QPushButton,
QVBoxLayout,
QWidget,
)
class MainWindow(QMainWindow):
def __init__(self):
super().__init__()
self.counter = 0
layout = QVBoxLayou... | [
"amisaka@gmail.com"
] | amisaka@gmail.com |
6dd4201175ab7bff2cd0e7bc706dc1287b58e4f8 | d0b67717a0b1378caa2b6590173153831e98fa3b | /w.py | 52c95e1be50b8987df6f99592363dabac89ae350 | [] | no_license | anukhandelwal26/python-codes | d1931bc98b109c6c7643340d269d65574d0604ea | 0f6096a267f3f58719995b4d65fa7b2b431f5e5d | refs/heads/master | 2020-03-20T21:06:18.115849 | 2018-06-26T11:10:58 | 2018-06-26T11:10:58 | 137,724,208 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 121 | py |
print"enter a number"
n=raw_input()
a=int(n)
f=1
i=1
while (i<=a):
f=f*i
i=i+1
print "factorial of",n,"is",f
| [
"root@localhost.localdomain"
] | root@localhost.localdomain |
4d1b9324b39491d5d9bc18a2121746ef329ae04d | b34641367c20afd688050976339ebae3ca7220a0 | /somemart_auth/somemart_auth/bin/django-admin.py | 53e30b0ed682707f5bb3c5c3d3a6699aba4d164c | [] | no_license | DrShiz/learning4 | cee6e46f733badbe17ab410e5a89b2106e493d2e | 85fa372d3bdccf7da487d13d147c1b639ddceefd | refs/heads/master | 2023-03-06T00:20:00.048331 | 2021-02-16T16:39:35 | 2021-02-16T16:39:35 | 339,447,119 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 192 | py | #!/Users/terekhovas/PycharmProjects/learning4/somemart_auth/somemart_auth/bin/python3
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
| [
"shizdryeah@gmail.com"
] | shizdryeah@gmail.com |
ffe7dd88fd8bc92e657aaa2d716937bfe5577bb7 | 016200d5593feb15bf7737389586bd161398a09c | /Database/venv/bin/rstpep2html.py | d3334da4c02e7abe3f073230dad54c21f6a5896b | [] | no_license | MarcPartensky/Python-2019 | d74e41710c9b48887e141ef5a8251f5e5d06026d | 1b29680292fdc48af25ae45ce0e9572b8c31427d | refs/heads/master | 2021-07-07T18:46:49.708387 | 2020-08-11T19:49:01 | 2020-08-11T19:49:01 | 166,604,663 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 731 | py | #!/Users/marcpartensky/Programs/Python/Repository-2019/Database/venv/bin/python
# $Id: rstpep2html.py 4564 2006-05-21 20:44:42Z wiemann $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
A minimal front end to the Docutils Publisher, producing HTML from P... | [
"marc.partensky@gmail.com"
] | marc.partensky@gmail.com |
c4f18d847f19ca495879aa38a6784637e2cdc09e | f34298735dbaee1a56da7dcc477f2734c6a1a305 | /src/tandlr/emails/views.py | 7e5be2847adb90189418ba321dbc33b1554a340c | [
"Apache-2.0"
] | permissive | shrmoud/schoolapp | 6f8e71b68cf42b6d2ac54acb42ed0a4664d5aaa9 | 7349ce18f56658d67daedf5e1abb352b5c15a029 | refs/heads/master | 2021-03-24T13:34:44.385285 | 2017-06-11T21:37:53 | 2017-06-11T21:37:53 | 94,031,086 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,020 | py | from django.http import Http404
from django.shortcuts import get_object_or_404
from django.template import TemplateDoesNotExist
from django.views.generic.base import TemplateView
from tandlr.scheduled_classes.models import Class
class StaticEmailView(TemplateView):
"""
View to render static email templates f... | [
"smoudgal@hawk.iit.edu"
] | smoudgal@hawk.iit.edu |
80d8b80562719182cb64b44da2035610d8f622f3 | 86206b05a6e0a425ba5401de50b8645bddf77780 | /Oper Python/SFDC Oper/Training Scripts/Selenium/Oper1/Sandbox/XLLib.py | c3f4c611f5f1340cccab5f36f85d28d7b2f13bba | [] | no_license | QuestTestAutomation/PersistentDesktop1python | 2e626ea16ce0fd4c697b156fdc2f9b3ca85bbd7b | ece25957edb6f87b2777b261b31914d22ebd99ad | refs/heads/master | 2021-03-10T21:55:25.450872 | 2020-03-27T09:45:14 | 2020-03-27T09:45:14 | 246,488,801 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,491 | py | import openpyxl
import os
import time
from openpyxl.utils import get_column_letter
from openpyxl import Workbook
from openpyxl.compat import range
def Create_Workbook(file,sheetname):
sheetexists = 0
if os.path.isfile(file):
mywb = openpyxl.load_workbook(file)
print("XL file exists")
else:... | [
"45171766+QuestTestAutomation@users.noreply.github.com"
] | 45171766+QuestTestAutomation@users.noreply.github.com |
a34584dbef4b37a0544599bc74d308186d99c177 | b7138d31e13920ad1bf6a82ff062a6f512c48983 | /cal_test.py | a9aa6c440b822b666232f96a284da723bc4b737a | [] | no_license | aaqqxx/ZA_cal | bcb6863a1aa882ed34fb18a4070ecb316568a3f1 | 2b604d2f1d472666d03c0a63a3c18f5710650a2e | refs/heads/master | 2020-05-04T14:03:49.846304 | 2019-04-03T01:05:04 | 2019-04-03T01:05:04 | 179,183,203 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,200 | py | # coding:utf-8
__author__ = 'XingHua'
"""
光栅尺位置VS出光学位置
参考点为d1前面的那个镜子,见90nm的ZA图纸。
从Excel中的光栅尺位置计算出光学位置d1,d2,d3,d5.
从光学位置计算出光栅尺位置。
"""
import matplotlib.pyplot as plt
import numpy as np
from glob import glob
import pandas as pd
import argparse
import sys
import math
def quadratic(a, b, c):
if not isinstance(a, (i... | [
"aaqqxx1910@gmail.com"
] | aaqqxx1910@gmail.com |
0f47c9b1f5dd09360682347e38d451c90365764d | 3bb57eb1f7c1c0aced487e7ce88f3cb84d979054 | /semeval/corpora/semeval/test_tags.py | 9ba72eace0ee9a1f33302f8a869d091beb0940c0 | [] | no_license | ghpaetzold/phd-backup | e100cd0bbef82644dacc73a8d1c6b757b2203f71 | 6f5eee43e34baa796efb16db0bc8562243a049b6 | refs/heads/master | 2020-12-24T16:41:21.490426 | 2016-04-23T14:50:07 | 2016-04-23T14:50:07 | 37,981,094 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 366 | py | f1 = open('semeval_test_clean.txt')
f2 = open('tagged_sents_semeval_test.txt')
c = 0
for line1 in f1:
line2 = f2.readline()
tokens = line1.strip().split('\t')[0].strip().split(' ')
tags = line2.strip().split(' ')
if len(tokens)!=len(tags):
print('Tokens: ' + str(tokens))
print('Tags: ' + str(tags))
print('')... | [
"ghpaetzold@outlook.com"
] | ghpaetzold@outlook.com |
0ce313309436e63ed807ba4f071dae2e79b2cffc | c2f809fb0c3aaf5c92f2ec04c41df5e0e764a088 | /foolbox_custom/attacks/gen_attack.py | 139b84c528f4c13925e0c581059b53e805b9fe38 | [] | no_license | lavanova/adaptive-auto-attack | 7f4834cdc9dbeb6e161fc869f71bb284e854604a | 8ed8b33afc6757a334c4d3f046fcb7793dd2c873 | refs/heads/master | 2023-05-07T17:44:33.466128 | 2021-05-20T09:03:53 | 2021-05-20T09:03:53 | 369,143,471 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,739 | py | from typing import Optional, Any, Tuple, Union
import numpy as np
import eagerpy as ep
from ..devutils import atleast_kd
from ..models import Model
from attack.criteria import TargetedMisclassification
from ..distances import linf
from .base import FixedEpsilonAttack
from .base import T
from .base import get_chann... | [
"icebergmatt0109@gmail.com"
] | icebergmatt0109@gmail.com |
923f733b0186d059380bc2c96093eb818d7f3e35 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02392/s188244302.py | 4cfcecde196f3237c6620b3b8ed79280894d91fd | [] | 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 | 85 | py | a, b, c = [int(w) for w in input().split()]
print("Yes" if a < b and b < c else "No") | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
5b9f092d1f6e4f16af01d0261b62ddb5819e965a | dcea1a4a7df68b74e54f8c59aadd0d1b287c9727 | /F2M_train_V11.py | 047c38c3346074f642674286a7473dabe3ebf09a | [] | no_license | Kimyuhwanpeter/F2M_Version_V14 | 3dae9c8066efbac87afb7def24fb8938e3c3013f | eebba737f9f46a1b41b688a4e5d73a08579295e6 | refs/heads/main | 2023-07-02T19:01:24.695947 | 2021-08-06T04:59:34 | 2021-08-06T04:59:34 | 392,281,266 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 19,170 | py | # -*- coding:utf-8 -*-
#from F2M_model_V14 import *
from F2M_model_V14_2 import *
from random import shuffle, random
from collections import Counter
import matplotlib.pyplot as plt
import numpy as np
import easydict
import os
FLAGS = easydict.EasyDict({"img_size": 256,
... | [
"noreply@github.com"
] | Kimyuhwanpeter.noreply@github.com |
7130805026446d24d544f10d895736cf095e094e | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02937/s210990064.py | f15af763a1739d3abe1ae11028c005fee5325924 | [] | 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 | 455 | py | from bisect import bisect_left
import sys
s = input()
t = input()
d = {char:[] for char in 'abcdefghijklmnopqrstuvwxyz'}
for i in range(len(s)):
d[s[i]].append(i)
cnt = 0
index = 0
for char in t:
if not d[char]:
print(-1)
sys.exit()
i = bisect_left(d[char], index)
if i == len(d[char]):... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
d8947f54da103676026570125e67410bffb7919f | 99d7765da35926279c4a4fd7313d55908786f4b8 | /1/7/17256/17256.py | d960171dbed858b264d23746c09f153f0475dfbb | [
"MIT"
] | permissive | chr0m3/boj-codes | b8294c5d4d10a5af25b5276427bccd74d0866ef5 | d71d0a22d0a3ae62c225f382442461275f56fe8f | refs/heads/master | 2021-08-16T15:24:57.733088 | 2021-03-22T13:13:10 | 2021-03-22T13:13:10 | 91,523,558 | 3 | 2 | null | null | null | null | UTF-8 | Python | false | false | 149 | py | ax, ay, az = map(int, input().split())
cx, cy, cz = map(int, input().split())
bx = cx - az
by = int(cy / ay)
bz = cz - ax
print(f'{bx} {by} {bz}')
| [
"chr0m3@users.noreply.github.com"
] | chr0m3@users.noreply.github.com |
bcfda7e647bf3de983700535dd5d34d12deef7d1 | a01fb7bb8e8738a3170083d84bc3fcfd40e7e44f | /python3/core/meta/define_class.py | f2363c09f30ec08eda430d475519793a0f9d812f | [] | no_license | jk983294/CommonScript | f07acf603611b4691b176aa4a02791ef7d4d9370 | 774bcbbae9c146f37312c771c9e867fb93a0c452 | refs/heads/master | 2023-08-21T17:50:19.036159 | 2023-08-16T00:22:03 | 2023-08-16T00:22:03 | 42,732,160 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 517 | py | import types
# Example of making a class manually from parts
# Methods
def __init__(self, name, shares, price):
self.name = name
self.shares = shares
self.price = price
def cost(self):
return self.shares * self.price
cls_dict = {
'__init__': __init__,
'cost': cost,
}
#... | [
"jk983294@gmail.com"
] | jk983294@gmail.com |
38fea3cb4a84ad737b0db2e9f0e3d3bd11cf0e52 | 0343de40021f8dd72fb9a6cb31b5d2f24ccd7971 | /utilities/wake_models_mean/array_efficiency_openMDAO.py | fc3e2db61bcf729ad72f210df061bd8098d2014a | [] | no_license | sebasanper/WINDOW_dev | 47ae9252e6fadb2a3b1a0aae3383681a7955f4ea | 3c6437a777f2fc3be1dfd3d53b5d2ed25281c55c | refs/heads/master | 2021-01-01T19:45:02.555727 | 2018-05-21T20:27:56 | 2018-05-21T20:27:56 | 98,670,270 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,855 | py | from numpy import array
from openmdao.api import Component, Group, Problem
from farm_energy.layout import read_layout
from power_models import power_v90 as power
from site_conditions.wind_conditions.windrose import read_windrose
from wake_models import jensen_1angle, ainslie_1angle, larsen_1angle
class JensenWindRo... | [
"s.sanchezperezmoreno@tudelft.nl"
] | s.sanchezperezmoreno@tudelft.nl |
356538f816b7e65cf077f0dc5839f9ca201bca9f | edbb63696580638af0084ee318d2c9bc9e8c7e79 | /linkf.py | f95261c46757de6bb39993f4c951b15bf01b7640 | [] | no_license | awaddell77/Scrapers | fef34e34b8e039f4992497cae75135cdb57b2581 | 0a36fb2c99f2d7b90533834b29c0ba8f27c13a85 | refs/heads/master | 2020-05-21T13:44:06.524855 | 2020-03-16T23:00:45 | 2020-03-16T23:00:45 | 62,753,048 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 838 | py | def linkF(s,n, base = 0, attrs= 0, default = '"'):#x is the item, n = tag takes link tag (MUST BE STRING) and extracts the link
l =[]
ln = ''
x = s
if attrs != 0:
x = re.sub('<a','', x)#strips the tag from the string, helps in certain situations where the location of the link changes in between ... | [
"waddell.andrew@gmail.com"
] | waddell.andrew@gmail.com |
6a29db1aa6a6aa74ff51bb6790448fbd6080f5d9 | eb518a18d8055400c85d1b2f714fe9d4d654b941 | /_done/tests/test_skel_filter.py | 6c108e4ac6c2a32d3368595cbd6277d0b33f1378 | [] | no_license | ver228/single-worm-analysis | c755709354025f629f7c774749394743c7b9a46b | 8d0a442fb93ad25aa30743f6c31f883639524a4d | refs/heads/master | 2021-09-14T11:31:17.761390 | 2018-05-12T23:00:54 | 2018-05-12T23:00:54 | 79,457,317 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,786 | py | # -*- coding: utf-8 -*-
"""
Created on Thu Dec 17 21:57:30 2015
@author: ajaver
"""
import matplotlib.pylab as plt
import h5py
import pandas as pd
import cv2
import numpy as np
from skimage.filters import threshold_otsu
from scipy.signal import medfilt
import time
import os
from MWTracker.trackWorms.getSkeletonsTable... | [
"ajaver@MRC-8791.local"
] | ajaver@MRC-8791.local |
8f9fac60b55576c80814a327c149e2c7951c05eb | 1b3addbc9473b6ffb999665601470ccc4d1153b0 | /libs/magic.py | 53a91fd47331bd4941f6ce36bfa0ea6caa24c08f | [] | no_license | weijia/approot | e1f712fa92c4c3200210eb95d251d890295769ba | 15fac5b31a4d619d1bdede3d1131f5e6e57cd43b | refs/heads/master | 2020-04-15T13:15:01.956721 | 2014-08-26T14:02:17 | 2014-08-26T14:02:17 | 11,049,975 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,745 | py | """
magic is a wrapper around the libmagic file identification library.
See README for more information.
Usage:
>>> import magic
>>> magic.from_file("testdata/test.pdf")
'PDF document, version 1.2'
>>> magic.from_file("testdata/test.pdf", mime=True)
'application/pdf'
>>> magic.from_buffer(open("testdata/test.pdf").r... | [
"richardwangwang@gmail.com"
] | richardwangwang@gmail.com |
b4b7ad28601012a65664678ac79d4ce0ccda5787 | 6c4dc59ca37a2106774cc7bdd3d6ab4f5abb4794 | /data/v8-0-7.37_ForApproval/CutOpCard/OPTIMIZED_171108_ElEl_HighMass_Bin2/MakeSystCycle_ElEl.py | 367262c206330a6fff83fc3effe2a9f9712eb023 | [] | no_license | jalmond/HNL_Type1_Plotter | 8a2c4ccd9e7ae3cf8b9d60b2fb3dd46ec56a8111 | 595143893ec6d1b12efd20713b127ca2a71ba019 | refs/heads/main | 2023-08-01T06:09:47.955278 | 2021-09-09T22:30:37 | 2021-09-09T22:30:37 | 404,880,761 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,960 | py | import os
CutCardDirName = "OPTIMIZED_171108_ElEl_HighMass_Bin2"
## Bin1 : TwoJet_NoFatJet
## Bin2 : OneJet / OneFatJet
DoBin1 = False
os.system("mkdir -p Cycles/")
masses = [90, 100, 125, 150, 200, 250, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500]
for mass in masses:
filename = "HNEl... | [
"jalmond@cern.ch"
] | jalmond@cern.ch |
4a08e521718dcfe3e876c959cc6199e63c1e9c0e | 8d92a27a87b452b22c94adfe66ce45c84083fdf9 | /myproject/settings.py | f46b3505cb921eb07a55a7331d81e6bbbfe6846c | [] | no_license | dev-fahim/t_app | 336c707fed31aecaabb757c8283d4c84fa1cf88f | a0faeac3d0ce45d1f557c7c52c4bec3fffa6310e | refs/heads/master | 2022-12-15T20:09:55.857431 | 2018-11-21T06:56:18 | 2018-11-21T06:56:18 | 158,504,246 | 0 | 0 | null | 2022-12-08T01:18:29 | 2018-11-21T06:55:37 | Python | UTF-8 | Python | false | false | 3,097 | py | """
Django settings for myproject project.
Generated by 'django-admin startproject' using Django 2.1.2.
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 os
... | [
"fahim6668@gmail.com"
] | fahim6668@gmail.com |
1d4c22ebff1083d8a40dc2c2f66e9ac41fe68e8e | 40ca9c74e41047b4f057923894f664653c2317c8 | /002_celery/django/sth/views.py | e25e6e38ffa47e47f99b2dd7b42f50441edad371 | [
"MIT"
] | permissive | MeNsaaH/Task-Queues-Django | 1207856fd382baa63f018b60e5c6b79fc0c52b31 | 73bebc9b755e2943455939817325aa63a1aa7f62 | refs/heads/master | 2022-11-21T09:44:57.856364 | 2018-10-11T11:16:50 | 2018-10-11T11:16:50 | 152,408,206 | 0 | 0 | MIT | 2022-11-10T12:56:38 | 2018-10-10T10:49:40 | Python | UTF-8 | Python | false | false | 323 | py | from django.http import HttpResponse
from sth.tasks import some_task
# Create your views here.
def some_view(request):
result = some_task.delay()
# Other Methods on Celery AsyncResult
# result.ready()
# result.get(timeout=1)
# result.traceback
return HttpResponse('some task has being started... | [
"="
] | = |
906d663716faf84d5efa71adc0baced6ba2e9174 | 5ecdbc6e79c408ed45327ffeae11eae91c4b8ce6 | /ilusiones_sales/models/contract_number.py | f898d4746618b0bb0ccf7fbf890269a839a2dc93 | [] | no_license | rosalesdc/ejemplos_addons | c6ee5cf9a10935b38165eca84c07a84d4d9c2538 | 8c3e74a3d0145b74cb8288772763e88f39979e6f | refs/heads/master | 2022-12-22T07:21:16.238052 | 2020-09-25T06:18:34 | 2020-09-25T06:18:34 | 298,184,002 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 289 | py | # -*- coding: utf-8 -*-
from odoo import models, fields, api
class ContractNumber(models.Model):
_name = 'contract.number'
_description = "Numero de conrato"
name = fields.Char(string='Numero de serie', required=True)
date = fields.Date(string="Fecha del contrato")
| [
"rosales9146@gmail.com"
] | rosales9146@gmail.com |
b101bda0005c03561d755e2270489d08ff015499 | a46d135ba8fd7bd40f0b7d7a96c72be446025719 | /packages/python/plotly/plotly/validators/layout/scene/zaxis/_categoryarraysrc.py | b38055e7ec20ace3ec74c3b976ac52a75b5fd63d | [
"MIT"
] | permissive | hugovk/plotly.py | 5e763fe96f225d964c4fcd1dea79dbefa50b4692 | cfad7862594b35965c0e000813bd7805e8494a5b | refs/heads/master | 2022-05-10T12:17:38.797994 | 2021-12-21T03:49:19 | 2021-12-21T03:49:19 | 234,146,634 | 0 | 0 | MIT | 2020-01-15T18:33:43 | 2020-01-15T18:33:41 | null | UTF-8 | Python | false | false | 445 | py | import _plotly_utils.basevalidators
class CategoryarraysrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="categoryarraysrc", parent_name="layout.scene.zaxis", **kwargs
):
super(CategoryarraysrcValidator, self).__init__(
plotly_name=plotly_name... | [
"noreply@github.com"
] | hugovk.noreply@github.com |
1f84c1a411609c8c5b853c69c2baa18edb4f027e | 05148c0ea223cfc7ed9d16234ab3e6bb40885e9d | /Packages/matplotlib-2.2.2/lib/mpl_examples/pyplots/whats_new_98_4_fill_between.py | ed4b7f4ac7d55386bb003fc91a8e1dfea59642c1 | [
"MIT"
] | permissive | NightKirie/NCKU_NLP_2018_industry3 | 9ee226e194287fd9088429f87c58c874e050a8b3 | 23ac13644b140587e23cfeffb114c7c6f46f17a2 | refs/heads/master | 2021-06-05T05:33:09.510647 | 2018-07-05T10:19:47 | 2018-07-05T10:19:47 | 133,680,341 | 1 | 4 | MIT | 2020-05-20T16:29:54 | 2018-05-16T14:43:38 | Python | UTF-8 | Python | false | false | 456 | py | """
=============================
Whats New 0.98.4 Fill Between
=============================
"""
import matplotlib.pyplot as plt
import numpy as np
x = np.arange(0.0, 2, 0.01)
y1 = np.sin(2*np.pi*x)
y2 = 1.2*np.sin(4*np.pi*x)
fig, ax = plt.subplots()
ax.plot(x, y1, x, y2, color='black')
ax.fill_between(x, y1, y2, w... | [
"qwer55113322@gmail.com"
] | qwer55113322@gmail.com |
19dd60844691611bae70a8df07c9fc9cd60b0efb | 23f534a67f2d58ea556885b93584590f57f47123 | /src/tutorials/fluentpython/concurrency_futures/Standardflags.py | 319a5ec9b067726a606f19bac52621071e8c93a1 | [] | no_license | manas-mukherjee/MLTools | 2cb3e735d4967f4c60c08739c86e07224977a182 | eb18e6d1c6a8900ed47332a7dfb1ceaccc789deb | refs/heads/master | 2022-12-07T22:46:13.419343 | 2020-03-10T09:46:03 | 2020-03-10T09:46:03 | 98,766,117 | 2 | 0 | null | 2022-11-22T01:27:34 | 2017-07-30T00:36:56 | Jupyter Notebook | UTF-8 | Python | false | false | 976 | py | import os
import time
import sys
import requests
POP20_CC = ('CN IN US ID BR PK NG BD RU JP '
'MX PH VN ET EG DE IR TR CD FR').split()
BASE_URL = 'http://flupy.org/data/flags'
DEST_DIR = 'downloads/'
def save_flag(img, filename):
path = os.path.join(DEST_DIR, filename)
with open(path, 'wb') as... | [
"mmanas19@gmail.com"
] | mmanas19@gmail.com |
432e56502ab6f191dd680864cf5673b011f9a73b | f6f632bee57875e76e1a2aa713fdbe9f25e18d66 | /python/_1001_1500/1434_number-of-ways-to-wear-different-hats-to-each-other.py | 6e4134899e9fb8ff1f3ae283f20327e4315b3a62 | [] | no_license | Wang-Yann/LeetCodeMe | b50ee60beeeb3661869bb948bef4fbe21fc6d904 | 44765a7d89423b7ec2c159f70b1a6f6e446523c2 | refs/heads/master | 2023-08-07T05:31:23.428240 | 2021-09-30T15:33:53 | 2021-09-30T15:33:53 | 253,497,185 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,244 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author : Rock Wayne
# @Created : 2020-06-19 08:00:00
# @Last Modified : 2020-06-19 08:00:00
# @Mail : lostlorder@gmail.com
# @Version : alpha-1.0
"""
# 总共有 n 个人和 40 种不同的帽子,帽子编号从 1 到 40 。
#
# 给你一个整数列表的列表 hats ,其中 hats[i] 是第 i 个人所有喜欢帽子的列表。 ... | [
"rock@get.com.mm"
] | rock@get.com.mm |
6318b848bbab904688fa14511ab9a2f88c7fd1b4 | 7a5b729a660a35d0d80c9836202025a719f026fb | /general codes/p18.py | 303da159416192105ea9e6922a2a6bf78a450f29 | [] | no_license | Harshit2009/My-Programs- | 7a05eb3369b98010805752a0234867b726c4ac0e | 1ac60faeb0ba514f2c35bcb82be43654b5cef785 | refs/heads/master | 2023-01-13T18:58:26.088714 | 2020-11-19T08:31:43 | 2020-11-19T08:31:43 | 269,538,702 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 50 | py | for i in range(20,0,-2) :
print(i)
| [
"noreply@github.com"
] | Harshit2009.noreply@github.com |
c26155b2c52ac0f93816f82789a0620fa8778e43 | 30319ef38df7cdd57a0e31d32009dfaaa6803ce2 | /zeijemol/views/startup.py | c2f4684c1e5c34e34f66fd847260a1c3cc6652bf | [] | no_license | neurospin/zeijemol | 9a064562387604bfbd4cd619687719d99074736c | d023e6f7907b73810c4496687d63dead5836138c | refs/heads/master | 2020-04-11T03:38:09.852328 | 2017-09-12T11:44:46 | 2017-09-12T11:44:46 | 50,499,760 | 1 | 4 | null | 2017-08-31T13:21:45 | 2016-01-27T10:26:44 | JavaScript | UTF-8 | Python | false | false | 7,706 | py | ##########################################################################
# NSAp - Copyright (C) CEA, 2013
# Distributed under the terms of the CeCILL-B license, as published by
# the CEA-CNRS-INRIA. Refer to the LICENSE file or to
# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
# for details.
##########... | [
"antoine.grigis@cea.fr"
] | antoine.grigis@cea.fr |
d65628556268853325cd60b2ae9d5b468ddd607c | f9acdde88dbb70a2844e058f6c53c016fc8407c1 | /lfc/utils/middleware.py | 73fd4101ae5c997956b80590d97c5c105c676f5e | [] | no_license | yzl11/django-lfc | 536daccae82351af66f3894c38c8f2702691af75 | 75c900d672b4d36705fb8fa4833c446bbb78efea | refs/heads/master | 2021-01-15T13:14:37.192773 | 2015-05-03T15:03:12 | 2015-05-03T15:03:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 574 | py | # python imports
import logging
# permissions imports
from permissions.exceptions import Unauthorized
# lfc imports
import lfc.utils
# Load logger
logger = logging.getLogger(__name__)
class LFCMiddleware:
"""LFC specific middleware.
"""
def process_exception(self, request, exception):
"""Catche... | [
"kai.diefenbach@iqpp.de"
] | kai.diefenbach@iqpp.de |
8b1fab387a52af792c6fd36ad12169f7f23c2915 | 1fe0b680ce53bb3bb9078356ea2b25e572d9cfdc | /venv/lib/python2.7/site-packages/ansible/modules/system/dconf.py | 8183b07648d47b187e110da34bdfeb449350dd45 | [
"MIT"
] | permissive | otus-devops-2019-02/devopscourses_infra | 1929c4a9eace3fdb0eb118bf216f3385fc0cdb1c | e42e5deafce395af869084ede245fc6cff6d0b2c | refs/heads/master | 2020-04-29T02:41:49.985889 | 2019-05-21T06:35:19 | 2019-05-21T06:35:19 | 175,780,457 | 0 | 1 | MIT | 2019-05-21T06:35:20 | 2019-03-15T08:35:54 | HCL | UTF-8 | Python | false | false | 13,220 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2017, Branko Majic <branko@majic.rs>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | [
"skydevapp@gmail.com"
] | skydevapp@gmail.com |
171445b5eb900e95286b527051d51c2668e76e2d | 35e11785421b1831fb19fef8fb03c804fafbad44 | /tests/common_app.py | 4ec8a40249e2c75286b1b661d9dc93b0ad666831 | [
"MIT"
] | permissive | bwisgood/FRF | fff4e264ceeb7397da58564aaca6be6d66c29430 | c520cb98bd2fca5f29964bcc475d84c011d43954 | refs/heads/master | 2023-01-10T19:17:01.396435 | 2019-08-26T11:23:37 | 2019-08-26T11:23:37 | 155,576,545 | 3 | 0 | MIT | 2022-12-27T15:36:47 | 2018-10-31T15:03:07 | Python | UTF-8 | Python | false | false | 2,447 | py | import os
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from v3.wrapper import FlaskRestFramework
from v3.views import GetView, PostView, PutView, RetrieveView, DeleteView
from v3.serializer import Serialize... | [
"857464370@qq.com"
] | 857464370@qq.com |
1c67e00090b8ef676b62937c7101be1ca71afa72 | 6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4 | /kxrhqiE5so3AMXWS7_5.py | 854f9fb64387e018368202a96adcf4e5dab2b54d | [] | 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 | 148 | py |
def get_number_of_apples(n, p):
p = int(p[:-1])/10
ans = int(n * (10-p)/10)
return ans if ans > 0 else "The children didn't get any apples"
| [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
7cd01337d6972f928bcb5624b0c3eda164203938 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_55/558.py | 30c1531227e7121c4e261664bebf108bef953b37 | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 982 | py | #!/usr/bin/python
def precompute(capacity, groups, people):
packing = [[0, 0],]*groups
pointer = 0
for i in range(groups):
pointer = i
total = 0
while (total + people[i]) <= capacity:
total += people[i]
i += 1
if i >= groups:
i = 0
if i == pointer:
break
packing[pointer] = [total, i]
re... | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
a529f6fb1e0b2d70e2d519ca9bf9cc233dec5c97 | 10c459a49cbc8ee2dc3bc2a8353c48b5a96f0c1d | /spider/day05/01.threading_斗图网.py | 069c486f5ef724f2c44ff447e8feb6a0e9c1c0c7 | [] | no_license | alinzel/Demo | 1a5d0e4596ab4c91d7b580da694b852495c4ddcc | cc22bbcdbd77190014e9c26e963abd7a9f4f0829 | refs/heads/master | 2020-03-10T22:26:30.247695 | 2018-04-15T15:37:28 | 2018-04-15T15:37:28 | 129,619,168 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,071 | py | # -*- coding: utf-8 -*-
# @Time : 18-3-2 下午6:15
# @Author : Zwl
# @Email : 944951481@qq.com
# @File : 01.threading_斗图网.py
# @Software: PyCharm
import threading
import requests
from bs4 import BeautifulSoup
import time
import os
# TODO 确定数据
base_url = 'https://www.doutula.com/photo/list/?page='
header = {
'... | [
"944951481@qq.com"
] | 944951481@qq.com |
875345586355a9355bce7e92772c02104b0791a4 | 3faf4b9fb76145b2326446bc6bc190a5712b3b62 | /Algorithms/0143 Reorder List.py | 4af27de2eeddeed16f4dcef88dcca1c8ce33e0ab | [] | no_license | cravo123/LeetCode | b93c18f3e4ca01ea55f4fdebceca76ccf664e55e | 4c1288c99f78823c7c3bac0ceedd532e64af1258 | refs/heads/master | 2021-07-12T11:10:26.987657 | 2020-06-02T12:24:29 | 2020-06-02T12:24:29 | 152,670,206 | 6 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,358 | py | # Definition for singly-linked list.
# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
# Solution 1, fast and slow pointers, reverse linked list techniques
class Solution:
def cut_half(self, node):
slow = fast = node
prev = None
while fast and ... | [
"cc3630@columbia.edu"
] | cc3630@columbia.edu |
32b0be4decbdf1dcd2ea8ee3b247ad2f88aa2dc2 | cd9931a0f21480fedf63a989ba8ebdda98e05e49 | /Perper/Code/tensorflow/tfrecord_test.py | 0406d69de960a8ababf08eafb504ab4ce907bd00 | [] | no_license | WenHui-Zhou/recommand-system | 7c429203268d0ac58560c122ae7b1834ca89472f | fb97229da61aed0a90be97026d42e7a03600382b | refs/heads/main | 2023-05-10T01:04:45.424493 | 2021-06-10T01:58:04 | 2021-06-10T01:58:04 | 321,671,553 | 3 | 1 | null | 2020-12-24T03:33:27 | 2020-12-15T13:10:43 | null | UTF-8 | Python | false | false | 1,119 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author : perperzhou <765647930@qq.com>
# Create Time : 2021-02-09
# Copyright (C)2021 All rights reserved.
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
import numpy as np
def _int64_features(value):
return tf.train.Feature... | [
"765647930@qq.com"
] | 765647930@qq.com |
97193a752d09cf751187c8a863e2c05beba510b1 | 2c0af32f3c1486fb15bc2c0374de2043577cc634 | /modeling/strong_baseline.py | f7e3b52d6417bcf55bacb9a5ebc1e872730c66f7 | [] | no_license | ArronHZG/reid-baseline | 02b210fc3922f4bdc14352979e7ba3c51700ab90 | d20943b117573e25c75338a55cb6219d90d3d2f0 | refs/heads/master | 2021-07-07T09:01:21.784144 | 2021-01-05T08:40:43 | 2021-01-05T08:40:43 | 248,293,171 | 6 | 3 | null | null | null | null | UTF-8 | Python | false | false | 2,213 | py | from torch import nn
from modeling.backbone.resnet import resnet18, resnet50, resnet101, resnet152, \
resnext50_32x4d, resnext101_32x8d, \
wide_resnet50_2, wide_resnet101_2, resnet34
from modeling.base import Base
from utils.data import Data
from modeling.model_initial import weights_init_kaiming, weights_init... | [
"hou.zg@foxmail.com"
] | hou.zg@foxmail.com |
8550448371992efeb2431d1bd8ee6f8f0de91d3f | a1657a0c5c8f3f8b51b98074293e2f2e9b16e6f4 | /libs/pipeline_model/tensorflow_serving/apis/input_pb2.py | 7d04447c2fcdf2d9c3e04f3d1e60c2ccc6c68f68 | [
"Apache-2.0"
] | permissive | PipelineAI/pipeline | e8067636f5844dea0653aef84bd894ca2e700fc6 | 0f26e3eaad727c1d10950f592fe1949ece8153aa | refs/heads/master | 2023-01-07T15:27:33.741088 | 2022-10-25T23:01:51 | 2022-10-25T23:01:51 | 38,730,494 | 2,596 | 512 | Apache-2.0 | 2020-01-30T23:00:08 | 2015-07-08T03:49:23 | Jsonnet | UTF-8 | Python | false | true | 7,736 | py | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: tensorflow_serving/apis/input.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf impor... | [
"chris@fregly.com"
] | chris@fregly.com |
ef93fed2fe484369ac4b364a7b254ed5ed3ceaa9 | ac227cc22d5f5364e5d029a2cef83816a6954590 | /applications/physbam/physbam-lib/Scripts/Archives/log/formatlog.py | a347029839b15cbecce0c24bc25f1497c218db85 | [
"BSD-3-Clause"
] | permissive | schinmayee/nimbus | 597185bc8bac91a2480466cebc8b337f5d96bd2e | 170cd15e24a7a88243a6ea80aabadc0fc0e6e177 | refs/heads/master | 2020-03-11T11:42:39.262834 | 2018-04-18T01:28:23 | 2018-04-18T01:28:23 | 129,976,755 | 0 | 0 | BSD-3-Clause | 2018-04-17T23:33:23 | 2018-04-17T23:33:23 | null | UTF-8 | Python | false | false | 1,148 | py | #!/usr/bin/python
import os
import sys
from elementtree.ElementTree import parse
if len(sys.argv)!=2:
print>>sys.stderr, "Usage: formatlog <dir|logfile>"
sys.exit(1)
log=sys.argv[1]
if os.path.isdir(log): log=os.path.join(log,'log.txt')
tree=parse(open(log))
root=tree.getroot()
RED=chr(27) + '[1;31m'
#BRIGHTR... | [
"quhang@stanford.edu"
] | quhang@stanford.edu |
90ff4b62719875007ffdd04e86f56aa88f14d205 | eade1861db1968645e0e17dfaa5250a4b8245b98 | /steel/chenchenglong/model.py | 747955953ab33570df66258a199d30dea61f87d8 | [] | no_license | piupiuup/competition | 5b5da56fed336e07cf99cef8f5bfe89a8f771900 | 076c30df3d2647cb3580c543e604375e84590ca7 | refs/heads/master | 2022-09-30T14:47:01.244084 | 2020-05-30T12:56:02 | 2020-05-30T12:56:02 | 268,074,180 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 19,059 | py | # https://github.com/junfu1115/DANet
from common import *
from dataset import *
from efficientnet import *
# overwrite ...
from dataset import null_collate as null_collate0
def null_collate(batch):
input, truth_label, truth_mask, infor = null_collate0(batch)
with torch.no_grad():
arange = torch.Floa... | [
"278044960@qq.com"
] | 278044960@qq.com |
e472cd61c73f11e2e79ab123037f39914acf0739 | acef5161a1eeb107b116f9763114bb9f77d701b4 | /pytorch/深度学习之PyTorch入门/2.Intermediate/CNN_Net.py | 378dd4e6966f71b6f77a0e4fbd6285eb685de30e | [] | no_license | lingxiao00/PyTorch_Tutorials | aadb68582edbaa093ab200724c670b36763156b7 | 285bcfb0c60860e47343485daeb54947cd715f97 | refs/heads/master | 2021-10-20T16:56:21.275740 | 2019-03-01T02:46:42 | 2019-03-01T02:46:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,240 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date : 2018-12-06 19:41:51
# @Author : cdl (1217096231@qq.com)
# @Link : https://github.com/cdlwhm1217096231/python3_spider
# @Version : $Id$
import torch
import torch.nn as nn
import torchvision
import torchvision.transforms as transforms
# 配置设备
device = torch... | [
"1217096231@qq.com"
] | 1217096231@qq.com |
b380164b0b9a3be449ed86f3869ccf1544d02d13 | 8b2e251d8ffbce4fe3987c0245d7af9aedb21c15 | /tests/test_github.py | 07cb2df9ad0ed812993750e4a9ece01778075dda | [
"BSD-3-Clause"
] | permissive | xlevus/json-spec | 0f93bbf1ceab27d3d64349782e2e593bc7c4e58e | 86db73bfbfb4c5b476b37b304060b32022a257c6 | refs/heads/master | 2021-01-21T18:51:01.112087 | 2015-06-29T10:46:47 | 2015-06-29T10:46:47 | 38,238,544 | 0 | 0 | null | 2015-06-29T09:11:22 | 2015-06-29T09:11:22 | null | UTF-8 | Python | false | false | 1,146 | py | """
tests.tests_github
~~~~~~~~~~~~~~~~~~
"""
import pytest
from jsonspec.validators import load, ValidationError
def test_issue4():
validator = load({
'$schema': 'http://json-schema.org/draft-04/schema#',
'type': 'object',
'properties': {
'props': {
'... | [
"clint.northwood@gmail.com"
] | clint.northwood@gmail.com |
69924ca5d5756dc11957610d4dc812203f1ab906 | d6c117812a618ff34055488337aaffea8cf81ca1 | /ui/TabbedView.py | 47f85165a496eb4a5ad28aa23e0898bec01b89b3 | [] | no_license | c0ns0le/Pythonista | 44829969f28783b040dd90b46d08c36cc7a1f590 | 4caba2d48508eafa2477370923e96132947d7b24 | refs/heads/master | 2023-01-21T19:44:28.968799 | 2016-04-01T22:34:04 | 2016-04-01T22:34:04 | 55,368,932 | 3 | 0 | null | 2023-01-22T01:26:07 | 2016-04-03T21:04:40 | Python | UTF-8 | Python | false | false | 2,328 | py | # @ui
# https://gist.github.com/jsbain/fcadaffff4be09c4ec78
import ui
class TabbedView(ui.View):
def __init__(self,tablist=[], frame=(0,0)+ui.get_screen_size()):
'''takes an iterable of Views, using the view name as the tab selector.
empty views sre just given generic names'''
self.tabcoun... | [
"itdamdouni@gmail.com"
] | itdamdouni@gmail.com |
b61f1bbafd7a413e534ad4fbe0731bb79f7ec53e | 32676887b51845624748e5debb61a01e3942a7ee | /venv/lib/python3.8/site-packages/fanficfare/story.py | b171bfad1c3365bb2b547bb5b6569eacbd606cdb | [] | no_license | DylanB5402/SummerProject2.5 | 078589fc49cecb402656942710ce5e33e9194f88 | 1cd5fe75f859c82122cf1cc5b5371d0cb73b898a | refs/heads/master | 2022-12-03T21:49:30.392293 | 2020-08-19T04:33:58 | 2020-08-19T04:33:58 | 288,633,863 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 59,866 | py | # -*- coding: utf-8 -*-
# Copyright 2011 Fanficdownloader team, 2020 FanFicFare team
#
# 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.... | [
"d.barva5402@gmail.com"
] | d.barva5402@gmail.com |
5909b171a789cfadf92b5428de5babd92ef70753 | 519b1185421f33d43a0917ffe5ec582099c000eb | /src/wtfjson/fields/unbound_field.py | 3f98a69b0b9992b3dcacb13c542767d1caa166ce | [
"MIT"
] | permissive | binary-butterfly/wtfjson | d58f710b228149a34570a4677262cc3b16ffab6d | 551ad07c895ce3c94ac3015b6b5ecc2102599b56 | refs/heads/main | 2023-08-11T04:13:15.907617 | 2021-10-11T09:21:34 | 2021-10-11T09:21:34 | 359,063,547 | 0 | 0 | MIT | 2021-10-11T09:21:34 | 2021-04-18T06:29:17 | Python | UTF-8 | Python | false | false | 559 | py | # encoding: utf-8
"""
binary butterfly validator
Copyright (c) 2021, binary butterfly GmbH
Use of this source code is governed by an MIT-style license that can be found in the LICENSE.txt.
"""
class UnboundField:
def __init__(self, field_class, *args, name=None, **kwargs):
self.field_class = field_class
... | [
"mail@ernestoruge.de"
] | mail@ernestoruge.de |
591869b47c31b2765711783418bef12a1fc2b8a5 | 96ca1945a32c5ea708d4871e320a2f19b557e68b | /test_testing_utils.py | d3215a6df0258b199b4e80cc6c0f361735494524 | [] | no_license | u8sand/backup | 81922941296c0b1e9f1fc4e2b851e3691421b8cc | 9d44bd541b36069acc9610a9719eff8ea9c2e0d7 | refs/heads/master | 2021-05-11T15:33:28.376210 | 2018-01-30T22:23:20 | 2018-01-30T22:23:20 | 117,734,883 | 2 | 3 | null | null | null | null | UTF-8 | Python | false | false | 1,071 | py | #!/usr/bin/env python3
from testing_utils import ExtendedTestCase
class TestTestingUtils(ExtendedTestCase):
def test_mkdir_rmdir(self):
self.mkdir('test_dir/test_dir_2')
self.assertIsDir('test_dir')
self.assertIsDir('test_dir/test_dir_2')
self.rmdir('test_dir')
self.assertIsNotDir('test_dir')
... | [
"u8sand@gmail.com"
] | u8sand@gmail.com |
a7032e64cfe9697f723ec0d06e52281280064da1 | 6b2a8dd202fdce77c971c412717e305e1caaac51 | /solutions_5686313294495744_0/Python/biran0079/c.py | f78ae9b6e91a9374279f6467852dac2df252b4a1 | [] | no_license | alexandraback/datacollection | 0bc67a9ace00abbc843f4912562f3a064992e0e9 | 076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf | refs/heads/master | 2021-01-24T18:27:24.417992 | 2017-05-23T09:23:38 | 2017-05-23T09:23:38 | 84,313,442 | 2 | 4 | null | null | null | null | UTF-8 | Python | false | false | 489 | py | def dfs(i):
if i == len(l): return 0
res=dfs(i+1)
a,b=l[i]
if fst[a]>1 and snd[b] > 1:
fst[a]-=1
snd[b]-=1
res=max(res, 1+dfs(i+1))
fst[a]+=1
snd[b]+=1
return res
for t in range(int(raw_input())):
n=int(raw_input())
l=[]
fst={}
snd={}
for i in range(n):
s=r... | [
"alexandra1.back@gmail.com"
] | alexandra1.back@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.