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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
01da5a0e86cd8ce29cbc5a202aa44f0231c8e8af | dc955cb940976e360853a03c8a18c173be21e406 | /web_flask/3-python_route.py | 080068cf4596ab06d921d340f2c4365846556cbe | [] | no_license | SantiagoHerreG/AirBnB_clone_v2 | 888c04617d1f1e6ca01d080a57ae1932596a3a9a | 2669d2455e657c1096d8f32c1d083fdb3d22665b | refs/heads/master | 2020-11-25T05:24:36.767546 | 2020-01-23T04:20:59 | 2020-01-23T04:20:59 | 228,519,799 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 929 | py | #!/usr/bin/python3
"""Uses the Flask micro framework to make an app server listen at 0.0.0.0:5000
"""
from flask import Flask
app = Flask(__name__)
@app.route('/', strict_slashes=False)
def home():
"""Function for handling the route /
"""
return "Hello HBNB!"
@app.route('/hbnb', strict_slashes=False)
d... | [
"[email protected]"
] | |
f14bf2284a5ac68035d5cc581bed6b3963daf922 | 3c7dcf8c7af1536af8d6ff3b7ec4389e9523823a | /ssl_sale_ext/__manifest__.py | 9d0dd99da365af6fa2c0a914e27283a768065fe9 | [] | no_license | tate11/module | cb70e8e45ecb9912a597ea9310c29baf9074fa90 | b5148fad3f3a23df749d3d3d7278c2ce22e067d8 | refs/heads/master | 2020-03-18T21:11:18.403431 | 2017-06-14T07:48:48 | 2017-06-14T07:48:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 696 | py | # -*- coding: utf-8 -*-
{
'name': 'SAL: SuperSilicone Sale Extention',
'version': '1.0',
'author': 'Kornelius K Macario (Falinwa Indonesia)',
'description': '''
Module to extend reporting file in Quotations.
''',
'depends': [
'ssl_base_ext',
],
'data': [
'report/s... | [
"[email protected]"
] | |
94090cd146bdbb675c2a0236d33670dd56158a11 | 006341ca12525aa0979d6101600e78c4bd9532ab | /CMS/Zope-3.2.1/Dependencies/twisted-Zope-3.2.1/twisted/lore/__init__.py | 142e9e5fcdd90fda4df2e11b44a9594c01d4c49d | [
"LicenseRef-scancode-unknown-license-reference",
"MIT",
"ZPL-2.1",
"Python-2.0",
"ICU",
"LicenseRef-scancode-public-domain",
"BSD-3-Clause",
"ZPL-2.0"
] | permissive | germanfriday/code-examples-sandbox | d0f29e20a3eed1f8430d06441ac2d33bac5e4253 | 4c538584703754c956ca66392fdcecf0a0ca2314 | refs/heads/main | 2023-05-30T22:21:57.918503 | 2021-06-15T15:06:47 | 2021-06-15T15:06:47 | 377,200,448 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 411 | py | # Copyright (c) 2001-2004 Twisted Matrix Laboratories.
# See LICENSE for details.
#
'''
The Twisted Documentation Generation System
Maintainer: U{Andrew Bennetts<mailto:[email protected]>}
'''
# TODO
# Abstract
# Bibliography
# Index
# Allow non-web image formats (EPS, specifically)
# Allow pickle output and i... | [
"[email protected]"
] | |
c99df2302f718da619b9117303bad092b189a97e | 170864b6ec66be48138f231fe8ac3381481b8c9d | /python/BOJ_15652.py | 20c6e031ade32221e23ea0305ac743f403e37932 | [] | no_license | hyesungoh/AA_Algorithm | 5da3d8312d035d324dfaa31eef73f01a238231f3 | d68f52eaa29cfc4656a8b5623359166779ded06e | refs/heads/master | 2023-06-09T14:49:01.402456 | 2021-06-28T10:10:09 | 2021-06-28T10:10:09 | 272,701,231 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 286 | py | n, m = map(int, input().split())
l = list(range(1, n+1))
ans = []
def bt(depth, index):
if depth == m:
print(*ans)
return
for i in range(n):
if l[i] >= index:
ans.append(l[i])
bt(depth + 1, l[i])
ans.pop()
bt(0, 0)
| [
"[email protected]"
] | |
a63e804d240377f401fed52279ef157ad6bf2aa1 | 6bf036d64271bb062451626c334b6eabaf2bcef9 | /tensorflow_asr/models/ctc/ctc.py | d7dcf5dd5e414338abc25104ccc39efad21dc96b | [
"Apache-2.0"
] | permissive | lamyiowce/TensorFlowASR | 7ce9d96f70da182e7d058a492993b62d523354e5 | 130124ccaf23fabe3e7a6f138d9403a7c0946ef3 | refs/heads/main | 2023-06-25T03:09:28.182924 | 2021-06-10T13:42:45 | 2021-06-10T13:42:45 | 390,671,234 | 0 | 0 | Apache-2.0 | 2021-07-29T09:29:18 | 2021-07-29T09:29:18 | null | UTF-8 | Python | false | false | 7,347 | py | # Copyright 2020 Huy Le Nguyen (@usimarit)
#
# 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 t... | [
"[email protected]"
] | |
a277d33f5860071faa32fa667b73c549508cf86b | 6d7e28fd178d5eba1b9e67dd77ad7cec6690743b | /alg_dataset.py | 0a37bab5931b6a82ad462e82449e0347cb2d479e | [] | no_license | Arseni1919/PL_TEMPLATE_PROJECT | ec83f8402996f837cbaccbea092c5cc523a959de | dd5d5fa2284c9ea1da35e316a14299fc89272669 | refs/heads/main | 2023-02-12T18:56:42.810589 | 2021-01-12T09:54:50 | 2021-01-12T09:54:50 | 326,060,903 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 401 | py | from CONSTANTS import *
class ALGDataset(Dataset):
def __init__(self):
self.buffer = deque(maxlen=REPLAY_SIZE)
def __len__(self):
return len(self.buffer)
def __getitem__(self, indx):
item = self.buffer[indx]
return item.state, item.action, item.reward, item.done, item.new... | [
"[email protected]"
] | |
da1c36a4a8b25e9de600154f608421c9cf4a03fb | 60eb288f242b60b872481dc1f38848c19cd51452 | /tests/conftest.py | 6dcddd7abf84dc136e6f1f1f1ff6b0879c50e873 | [
"MIT"
] | permissive | klen/muffin-admin | 62654a515f552b9026a27afc70c3e1b98cbb6f04 | 3c7c2e169911bf5388947447cfc693648decd7cb | refs/heads/develop | 2023-08-30T16:46:28.750256 | 2023-08-24T09:25:16 | 2023-08-24T09:25:16 | 34,291,282 | 19 | 2 | MIT | 2023-02-20T20:25:44 | 2015-04-20T23:04:00 | Python | UTF-8 | Python | false | false | 650 | py | from pathlib import Path
import pytest
from muffin import Application, TestClient
@pytest.fixture(
params=["trio", "curio", pytest.param(("asyncio", {"use_uvloop": False}), id="asyncio")]
)
def aiolib(request):
return request.param
@pytest.fixture(scope="session", autouse=True)
def prebuild_js():
impor... | [
"[email protected]"
] | |
116cac7e4362884c75a97caf04c8c453116a0d80 | fb7efe44f4d9f30d623f880d0eb620f3a81f0fbd | /components/policy/tools/template_writers/writers/android_policy_writer_unittest.py | 6eb7a2f630701bdced109080db050ec1ed51ebb2 | [
"BSD-3-Clause"
] | permissive | wzyy2/chromium-browser | 2644b0daf58f8b3caee8a6c09a2b448b2dfe059c | eb905f00a0f7e141e8d6c89be8fb26192a88c4b7 | refs/heads/master | 2022-11-23T20:25:08.120045 | 2018-01-16T06:41:26 | 2018-01-16T06:41:26 | 117,618,467 | 3 | 2 | BSD-3-Clause | 2022-11-20T22:03:57 | 2018-01-16T02:09:10 | null | UTF-8 | Python | false | false | 2,684 | py | #!/usr/bin/env python
# Copyright (c) 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
'''Unit tests for writers.android_policy_writer'''
import os
import sys
if __name__ == '__main__':
sys.path.append(os.path.join... | [
"[email protected]"
] | |
e4eb19c2ffe6437ac4bd088a7d184763cd6d81a6 | 198f759dc334df0431cbc25ed4243e86b93571eb | /database_routers/mssql_router.py | d5bc32937be3d699277bc992a68a97f54e34657c | [] | no_license | miladhzz/django-muliple-db | ec2074b14dd67a547c982f20b2586f435e7e0d6c | 56ff2555e498d9105cad215daf4c3d4da59d7d9a | refs/heads/master | 2022-12-25T08:08:05.761226 | 2020-10-06T06:38:30 | 2020-10-06T06:38:30 | 301,636,910 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 583 | py | class MssqlRouter:
route_app_labels = {'mssql',}
def db_for_read(self, model, **hints):
return 'mssql'
def db_for_write(self, model, **hints):
return 'mssql'
def allow_relation(self, obj1, obj2, **hints):
if (
obj1._meta.app_label in self.route_app_labels or
o... | [
"[email protected]"
] | |
c27d90b99c370731bf6398c8f1b7c9d70f7b4c7e | d0fec74acfbfdee1b662736731c1cc988e2ba2ee | /problem_40/p040.py | 21c164577ea7c7bd2acc43fe9bacc1d482b5a2b1 | [] | no_license | msztylko/project-Euler | fdd0cfefbe88b63f6dbd2d08f1cd59270b9e1735 | b3f5ce828ccc6662c100dd27fa295fc8afa22f6e | refs/heads/master | 2021-11-23T02:50:19.333259 | 2021-10-31T17:52:28 | 2021-10-31T17:52:28 | 195,980,596 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 271 | py | import sys
if sys.version_info.major == 2:
range = xrange
def compute():
s = "".join(str(i) for i in range(1, 1000000))
ans = 1
for i in range(7):
ans *= int(s[10 ** i - 1])
return str(ans)
if __name__ == "__main__":
print(compute())
| [
"[email protected]"
] | |
68653bc8d29f3dcdda99954fd2c56c4db08be014 | 2020c9c6958d9cc338b72f62e24d9ad30c1a8cad | /python/0048.rotate-image/rotate-image.py | ebc9d290238139686bdea8148f5026ac7910bff1 | [] | no_license | ysmintor/leetcode | b2d87db932b77e72504ffa07d7bf1b0d8c09b661 | 434889037fe3e405a8cbc71cd822eb1bda9aa606 | refs/heads/master | 2020-05-30T21:03:03.886279 | 2019-10-31T08:46:23 | 2019-10-31T09:02:24 | 189,963,050 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 471 | py | class Solution:
def rotate(self, matrix: List[List[int]]) -> None:
"""
Do not return anything, modify matrix in-place instead.
"""
# 一共有3种处理办法,每一次都有巧妙,时间多将三个都看会
n = len(matrix)
for i in range(n):
for j in range(i+1, n):
matrix[i][j], matrix... | [
"[email protected]"
] | |
48050f4660f52648eea4935b898f348604a3dd8d | 82ef9a0dd1618a28770597227acfc0150b948af2 | /wearnow/gui/editors/displaytabs/notebackreflist.py | 08022d00f1eb026cafa2cb4ba841b487ad4196ea | [] | no_license | bmcage/wearnow | ef32a7848472e79e56763b38551835aa97864b21 | c8dfa75e1ea32b0c021d71c4f366ab47104c207e | refs/heads/master | 2021-01-16T00:27:59.597812 | 2016-01-19T11:55:03 | 2016-01-19T11:55:03 | 37,195,574 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,354 | py | #
# WearNow - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2006 Donald N. Allingham
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at yo... | [
"[email protected]"
] | |
dc20d47c77e072ae91e749eeca8edf20f26f99a1 | 4f7aa44d21ae38093869e79e10f5cdc8842d48b7 | /05-mylibrary-lab-next/presentation/app_main_window.py | 8979bca4b7ccccd07d557f3862a560c0266e63e2 | [
"Apache-2.0"
] | permissive | iproduct/intro-python | 31e802c2c21a4df3361656f12d267ec52c2d6564 | 7e08e144da2907fcf45dc734ab4e896631625d75 | refs/heads/master | 2023-02-19T11:42:37.522624 | 2023-02-13T15:54:03 | 2023-02-13T15:54:03 | 128,980,155 | 5 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,198 | py | from tkinter import *
from tkinter import ttk, messagebox
from dao.book_repository_json import BookRepositoryJson
from presentation.add_edit_book_dialog import AddEditBookDialog
from utils.tkinter_utils import print_hierarchy, get_ceter_window_left_top
MAIN_WIDTH = 800
MAIN_HEIGHT = 600
class AppMainWindow(ttk.Fram... | [
"[email protected]"
] | |
0c33ff75f22af311c81bd6cebc6adb11379e4481 | 7124a12aee78af2cf3cdd5adbe38debd07fda07b | /Simulaciones/Proyecto_4_2/Scripts/Potencial_Graphics.py | 3da508c74cc29aebc52f670a7ed4bf17cbdb5dd2 | [] | no_license | giovannilopez9808/Notas_Agosto_2020 | e52ac9dd150037d0a8981fb765bcf0a7e73ed04b | 5fc8d5baabbe9ed5f3ee1b33c59e7ae4e5aff526 | refs/heads/master | 2023-02-01T07:50:38.559046 | 2020-12-14T05:18:34 | 2020-12-14T05:18:34 | 293,427,083 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,990 | py | import numpy as np
import matplotlib.pyplot as plt
#<-----------------------------Potencial--------------------->
def potential_lj(r,e,sigma):
v=4*e*((sigma/r)**12-(sigma/r)**6)
return v
#<----------------------------Fuerza--------------------->
def force_lj(r,e,sigma):
f=4*e*(12*sigma**12/r**13-6*s... | [
"[email protected]"
] | |
edcd5818de24ad48b4dd91248306c61d7ac34f7b | 44b6bc41fe8e424196f98dbc5b2f050c1f9645f8 | /platforms/windows/dos/16230.py | e8600ad68d652ef330e3daac086438f90ca632dd | [] | no_license | angeloobeta/exploit-database | 21283dd8549f47836a35af6f3ea7b63b8dba11ea | 43f3d9e94c01a7f51e30561a96214af231dd9d36 | refs/heads/master | 2021-08-08T21:07:38.794539 | 2017-11-11T05:01:28 | 2017-11-11T05:01:28 | 110,380,452 | 0 | 1 | null | 2017-11-11T21:09:05 | 2017-11-11T21:09:04 | null | UTF-8 | Python | false | false | 3,696 | py | #!/usr/bin/python
#
#
# xxx xxx xxxxxxxxxxx xxxxxxxxxxx xxxxxxxxxxx
# xxx xxx xxxxxxxxxxxxx xxxxxxxxxxxxx xxxxxxxxxxxxx
# xxx xxx xxxxxxxxxxxxx xxxxxxxxxxxxx xxxxxxxxxxxxx
# xxxxx xxx x... | [
"[email protected]"
] | |
ed1e78002b6d5631a704ce698be181c232c0acf8 | a475b8dfdbc90a57470b5be8dfd6fa2367de73f3 | /testproj/testapp/models.py | f7132e89fc9556e3630c00942b04b806b562cece | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | Moliholy/django-tastypie-crust | 9080be75726385716d75280f68cef7ad25b90761 | 520154aa36aa4ba9e132c4ea1d042ea8bcb235b2 | refs/heads/master | 2020-03-18T19:26:20.528764 | 2018-05-28T12:10:52 | 2018-06-12T14:53:26 | 135,154,352 | 0 | 0 | null | 2018-05-28T11:53:52 | 2018-05-28T11:53:51 | null | UTF-8 | Python | false | false | 508 | py | #!/usr/bin/env python
# -*- coding: utf-8
from django.db import models
from django.utils.translation import ugettext, ugettext_lazy as _
class Homepage(models.Model):
user = models.ForeignKey('auth.User')
url = models.URLField()
class Meta:
verbose_name = _('Homepage')
verbose_name_plura... | [
"[email protected]"
] | |
b2a5716e29cbd359293a072d81733438f86495a2 | 52e45c26c110c42de79383e8034fd280fd82a02f | /spatialdata/spatialdb/GravityField.py | 13f3d151d4951e63b963de4d5d79d09bf78493dc | [
"MIT"
] | permissive | geodynamics/spatialdata | 1ae1d2583aae356e9e68cd434c1f17820b49d127 | 2da6aad61c136f0e15f066aaea5fd31851de112f | refs/heads/main | 2023-08-15T07:22:17.676228 | 2023-07-28T03:32:07 | 2023-07-28T03:32:07 | 12,651,854 | 6 | 20 | MIT | 2023-07-28T03:32:09 | 2013-09-06T18:52:14 | C++ | UTF-8 | Python | false | false | 2,821 | py | # ----------------------------------------------------------------------
#
# Brad T. Aagaard, U.S. Geological Survey
#
# This code was developed as part of the Computational Infrastructure
# for Geodynamics (http://geodynamics.org).
#
# Copyright (c) 2010-2023 University of California, Davis
#
# See LICENSE.md for lice... | [
"[email protected]"
] | |
6881aba7454b96576813d8e61f3828f6399b7b00 | 0fccee4c738449f5e0a8f52ea5acabf51db0e910 | /genfragments/ThirteenTeV/XXTo4J/XXTo4J_M-50_CTau-1000mm_TuneCUETP8M1_13TeV_pythia8_cff.py | f20e41d229265892646774f2207a200192607813 | [] | no_license | cms-sw/genproductions | f308ffaf3586c19b29853db40e6d662e937940ff | dd3d3a3826343d4f75ec36b4662b6e9ff1f270f4 | refs/heads/master | 2023-08-30T17:26:02.581596 | 2023-08-29T14:53:43 | 2023-08-29T14:53:43 | 11,424,867 | 69 | 987 | null | 2023-09-14T12:41:28 | 2013-07-15T14:18:33 | Python | UTF-8 | Python | false | false | 2,894 | py | COM_ENERGY = 13000. # GeV
MASS_POINT = 50 # GeV
CROSS_SECTION = 1 # pb
CTAU_POINT = 1000 # mm
import FWCore.ParameterSet.Config as cms
from Configuration.Generator.Pythia8CommonSettings_cfi import *
from Configuration.Generator.Pythia8CUEP8M1Settings_cfi import *
generator = cms.EDFilter("Pythia8GeneratorFilter",
... | [
"[email protected]"
] | |
a445d7c740160a7e33848149248180741d45af83 | 077a17b286bdd6c427c325f196eb6e16b30c257e | /00_BofVar-unit-tests/07_32/remenissions-work/exploit-BofVar-3.py | b8ea6ed45800852876c676f658926951160fa819 | [] | 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 | 777 | py | from pwn import *
import time
import sys
import signal
import sf
target = process("./chall-test_BofVar-07-x86")
gdb.attach(target, execute="verify_exploit")
bof_payload = sf.BufferOverflow(arch=32)
bof_payload.set_input_start(0x5a)
bof_payload.add_int32(0x28, 0xdead)
bof_payload.add_int32(0x24, 0xdead)
bof_payload.a... | [
"[email protected]"
] | |
f69ce16005e44fc509989b7f6e007b21ae1b0ae5 | ff7e133648566b8a705cb5a214be8a82df5101d9 | /algorithm/work_1/test.py | a15a7f356574f4bf7509cf40eb11373a9185fc38 | [] | no_license | hoik92/Algorithm | 231433193ecba4a48ef830cab2c5b0115fa7246d | 4085b83a692a211e10503949d4518205d404dcaf | refs/heads/master | 2020-04-27T06:27:06.777255 | 2019-04-18T23:48:30 | 2019-04-18T23:48:30 | 174,108,507 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 657 | py | import sys
sys.stdin = open('input.txt', 'r')
def mx_mn(T):
mxidx, mnidx = 0, 0
for i in range(len(T)):
if T[mxidx] < T[i]:
mxidx = i
if T[mnidx] > T[i]:
mnidx = i
return mxidx, mnidx
for tc in range(1, 11):
D = int(input())
T = list(map(int, input().split()... | [
"[email protected]"
] | |
0c233a30fd722986b1ae834d7faed0df4ed8cd18 | a40d2a4c1704c080b0454805218b7dd07f28218c | /yabgp/tests/unit/message/attribute/test_extcommunity.py | bb67218e7535e1898aafbbbca3858bf10dd9a231 | [
"Apache-2.0"
] | permissive | plucena24/yabgp | e524b2c58b262ddba868a93cbbab3c5a6f3419aa | bc817ed74b21743797faee565fe54efb1f4b85c7 | refs/heads/master | 2023-08-21T02:19:20.937686 | 2015-08-04T09:30:49 | 2015-08-04T09:30:49 | 40,301,596 | 0 | 0 | Apache-2.0 | 2023-08-14T21:29:51 | 2015-08-06T11:35:33 | Python | UTF-8 | Python | false | false | 4,466 | py | # Copyright 2015 Cisco Systems, 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 requi... | [
"[email protected]"
] | |
ff20799864d9ab1630cd84985b26232f955a7bad | 8ed9296cf14cbd48ad6c6ba977a4eddfb6158ec3 | /src/idealised/simple_physics/simple_physics_custom.py | f427bcf74ae3c3f900988a4ea169b9ce6119018d | [
"BSD-3-Clause"
] | permissive | JoyMonteiro/CliMT | 51191c8e44eef28057971dd29de8e40c0bd3ef97 | 0949ed3a3a125638072351d7277ae4b956956d35 | refs/heads/master | 2021-04-09T17:45:56.369908 | 2016-10-28T08:32:26 | 2016-10-28T08:32:26 | 28,734,117 | 2 | 0 | null | 2015-01-03T03:45:23 | 2015-01-03T03:45:22 | null | UTF-8 | Python | false | false | 6,114 | py | import numpy as np
from component import Component
import _simple_physics_custom as phys
from grid import Grid
class simple_physics_custom(Component):
"""
Interface to the simple physics package. This is a modified version which allows the
user to switch off any of the three routines : large scale condensa... | [
"[email protected]"
] | |
4b642e6a61f839f7027c9f80ffb3381877982af2 | d63c503df093f4a6f2e4f5fa796c4864a4418461 | /subarray.py | 27c8cbb61999db7937c16409f9634e6da000b139 | [] | no_license | 99rishita/Geeksforgeeks | 963e4c9d484cd615e7ffb7f640d712f15cb7ad3e | ece2da9e1a5f39a54de4af4ee13913e67b10745e | refs/heads/master | 2022-12-29T04:28:11.004559 | 2020-10-02T18:24:39 | 2020-10-02T18:24:39 | 277,882,127 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 460 | py | def subarraysum(arr, k):
sum = 0
for i in range(0, len(arr)):
sum = arr[i]
#j = i+1
for j in range(i+1, len(arr)):
sum = sum + arr[j]
if sum > k:
break
if sum == k:
print(i+1)
print(j+1)
r... | [
"[email protected]"
] | |
edcde8943da6aedbe6d9cb618303471335c58763 | 2da355c3e63d911995bd5661100d858ceeae5493 | /python_data/Chapter 7/P/P-7.45.py | 264f3ee6748288442c770f7725f1dce5236145c1 | [] | no_license | allenxzy/Data-and-Structures-and-Alogrithms | 1f72e7471f7d8f8982985986eda57f896e73087d | 5977ea9434b42032069b24a538f455067ef38283 | refs/heads/master | 2021-01-16T21:46:24.199337 | 2016-12-14T08:05:40 | 2016-12-14T08:05:40 | 60,823,594 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 566 | py | #-*-coding: utf-8 -*-
"""
An array A is sparse if most of its entries are empty (i.e., None). A list
L can be used to implement such an array efficiently. In particular, for
each nonempty cell A[i], we can store an entry (i,e) in L, where e is the
element stored at A[i]. This approach allows us to represent A using O(... | [
"[email protected]"
] | |
92d622b8979f7189633fda47981ae316e0f50bb1 | c4efe9f6416f989524fafb128525a0a71272f680 | /python/python-test.py | a0fc2d56f0ca9636405a5daa8bf9512c4329afe5 | [] | no_license | drautb/sketchbook | dcc6eb586ffe739ee21ab74aa6b045073d38fc6b | 12255fc3cc5c2cbccbc174333c76c339d9846d67 | refs/heads/master | 2023-07-27T10:05:40.737633 | 2023-07-25T19:18:32 | 2023-07-25T19:18:32 | 28,785,534 | 4 | 3 | null | 2023-03-07T03:15:24 | 2015-01-04T20:46:06 | C++ | UTF-8 | Python | false | false | 1,712 | py | """
Determine which elements in each array are not present in the other.
Numbers in array 1 that aren't in array 2:
<num1> <num2> <num3>...
Numbers in array 2 that aren't in array 1:
<num1> <num2> <num3>...
"""
def reconcileHelper(arr_a, arr_b):
in_a_not_b = []
in_b_not_a = []
# Some effort is wasted by ... | [
"[email protected]"
] | |
cf57d9388cb7e3d352c181533f5217e8ac7d4f9a | 95d73f1daebb98fe6707b999c9763f3b84d418a4 | /cms/tests/mail.py | 1b5281d7451060ae56a54f9cbb7b5364631a6269 | [] | no_license | leotop/django_ukrhim | 8e01e284076878c7691986d5e8d056795d2bb900 | e5a60a79f441ae732350e518f9b71e2724dc010a | refs/heads/master | 2021-01-22T15:51:27.617651 | 2015-01-23T11:00:37 | 2015-01-23T11:00:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 636 | py | # -*- coding: utf-8 -*-
from cms.api import create_page_user
from cms.test_utils.testcases import CMSTestCase
from cms.utils.mail import mail_page_user_change
from django.core import mail
from django.contrib.auth.models import User
class MailTestCase(CMSTestCase):
def setUp(self):
mail.outbox ... | [
"[email protected]"
] | |
060ffffdae42855cbce9c3ae529ae8e62c711b23 | 8b187f3d60446b39a8f2ba976688ed493798fc64 | /portal/migrations/0007_note.py | 755564f8c5a2e3459cdfe33a6edeb0a0548dbaf1 | [] | no_license | JackSnowdon/JobHunter | 4eb8c5bd2e5cf7c97ca5b29f697e8f95d98a5bb3 | a2c87a6a7b14fd5231b6d99502a638ea702015a4 | refs/heads/master | 2022-12-19T07:27:39.354155 | 2020-10-02T17:32:00 | 2020-10-02T17:32:00 | 297,356,936 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 732 | py | # Generated by Django 3.1.1 on 2020-09-25 15:16
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('portal', '0006_job_last_updated'),
]
operations = [
migrations.CreateModel(
name='Note',
... | [
"[email protected]"
] | |
d932f0e7d08cd74e5251f86ce83becb224158a88 | fdf0b68373e003bd9f4f65e1194e3e79d7e18f4c | /day2/class_property.py | d8071ea3cfd35a66da48ab8039b7eb7fe7b53d08 | [] | no_license | artheadsweden/python_advanced_nov_17 | 79b721077da3ba3bb630fde53832071d4e71c3ae | 20f9d99ba4b996414b36fb0efe7244895b3fd34b | refs/heads/master | 2021-03-24T11:08:43.733521 | 2017-11-22T23:32:23 | 2017-11-22T23:32:23 | 111,556,488 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 396 | py | class P:
def __init__(self, x):
self.x = x
@property
def x(self):
return self.__x
@x.setter
def x(self, x):
if x < 0:
self.__x = 0
elif x > 1000:
self.__x = 1000
else:
self.__x = x
def main():
p = P(5000)
print(p... | [
"[email protected]"
] | |
037b23778dce32e14f051a0ac32f92024cf4db53 | 24fe1f54fee3a3df952ca26cce839cc18124357a | /servicegraph/lib/python2.7/site-packages/acimodel-4.0_3d-py2.7.egg/cobra/modelimpl/rtflt/rule.py | a30362b62695f20e291ad7aa5994ee5f6c75ad0d | [] | no_license | aperiyed/servicegraph-cloudcenter | 4b8dc9e776f6814cf07fe966fbd4a3481d0f45ff | 9eb7975f2f6835e1c0528563a771526896306392 | refs/heads/master | 2023-05-10T17:27:18.022381 | 2020-01-20T09:18:28 | 2020-01-20T09:18:28 | 235,065,676 | 0 | 0 | null | 2023-05-01T21:19:14 | 2020-01-20T09:36:37 | Python | UTF-8 | Python | false | false | 4,052 | py | # coding=UTF-8
# **********************************************************************
# Copyright (c) 2013-2019 Cisco Systems, Inc. All rights reserved
# written by zen warriors, do not modify!
# **********************************************************************
from cobra.mit.meta import ClassMeta
from cobra.m... | [
"[email protected]"
] | |
5eedc1be3759f58a0165ca8beeea10d2d67d05cc | 4bab98acf65c4625a8b3c757327a8a386f90dd32 | /ros2-windows/Lib/site-packages/geometry_msgs/msg/_quaternion.py | 012d2c21882f9d81a43e5720d9d1c8ee58681265 | [] | no_license | maojoejoe/Peach-Thinning-GTRI-Agricultural-Robotics-VIP | e2afb08b8d7b3ac075e071e063229f76b25f883a | 8ed707edb72692698f270317113eb215b57ae9f9 | refs/heads/master | 2023-01-15T06:00:22.844468 | 2020-11-25T04:16:15 | 2020-11-25T04:16:15 | 289,108,482 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,369 | py | # generated from rosidl_generator_py/resource/_idl.py.em
# with input from geometry_msgs:msg\Quaternion.idl
# generated code does not contain a copyright notice
# Import statements for member types
import rosidl_parser.definition # noqa: E402, I100
class Metaclass_Quaternion(type):
"""Metaclass of message 'Qu... | [
"[email protected]"
] | |
2befce3106817fc0f55d94063b2ac6ba3355720f | d8edd97f8f8dea3f9f02da6c40d331682bb43113 | /networks371.py | 69994056fe8fa748472cd893751fdb81bc410798 | [] | no_license | mdubouch/noise-gan | bdd5b2fff3aff70d5f464150443d51c2192eeafd | 639859ec4a2aa809d17eb6998a5a7d217559888a | refs/heads/master | 2023-07-15T09:37:57.631656 | 2021-08-27T11:02:45 | 2021-08-27T11:02:45 | 284,072,311 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,082 | py | import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
__version__ = 205
# Number of wires in the CDC
n_wires = 3606
# Number of continuous features (E, t, dca)
n_features = 3
class Gen(nn.Module):
def __init__(self, ngf, latent_dims, seq_len, encoded_dim):
super().__init__... | [
"[email protected]"
] | |
c79fdf679e8dbf8e013d21dbb90d7bd6b3a07be2 | 84c4474a88a59da1e72d86b33b5326003f578271 | /saleor/graphql/checkout/mutations/checkout_line_delete.py | 68358da32752ad166cc6b8b7cdce9fa3ba1035cd | [
"BSD-3-Clause"
] | permissive | vineetb/saleor | 052bd416d067699db774f06453d942cb36c5a4b7 | b0d5ec1a55f2ceeba6f62cf15f53faea0adf93f9 | refs/heads/main | 2023-07-20T02:01:28.338748 | 2023-07-17T06:05:36 | 2023-07-17T06:05:36 | 309,911,573 | 0 | 0 | NOASSERTION | 2020-11-04T06:32:55 | 2020-11-04T06:32:55 | null | UTF-8 | Python | false | false | 2,754 | py | import graphene
from ....checkout.fetch import fetch_checkout_info, fetch_checkout_lines
from ....checkout.utils import invalidate_checkout_prices
from ....webhook.event_types import WebhookEventAsyncType
from ...core import ResolveInfo
from ...core.descriptions import ADDED_IN_34, DEPRECATED_IN_3X_INPUT
from ...core.... | [
"[email protected]"
] | |
d4077d7a3d2d6d62fed0c16b5ce02065c265119b | ecd25c36474ecf404a32f2f0096b5a6898e4c396 | /python_stack/django/django_fullstack/semi_restful_tvshows/semi_restful_tvshows_app/migrations/0001_initial.py | 68344c74cee04d8e0afc825cf43c38bae81458fc | [] | no_license | matthew-le/Coding_Dojo_Bootcamp | cd7b4aa8e231db372da05a0a5444114b07fbfabf | 6d433d5305d2d8f4ea485206895d8f84bedeb59d | refs/heads/main | 2023-06-13T23:05:23.827556 | 2021-07-23T23:56:35 | 2021-07-23T23:56:35 | 388,947,581 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 650 | py | # Generated by Django 2.2 on 2021-07-11 20:46
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Show',
fields=[
('id', models.AutoField(auto_... | [
"[email protected]"
] | |
b8749e25c58da9a903feb5edc84c2d6ed8ebda67 | 04b1803adb6653ecb7cb827c4f4aa616afacf629 | /third_party/blink/web_tests/external/wpt/bluetooth/generate_test.py | 881f7dbcb73af73b18b447f5cea142f53ba2fd36 | [
"LGPL-2.0-or-later",
"LicenseRef-scancode-warranty-disclaimer",
"LGPL-2.1-only",
"GPL-1.0-or-later",
"GPL-2.0-only",
"LGPL-2.0-only",
"BSD-2-Clause",
"LicenseRef-scancode-other-copyleft",
"BSD-3-Clause",
"MIT",
"Apache-2.0"
] | permissive | Samsung/Castanets | 240d9338e097b75b3f669604315b06f7cf129d64 | 4896f732fc747dfdcfcbac3d442f2d2d42df264a | refs/heads/castanets_76_dev | 2023-08-31T09:01:04.744346 | 2021-07-30T04:56:25 | 2021-08-11T05:45:21 | 125,484,161 | 58 | 49 | BSD-3-Clause | 2022-10-16T19:31:26 | 2018-03-16T08:07:37 | null | UTF-8 | Python | false | false | 1,927 | py | #!/usr/bin/python
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# TODO(50903): Delete the file in LayoutTests/bluetooth after all the tests have
# been migrated to this directory.
"""Test that the set ... | [
"[email protected]"
] | |
f4d3f9c392925ef0d5946029ba07286699ed8e90 | ed30d9b54ad58d2c134b465a3cb4008426aa6a72 | /Transpile/transform_expression.py | 48c255faed874ce20875362dc466e6685e7c4963 | [] | no_license | CaspianA1/S2CPP | b0a026356887f9e0590518db7f242cc8d97530fc | 808c426c2784018efd507b207702494ac85beef1 | refs/heads/master | 2022-12-07T06:50:41.560949 | 2020-09-06T19:56:00 | 2020-09-06T19:56:00 | 287,172,451 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,510 | py | # transform_expression.py
common_ends = {"+": "add", "-": "sub", "*": "mul", "/": "div"}
def function_is_present(function, scheme_expr):
for argument in scheme_expr:
if isinstance(argument, list):
return function_is_present(argument, scheme_expr)
elif argument == function:
return True
def make_c_expr(sche... | [
"[email protected]"
] | |
e07dde273c02119900fb16720a9652c7291bb2e1 | b722b5a07cf9596b251e0148dd4e2358e1174071 | /Intro to CS with Python/src/homework/listing1710.py | 6628163a46b23740dca568e28043d497846523d9 | [] | no_license | p3ngwen/open-notes | 7c894176ece3a1b8c2b1e2b336cdb3099d5d0f67 | 33679b64f5e77289798687337ef7db5503651c21 | refs/heads/master | 2023-07-08T02:43:59.431794 | 2021-08-10T16:34:56 | 2021-08-10T16:34:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 212 | py | import errno
try:
fp = open( "NotAFile" )
fp.close()
except IOError as ex:
if ex.args[0] == errno.ENOENT:
print( "File not found!" )
else:
print( ex.args[0], ex.args[1] ) | [
"[email protected]"
] | |
5a931a1392b981326d9106633ad96940ac2d9671 | 8d5337e7132ae3980bda3bc0ed811207ca79b5b7 | /search/icecreamParlour.py | a61e3f9004182b4836c1f518cb20e678620a38f0 | [] | no_license | thesharpshooter/hackerrank | 16e7c565053a4d36f0a293c0f8af631cee591424 | 2cfec286e71465edd6603f6bcee608c764a086ec | refs/heads/master | 2021-07-11T09:21:57.838631 | 2017-10-06T05:22:31 | 2017-10-06T05:22:31 | 104,779,843 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 775 | py | # Enter your code here. Read input from STDIN. Print output to STDOUT
def get(arr,m,n):
arr = sorted([[arr[i],i] for i in range(n)],key = lambda x :x[0])
i = 0
res = [None,None]
diff = float("inf")
while i < n-1 and arr[i][0] < m:
temp = m-arr[i][0]
j = i+1
while j < n and te... | [
"[email protected]"
] | |
5f86e01d9b34bd9ecb0e5f8495151675c3e1367b | 10bf47e8efe8a6e2eb2e237c5634471ba461483b | /voting/urls.py | 8a998b355a2327ae6453160d9b047e40717c72e5 | [] | no_license | swciitg/IITG_General_Elections | d9d4001fa8b65feabc79284ae1df7d078e089712 | e35e29a1f91e07f3499a5613c091db28b2a07656 | refs/heads/master | 2020-05-06T15:31:00.797537 | 2019-04-08T08:02:41 | 2019-04-08T08:02:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 987 | py | """voting URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.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')
Class-based ... | [
"[email protected]"
] | |
d9f83c10fa19003084ba46e89c00610f56fc49a9 | 9b4fe9c2693abc6ecc614088665cbf855971deaf | /881.boats-to-save-people.py | b1ee51a5ebe9936be3be41a07b61386d05ccc993 | [
"MIT"
] | permissive | windard/leeeeee | e795be2b9dcabfc9f32fe25794878e591a6fb2c8 | 0dd67edca4e0b0323cb5a7239f02ea46383cd15a | refs/heads/master | 2022-08-12T19:51:26.748317 | 2022-08-07T16:01:30 | 2022-08-07T16:01:30 | 222,122,359 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,834 | py | #
# @lc app=leetcode id=881 lang=python
#
# [881] Boats to Save People
#
# https://leetcode.com/problems/boats-to-save-people/description/
#
# algorithms
# Medium (42.90%)
# Total Accepted: 12.4K
# Total Submissions: 28.9K
# Testcase Example: '[1,2]\n3'
#
# The i-th person has weight people[i], and each boat can ca... | [
"[email protected]"
] | |
84d04e0a67a92315abff10fcedcff85bbe31b3a0 | 9a819fc91e17ef9a44e45cf68e76cf696381d06d | /Lambda/canary.py | 03732e914a31ca284fdfaa6e38ee4352ac56a773 | [] | no_license | Gautam3994/Dark-Knight | aef1d6383e0785130db75e80ed40f544a120579e | 327b2d58851a42da1b707addea73e40fac6a61cc | refs/heads/master | 2022-12-01T11:58:39.857379 | 2020-09-05T18:07:51 | 2020-09-05T18:07:55 | 203,866,327 | 0 | 1 | null | 2022-11-24T09:16:18 | 2019-08-22T20:14:43 | Python | UTF-8 | Python | false | false | 598 | py | import requests
import os
import datetime
SITE = os.environ['site']
EXPECTED = os.environ['expected']
def validate(res):
return EXPECTED in res
def lambda_handler(event, context):
print(f"Test the site{SITE} at the time {event['time']}")
response = requests.get(url="https://www.amazon.in", headers={'Us... | [
"[email protected]"
] | |
3159b23be1a8a592afc5451129094bdd839623f7 | 34f6120035bfea1f675eb5dd98d59e81209d5c5e | /h2o-py/tests/testdir_algos/gbm/pyunit_weights_var_impGBM.py | 7ea27aa39c4127b00f5a8f9a0451c30aaf0009ea | [
"Apache-2.0"
] | permissive | Pure-Mind/h2o-3 | f5b5b0bf3d2856fee0719adf2754c1af719e5950 | 508ad0e28f40f537e906a372a2760ca6730ebe94 | refs/heads/master | 2021-01-17T22:56:02.372211 | 2015-08-09T02:52:34 | 2015-08-09T03:31:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,163 | py | import sys
sys.path.insert(1, "../../../")
import h2o
import random
def weights_var_imp(ip,port):
# Connect to h2o
h2o.init(ip,port)
def check_same(data1, data2, min_rows_scale):
gbm1_regression = h2o.gbm(x=data1[["displacement", "power", "weight", "acceleration", "year"]],
... | [
"[email protected]"
] | |
5a792baad7875ecfd9cb09eb33eff687dbab1295 | 1699300e1225f0994fbfd5e13a7eb4436a5df14d | /03_SC_Track/02_Original_V_624_Joho/Make_SLURM_submission_script.py | 6ff6b2d5f59e75247f2e258efde560ac32922702 | [
"MIT"
] | permissive | HaroonRafique/PyORBIT_MD4224 | 26307a60ed79f3e170fbd655eb8cbe8cc9a0dfa9 | 6f68a80b2f8bf1cbeb9e2fc840925efe8a8b5672 | refs/heads/master | 2023-04-25T13:27:49.756836 | 2020-08-25T10:26:07 | 2020-08-25T10:26:07 | 215,249,664 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,313 | py | #!/usr/bin/env python
# Python script to create a SLURM submission script for PyORBIT
# 21 March 2019 Haroon Rafique CERN BE-ABP-HSI
import os
#-----------------------------------------------------------------------
# SETTINGS
#-----------------------------------------------------------------------
script_name =... | [
"[email protected]"
] | |
1beabcb56dd1176bcf5845a34ee13550fc79898d | 6a612dba404176b7e180dfb2791353701c82a3bf | /processors/backsubtractors.py | bce6b46663e1146affff7a04f9cff7a61ad6f29c | [] | no_license | tulare/smile-in-the-light | d15a3e142974a055215b3eb9ac8dd1e5e57fdb1e | 1250579f015fa4cb8c4593976e27579e5ed5515d | refs/heads/master | 2020-05-27T07:57:29.617680 | 2019-06-26T10:31:39 | 2019-06-26T10:31:39 | 188,537,874 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 943 | py | # -*- encoding: utf8 -*-
import cv2 as cv
import numpy as np
from .core import FrameProcessor
__all__ = [ 'BackgroundSubtractor' ]
# ------------------------------------------------------------------------------
OPENCV_BACKSUB_ALGOS = {
'MOG2' : cv.createBackgroundSubtractorMOG2,
'KNN' : cv.createBackgroun... | [
"[email protected]"
] | |
8c4480388e7fa8726898f73420d2f3df40bbf8a5 | d5f2723c879e28d1bfded4bea3c4d327a6d8c4e5 | /03_Visualizing_Data/3_histogram.py | 4ce05d1953f447a9609544f396aa265152f8f6a8 | [
"Unlicense"
] | permissive | ramalho/data-science-from-scratch | 709adb2bbef280c10edad4bdc2eb3d2a997d5e79 | 46ead47912c4a0a945decdded1999a8a4cd67b57 | refs/heads/master | 2020-12-30T23:46:40.147841 | 2017-01-28T01:01:54 | 2017-01-28T01:01:54 | 80,624,463 | 2 | 0 | null | 2017-02-01T13:52:20 | 2017-02-01T13:52:20 | null | UTF-8 | Python | false | false | 964 | py | #!/usr/bin/env python3
"""Figure 3-3. Using a bar chart for a histogram"""
import matplotlib.pyplot as plt
from collections import Counter
def make_chart_histogram():
grades = [83,95,91,87,70,0,85,82,100,67,73,77,0]
decile = lambda grade: grade // 10 * 10
histogram = Counter(decile(grade) for grade in g... | [
"[email protected]"
] | |
9096829dbf0ff0e9494f24cf8e1132798e9fa9fa | cf6a50732d708a3a3db0f297b73cb6f449a00b44 | /Practice13_LoopingTechniques/Prac_13_13_change_code.py | 9a157c3b996983c6bd0817e18f131585525f2a57 | [] | no_license | subash319/PythonDepth | 9fe3920f4b0a25be02a9abbeeb60976853ab812e | 0de840b7776009e8e4362d059af14afaac6a8879 | refs/heads/master | 2022-11-16T03:03:56.874422 | 2020-07-17T01:19:39 | 2020-07-17T01:19:39 | 266,921,459 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 568 | py | # 13.
#
# data = [2,3,1,4,7,5]
# max_even = 0
# for item in data:
# if item%2==0 and item>max_even:
# max_even = item
# print(f'Largest even number is {max_even}')
# In this for loop, we are iterating over the items of a list and finding the largest even number.
#
# Make changes in this code so that you get th... | [
"[email protected]"
] | |
d0093035d3098ebaa03f79ae3da3b4850586ba93 | 487ce91881032c1de16e35ed8bc187d6034205f7 | /codes/CodeJamCrawler/16_0_1_neat/16_0_1_yordan_main.py | f1df87f60260bd9647255e67663f6aa609dbebc2 | [] | 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 | 884 | py | #!/usr/bin/env python
import sys
def digits(x):
x = abs(x)
d = []
while x:
d.append(x % 10)
x //= 10
return d or [0]
def gen(x):
i = 1
while 1:
yield x * i
i += 1
def read_input(f):
N = int(f.readline())
inputs = []
for line in f:
inputs... | [
"[[email protected]]"
] | |
5d4c4aa85a2d9cdec40ea80181cfef2bfb26c1ec | a6e4a6f0a73d24a6ba957277899adbd9b84bd594 | /sdk/python/pulumi_azure_native/appconfiguration/get_private_endpoint_connection.py | f7cc2cd97bd2658bf9e3e438d054acac99b5aaaf | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | MisinformedDNA/pulumi-azure-native | 9cbd75306e9c8f92abc25be3f73c113cb93865e9 | de974fd984f7e98649951dbe80b4fc0603d03356 | refs/heads/master | 2023-03-24T22:02:03.842935 | 2021-03-08T21:16:19 | 2021-03-08T21:16:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,437 | py | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from .. import _utilities, _tables
from ... | [
"[email protected]"
] | |
f9b5b697037e33f9f12b027bc0b5b2c9630275de | 18d223e5ea590e60bc791987034276eed2651721 | /sk1-tt/lesson2-data-processing/c4-unsupervised-learning/c42_feature_agglomerative.py | 51862d664f81bccb84812f300309511d5d5b2662 | [] | no_license | sonicfigo/tt-sklearn | 83b419b4f8984fc63ef41bf2af5b682477350992 | 8e473e958b0afc6154ba3c4dee818fd4da8f504b | refs/heads/master | 2020-03-26T16:07:59.758723 | 2018-09-25T06:28:47 | 2018-09-25T06:28:47 | 145,084,325 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,611 | py | # coding=utf-8
"""
之前用过的lasso, 用到了 sparsity 技术,可以用来解决 curse of dimensionality 问题
另一种办法:feature agglomeration, 特征聚集(对feature聚类,注意区别直接对data聚类的阶层式聚类)
正常的聚类
是根据feature,对data聚类
feature agglomeration
是数据转置,对feature进行聚类
"""
import numpy as np
import matplotlib.pyplot as plt
from sklearn import datasets, cluster
fr... | [
"[email protected]"
] | |
5419f9bd1ab6510ad576878fcae58ddc84a24b7c | 1a114943c92a5db40034470ff31a79bcf8ddfc37 | /stdlib_exam/os-path-expandvars-example-1.py | b2b9b437176caf6eedbc4bca41e3855d1d665823 | [] | no_license | renwl/mylinux | 1924918599efd6766c266231d66b2a7ed6f6cdd1 | 0602fc6d2b0d254a8503e57310f848fc3e1a73b4 | refs/heads/master | 2020-07-10T22:12:03.259349 | 2017-01-02T12:32:04 | 2017-01-02T12:32:04 | 66,467,007 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 167 | py | import os
os.environ["USER"] = "user"
print os.path.expandvars("/home/$USER/config")
print os.path.expandvars("$USER/folders")
## /home/user/config
## user/folders
| [
"[email protected]"
] | |
f29d9ae762e6121f945faa8462bdcac0b729d598 | 9b422078f4ae22fe16610f2ebc54b8c7d905ccad | /xlsxwriter/test/vml/test_write_fill.py | 27a23de9f742660fba4a29b9a6d8916f3102aaa4 | [
"BSD-2-Clause-Views"
] | permissive | projectsmahendra/XlsxWriter | 73d8c73ea648a911deea63cb46b9069fb4116b60 | 9b9d6fb283c89af8b6c89ad20f72b8208c2aeb45 | refs/heads/master | 2023-07-21T19:40:41.103336 | 2023-07-08T16:54:37 | 2023-07-08T16:54:37 | 353,636,960 | 0 | 0 | NOASSERTION | 2021-04-01T08:57:21 | 2021-04-01T08:57:20 | null | UTF-8 | Python | false | false | 993 | py | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2021, John McNamara, [email protected]
#
import unittest
from ...compatibility import StringIO
from ...vml import Vml
class TestWriteVfill(unittest.TestCase):
"""
Test the Vml _w... | [
"[email protected]"
] | |
6b249119fe1fb273f634b04060a01fd3b1d39ab2 | 74091dce735f281188d38d2f00d1a68e1d38ff7a | /des_pattern/solid/open_closed_products.py | 580caa39d9c24cf86d03055117d399a49d6ebe4b | [] | no_license | nbiadrytski-zz/python-training | 96741aa0ef37bda32d049fde5938191025fe2924 | 559a64aae2db51e11812cea5ff602f25953e8070 | refs/heads/master | 2023-05-07T04:08:23.898161 | 2019-12-10T12:12:59 | 2019-12-10T12:12:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,252 | py | from enum import Enum
from abc import ABCMeta, abstractmethod
# Open Closed:
# A class should be open for extension (usually by inheritance), but closed for modification
# which means it's not a good idea to change smth that is already properly working,
# but it's better to extend the functionality in a new class
c... | [
"[email protected]"
] | |
a14bb37817d7bb4c8f4df5839311ba45d1fd581c | b30e399b7d687833126ebe4f5c8dd4ab49e2a5e7 | /tests/test_create_user.py | 3d1601cc2571d55b5034d477d3adc11f4ceda8fd | [] | no_license | riquellopes/desafio-python | ccd43101403349e5103499a59136c2e00d67d9af | f512923b7f4b0fa6f092f31693d4480a241849aa | refs/heads/master | 2021-01-17T17:16:28.486179 | 2016-10-10T12:40:22 | 2016-10-10T12:40:22 | 70,359,863 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,669 | py | import json
def test_should_be_returned_a_valid_dict(test_client, mocker):
os = mocker.patch("app.models.os")
os.environ.get.return_value = "desafio_python"
data = {
"name": "João da Silva",
"email": "[email protected]",
"password": "hunter2",
"phones": [{"number": "987654321... | [
"[email protected]"
] | |
a95da837fce67b1869d7911c2f64fee0ab6ed7c8 | ee8c4c954b7c1711899b6d2527bdb12b5c79c9be | /assessment2/amazon/run/core/controllers/file.py | 61d9b400b2ea8cc711774fd99be3523dd691a551 | [] | no_license | sqlconsult/byte | 02ac9899aebea4475614969b594bfe2992ffe29a | 548f6cb5038e927b54adca29caf02c981fdcecfc | refs/heads/master | 2021-01-25T14:45:42.120220 | 2018-08-11T23:45:31 | 2018-08-11T23:45:31 | 117,135,069 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 362 | py | #!/usr/bin/env python3
from flask import Blueprint, Flask, render_template, request, url_for
controller = Blueprint('file', __name__, url_prefix='/file')
# @controller.route('/<string:title>', methods=['GET'])
# def lookup(title):
# if title == 'Republic': # TODO 2
# return render_template('republic.ht... | [
"[email protected]"
] | |
a116dd620bfbb78a14a50120bf42574e606bcb13 | 13d222bc3332378d433835914da26ed16b583c8b | /tests/challenge22/test_challenge22.py | 4c076071ad9cc1c5e1409177a3652cf2a89fe86f | [] | no_license | mattjhussey/pemjh | c27a09bab09cd2ade31dc23fffac07374bea9366 | 2ebb0a525d2d1c0ee28e83fdc2638c2bec97ac99 | refs/heads/master | 2023-04-16T03:08:59.390698 | 2023-04-08T10:54:00 | 2023-04-08T10:54:00 | 204,912,926 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 433 | py | """ Tests for challenge22 """
from os.path import abspath, dirname, join
from robber import expect
from pemjh.challenge22 import main
def test_challenge22():
""" Regression testing challenge22 """
name_path = join(dirname(abspath(__file__)), 'names.txt')
with open(name_path, 'r') as name_file:
... | [
"[email protected]"
] | |
882eec1a180e7b4c69a1f2fb3cb0584d6a0baf0e | 3f554f2e0ef235d93ecbcbbb2e21132f15ef12fd | /venv/Scripts/easy_install-3.7-script.py | 68156d82a29ee68c2cabcd729c8d29ce9a4302ae | [] | no_license | sanii-muthui/password_locker | 189bb72389734cf59b11f27cf0c71d8d9dc4685a | b82ac4e87cc3301827d744f5e346a2737a959262 | refs/heads/master | 2022-01-09T08:04:37.240307 | 2019-07-22T09:56:20 | 2019-07-22T09:56:20 | 198,190,108 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 458 | py | #!C:\Users\sanii\Desktop\password_locker\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==40.8.0','console_scripts','easy_install-3.7'
__requires__ = 'setuptools==40.8.0'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw... | [
"[email protected]"
] | |
636f08c92eda47b8eba96db768288a07393f0e21 | c54f5a7cf6de3ed02d2e02cf867470ea48bd9258 | /pyobjc/PyOpenGL-2.0.2.01/src/shadow/GL.EXT.separate_specular_color.0001.py | f61d2a53884bbcb6d4af41077bbd00d3c40380d1 | [] | no_license | orestis/pyobjc | 01ad0e731fbbe0413c2f5ac2f3e91016749146c6 | c30bf50ba29cb562d530e71a9d6c3d8ad75aa230 | refs/heads/master | 2021-01-22T06:54:35.401551 | 2009-09-01T09:24:47 | 2009-09-01T09:24:47 | 16,895 | 8 | 5 | null | null | null | null | UTF-8 | Python | false | false | 1,857 | py | # This file was created automatically by SWIG.
# Don't modify this file, modify the SWIG interface instead.
# This file is compatible with both classic and new-style classes.
import _separate_specular_color
def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
if (name == "this"):
if isinstan... | [
"ronaldoussoren@f55f28a5-9edb-0310-a011-a803cfcd5d25"
] | ronaldoussoren@f55f28a5-9edb-0310-a011-a803cfcd5d25 |
bb7116e666e458d7ef6f117d052ae161ef3c4f90 | 94b29d5cd65e5783692af9896ea9c983cf182c2f | /tests/utilities/test_apply_func_torchtext.py | ae919668a77ea9363c816014f05272341ca6622e | [
"Apache-2.0"
] | permissive | Programmer-RD-AI/pytorch-lightning | 5d4ab64a887d0ac7d47987241a3213ae59840616 | 02a675241c826d7720c7e15d6fda3f5da0b28116 | refs/heads/master | 2023-08-15T22:04:53.632338 | 2021-10-17T13:47:24 | 2021-10-17T13:47:24 | 413,277,562 | 3 | 0 | Apache-2.0 | 2021-10-04T04:49:55 | 2021-10-04T04:49:55 | null | UTF-8 | Python | false | false | 2,651 | py | # Copyright The PyTorch Lightning team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | [
"[email protected]"
] | |
79321ece6462d20918c9ef544c17a191895225db | 8bb3bcf914860c20fb4a7163a8e0691cd802dd65 | /src/vsc/model/coverpoint_bin_single_val_model.py | 2c3d70c1f5e7480e7a886bb90d2225f0d2d90df9 | [
"Apache-2.0"
] | permissive | nitinm694/pyvsc | 8586cc2497f336289fecbfeb9e6dd788f4070b60 | 612de9e6244c685a3df1972e4860abfe35b614e1 | refs/heads/master | 2023-07-28T01:49:10.917496 | 2021-09-12T19:06:00 | 2021-09-12T19:06:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,961 | py |
# Created on Mar 20, 2020
#
# @author: ballance
from vsc.model.bin_expr_type import BinExprType
from vsc.model.coverpoint_bin_model_base import CoverpointBinModelBase
from vsc.model.expr_bin_model import ExprBinModel
from vsc.model.expr_literal_model import ExprLiteralModel
from vsc.model.rangelist_model import Rang... | [
"[email protected]"
] | |
20891c001bfbe780b1f4865470d6788401eefa16 | ce196aba0adde47ea2767eae1d7983a1ef548bb8 | /求n,m的最小公倍数.py | 8ff00c68cb9f7a31cebbfb654fe4a258fce95226 | [] | no_license | xiang-daode/Python3_codes | 5d2639ffd5d65065b98d029e79b8f3608a37cf0b | 06c64f85ce2c299aef7f9311e9473e0203a05b09 | refs/heads/main | 2023-08-30T14:59:55.123128 | 2021-11-03T05:12:24 | 2021-11-03T05:12:24 | 333,632,892 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 296 | py | # 计算n,m的最小公倍数
def gbs(x,y):
if x>y:
z=y
else:
z=x
f=1
for i in range(z-1,2,-1):
if(x%i==0 and y%i==0):
f=f*i
x=x/i
y=y/i
f=f*x*y
print(f)
n=int(input())
m=int(input())
gbs(n,m) | [
"[email protected]"
] | |
3d6ade2c6dbc770b827d650cd0b41c4c9c3b901e | d9ccb2b8e549a594bf06868391481ea8669786ea | /migrations/versions/9320d2f7765b_add_source_file.py | c10af5965a24672f6ca7c873edbb88c525eefb10 | [
"Apache-2.0"
] | permissive | clld/dogonlanguages | 00dd3895dffbb99c048f0d0a8970d6cd4199ff5c | 2b0b510e853b77c9e356a9c73142401afc93b04a | refs/heads/master | 2022-12-13T02:33:10.590590 | 2022-12-02T08:34:24 | 2022-12-02T08:34:24 | 25,243,999 | 1 | 2 | Apache-2.0 | 2021-12-07T13:25:46 | 2014-10-15T07:39:00 | Python | UTF-8 | Python | false | false | 858 | py | # coding=utf-8
"""add source file
Revision ID: 9320d2f7765b
Revises: 1770d17056aa
Create Date: 2017-05-05 09:58:20.128175
"""
from alembic import op
from clld.db.migration import Connection
from clld.db.models.common import Source, Source_files
# revision identifiers, used by Alembic.
revision = '9320d2f7765b'
do... | [
"[email protected]"
] | |
e5a27eaa219e0fde7041e68c4eb80d954a19f87a | 66c6f9a24c9a1f912e93f96b439b81a10cffac77 | /test/vanilla/Expected/AcceptanceTests/BodyBoolean/bodyboolean/__init__.py | 9582ec858066aa9339d3ef1d5f01d189ad7214ef | [
"MIT",
"LicenseRef-scancode-generic-cla"
] | permissive | kairu-ms/autorest.python | 5dd0e8bf2ebf0c0dc148342003899fabd269f946 | 20870e3870fcfeae9567b63343d2320bf388f3c6 | refs/heads/master | 2023-04-29T23:00:50.568945 | 2020-01-17T18:03:00 | 2020-01-17T18:03:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 737 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | [
"[email protected]"
] | |
2435d771630538e9959dd54e81aaf11fc02774d0 | 87b7ec1af5bde5aa46f1982008aecec00ca00c1d | /conf.py | 027ac88796a93502408f1ac60968deead521e278 | [
"MIT"
] | permissive | kattni/Adafruit_CircuitPython_VS1053 | ca656e64a83f74e398bbc0ad21d8c9fd27614270 | 20d5ac7f71117b8bdd4db75678ce98e3a6b19e49 | refs/heads/master | 2020-03-31T09:50:02.930951 | 2018-10-09T01:39:32 | 2018-10-09T01:39:32 | 152,112,523 | 0 | 0 | null | 2018-10-08T16:34:31 | 2018-10-08T16:34:31 | null | UTF-8 | Python | false | false | 4,600 | py | # -*- coding: utf-8 -*-
import os
import sys
sys.path.insert(0, os.path.abspath('.'))
# -- General configuration ------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensi... | [
"[email protected]"
] | |
529a5ab95bf0f23e3253b65c5eec0ee18fc952aa | 0455b5da2b6bc9fad7b92f6b99005a8c81cdda97 | /emiratesnbd/items.py | 9d273557032c6fd1404c5a4aab8e83a35ed96782 | [] | no_license | hristo-grudev/emiratesnbd | da22bf3f3023f5bd6b9e230a4df3da5ab61d509c | 48494986f0ed44b15cc1b7b1a425a4d65582cf1f | refs/heads/main | 2023-04-15T00:59:31.067111 | 2021-04-22T06:28:13 | 2021-04-22T06:28:13 | 360,414,897 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 138 | py | import scrapy
class EmiratesnbdItem(scrapy.Item):
title = scrapy.Field()
description = scrapy.Field()
date = scrapy.Field()
| [
"[email protected]"
] | |
4be32626ca67e776aca8f11478838d70d8e803bb | 5afd733a5c1f753601c69b8b4eae1b49edfbae7c | /201-300/282.py | f1575add29bfe60cd0d5c53e27f8449440e6ebb0 | [] | no_license | yanbinbi/leetcode | 9dcd4a0160be915006455b83d6b7cd39e9819811 | 616a868bfa7bdd00195067b0477b0236a72d23e0 | refs/heads/master | 2021-05-13T19:34:17.222576 | 2017-11-12T02:04:31 | 2017-11-12T02:04:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,279 | py | class Solution(object):
def addOperators(self, num, target):
"""
:type num: str
:type target: int
:rtype: List[str]
"""
self.ret =set()
self.dfs(num, [], target)
return list(self.ret)
def dfs(self, num, arr, target):
size = len(num... | [
"[email protected]"
] | |
9d13794ae4997422a14e76c2f9e828ff273b8e4e | 5537eec7f43098d216d2b550678c8d10b2a26f09 | /venv/ansible/lib/python2.7/site-packages/azure/batch/models/task_scheduling_policy.py | 220faadb2936c714ded099065c8ed5afe1731434 | [] | no_license | wipro-sdx/Automation | f0ae1512b8d9d491d7bacec94c8906d06d696407 | a8c46217d0fbe51a71597b5db87cbe98ed19297a | refs/heads/master | 2021-07-08T11:09:05.314435 | 2018-05-02T07:18:54 | 2018-05-02T07:18:54 | 131,812,982 | 0 | 1 | null | 2020-07-23T23:22:33 | 2018-05-02T07:15:28 | Python | UTF-8 | Python | false | false | 1,183 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# C... | [
"[email protected]"
] | |
e00c4b648f1a238bca577a041f426ddc93bae731 | b01429f27f8d7f4db7e3eba0abbb6be1ea67e2fa | /imageimage1.2/langage.py | dc64ee7d7051ab678f89b67c5e801ac667c1855a | [] | no_license | pastrouveedespeudo/ste-fois-c-la-bonne | 3dce8cdfc6b5523d9651e8ec9a143b7ab7789d21 | 9872c35423870c9854ee0bda120cca0c832c1fc9 | refs/heads/master | 2020-04-20T22:08:34.295196 | 2019-02-17T17:18:36 | 2019-02-17T17:18:36 | 169,129,734 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,165 | py | from mémoire import *
from outils_fichier import *
from politesse import *
from outils_internet import *
#Regle
#ne seront maqué que les truk importants
#dans mémoire str.find la liste, si ya pas on ajoute fais le
#ca fait ia
class langage:
def début1(self):
#début1(self, oIn... | [
"[email protected]"
] | |
b04ed6d55babef029018dcc05dcb6afed7e6ad71 | 0dc27aeb342b9b898256adf256c5b77a666e68fb | /lm386/codes/coeffs.py | f505630bc52bdbb325464e11d00650e33c721eb4 | [] | no_license | gadepall/EE2230 | 7861b898d90abf04b935cb77b31f2c70e290b096 | 739b01d8f5da93cc5c38121e62ea6d9e87851146 | refs/heads/master | 2020-03-25T20:25:57.885565 | 2019-10-06T01:57:13 | 2019-10-06T01:57:13 | 144,130,660 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,010 | py | import numpy as np
def dir_vec(A,B):
return B-A
def norm_vec(A,B):
return omat@dir_vec(A,B)
#Generate line points
def line_gen(A,B):
len =10
x_AB = np.zeros((2,len))
lam_1 = np.linspace(0,1,len)
for i in range(len):
temp1 = A + lam_1[i]*(B-A)
x_AB[:,i]= temp1.T
return x_AB
... | [
"[email protected]"
] | |
6f9f7154c397d558289889cac3d1ff8b7cb8991b | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/otherforms/_upstarts.py | a99715c49d6b20f79507a7ced2a14b39179cb8bc | [
"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 | 226 | py |
#calss header
class _UPSTARTS():
def __init__(self,):
self.name = "UPSTARTS"
self.definitions = upstart
self.parents = []
self.childen = []
self.properties = []
self.jsondata = {}
self.basic = ['upstart']
| [
"[email protected]"
] | |
0cb85670c7ca2f434db6351d257e24ca060fa7f1 | de24f83a5e3768a2638ebcf13cbe717e75740168 | /moodledata/vpl_data/380/usersdata/341/93264/submittedfiles/principal.py | 6cda24a7d78aabf878f6abdc614407b80d6ddb97 | [] | 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 | 276 | py | # -*- coding: utf-8 -*-
#COMECE AQUI ABAIXO
n=int(input('Digite a quantidade de notas: '))
notas = []
for i in range (0,n,1):
notas.append(float(input('Digite a nota%d: ' % (i+1))))
media=0
for i in range (0,n,1):
media += notas[i]/n
print(notas[i])
print(media)
| [
"[email protected]"
] | |
279efe43b1dbd7cc075bd5b7c93df9bcdff1d52d | b5e93a09ee136b2b035c9958557e3e4091d8d9fd | /horch/models/attention.py | d13ba6fb39ab10e20773465ea90474516517c923 | [
"MIT"
] | permissive | ccglyyn/pytorch-hrvvi-ext | 2ee0cd27461c344783150535fbadea5fbe29f25b | a020da3543982464ff3888ff84b311e98a130d6d | refs/heads/master | 2022-04-20T13:35:07.561985 | 2020-04-21T10:36:36 | 2020-04-21T10:36:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,883 | py | import torch
from horch.models.modules import Conv2d, HardSigmoid, Identity
from torch import nn as nn
from torch.nn import functional as F
class SEModule(nn.Module):
def __init__(self, in_channels, reduction=8):
super().__init__()
channels = in_channels // reduction
self.pool = nn.Adaptiv... | [
"[email protected]"
] | |
f9939dba69a49fcceaa92a28b7e0708a772e5a5d | 51891febfc6247af3fe5c39b3063d1f1995a0173 | /src/scatter3d_demo.py | 50e8fbaac07658778552197aa7e1ff424f28fe21 | [] | no_license | jim1949/car_controller | 4ab391eef29e46563853bc3d54a06a6c4a0714c4 | f2053ddde429dbdef39261d24197f3bc7936166f | refs/heads/master | 2020-12-25T14:23:37.339889 | 2016-09-13T09:55:07 | 2016-09-13T09:55:07 | 67,448,480 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,068 | py | # import numpy as np
# from mpl_toolkits.mplot3d import Axes3D
# import matplotlib.pyplot as plt
# # def randrange(n, vmin, vmax):
# # return (vmax - vmin)*np.random.rand(n) + vmin
# # fig = plt.figure()
# # ax = fig.add_subplot(111, projection='3d')
# # n = 100
# # for c, m, zl, zh in [('r', 'o', -50, -25), ('b... | [
"[email protected]"
] | |
1891a0d48660d0b40e0a7143031cddabaaaca6d6 | c1267fbec95318184e7388cddf9b7085f797d514 | /2023/03 March/db03242023.py | c6859abc43ce48d34df3d2d5d2e620c5251009bd | [
"MIT"
] | permissive | vishrutkmr7/DailyPracticeProblemsDIP | 1aedfd2e173847bf22989a6b0ec550acebb2bd86 | 2c365f633a1e1bee281fbdc314969f03b17ac9ec | refs/heads/master | 2023-05-31T23:49:52.135349 | 2023-05-28T09:32:12 | 2023-05-28T09:32:12 | 199,596,248 | 10 | 4 | MIT | 2022-11-02T21:31:59 | 2019-07-30T07:12:46 | Python | UTF-8 | Python | false | false | 563 | py | """
Given positive an integer num, return whether or not it is a perfect square.
Ex: Given the following num...
num = 9, return true.
Ex: Given the following num...
num = 18, return false.
"""
class Solution:
def isPerfectSquare(self, num: int) -> bool:
r = num
while r**2 > num:
r ... | [
"[email protected]"
] | |
8295157610a4f2105ed98d1ae6239095adf384e2 | a2d36e471988e0fae32e9a9d559204ebb065ab7f | /huaweicloud-sdk-vpcep/huaweicloudsdkvpcep/v1/model/update_endpoint_service_request_body.py | 3bc8d522210d8b68191c685c6dd1771204d35e22 | [
"Apache-2.0"
] | permissive | zhouxy666/huaweicloud-sdk-python-v3 | 4d878a90b8e003875fc803a61414788e5e4c2c34 | cc6f10a53205be4cb111d3ecfef8135ea804fa15 | refs/heads/master | 2023-09-02T07:41:12.605394 | 2021-11-12T03:20:11 | 2021-11-12T03:20:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,291 | py | # coding: utf-8
import re
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class UpdateEndpointServiceRequestBody:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (... | [
"[email protected]"
] | |
aa044018408c1b28331bd6260ab341a84fc5a936 | bc167f434158921bcf2c678155c5cdfec1c9b0c9 | /PI_code/simulator/behaviourGeneration/buildBehaviour.py~ | 61fb21ba3d039ecacb623931e2bf58e4efd62509 | [] | no_license | s0217391/DifferentProjects | 6450efc89c64ecd21b86c705737e89e5c69433a6 | 7f4da153660817b6cbf72d2e823aa29c0c2f95a9 | refs/heads/master | 2021-01-17T02:58:46.219240 | 2015-05-26T22:45:46 | 2015-05-26T22:45:46 | 34,995,164 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 687 | #!/usr/bin/python
import sys
import expressionBuilder as eb
def writeLine(f, st = '', tabs = 0):
result = ""
for i in range(tabs):
result = result + " "
result = result + st
f.write(result)
f.write('\n')
def startFile(f):
writeLine(f, '#!/usr/bin/python');
writeLine(f, 'import sys');
writeLine(f)
writeLin... | [
"[email protected]"
] | ||
716b5557af847737363d572821718326db017f6c | e2e9ae72910dd29877de026866a6f13335815ca6 | /prml/kernels/kernel.py | 03ad8127e24cddaca11a6e7edd0c46a111d14bf3 | [] | no_license | zshwuhan/PRML | b39f09e14cd1169ff44e7299b8adfdd3aea2f94d | 497d985f6387fc31d5fe861533cb333e06f80469 | refs/heads/master | 2021-05-14T23:40:27.351492 | 2017-09-21T12:48:46 | 2017-09-21T12:48:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 540 | py | import numpy as np
class Kernel(object):
def _pairwise(self, x, y):
"""
all pairs of x and y
Parameters
----------
x : (sample_size, n_features)
input
y : (sample_size, n_features)
another input
Returns
-------
outp... | [
"[email protected]"
] | |
82461d66890b1704b59ea9a59d8c4729e2e080b8 | f085af63a93cb12feca75a3d9e855c3373d2b78e | /dynamic_programming/longest_nondecreasing_subsequence_length.py | ec8cd8dc441a12123420e33dfbc9572f6318d970 | [] | no_license | zjxpirate/Daily-Upload-Python | 9542f1a3491ac5c843bc80266523bc06c37be20e | d5efcfdaf7e632e1f0cb8b21c505c0c0a5325eb0 | refs/heads/master | 2020-04-03T08:10:55.667410 | 2019-06-27T01:15:36 | 2019-06-27T01:15:36 | 155,124,951 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 498 | py |
# 15. find the longest nondecreasing subsequence
list1 = [0, 8, 4, 12, 2, 10, 6, 14, 1, 9]
def longest_nondecreasing_subsequence_length(A):
# max_length[i] holds the length of the longest nondecreasing subsequence of A[:i + 1].
max_length = [1] * len(A)
for i in range(1, len(A)):
max_length[i] ... | [
"[email protected]"
] | |
2482542d358ddfb289a586947cba5d91d129a318 | f445450ac693b466ca20b42f1ac82071d32dd991 | /generated_tempdir_2019_09_15_163300/generated_part007021.py | 2025aafae69c6640949ff7fe65450879584c3cdd | [] | no_license | Upabjojr/rubi_generated | 76e43cbafe70b4e1516fb761cabd9e5257691374 | cd35e9e51722b04fb159ada3d5811d62a423e429 | refs/heads/master | 2020-07-25T17:26:19.227918 | 2019-09-15T15:41:48 | 2019-09-15T15:41:48 | 208,357,412 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,300 | py | from sympy.abc import *
from matchpy.matching.many_to_one import CommutativeMatcher
from matchpy import *
from matchpy.utils import VariableWithCount
from collections import deque
from multiset import Multiset
from sympy.integrals.rubi.constraints import *
from sympy.integrals.rubi.utility_function import *
from sympy.... | [
"[email protected]"
] | |
617571ece63ec1c75aaac8ba508201a4956ff656 | ce741ade3d7ebfc64cf2736358f6e77b06168830 | /apps/users/models.py | 548f619885ca2197b733f8ec22122e00804d4162 | [] | no_license | Erick-LONG/MxShop | 798a1ce4eb557973732ee6206640bdf9a247216b | 783e5d66a4d49b3eceb3eb6d7c729fcfa69742cb | refs/heads/master | 2021-04-03T08:31:41.588749 | 2018-03-22T04:01:46 | 2018-03-22T04:01:46 | 124,395,167 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,238 | py | from datetime import datetime
from django.db import models
from django.contrib.auth.models import AbstractUser
# Create your models here.
class UserProfile(AbstractUser):
'''用户'''
name = models.CharField(max_length=30,null=True,blank=True,verbose_name='姓名')
birthday = models.DateField(null=True,blank=Tru... | [
"[email protected]"
] | |
60f10d228169389471da351b6d96d2bffe92e6f0 | 2d27360e2038546a38746912fa75dbde8667ee61 | /make_dogC.py | cc4a3b7215091b543f863bdc11c36a5f125ffa5e | [
"MIT"
] | permissive | matteoferla/DogCatcher | 234353eb0e2f8177e59314e62d901b13bed1a265 | ff7edb88b73aa0585d8f6528ccfc22939c934fb5 | refs/heads/master | 2023-05-07T18:16:58.632024 | 2021-06-02T07:23:35 | 2021-06-02T07:23:35 | 257,064,986 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,538 | py | from model_maker import Catcher, pyrosetta
import json
pymol = pyrosetta.PyMOLMover()
dogC = Catcher(lyx=9, asx=121, glh=70, asx_type='ASN', cut_resi=105, other_res=['WAT'],
params_folder='params',
iso_constraint_file='constraints/iso.dogC.cst',
trans_constraint_file='const... | [
"[email protected]"
] | |
e0d8b0932a51cce603529841b3292b2ad1ba6353 | 38c10c01007624cd2056884f25e0d6ab85442194 | /chrome/browser/resources/settings/controls/compiled_resources.gyp | 75cbbb52ea0a4979d02b08222e3564aa9cac2829 | [
"BSD-3-Clause"
] | permissive | zenoalbisser/chromium | 6ecf37b6c030c84f1b26282bc4ef95769c62a9b2 | e71f21b9b4b9b839f5093301974a45545dad2691 | refs/heads/master | 2022-12-25T14:23:18.568575 | 2016-07-14T21:49:52 | 2016-07-23T08:02:51 | 63,980,627 | 0 | 2 | BSD-3-Clause | 2022-12-12T12:43:41 | 2016-07-22T20:14:04 | null | UTF-8 | Python | false | false | 1,932 | gyp | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'targets': [
{
'target_name': 'settings_checkbox',
'variables': {
'depends': [
'../../../../../ui/webui/resources/js/com... | [
"[email protected]"
] | |
65b8f955f5a177896154f778e3d5a466193e38b0 | 2352bc07e12b0256913559cf3485a360569ccd5e | /Practice/code_class/Crossin-practices/python-cocos2d/practice.py | 03ae4f527a72db206c7f6622f7b49d67d17d3b0c | [] | no_license | Dis-count/Python_practice | 166ae563be7f6d99a12bdc0e221c550ef37bd4fd | fa0cae54e853157a1d2d78bf90408c68ce617c1a | refs/heads/master | 2022-12-12T03:38:24.091529 | 2021-12-22T09:51:59 | 2021-12-22T09:51:59 | 224,171,833 | 2 | 1 | null | 2022-12-08T05:29:38 | 2019-11-26T11:07:00 | Jupyter Notebook | UTF-8 | Python | false | false | 1,050 | py | # -*- coding: utf-8 -*-
import cocos
import random
class Testgame(cocos.layer.Layer):
# pass
def __init__(self):
super(Testgame,self).__init__()
# self.logo = cocos.sprite.Sprite()
# self.logo.position = 550,400
# self.add(self.logo,9999)
txt = cocos.text.Label(u'最棒了最棒了')... | [
"[email protected]"
] | |
98e13b59b62ddedc3ca4697d2082d3d67f574de7 | eb0fc861564058487117325298eccce468f6ceb8 | /yo/services/notification_sender/cli.py | adae1c7d8b43e370f382cb7e84ec7aa0569d7141 | [
"MIT"
] | permissive | dpays/dpay-notifications | 239c92243ae53c485bfa44bb7b7e344203645241 | 32b1cdcd58d622407fd50206053c5b9735a56ba9 | refs/heads/master | 2020-03-26T21:19:22.793303 | 2018-09-08T04:26:12 | 2018-09-08T04:26:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 355 | py | # -*- coding: utf-8 -*-
import click
import yo.yolog
@click.command(name='sender')
@click.option('--database_url', envvar='DATABASE_URL')
def yo_noitification_sender_service(database_url):
from yo.services.notification_sender import main_task
main_task(database_url=database_url)
if __name__ == '__main__':
... | [
"[email protected]"
] | |
c11ddbb3c8c40a72606cae4a86c24ef46d3da507 | acf426a78ded4a078063d05457075fedba8f5310 | /mn_wifi/sumo/traci/_inductionloop.py | 47c322177a8a427c3fa85e06cc1e7b7947b2c0bb | [
"LicenseRef-scancode-x11-stanford"
] | permissive | intrig-unicamp/mininet-wifi | 3b58e6cf7b422cfe0f8990e173e77d7ba1d54616 | 985bf0ca2f11ca2ba17e44518e0df550070ddfba | refs/heads/master | 2023-08-27T03:36:41.005380 | 2023-07-27T13:07:32 | 2023-07-27T13:07:32 | 35,002,369 | 419 | 278 | NOASSERTION | 2023-09-12T03:42:45 | 2015-05-03T22:03:07 | Python | UTF-8 | Python | false | false | 4,605 | py | # -*- coding: utf-8 -*-
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2011-2017 German Aerospace Center (DLR) and others.
# This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v2.0
# which accompanies this distributi... | [
"[email protected]"
] | |
eb7e5849b5f2b010cd504a91f7d1992192d5f1ef | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2634/48102/248806.py | 7d3c7140dc5506ab531b4029d5a8e97dfc1a1732 | [] | 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 | 316 | py | def compare(a):
return a[0] / a[1]
def search(ls: list, target: int) -> list:
res = []
for i in range(len(ls)-1):
for j in range(i+1, len(ls)):
res.append([ls[i], ls[j]])
res.sort(key=compare)
return res[target-1]
lst = eval(input())
t = int(input())
print(search(lst, t)) | [
"[email protected]"
] | |
6ebdf216116dcd30b8c2d256c9d9e25c1236a86e | d0533b0574494b13606a557620f38f5a2c74ce16 | /venv/lib/python3.7/site-packages/mongoengine/base/common.py | 82d2441786f944d1b4b33738eef42a64caa091a5 | [
"GPL-1.0-or-later",
"MIT",
"LicenseRef-scancode-other-copyleft"
] | permissive | CatTiger/vnpy | af889666464ab661fb30fdb0e8f71f94ba2d1e41 | 7901a0fb80a5b44d6fc752bd4b2b64ec62c8f84b | refs/heads/master | 2020-09-26T00:37:54.123877 | 2020-07-13T10:15:46 | 2020-07-13T10:15:46 | 226,124,078 | 0 | 0 | MIT | 2020-04-21T03:02:20 | 2019-12-05T14:44:55 | C++ | UTF-8 | Python | false | false | 1,492 | py | from mongoengine.errors import NotRegistered
__all__ = ('UPDATE_OPERATORS', 'get_document', '_document_registry')
UPDATE_OPERATORS = {'set', 'unset', 'inc', 'dec', 'mul',
'pop', 'push', 'push_all', 'pull',
'pull_all', 'add_to_set', 'set_on_insert',
'min', '... | [
"[email protected]"
] | |
a8fd073471237610101d66b5b5288bd5c2f35af1 | 90419da201cd4948a27d3612f0b482c68026c96f | /sdk/python/pulumi_azure_nextgen/devtestlab/__init__.py | 7c60ecc2f02f80c2494ffe58a8560274e9866950 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | test-wiz-sec/pulumi-azure-nextgen | cd4bee5d70cb0d332c04f16bb54e17d016d2adaf | 20a695af0d020b34b0f1c336e1b69702755174cc | refs/heads/master | 2023-06-08T02:35:52.639773 | 2020-11-06T22:39:06 | 2020-11-06T22:39:06 | 312,993,761 | 0 | 0 | Apache-2.0 | 2023-06-02T06:47:28 | 2020-11-15T09:04:00 | null | UTF-8 | Python | false | false | 282 | py | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
# Make subpackages available:
from . import (
latest,
v20150521preview,
v20160515,
v20180915,
)
| [
"[email protected]"
] | |
b480f0d4a79df1e543ab8471ddd8b32a713f46a5 | a61f73dd4cfd8d863e566f6b7422e1637967a1d7 | /abci/example/python3/abci/wire.py | 72f5fab8b0b227b6282599fe053b95fb0b57f555 | [
"Apache-2.0"
] | permissive | FirmaChain/tendermint | e1d91ee4c17f908c9f07d0771621201e9552e81f | aaa060fda4e3a564a32f1ba81f05cea93f6e34ce | refs/heads/master | 2020-08-13T07:36:03.482612 | 2019-10-11T16:07:58 | 2019-10-11T16:07:58 | 214,933,104 | 14 | 0 | Apache-2.0 | 2019-10-14T02:43:54 | 2019-10-14T02:43:53 | null | UTF-8 | Python | false | false | 2,599 | py |
# the decoder works off a reader
# the encoder returns bytearray
def hex2bytes(h):
return bytearray(h.decode('hex'))
def bytes2hex(b):
if type(b) in (str, str):
return "".join([hex(ord(c))[2:].zfill(2) for c in b])
else:
return bytes2hex(b.decode())
# expects uvarint64 (no crazy big n... | [
"[email protected]"
] | |
ee818994979e4463590d325b2c982d6640272e36 | 7332aca74ee82c69a64737668f6aba4a20078b1b | /mysite/settings.py | dba505eed042889de7cf95363039bd098723daab | [] | no_license | bcastillo1/my-first-blog | f1609730a2a69dca94c07b0ed017717ad8218d85 | 4b4f3cfa66f2aff51e8b33805d6dc0e0314afa55 | refs/heads/master | 2020-03-30T07:00:39.662973 | 2018-09-29T22:26:58 | 2018-09-29T22:26:58 | 150,907,876 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,181 | py | """
Django settings for mysite project.
Generated by 'django-admin startproject' using Django 2.0.8.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/ref/settings/
"""
import os
# ... | [
"[email protected]"
] | |
6ecccd89ce3b40ed429583a7acf5dce755c3a3b2 | 6b265b404d74b09e1b1e3710e8ea872cd50f4263 | /Python/Ising/ising_sim.py | 480aca6617840c8fc9257de0549d3c56f609e818 | [
"CC-BY-4.0"
] | permissive | gjbex/training-material | cdc189469ae2c7d43784ecdcb4bcca10ecbc21ae | e748466a2af9f3388a8b0ed091aa061dbfc752d6 | refs/heads/master | 2023-08-17T11:02:27.322865 | 2023-04-27T14:42:55 | 2023-04-27T14:42:55 | 18,587,808 | 130 | 60 | CC-BY-4.0 | 2023-08-03T07:07:25 | 2014-04-09T06:35:58 | Jupyter Notebook | UTF-8 | Python | false | false | 4,699 | py | #!/usr/bin/env python
if __name__ == '__main__':
from argparse import ArgumentParser
import importlib
import random
import sys
from runner import DomainSizeRunner
from averager import Averager
from util import print_options
arg_parser = ArgumentParser(description='2D ising system simul... | [
"[email protected]"
] | |
daf6ce6d701a3f7fd5d4d5556db1235f1aea559b | 2d227925231be797cc78b644358ecd3adf00fba7 | /ce/c240.py | 802087ab037d7ba1d123f6f276c8a9eb0c788b26 | [] | no_license | egalli64/pythonesque | 6bb107189d4556d832175d41366ea0b18ed6ea1d | 154042c5ae5cf43a0ae2c03d509fc48d1dc19eb8 | refs/heads/master | 2023-07-07T05:50:14.711023 | 2023-07-01T10:52:24 | 2023-07-01T10:52:24 | 53,720,525 | 21 | 7 | null | null | null | null | UTF-8 | Python | false | false | 1,294 | py | """
Mersenne prime
author: Manny [email protected]
info: http://thisthread.blogspot.com/2017/02/codeeval-mersenne-prime.html
https://www.codeeval.com/open_challenges/240/
"""
import sys
from math import sqrt
marsennes = [(2, 3)]
def is_prime(number):
for divisor in range(2, int(sqrt(number)) + 1):
... | [
"[email protected]"
] | |
efc014f939c2d949b0cd19569ef658a32e5e1fe1 | cb530e68e4151f793b42b84a86e75794e71efbc0 | /containerkeys/middleware.py | 993be599e94d17cbe850e168e41066d55a3807c3 | [
"Apache-2.0"
] | permissive | CloudBrewery/swift-container-keys | 7614ffdf313a8cb90b128be08a4845a438705312 | c6406dbc45858c13bd5cc7935dc81a9129141529 | refs/heads/master | 2021-01-15T11:12:04.166532 | 2015-01-09T17:41:14 | 2015-01-09T17:41:14 | 29,027,338 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,099 | py | # Copyright (c) 2015 Cloud Brewery Inc. (cloudbrewery.io)
#
# 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 l... | [
"[email protected]"
] | |
7af4bd620c1eacbd1e6a1703e168ef6bebae1672 | 4875108ee320efe3e17346e35359f938af7146b1 | /test.py | 63c6f35d1d049bbe0fb91c7e5c802960d0956c47 | [
"BSD-2-Clause"
] | permissive | liuqingci/PSpider | 504db41f69e61beaf22face04defe39a38a20843 | 45fffd5395027cb930898b9b728ba6f3d36bc034 | refs/heads/master | 2020-06-02T23:18:08.101128 | 2019-06-11T02:54:22 | 2019-06-11T06:13:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,083 | py | # _*_ coding: utf-8 _*_
"""
test.py by xianhu
"""
import re
import sys
import spider
import random
import logging
import datetime
import requests
from bs4 import BeautifulSoup
requests.packages.urllib3.disable_warnings()
class MyFetcher(spider.Fetcher):
"""
fetcher module, rewrite url_fetch()
"""
de... | [
"[email protected]"
] | |
a3bb06d33689b7e7c1437a306a443d4701cb84c1 | f2889a13368b59d8b82f7def1a31a6277b6518b7 | /2007.py | 21c2d0bc31844393f9fde2d7322b2be12978ac4f | [] | no_license | htl1126/leetcode | dacde03de5c9c967e527c4c3b29a4547154e11b3 | c33559dc5e0bf6879bb3462ab65a9446a66d19f6 | refs/heads/master | 2023-09-01T14:57:57.302544 | 2023-08-25T15:50:56 | 2023-08-25T15:50:56 | 29,514,867 | 7 | 1 | null | null | null | null | UTF-8 | Python | false | false | 558 | py | # Ref: https://leetcode.com/problems/find-original-array-from-doubled-array/discuss/1470959/JavaC%2B%2BPython-Match-from-the-Smallest-or-Biggest-100
class Solution:
def findOriginalArray(self, changed: List[int]) -> List[int]:
c = collections.Counter(changed)
if c[0] % 2 == 1:
return []... | [
"[email protected]"
] | |
4fb8a6613c23a11b15ea041eb6992e6c99f4496a | facb8b9155a569b09ba66aefc22564a5bf9cd319 | /wp2/merra_scripts/03_model_fitting/merraRF882/852-tideGauge.py | 23b76be58b869b4adff4020388a4f358c87eeb26 | [] | no_license | moinabyssinia/modeling-global-storm-surges | 13e69faa8f45a1244a964c5de4e2a5a6c95b2128 | 6e385b2a5f0867df8ceabd155e17ba876779c1bd | refs/heads/master | 2023-06-09T00:40:39.319465 | 2021-06-25T21:00:44 | 2021-06-25T21:00:44 | 229,080,191 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,456 | py | # -*- coding: utf-8 -*-
"""
Created on Mon May 4 15:51:30 2020
This program is designed to validate a Random Forest
model by using the KFOLD method
@author: Michael Tadesse
"""
#import packages
import os
import glob
import numpy as np
import pandas as pd
from sklearn import metrics
from scipy import stats
import se... | [
"[email protected]"
] | |
7c254f2c139a62a672f3fceeef3f56306b55cf97 | 1cbcf8660d3ea833b0a9aa3d36fe07839bc5cfc5 | /apps/commons/__init__.py | 0f0e0b7adb01e7e6695254fbea30187fca7ed79c | [] | 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 | 251 | py | #!/usr/bin/env python
# encoding: utf-8
"""
@author: zhanghe
@software: PyCharm
@file: __init__.py.py
@time: 2019-04-26 20:06
"""
def func():
pass
class Main(object):
def __init__(self):
pass
if __name__ == '__main__':
pass
| [
"[email protected]"
] | |
4501f26cfb2bffa45db443d6c895bedead0dabe5 | 5ec7d0bad8a77c79843a2813f5effcb3a2b7e288 | /lean/components/config/cli_config_manager.py | 39f62229b4180cd6dba56d0480bf199a2f862c96 | [
"Apache-2.0"
] | permissive | xdpknx/lean-cli | aca9b9c9c4e156c9faefcfa8ccdfc20423b510a0 | c1051bd3e8851ae96f6e84f608a7116b1689c9e9 | refs/heads/master | 2023-08-08T02:30:09.827647 | 2021-09-21T21:36:24 | 2021-09-21T21:36:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,050 | py | # QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
# Lean CLI v1.0. Copyright 2021 QuantConnect Corporation.
#
# 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... | [
"[email protected]"
] | |
caab84331a286957688308ab6662f76886565cad | d3efc82dfa61fb82e47c82d52c838b38b076084c | /Autocase_Result/KZZMM/YW_KZZMM_SHXJ_082.py | 8be9a19d9eac064c5c1eff466069cccce9c4febe | [] | no_license | nantongzyg/xtp_test | 58ce9f328f62a3ea5904e6ed907a169ef2df9258 | ca9ab5cee03d7a2f457a95fb0f4762013caa5f9f | refs/heads/master | 2022-11-30T08:57:45.345460 | 2020-07-30T01:43:30 | 2020-07-30T01:43:30 | 280,388,441 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,053 | py | #!/usr/bin/python
# -*- encoding: utf-8 -*-
import sys
sys.path.append("/home/yhl2/workspace/xtp_test/xtp/api")
from xtp_test_case import *
sys.path.append("/home/yhl2/workspace/xtp_test/service")
from ServiceConfig import *
from mainService import *
from QueryStkPriceQty import *
from log import *
sys.path.append("/h... | [
"[email protected]"
] | |
a9cfb2037e52211b220afeeb004deb4751481476 | 7fb2fa25c86a824343b6ca0974978db6b12e5590 | /analysis/count_emojis.py | 4921e65519970758f36b23edfb37ee5697942392 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | pmichel31415/mtnt | ff3d6f509e665c525946dd0635904cb0a3f9766b | 2a7e9a36b36bd1e95d6d8ab9f28f1d9359240807 | refs/heads/master | 2021-04-06T02:25:17.441054 | 2019-04-02T18:13:05 | 2019-04-02T18:13:05 | 125,262,764 | 61 | 7 | MIT | 2019-02-26T16:01:56 | 2018-03-14T19:22:44 | Python | UTF-8 | Python | false | false | 477 | py | #!/usr/bin/python3
"""
Count the number of emojis in the input
"""
import sys
import emoji
import re
txt_emoji_regex = re.compile(r'(8|:|;|=)(\^|\'|-)?(\)|\(|D|P|p)')
utf8_emoji_regex = emoji.get_emoji_regexp()
N = 0
try:
for line in sys.stdin:
for w in line.strip().split():
i... | [
"[email protected]"
] | |
56aea531c535900df425e4611b4776b282f6fa44 | 46ae8264edb9098c9875d2a0a508bc071201ec8b | /res/scripts/client/gui/sharedclancache.py | 1aa1b48a5532bacd3c62029590bc3c3bcdcd0503 | [] | no_license | Difrex/wotsdk | 1fc6156e07e3a5302e6f78eafdea9bec4c897cfb | 510a34c67b8f4c02168a9830d23f5b00068d155b | refs/heads/master | 2021-01-01T19:12:03.592888 | 2016-10-08T12:06:04 | 2016-10-08T12:06:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,099 | py | # Embedded file name: scripts/client/gui/shared/ClanCache.py
from collections import namedtuple
import BigWorld
from Event import Event
from account_helpers import getAccountDatabaseID
from adisp import async, process
from constants import CLAN_MEMBER_FLAGS
from debug_utils import LOG_ERROR
from helpers import html
fro... | [
"[email protected]"
] | |
0ce2e5cbbf0829c6f3a636aa81c11c8deda2ed4b | 2e682fd72e3feaa70e3f7bf2a3b83c50d783ec02 | /PyTorch/dev/cv/detection/YOLOX_ID2833_for_PyTorch/configs/detectors/cascade_rcnn_r50_rfp_1x_coco.py | 176131d6ee71e712688423706383ed6a3a13e405 | [
"GPL-1.0-or-later",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-unknown-license-reference"
] | 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 | 1,498 | py |
# Copyright 2022 Huawei Technologies Co., Ltd
#
# 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 agre... | [
"[email protected]"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.