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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
079662848033b228ee09c8bb812f1c80e52e4cb0 | 1f68b6f9f55afaa7cb32df262f4fe0864472da05 | /leetcode(多线程,DP,贪心,SQL)/二刷DP与贪心LeetCode/回溯/51. N皇后/solution.py | 761c902fdb433e6e6f0765ec8b75578496b26cb9 | [] | no_license | faker-hong/testOne | 7c4496362cb5495c25c640076102fe0704f8552f | 768edc4a5526c8972fec66c6a71a38c0b24a1451 | refs/heads/master | 2022-12-04T14:47:53.614685 | 2020-10-30T03:17:50 | 2020-10-30T03:17:50 | 196,514,862 | 1 | 0 | null | 2022-11-22T02:43:32 | 2019-07-12T05:35:09 | Python | UTF-8 | Python | false | false | 1,100 | py | class Solution(object):
def solveNQueens(self, n):
"""
:type n: int
:rtype: List[List[str]]
"""
# 判断放置的皇后位置与之前的是否冲突
def is_valid(row, col, track):
# 因为每一次的row不同,所以不用判断是否在同一行
if col in track: # 是否在同一列
return False
... | [
"42666723+hongcheng97@users.noreply.github.com"
] | 42666723+hongcheng97@users.noreply.github.com |
952fd72ad5a8100025aa2e461084375532616b8e | 677562bf6835be104204f32a6c9998d9a901f9fc | /from_scratch/detect_metadata/times.py | fefebd85201b58cd0821fa91c8c528a5f775d688 | [] | no_license | santokalayil/neural_network | 3cb2f843430e9f35e017edcde83ba13212d0f5cf | f453856214d027f55afc5c861784dc693a9bf2c6 | refs/heads/main | 2023-06-12T01:53:43.588403 | 2021-07-02T08:30:20 | 2021-07-02T08:30:20 | 382,281,787 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 343 | py | # import platform # to detect the operating system
import os
import time
def get_last_modified_time(path_to_file):
return os.path.getmtime(path_to_file) # time.ctime(os.path.getmtime(path_to_file))
def get_created_time(path_to_file):
return os.path.getctime(path_to_file) # time.ctime(os.path.ge... | [
"49450970+santokalayil@users.noreply.github.com"
] | 49450970+santokalayil@users.noreply.github.com |
3b937e27177d4b2213f47baa81c00973e7037be0 | bc4910ecec94749697dbce5e7cf5093275411125 | /src/generator/Cheetah/ErrorCatchers.py | 500f2490d613628fe69f683fafa883f5d586e55d | [
"MIT"
] | permissive | se210/tracy | 7e73a6f0d64f355842b9a11035c3720b4d40fde5 | 232a42ce1aefcffa1f8544c89d60a16ebd897033 | refs/heads/master | 2021-01-09T20:55:03.241111 | 2013-12-15T23:34:36 | 2013-12-15T23:34:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,838 | py | #!/usr/bin/env python
# $Id: ErrorCatchers.py,v 1.1 2006-09-06 09:50:08 skyostil Exp $
"""ErrorCatcher class for Cheetah Templates
Meta-Data
================================================================================
Author: Tavis Rudd <tavis@damnsimple.com>
Version: $Revision: 1.1 $
Start Date: 2001/08/0... | [
"sami.kyostila@unrealvoodoo.org"
] | sami.kyostila@unrealvoodoo.org |
5207bdfd9ec7ed6f7459b591d7345960cb085457 | 6a5ce7d885db1baa5a9d43b26f0ae623a5ef0f01 | /azure-mgmt-web/azure/mgmt/web/models/domain_registration_input.py | 864529f0239c7032c4baa763d7558207f03f1109 | [
"Apache-2.0"
] | permissive | JammyBrand82/azure-sdk-for-python | 333af194ff9143ec77f49203a5a71f15c399f278 | c65e189cd41bd3464556b17bfcdee1303867996c | refs/heads/master | 2021-01-17T18:31:10.661151 | 2016-03-17T21:03:08 | 2016-03-17T21:03:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,993 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft and contributors. 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 ... | [
"lmazuel@microsoft.com"
] | lmazuel@microsoft.com |
cf44ce6aefffd95765ff8071f01abc34af978a80 | 41a0220bf117124bf281a50396582c0df1e0675f | /Pyrado/tests/environment_wrappers/test_action_delay.py | c04f64bbf23a9b2a2f2bfdc9db1d3b524b130d61 | [
"BSD-3-Clause"
] | permissive | jacarvalho/SimuRLacra | c071dfc22d4f2c54a198405e8974d03333c9961d | a6c982862e2ab39a9f65d1c09aa59d9a8b7ac6c5 | refs/heads/master | 2022-11-24T20:08:52.376545 | 2020-08-03T09:01:35 | 2020-08-03T09:01:35 | 276,885,755 | 0 | 0 | BSD-3-Clause | 2020-07-03T11:39:21 | 2020-07-03T11:39:21 | null | UTF-8 | Python | false | false | 2,392 | py | import numpy as np
import pytest
from pyrado.spaces.box import BoxSpace
from pyrado.environment_wrappers.action_delay import ActDelayWrapper
from tests.environment_wrappers.mock_env import MockEnv
@pytest.mark.wrappers
def test_no_delay():
mockenv = MockEnv(act_space=BoxSpace(-1, 1, shape=(2,)))
wenv = ActDe... | [
"fabio.muratore@famura.net"
] | fabio.muratore@famura.net |
6673858896690ec1a546222c0f8b383b73cf8ac8 | 847273de4b1d814fab8b19dc651c651c2d342ede | /.history/Sudoku_II_007_20180621235112.py | 41f8ce78220a122f130868148e83683e6dcb7b73 | [] | no_license | Los4U/sudoku_in_python | 0ba55850afcffeac4170321651620f3c89448b45 | 7d470604962a43da3fc3e5edce6f718076197d32 | refs/heads/master | 2020-03-22T08:10:13.939424 | 2018-07-04T17:21:13 | 2018-07-04T17:21:13 | 139,749,483 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 5,084 | py | from random import randint
import copy
sudoku1 = [
[5, 9, 8, 6, 1, 2, 3, 4, 7],
[2, 1, 7, 9, 3, 4, 8, 6, 5],
[6, 4, 3, 5, 8, 7, 1, 2, 9],
[1, 6, 5, 4, 9, 8, 2, 7, 3],
[3, 2, 9, 7, 6, 5, 4, 1, 8],
[7, 8, 4, 3, 2, 1, 5, 9, 6],
[8, 3, 1, 2, 7, 6, 9, 5, 4],
[4, 7, 2, 8, 5, 9, 6, 3, 1],
... | [
"inz.kamil.wos@gmail.com"
] | inz.kamil.wos@gmail.com |
8f4065d632706b252e9aaa5aef0f380f65fed859 | 57c38487a6a689318c960fa7d6b0185f372241bc | /presalytics_ooxml_automation/models/theme_effect_map.py | d5e94240d7206cc938862efbf1be434f6ab396ab | [
"MIT"
] | permissive | presalytics/ooxml-automation-python-client | 2c88bae455b7e567ebdb6a4ea106bbdcd192ac47 | fa6100eef1743e43b4d25b3faac79d39fe32c9d7 | refs/heads/master | 2020-06-05T23:42:32.964361 | 2019-12-27T22:51:40 | 2019-12-27T22:51:40 | 192,575,331 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,626 | py | # coding: utf-8
"""
OOXML Automation
This API helps users convert Excel and Powerpoint documents into rich, live dashboards and stories. # noqa: E501
The version of the OpenAPI document: 0.1.0-no-tags
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import si... | [
"kevin@chart-a-lot.com"
] | kevin@chart-a-lot.com |
f7de7c2ef755e5893d687912c0b74ed7148a8d02 | 6b453d913b1ae6697da738ddae9df013e8128d91 | /app/members/urls.py | 1a117fa9f25eacf78656a78f5d5d3ef9928e11ec | [] | no_license | moorekwon/instagram | 9703ecb1aed460ddec685c0bd06fe0fac3807548 | aaeca79f0d2765a24dd780bb12848c2c7b76a009 | refs/heads/master | 2022-12-12T18:13:37.536048 | 2020-02-03T08:33:16 | 2020-02-03T08:33:16 | 229,711,643 | 0 | 0 | null | 2022-12-08T03:32:50 | 2019-12-23T08:39:38 | Jupyter Notebook | UTF-8 | Python | false | false | 267 | py | from django.urls import path
from . import views
app_name = 'members'
urlpatterns = [
path('login/', views.login_view, name='login'),
path('logout/', views.logout_view, name='logout-view'),
path('naver-login/', views.naver_login, name='naver-login')
]
| [
"raccoonhj33@gmail.com"
] | raccoonhj33@gmail.com |
4b26d2288fe6cceaed839816ed06bdce9f6e52d8 | f0ae65bddedea44b1e66f3d235a901e62afae3f2 | /macgyyver_stuff/parse_input.py | 9de1a35ebd5d51857f29e74f682675a2370a7704 | [] | no_license | Brandon-Valley/my_movie_tools | d0a2ba91cda054c1b68709f1a9082028842e83a1 | 371742bfeaa0cfa2985ce06a6865f6ae09445029 | refs/heads/master | 2023-01-10T00:06:48.696103 | 2022-12-28T14:09:20 | 2022-12-28T14:09:20 | 221,057,903 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 619 | py |
import pyperclip
INPUT_PATH = 'input.txt'
def read_text_file(file_path):
with open(file_path, 'r', encoding='utf-8') as text_file: # can throw FileNotFoundError
result = tuple(l.rstrip() for l in text_file.readlines())
return result
raw_in = read_text_file(INPUT_PATH)
print(raw_in)... | [
"bavvh8@mst.edu"
] | bavvh8@mst.edu |
724778ba9809a4764fe8fb9db59911050b386395 | 8329282a8fda056d705c1af6dbcd0de1ed7ca25e | /.history/textutiles/textutiles/views_20210522223732.py | 629f8ff15d006894a027b5cc2f0bacbc0ca08e6f | [] | no_license | ritikalohia/Django-beginners- | c069b16867407ef883bb00c6faf4f601921c118a | 829e28ab25201853de5c71a10ceff30496afea52 | refs/heads/main | 2023-05-04T03:34:29.082656 | 2021-05-22T17:38:21 | 2021-05-22T17:38:21 | 369,869,599 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,627 | py | #created
from django.http import HttpResponse
from django.shortcuts import render
def index(request):
#params = {'name' : 'Ritika', 'place' : 'Mars'}
return render(request, 'index.html')
#return HttpResponse("Home")
def contact(request):
return render(request, 'contact.html')
def about(request):
... | [
"rtklohia@gmail.com"
] | rtklohia@gmail.com |
c6a0f515e4061baa17af3a79b41c463f25758ff0 | 92429015d9a1f1cea9b9bf2c9f1a8a7a07586af5 | /option.py | 6e7b7892e37aa810a008bdf082451b08034a0125 | [] | no_license | arthur-qiu/adv_vis | 46a953ce6c3d562137c8e566bc9b523e25bc5bbd | ba46c00cf38ca5186d7db84844892036ed714eaf | refs/heads/master | 2021-01-03T23:00:45.065108 | 2020-04-05T03:47:01 | 2020-04-05T03:47:01 | 240,272,320 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,099 | py | import argparse
import os
class BaseOptions():
def __init__(self):
self.parser = argparse.ArgumentParser(description='Trains a CIFAR Classifier',
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
self.initialized = False
def initialize(self):
... | [
"Arthur"
] | Arthur |
5e6eab96a36af8362b1089b13514cebebf213f95 | 11812a0cc7b818292e601ecdd4aa4c4e03d131c5 | /100days_of_python/day32/main.py | 2d1a1c5e6332bb4dae8a588642e9e2d964c7be13 | [] | no_license | SunshineFaxixi/Python_Learning | f1e55adcfa898489cc9146ccfb220f0b48a31a22 | ab3ca44d013311b6de02124091acc4c36a83c4d9 | refs/heads/master | 2021-08-16T05:47:29.963118 | 2021-01-04T13:48:30 | 2021-01-04T13:48:30 | 238,857,341 | 1 | 0 | null | 2020-03-03T13:53:08 | 2020-02-07T06:21:46 | HTML | UTF-8 | Python | false | false | 1,364 | py | ##################### Extra Hard Starting Project ######################
import pandas
from datetime import datetime
import os
import random
import smtplib
MY_EMAIL = "xxhan2018@163.com"
MY_PASSWORD = "TXHTVGKIOLEHXVCI"
today = datetime.now()
today_tuple = (today.month, today.day)
all_birth_info = pandas.read_csv("b... | [
"xxhan2018@163.com"
] | xxhan2018@163.com |
53e8ea169d0cfd5c2042f9ade08153f4669354fc | 65b4522c04c2be071c2d42095956fe950fe1cebe | /inversions/inversion10/iter2/run5/analysis/pred_disp/create_predicted_disp_database.py | 608cb3ba2bafea964917232a2b235b12007f7f0a | [] | 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 | 740 | py | import sqlite3
import numpy as np
import viscojapan as vj
pred = vj.inv.DispPred(
file_G0 = '../../../green_function/G0_He50km_VisM6.3E18_Rake83.h5',
result_file = '../../outs/nrough_05_naslip_11.h5',
fault_file = '../../../fault_model/fault_bott80km.h5',
files_Gs = ['../../../green_function/G1_He50k... | [
"zy31415@gmail.com"
] | zy31415@gmail.com |
e254aa45d97a2f3ff329c8b06be41ad5a4e0aec5 | 3acb90a1e97a0e851c6e4b1b57dda78ec5e3e3b4 | /problems/deep_copy_graph.py | 0b0caab3f09a04fb8519c76e677dd80b5c5b183b | [] | no_license | jhyang12345/algorithm-problems | fea3c6498cff790fc4932404b5bbab08a6d4a627 | 704355013de9965ec596d2e0115fd2ca9828d0cb | refs/heads/master | 2023-05-15T10:26:52.685471 | 2021-06-01T14:57:38 | 2021-06-01T14:57:38 | 269,333,379 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,641 | py | # Given a node in a connected directional graph, create a copy of it.
#
# Here's an example and some starter code.
class Node:
def __init__(self, value, adj=None):
self.value = value
self.adj = adj
# Variable to help print graph
self._print_visited = set()
if self.adj is No... | [
"jhyang12345@naver.com"
] | jhyang12345@naver.com |
55bb3d82b80185533da7d4c85f2c8e6589933ab4 | cd4eb25911d3e3b092aa97aaa7b8fbba6c3a0704 | /lang/python/asyncio/chain.py | aa8d41fb55cb2b5319e1e90b9a6e8a96e55ad630 | [
"MIT"
] | permissive | liuyang1/test | 29bb142982d2ef0d79b71e8fe5f5e0d51ec5258e | 9a154e0161a1a33baad53f7223ee72e702532001 | refs/heads/master | 2023-08-05T08:56:50.526414 | 2023-07-21T05:49:53 | 2023-07-21T11:16:09 | 26,949,326 | 9 | 1 | null | null | null | null | UTF-8 | Python | false | false | 399 | py | import asyncio
@asyncio.coroutine
def compute(x, y):
print("Compute %s + %s ..." % (x, y))
# yield from asyncio.sleep(1.0)
return x + y
@asyncio.coroutine
def print_sum(x, y):
result = yield from compute(x, y)
print("%s + %s = %s" % (x, y, result))
loop = asyncio.get_event_loop()
loop.run_until_c... | [
"liuyang1@mail.ustc.edu.cn"
] | liuyang1@mail.ustc.edu.cn |
6000dedcf91921ea9a5a6cba05ff8fe17f2ae918 | 221d1ad342677d2fac8aa3f8d5c60e059a6316c9 | /pm4py/objects/log/util/dataframe_utils.py | e8318a1daaeaa367f7ae496fe27ab3a705aca2da | [] | no_license | niklasadams/explainable_concept_drift_pm | 06ff651fbdebece4adf96f94bfb4d1026da14c48 | 6bf84d727ab0bae76716a04ad28c7de73250c89d | refs/heads/main | 2023-08-26T18:21:49.955080 | 2021-10-29T18:53:48 | 2021-10-29T18:53:48 | 314,514,571 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,643 | py | from pm4py.util import constants
from pm4py.objects.log.log import EventStream
from pm4py.objects.conversion.log import converter as log_converter
import pandas as pd
from pm4py.util.vers_checker import check_pandas_ge_024
from enum import Enum
from pm4py.util import exec_utils
from pm4py.util import points_subset
from... | [
"niklas.adams@pads.rwth-aachen.de"
] | niklas.adams@pads.rwth-aachen.de |
40c34bd9c99fb2039166995b23dec6a86c82f436 | b02c88bcad352811d22cadacd2aa573c426a2ca3 | /scrapers/settings.py | 06a6ae3c2620e357e3388b52d97f309471c0bf4b | [
"Apache-2.0"
] | permissive | frankier/ties445 | 9e24c3e415b4a07584c41e0e4a3f241b133463b8 | 4ceee5390d81aedc0fb3904803797584dd5084b8 | refs/heads/master | 2020-12-31T07:18:42.938988 | 2016-05-17T18:45:14 | 2016-05-17T18:45:14 | 56,767,440 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,085 | py | # -*- coding: utf-8 -*-
# Scrapy settings for scrapers project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# http://doc.scrapy.org/en/latest/topics/settings.html
# http://scrapy.readthedocs.org/en/lates... | [
"frankie@robertson.name"
] | frankie@robertson.name |
8dc513728068e9e929518340bb44a7718efc33eb | 3122ac39f1ce0a882b48293a77195476299c2a3b | /clients/python/generated/swaggyjenkins/models/extension_class_container_impl1links.py | 71b82d350f0fa80dde4f8cb80c78f8b7b2e3c3c7 | [
"MIT"
] | permissive | miao1007/swaggy-jenkins | 4e6fe28470eda2428cbc584dcd365a21caa606ef | af79438c120dd47702b50d51c42548b4db7fd109 | refs/heads/master | 2020-08-30T16:50:27.474383 | 2019-04-10T13:47:17 | 2019-04-10T13:47:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,766 | py | # coding: utf-8
"""
Swaggy Jenkins
Jenkins API clients generated from Swagger / Open API specification # noqa: E501
OpenAPI spec version: 1.1.1
Contact: blah@cliffano.com
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class ExtensionClassCo... | [
"cliffano@gmail.com"
] | cliffano@gmail.com |
e3e0ff71c09f66324bba160b6a4edccc40d93fff | ddc5aa77203bf76cd789c173dffbc382ed8ef004 | /test/app_test/master.py | f1fe1995de473cf239f7fc143c31029ce2d5bca1 | [] | no_license | phroiland/FinBiotic | 0b8183ce9f97c3fc4b1f7e20decc3472bffe8800 | a30ef2e979b230e5424fd25ef7dd1fb49bbd5245 | refs/heads/master | 2023-08-18T15:26:15.948262 | 2023-08-15T15:13:23 | 2023-08-15T15:13:23 | 93,895,989 | 2 | 2 | null | 2023-03-01T20:08:37 | 2017-06-09T20:52:02 | Python | UTF-8 | Python | false | false | 4,105 | py | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Mon May 29 13:30:38 2017
@author: jonfroiland
"""
import sys
import argparse
import oandapyV20
import oandapyV20.endpoints.positions as openPos
# Data, Price, and Strategy Imports
import settings
import common.config
import common.args
from stream.stream... | [
"jon.froiland@gmail.com"
] | jon.froiland@gmail.com |
026745467476e61080f1b8483e76fc80ed91ca82 | 8f337d7a1477eb9878bd252f45fadd967ba5dbbe | /run_galfit_disk_only.py | 62c3df5903da86c2f2a4574520757cfb091c1fa8 | [] | no_license | bpRsh/b1_research_lib | bd4c293946329ea96d0fb37d8769aaa83d1ca15d | 1de77f683b3ba18a1ab142b0fe86114c7a67791a | refs/heads/master | 2021-01-15T19:04:32.177465 | 2020-11-23T19:55:34 | 2020-11-23T19:55:34 | 99,805,200 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,674 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-#
#
# Author : Bhishan Poudel; Physics Graduate Student, Ohio University
# Date : 26-Oct-2016 13:10
# Last update : Dec 15, 2016
# Est time : 3 min for one galaxy one filter.
# Main commands : rm -r imgblock.fits subcomps.fit ; galfit expdisk_devauc.sh
# ... | [
"bhishantryphysics@gmail.com"
] | bhishantryphysics@gmail.com |
44f6551cecf87e0cc64db8a41ab7784033adc958 | 586e60b4bbf80e3da9c1051182a42cb81bb2ea1b | /scripts/generate-demo-users.py | 787052a0fab94bece1059cc3565abb512a20e0bd | [
"Apache-2.0"
] | permissive | DD-DeCaF/caffeine-bootstrap | daa0cb844fd694b87430451baee664d816e366a7 | ec65cd5f135f86c7bf2faeb96930637e910c380f | refs/heads/master | 2021-07-09T15:18:56.476754 | 2020-08-18T11:16:37 | 2020-08-18T11:16:37 | 161,489,310 | 1 | 0 | Apache-2.0 | 2020-08-18T11:16:38 | 2018-12-12T13:03:41 | Shell | UTF-8 | Python | false | false | 409 | py | from iam.models import User, db
from iam.app import app, init_app
init_app(app, db)
app.app_context().push()
print("Adding user: demo@demo")
user = User(email="demo@demo")
user.set_password("demo")
db.session.add(user)
for i in range(40):
print(f"Adding user: demo{i}@demo (password demo)")
user = User(email=f"d... | [
"ali@kvikshaug.no"
] | ali@kvikshaug.no |
a562ea5925bb853287c30692e331db3ad17821e2 | 8c42964a29af1d5a2f4541ab634b54e25a90b9f4 | /Example2/configuration.py | 5a64a7d9aada01e4a7e1e383119cbc7d566d617f | [] | no_license | lenzip/CMSDataAnalysisSchoolPisa2019ScalarToWW | a21dc572ae2e152410a867ae5013703c886e4bbf | 8cff1dea08887b78a9efc26a142609ba1b7ba296 | refs/heads/master | 2020-04-14T21:13:03.028961 | 2019-01-23T16:22:23 | 2019-01-23T16:22:23 | 164,121,564 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 803 | py | # example of configuration file
tag = 'Inclusive'
# used by mkShape to define output directory for root files
outputDir = 'rootFile'
# file with list of variables
variablesFile = 'variables.py'
# file with list of cuts
cutsFile = 'cuts.py'
# file with list of samples
samplesFile = 'samples.py'
# file with lis... | [
"piergiulio.lenzi@cern.ch"
] | piergiulio.lenzi@cern.ch |
3c7c5139a5cd6dd8e33834de89b98fdd8bba4a33 | 52b5773617a1b972a905de4d692540d26ff74926 | /.history/length_20200529113854.py | 76b776e2932e64a11975284ff9a772f9332ca676 | [] | no_license | MaryanneNjeri/pythonModules | 56f54bf098ae58ea069bf33f11ae94fa8eedcabc | f4e56b1e4dda2349267af634a46f6b9df6686020 | refs/heads/master | 2022-12-16T02:59:19.896129 | 2020-09-11T12:05:22 | 2020-09-11T12:05:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 431 | py | def removeDuplicates(nums):
i = 0
while i <len(nums):
print(nums[i])
if nums[i] == nums[i+1]:
nums.remove(nums[i])
else:
nums.add(nums[i])
# for i in range(length):
# print('i--------->',i)
# for j in range(i+1,length):
... | [
"mary.jereh@gmail.com"
] | mary.jereh@gmail.com |
8097d71b8ebae32d7fdc01e7873b5ee6d6ad0fb4 | c01ab71f681efdeb9f4e7d52ed083745b6d42590 | /old/6th sem/cpp/TRIKA/test_modules/testCases.py | 96b35814c7b3c3e9a1a25b8848bf226225f18b05 | [] | no_license | anant-pushkar/competetive_programming_codes | 398a39c85a761c8d242f42f368933239a438ac06 | 127c67d7d4e2cef2d1f25189b6535606f4523af6 | refs/heads/master | 2021-01-20T11:57:07.528790 | 2014-11-14T08:29:21 | 2014-11-14T08:29:21 | 23,577,655 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 475 | py | import testTemplate
'''number of test suites'''
nSuites=1
def getTests():
tests = []
suite=testTemplate.testSuite("Sample 1")
testcase = testTemplate.testInstance("4 4\n1 1\n100 55 10 2\n20 10 90 1\n60 20 22 4\n1 30 70 5" , "Y 23" , "")
suite.add(testcase)
tests.append(suite)
suite=testTemplate.testS... | [
"anantpushkar009@gmail.com"
] | anantpushkar009@gmail.com |
15fc22e8fd23bf75543afca8ce167e6017251fa0 | fb1e852da0a026fb59c8cb24aeb40e62005501f1 | /decoding/GAD/fairseq/dataclass/constants.py | 93bc6d03cb81618c47a58009dc22f7953a106eb3 | [
"LicenseRef-scancode-unknown-license-reference",
"LGPL-2.1-or-later",
"LicenseRef-scancode-free-unknown",
"Apache-2.0",
"MIT"
] | permissive | microsoft/unilm | 134aa44867c5ed36222220d3f4fd9616d02db573 | b60c741f746877293bb85eed6806736fc8fa0ffd | refs/heads/master | 2023-08-31T04:09:05.779071 | 2023-08-29T14:07:57 | 2023-08-29T14:07:57 | 198,350,484 | 15,313 | 2,192 | MIT | 2023-08-19T11:33:20 | 2019-07-23T04:15:28 | Python | UTF-8 | Python | false | false | 1,626 | py | # 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.
from enum import Enum, EnumMeta
from typing import List
class StrEnumMeta(EnumMeta):
# this is workaround for submitit pickling leading ... | [
"tage@microsoft.com"
] | tage@microsoft.com |
226980fdf20772f3a2d26e3b993584790ded886b | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/303/usersdata/299/100769/submittedfiles/testes.py | b90b88a3a2fbbabb9a6af0cc8e965ec6c94201cb | [] | no_license | rafaelperazzo/programacao-web | 95643423a35c44613b0f64bed05bd34780fe2436 | 170dd5440afb9ee68a973f3de13a99aa4c735d79 | refs/heads/master | 2021-01-12T14:06:25.773146 | 2017-12-22T16:05:45 | 2017-12-22T16:05:45 | 69,566,344 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,871 | py | from minha_bib import verificar_vitoria
from minha_bib import sorteio
from minha_bib import sorteio2
from minha_bib import maquinainteligente
import time
c=0
tabuleiro=[[1,2,3],[1,2,3],[1,2,3]]
for i in range(0,3,1):
for j in range(0,3,1):
tabuleiro[i][j]=" "
print('---------------------------------------'... | [
"rafael.mota@ufca.edu.br"
] | rafael.mota@ufca.edu.br |
891cf68c8f2e5a2d7b2c3c9baf3fd45f36ba1c93 | 3e3a835ee885eb9a71fd35ea58acd04361f72f47 | /python基础/复习.py/石头剪刀布.py | df86dfa2ef1429a31cb3268c524f245a54ab4e82 | [] | no_license | hanfang302/py- | dbb259f24e06fbe1a900df53ae6867acb8cb54ea | dd3be494ccef5100c0f06ed936f9a540d8ca0995 | refs/heads/master | 2020-03-16T01:59:57.002135 | 2018-05-07T12:02:21 | 2018-05-07T12:02:21 | 132,454,341 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 337 | py | player = int(input('请出拳 石头(1),剪刀(2),布(3):'))
computer = 2
if ((player == 1 and computer == 2) or
(player == 2 and computer == 3) or
(player == 3 and computer == 1)):
print('电脑输了')
elif player == computer:
print('心有灵犀,再来一局')
else:
print('不行,我要和你决战到底')
| [
"hanfang123@aliyun.com"
] | hanfang123@aliyun.com |
5b86d1ba8124f7ae022306cd7979e8aa97754314 | 6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4 | /HdrqkdT4r9DeKPjCM_15.py | b8f9cf3d649052ff9b6b798b8d9e233d02626467 | [] | 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 | 400 | py |
def is_polygonal(n):
if n==1:
return "0th of all"
if n <= 3:
return False
list = []
for k in range(3, n):
i=1
current=k+1
while current < n:
i+=1
current += k*i
if current == n:
i = str(i)
i += "th" if i[-2:-1]=="1" else {"1":"st","2":"nd","3":"rd"}.get(i[-1],"th... | [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
a2a3823e6435408a754b473b37f7233309d5ef3f | 4754d6b05b7eb255983f58474164d8690f4d8684 | /figurines/tests/test_views.py | 4ad1ab56cb491358a3a1c8c3bb9812ce62ef1085 | [] | no_license | pythonmentor/benjamin-p13 | 4f629be3cd9b2e8af6934fb69dfca63d6a294346 | ada744761d3a3c6ecde1aec5db20770960cb2146 | refs/heads/master | 2023-01-24T17:10:30.235330 | 2020-11-30T17:29:09 | 2020-11-30T17:29:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,155 | py | from django.test import TestCase
from django.urls import reverse
from figurines.models import Category, DidYouSee, Figurine
from users.models import User
class FigurineTestViews(TestCase):
def setUp(self):
self.user_test = User.objects.create_user(
username="UserTest", password="Paswo... | [
"benjamin.rejaud@gmail.com"
] | benjamin.rejaud@gmail.com |
6ad1ec33ed60cb67164cba8e6c216bf23b7eff14 | 09592939eaf88d46f7d2d760d9587cb9fc22707e | /entity/cards/LETLT_083/LETLT_083.py | c575c2ef97600aa10d16c30ba708043ebfac001e | [
"MIT"
] | permissive | fulln/lushi_script | 5deb2fb99956988ee4884836443f74277b361939 | f2c5250f6ce7e3ea2b8d3ba280d999ae8c7beb8b | refs/heads/main | 2023-09-04T16:50:24.696142 | 2021-11-24T03:44:41 | 2021-11-24T03:44:41 | 431,565,901 | 0 | 0 | MIT | 2021-11-24T17:04:06 | 2021-11-24T17:04:05 | null | UTF-8 | Python | false | false | 470 | py | # -*- coding: utf-8 -*-
from hearthstone.entities import Entity
from entity.spell_entity import SpellEntity
class LETLT_083(SpellEntity):
"""
剧烈爆发
对本回合中已经行动过的敌人造成10点伤害。在下一场战斗开始时,重复此伤害。
"""
def __init__(self, entity: Entity):
super().__init__(entity)
self.damage = 0
... | [
"gg48@qq.com"
] | gg48@qq.com |
92d3f6d6dc1e477f6b89f1665b180bf5ab4360da | 968913bda3879ef316100410cdb2b01333ac14a8 | /004_Algorithm_Implementations_In_Python/data_structures/queue/queue_on_list.py | 898ffac3a9c7c1fda92bb8b75af1826ee7ec17f0 | [
"MIT"
] | permissive | sm2774us/2021_Interview_Prep | 02b6a81ee52f3cb14d9e060839a01aadd84e231f | c6689411a4334d53c88581a296e57c314b50f46c | refs/heads/main | 2023-03-02T05:30:17.156821 | 2021-01-26T04:31:02 | 2021-01-26T04:31:02 | 332,603,676 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,213 | py | """Queue represented by a python list"""
class Queue():
def __init__(self):
self.entries = []
self.length = 0
self.front=0
def __str__(self):
printed = '<' + str(self.entries)[1:-1] + '>'
return printed
"""Enqueues {@code item}
@param item
item to enqueu... | [
"sm2774us@gmail.com"
] | sm2774us@gmail.com |
09b392b45aef0ce2b082eaa210be15285a463e0c | 45015c94a4376a4af66e4134f0552288cd15a2d8 | /services/authentication_service.py | ee9f1e65813dcf31637b0a0974cb9c00e4c7b390 | [] | no_license | Anubhav722/trello | 971111af8cbc1f6c344ace200e2741e809e9a1fa | 600b5410cde7fd2a51720fa4ca7cc2ecfbff322e | refs/heads/master | 2023-07-13T18:24:51.937539 | 2021-08-21T13:22:17 | 2021-08-21T13:22:17 | 398,563,384 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 280 | py |
class AuthenticationService:
def __init__(self, ttl):
self.tokens = {} # Map<token_id, user_obj>
def renew_token(self, token_id):
pass
def authenticate_request(self, token_id, timestamp):
pass
def register_user(self, ):
pass
| [
"anubhavs286@gmail.com"
] | anubhavs286@gmail.com |
b3afdc5ed5a2cd8de578e1fd31eb490f17a5db95 | 2455062787d67535da8be051ac5e361a097cf66f | /Producers/BSUB/TrigProd_amumu_a5_dR5/trigger_amumu_producer_cfg_TrigProd_amumu_a5_dR5_499.py | 14a070c95d6dc5d7822dce37415383786cbf8e82 | [] | no_license | kmtos/BBA-RecoLevel | 6e153c08d5ef579a42800f6c11995ee55eb54846 | 367adaa745fbdb43e875e5ce837c613d288738ab | refs/heads/master | 2021-01-10T08:33:45.509687 | 2015-12-04T09:20:14 | 2015-12-04T09:20:14 | 43,355,189 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,360 | py | import FWCore.ParameterSet.Config as cms
process = cms.Process("PAT")
#process.load("BBA/Analyzer/bbaanalyzer_cfi")
process.load("FWCore.MessageLogger.MessageLogger_cfi")
process.load('Configuration.EventContent.EventContent_cff')
process.load("Configuration.Geometry.GeometryRecoDB_cff")
process.load("Configuration.St... | [
"kmtos@ucdavis.edu"
] | kmtos@ucdavis.edu |
52cf3aac7e139b3a4d760b80cc223a9bd88e323d | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03496/s023860422.py | 3418e271fe6d39c5afd0834fa668eb6252fedf15 | [] | 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 | 553 | py | n = int(input())
a = list(map(int,input().split()))
mi = a[0]
mii = 1
ma = a[0]
mai = 1
for i in range(n):
if a[i] > ma:
ma = a[i]
mai = i+1
if a[i] < mi:
mi = a[i]
mii = i+1
if mi >= 0:
print(n-1)
for i in range(1,n):
print(i,i+1)
elif ma <= 0:
print(n-1)
for i in range(n,1,-1):
pri... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
f86f1440c1dfce4772c26f8bd9d40aeb6c368956 | 27a066c48096e30e3cf4a795edf6e8387f63728b | /mysite/django_vises/runtimes/misc.py | dbb4cc342ce1012cbf1a9397f2dea0e09cf202d4 | [] | no_license | 26huitailang/django-tutorial | 2712317c3f7514743e90fb4135e5fe3fed5def90 | 28a0b04ee3b9ca7e2d6e84e522047c63b0d19c8f | refs/heads/master | 2023-01-07T11:55:37.003245 | 2019-09-04T09:19:50 | 2019-09-04T09:19:50 | 113,199,279 | 1 | 0 | null | 2023-01-03T15:24:01 | 2017-12-05T15:27:52 | Python | UTF-8 | Python | false | false | 2,885 | py | #!/usr/bin/env python
# coding=utf-8
# import glob
import os
import operator
from django.utils.six import text_type
# copy from rest_framework
# Header encoding (see RFC5987)
HTTP_HEADER_ENCODING = 'iso-8859-1'
def get_request_client_ip_address(request):
"""获取 request 请求来源 ip address, 支持 nginx 使用 X-Real-IP/X-FO... | [
"26huitailang@gmail.com"
] | 26huitailang@gmail.com |
9c7d677d074b5d250abc200c103cff8fb806b269 | df94f543424f47f87bd6d546cca23d1c5a7b024c | /easy/easy922.py | f8409367478a0930ddc49d9bb4bc49ab8b62ce17 | [] | no_license | wangpeibao/leetcode-python | c13cb63304e91dcd55ffacee541d9197cafd01ff | 392a272a799decdd77c2410a89787ea8e1aa76d3 | refs/heads/master | 2023-01-31T05:09:34.850459 | 2020-12-04T03:25:21 | 2020-12-04T03:25:21 | 257,457,585 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,263 | py | '''
922. 按奇偶排序数组 II
给定一个非负整数数组 A, A 中一半整数是奇数,一半整数是偶数。
对数组进行排序,以便当 A[i] 为奇数时,i 也是奇数;当 A[i] 为偶数时, i 也是偶数。
你可以返回任何满足上述条件的数组作为答案。
示例:
输入:[4,2,5,7]
输出:[4,5,2,7]
解释:[4,7,2,5],[2,5,4,7],[2,7,4,5] 也会被接受。
提示:
2 <= A.length <= 20000
A.length % 2 == 0
0 <= A[i] <= 1000
'''
from typing import List
class Solution:
def sortArr... | [
"wangpeibao@troila.com"
] | wangpeibao@troila.com |
61ee902f9aec9bdeff25f6e72569396187f62aff | 01afa0be1c3acbf562fd87bd8fec8b4101c1e461 | /Mining-Massive-Dataset/week5/advanced_quiz3.py | 8c96a6d7d682c7d9d8f2ec6fe73c3b09bf879b97 | [] | no_license | listiani13/coursera | e4f1116cc619b62336c5bb4d2e714e7051ae775c | 5c84cf7171a440261de639b53558e9767b1cd85e | refs/heads/master | 2021-01-22T03:54:31.657656 | 2016-04-04T11:07:25 | 2016-04-04T11:07:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 424 | py | from math import sqrt
def euclidean(x, y):
return sqrt((x[0] - y[0])**2 + (x[1] - y[1])**2)
points = [(1, 6), (3, 7), (4, 3), (7, 7), (8, 2), (9, 5)]
chosen = [(0, 0), (10, 10)]
for _ in range(5):
pos, mx = -1, -1
for i, p in enumerate(points):
distance = min([euclidean(p, pc) for pc in chosen])
if distance > ... | [
"wangliangpeking@gmail.com"
] | wangliangpeking@gmail.com |
f32b08a5dadf9bf4dbc0b238e4cb160e93b689f5 | 3a01d6f6e9f7db7428ae5dc286d6bc267c4ca13e | /pylith/meshio/OutputMatElastic.py | 75bd619e57bb719fa4f7cc5e470df1ff774171da | [
"MIT"
] | permissive | youngsolar/pylith | 1ee9f03c2b01560706b44b4ccae99c3fb6b9fdf4 | 62c07b91fa7581641c7b2a0f658bde288fa003de | refs/heads/master | 2020-12-26T04:04:21.884785 | 2014-10-06T21:42:42 | 2014-10-06T21:42:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,792 | py | #!/usr/bin/env python
#
# ----------------------------------------------------------------------
#
# Brad T. Aagaard, U.S. Geological Survey
# Charles A. Williams, GNS Science
# Matthew G. Knepley, University of Chicago
#
# This code was developed as part of the Computational Infrastructure
# for Geodynamics (http://ge... | [
"baagaard@usgs.gov"
] | baagaard@usgs.gov |
5bd234d032a1cef724c7d19f94ecdca75497c3b5 | 803bab6f782099d995bcdb99d163486f4fff8c50 | /test/test_pointnav_resnet_policy.py | f58a4a45e857196c0ab6b215a39c3fce54de9832 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"CC-BY-NC-SA-3.0"
] | permissive | facebookresearch/habitat-lab | 7088506509f64da6d682f5dc69427589f71a58a9 | f5b29e62df0788d70ba3618fc738fa4e947428ba | refs/heads/main | 2023-08-24T14:00:02.707343 | 2023-08-23T04:53:48 | 2023-08-23T04:53:48 | 169,164,391 | 792 | 298 | MIT | 2023-09-14T15:20:03 | 2019-02-04T23:12:51 | Python | UTF-8 | Python | false | false | 4,432 | py | #!/usr/bin/env python3
# Copyright (c) Meta Platforms, 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.
import os.path
import shlex
import subprocess
import numpy as np
import pytest
import torch
from gym import spaces... | [
"noreply@github.com"
] | facebookresearch.noreply@github.com |
8562913d19df6e29366246a74cfb3818c2b42ba8 | 55c250525bd7198ac905b1f2f86d16a44f73e03a | /Python/pygame/pygameweb/pygameweb/config.py | 93d8fc8e758f4623cd6c55d2070b53f047f96a2d | [
"BSD-2-Clause"
] | permissive | NateWeiler/Resources | 213d18ba86f7cc9d845741b8571b9e2c2c6be916 | bd4a8a82a3e83a381c97d19e5df42cbababfc66c | refs/heads/master | 2023-09-03T17:50:31.937137 | 2023-08-28T23:50:57 | 2023-08-28T23:50:57 | 267,368,545 | 2 | 1 | null | 2022-09-08T15:20:18 | 2020-05-27T16:18:17 | null | UTF-8 | Python | false | false | 129 | py | version https://git-lfs.github.com/spec/v1
oid sha256:3ead591f9a215ef79ce67657f0809e549584a72ef37757eb3272ca4fbba1ab78
size 2948
| [
"nateweiler84@gmail.com"
] | nateweiler84@gmail.com |
fefc253d22ba5bb0ef9b94bef1230f18761a0a2b | afa456bb3792e433d84684260cdce1dbc6302cde | /authors/apps/tests/test_validation.py | d124f479a99ca4cf8c7e3e77f3b359a31f4e9213 | [
"BSD-3-Clause"
] | permissive | andela/ah-backend-poseidon | 23ac16e9fcdce49f78df04126f9f486b8c39ebd4 | d2b561e83ed1e9a585853f4a4e2e37805e86c35c | refs/heads/develop | 2022-12-09T07:38:04.843476 | 2019-07-19T13:44:13 | 2019-07-19T13:44:13 | 158,799,017 | 1 | 4 | BSD-3-Clause | 2022-12-08T01:19:16 | 2018-11-23T07:55:00 | Python | UTF-8 | Python | false | false | 3,979 | py | from .base import BaseTestCase
from rest_framework import status
from authors.apps.authentication.models import User
from . import (new_user, data2, invalid_email, invalid_password,
short_password, dup_username, user_login)
class AccountTests(BaseTestCase):
"""handles user registration tests"""
... | [
"ephraim.malinga@gmail.com"
] | ephraim.malinga@gmail.com |
d31cbc5e81c667f85f43dbf60c55f2703673fc8c | 5e66a11717a4760646c0e02bf9ffff2f82f66d18 | /chemistry/qchem_make_opt_input_from_opt.py | ca09c35ad793d6cf3c29ac90a3ae9a121f288104 | [] | no_license | berquist/personal_scripts | 4517678fa57e524e9765dc71f05594e34bdd9c72 | d6c40ba6e5a607d26ffabf809cfdfdf3ce29bfb3 | refs/heads/master | 2023-07-21T08:44:36.401893 | 2023-07-07T19:55:55 | 2023-07-07T19:55:55 | 37,238,106 | 7 | 4 | null | null | null | null | UTF-8 | Python | false | false | 7,017 | py | #!/usr/bin/env python
"""qchem_make_opt_input_from_opt.py: Make an input file for a Q-Chem
geometry optimization based on the last possible geometry from a
Q-Chem geometry optimization; this effectively 'restarts' the geometry
with a new filename.
The script assumes the output file being read from is called
'*opt(\d*... | [
"eric.berquist@gmail.com"
] | eric.berquist@gmail.com |
baf6d43bb76cf966f9aafce6ee12d8dd8e818f72 | a74cabbe1b11fc8ef575ea86f2543cd95db78ec9 | /python_program/q783_Minimum_Distance_Between_BST_Nodes.py | 4e4fe499e62126c9b084fde6bd89e951b18accbf | [] | no_license | tszandy/leetcode | 87e3ccf291b2879637d2d8238935a455b401a78a | f1f4361541dcffbb291285663c8820d7ffb37d2f | refs/heads/master | 2023-04-06T15:34:04.847875 | 2023-03-26T12:22:42 | 2023-03-26T12:22:42 | 204,069,234 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,628 | py | from typing import List
from collections import Counter,defaultdict
from math import *
from functools import reduce,lru_cache,total_ordering
import numpy as np
from heapq import *
from bisect import bisect_left,bisect_right
from itertools import count
import queue
# Definition for a binary tree node.
# class TreeNode:... | [
"444980834@qq.com"
] | 444980834@qq.com |
2c4815d72b5155adfdf7058fe4a14ff7f245285f | 6497bc5638453877744c900f7accef0203f36e89 | /leedcode1_twosum.py | e4bfcfdfe9201a15782286e8a9d575f229c34ec0 | [] | no_license | budaLi/leetcode-python- | 82e9affb3317f63a82d89d7e82650de3c804a5ac | 4221172b46d286ab6bf4c74f4d015ee9ef3bda8d | refs/heads/master | 2022-01-30T00:55:26.209864 | 2022-01-05T01:01:47 | 2022-01-05T01:01:47 | 148,323,318 | 46 | 23 | null | null | null | null | UTF-8 | Python | false | false | 868 | py | #-*-coding:utf8-*-
#author : Lenovo
#date: 2018/7/23
class Solution(object):
def twoSum(self, nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: List[int]
"""
d = {}# d is a dictionary to map the value of nums and the index in nums
size = 0
... | [
"31475416+152056208@users.noreply.github.com"
] | 31475416+152056208@users.noreply.github.com |
d76e46afa9347a3212afc1f391dab391766e7696 | a36501f44a09ca03dd1167e1d7965f782e159097 | /app/extensions/mongobeat/models.py | 27451e0eefe1a01350156a088481e408b9a33cd9 | [
"Apache-2.0"
] | permissive | ssfdust/full-stack-flask-smorest | 9429a2cdcaa3ff3538875cc74cff802765678d4b | 4f866b2264e224389c99bbbdb4521f4b0799b2a3 | refs/heads/master | 2023-08-05T08:48:03.474042 | 2023-05-07T01:08:20 | 2023-05-07T01:08:20 | 205,528,296 | 39 | 10 | Apache-2.0 | 2023-08-31T00:18:42 | 2019-08-31T10:12:25 | Python | UTF-8 | Python | false | false | 7,149 | py | # Copyright 2019 RedLotus <ssfdust@gmail.com>
# Author: RedLotus <ssfdust@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unles... | [
"ssfdust@gmail.com"
] | ssfdust@gmail.com |
f3287e42a48321132242a2d84b76e9deee52f5db | 7834e7a48399b156401ea62c0c6d2de80ad421f5 | /pysparkling/fileio/codec/codec.py | c057cfaa4b9cab5df56f5d5f9ac4badb66914438 | [
"MIT"
] | permissive | vojnovski/pysparkling | b9758942aba0d068f6c51797c8fb491cf59c3401 | 21b36464371f121dc7963dac09d300e7235f587e | refs/heads/master | 2020-04-08T18:33:55.707209 | 2016-07-27T15:12:59 | 2016-07-27T15:12:59 | 62,555,929 | 0 | 0 | null | 2016-07-04T11:06:18 | 2016-07-04T11:06:18 | null | UTF-8 | Python | false | false | 222 | py | import logging
log = logging.getLogger(__name__)
class Codec(object):
def __init__(self):
pass
def compress(self, stream):
return stream
def decompress(self, stream):
return stream
| [
"me@svenkreiss.com"
] | me@svenkreiss.com |
354cd069b9195ce2cabedf5b537fbef6f1713e6b | 8c7b03f24517e86f6159e4d74c8528bfbcbf31af | /test/python_api/lldbutil/frame/TestFrameUtils.py | 04d398bc5fa1b95d457aa1aaae5bd15ded01ab94 | [
"NCSA"
] | permissive | markpeek/lldb | f849567fbd7791be10aacd41be44ee15f1a4fdc4 | 58c8d5af715a3da6cbb7e0efc6905e9d07410038 | refs/heads/master | 2021-01-15T17:01:57.014568 | 2011-12-24T01:08:58 | 2011-12-24T01:08:58 | 3,042,888 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 2,103 | py | """
Test utility functions for the frame object.
"""
import os
import unittest2
import lldb
from lldbtest import *
class FrameUtilsTestCase(TestBase):
mydir = os.path.join("python_api", "lldbutil", "frame")
def setUp(self):
# Call super's setUp().
TestBase.setUp(self)
# Find the line... | [
"mark@peek.org"
] | mark@peek.org |
44ca2e8649630c0f338c6636d11ae3d772d89710 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03418/s842655187.py | e812523bc9e5891268bd0c4350311e175da8ddc3 | [] | 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 | 161 | py | N,K=map(int,input().split())
a=0
for i in range(K+1,N+1):
t=N//i
n=N-t*i
a+=t*(i-K)
if K:
a+=max(0,n-K+1)
else:
a+=n
print(a) | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
1c3d4834bbc46156f17c4081635c11a08d327dd1 | 710e96b1435bc43cc260512df75af5dd3b2afd13 | /code/1044.py | 6b217c61734025d6ab42ff1303588769ee0ced7d | [
"MIT"
] | permissive | minssoj/Learning_Algorithm_Up | 94ca8166c9a5d87917cf033ad8415871684241c4 | 45ec4e2eb4c07c9ec907a74dbd31370e1645c50b | refs/heads/main | 2023-01-08T20:52:32.983756 | 2020-11-05T17:49:45 | 2020-11-05T17:49:45 | 301,926,859 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 196 | py | # [기초-산술연산] 정수 1개 입력받아 1 더해 출력하기(설명)
# minso.jeong@daum.net
'''
문제링크 : https://www.codeup.kr/problem.php?id=1044
'''
n = int(input())
print(n + 1) | [
"minso.jeong@daum.net"
] | minso.jeong@daum.net |
0afbaee6a3d11e935314a77c986fca4852eeb54e | d326cd8d4ca98e89b32e6a6bf6ecb26310cebdc1 | /rosalind/bioinformatics/stronghold/tran/main.py | 131ebf08d6ecc2fe6278e7b4127c11468845a825 | [] | no_license | dswisher/rosalind | d6af5195cdbe03adb5a19ed60fcbf8c05beac784 | 4519740350e47202f7a45ce70e434f7ee15c6afc | refs/heads/master | 2021-08-09T02:58:17.131164 | 2017-11-12T01:26:26 | 2017-11-12T01:26:26 | 100,122,283 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 923 | py |
import sys
from rosalind.common import util
from rosalind.bioinformatics.common import fasta
def compute_ratio(seq1, seq2):
transitions = set(['AG', 'GA', 'CT', 'TC'])
transversions = set(['AC', 'CA', 'GT', 'TG', 'AT', 'TA', 'CG', 'GC'])
numTransitions = 0
numTransversions = 0
for i in xrange(len... | [
"big.swish@gmail.com"
] | big.swish@gmail.com |
2150af8db3f4f64b86685075d6ed96e3845861c3 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/nouns/_chauffeur.py | 97f43e805d5aba06eb05a5fd2bd9c150fd38b7be | [
"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 | 354 | py |
#calss header
class _CHAUFFEUR():
def __init__(self,):
self.name = "CHAUFFEUR"
self.definitions = [u'someone whose job is to drive a car for a rich or important person: ']
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.specie = 'nouns'
def run(self, obj1 = [], o... | [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
7b1dfacee784f7b05375188302ab051e0b005603 | ad28a59209239be285d1127a87bc08893fb62cb9 | /python/aad/test_concept_drift_classifier.py | 76ebbe63d04d5f1a6934a18ec97cdc667445b71c | [
"MIT"
] | permissive | Karl-Wu/ad_examples | 9e6f894c2414640b23ccdeb39db9e9b8352ef077 | 6fb0a2a72db51d82645e377945327eb9e1ecf8b8 | refs/heads/master | 2020-03-26T19:33:45.128414 | 2018-08-17T21:42:15 | 2018-08-17T21:42:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,961 | py | from aad.data_stream import *
from common.gen_samples import read_anomaly_dataset
from aad.anomaly_dataset_support import *
from aad.classifier_trees import RandomForestAadWrapper
"""
Check data drift with a Random Forest classifier.
NOTE: The classifier is trained only once in this example with the
first windo... | [
"smd.shubhomoydas@gmail.com"
] | smd.shubhomoydas@gmail.com |
ff22a34e9a956fa4c76ccb221f9d964d39375203 | 6cd3de9d6aa0c52602010aa857966d5dc4d57442 | /mlprodict/onnxrt/ops_cpu/op_lp_normalization.py | b8f5b8b7274ac89c8fb4bd972bdfda60a72b2e4c | [
"MIT"
] | permissive | xadupre/mlprodict | 2307ca96eafeeafff08d5322184399bb5dc1c37e | f82c8a26a60104948c67849b1c4af95ca812c153 | refs/heads/master | 2022-12-10T18:50:36.953032 | 2020-09-03T08:53:58 | 2020-09-03T08:53:58 | 292,824,744 | 1 | 0 | NOASSERTION | 2020-09-04T10:56:45 | 2020-09-04T10:56:44 | null | UTF-8 | Python | false | false | 837 | py | # -*- encoding: utf-8 -*-
# pylint: disable=E0203,E1101,C0111
"""
@file
@brief Runtime operator.
"""
import numpy
from ._op import OpRunUnaryNum
class LpNormalization(OpRunUnaryNum):
atts = {'axis': -1, 'p': 2}
def __init__(self, onnx_node, desc=None, **options):
OpRunUnaryNum.__init__(self, onnx_no... | [
"xavier.dupre@gmail.com"
] | xavier.dupre@gmail.com |
64ced12d14e6ef07689ff4230e0e91e5529ae4b7 | 44849991f507933ebc7ed4e8e37819a529be539e | /steps/step09.py | f4696c0a213f1cce610937e96f56827da22d84d5 | [
"MIT"
] | permissive | NukeA/deep-learning-from-scratch-3 | 4ff60e8ac5b157a05079fc3b8a2ea69acec9ece5 | e48a7b8788827a16cc9f81adc135a3a14989bea5 | refs/heads/master | 2022-11-02T00:58:56.621011 | 2020-06-16T04:36:23 | 2020-06-16T04:36:23 | 273,873,741 | 1 | 0 | MIT | 2020-06-21T09:34:25 | 2020-06-21T09:34:24 | null | UTF-8 | Python | false | false | 1,780 | py | import numpy as np
class Variable:
def __init__(self, data):
if data is not None:
if not isinstance(data, np.ndarray):
raise TypeError('{} is not supported'.format(type(data)))
self.data = data
self.grad = None
self.creator = None
def set_creator(s... | [
"koki0702@gmail.com"
] | koki0702@gmail.com |
5dd63b2b9df8c5af5403c212e5f8fa25f11a8055 | 49536aafb22a77a6caf249c7fadef46d63d24dfe | /tensorflow/tensorflow/contrib/learn/python/learn/learn_io/generator_io.py | 784781d7368490a10d5dbc9cd5842f4bed98eda3 | [
"Apache-2.0"
] | permissive | wangzhi01/deeplearning-1 | 4e5ad93f0d9ecd302b74352f80fe1fa6ae70bf0d | 46ab82253d956953b8aa98e97ceb6cd290e82288 | refs/heads/master | 2020-05-28T03:14:55.687567 | 2018-09-12T16:52:09 | 2018-09-12T16:52:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,499 | py | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | [
"hanshuobest@163.com"
] | hanshuobest@163.com |
bbbb760b22d3a07d2b3d10445c267f72ed9fcfbd | e0b6f5bd451aa8af3273fbc948799637681342e1 | /scripts/wm_representation/functions/IEM_conditions/IEM_condition.py | 244e5b35232d3da6732fe524c6e5c3d6790c863a | [] | no_license | davidbestue/encoding | 6b304f6e7429f94f97bd562c7544d1fdccf7bdc1 | c27319aa3bb652b3bfc6b7340044c0fda057bc62 | refs/heads/master | 2022-05-05T23:41:42.419252 | 2022-04-27T08:34:52 | 2022-04-27T08:34:52 | 144,248,690 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,024 | py | # -*- coding: utf-8 -*-
"""
Created on Mon Jul 1 18:24:32 2019
@author: David Bestue
"""
## Import functions prom the previous path
import sys
import os
previous_path = os.path.abspath(os.path.join(os.getcwd(), os.pardir))
sys.path.insert(1, previous_path)
from model_functions import *
from fake_data_generator imp... | [
"davidsanchezbestue@hotmail.com"
] | davidsanchezbestue@hotmail.com |
ba41f7aef79a7bcb7d8f12a8308d4d45eacd1ce8 | 6f4e925bf4538d104f1e3e9754d4297c5504ab80 | /python/recall/app/domain/__init__.py | 55879d938b278a1a92324ce2cb752388ae90ff9d | [
"MIT"
] | permissive | kingreatwill/openself | 7f02282da3e0b1f328c3627d83ba2b5ed4563dc8 | 8517d24e665b39371835ecd2ed0cd3509a5d9d62 | refs/heads/master | 2023-01-23T13:15:49.491402 | 2020-11-19T02:39:52 | 2020-11-19T02:39:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 596 | py | import models
class Domain:
def __init__(self, model: models.db.Document):
self.model = model
# 列表;
def list(self, size=10, index=1, **kwargs):
size = int(size)
index = int(index)
return self.model.objects(**kwargs).skip((index - 1) * size).limit(size)
# 明细;
def g... | [
"kingreatwill@qq.com"
] | kingreatwill@qq.com |
f8d8ee4061dbff936f37094f60a8e6e5b2dbd040 | 09e57dd1374713f06b70d7b37a580130d9bbab0d | /data/p2DJ/New/program/qiskit/noisy/startQiskit_noisy241.py | d59a29805cadc73e57d6ef26c5940d08ffc753ef | [
"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,185 | py | # qubit number=2
# total number=11
import cirq
import qiskit
from qiskit.providers.aer import QasmSimulator
from qiskit.test.mock import FakeVigo
from qiskit import IBMQ
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from ... | [
"wangjiyuan123@yeah.net"
] | wangjiyuan123@yeah.net |
5a0c7f2232c9b5b9b6aebd0299f3b756198fbcab | a1488a281e582373b7270d85059f08330c0b685d | /dueros/directive/Display/tag/NewTag.py | 86f19cc6e51950cde6ea45a11b1821aef4bfab0f | [
"Apache-2.0"
] | permissive | xuchengzhi/bot-sdk-python | 473fb8e7df629a6168983e26de74546bbca32768 | 966d103d55f9f1220c00d806ac13d0754015a31c | refs/heads/master | 2020-12-06T17:00:55.587643 | 2019-10-18T02:54:45 | 2019-10-18T02:54:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 409 | py | #!/usr/bin/env python3
# -*- encoding=utf-8 -*-
# description:
# author:jack
# create_time: 2018/9/17
"""
desc:pass
"""
from dueros.directive.Display.tag.TagTypeEnum import TagTypeEnum
from dueros.directive.Display.tag.BaseTag import BaseTag
class NewTag(BaseTag):
def __init__(self):
super(NewTag,... | [
"wangninghb@gmail.com"
] | wangninghb@gmail.com |
71de969b7a916bf5eab2c78a574d3186cf9d290b | 365186abceefc51e811706ad325a2f53a63a25f8 | /tests/scripts/comparisonPlots.py | e0fbf4cda1982e9d1ea7945d69f32ca47e3b51b7 | [
"MIT"
] | permissive | tboudreaux/pytopsscrape | a857bdca8558bf86f7afd5f8f3e6d2e5ca90fa64 | c9f95e6a6419debb0b6a22f22d1574a8bbf73bd0 | refs/heads/master | 2023-04-06T17:48:08.812425 | 2023-04-04T00:01:13 | 2023-04-04T00:01:13 | 532,559,997 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,499 | py | import matplotlib.pyplot as plt
from pyTOPSScrape.parse import load_opal
import os
import datetime
def make_comparision_plot():
TargetPath = "./GS98Target.opac"
TestPath = "./GS98TestResult.opac"
OPALPath = "./GS98OPAL.opac"
targetTime = datetime.datetime.fromtimestamp(os.path.getmtime(TargetPath))
... | [
"thomas@boudreauxmail.com"
] | thomas@boudreauxmail.com |
6c7175ef0bf5c454553094b3f009ebac86114775 | a46d135ba8fd7bd40f0b7d7a96c72be446025719 | /packages/python/plotly/plotly/validators/violin/_metasrc.py | 466d497ebca4399340d12c5b16b62c2cd713264a | [
"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 | 392 | py | import _plotly_utils.basevalidators
class MetasrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(self, plotly_name="metasrc", parent_name="violin", **kwargs):
super(MetasrcValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
ed... | [
"noreply@github.com"
] | hugovk.noreply@github.com |
c3e40fb6c21a8b78a1912a6dddd65973f62ce9b6 | a82dfb61b17fa66b9c75fe871401cff77aa77f56 | /libmcell/definition/doc.py | 48cdb0ffba9e2e4089d530fbc690a17b0601d563 | [
"MIT"
] | permissive | mcellteam/mcell | 49ca84048a091de8933adccc083d31b7bcb1529e | 3920aec22c55013b78f7d6483b81f70a0d564d22 | refs/heads/master | 2022-12-23T15:01:51.931150 | 2021-09-29T16:49:14 | 2021-09-29T16:49:14 | 10,253,341 | 29 | 12 | NOASSERTION | 2021-07-08T01:56:40 | 2013-05-23T20:59:54 | C++ | UTF-8 | Python | false | false | 7,463 | py | """
Copyright (C) 2021 by
The Salk Institute for Biological Studies
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
https://opensource.org/licenses/MIT.
"""
import sys
import os
import yaml
from constants import *
from gen import indent_and_fix_rst_chars, yaml... | [
"ahusar@salk.edu"
] | ahusar@salk.edu |
23458d70bd4f9ae696d8d81fa5c01f56971f7da7 | 3b7474148c07df7f4755106a3d0ada9b2de5efdc | /training/c25_flask/examples/world_api/original/tools.py | 1dc1684dc799c4417844116947e284621a8d0bee | [] | no_license | juancsosap/pythontraining | 7f67466846138f32d55361d64de81e74a946b484 | 1441d6fc9544042bc404d5c7efffd119fce33aa7 | refs/heads/master | 2021-08-26T05:37:15.851025 | 2021-08-11T22:35:23 | 2021-08-11T22:35:23 | 129,974,006 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,890 | py | import pymysql
from flask import request, jsonify, render_template, make_response, abort
def xmlify(template, value):
text = render_template(template, value=value)
response = make_response(text)
response.headers['Content-Type'] = 'application/xml'
return response
def prepare_response(template, info... | [
"user.nuage@gmail.com"
] | user.nuage@gmail.com |
d37148f04674bda7b996896bf1686b7c6b7db8c4 | a8b0599af76b5393039431f876be00d628a1fe43 | /backend/kangas/server/__init__.py | 4f348efc3c7c9d70831cec668eae3966b7210d79 | [
"Apache-2.0"
] | permissive | comet-ml/kangas | c951f648d890dca5a66cbab405d3437be2f3e9e3 | df0c1a495032cc4f1c367c74fcb0ef6e5a2063be | refs/heads/main | 2023-06-12T23:38:43.068259 | 2023-06-05T18:38:34 | 2023-06-05T19:28:33 | 550,324,241 | 944 | 41 | Apache-2.0 | 2023-06-05T19:28:35 | 2022-10-12T15:10:04 | Jupyter Notebook | UTF-8 | Python | false | false | 2,379 | py | # -*- coding: utf-8 -*-
######################################################
# _____ _____ _ _ #
# (____ \ _ | ___) (_) | | #
# _ \ \ ____| |_ ____| | ___ ___ _ _ | | #
# | | | )/ _ | _)/ _ | |(_ / __) |/ || | #
# | |__/ ( ( | | |... | [
"doug.blank@gmail.com"
] | doug.blank@gmail.com |
1e1ae4854016d822cbf704f310b243729c7e3e4a | 21acc25dd3969318dd8476e364fe2fb4eabfe4f4 | /podcastninja/migrations/0005_auto_20150423_1005.py | 5c94549f4db338ebc255bd4a0a32cb7727b5426a | [] | no_license | monty5811/podcastninja | 72dc98375974b1714a8457b09126981a76166b9a | 94a55536270f3e1c4e4f2160e0a24e79c9f40b7f | refs/heads/master | 2020-05-17T01:24:57.312486 | 2015-05-25T15:18:03 | 2015-05-25T15:18:03 | 35,883,288 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 526 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.core.validators
class Migration(migrations.Migration):
dependencies = [
('podcastninja', '0004_podcastitem_s3_url'),
]
operations = [
migrations.AlterField(
... | [
"montgomery.dean97@gmail.com"
] | montgomery.dean97@gmail.com |
dc9bc77e75ec86cb2ad265207209d03d37bf69a4 | 7950c4faf15ec1dc217391d839ddc21efd174ede | /leetcode-cn/1929.0_Concatenation_of_Array.py | d8ab060fd5948df008b621e9dca0f8d6bf0d9362 | [] | no_license | lixiang2017/leetcode | f462ecd269c7157aa4f5854f8c1da97ca5375e39 | f93380721b8383817fe2b0d728deca1321c9ef45 | refs/heads/master | 2023-08-25T02:56:58.918792 | 2023-08-22T16:43:36 | 2023-08-22T16:43:36 | 153,090,613 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 528 | py | '''
执行用时:36 ms, 在所有 Python3 提交中击败了38.78% 的用户
内存消耗:15.1 MB, 在所有 Python3 提交中击败了51.26% 的用户
'''
class Solution:
def getConcatenation(self, nums: List[int]) -> List[int]:
return nums + nums
'''
执行用时:36 ms, 在所有 Python3 提交中击败了38.78% 的用户
内存消耗:15.1 MB, 在所有 Python3 提交中击败了47.15% 的用户
'''
class Solution:
def getCo... | [
"838255715@qq.com"
] | 838255715@qq.com |
3668163b33ba19dd7eff00d702f7712c5fd93349 | 8a41a7f9340cfa784cb36d35dca1ecb1630e4097 | /Programming/Python/Databases/mongodb_practice/mongodb_with_docker_container_class_based.py | 2b5256a980b7d9de036f2423af2cae13cf65bfc6 | [] | no_license | anishst/Learn | 02e6b6cce43cf21621d328ef0fc25168267a9a3d | a1aed8b78b19acdb23e20be57b67fb242e0aefc5 | refs/heads/master | 2022-05-13T10:17:40.293640 | 2022-03-30T12:44:21 | 2022-03-30T12:44:21 | 173,595,812 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,266 | py | # UNDER DEV NOT FULLY WORKING
import uuid
import pymongo
class Database(object):
URI = "mongodb://192.168.1.50:27017"
DATABASE = None
@staticmethod
def initialize():
client = pymongo.MongoClient(Database.URI)
Database.DATABASE = client['items_test']
@staticmethod
def insert(... | [
"anishst@hotmail.com"
] | anishst@hotmail.com |
c389303e3146bc35ff821cb1d46e512bb30de237 | 5a52ccea88f90dd4f1acc2819997fce0dd5ffb7d | /alipay/aop/api/domain/AnttechMorseMarketingSrtaConsultModel.py | ed15c1198c9962d4b975315a6f97b110b2a9d905 | [
"Apache-2.0"
] | permissive | alipay/alipay-sdk-python-all | 8bd20882852ffeb70a6e929038bf88ff1d1eff1c | 1fad300587c9e7e099747305ba9077d4cd7afde9 | refs/heads/master | 2023-08-27T21:35:01.778771 | 2023-08-23T07:12:26 | 2023-08-23T07:12:26 | 133,338,689 | 247 | 70 | Apache-2.0 | 2023-04-25T04:54:02 | 2018-05-14T09:40:54 | Python | UTF-8 | Python | false | false | 3,452 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AnttechMorseMarketingSrtaConsultModel(object):
def __init__(self):
self._anonymous_mobile_sha_256_list = None
self._blind_mobile_sha_256 = None
self._extend_params = None
... | [
"jishupei.jsp@alibaba-inc.com"
] | jishupei.jsp@alibaba-inc.com |
c89f1e925348210ada55438f3e47f2b3572cbe03 | 0412893529999de784ab9cb914f385ba788a3684 | /test/test_ack_collector_down.py | af6a6ac2ccc5999ccfadc2c84f1e1ec9cacdf9c9 | [
"Apache-2.0"
] | permissive | JeremyTangCD/lm-sdk-python | 0326bf034c16b022b760600dc18fe7aaad42fa26 | 2a15e055e5a3f72d2f2e4fb43bdbed203c5a9983 | refs/heads/master | 2020-04-15T15:39:59.276224 | 2019-01-09T09:55:36 | 2019-01-09T09:55:36 | 164,803,314 | 0 | 0 | Apache-2.0 | 2019-01-09T09:58:55 | 2019-01-09T06:33:40 | Python | UTF-8 | Python | false | false | 1,154 | py | # coding: utf-8
"""
LogicMonitor REST API
LogicMonitor is a SaaS-based performance monitoring platform that provides full visibility into complex, hybrid infrastructures, offering granular performance monitoring and actionable data and insights. logicmonitor_sdk enables you to manage your LogicMonitor account... | [
"jeremy.tang@logicmonitor.com"
] | jeremy.tang@logicmonitor.com |
8860fd14e571f6895267fbdf6e37de2a1b996050 | dfab6798ece135946aebb08f93f162c37dd51791 | /timber/luban.timber/__init__.py | a1439a83d3cd277a7cb77b0454e6d6e5598f66c6 | [] | no_license | yxqd/luban | 405f5f7dcf09015d214079fe7e23d644332be069 | 00f699d15c572c8bf160516d582fa37f84ac2023 | refs/heads/master | 2020-03-20T23:08:45.153471 | 2012-05-18T14:52:43 | 2012-05-18T14:52:43 | 137,831,650 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 840 | py | # -*- Python -*-
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Jiao Lin
# California Institute of Technology
# (C) 2006-2011 All Rights Reserved
#
# {LicenseText}
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... | [
"linjiao@caltech.edu"
] | linjiao@caltech.edu |
87477ba53d15435cb55aa99b65ce10afdee5a360 | e52501eb4db862d90ae5541bd512a50df30e0726 | /Chapter 2+3 Intro + Variables + Strings/Chapter3-7 ShrinkingGuestList.py | 47c9f766034b09d285472e34a1f448ce0ac89821 | [] | no_license | ericnwin/Python-Crash-Course-Lessons | b2b12c221f545c961a47f2343b2aa3dac901927b | 7b755c0b4ce65528f4880b3583aca3be9547b33b | refs/heads/master | 2022-12-19T10:55:35.987330 | 2020-09-13T23:23:54 | 2020-09-13T23:23:54 | 295,255,228 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,190 | py | # You just found out that your new dinner table won’t
# arrive in time for the dinner, and you have space for only two guests.
# • Start with your program from Exercise 3-6. Add a new line that prints a
# message saying that you can invite only two people for dinner.
# • Use pop() to remove guests from your list one at... | [
"noreply@github.com"
] | ericnwin.noreply@github.com |
644f53da5330e99d42a57e2457baa4815d3cc52f | d0a54a3faa1891b647f8c621521cd26c13bd2926 | /backend/mytts.py | b5bd2373d11ec245d0b144f5f903e259d2fd903f | [
"MIT"
] | permissive | ishine/PTTS-WebAPP | 166318593d3247c88d458c9d4fe39dca27ef408f | dcc07a79d8dd695ca15e4dd5a69811b3ddd91709 | refs/heads/main | 2023-04-02T06:03:41.237351 | 2021-04-14T02:37:16 | 2021-04-14T02:37:16 | 357,388,655 | 0 | 0 | MIT | 2021-04-14T02:37:17 | 2021-04-13T01:31:11 | null | UTF-8 | Python | false | false | 2,595 | py | #!/usr/bin/env python
import os.path as osp
import librosa
import torch
from .hparams import HParam
from .transform import StandardNorm, TextProcessor
from .models import MelGenerator, ParallelText2Mel
from .synthesizer import Synthesizer
try:
from .manager import GPUManager
except ImportError as err:
print(e... | [
"atomicoo95@gmail.com"
] | atomicoo95@gmail.com |
b2fcc624e79ef9ef10c62818cb0c7d2d93c0d250 | 080bbe77da955b3917435c25fc63b90b0f3c724e | /botorch/utils/multi_objective/box_decomposition.py | e566f0c69e493acd4370a0a28582374334f572aa | [
"MIT"
] | permissive | irinaespejo/botorch | 3d15d962ff0f5bb34fbd11b2eb7549db755af705 | e4dcf603fdaf83f0e5f8b9b392f943c89dfff7eb | refs/heads/master | 2023-07-11T18:02:11.853790 | 2021-08-19T15:57:21 | 2021-08-19T15:58:12 | 316,017,084 | 0 | 0 | MIT | 2020-11-25T18:02:11 | 2020-11-25T18:02:09 | null | UTF-8 | Python | false | false | 744 | py | #!/usr/bin/env python3
# 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.
r"""
DEPRECATED - Box decomposition algorithms.
Use the botorch.utils.multi_objective.box_decompositions instead.
"""
... | [
"facebook-github-bot@users.noreply.github.com"
] | facebook-github-bot@users.noreply.github.com |
a8569f82ed1a73ffbd59f8b49866754ec53e411d | 9dfb3372a1e4516d970a6e9d0a9fd8360580eae7 | /python pySerial/maping_data.py | feb9a76200b26899373a1eeba25711e6b4835877 | [] | no_license | clambering-goat/cameron_pyton | d1cd0e7b04da14e7ba4f89dcb4d973f297a4626c | df0b0365b86e75cfcfc2c1fc21608f1536a3b79f | refs/heads/master | 2021-07-14T20:37:37.021401 | 2019-02-28T07:52:11 | 2019-02-28T07:52:11 | 137,251,669 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 418 | py | import serial
y_points=[]
with serial.Serial('COM4', 9600, timeout=1) as ser:
for q in range(20000):
line =ser.readline()
x=line.decode("utf-8")
#print(x)
y_points.append(int(x))
import matplotlib.pyplot as plt
x_points=[]
for q in range(len(y_points)):
x_points.append(q)... | [
"camerondrain@gmail.com"
] | camerondrain@gmail.com |
664fef8dbbee5f880d4f0a0866edc6ccd5676737 | 0facb323be8a76bb4c168641309972fa77cbecf2 | /Configurations/HWWSemiLepHighMass/Full_v6Production/template_seed/templates_jhchoi/MassPoints2018/List_MX.py | ca93c1c06e444ba9cee292c6bdab834fd117111f | [] | no_license | bhoh/SNuAnalytics | ef0a1ba9fa0d682834672a831739dfcfa1e7486b | 34d1fc062e212da152faa83be50561600819df0e | refs/heads/master | 2023-07-06T03:23:45.343449 | 2023-06-26T12:18:28 | 2023-06-26T12:18:28 | 242,880,298 | 0 | 1 | null | 2020-02-25T01:17:50 | 2020-02-25T01:17:49 | null | UTF-8 | Python | false | false | 396 | py | List_MX=[
115 ,
120 ,
124 ,
125 ,
126 ,
130 ,
135 ,
140 ,
145 ,
150 ,
155 ,
160 ,
165 ,
170 ,
175 ,
180 ,
190 ,
200 ,
210 ,
230 ,
250 ,
270 ,
300 ,
350 ,
400 ,
450 ,
500 ,
550 ,
600 ,
650 ,
700 ,
750 ,
800 ,
900 ,
1000 ,
1500 ,
2000 ,
2500 ,
3000 ,
4000 ,
5000 ,
]
if __name__ == '__main__':
#print('( '+" ".join(str... | [
"soarnsoar@gmail.com"
] | soarnsoar@gmail.com |
145a90c675971039d677b9e3411c7b6f30d2cde6 | 59be93c710d9e1750d2767f1c98f347ed3dc635c | /elements/when.py | 308f8c8d7c8fbbc825abfaf9cd8a8914f92fd203 | [
"MIT"
] | permissive | artemZholus/elements | 802d14eb574be0c3f18a50fdbc87ee262fbcd01a | 21b4f27e854d91a65619e8fc81b3916386c5ef66 | refs/heads/main | 2023-07-10T05:21:28.947510 | 2021-08-18T18:02:05 | 2021-08-18T18:02:05 | 397,594,638 | 0 | 0 | MIT | 2021-08-18T12:35:49 | 2021-08-18T12:35:49 | null | UTF-8 | Python | false | false | 711 | py | class Every:
def __init__(self, every):
self._every = every
self._last = None
def __call__(self, step):
step = int(step)
if not self._every:
return False
if self._last is None:
self._last = step
return True
if step >= self._last + self._every:
self._last += self._ev... | [
"mail@danijar.com"
] | mail@danijar.com |
c07aa82c886d791ed37e80ecf66b26fe3ba26449 | f59860bb4d04007cf03258753aefcbf58e760db0 | /music/migrations/0005_song_datetime.py | a64764e5215f82e94025a21d14a4720153be91ab | [] | no_license | Arefeh902/station_49 | fc306d7668d64c68df7dba35adbdc25d5600544a | 3076e4ab616759f5aa0a973525c0436b603f942f | refs/heads/master | 2023-07-01T10:25:39.820956 | 2021-08-10T18:47:28 | 2021-08-10T18:47:28 | 391,368,241 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 386 | py | # Generated by Django 2.1.9 on 2021-08-07 08:21
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('music', '0004_auto_20210807_0806'),
]
operations = [
migrations.AddField(
model_name='song',
name='datetime',
... | [
"alimahdiyar77@gmail.com"
] | alimahdiyar77@gmail.com |
b563563bd985a3f9d737ea973f8314bd6fb8f40d | 9d2b33eb85fca3a81ccb7272422c41a08467a8c4 | /pdm/formats/requirements.py | 37c230c8eab420dab9e877204074086b6fe605a6 | [
"MIT"
] | permissive | skyoo2003/pdm | 9b9d20079f325c087855c7a37a4270d36fa71131 | 95a758ee259dff02f00f0a3eab79fa23e5d2aa97 | refs/heads/master | 2022-12-12T18:01:36.331560 | 2020-09-04T01:16:41 | 2020-09-04T01:16:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,729 | py | import hashlib
import urllib.parse
from pip._internal.req.req_file import parse_requirements
from pdm.models.markers import Marker
from pdm.models.requirements import parse_requirement
from pdm.utils import get_finder
def _requirement_to_str_lowercase_name(requirement):
"""Formats a packaging.requirements.Requi... | [
"mianghong@gmail.com"
] | mianghong@gmail.com |
bef3b9ad03bdc33f7171cc9b588f198ce873e861 | 62922a76e40003f3d3a7d02282853f9a2b76c6fc | /cv2/ch22/test1.py | 1172f8de48d2bc9bfba7168431a2727b16325054 | [] | no_license | cchangcs/ai_learning_record | a7d0d9c7fcdc1e97d8869aa7e63b535f8cf62df2 | 235a90ff5fe0205334376a927d462b8ae64e4e70 | refs/heads/master | 2020-04-01T16:59:31.203223 | 2018-11-21T11:12:34 | 2018-11-21T11:12:34 | 153,408,023 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,103 | py | # encoding:utf-8
'''
斑点检测SimpleBlodDetector()
斑点检测:默认检测黑色点,如果要检测白色的点需要设置bycolor为true,并且color数值为255
斑点通常是指与周围有着颜色和灰度差别的区域,在实际的图中,往往存在着大量这样的斑点,如一棵树是一个斑点,一块草地是一个斑点。
由于斑点代表的是一个区域,相比单纯的角点,它的稳定性更好,抗噪声能力更强,所以它在图像配准上扮演着重要的角色。
同时有时图像中的斑点也是我们关心的区域,比如在医学与生物领域,我们需要从一些X光照片或细胞显微照片中提取一些具有特殊意义的斑点的位置或数量
'''
import cv2
import numpy as n... | [
"752340690@qq.com"
] | 752340690@qq.com |
b1d84ff6d8719c6d1cb346458bafaa88df886d86 | 0facb323be8a76bb4c168641309972fa77cbecf2 | /Configurations/HWWSemiLepHighMass/nanoAODv5/v6_production/2017/NJET_biined_WJets/SKIM10/HMVar10_Full_ALL_var/MassPoints/structure_M1500.py | 006d035cd83abd3e70ffc306361571ee477e383b | [] | no_license | bhoh/SNuAnalytics | ef0a1ba9fa0d682834672a831739dfcfa1e7486b | 34d1fc062e212da152faa83be50561600819df0e | refs/heads/master | 2023-07-06T03:23:45.343449 | 2023-06-26T12:18:28 | 2023-06-26T12:18:28 | 242,880,298 | 0 | 1 | null | 2020-02-25T01:17:50 | 2020-02-25T01:17:49 | null | UTF-8 | Python | false | false | 1,725 | py | #['WW', 'ggHWWlnuqq_M1500', 'DY', 'DATA', 'WZ', 'ggHWWlnuqq_M125', 'ZZZ', 'ggHWWlnuqq_M900', 'vbfHWWlnuqq_M500', 'Wjets1j', 'QCD_MU', 'WZZ', 'vbfHWWlnuqq_M900', 'QCD_bcToE', 'Wjets2j', 'QCD_EM', 'ggHWWlnuqq_M500', 'ZZ', 'WWW', 'vbfHWWlnuqq_M1500', 'vbfHWWlnuqq_M125', 'WWZ', 'Wjets0j', 'top']
QCD_MU=['QCD_Pt-15to20_MuE... | [
"soarnsoar@gmail.com"
] | soarnsoar@gmail.com |
622882398cd5c1e5077722f60c7aa9e77ef203af | 0ad8fc76aebe7ce22abe771fbeadf227e5b471cb | /app/productdb/tasks.py | 8cb6cd358ef178da1d7cd5290af4ab4a8389c040 | [
"MIT"
] | permissive | ppavlu/product-database | 354c6a1a3e9ebfdc931f2aacf8751ed0f149401c | 09610c09600c63eb91106c0b5a2fa995b134dbf4 | refs/heads/master | 2021-01-17T22:51:43.247027 | 2015-10-11T11:37:12 | 2015-10-11T11:37:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,251 | py | from django_project.celery import app as app
from app.productdb.models import Settings
import app.productdb.crawler.cisco_eox_api_crawler as cisco_eox_api_crawler
import logging
logger = logging.getLogger(__name__)
@app.task(serializer='json', name="synchronize_with_cisco_eox_api")
def execute_task_to_synchronize_c... | [
"henry@codingnetworker.com"
] | henry@codingnetworker.com |
89c2127cdb13c6c6248abfba21d3cdb0eba90d73 | 3b9fdd117bfcfa86b1e354b2c193727e7567cb76 | /proxyuser17/proxyuser17/apps/myapp/models.py | 9a06f4b7a626979e8ea1971891cbd06fbebd22c1 | [
"BSD-3-Clause"
] | permissive | marcofucci/django-ticket-24506 | 84beb913b2db2993034e199c3a63c2cde60fa9aa | 88a36d792e77fb70c12224ea6a02774015ddbc84 | refs/heads/master | 2021-01-21T11:37:23.621884 | 2015-03-22T12:55:25 | 2015-03-22T12:55:25 | 32,672,309 | 0 | 1 | null | 2015-03-22T12:55:25 | 2015-03-22T11:11:24 | Python | UTF-8 | Python | false | false | 314 | py | from django.db import models
class FKUserModel(models.Model):
user = models.ForeignKey('core.User')
def __unicode__(self):
return u'%s' % self.user
class OneToOneUserModel(models.Model):
user = models.OneToOneField('core.User')
def __unicode__(self):
return u'%s' % self.user
| [
"marcofucci@gmail.com"
] | marcofucci@gmail.com |
c3ca98e5d8c7a2b7a60bee0667267c57f753f0a6 | 6bf97e57103b9ddd639a91a0c371f86b3bce60d8 | /pure_ee/earth_engine_start.py | 48154028788ff39dfead3649a9176c9cbc69a261 | [
"Apache-2.0"
] | permissive | geosconsulting/gee_wapor | 655372722eed9e1c00ef7880870bd85c7953d64a | c3c451fcb21664172a74647fe5d9e56f312aa1df | refs/heads/master | 2021-01-13T05:01:37.233979 | 2017-03-01T14:09:08 | 2017-03-01T14:09:08 | 81,427,303 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 327 | py | # -*- coding: utf-8 -*-
"""
Created on Tue Jan 3 04:59:03 2017
@author: fabio
"""
# Import the Earth Engine Python Package
import ee
# Initialize the Earth Engine object, using the authentication credentials.
ee.Initialize()
# Print the information for an image asset.
image = ee.Image('srtm90_v4')
print(image.getI... | [
"geos-consulting@fastwebnet.it"
] | geos-consulting@fastwebnet.it |
b2516c9040789df5a0e98f754aab40508283b38c | c834c1b7ef5d0039a706f174ed3f7b0ab82fa2e5 | /optOnMysql/data2mysql.py | 5903606b3171c597649676ce4e1d13f00e79309e | [] | no_license | yangze01/Laws-Search-Project | 126ffc5ec1ad1c2e9d95c2490104e8e37e766ad4 | d1fff57a9298aa0d883a1b988aa98804d0ab00c1 | refs/heads/master | 2021-08-14T15:26:27.455518 | 2017-11-16T03:59:58 | 2017-11-16T03:59:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,597 | py | #coding=utf8
import sys
import time
reload(sys)
sys.setdefaultencoding('utf8')
from optOnMysql.DocumentsOnMysql import *
from optOnMysql.DocumentUnit import *
import json
BasePath = sys.path[0]
def is_valid_date(str):
'''判断是否是一个有效的日期字符串'''
try:
time.strptime(str, "%Y-%m-%d")
return True
except:
return... | [
"858848101@qq.com"
] | 858848101@qq.com |
9ea362e7e23645d74ada3c82eae8bd8ed6962067 | 6f6b7e1a9837fb581cc5fed92b66b4ad12ea30f5 | /19-05-161_STOCK_profit_AIC_BIC_L500_github/4plot_profit_nh6.py | 4d358b74123f153c55f5113d35716f99896e3ac4 | [
"MIT"
] | permissive | danhtaihoang/stock | f7b4f4989ff0c2b267766761d402adc599fc893d | 9c3a3e467839dda095a0152055e347254abaf271 | refs/heads/master | 2020-06-10T01:35:59.136032 | 2019-06-24T17:13:35 | 2019-06-24T17:13:35 | 193,546,744 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,052 | py | import numpy as np
import matplotlib.pyplot as plt
#=========================================================================================
# average:
p1 = np.loadtxt('profit_cost_nhmax6.dat')
p2 = np.loadtxt('profit_AIC_nhmax6.dat')
p3 = np.loadtxt('profit_BIC_nhmax6.dat')
tmax = np.shape(p1)[0]
t = np.arange(0,tm... | [
"hoangdanhtai@gmail.com"
] | hoangdanhtai@gmail.com |
5fe9b2191e2862a97b4b0500d3c4777c88eab68c | 56e96acad654d7480d17d5cae7402a2bc6cbaa76 | /share/py_module/dataset.py | fc4a162fa0c59a4f2c53f521c749910a52a91ef4 | [] | no_license | LitingLin/VehicleDC | 641b1e25c22cac2ffb1dcba519b1af5ac7d9f2c8 | 2ac0b8ad708f033b59c0bc924ca7ec169e86b063 | refs/heads/master | 2020-05-17T19:30:00.556691 | 2019-07-12T16:21:12 | 2019-07-12T16:21:12 | 183,916,512 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,885 | py | # coding: utf-8
import os
import re
import numpy as np
import torch
from torch.utils import data
from torchvision import transforms as T
from PIL import Image
color_attrs = ['Black', 'Blue', 'Brown',
'Gray', 'Green', 'Pink',
'Red', 'White', 'Yellow']
direction_at... | [
"linliting06@live.com"
] | linliting06@live.com |
6321392e8ea506f89ad8138de98709a7d3aeef3a | e5f1befb7c7ca0072747b33086fc6569a6befd01 | /old/flaskold/json/008.py | f4caad8db1b8d37bfc3909c746dc3bac66210760 | [] | no_license | nepomnyashchii/TestGit | ae08d8bb1b7d2ab9389a309fd1dc9e24729b019c | c7abf4ab08ee3c2f3ea1fb09a1938bff7a3e0e5c | refs/heads/master | 2020-04-28T23:41:51.053547 | 2020-01-24T12:22:40 | 2020-01-24T12:22:40 | 175,666,093 | 0 | 1 | null | 2019-03-15T13:44:03 | 2019-03-14T17:08:58 | null | UTF-8 | Python | false | false | 147 | py | from flask import Flask
app = Flask(__name__)
@app.route('/')
def index():
return "test"
if __name__ =="__main__":
app.run(debug=True)
| [
"nepomnyashchii@gmail.com"
] | nepomnyashchii@gmail.com |
f4a850cce56f0f8cf0a4527768d60ba75d2eb5df | e06ff08424324ac5d6c567ae9cd6954290ff9bd4 | /Yudi TANG/axe/KNN/KNN_dating.py | ba4684b05e29ddc86468b5905cf90baf69208d11 | [
"Apache-2.0"
] | permissive | JKChang2015/Machine_Learning | b1bdfcf9ea43a98fc7efd5c0624bbaf5d9dbf495 | f8b46bf23e4d1972de6bd652dd4286e9322ed62f | refs/heads/master | 2021-06-06T19:18:16.596549 | 2020-05-03T22:28:18 | 2020-05-03T22:28:18 | 119,390,891 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,671 | py | # KNN_dating
# Created by JKChang
# 29/01/2020, 10:20
# Tag:
# Description: dating people recommendation
# Feature: 1. Number of frequent flyer miles earned per year
# 2. Percentage of time spent playing video games
# 3. Liters of ice cream consumed per week
# classifies:1. doesn't like
# ... | [
"jkchang2015@gmail.com"
] | jkchang2015@gmail.com |
f8d2154649e59afa419b79b4777684cdda82eb5c | 56b4d00870af18752b4414495b08e2ec3adf3ae4 | /src/clims/api/endpoints/process_assignments.py | c5fd2f83c03d0928f0637275f0b82856ee822b26 | [
"BSD-2-Clause"
] | permissive | commonlims/commonlims | 26c3f937eaa18e6935c5d3fcec823053ab7fefd9 | 36a02ed244c7b59ee1f2523e64e4749e404ab0f7 | refs/heads/develop | 2021-07-01T17:20:46.586630 | 2021-02-02T08:53:22 | 2021-02-02T08:53:22 | 185,200,241 | 4 | 1 | NOASSERTION | 2021-02-02T08:53:23 | 2019-05-06T13:16:37 | Python | UTF-8 | Python | false | false | 1,028 | py | from __future__ import absolute_import
from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response
from sentry.api.base import Endpoint, SessionAuthentication
class ProcessAssignmentsEndpoint(Endpoint):
authentication_classes = (SessionAuthentication, )
permission_cla... | [
"costeinar@gmail.com"
] | costeinar@gmail.com |
1186de1cba914cdcc904a0e0a09520080aa16289 | 46492cc7429c83fe362b0ed566fc54982e52c46e | /pitches/main/forms.py | bb9c5b6a6c3f20f413c47970a696323c03307838 | [
"MIT"
] | permissive | jakhax/pitches | 15c8d87825c879b56cd931d26d398e736636134f | e56358d00089bd46addd54192220bcca0478e0da | refs/heads/master | 2020-03-18T00:36:09.254870 | 2018-05-20T14:48:14 | 2018-05-20T14:48:14 | 134,102,974 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 7,399 | py | from flask import current_app, session
from flask_babel import lazy_gettext
from flask_wtf import FlaskForm
from wtforms import StringField, TextAreaField, BooleanField, SelectField, SubmitField, IntegerField
from wtforms import ValidationError
from wtforms.validators import DataRequired, InputRequired, Length, Email, ... | [
"jackogina60@gmail.com"
] | jackogina60@gmail.com |
eef750f84f81a27c35f5f451faf9e9a1b93c1cc4 | 4c117ea3617a576ddd07d8ea8aaab1a925fc402f | /bin/individualization/VennPlot.py | 18f444e66a82a4f9f64427b83e18f591f031b0f6 | [] | no_license | 452990729/Rep-seq | 7be6058ba3284bea81282f2db7fd3bd7895173ba | e217b115791e0aba064b2426e4502a5c1b032a94 | refs/heads/master | 2021-12-11T14:27:46.912144 | 2019-06-04T03:49:40 | 2019-06-04T03:49:40 | 190,124,555 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,549 | py | #!/usr/bin/env python
import os
import sys
import re
import matplotlib
matplotlib.use('Agg')
import venn
from matplotlib import pyplot as plt
def HandleFq(file_in):
base = '_'.join(re.split('_', os.path.basename(file_in))[:2])
list_tmp = []
m = 0
with open(file_in, 'r') as in1:
for line in in... | [
"452990729@qq.com"
] | 452990729@qq.com |
c423950c678b966d72c428c4dadd7d1045308bbb | c536c764aab4170c64f3f8b78bd91593dcb161a3 | /vigenereb62.py | 037292215097560084e9451db9c5655b7c2fb996 | [] | no_license | numberly/vigenere-b62 | 63bbc95c1f9390e9623a5882a9c2a14d110851b4 | 3dea3394ee557ba2e589af014cbc4454ebbbc874 | refs/heads/master | 2023-02-16T02:13:31.254670 | 2021-01-11T15:24:58 | 2021-01-11T15:24:58 | 328,698,862 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 535 | py | def iter_reverse_digits(number, base):
while number != 0:
digit = number % base
yield digit
number -= digit
number //= base
def encode(alphabets, seed, size=6):
if len(alphabets) < size:
raise ValueError("There should be an alphabet per character you want")
secret =... | [
"julien@thebault.co"
] | julien@thebault.co |
1bff440e67a7189665b42fe0833a0c9b007950e7 | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/nouns/_defenders.py | bb7548df4efbbe4fec4aeb39f3eec118e52a2ba7 | [
"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 | 252 | py |
from xai.brain.wordbase.nouns._defender import _DEFENDER
#calss header
class _DEFENDERS(_DEFENDER, ):
def __init__(self,):
_DEFENDER.__init__(self)
self.name = "DEFENDERS"
self.specie = 'nouns'
self.basic = "defender"
self.jsondata = {}
| [
"xingwang1991@gmail.com"
] | xingwang1991@gmail.com |
8339c4b6670fe18b61771e18903739838373f58c | 01ce2eec1fbad3fb2d98085ebfa9f27c7efb4152 | /itertools/itertools-combinations.py | b32166fe2a76aece52bb636b0b8705a63f17c3ce | [
"MIT"
] | permissive | anishLearnsToCode/hackerrank-python | 4cfeaf85e33f05342df887896fa60dae5cc600a5 | 7d707c07af051e7b00471ebe547effd7e1d6d9d9 | refs/heads/master | 2023-01-01T23:39:01.143328 | 2020-11-01T07:31:15 | 2020-11-01T07:31:15 | 265,767,347 | 8 | 4 | null | null | null | null | UTF-8 | Python | false | false | 252 | py | # https://www.hackerrank.com/challenges/itertools-combinations/problem
import itertools
line = input().split()
word = sorted(line[0])
k = int(line[1])
for i in range(1, k + 1):
for j in itertools.combinations(word, i):
print(''.join(j))
| [
"anish_bt2k16@dtu.ac.in"
] | anish_bt2k16@dtu.ac.in |
5722c5bd79ba59802f5e4174de590823f9b31f54 | 6b2a8dd202fdce77c971c412717e305e1caaac51 | /solutions_5631989306621952_1/Python/Hotshot8325/Q2.py | c61b1a46284a8ff8a0e7daff7477923bbd7b7f0f | [] | 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 | 968 | py | #CodeJam pancake problem
import csv
import string
#import data from test file in the form [[[],[]],[[],[]].... with [[],[]] being one test case
with open('a-large.in') as csvfile:
testCase = csv.reader(csvfile, delimiter = ' ', quotechar='|')
rowNum = 0
inputText = []
#swapCount = []
... | [
"alexandra1.back@gmail.com"
] | alexandra1.back@gmail.com |
566302b568f0103bd3c6c2d54e6988ac6dd06f4b | 6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4 | /JD9vSKZGrxQhLbA9r_11.py | 8153c6d8cc99992256ea1d82f8771cd6328f44f3 | [] | 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 | 255 | py |
def pile_of_cubes(m):
if m >= 10252519345963644753026: return None
x = m**0.5
if (x%1==0):
c = 1
while (x != c and x > 0):
x = x - c
c = c + 1
if (x == c):
return c
return None
| [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
05f1c23936d977e70fdef1e44fc27ab9f069cadf | 55647a80c8b412af9df0ba3f50595cc2f29c25e6 | /res/scripts/common/Lib/encodings/gbk.py | 4b4a46dcbfdea9c2f98724c76a52405e54febf9c | [] | no_license | cnsuhao/WOT-0.9.17-CT | 0035eb6070fb4fab8d8ee9f8bbc676c10d511cfb | d1f932d8cabaf8aa21708622e87f83c8d24d6451 | refs/heads/master | 2021-06-08T18:11:07.039293 | 2016-11-19T19:12:37 | 2016-11-19T19:12:37 | null | 0 | 0 | null | null | null | null | WINDOWS-1250 | Python | false | false | 1,136 | py | # 2016.11.19 19:58:56 Střední Evropa (běžný čas)
# Embedded file name: scripts/common/Lib/encodings/gbk.py
import _codecs_cn, codecs
import _multibytecodec as mbc
codec = _codecs_cn.getcodec('gbk')
class Codec(codecs.Codec):
encode = codec.encode
decode = codec.decode
class IncrementalEncoder(mbc.MultibyteIn... | [
"info@webium.sk"
] | info@webium.sk |
cd75f26df497e0e47746786f0197f8dc9b218f06 | 930c207e245c320b108e9699bbbb036260a36d6a | /BRICK-RDFAlchemy/generatedCode/brick/brickschema/org/schema/_1_0_2/Brick/FCU_Return_Air_Temperature_Sensor.py | d4ac39c9698a57051d03037b2f79dc41b5511c4b | [] | 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 | 457 | 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.Return_Air_Temperature_Sensor import Return_Air_Temperature_Sensor
class FCU_Return_Air_Temperature_Sensor(Retur... | [
"Andre.Ponnouradjane@non.schneider-electric.com"
] | Andre.Ponnouradjane@non.schneider-electric.com |
1158acb79cf822c0ded1ea29f10b77727305c073 | cd142a4e15d3576546fcb44841417039f0b8fb00 | /build/double/catkin_generated/pkg.installspace.context.pc.py | 9b014836f2e3e476722b6c40aa901294660dad37 | [] | no_license | mgou123/rplidar | 4389819eb1998d404d1066c7b4a983972d236ce7 | 608c1f6da2d3e5a8bac06e8d55d8569af828a40b | refs/heads/master | 2022-11-10T05:51:56.403293 | 2020-06-29T04:16:14 | 2020-06-29T04:16:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 393 | py | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else []
PROJECT_CATKIN_DEPENDS = "roscpp;std_msgs;sensor_msgs".replace(';', ' ')
PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else []
PROJECT_NAME = "double"
PR... | [
"492798337@qq.com"
] | 492798337@qq.com |
237743cb29e83580cbade37977253888764a05b4 | f4f54015298eedfbbdfcaaf5e2a9603112f803a5 | /sachin/gocept.filestore-0.3/gocept.filestore-0.3/src/gocept/filestore/tests.py | 39487c46c2cf44f18a2df60610d46b4e1e9848c4 | [] | no_license | raviramawat8/Old_Python_Codes | f61e19bff46856fda230a096aa789c7e54bd97ca | f940aed0611b0636e1a1b6826fa009ceb2473c2b | refs/heads/master | 2020-03-22T22:54:50.964816 | 2018-06-16T01:39:43 | 2018-06-16T01:39:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 335 | py | # Copyright (c) 2007 gocept gmbh & co. kg
# See also LICENSE.txt
# $Id: tests.py 5111 2007-08-30 11:27:23Z zagy $
import unittest
from zope.testing import doctest
def test_suite():
suite = unittest.TestSuite()
suite.addTest(doctest.DocFileSuite(
'README.txt',
optionflags=doctest.ELLIPSIS))
... | [
"sachinyadav3496@gmail.com"
] | sachinyadav3496@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.