blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 616 | content_id stringlengths 40 40 | detected_licenses listlengths 0 69 | license_type stringclasses 2
values | repo_name stringlengths 5 118 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 63 | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 2.91k 686M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 23
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 213
values | src_encoding stringclasses 30
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 2 10.3M | extension stringclasses 246
values | content stringlengths 2 10.3M | authors listlengths 1 1 | author_id stringlengths 0 212 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8fb41bc1b8f8c2b4508bd87272655f120f261887 | f56c45ce8d593cc60bea2daab191ff80c2c3e30f | /03_django_basic/community/board/models.py | 35576088c050e9930a1eaf4dd6eee8883e5c9b6b | [] | no_license | PAPION93/python-playground | 5c216ed1ed3a668458bf75221fd60a88c7e80e9a | 775b137b65c5fa65135d4f6846b5ddff28a4371d | refs/heads/master | 2022-11-26T18:59:11.036371 | 2020-08-12T14:36:25 | 2020-08-12T14:36:25 | 276,674,303 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 720 | py | from django.db import models
# Create your models here.
class Board(models.Model):
title = models.CharField(max_length=128,
verbose_name='제목')
contents = models.TextField(verbose_name='내용')
writer = models.ForeignKey(
'user.UserCustom', on_delete=models.CASCADE, verbo... | [
"sjun1319@gmail.com"
] | sjun1319@gmail.com |
74f2757220a88898a6e4b5dad3c63b866232286d | a37bf3343be428c453e480c7a411a91b125ab1d1 | /deb/openmediavault/usr/lib/python3/dist-packages/openmediavault/datamodel/datamodel.py | c25bf348fca4181454ad38ac5f9f7141e39083bb | [] | no_license | zys1310992814/openmediavault | 8e73ccd66fefaddd03385834137887614726812c | 337f37729783d9bf3a08866c0dbc8b25c53b9ca3 | refs/heads/master | 2020-04-20T14:18:57.505953 | 2019-02-02T15:18:07 | 2019-02-02T15:18:07 | 168,894,447 | 1 | 0 | null | 2019-02-03T00:41:55 | 2019-02-03T00:41:55 | null | UTF-8 | Python | false | false | 3,163 | py | # -*- coding: utf-8 -*-
#
# This file is part of OpenMediaVault.
#
# @license http://www.gnu.org/licenses/gpl.html GPL Version 3
# @author Volker Theile <volker.theile@openmediavault.org>
# @copyright Copyright (c) 2009-2018 Volker Theile
#
# OpenMediaVault is free software: you can redistribute it and/or modify
#... | [
"votdev@gmx.de"
] | votdev@gmx.de |
f856fd5ad30c1f31072c660ce799a34b2969c6b1 | a7ceed3147d08310e7c3129cd94f48b0b5b6de19 | /shop/app.py | f1f3428c3b5d4b4dd9c757a2d91ee2ea3dff27e4 | [] | no_license | SA-Inc/cherry_app | 4b14e09f5bf0b9b31f0d61d415843ba96c902fa9 | 27977d919923f0843de399272acc0051d0607344 | refs/heads/master | 2023-04-22T13:59:41.134708 | 2020-05-15T18:42:14 | 2020-05-15T18:42:14 | 260,542,154 | 0 | 0 | null | 2021-05-06T20:07:02 | 2020-05-01T19:31:07 | Vue | UTF-8 | Python | false | false | 1,760 | py | from flask import Flask, make_response
from flask_cors import CORS
import pyodbc
database_config = {
'driver': '{ODBC Driver 17 for SQL Server}',
'server': '192.168.0.104',
'database': 'cherry_shop',
'user': 'SA',
'password': '30456682sA'
}
app = Flask(__name__)
CORS(app, resources = { r"/*": { "origins": "... | [
"noreply@github.com"
] | SA-Inc.noreply@github.com |
1acd11d2c075a19aeaec33eabb2263dbb4111fa3 | 610a3ccbfac8c7d65ded6ddc428cab0d23f72bfa | /src/helpers.py | d268224cfc900e0a4cc3b338a320a8e153d369a1 | [] | no_license | scaleoutsystems/digits-example-project | 75718becce1c4d60a1e8d83749a07cc8e315ba17 | e6c354c8350332ce357e6d4638060a5cf5cf5cec | refs/heads/master | 2022-12-07T01:05:31.181256 | 2020-08-24T14:32:33 | 2020-08-24T14:32:33 | 238,665,388 | 0 | 0 | null | 2020-05-08T13:41:43 | 2020-02-06T10:44:04 | Jupyter Notebook | UTF-8 | Python | false | false | 173 | py | import tensorflow as tf
import mnist
def load_model():
model = tf.keras.models.load_model('digits-clf_v1.h5')
mn = mnist.model()
mn.model = model
return mn
| [
"andreas@IT-ML-andhe896.local"
] | andreas@IT-ML-andhe896.local |
344cf2d475cd36e4470327ba4eeff7b9b1031d55 | 468a3f806677f44d1403b4eaf8800e93942332ab | /Решения на Python/11.py | 246d79742fd44af48af408992d26e24a1af8db4f | [] | no_license | Fdinfoter/EGE-Informatica-C4 | b3e8ebcb5406b2aa9691213f903a30ed8fa88fc8 | 4ee888554cfcc75009cc7f60562b71c389f1bcea | refs/heads/master | 2020-12-26T10:11:19.273924 | 2015-03-26T16:51:04 | 2015-03-26T16:51:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,855 | py | # -*- coding: utf-8 -*-
"""
-------------------------------------------------
Задача C4-11.
Решение на языке Python 3.
Автор: Константин Поляков, 2013
E-mail: kpolyakov@mail.ru
Web: kpolyakov.spb.ru
-------------------------------------------------
Школьная олимпиада по информатике проводилась для учеников 7-11-х... | [
"akarainer@yandex.ru"
] | akarainer@yandex.ru |
59d8f01e647784d5e4ab659ba0b518f6864ec95c | 7129f15a9d1f7b8f134c2a2fba58b24fe9a1e6d7 | /unittest/test_web/test_baidu_data.py | 7d89d6f4ee20353ba879605bf001a284498dcf2d | [] | no_license | csxhzy/hzy-code | 23f7a3c103d694d7e68a8bf505f0ead2fd82b4a6 | 70541817e8a2bc0e6260689a6300a31784147ffd | refs/heads/master | 2021-04-16T12:32:48.762518 | 2020-03-23T07:41:14 | 2020-03-23T07:41:14 | 249,356,316 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,117 | py | import csv
import codecs
import unittest
from time import sleep
from itertools import islice
from selenium import webdriver
class TestBaidu(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.driver = webdriver.Chrome()
cls.base_url = "https://www.baidu.com"
cls.test_data = []
... | [
"1658489684@qq.com"
] | 1658489684@qq.com |
81371c236c1b31b828834065ba1f4590cc065578 | 91948d5be26636f1f2b941cb933701ea626a695b | /problem002_uber_product.py | 43dee7ed290c090339c4cb64d1c47645fbcbabf7 | [
"MIT"
] | permissive | loghmanb/daily-coding-problem | 4ae7dd201fde5ee1601e0acae9e9fc468dcd75c9 | b2055dded4276611e0e7f1eb088e0027f603aa7b | refs/heads/master | 2023-08-14T05:53:12.678760 | 2023-08-05T18:12:38 | 2023-08-05T18:12:38 | 212,894,228 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,460 | py | '''
This problem was asked by Uber.
Given an array of integers, return a new array such that each element at index i
of the new array is the product of all the numbers in the original array except
the one at i.
For example, if our input was [1, 2, 3, 4, 5], the expected output would be
[120, 60, 40, 30, 24]. If our inp... | [
"loghmanb@gmail.com"
] | loghmanb@gmail.com |
dc814497a6d93db8c28412b462e3f201c65ab99c | 6bede59f44976ecc239ea323e577ea823ae199cd | /warmup_project/scripts/finite_state_controller.py | d3aa4d4336a8d4b2fd0359a62baf495eb275c43e | [] | no_license | isaacvandor/comprobo_warmup_project | 4c59e714343348abf983392ce4e41b61452ab16d | 21e04fc52391f92478187b864f0a0378a26b6f8c | refs/heads/master | 2020-03-28T00:17:04.423171 | 2018-09-21T15:23:34 | 2018-09-21T15:23:34 | 147,391,198 | 0 | 0 | null | 2018-09-04T18:33:29 | 2018-09-04T18:33:29 | null | UTF-8 | Python | false | false | 6,722 | py | #!/usr/bin/env python
"""
finite_state_controller.py
Isaac Vandor
CompRobo 2018
Implements a finite state machine to switch between people following and driving in a square.
It will follow people until it doesn't see anyone and then drive in a square.
"""
from __future__ import print_function
import rospy
import math
f... | [
"isaacvandor@gmail.com"
] | isaacvandor@gmail.com |
6d2ebfb0d5eca67a6c3677b695fb01da765358e8 | e3365bc8fa7da2753c248c2b8a5c5e16aef84d9f | /indices/feeder.py | b081311b634e091e1371ab0183f9c9abded2626e | [] | no_license | psdh/WhatsintheVector | e8aabacc054a88b4cb25303548980af9a10c12a8 | a24168d068d9c69dc7a0fd13f606c080ae82e2a6 | refs/heads/master | 2021-01-25T10:34:22.651619 | 2015-09-23T11:54:06 | 2015-09-23T11:54:06 | 42,749,205 | 2 | 3 | null | 2015-09-23T11:54:07 | 2015-09-18T22:06:38 | Python | UTF-8 | Python | false | false | 432 | py | ii = [('LyelCPG2.py', 2), ('RogePAV2.py', 2), ('RogePAV.py', 1), ('RennJIT.py', 4), ('ProuWCM.py', 5), ('LeakWTI2.py', 2), ('PeckJNG.py', 6), ('LyelCPG.py', 2), ('WestJIT2.py', 5), ('KirbWPW2.py', 2), ('LeakWTI4.py', 1), ('LeakWTI.py', 1), ('BachARE.py', 3), ('SoutRD.py', 1), ('HowiWRL2.py', 1), ('WestJIT.py', 4), ('Fi... | [
"prabhjyotsingh95@gmail.com"
] | prabhjyotsingh95@gmail.com |
9ff7bcf0b7e132c05a94b7ac2ef5b7f1ef0ff512 | 6a85ccd78d9f4dfbc6af9549cebcc98b2780b9a5 | /network_test_job.py | 15878ddb72a7af5a4c93ba923bb5760f69532ca2 | [] | no_license | richhan7/next | 00cff87fb6314c75fb3ff7bc722a6026953b271b | 8cf611a79554ac5e79abfa5649c517001ba3dd2e | refs/heads/main | 2023-06-12T00:59:54.769186 | 2021-06-24T19:02:51 | 2021-06-24T19:02:51 | 380,022,366 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 499 | py | """
network_test_job.py
Example multi-testscript job file
"""
# see https://pubhub.devnetcloud.com/media/pyats/docs/easypy/jobfile.html
# for how job files work
import os
from pyats.easypy import run
# compute the script path from this location
SCRIPT_PATH = os.path.dirname(__file__)
def main(runtime):
"""job... | [
"noreply@github.com"
] | richhan7.noreply@github.com |
e969a74760c8c4b91e8b2dcd06db47ff9cbccf46 | 10317d4492bcc5a85518c8c9c6edce56cccb7050 | /Document Scanner/transform_new.py | 012814806bec195d2e650f2d62128556692278b9 | [] | no_license | kishan/Image-Recognition-Test-Grader | 066a640adbc6bce5181cf0fb2d8c6f9a2a8d60e1 | 7b4e603f7a483cfed622df8d9896d9ff2719526a | refs/heads/master | 2021-01-01T19:43:07.716688 | 2015-08-25T20:00:56 | 2015-08-25T20:00:56 | 41,382,408 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,411 | py | # import the necessary packages
import numpy as np
import cv2
import math
################################################################################
## The following functions have been written by me but the approach is derived
## from the following link: http://www.pyimagesearch.com/2014/08/25/4-point-
... | [
"kspatel2018@gmail.com"
] | kspatel2018@gmail.com |
85f811b89d5d0000abdf3240d55b112a1be47eb3 | a9f156d2b5f53861b0b7de327c21a725c7e81f9c | /alien.py | 3166a5ae7383df6f80653288de9dfe0ac748abe3 | [] | no_license | LiamKolanowski/alien-invasion | 34f9d2941e0c3a81fd65f3ddfb7b02eb7458e291 | 7b9d0e85fe137c993dfe03630d745849b5b3e604 | refs/heads/master | 2021-04-09T21:00:36.929929 | 2020-03-24T17:38:03 | 2020-03-24T17:38:03 | 248,879,593 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,147 | py | import pygame
from pygame.sprite import Sprite
class Alien(Sprite):
"""A class to represent a single alien in the fleet."""
def __init__(self, ai_game):
"""Initialize the alien and set its starting position."""
super().__init__()
self.screen = ai_game.screen
self.settings = ai_... | [
"LiamKolanowski@gmail.com"
] | LiamKolanowski@gmail.com |
20a53a274d6d968a8915ec3cbcd0bfd96af6fe6b | 9f16e7e8a728bbe80599225a0b0209e66f90aa85 | /tensorflow/contrib/kfac/python/ops/estimator.py | 30d825cc74fba6937da7d6fd808f4928fa2472dd | [
"Apache-2.0"
] | permissive | dantkz/tensorflow | af2035a8c77e2672f9d4a243f6dd6af82fc6fc50 | 5333bbeb3142af2a06f1ebd971061fc4e28da743 | refs/heads/master | 2021-05-05T14:59:58.530607 | 2017-12-01T13:36:46 | 2017-12-01T13:36:46 | 105,175,518 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,030 | py | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
"gardener@tensorflow.org"
] | gardener@tensorflow.org |
91e59bf2d9893247a7e305d5302cdecd1db9e9c1 | 64563298f40cd6926d7e11445274183d81218055 | /config/wsgi.py | e44b0f8cd93201515c55d6eb528e436c0cbb3594 | [] | no_license | n-ishizaka8299/First-Step-WorkOut | 4154b71f92b4dbb7af62cebf03e30b76239b0acb | f34c15995ec806297cfd2d52d831c77cd182537a | refs/heads/master | 2023-05-03T23:17:15.028871 | 2021-05-30T01:44:39 | 2021-05-30T01:44:39 | 365,424,387 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 483 | py | """
WSGI config for config project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
# from whitenoise.django import Django... | [
"n.ishizaka8299@gmail.com"
] | n.ishizaka8299@gmail.com |
e9fe43ce49cbc2376476ce8b7bce2e8b5cde924c | d9a21297d67ce19cf4194887911787c6b5584d80 | /codes_python/cases/Class_write_case.py | 9f5b5527ef18d99fa54ad042e47a1297adcbcf57 | [] | no_license | nsaura/ML | a476249ddf76f73252bbe553ec7f5b238142fa58 | 544c41df9fc5902ab8e8cecb8434956007940aa5 | refs/heads/master | 2020-04-04T23:45:36.916457 | 2019-03-14T19:49:52 | 2019-03-14T19:49:52 | 156,370,627 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,761 | py | #!/usr/bin/python2.7
# -*- coding: latin-1 -*-
## Author NS
# Helps from https://pythonhosted.org/ezodf/spreadsheetdocument.html#document-management
# https://pythonhosted.org/ezodf/tableobjects.html#Table
import pandas as pd
import ezodf as ez
import os
from numpy import zeros
class File():
def __in... | [
"saura.nathaniel@gmail.com"
] | saura.nathaniel@gmail.com |
d38095f6f65c9f07ad7abbb070590af3d8ef7a7d | ded10c2f2f5f91c44ec950237a59225e8486abd8 | /.history/2/path_integral_naive_sampling_20200419015912.py | 09700ceb920c45902a696fba97ea21eac5e153d9 | [] | no_license | jearistiz/Statistical-Physics-Projects | 276a86407b32ded4e06b32efb2fadbd8eff8daed | d9c5b16a50856e148dc8604d92b6de3ea21fc552 | refs/heads/master | 2022-11-05T03:41:23.623050 | 2020-06-28T06:36:05 | 2020-06-28T06:36:05 | 254,909,897 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,101 | py | # -*- coding: utf-8 -*-
from __future__ import division
import os
import numpy as np
import matplotlib.pyplot as plt
from time import time
import pandas as pd
# Author: Juan Esteban Aristizabal-Zuluaga
# date: 202004151200
def rho_free(x,xp,beta):
"""Uso: devuelve elemento de matriz dsnsidad para el caso de una ... | [
"jeaz.git@gmail.com"
] | jeaz.git@gmail.com |
99e93916bed5dbae5141874b200404680d64df06 | 9a329df241d1ed7257c068606b03b48113c69d7f | /001基础/009集合/04集合查找数据.py | 4e1983538917b085e3a21cd2ccc9bd9a2e19bfdf | [] | no_license | gitHirsi/PythonNotes | c3910979c34c82574f74ecbebd6de439f959f4b5 | 0901974e4904b0ac65983377fd4d081b06dfd029 | refs/heads/master | 2022-11-09T06:22:03.608188 | 2020-06-15T09:31:46 | 2020-06-15T09:31:46 | 266,547,363 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 172 | py | """
@Author:Hirsi
@Time:2020/5/30 0030 8:32
"""
s1 = {10, 20, 30, 60, 50}
# in 或not in 判断数据是否存在
print(10 in s1)
print(10 not in s1)
print(80 not in s1) | [
"hirsiboom@163.com"
] | hirsiboom@163.com |
8e7c9117b9b08ed4a03b43f4ae8a2a8d9daa1d19 | ef4f9cfca5cc0fbeb5ac6547d607bd51c52d53cc | /UnityPy/EndianBinaryReader.py | a85fc05e554a4f5d912a0af360ccb2cc9e4d1324 | [
"MIT"
] | permissive | l3iggs/UnityPy | c1fe52719990817c00232834d9436dfb6a70ee57 | 01822260261e395565f357b33d5dab35e1a847b3 | refs/heads/master | 2021-03-27T22:56:13.402044 | 2020-03-03T12:12:49 | 2020-03-03T12:12:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,950 | py | import io
import struct
from .math import Color, Matrix4x4, Quaternion, Vector2, Vector3, Vector4, Rectangle
class EndianBinaryReader:
endian: str
Length: int
Position: int
stream: io.BufferedReader
def __init__(self, input_, endian='>'):
if isinstance(input_, (bytes, bytearray)):
self.stream = io.BytesIO... | [
"rkolbe96@gmail.com"
] | rkolbe96@gmail.com |
25854f44a5cc291fbdd5dfec90ae8bea919c44ef | 201356e09fb6dd82d36ed5b93b08a29482b68fb2 | /HD - Intro/Task 20/example.py | ddb49c8255c3ccf527b2f2d8dfdf08f3094bf33d | [] | no_license | M45t3rJ4ck/Py-Code | 5971bad5304ea3d06c1cdbd065941271c33e4254 | 32063d149824eb22163ea462937e4c26917a8b14 | refs/heads/master | 2020-04-08T05:03:44.772327 | 2018-11-26T06:41:03 | 2018-11-26T06:41:03 | 159,044,079 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,058 | py | #************* HELP *****************
#REMEMBER THAT IF YOU NEED SUPPORT ON ANY ASPECT OF YOUR COURSE SIMPLY LOG IN TO www.hyperiondev.com/support TO:
#START A CHAT WITH YOUR MENTOR, SCHEDULE A CALL OR GET SUPPORT OVER EMAIL.
#*************************************
# *** IF YOU DID NOT INSTALL NOTEPAD++ AND PYTHON (... | [
"wavoges@gmail.com"
] | wavoges@gmail.com |
d1ae2cdd52bc525a90b20eee39b2b945b2a17caf | 1d28e9314e4cc9933e66ec4faa570d479307a3fe | /NTV/plugins/plugin_manager/plugin_manager.py | 88082337c30add77bd14bb377a06df9e5a098262 | [] | no_license | natelust/NTV | f9269c6019616362b03ee99155cd8a1faf481c3d | 2afa7b93a758967ed00c96e62dd6fd23210bc0d6 | refs/heads/master | 2021-01-17T08:30:56.471554 | 2016-07-25T20:36:35 | 2016-07-25T20:36:35 | 16,401,956 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,314 | py | try:
from PySide.QtCore import *
from PySide.QtGui import *
except:
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import os
import sys
import plugin_manager as me
from zipfile import ZipFile
from io import BytesIO
import json
import shutil
#This is a compatability mode for python2 and python3
if... | [
"natelust@gmail.com"
] | natelust@gmail.com |
9ceecd5538942099bab3b6551d6e2237a046eb14 | 44d4a051663179ddf4a87ef607070e8abed1b94f | /ntupleAnalysis/skim_select_events.py | 74870141f0dcdb8c5763db8776a54254cbf40845 | [] | no_license | mbandrews/h2aa | 458471abd90dc2a80d13ad2d2428cc0567d58c89 | de1549d472f0b815236598c9676c27719b949e67 | refs/heads/master | 2022-12-09T22:08:21.235484 | 2022-12-08T03:44:58 | 2022-12-08T03:44:58 | 232,382,628 | 0 | 1 | null | 2022-12-08T03:44:59 | 2020-01-07T17:49:35 | Jupyter Notebook | UTF-8 | Python | false | false | 9,874 | py | from __future__ import print_function
from collections import OrderedDict
import numpy as np
np.random.seed(0)
import os, re, glob
import time
import argparse
from hist_utils import *
from selection_utils import *
#from get_bkg_norm import *
import ROOT
# Register command line options
parser = argparse.ArgumentParser... | [
"michael.andrews@cern.ch"
] | michael.andrews@cern.ch |
7568e5a30b7024361b796e2836d7d57075a9ad02 | 8964415b9861300a2636af1e1489d40358316f36 | /src/filter.py | bb77fc853626368dd2e9ed787a6113e0ac324ff7 | [] | no_license | sohampatkar10/mpc-trajectory-tracking | 35d7fce178c97678f9bc1579bf4afff5abe5a70c | b1fb5c9a0e6dadccd38b9d0f37456c96ab745592 | refs/heads/master | 2020-03-17T19:22:17.207649 | 2018-05-17T14:48:47 | 2018-05-17T14:48:47 | 133,857,564 | 5 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,260 | py | #!/usr/bin/env python
import rospy
from quad_arm_trajectory_tracking.msg import FlatState
from geometry_msgs.msg import TwistStamped
from geometry_msgs.msg import Vector3
from std_msgs.msg import Float64
from gazebo_aerial_manipulation_plugin.msg import RPYPose
import numpy as np
from tf import transformations
class ... | [
"spatkar1@jhu.edu"
] | spatkar1@jhu.edu |
55896ce58faaad4d9a6fea22920858626787434c | f71d6668e3cc82db5907e6217924cf188c91784d | /myDjango/test/Scripts/django-admin.py | 0510ad6b097a3cf2141aa1a36f44160f7d25bcb5 | [] | no_license | mounikakumar565/MyDjango | 2ad80347723cf6803c7a2ecbc2e982459cade5d5 | ccbd12c08c43a1787535e36357ea238221c2f332 | refs/heads/main | 2023-06-04T13:18:06.166630 | 2021-06-16T07:08:52 | 2021-06-16T07:08:52 | 377,389,306 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 686 | py | #!c:\users\mounika\mydjango\test\scripts\python.exe
# When the django-admin.py deprecation ends, remove this script.
import warnings
from django.core import management
try:
from django.utils.deprecation import RemovedInDjango40Warning
except ImportError:
raise ImportError(
'django-admin.py was depreca... | [
"mounikaa.kumar@gmail.com"
] | mounikaa.kumar@gmail.com |
ab9afc1e2ce503d83c3056e69b4288ec408dfa41 | b7b7b9976a33d7eab9bd1ac0da89465ce38c20b9 | /tests/0800_builder/03_get_globals.py | 730a75c907d48e302eb80b7ed158156ae55b66eb | [
"MIT"
] | permissive | sveetch/Optimus | 87070ae99890a2c69dc28d5582cd680cd7d516dc | 983aebeccd2ada7a5a0ab96f9296d4bba1112022 | refs/heads/master | 2021-10-12T00:11:33.012608 | 2021-10-09T22:54:29 | 2021-10-09T22:54:29 | 6,760,885 | 2 | 1 | null | 2013-12-16T18:08:42 | 2012-11-19T13:39:29 | Python | UTF-8 | Python | false | false | 1,572 | py | import os
from optimus.pages.builder import PageBuilder
def test_get_globals(minimal_basic_settings, fixtures_settings, caplog):
"""
Context should be correclty filled with context globals (SITE shortcut,
settings, optimus version)
"""
projectdir = os.path.join(fixtures_settings.fixtures_path, "b... | [
"sveetch@gmail.com"
] | sveetch@gmail.com |
1dbee547e18a637d8591ed745be0e2f9cf4198c6 | 3fafde5311c81d69e0c08593def4b0e97506e570 | /應用程式/查詢文件目錄下的資料/traversalDir.py | 4ef56bf20a5427a511969804df43488fc2c57cb6 | [] | no_license | LaiJunBin/python | c29a54145a6e0607c925fb5e8cc8e84094f2faab | 6bfef9bbcdf3212b14f53005640e5c186fe654c0 | refs/heads/master | 2021-09-07T09:48:35.847638 | 2018-02-21T05:56:40 | 2018-02-21T05:56:40 | 115,581,178 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,336 | py | import os
import sys
while True:
errorFile = ''
target = {
"fileName" : input('請輸入要搜尋的關鍵字:\n'),
"fileType" : input('請輸入要搜尋檔案的副檔名:\n')
}
record = {}
def traversal(dirName):
try:
record.setdefault(dirName,[])
for d in os.listdir(dirName):
... | [
"xyz607xx@gmail.com"
] | xyz607xx@gmail.com |
fa747aed36c12b54f458c9b6fd4e82409b02461c | e640df2225dcc708874a4fcb41cd37170525fd60 | /apps/funcionarios/migrations/0003_auto_20210225_2249.py | a9c6dabce367a587e460872bc8985184e6f1ff35 | [] | no_license | gabrielcruuuz/Django | 429239f129c3d235d75afc0c3d6412d85adb91f0 | 760a79ec6604299ba69ffcabe937f6677ddd6c2f | refs/heads/master | 2023-04-16T23:05:59.157813 | 2021-05-07T02:41:34 | 2021-05-07T02:41:34 | 342,088,872 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 590 | py | # Generated by Django 3.1.7 on 2021-02-26 01:49
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('funcionarios', '0002_aut... | [
"gabriel.cruz2@hotmail.com"
] | gabriel.cruz2@hotmail.com |
a9bba88a2394543ef5415cb1dc1a26db77786245 | 74351afee6a573f9f12234f244a1362d0461c43f | /gui/dialog/snap_comment.py | c97a17b18a54e3fb3f6ab073f7e10ea38fd35a85 | [
"BSD-3-Clause"
] | permissive | stumyers/lsdc | 9bf5206e891a4eff47157943c13a274bbc8c1500 | ae6b4e3c2310c4d411b011683688bf9af2f98ac1 | refs/heads/master | 2023-06-17T16:44:12.965813 | 2023-05-12T12:57:27 | 2023-05-12T12:57:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,466 | py | from qtpy import QtWidgets
class SnapCommentDialog(QtWidgets.QDialog):
def __init__(self, parent=None):
QtWidgets.QDialog.__init__(self, parent)
self.setWindowTitle("Snapshot Comment")
self.setModal(False)
vBoxColParams1 = QtWidgets.QVBoxLayout()
hBoxColParams1 = QtWidgets.... | [
"vshekar1@bnl.gov"
] | vshekar1@bnl.gov |
9186c66a5e468ddac1f6938a4ca7a42f605deadf | a6e4a6f0a73d24a6ba957277899adbd9b84bd594 | /sdk/python/pulumi_azure_native/servicefabricmesh/v20180701preview/get_volume.py | bf1e34036b579879a38e2e8ba7e5a4239246a83e | [
"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,980 | 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... | [
"noreply@github.com"
] | MisinformedDNA.noreply@github.com |
008e8fffde79b86d22b5fcded795cb1f270905db | 1345854e79e0739ca6845afa367285fbfa33d16d | /1008.py | 3921c9a6bd19bdebd53b6d8ca98acd12b249bad0 | [] | no_license | rhythm2019/PAT-Advanced-Level-Practice | e28550543a622ed34381a57352fcc46a55169832 | 5a8a996b91f1ef2c90118976d9ab348e1c0374ec | refs/heads/master | 2021-02-27T11:03:19.796933 | 2020-11-26T14:56:20 | 2020-11-26T14:56:20 | 245,601,116 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 322 | py | #1008
lst01 = list(map(int, input().split()))
lst01[0] = 0
sum = 0
for i in range(0, len(lst01) - 1):
if lst01[i + 1] - lst01[i] > 0:
sum += 6 * (lst01[i + 1] - lst01[i]) + 5
elif lst01[i + 1] - lst01[i] < 0:
sum += 4 * (lst01[i] - lst01[i + 1]) + 5
else:
sum += 5
print(su... | [
"noreply@github.com"
] | rhythm2019.noreply@github.com |
b0eddd720a8feec4af5b6f2989c7a567b8d03f50 | 9506f274c68f5436d967fbcec6fbcb21842a0568 | /scripts/P2 Features/SPP Profile/A_BX_EmbeddedSW_SPP_0023.py | a9362ee0f94854e60cf364e0d5bbb5539d064aa9 | [] | no_license | txthuong/txthuong | 7561e57328ad1ea1b4c4c3a2c47d204a0ae45d8c | edfbf6079807662e6e6fa2791684f9e3d466ee75 | refs/heads/master | 2020-03-16T21:10:52.228480 | 2019-07-23T11:45:08 | 2019-07-23T11:45:08 | 132,987,797 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 10,559 | py | # Test Name Description
# A_BX_EmbeddedSW_SPP_0023 Verify module can establish and receive SPP connections concurrently
#
# Requirement
# 3 Euler modules
#
# Author: ptnlam
#
# Jira ticket:
#-------------------------------------------------------------------... | [
"txthuong@tma.com.vn"
] | txthuong@tma.com.vn |
8c33daabcaf0a5c55bd5b54898f7859bf4bdf18e | 898e263e9264804df750fe24cc767e08856c9e09 | /storage/cloud-client/storage_get_metadata.py | e146e9321ad0dcce46c51ef75daccb4cf14ce381 | [
"Apache-2.0"
] | permissive | HoleCat/echarlosperros | 98da28d0fc76c57459ce4c9a53c89e62c350f754 | b67460de0467e05b42a763c4430b26ecfd97c2aa | refs/heads/main | 2023-01-21T15:29:13.091406 | 2020-12-03T01:33:00 | 2020-12-03T01:33:00 | 318,039,531 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,575 | py | #!/usr/bin/env python
# Copyright 2019 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the 'License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unles... | [
"201602035x@gmail.com"
] | 201602035x@gmail.com |
3399c55c48fe5008c979d0e84d3351d9ece3355d | c10dfb7a3e0189b25ee4a6d942e49ee7c4ea30d1 | /main.py | a51f8aadd6d7b3f5dcc9afcfcfc951006f70f621 | [] | no_license | DACRepair/pairup | a4d154936ffd9060043ad29af6c2de598d224e14 | 89f1e1fbde710e900af43a8fc74ef0eaa222f051 | refs/heads/master | 2022-12-09T16:53:32.615533 | 2020-09-12T15:19:10 | 2020-09-12T15:19:10 | 294,964,513 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,562 | py | #!/usr/bin/env python3
import itertools
import random
from uuid import uuid4
from flask import Flask, render_template, request
from flask_bootstrap import Bootstrap
def generate_matches(options: list, n: int):
options_len = len(options)
pairs = options_len - 1
total = sum([x for x in range(options_len... | [
"DACRepair@gmail.com"
] | DACRepair@gmail.com |
49e638f83de804b23bbf4d3eeae59f14e094fe55 | 641f6cc8f956b8c318b9d438e31ada4b6ebc1b5f | /models/qa.py | 2b1848e4b4adc5f78c9c9bdc5bb9bcf4ca74e13c | [
"Apache-2.0"
] | permissive | linkinpark213/quantization-networks-cifar10 | 61754f4beddc1da5c1b407c4e7880d54c172099c | 7214733beed2f1d661633baadabdb300150b15b1 | refs/heads/master | 2022-12-05T19:34:41.656292 | 2020-08-09T06:46:23 | 2020-08-09T06:46:23 | 286,180,844 | 9 | 3 | null | null | null | null | UTF-8 | Python | false | false | 7,469 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# qa.py is used to quantize the activation of model.
from __future__ import print_function, absolute_import
import torch
import torch.nn as nn
from torch.nn.parameter import Parameter
from torch.autograd import Variable
import numpy as np
from utils.cluster import params_... | [
"linkinpark213@outlook.com"
] | linkinpark213@outlook.com |
aa05a0d8d078ff225c32f57b19e6bc43f73329c8 | 143d626e2406a7042fef0194cd414f555e9779ce | /robs-old-tsp/optimizers.py | 3aa5c13d50f41104d392a5dfa65f800b4978ad18 | [] | no_license | robjxyz/subway-record | 9e491114f34652435f45481cb513923de987d5e3 | 3e2d892ae9e920fe55837ca751c4787123377ee5 | refs/heads/master | 2020-03-19T02:41:13.527114 | 2018-08-11T02:55:39 | 2018-08-11T02:55:39 | 135,651,229 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,478 | py | from __future__ import generators
from subprocess import Popen
import os
###########################################################
## Priority dictionary stuff, and dijkstras stuff
###########################################################
# Priority dictionary using binary heaps
# David Eppstein, UC Irvine, 8 Mar 2... | [
"darnrascal@gmail.com"
] | darnrascal@gmail.com |
ac1e90202af311525377c3db230e068f2e481c3d | 2887df4bb93b7a5fb49b1ce7f7f25b2bdb8ca6ae | /DjangoBlog/myblog/myblog/urls.py | 566ac7d58b62884970c3d28d5a63818334dfdf12 | [] | no_license | pinkal-sanoria/Blog_Website | a62285bb749b6263dbe25efc59e928b61c088680 | c6990100599401b8e2c9ce03c75d43dcc442eb97 | refs/heads/main | 2023-05-13T07:51:19.169509 | 2021-02-16T14:20:13 | 2021-02-16T14:20:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,027 | py | """myblog URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/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 ... | [
"59228879+Pinkal12@users.noreply.github.com"
] | 59228879+Pinkal12@users.noreply.github.com |
ab1fcc8fb8bf0a4157a1b664e6b8166d6df7122f | a87ce1fca9f8174774e2bd82bea34f8753cada50 | /RestApiProject_3/app/views.py | 33a652d8af0b69370000102435b78f9e680dd603 | [] | no_license | Usamaraoo/django-projects | 21ca8ce3edbd7ca8af152ae448edefae0d5dd35a | e888d1a5fa42365718f9ce3959e4f6b06640d8a5 | refs/heads/master | 2022-09-04T19:17:37.089484 | 2020-05-28T19:08:52 | 2020-05-28T19:08:52 | 266,105,260 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 561 | py | from django.shortcuts import render
from rest_framework import viewsets
from .serializers import DeveloperSerializer
from .models import Developer
from django.views.generic import ListView, DetailView
class QuestionApi(viewsets.ModelViewSet):
serializer_class = DeveloperSerializer
queryset = Developer.objects... | [
"usamakaleem505@gmail.com"
] | usamakaleem505@gmail.com |
0c7cd24171630a3452ea0533c68c78ccb0d8b188 | db98623bb618f0f3db4bf5d579475fc0973807f3 | /main2.py | 9839692de091d399f266410d7af20dc63e863b38 | [] | no_license | ws02874137/yolov5-dnf | 86e50995a65c327e797531a14e940cc32b66eb80 | a8ec3d885cd8c4aafd4da300e4234f38427ad167 | refs/heads/main | 2023-03-15T05:15:34.859128 | 2021-03-09T01:48:25 | 2021-03-09T01:48:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 30,299 | py | import numpy as np
from grabscreen import grab_screen
import cv2
import time
import directkeys
import torch
from torch.autograd import Variable
from directkeys import PressKey, ReleaseKey, key_down, key_up
from getkeys import key_check
from utils.torch_utils import select_device, load_classifier, time_synchronized
from... | [
"925777075@qq.com"
] | 925777075@qq.com |
758fba932b2190ff7152ca49923ddf0ee31ce46a | fa5e22528ab8308c4a2bfa902d9ee288aa977233 | /nfb_studio/serial/__init__.py | 9e9205dfcfc45544f7b5f0c128d19f6be653d9a7 | [] | no_license | bioelectric-interfaces/nfb_studio | 4aa506c27ad693810fad6e884834949b24d6dde8 | 397605cb6beb4d35f0b2dc14dd1efa3d81976461 | refs/heads/master | 2023-04-23T10:27:27.957674 | 2021-05-23T20:17:08 | 2021-05-23T20:17:08 | 237,448,419 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,416 | py | """A module that implements nfb_studio's custom serialization engine.
This module adds classes and methods that can serialize objects to different data formats. Corresponding functions and
classes can be found in nested modules, such as `serial.json`.
- If a class you want serialized is in your control, you can defin... | [
"andres.zhukov@gmail.com"
] | andres.zhukov@gmail.com |
615e24e26af4a589cec6c81baa87b0c064113467 | ea60aa221b5278a0a6d67dab215b0a69d0281e9e | /2015/Day 01 Not quite LISP/py/solution.py | a4e0f82d34679c64cbdf1188f06d49c7d95354bb | [] | no_license | rfist/advent-of-code | 50ab42ea3f06516892fe9d02e450840f98e9c311 | 3bbe9f5ba27f082eaa84a50c99e95db5b9c2dc4a | refs/heads/master | 2023-01-08T11:16:34.241955 | 2021-05-15T14:49:42 | 2021-05-15T14:49:42 | 170,996,844 | 1 | 0 | null | 2023-01-03T16:33:58 | 2019-02-16T11:36:37 | TypeScript | UTF-8 | Python | false | false | 809 | py | import os
from colorama import Fore, Style
def processPart1(input):
"""
Return solution for day1
"""
return input.count('(') - input.count(')')
def processPart2(input):
floor = 0
position = 0
for i in input:
position += 1
floor = floor + (1 if i == '(' else -1)
if... | [
"theseuship@gmail.com"
] | theseuship@gmail.com |
6e1dfb3310d1177731366e145b289b4556cd979f | 7b527dabc7b5d1e4cf5a288fb644aa0201fc7601 | /mapper.py | a40ef90ed1d766a85410fdb44d7c6f82fefd9af0 | [] | no_license | JettPhillips/CryptosandStringys | d92d7f9bc7bb26d526d80d61099999c5ea785737 | 0d3984129182d306ddcf15d511c10802c26d6708 | refs/heads/master | 2020-08-30T12:19:55.486838 | 2019-10-29T20:35:31 | 2019-10-29T20:35:31 | 218,378,588 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 627 | py | def letterToIndex(letter):
from string import ascii_lowercase
alphabet = ascii_lowercase + ' '
idx = alphabet. find(letter)
if idx == -1: #means that wasn't in the alphabet
print("error:", letter, "is not in the alaphabet")
return idx
def indexToLetter(idx):
from string import ascii_l... | [
"jettpackgaming@gmail.com"
] | jettpackgaming@gmail.com |
aa77403d7717ceaa7e15933bd49d9e1b209ced21 | f9426368ada2672a64a46449bf7c0a9ee23bb49d | /hearthbreaker/cards/spells/hunter.py | 21eb92acf78a28908b87ffe1cbf5cb9ba8bd520b | [
"MIT"
] | permissive | WabiWasabi/hearthbreaker | 301c0cf6ce95c403ecf81c8109d6e51e7f5fb2e4 | 3f7d39b99bb88ffec83d1c038c4ca0b1444882b6 | refs/heads/master | 2021-01-22T17:09:02.885750 | 2014-09-16T19:53:52 | 2014-09-16T19:53:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,076 | py | import copy
from hearthbreaker.effects.minion import Immune
import hearthbreaker.targeting
from hearthbreaker.constants import CHARACTER_CLASS, CARD_RARITY, MINION_TYPE
from hearthbreaker.game_objects import Card, SecretCard, Minion, MinionCard
class HuntersMark(Card):
def __init__(self):
super().__init__... | [
"daniel.yule@gmail.com"
] | daniel.yule@gmail.com |
0c3520e4355d960d9ef457c69e6f890a773df82c | 2596d535f21fececf9f9a26956c378b3db398e7d | /fabricasite/urls.py | 03d857d5b28a8a8044cd0ff8b8ca061ba05f8996 | [] | no_license | cpa-bayarea/fabricasite-backend | bffc8847f88179e6e0c2f13f2a773c9c37fb3b2d | bb5e966c05bae7115cb06bf66dacdec81e8c5231 | refs/heads/master | 2022-12-15T19:45:32.106292 | 2018-04-14T14:03:00 | 2018-04-14T14:03:00 | 127,532,788 | 0 | 0 | null | 2022-12-08T00:57:03 | 2018-03-31T13:07:11 | Python | UTF-8 | Python | false | false | 1,318 | py | """fabricasite 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-b... | [
"joseduardo.kimura@gmail.com"
] | joseduardo.kimura@gmail.com |
95ae557108735e1252a765cf7c9eaa5c303c7604 | 77dea310908545be0ec92146adc0358739b2e057 | /Model_Building_w_GAN.py | 33e769dd0f258e5f46faaecc6509c8ffe81dfdcd | [] | no_license | Ani-07/Volatility_Modelling | f93d2a8356fd39486499ec36a0e0fd36b10266e4 | 779a67134fbbb83e024be5b551594b1cb3ca05a3 | refs/heads/main | 2023-01-21T22:58:11.597733 | 2020-12-03T15:31:11 | 2020-12-03T15:31:11 | 318,237,871 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,000 | py | # -*- coding: utf-8 -*-
"""
Created on Wed Oct 21 18:45:13 2020
@author: Anirudh Raghavan
"""
import pandas as pd
import numpy as np
import os
seed_value= 0
os.environ['PYTHONHASHSEED']=str(seed_value)
import random
random.seed(seed_value)
np.random.seed(seed_value)
import tensorflow as tf
tf.random.set_seed(see... | [
"54192291+Ani-07@users.noreply.github.com"
] | 54192291+Ani-07@users.noreply.github.com |
d7544458a6ded8044f8f7928e5990538d9be7cb4 | 3d49a543721d10e7dcd630b34c32624758ea2509 | /codeAcademy/roshambo.py | 4d28bb48e5dd960e5c721f4029b0736d8ddbbfd3 | [] | no_license | rgamoji/python | a13d0e70dfc50f31a9c0db4264d407bc1d4ee6db | 6de18e9c22da06fc1fea0ed00da1da89ebdb5f7c | refs/heads/master | 2021-05-15T01:29:19.386053 | 2018-11-08T23:58:27 | 2018-11-08T23:58:27 | 13,962,649 | 0 | 0 | null | 2018-07-11T00:16:29 | 2013-10-29T17:08:52 | HTML | UTF-8 | Python | false | false | 2,770 | py | #!/usr/bin/env python
"""
Roshambo (rock-paper-scissors) game. Prompts for number of attempts and let's you play rock-paper-scissors for those many times until you win.
Ex:
$ ./roshambo.py
Welcome to Rock, Paper, Scissors!
How many points are required for win? 3
Choose (R)ock, (P)aper, or (S)cissors? r
It's a Draw
Ch... | [
"rgamoji@gmail.com"
] | rgamoji@gmail.com |
7b8b55dc7677f2959a75c9ee3e91b6b7e9a29037 | d00e29c27d4d4cccbee8f3923d2d837a2d04eedb | /sush_utils/simpleFlask.py | ec4e06723bfd911d8136e309d7c2e9cc7c4b7c6b | [] | no_license | sush80/switcherPy | 23bfa054f0ed4ab636c5fd69ac70dd28a957747f | 6098431bf526a7ca46d659d73bb859d9fa163f5a | refs/heads/master | 2021-07-25T02:40:11.107318 | 2018-11-17T18:30:33 | 2018-11-17T18:30:33 | 112,855,804 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,566 | py | from flask import Flask
try:
from sush_utils.sush_utils import system_uptime #import if this file is a lib
except:
from sush_utils import system_uptime #import fallback if file runs locally
def start_simple_flask_not_returning():
app = Flask(__name__)
@app.route('/')
def hello_world():
up... | [
"you@example.com"
] | you@example.com |
0ce8c82d0740e56e21b8e75b53119aebbe0ab877 | bb5d7d03bee8c33663bc2d1a7275dbd90581e7bd | /dmcadmin/forms.py | 8c52969340ff589ca80659d9648c40bb5b72fd73 | [
"MIT"
] | permissive | jayvdb/django-dmcadmin | f2461d294be4b82d53d6befeacf65b447d976266 | 3ea98438906e395e70f0c47a3ed048204fe0bdd8 | refs/heads/master | 2022-08-30T23:27:16.256749 | 2020-05-01T05:49:51 | 2020-05-01T05:49:51 | 265,708,506 | 0 | 0 | MIT | 2020-05-20T23:34:12 | 2020-05-20T23:34:12 | null | UTF-8 | Python | false | false | 1,329 | py | from django import forms
from dmcadmin.models import ManageTask
class ImportForm(forms.Form):
file = forms.FileField()
class ManageCommandForm(forms.Form):
manage_command_name = forms.CharField(
label='Manage command name',
required=True,
widget= forms.TextInput(attrs={'class':'form-... | [
"kurbangulov@big3.ru"
] | kurbangulov@big3.ru |
ecf880f40e41edc9738c859860328f4039d94a4f | 6d5827fe48c9fe3dc4c50ae5c62b2201df412942 | /network/migrations/0002_remove_post_likeinfo.py | 7e9c70efcc3225e7ed6ea27634ddfb950bd071be | [] | no_license | avaldinger/network | 1c3ece21df183578660df10886ec2932366bb0a5 | 49b2e4a6219b005518be24b55df44e8d10aa82a3 | refs/heads/main | 2023-04-04T20:43:34.485633 | 2021-04-18T23:03:15 | 2021-04-18T23:03:15 | 344,148,788 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 317 | py | # Generated by Django 3.1.5 on 2021-03-10 18:18
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('network', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='post',
name='likeInfo',
),
]
| [
"adam.valdinger@gmail.com"
] | adam.valdinger@gmail.com |
4ec346a39b2f81ec09e45ba5f01c32ef0de12b20 | bc3d127272596212d5d8c0a6e53aca0fa89f44ca | /parse.py | 37e7259ad1b9fe1d0128faf7fef52bde61fef40b | [] | no_license | atolegenova/altisha_bot | 6a0a689030a33f1d53b1a2a6686a4ff20284ab33 | 1ab917eac8bb9229dde94a78c342762e1a008bc5 | refs/heads/master | 2023-02-16T15:12:15.054513 | 2021-01-11T14:26:45 | 2021-01-11T14:26:45 | 327,881,435 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,210 | py | # import requests
# from bs4 import BeautifulSoup
#
# response = requests.get('https://www.kloop.kg/').text
#
#
# soup = BeautifulSoup(response, 'html.parser')
# posts = soup.find_all('a', class_='elementor-post__thumbnail__link')
# links = []
# for p in posts:
# href = p.get('href')
# links.append(href)
# for ... | [
"vistaltisha@gmail.com"
] | vistaltisha@gmail.com |
43d9ad6865b12cbb2f4cd7ae66863d0b04017f38 | 06675aa13d40d40e679c673cef8c555bef6d4e86 | /helper/omr60.py | 11f650edf62219ba7b4b63c4133ac9219efaa549 | [] | no_license | Hyeongjoon/omr_temp | 2d41497401e529fb9384125fba14fd6d434721a5 | a9ff1bdcedce2f0b4e8550a9517e12bd329bb9a8 | refs/heads/master | 2021-04-09T14:40:37.209833 | 2018-05-02T08:52:17 | 2018-05-02T08:52:17 | 125,753,668 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,886 | py | import argparse
import cv2
import math
import copy
import numpy as np
#from unittest.mock import right
CORNER_FEATS = (
0.322965313273202,
0.19188334690998524,
1.1514327482234812,
0.998754685666376,
)
TRANSF_SIZE = 1024
def normalize(im):
return cv2.normalize(im, np.zeros(im.shape), 0, 255, norm... | [
"wkdwns00@gmail.com"
] | wkdwns00@gmail.com |
60550f6e9ee9a43e2b1da09812caefec5f5cd7c2 | cba3fd964131a2188626918e465e0386b5f51d9a | /assignment3/multiply.py | 48d1e6fb3d3ef0f395458393847e73f1a3a72160 | [] | no_license | smartkiwi/datasci_course_materials | 7f3442d4a083f76ba67ccda39d5cc83d69d6a047 | e1e829bd90a51fbd393ed7b6786a6f9adcf1d075 | refs/heads/master | 2021-01-11T00:14:43.651812 | 2013-07-11T01:45:26 | 2013-07-11T01:45:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,273 | py | __author__ = 'vvlad'
__author__ = 'vvlad'
__author__ = 'vvlad'
import MapReduce
import sys
"""
Matrix Multiplication in the Simple Python MapReduce Framework
"""
mr = MapReduce.MapReduce()
# =============================
# Do not modify above this line
def mapper(r):
# key: friendA
# value: friendB
#a... | [
"smartkiwi@gmail.com"
] | smartkiwi@gmail.com |
b394e229ea76fbf3ac2c4bae7a7771ecef77835c | 0ab42e940c230efcc2519d7d43a16333eb2e1c7f | /upload.py | 150572871161c11265a95d8ed2765ea368faf4b6 | [] | no_license | rajinder323/python-selenium | 491e41b9d2e1af34c26105773cc44b78da2c2a6e | 5883efe17a67b64b33c7bb99252b6d21334cfb7d | refs/heads/master | 2021-09-09T13:55:53.503083 | 2018-03-16T18:55:19 | 2018-03-16T18:55:19 | 125,555,269 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,526 | py | # -*- coding: utf-8 -*-
#=============================================================================
#title :upload.py
#description :This automation script for. upload images on redbubble.com
#author :Rajinder Sharma
#date :16-02-2018
#version :1.0
#usage :upload.p... | [
"rajinder323@gmail.com"
] | rajinder323@gmail.com |
6f834d17578f09c13d5fb7eec9d7293d81dc5fd1 | 0dde5d2c625c4e2447996dc6288e5503c3c9aba2 | /python_listener/http_server.py | 6f93b2ab2b74ef6adbe5d1e6cb6dab05a6df0ee3 | [] | no_license | guptarohan6502/oneM2M-hackathon-2021 | 2a2b329d7bbb684c73d08e4db32c5e5743ebc59e | 053bc344eed2fe61e5816057f77a4c47b68f43b8 | refs/heads/main | 2023-09-02T23:42:16.545866 | 2021-11-16T13:54:54 | 2021-11-16T13:54:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,575 | py | #!/usr/bin/env python3
"""
Very simple HTTP server in python for logging requests
Usage::
./server.py [<port>]
"""
from http.server import BaseHTTPRequestHandler, HTTPServer
import logging
class S(BaseHTTPRequestHandler):
def _set_response(self):
self.send_response(200)
self.send_header('Conten... | [
"shubham.mante@research.iiit.ac.in"
] | shubham.mante@research.iiit.ac.in |
b4ebd276eb5b3cab91a85c7e63ca3466e5596247 | 7900d5b3e0a6394dd50655dc92a7c126f7ba9aca | /otrs_us/tk/dialogs.py | 62c3564f956abc8f95c221b7fd938086a936eb98 | [] | no_license | Lysovenko/OTRS_US | c01a1fcaf14e4c966e3d38fc58fbbae1d5f464de | 0f226ed0d9913dfd01513181462a2ff96376b628 | refs/heads/master | 2020-04-15T23:50:15.293195 | 2018-06-28T14:52:45 | 2018-06-28T14:52:45 | 38,324,332 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,944 | py | # Copyright 2015-2016 Serhiy Lysovenko
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | [
"Lysovenko@users.noreply.github.com"
] | Lysovenko@users.noreply.github.com |
fab3ff1a6dacda92cfd3c2476bbc2b97cfeb5e10 | 8e7ebb8069d605e7da3c1c1023acae884169b887 | /modules/dc_nrpe/files/check_configured_users.py | 3667190284dc551284de3a6d020462c4ba94a615 | [] | no_license | datacentred/puppet | 5620220ce6b10b5f7182b4b864eb291def9ffb1e | c1aa4a5761d55919665a70bf8c2523501872b1a9 | refs/heads/master | 2021-03-19T07:14:33.217847 | 2017-10-09T12:11:06 | 2017-10-09T12:11:06 | 10,935,489 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 879 | py | #!/usr/bin/env python
"""
Check configured users are correct against puppet
Takes a space separated list
"""
import sys
import argparse
import pwd
def main():
"""
Check users
"""
parser = argparse.ArgumentParser()
parser.add_argument('-u', '--users', nargs='+', required=True)
args = parser.pars... | [
"matt.jarvis@datacentred.co.uk"
] | matt.jarvis@datacentred.co.uk |
1c6c20bf15732c1e7c5953af04d15ff1fb4fe220 | 683850e354f0ec49029ef3f00c078e63553b8925 | /qwestion/views.py | cad0c52651bd9fe614da83100278075b2734fef5 | [] | no_license | MarchenkoAN/django | e1526d3b52c6a1fd317064d88447e879c0243350 | ff0bc327a188e291574c9dd00b0d220ca793da98 | refs/heads/master | 2022-07-07T23:28:08.386879 | 2020-05-19T15:08:14 | 2020-05-19T15:08:14 | 251,684,291 | 0 | 0 | null | 2022-06-22T01:35:38 | 2020-03-31T17:45:42 | JavaScript | UTF-8 | Python | false | false | 6,009 | py | from django.shortcuts import render
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import get_object_or_404
# from django.core.signing import Signer
from .form import ContactForm
import uuid
import datetime
from .models import *
# Create your views here.
def index(request):
"... | [
"machen@inbox.ru"
] | machen@inbox.ru |
e1f423df17d6ff141fa1ffa35d9ef12d6e4ff2be | 703b171ec8392ddaee16d142f5e62ee8299d0b39 | /main.py | 30e509ca5126e54eaac448bb2dc0c63913d6791c | [] | no_license | PatLor77/zadanie-6-wd | c447e46ac2217e50c3860ce7602274e8ee85c6e4 | f4234003614adaa998530043a287898425c1c239 | refs/heads/main | 2023-04-24T08:46:05.429301 | 2021-04-29T06:45:51 | 2021-04-29T06:45:51 | 362,717,048 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 66 | py | import numpy as np
a=np.arange(3)
b=np.arange(3)
print(a*b) | [
"noreply@github.com"
] | PatLor77.noreply@github.com |
915612eea1c90e26da9c1f3d18f87dc3623b72bd | cb49440b37b131366806a04f8128540e77c56e5e | /experiments/custom_agents_rainbow_noises3.py | 47f75c32f3605a09bd26f4b8a914ed9a2e80a44e | [
"Apache-2.0"
] | permissive | anonips/-MDP-Playground | e10adbf4ff1590fe34bdb8a25f1e4a571777796b | 74431f98c210830a93a1bc83fcdcb95bf1644696 | refs/heads/master | 2020-07-24T08:21:40.020239 | 2020-02-14T19:42:56 | 2020-02-14T19:42:56 | 207,863,532 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 19,935 | py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
from ray.rllib.agents.trainer import Trainer, with_common_config
from ray.rllib.utils.annotations import override
from ray.rllib.agents.dqn import DQNTrainer
from ray.rllib.offline import Ou... | [
"anonipous@gmail.com"
] | anonipous@gmail.com |
1cf263c93f60633bbafc89f6621e61f631f14066 | cee616b87ba449c1f03a286da70dd5a87239a372 | /attention_model.py | e2fcf5c24bc03dba2ed91545cfc91c8927e073ad | [
"Apache-2.0"
] | permissive | fendaq/attention-ocr-toy-example | 90dd9ac35946ebf3c3df9c95f4477e631310b27c | 1e01fc6aebe7c56d6696a51ad982cc3533aa4bba | refs/heads/master | 2021-08-29T17:09:38.445777 | 2017-12-14T11:48:53 | 2017-12-14T11:48:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,675 | py | import tensorflow as tf
from tensorflow.contrib import layers
from tensorflow.python.layers.core import Dense
from data_generator_att import *
START_TOKEN = 0
END_TOKEN = 1
UNK_TOKEN = 2
VOCAB = {'<S>': 0, '</S>': 1, '<UNK>': 2, '0': 3, '1': 4, '2': 5, '3': 6, '4': 7, '5': 8, '6': 9, '7': 10, '8': 11, '9': 12}
VOCAB_S... | [
"huangliang1@kingsoft.com"
] | huangliang1@kingsoft.com |
f0660702c88d6b81e305429227e0a114ca600c40 | 4e8bfd5f84e2df69ef33882e100d2472f03bd0fc | /setup.py | 695493e558603cd03a5dcfe015a6d46b7d121f7c | [
"BSD-3-Clause"
] | permissive | joshuablake/django-eve-api | e4bcddbf2ec619faedfac4e789e957f975a3e41a | 1dc919b7f67b1b46654ee35cd1c535a68e35e92b | refs/heads/master | 2021-01-19T21:51:28.572211 | 2012-09-02T21:30:13 | 2012-09-02T21:30:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 497 | py | from setuptools import setup
setup(
name = "django-eve-api",
version = "0.0.1",
author = "Joshua Blake",
author_email = "joshbblake@gmail.com",
description = ("Convenience functions for using the EvE API from Django "
"and storing keys in the database"),
license = "BSD",
... | [
"joshbblake@gmail.com"
] | joshbblake@gmail.com |
73040b4df8e5a3d296b28860d195170ce1db5668 | 116add2db80afe9988063b3cdcc96dbd241812cd | /06.AdaBoost/AdaBoost.py | a27626c9a2b87e2f8b83532c719b645eaea4913d | [] | no_license | seawaylee/MachineLearningInAction | 8b9bdccde92f4ef517fa482efc028f37f1d30b61 | 9613a3b956debcb7d45545d00ad0de7318a459f8 | refs/heads/master | 2021-06-01T00:39:44.763123 | 2016-05-30T08:54:27 | 2016-05-30T08:54:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,302 | py | '''
AdaBoost 自适应boosting算法
1.根据原始数据集构建多个数据集,采用随机抽样法
2.boosting通过集中关注被已有的分类器错分的那些数据来重新获得新的分类器
'''
from numpy import *
# 创建简单地数据集
from snowballstemmer.danish_stemmer import lab0
def loadSimpData():
dataMat = matrix([[1,2.1],[2,1.1],[1.3,1],[1,1],[2,1]])
classLabel = [1.0,1.0,-1.0,-1.0,1.0]
return dataMat,c... | [
"511958060@qq.com"
] | 511958060@qq.com |
c812b670e0c0e68d8dc5c5c0bb8ac1610fcfdba6 | cd2f8a1779ac6fd4e1df89c99add6047a2e64d80 | /chute/apps/project/migrations/0002_project_url.py | 92c01bb7628c06c9aaa8e9e76c4a6887677442d2 | [] | no_license | rosscdh/chute | 76cf37195272ba1269e72da6d545c4999dd7dc07 | 8bb555b6cc9c4d6c262e0873a97d07ad66ce1bc2 | refs/heads/master | 2021-01-21T03:50:39.085305 | 2015-12-30T14:08:50 | 2015-12-30T14:08:50 | 25,574,698 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 479 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('project', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='project',
name='url',
... | [
"ross.crawford@kumukan.com"
] | ross.crawford@kumukan.com |
881ea7908cd36cc3b98cf54c84903234d1a0b391 | 451299df3997aba57f0a8d6d2040ef470789b288 | /constants.py | 158a0d2241640bfb46d018abcc6101630792dffd | [] | no_license | MikhailKlim/Space-Invaders | 8f031e65caacfcf3f40b222632a508d02dc75e3c | fcc86a2c1f4ebc85dd1967dd551081209480a0cf | refs/heads/main | 2023-04-15T12:13:17.594569 | 2021-05-04T05:11:20 | 2021-05-04T05:11:20 | 364,121,468 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 199 | py | WIN_WIDTH = 800
WIN_HEIGHT = 800
FPS = 40
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
RED = (255, 0, 0)
GREEN = (25, 138, 17)
BLUE = (20, 68, 140)
YELLOW = (156, 145, 47)
GRAY = (200, 200, 200)
| [
"83624489+MikhailKlim@users.noreply.github.com"
] | 83624489+MikhailKlim@users.noreply.github.com |
14acce825c05a7521ebf13c8809d2f4bfe163931 | 1d093cfda1fab32c00e4fcec0477fcd839ad1476 | /backend/src/characters/migrations/0010_auto_20200110_1824.py | 369b53cfc0d58f147137b9b342a10911be4903ce | [] | no_license | nlhowell12/charactersheet-django | bec8acf7b1db3546aa2b3c1c54518e44733dece8 | 66d3ee720ef381a6d571db7820db94150a0632b2 | refs/heads/master | 2023-05-01T18:26:30.453511 | 2021-11-04T23:31:51 | 2021-11-04T23:31:51 | 229,323,109 | 0 | 0 | null | 2021-11-04T23:31:52 | 2019-12-20T19:19:47 | Python | UTF-8 | Python | false | false | 566 | py | # Generated by Django 3.0.2 on 2020-01-10 23:24
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('characters', '0009_auto_20200110_1401'),
]
operations = [
migrations.AddField(
model_name='race',
name='size',
... | [
"nhowell@dminc.com"
] | nhowell@dminc.com |
67f6901477eceac49d71aa43f36c0f63eb72eb64 | 18801d4277e0ed92b1f5b8b3ea7093fb44f93d45 | /sqlhelper/mysqlhelper.py | 1612232be899b9725b37484e14eb1b5b6de8124e | [] | no_license | touchkiss/weiboCommentPhoto | 3471bd7e0ae17890743ca6c60109898002486ffd | 634368345eee7e27ac37f36a4f9be7d790775c14 | refs/heads/master | 2021-07-19T02:53:48.340102 | 2017-10-24T03:07:57 | 2017-10-24T03:07:57 | 108,070,399 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,170 | py | # coding:utf8
import pymysql
import time
import traceback
from DBUtils.PooledDB import PooledDB
class mysqlhelper:
def __init__(self, connections=5):
pymysql.install_as_MySQLdb()
# mysql请先创建数据库
# create database weibo;
# use weibo;
# CREATE TABLE `t_user` (
# `user... | [
"1176815002@qq.com"
] | 1176815002@qq.com |
12385e19ea3a0aef047d4495773beb53ab1668dd | 9af654803796778261026761e2f21b1267412dcd | /6_OOPs/6_args_kwargs.py | 68b776c5f619d0bd93f8576a56e83def16806508 | [] | no_license | ksarathkumarreddy/CompletePython | 0ed89a8bea25c5abe188b7bc404f163354376718 | b8a05857cd0c0b32cb25752c1bf650d42feb1b84 | refs/heads/master | 2023-02-24T20:53:08.465816 | 2021-02-02T02:48:03 | 2021-02-02T02:48:03 | 319,835,454 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 793 | py | '''
*args(Non-Keyword arguments)
**kwargs(Keyword arguments)
arg:
---
In Python, we can pass a variable number of arguments to a function using special symbols.
Note:
--
“We use *args and **kwargs as an argument when we have no doubt about
the number of arguments we should pass in a function.”
'''
# *args
def myfu... | [
"sharathkumarreddy24@gmail.com"
] | sharathkumarreddy24@gmail.com |
ae124f95dfb74a92c94a4bdb45c0fae10c363ce9 | c88e144c30e45432a9ed43519ff389758e93eca6 | /polls/views.py | 47870801b0d52ed98863a9931d9f831fd2ec77ba | [] | no_license | kozukaccd/practice_lab | ce4947078a04f0bb222534aa224f5cc50a7be3d1 | 542aa0c9d12d5a7cd33d7a506904b4281c8835c3 | refs/heads/master | 2020-07-24T00:28:03.775536 | 2019-09-11T07:32:15 | 2019-09-11T07:32:15 | 207,749,017 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,166 | py | from django.shortcuts import get_object_or_404, render # render関数は request,テンプレートパスを渡すとそのテンプレートを使用したレンダリング結果をHttpRsponceとして返す
from django.http import HttpResponse, HttpResponseRedirect
from django.urls import reverse
from django.views import generic
from django.utils import timezone
from .models import Question,... | [
"t.kozuka.work@gmail.com"
] | t.kozuka.work@gmail.com |
a42bb018ff03bfd9a53342898564db3d33b7a2af | 9f2450da1c4fd7844e0e162a94c7edb53c27fe72 | /wm_compositional/assembly.py | 5cbdd69811fa36d2496a095452a9adb6fafe4cc5 | [] | no_license | sorgerlab/indra_apps | 6626a06dad9e7f820c71d7e03bdf42a6308746cc | 3f20ca3f7b3855636607c63b1956c404bfe1b16e | refs/heads/master | 2021-06-11T02:00:28.866305 | 2021-04-26T01:33:41 | 2021-04-26T01:33:41 | 128,094,623 | 1 | 8 | null | 2021-04-26T01:29:05 | 2018-04-04T17:10:11 | Jupyter Notebook | UTF-8 | Python | false | false | 5,614 | py | import os
import glob
import tqdm
import logging
from indra.sources import eidos, hume, cwms, sofia
from indra.statements import Influence, Event
from indra.tools import assemble_corpus as ac
from indra.ontology.world.ontology import WorldOntology
from indra.pipeline import register_pipeline, AssemblyPipeline
from indr... | [
"ben.gyori@gmail.com"
] | ben.gyori@gmail.com |
bf708abbdd172dd766a93b6fd9ef5854f16d34ac | d6645ca616747a825370c382e1f55b123422883f | /lotsofcategories.py | 5d62660564f055b83bbab47ca315dfb468223c82 | [] | no_license | lazarus432/catalog-project | 8962c7baf71ecdda77f88bffe48c844124ffc530 | 2d1d2fb952bb107cc85a4fe024a21906342db906 | refs/heads/master | 2021-01-23T16:50:11.572133 | 2017-09-19T02:38:46 | 2017-09-19T02:38:46 | 102,744,597 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,363 | py | from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from database_setup import Base, Category, CategoryItem, User
engine = create_engine('sqlite:///catalog.db')
Base.metadata.bind = engine
DBSession = sessionmaker(bind=engine)
session = DBSession()
# create a dummy user
User1 = User(name = "J... | [
"deux02030@gmail.com"
] | deux02030@gmail.com |
6794b30d36c1a760729ccddc16c022a664e86a9b | cbb28abc447027d5c30113d8f79ba5b01150983d | /util/sm4_tool.py | ed07f0a6137089cdc1efd1af8d0ab66c28ce486a | [] | no_license | zijinhub/myflask | 87ce114180de301c1efdd5f3a207242cc0d8869d | 3c3998fe8f006ea1f9135ad24d15c546eec2efde | refs/heads/master | 2022-11-18T05:31:34.012666 | 2020-06-29T07:29:33 | 2020-06-29T07:29:33 | 275,760,215 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,789 | py | #!/usr/bin/env python
'''
SM4加解密模块
'''
from gmssl.sm4 import CryptSM4, SM4_ENCRYPT
import copy
from functools import reduce
# Expanded SM4 S-boxes Sbox table: 8bits input convert to 8 bits output
SboxTable = [
0xd6, 0x90, 0xe9, 0xfe, 0xcc, 0xe1, 0x3d, 0xb7, 0x16, 0xb6, 0x14, 0xc2, 0x28, 0xfb, 0x2c, ... | [
"noreply@github.com"
] | zijinhub.noreply@github.com |
62d3dfca872375292b830f7198f1f8f0e22b5947 | 147156b7cfb0964a2b61cbb543333d6681a5207f | /main/views.py | 49e78dbff92dcd55a7ed52bfca39020fce920495 | [] | no_license | alessandra99/proyecto-django-desarrollo | 2a672cc63ccbf246918b7c79e242c0df9ad8d627 | ff077340cab7a1151f388f5e165acd46dd38bbc4 | refs/heads/master | 2023-01-07T21:51:02.110817 | 2020-11-13T03:18:46 | 2020-11-13T03:18:46 | 312,459,286 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 414 | py | from django.shortcuts import render
# Create your views here.
from django.http import HttpResponse
from django.views.generic import ListView, DetailView
from .models import Producto
def home(request):
return HttpResponse("Hola Mundo. Te encuentras en la página de inicio del Linio Express")
class ProductListVi... | [
"ale.apari@hotmail.com"
] | ale.apari@hotmail.com |
9ace26b89248c9f99301891619b545b666d6c198 | 207ea54789140a6d8d63a1bea191f0c84802e6ec | /Slots.py | 21e22b3ea9d240dbce9452d99b2a7bb89d1423bd | [] | no_license | amanneox/Python-Programs | f271e4b9803c1474816e0f5d8f16f38cf640ed96 | 86d0941141e81425b1240e688f6af878c5a88789 | refs/heads/master | 2020-03-16T09:14:28.479142 | 2018-09-28T11:45:20 | 2018-09-28T11:45:20 | 132,611,754 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 120 | py | class Frozen(object):
__slots__=['ice','cream']
x=Frozen()
print('ice' in dir(Frozen))
print('milk' in dir(Frozen))
| [
"amanadhikari2@gmail.com"
] | amanadhikari2@gmail.com |
ee88558d5cce652e406d62a3dafea7927a400f95 | 63cbe421ae1c04babe30541921a99bc219d92ac1 | /0x03-python-data_structures/3-main.py | 450e3cdbac48295959cee4fdeb83dece9eead6d5 | [] | no_license | Millennial-Polymath/alx-higher_level_programming | 98b8f472dc1f86de3a7092179c2669c4892dfbaa | a36abdbd8e0e467a46419647d4457e9f87a1af25 | refs/heads/main | 2023-07-06T23:22:25.036111 | 2021-08-09T02:57:43 | 2021-08-09T02:57:43 | 362,104,212 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 179 | py | #!/usr/bin/python3
print_reversed_list_integer = __import__('3-print_reversed_list_integer').print_reversed_list_integer
my_list = [4, 5, 6]
print_reversed_list_integer(my_list)
| [
"muchamingotho@gmail.com"
] | muchamingotho@gmail.com |
c1342e014a748de1b5d22ed2b36ba9073708bd73 | 3b9239a1402c690c550487f4dfe97fd11370698f | /organize_security_files.py | 89f96e10d7c027ea5aaeaff50b2996258eb41ec5 | [] | no_license | ifermon/nas_clean | e2df759d700208304aae6b28119a86301cc63d6f | 8162d718491a1d3926c29312a64c56775dd0a286 | refs/heads/master | 2021-01-10T09:44:25.649374 | 2017-10-23T12:22:02 | 2017-10-23T12:22:02 | 49,451,709 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,271 | py | #!/usr/bin/python
"""
This modules organizes my security files
First- Look for new files to organize
For each file found:
1. Extract date from filename
2. Create dest dir if not already existing
3. Rename file to include properly formatted date
4. Move file to dest directory
... | [
"github-ifermon@sneakemail.com"
] | github-ifermon@sneakemail.com |
8cb60420dba7c040c357fc2c1905a52be89cd1ab | 7251fe23efa735f6e63520fbd237b01666aedab7 | /chat/runtime_constants.py | 7b49c6e2e21770cd294646b46baa9cf5e3f29f6a | [] | no_license | YRMYJASKA/tinmi | b1ee961eac9fd35c48590ad338ba41288b489b1d | 14e188c8d897a2b6b926692db8adcc671c658851 | refs/heads/master | 2020-04-13T03:25:36.924883 | 2020-01-12T16:57:10 | 2020-01-12T16:57:10 | 162,931,420 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 166 | py | # Runtime constants for Tinmi
# Empty dictionary for storing users per chat room
# Primarily used in 'consumers.py' and 'room_commands.py'
channel_current_users= {}
| [
"hjelt.jyry@gmail.com"
] | hjelt.jyry@gmail.com |
b49b0aa10664dfb2a463c9db9a3ee3391a1bb550 | edd72c118fdca69cc58b6a85ac1b0f153f44d2f8 | /ruts/datasets/dataset.py | 3c7cf834387bd5281f7957adabb42f192ff10053 | [
"MIT"
] | permissive | webprogrammer77/ruTS | 7e459561aefd31ab1c0cfdc6503c9e90ea3392c7 | c3c95f99162115ea2c522ee7b90cfc1ee7de91e5 | refs/heads/master | 2022-12-12T11:12:01.423729 | 2020-09-04T14:08:21 | 2020-09-04T14:08:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,774 | py | from abc import ABCMeta, abstractmethod
from typing import Any, Dict, Generator
class Dataset(object, metaclass=ABCMeta):
"""
Абстрактный класс для работы с набором данных
Аргументы:
name (str): Наименование набора данных
meta (dict): Справочная информация о наборе данных
Методы:
... | [
"kouki.sergey@gmail.com"
] | kouki.sergey@gmail.com |
44322805f7dc167da8fa22865c0859b1c5aecdca | d17e9dabbccf23c97313edc7d14e0acff2179a29 | /bayes/bayes.py | 3e7d0d29cb47484e370b32f4073f0674922bc373 | [] | no_license | Jennylijingxian/ML_algo_implement | da492ab640eb598d4f1b046c64461ec07b6cb794 | 65d2181af85d734f7fd9fc6ddad436cde4e1e3b5 | refs/heads/master | 2022-11-14T19:30:01.834518 | 2020-07-06T18:40:07 | 2020-07-06T18:40:07 | 259,150,514 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,685 | py | import sys
import re
import string
import os
import numpy as np
import codecs
import math
from sklearn.utils import shuffle
from collections import defaultdict
from sklearn.naive_bayes import GaussianNB
from sklearn.model_selection import KFold
from typing import Sequence
import time
# From scikit lear... | [
"jli233@usfca.edu"
] | jli233@usfca.edu |
c0b568db124afa93d26c2a1f4d09e1b3a394e66d | f4c1ec60886de3374b61a370a536fe63dde6e373 | /pytorch-yolo-v3-master/backup_detect/1920x1080/detect2.py | d4e1626b25db25302386f13b5db32521dcca5fd9 | [] | no_license | ShinhwanKim/teamTest | 525d4012cf9dd5c176f1792d7641ac6573ac134f | 120cccec8c519ac09ca43e928f7afc52662888ca | refs/heads/master | 2020-07-07T23:35:45.773286 | 2019-09-05T14:06:05 | 2019-09-05T14:06:05 | 203,505,338 | 0 | 0 | null | 2019-08-21T06:39:09 | 2019-08-21T04:20:23 | null | UTF-8 | Python | false | false | 21,223 | py | from __future__ import division
import time
import torch
import torch.nn as nn
from torch.autograd import Variable
import numpy as np
import cv2
from util import *
import argparse
import os
import os.path as osp
from darknet import Darknet
from preprocess import prep_image, inp_to_image
import pandas as pd
import rando... | [
"8sehoon8@gmail.com"
] | 8sehoon8@gmail.com |
4006e8625ff8e6513ccf81151c60abc2b395f09b | 50a3c4f65032b01bb4f2a29a395937fdb390a16c | /infosite/infosite/asgi.py | af7f866b554d012312e4d8dd704e4d745a39520a | [] | no_license | JollyGoal/nat_dj | 05f29542e16163bc0caeaa57eb1d38a32bc0b3d8 | 87108190634646049854ea1c476009f42ba36bc8 | refs/heads/main | 2023-03-07T17:41:17.372621 | 2021-02-25T15:00:31 | 2021-02-25T15:00:31 | 341,239,414 | 0 | 1 | null | 2021-02-25T15:00:31 | 2021-02-22T15:06:40 | JavaScript | UTF-8 | Python | false | false | 393 | py | """
ASGI config for infosite project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETT... | [
"air.jordan.negga@gmail.com"
] | air.jordan.negga@gmail.com |
7f86995b2dfe09fcca5abfae4bdfb29cc9ad288a | e09f8dab8167e4c7f1722c6935c2ef7ab22bcb54 | /d10/p1.py | d0d1dbf04f4be4c24f43e28116cc1e7fdc6f18ee | [] | no_license | LucaLumetti/AdventOfCode2020 | b963fff26d0535bf23f8eaeb06face3119123341 | 5ae7b856b5cd0ae0a2b59c8f7cfeb181a7e42092 | refs/heads/main | 2023-02-05T15:26:00.619161 | 2020-12-25T14:42:45 | 2020-12-25T14:42:45 | 317,498,841 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 177 | py | import numpy as np
f = np.array([int(n) for n in open('input','r')])
f.sort()
f = np.concatenate(([0],f,[f.max()+3]))
diff = f[1:]-f[:-1]
print((diff==1).sum()*(diff==3).sum())
| [
"lumetti.luca@gmail.com"
] | lumetti.luca@gmail.com |
d5dd315a4312ccf716b32a67270966c63d473c4a | ac37ed07d8c43bf1492315260f3dbec99ed9f04a | /剑指offer/二进制中1的个数.py | c4664ee0b9044ccc667e904b639369963781585b | [] | no_license | PercyT/-offer-Python- | 60e9d9faf9119ca28b6fcdc8d075fb104e6bcedc | dc23fb90645d1cf51024e924f46f424967d84572 | refs/heads/master | 2020-12-22T04:04:14.047984 | 2020-01-28T07:41:19 | 2020-01-28T07:41:19 | 236,665,463 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 368 | py | def number(num:int)->int:
flag = 1
count = 0
for i in range(0,32):
if num&flag:
count += 1
flag = flag << 1
return count
def newnumber(num:int)->int:
"""和本身先减一的数取反,然后再与"""
count = 0
while num:
count = count+1
num = (num-1)&num
return count
pr... | [
"508016986@qq.com"
] | 508016986@qq.com |
96f253385c98c35544ec68f6785f80678b6acdea | 4bd5e9b67d98bfcc9611bd8b774c9ab9f4f4d446 | /Python基础笔记/3/作业3/1.py | d2a733ff528865f5b1eea2cad44364b041c4a977 | [] | no_license | zhenguo96/test1 | fe21510aea7feb674e52fd7a86d4177666f841c5 | 0d8de7e73e7e635d26462a0bc53c773d999498be | refs/heads/master | 2020-05-03T13:09:53.592103 | 2019-04-06T07:08:47 | 2019-04-06T07:08:47 | 178,646,627 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 462 | py | # 1.根据(1-7)的数值不同。打印对应的星期英文
day = float(input("请输入1-7中的一个数:"))
if day == 1:
print("Monday")
elif day == 2:
print("Tuesday")
elif day == 3:
print("Wednesday")
elif day == 4:
print("Thursday")
elif day == 5:
print("Friday")
elif day == 6:
print("Saturday")
elif day == 7:
print("S... | [
"1148421588@qq.com"
] | 1148421588@qq.com |
9914e2e1e6e32389ce0d5210229968f8e42407a5 | 168722f721fec91541074ad7e7e65ee62f6ba112 | /e10.py | 1aeb60f4bf844ab2116dd88f31690029a3eeea5e | [] | no_license | zacharia/project-euler | e5a3eb14d183f6cca40213210e0b82efe27a2c0e | 584082ade22eb9754d82dc373e1ce9d14bc963a4 | refs/heads/master | 2021-01-20T10:10:41.374577 | 2012-10-02T20:30:06 | 2012-10-02T20:30:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 652 | py | #!/usr/bin/python
from math import *
def is_prime_naive(num):
num_sqrt = int(ceil(sqrt(num)))
for i in range(2,num_sqrt+1):
if num % i == 0:
return False
return True
def sum_of_primes(num):
curr_num = 0
total = 5 #to account for 2 and 3
while curr_num < num:
... | [
"zcrumley@solar.ubuntu"
] | zcrumley@solar.ubuntu |
66849c781293172aa93becad45677b3ae98d7942 | 2197e8e6fe2ac5e602fe08db885c71bf25a8acfb | /onyx/pyrite/pyrite/ChangePropertyValueCommand.py | 0a5c39a649e4df88cfc32dad69593ff9eed74b28 | [] | no_license | countrymarmot/deca_tech | 2a43f052b1bbbfa615636fba90e5885af25cc32e | edf8a4d039e5b677b3d38324ac841b4443dab56a | refs/heads/master | 2016-09-05T10:25:26.387718 | 2014-03-25T02:45:53 | 2014-03-25T02:45:53 | 18,086,655 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 875 | py | # ChangePropertyValueCommand.py
# Created by Craig Bishop on 06 July 2012
#
# pyrite
# Copyright 2012 All Rights Reserved
#
from Command import Command
class ChangePropertyValueCommand(Command):
def __init__(self, dobj, propName, newValue, model=None, index=None):
self.designObj = dobj
self.propName = propN... | [
"boqiling@gmail.com"
] | boqiling@gmail.com |
204e935385d1c4510ae07351fb087e2c6b689276 | 6e25c7af9e1b9e5905ae9e839ff6f3f8fd4ed221 | /video_auto/二次剪辑/util/img_utils.py | bfebc3947b9e25a1f0635e409084a269d56eb759 | [
"Apache-2.0"
] | permissive | roceys/tools_python | 8dc6f2d21b68f682eec412beb56524e7d72d194c | 9c8d5c1c7c1ae4a4c857a65f5b5f14da1c90e425 | refs/heads/master | 2023-01-05T06:18:50.411999 | 2020-11-01T18:02:37 | 2020-11-01T18:02:37 | 271,776,767 | 0 | 0 | Apache-2.0 | 2020-11-01T18:02:38 | 2020-06-12T10:58:36 | null | UTF-8 | Python | false | false | 1,431 | py | #!/usr/bin/env python
# encoding: utf-8
"""
@version: v1.0
@author: xag
@license: Apache Licence
@contact: xinganguo@gmail.com
@site: http://www.xingag.top
@software: PyCharm
@file: img_utils.py
@time: 2019-12-25 14:23
@description:图片工具类
"""
import cv2
from moviepy.video.VideoClip import ImageClip
from m... | [
"xinganguo@gmail.com"
] | xinganguo@gmail.com |
dbb50044dbe2f11200f23c22e4710f8b05fe4a41 | 97676f59bdd398f00bc0939c40a30c1f07e523c6 | /course-files/lectures/lecture11/answers/03_give_grade.py | a105e0a34f90cb9671110df7c99d3182aa0e2b81 | [] | no_license | eecs110/fall2020 | db1b0f9036f9a0036ff5cc6ba5c30ba6fa5cffed | 81363c4f1c192f8366456a44df8988298809146b | refs/heads/master | 2023-01-29T05:49:36.452055 | 2020-12-02T20:58:43 | 2020-12-02T20:58:43 | 289,575,477 | 1 | 3 | null | null | null | null | UTF-8 | Python | false | false | 436 | py | def give_grade(score):
if score >= 90:
return 'A'
elif score >= 80:
return 'B'
elif score >= 70:
return 'C'
elif score >= 60:
return 'D'
else:
return 'F'
print('65:', give_grade(65))
print('99:', give_grade(99))
print('84:', give_grade(84))
print('76:', give_g... | [
"vanwars@gmail.com"
] | vanwars@gmail.com |
9bbe2b7dc65ea44ce4451904e3a4d0ea8e2df1f9 | 8b05bdbd1650cd9db9db066bb19e314f6ca8b375 | /pythonLevel2/hexin2/hexin2chpter16_Socket.py | 0fbe72d47d21a5b12461f2fe1e8465df3c64dc46 | [] | no_license | CSeven19/PythonLevelUp | b9783b96159376d2c09fa4adb8012d31ca304115 | e232ca555194bc8f4d5f7773061d7ed73e18dab7 | refs/heads/master | 2023-01-10T17:22:50.957098 | 2020-11-16T03:41:19 | 2020-11-16T03:41:19 | 313,182,073 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,855 | py | # 网络编程
#
# 16.1socket()模块套接字
# s.bind() 绑定地址(主机,端口号对)到套接字
# s.listen() 开始 TCP 监听
# s.accept() 被动接受 TCP 客户的连接,(阻塞式)等待连接的到来
# 客户端套接字函数
# s.connect() 主动初始化 TCP 服务器连接
# s.connect_ex() connect()函数的扩展版本,出错时返回出错码,而不是抛异常
# 公共用途的套接字函数
# s.recv() 接收 TCP 数据
# s.send() 发送 TCP 数据
# s.sendall() 完整发送 TCP 数据
# s.recvfrom() 接收 UDP 数据
#... | [
"1010919912@qq.com"
] | 1010919912@qq.com |
4f82a4e97672d4f0c016b0d1b25590076f38187a | 847177b00a6d28a075b57f29ae37a3da7d9ce823 | /setup.py | d28ffb184f2b7fe85e528e37e1565693800c8b3b | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-2-Clause"
] | permissive | pcdshub/recordits | 3faccfb76b3fdcabd575e21da3d6c81079b2daf0 | c89f6b59accd430f26ea38b1660f74350be8aa37 | refs/heads/master | 2021-11-12T10:33:25.038276 | 2021-10-29T16:56:22 | 2021-10-29T16:56:22 | 235,641,592 | 0 | 2 | NOASSERTION | 2021-04-15T18:27:18 | 2020-01-22T18:48:04 | Python | UTF-8 | Python | false | false | 2,101 | py | import sys
from os import path
from setuptools import find_packages, setup
import versioneer
min_version = (3, 6)
if sys.version_info < min_version:
error = """
recordits does not support Python {0}.{1}.
Python {2}.{3} and above is required. Check your Python version like so:
python3 --version
This may be due... | [
"klauer@slac.stanford.edu"
] | klauer@slac.stanford.edu |
7a1548852e88b61dbb309d1364c4a34dac13a657 | 105212e4d2d2175d5105e05552e29b300375e039 | /TensorFlow_tutorials/tf-example-api-master/stylenet-master/stylenet_patch.py | ec19c5a837402de8c6543f0803cac6e6b4e2c767 | [] | no_license | Asher-1/AI | 84f0c42651c0b07e6b7e41ebb354258db64dd0d1 | a70f63ebab3163f299f7f9d860a98695c0a3f7d5 | refs/heads/master | 2022-11-26T07:24:37.910301 | 2019-05-30T13:04:31 | 2019-05-30T13:04:31 | 160,031,310 | 7 | 1 | null | 2022-11-21T22:02:53 | 2018-12-02T09:19:03 | Jupyter Notebook | UTF-8 | Python | false | false | 17,492 | py | from __future__ import print_function
import time
import inspect
import os
import numpy as np
import skimage
import skimage.io
import skimage.transform
import tensorflow as tf
import custom_vgg19
import stylenet_core
output_path = 'G:/develop/PycharmProjects/datasets/result_outputs/stylenet_master_output/'
def get_... | [
"ludahai19@163.com"
] | ludahai19@163.com |
b4f0f80b41c8beb451c868f93515531afd5e3354 | bda8bfe789e16eb31905145671168bba1c7f79b7 | /crudproject/urls.py | 7f4fe3311afaf1af0823b961fd049d521963ab86 | [] | no_license | jeongyeonchoi/likelion_8 | 140f83934c7c9957485a9acec96139e6871a4c9a | fe1c57bbe09702ffd15ca71e00ef2a7cdb2b8221 | refs/heads/master | 2021-06-20T05:59:33.846252 | 2019-07-27T16:44:03 | 2019-07-27T16:44:03 | 187,801,517 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,246 | py | """crudproject URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/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-b... | [
"woodchuck98@naver.com"
] | woodchuck98@naver.com |
c47d7592fbbd412b215468340d3000c160e9a061 | 3c65c697ddfade65a74bdb4ae27bd41a7ce171d2 | /paymentapp/migrations/0008_emp_account.py | 1aa33ff7e2511df270081e9274fe7742725938c3 | [] | no_license | pedhababu/-Online-Payroll-System | cc1d776d93afc31c7ddd41937d67df4d41f57c5d | 9c20c91abd69971ca5e557ded574c8dfad7db42f | refs/heads/main | 2023-01-30T06:30:49.913482 | 2020-12-14T05:05:44 | 2020-12-14T05:05:44 | 318,046,559 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 798 | py | # Generated by Django 2.0.7 on 2018-12-17 12:36
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('paymentapp', '0007_emp_login'),
]
operations = [
migrations.CreateModel(
name='Emp_account',
fields=[
... | [
"noreply@github.com"
] | pedhababu.noreply@github.com |
1614b8dc504ee70632276cb621820b7f3ea4342a | c10d41b6e3c2f79238d35df5638d0a12e49038c8 | /comments/views.py | 098cbd067c87e48035e0ca32a0ff172adbd41541 | [] | no_license | BenZHONG/HelloDjango-blog-tutorial | 154fc808663002a547c1046faaea0e437a786afe | ee203ceddbdec3427d2e989f62f2ed2fb438223b | refs/heads/master | 2021-05-19T09:24:45.830738 | 2020-03-31T14:30:46 | 2020-03-31T14:30:46 | 251,541,414 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,387 | py | from django.shortcuts import get_object_or_404, redirect, render
from django.views.decorators.http import require_POST
from django.contrib import messages
from blog.models import Post
from .forms import CommentForm
@require_POST
def comment(request, post_pk):
# 先获取被评论的文章,因为后面需要把评论和被评论的文章关联起来。
# 这里我们使用了 djang... | [
"zhiliangzhong@gmail.com"
] | zhiliangzhong@gmail.com |
a086bb77f15c4423e391f08093688729ccd801cf | e633f475b4029258fe58fa71eecb9abfc5eb25b3 | /onefeature.py | c5ee29855a0d3aea6accec8ed664837678d2b77c | [] | no_license | mlforcada/simpleqe | a9b3cf5572171c0997b550cd3c2ed47c6b7fd1a2 | be6fc247bcef39eabd90f22b4cb4828c16a17192 | refs/heads/master | 2021-01-12T02:04:38.837171 | 2018-12-04T08:07:20 | 2018-12-04T08:07:20 | 78,465,474 | 0 | 0 | null | 2018-10-17T07:04:52 | 2017-01-09T20:20:42 | Python | UTF-8 | Python | false | false | 1,645 | py | #!/usr/bin/python
# Mikel L Forcada 2017
#
# Single feature, MAE-minimized, quality estimation and testing
import sys
import argparse
import math
reload(sys)
sys.setdefaultencoding("utf-8")
def readdata(filename):
return ((open(filename).read()).rstrip("\n")).split("\n")
# main
# Argument parsing
parser = ar... | [
"mlf@dlsi.ua.es"
] | mlf@dlsi.ua.es |
60990ad16c085890d930ad6a9a48be8afc3d4dd0 | 5d0a872e926f3b457c4824c4ed49c4551e09d858 | /utils/mail.py | 31ee7e3ee0bd822271c0fe9000e95fc3890173a5 | [] | no_license | zxg-com/Selenium_ddt | 47c782f14f849a42cce9954129ee69063256d9ec | 02dd9506ab4696c68d899ac591e9c9a137344d49 | refs/heads/master | 2021-07-08T13:40:32.533639 | 2019-04-18T01:47:50 | 2019-04-18T01:47:50 | 150,944,914 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,908 | py | #coding:utf-8
"""
初始化时传入全部所需数据,message是正文,可不填,path可以传list或者str;receiver支持多人,用”;”隔开就行
邮件类。用来给指定用户发送邮件。可指定多个收件人,可带附件。
常见错误:
账户密码出错
服务器sever出错,这个可以根据你的发送人的邮箱去网站或邮箱设置中查看到
邮箱没有开通smtp服务,一般在邮箱设置中
邮件被拦截,在title、message以及发送的文件中不要带明显乱码、广告倾向的字符
sender跟loginuser不一致的问题,发送人必须是登录用户
"""
import re
import smtplib
from em... | [
"342509492@qq.com"
] | 342509492@qq.com |
960c1dcaadcfba8493fc0f6c1e46b0b1d3db1a08 | cbbc2c6d7bafcf620310c1dd88a978d7235cabc9 | /从1到n的整数中1出现的次数.py | c122053521efd41bae2a668f6490d0f20f05023c | [] | no_license | lovelaker007/Algorithms_Python | 56498de0a5ff7db641c2e350420b93ca0d449097 | 33ff9d759e14714a500197189f7551e986651829 | refs/heads/master | 2022-05-23T22:44:35.812976 | 2022-05-06T09:15:18 | 2022-05-06T09:15:18 | 143,270,709 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,717 | py | # -*- coding:utf-8 -*-
'''
输入一个整数n,求从1到n这n个整数的十进制表示中1出现的次数。
例如输入12,从1到12这些整数中包含1的数字有1,10,11和12,1一共出现了5次
'''
'''
一位数:1 0-9
二位数:9*1+10+1 = 20 0-99
三位数:9*20+100+20 = 300 0-999
四位数:9*300+1000+300 = 4000
'''
# 暴力解法
def func1(x):
num = 0
for i in range(x+1):
m = str(i)
for n in m:
if n ... | [
"lovelaker7@gmail.com"
] | lovelaker7@gmail.com |
61ce88ac3c84ed9898f39296d333c55b14b1085a | 5b0cc4bf2e7f61f7a334528407e7f962744d282b | /Area of a triangle.py | b2dfcd32861c9fa34b467e07f78c57800ac17ee4 | [] | no_license | Onososen/CODE-LIKE-GEEK-TUTOR | 1471a2216caa194618dfee2889003f3096da6662 | 9544865dc8cda29acf8e912a79c644f74ef4f792 | refs/heads/master | 2020-03-26T10:51:06.155949 | 2018-08-15T07:21:24 | 2018-08-15T07:21:24 | 144,817,692 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 189 | py | #PROGRAM TO CALCLULATE AREA OF A Triangle
b = float(input("What is the base:\n"))
h = float(input("What is the height:\n"))
area = (b * h)/ 2
answer = round(area,2)
print(answer)
| [
"noreply@github.com"
] | Onososen.noreply@github.com |
9d58fd2a9e1c1a1f5f4f035ed1973b5c9ea58e8b | e65c3dc8290554884c321e61861e97088923fae9 | /explore_parameters.py | 28e0de5bb0094d35c9466c7546198ca5857f2ae5 | [] | no_license | uvjar/multi-arm | 77c8f3c97fc2798eb611fba03ec0005188c55526 | 72c838b8df1b3237352b51444bfa281d9373eac0 | refs/heads/main | 2023-04-19T20:46:57.412242 | 2021-05-05T23:26:31 | 2021-05-05T23:26:31 | 308,885,965 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,939 | py | import BLC
import numpy as np
import pandas as pd
import sys
import math
from timeit import default_timer as timer
import scipy.sparse as sp
from scipy import linalg
import argparse
import random
import os.path
from sklearn.cross_validation import train_test_split
import warnings
warnings.filterwarnings("ignore", categ... | [
"820672172@qq.com"
] | 820672172@qq.com |
23808f5f29266b7967cf32299e52c7fdb6f9e29c | 2c9fd92a6bc172feab958d31e26e2e762457c1c5 | /mofan8.py | 638297bce5b52fe26211b85dd82be6475ba5c4b9 | [] | no_license | yuanjh6/python_sklearn | a24fdce110b9bcc8d03bc89b9ccb400f4198b181 | 8358efb23f76f0e40767c8d4f4b11846d5a5f48b | refs/heads/master | 2021-05-17T10:30:26.907840 | 2018-12-02T02:11:38 | 2018-12-02T02:11:38 | 250,739,099 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 657 | py | #encoding=utf-8
#第8课:交叉验证
from sklearn import datasets
load_data=datasets.load_iris()
data_x=load_data.data
data_y=load_data.target
from sklearn.cross_validation import cross_val_score
import matplotlib.pyplot as plt
from sklearn.neighbors import KNeighborsClassifier
k_range=range(1,31)
k_scores=[]
for k in k_rang... | [
"yuan@yuan.com"
] | yuan@yuan.com |
a031b359534527af9c62e7f20c4c627bb0f7dcca | 2f98aa7e5bfc2fc5ef25e4d5cfa1d7802e3a7fae | /python/python_27903.py | c51c1c14ea2cba4e5762137f75c1cd767b1c7fab | [] | no_license | AK-1121/code_extraction | cc812b6832b112e3ffcc2bb7eb4237fd85c88c01 | 5297a4a3aab3bb37efa24a89636935da04a1f8b6 | refs/heads/master | 2020-05-23T08:04:11.789141 | 2015-10-22T19:19:40 | 2015-10-22T19:19:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 74 | py | # invalid syntax when run cProfile
%run -m cProfile simple_test_script.py
| [
"ubuntu@ip-172-31-7-228.us-west-2.compute.internal"
] | ubuntu@ip-172-31-7-228.us-west-2.compute.internal |
60157b369cc22a6a9f5f1b056bca07995505f08f | 4e3d033960b31e37c038bc4ff72fe947ec0841b4 | /lang/dlgparser.py | 9b19f73bfd1d6f12d96c4df995f4333da48bd230 | [] | no_license | darrickyee/pyinterp | d2f3309e98b9a5564bd702563cd616f5facabeb3 | 8b085e288aa72fc1473356d0891fc99278c45821 | refs/heads/main | 2023-06-02T07:52:08.581447 | 2021-06-26T12:53:17 | 2021-06-26T12:53:17 | 331,314,008 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 18,813 | py | #!/usr/bin/env python3.8
# @generated by pegen from <string>
import ast
from typing import Optional, Any
from pegen.parser import memoize, memoize_left_rec, logger, Parser
from .parseinit import (
flatten,
get_str,
Cond,
PyExec,
PyExpr,
Section,
Line,
Choice,
Goto
)
class Generat... | [
"darrick.yee@gmail.com"
] | darrick.yee@gmail.com |
3ec953a961a2bc4424f63679e9c480798492f6a2 | 72d010d00355fc977a291c29eb18aeb385b8a9b0 | /LiveControl_2/os.py | 553680cbebdb60aea6426b50f01be8384942f877 | [] | no_license | maratbakirov/AbletonLive10_MIDIRemoteScripts | bf0749c5c4cce8e83b23f14f671e52752702539d | ed1174d9959b20ed05fb099f0461bbc006bfbb79 | refs/heads/master | 2021-06-16T19:58:34.038163 | 2021-05-09T11:46:46 | 2021-05-09T11:46:46 | 203,174,328 | 0 | 0 | null | 2019-08-19T13:04:23 | 2019-08-19T13:04:22 | null | UTF-8 | Python | false | false | 25,644 | py | r"""OS routines for Mac, NT, or Posix depending on what system we're on.
This exports:
- all functions from posix, nt, os2, mac, or ce, e.g. unlink, stat, etc.
- os.path is one of the modules posixpath, ntpath, or macpath
- os.name is 'posix', 'nt', 'os2', 'mac', 'ce' or 'riscos'
- os.curdir is a string ... | [
"julien@julienbayle.net"
] | julien@julienbayle.net |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.