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 220
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 257
values | content stringlengths 2 10.3M | authors listlengths 1 1 | author_id stringlengths 0 212 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
05cc3ba1a5dd1f89efd2bab642e7f3ce8dc47824 | 2c0bc2b556fc0ca1d275ca683acdb677e07c1d22 | /app/CC/migrations/0007_auto_20200512_1809.py | 3a8433a89d251c2ba050acac3197a473ea303749 | [] | no_license | KolbeinnIn/Verklegt-namskeid-II | 99b8cfe6c829693e06e8fa2af6404d4f1287ae21 | 56afe071ca6d92a48cca7126c31a5c189378ce3f | refs/heads/master | 2022-07-17T08:52:06.005997 | 2020-05-16T11:04:08 | 2020-05-16T11:04:08 | 259,033,039 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 430 | py | # Generated by Django 3.0.6 on 2020-05-12 18:09
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('CC', '0006_category_children'),
]
operations = [
migrations.AlterField(
model_name='category',
name='children',
... | [
"bjarkithorjonsson@gmail.com"
] | bjarkithorjonsson@gmail.com |
8730d58aed4341d6bb3e7fc6860ff9e1ad2d13ce | 16f524cf688f3cc673883544bc8af4fed8bb0436 | /demo.py | fdd0db6670f51bbb78674b2905ea0ae7ddb4e46c | [] | no_license | Alroomi/Song-Classification | de2fff43169eba4024f4e4111d9d80a5b7ad7098 | 066ebf50b27a4c25a19da3bc4df05d9a41a5efac | refs/heads/master | 2021-05-06T13:32:00.777472 | 2017-12-05T20:36:26 | 2017-12-05T20:36:26 | 113,230,163 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,694 | py | import os, os.path, sys
import h5py
import numpy as np
import pickle as pkl
from configs_genre import gen_config as genre_config
from configs_gender import gen_config as gender_config
from configs_year import gen_config as year_config
from models.ann import Classifier
from models.cnn import CNNClassifier
from feature... | [
"31593907+Alroomi@users.noreply.github.com"
] | 31593907+Alroomi@users.noreply.github.com |
530b1900656472b2656291a8b0a6454f5800aa69 | 077617fac92c16de69c8ae2f0e38b44754a892e9 | /udp.py | 16ef2f967c3f02bf644549ca8fe65e3a11751d7d | [] | no_license | ivanahepjuk/nbiot_rpi-shield | e8af1a249ef96184ad310e7d93ab0009f1e0ddf8 | 45d40dbc9a922c4f89e04c2f3cf2e2f1f387ff4a | refs/heads/master | 2021-07-20T08:10:30.321922 | 2017-10-28T12:09:03 | 2017-10-28T12:09:03 | 108,380,921 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,245 | py | #!/usr/bin/env python
import socket
import serial
import time
import math
#UDP settings:
UDP_IP = "89.103.47.53" #89.102.98.39"
UDP_PORT = 8089
#serialport settings:
#ser = serial.Serial('/dev/ttyACM3', 9600, timeout=61, xonxoff=False, rtscts=False, dsrdtr=False)
#serial flushing
time.sleep(0.5)
#ser.flushInput()... | [
"ivanahepjuk@gmail.com"
] | ivanahepjuk@gmail.com |
6472b56dba93e6e79962129ca72af412695bb634 | ae4441d5f79a46dbd99a575bd814842f5cbbc181 | /django_azure_linebot/urls.py | f4c5b24b1eab528b630f191685df68c6840a7e6e | [] | no_license | chrissmart/django_azure_linebot | 938ee389316f99e897f0767c3fd9b003ae2e2d7b | 1c2d88ea8c55e64dedb880dc45c9cd885e6a301e | refs/heads/master | 2021-01-01T19:58:04.185177 | 2017-07-29T12:38:09 | 2017-07-29T12:38:09 | 98,731,457 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 777 | py | """django_azure_linebot URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='ho... | [
"mr.clare007@hotmail.com"
] | mr.clare007@hotmail.com |
e29d4d92cca7b4533c0b30e395a0f3b88edea30c | 1cd9ea9920326561830ea31dde3c5507670a4dd8 | /check_sudoku.py | ec9297f2f43443d4d76c2ad51d61de606be7c1c5 | [] | no_license | iamtraction/CS101-Udacity | d0b34174e088ccb8c6b6923a6afb6a151ae1bdc7 | 9842335bec48c45ee9f5e84d5ab064b7d8e2bcb3 | refs/heads/master | 2021-06-20T10:26:49.538644 | 2017-07-30T15:04:08 | 2017-07-30T15:04:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,459 | py | # THREE GOLD STARS
# Sudoku [http://en.wikipedia.org/wiki/Sudoku]
# is a logic puzzle where a game
# is defined by a partially filled
# 9 x 9 square of digits where each square
# contains one of the digits 1,2,3,4,5,6,7,8,9.
# For this question we will generalize
# and simplify the game.
# Define a procedure, check_s... | [
"snkrsn.kampa@gmail.com"
] | snkrsn.kampa@gmail.com |
24bce9adfd9986c448487e74e16658ad17c265dd | 786de89be635eb21295070a6a3452f3a7fe6712c | /poster/tags/V00-00-01/SConscript | b190c174d8a3bdc4f9abefb1be153557a06627e1 | [] | no_license | connectthefuture/psdmrepo | 85267cfe8d54564f99e17035efe931077c8f7a37 | f32870a987a7493e7bf0f0a5c1712a5a030ef199 | refs/heads/master | 2021-01-13T03:26:35.494026 | 2015-09-03T22:22:11 | 2015-09-03T22:22:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,985 | #------------------------------------------------------------------------
# File and Version Information:
# $Id$
#
# Description:
# SConscript file for package poster
#------------------------------------------------------------------------
# Do not delete following line, it must be present in
# SConscript file for... | [
"salnikov@SLAC.STANFORD.EDU@b967ad99-d558-0410-b138-e0f6c56caec7"
] | salnikov@SLAC.STANFORD.EDU@b967ad99-d558-0410-b138-e0f6c56caec7 | |
374ed2b88911029a8ab121c1aa784973710303df | f1611fcb4029e59f9b1a16c88b4e7805659b952b | /entity extraction from speech/populate_form.py | d7cf9e30c1a8cba303b8a369d36675b576918a56 | [] | no_license | syntaxterrorr/Insurance-Fraud-Detection | c4505490ae14fdd0fefe3a9726ac82d5c47d5910 | 4989ef0cbde47b463292c4a1cfaa073f2e2bf919 | refs/heads/master | 2020-04-26T08:28:01.513387 | 2019-03-04T05:28:58 | 2019-03-04T05:28:58 | 173,423,685 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,692 | py | from rasa_nlu.model import Interpreter
import json
import speech_recognition as sr
r = sr.Recognizer()
speech = sr.AudioFile('aamir.wav')
with speech as source:
audio = r.record(source)
text = r.recognize_google(audio)
# text = u"I am calling to claim insurance for my Honda Civic that suffered an accident two day... | [
"aamir@darukhanawalla.com"
] | aamir@darukhanawalla.com |
9217751689c20a44cbffa776fd1f9c8aabb36593 | 5a396f14b3689273aaf1a6e20dcb0853d78a9f04 | /GetSharedWithDomainTeamDriveACLs.py | 0c114d9b0daa023ea4ef045d01a424197485f1cf | [] | no_license | NosIreland/GAM-Scripts3 | 642b4dd827189352afd8357a41b576d6acf159bc | de3ee3007e6906c5b6d28fef8aea27827646db00 | refs/heads/master | 2023-03-04T21:58:44.594405 | 2021-02-18T14:39:20 | 2021-02-18T14:39:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,744 | py | #!/usr/bin/env python3
"""
# Purpose: For a Google Drive User(s), delete all drive file ACLs for Team Drive files shared with a list of specified domains
# Note: This script requires Advanced GAM:
# https://github.com/taers232c/GAMADV-XTD3
# Customize: Set DOMAIN_LIST and DESIRED_ALLOWFILEDISCOVERY
# Python: Use python... | [
"ross.scroggs@gmail.com"
] | ross.scroggs@gmail.com |
655fc60113486788cda8dd340498234bbc42f5bc | 0172c529b9490f18a40d3f068dd04d994fd164a7 | /tests/test_util.py | fb6868a824e17ab1acdaa96c7d119a208b4ec171 | [] | no_license | tillahoffmann/variational_bayes | c8cbc5859d0a3ce9600d6f4f5551686a4865af47 | 590903fb4f2c39bd501ec1e42a2b1267439d2ffb | refs/heads/master | 2021-01-20T01:22:31.908349 | 2018-08-21T12:15:19 | 2018-08-21T12:15:19 | 89,263,469 | 1 | 1 | null | 2017-08-22T13:47:53 | 2017-04-24T16:34:01 | Python | UTF-8 | Python | false | false | 1,107 | py | import itertools as it
import numpy as np
import pytest
import variational_bayes as vb
@pytest.mark.parametrize('shape', [10, (3, 7)])
def test_softmax(shape):
x = np.random.normal(0, 1, shape)
proba = vb.softmax(x)
np.testing.assert_array_less(0, proba)
np.testing.assert_allclose(np.sum(proba, axis=-... | [
"tillahoffmann@gmail.com"
] | tillahoffmann@gmail.com |
dc5f47e41dd896ee44f05aa76d5189db027ffe70 | d2c4151eff768af64946ababc2e41c13d8973cd3 | /ABC146/a.py | c10b5d53d83522345cefe135c52ff627ef03099c | [] | no_license | Intel-out-side/AtCoder | 2de19b71981247135432aed2d6d9c2a16c3ab7f0 | 0c419d2df15fff02032432cb1b1323612484e16e | refs/heads/master | 2022-06-23T04:21:12.886072 | 2022-06-13T14:39:07 | 2022-06-13T14:39:07 | 235,240,853 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 181 | py |
week = ["MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN"]
day = str(input())
if day == "SUN":
result = 7
else:
result = week.index("SUN") - week.index(day)
print(result)
| [
"so.eng.eng.1rou@gmail.com"
] | so.eng.eng.1rou@gmail.com |
1d7c655cada6cc584bc771570befda0a77c18d18 | 0f0570125ecbbdfda0acaed9d3ec0a297616f79a | /day4/part1.py | d4665159f88161442f8958dc01d42adf0a30d047 | [] | no_license | na-wu/2019-aoc | 3b3689d13cab22a4200f177fd6e28adada36a303 | ad91fb704c00b590dcd89c1f67d9d1738b866fbd | refs/heads/master | 2020-09-23T10:28:28.497778 | 2019-12-24T22:33:46 | 2019-12-24T22:33:46 | 225,477,008 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,097 | py | RANGE1 = 124075
RANGE2 = 580770
# Transform @param num into int array
# iteratively check if each element has an identical neighbour
# Return True immediately if found, presence of more identical neighbors ignored
def checkAdjacent(num: int) -> bool:
arr = list(map(int, str(num)))
for j in range(len(arr) - 1... | [
"nwu1018@gmail.com"
] | nwu1018@gmail.com |
cf6a0c4833d16887ee9ee3e5afefb8ed33431c13 | eacff46eda2c6b509449979a16002b96d4645d8e | /Collections-a-installer/community-general-2.4.0/tests/integration/targets/launchd/files/ansible_test_service.py | 87a23fc47d816bb4b2deacd93a3bcfb45fbf1a9f | [
"MIT",
"GPL-3.0-only",
"GPL-3.0-or-later"
] | permissive | d-amien-b/simple-getwordpress | 5e6d4d15d5f87124ab591e46b63fec552998fdc3 | da90d515a0aa837b633d50db4d91d22b031c04a2 | refs/heads/master | 2023-04-08T22:13:37.347545 | 2021-04-06T09:25:51 | 2021-04-06T09:25:51 | 351,698,069 | 0 | 0 | MIT | 2021-03-31T16:16:45 | 2021-03-26T07:30:00 | HTML | UTF-8 | Python | false | false | 594 | py | #!/usr/bin/env python
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import sys
if __name__ == '__main__':
if sys.version_info[0] >= 3:
import http.server
import socketserver
PORT = int(sys.argv[1])
Handler = http.server.SimpleHTTPRequestHand... | [
"test@burdo.fr"
] | test@burdo.fr |
ce6adbff5e4323bd42d9c2f2edf80e4909dc4551 | 177fd37d63ab37aa66b5054f74a018aa788a6183 | /trips-backend/besttrips/wsgi.py | b4e04dbbfbc8bb7a769961f2d2cf3656db4bec99 | [
"MIT"
] | permissive | pgarr/best-trips | 504475adfb3c72d558c5c4d036a8eb447296cf64 | edc45f6e822b70aa9bfa6f9d4ee8b2c58df54310 | refs/heads/main | 2023-03-29T01:32:03.285668 | 2021-04-13T17:19:33 | 2021-04-13T17:19:33 | 342,875,208 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 395 | py | """
WSGI config for besttrips 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
os.environ.setdefault('DJANGO_SET... | [
"garlej.p@gmail.com"
] | garlej.p@gmail.com |
8916c15193078890d423b88049af7ba61c106438 | 00d5a9202f3dde90b760dfef63932f862d8e1b52 | /nsx.py | bea933d58b83a04e2357d640b48d57171f4131f7 | [] | no_license | sariego/blender-simulation-visualizer | 2cc021d47f19e205d04ba9a650e7330375ff0c5c | b82ee509fee439b7d6a7e895ef98377d066a84ab | refs/heads/master | 2021-05-27T23:19:14.350497 | 2014-11-05T02:02:11 | 2014-11-05T02:02:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,128 | py |
from t3dclasses import *
from spagheti import *
from itehgaps import *
root = Tk()
root.resizable(0,0)
root.title('Visor de trayectoria de particulas')
root.iconbitmap('xyz.ico')
note = Notebook(root)
note.pack()
##first = Frame(root)
##directorio = DirectoryGetter(first)
##frames = FramesGetter(first)
##limits = Li... | [
"pedrosariego@gmail.com"
] | pedrosariego@gmail.com |
acef9f70b1845e351623099172b72e8864af5bd7 | ca1342a596280070a1b1f7f702f15dc382569eb7 | /guessingGame.py | 4c66b69ad167916d11659f4f074c3cff3383a1a9 | [] | no_license | Lakshya7312/python_number_guesser | 0de0e939f86f6bd66232a38ec589a08df889e343 | 0a7156074de4506ab9374befc7822d76840aeec5 | refs/heads/main | 2023-02-26T21:33:39.038699 | 2021-02-02T08:39:44 | 2021-02-02T08:39:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 945 | py | # Import the random module for generating random numbers
import random
# Message to start game & instructions
print("\nA number between 1 and 9 has been generated!\nYou have only 5 chances to guess the number!\nStart Guessing!\n")
# Initializing variables
number = random.randint(1, 9)
guessCount = 0
# The ... | [
"noreply@github.com"
] | Lakshya7312.noreply@github.com |
3e9b1c5df00f5f386c3f78b3a37146483923a0fc | 69c5ff8edc25452a6732caf74de020eedaaf5a69 | /signal_test.py | cfe0e1dca1294e184fdc5d764f61b1d61333f0a0 | [] | no_license | ree-rishun/IoH | e7a97dfe3858b0d88237b0f84468f41b67d7110c | af66c25e17e00b5da46cd0c99bafab395c85bae4 | refs/heads/master | 2020-07-03T05:57:20.152574 | 2019-08-12T05:53:47 | 2019-08-12T05:53:47 | 201,810,265 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,680 | py | # -*- coding: utf-8 -*-
# import
import time
import sys
import wiringpi
import RPi.GPIO as GPIO
# 宣言
# GPIO Pin
SPICLK = 11
SPIMOSI = 10
SPIMISO = 9
SPICS = 8
# GPIO config
GPIO.setmode(GPIO.BCM)
GPIO.setup(SPICLK, GPIO.OUT)
GPIO.setup(SPIMOSI, GPIO.OUT)
GPIO.setup(SPIMISO, GPIO.IN)
GPIO.setup(... | [
"ree0432@gmail.com"
] | ree0432@gmail.com |
19e5431649b0241c81c88ff498959a3fad797237 | 4f179fdd48108020f49064be6686abcaac69d1ef | /Medium/11_container_with_most_water.py | 95dfcdd654e6cd1fec0561ba2c9be6f804acfe7a | [] | no_license | RuchitDoshi/LeetCode_Practice | b1e4fc64b9e8b5b60b1d4c115d7f1477b83fa6dc | 48dd00abc4b71e83b475ecdac23bc3ddbe55641e | refs/heads/master | 2023-03-04T07:45:28.978099 | 2021-02-14T04:46:14 | 2021-02-14T04:46:14 | 283,289,648 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 467 | py | class Solution:
def maxArea(self, height) -> int:
area=0
head=0
tail=len(height)-1
while(head!=tail):
if (height[head] < height[tail]):
temp=(tail-head)*(height[head])
head+=1
else:
temp=(tail-head)*hei... | [
"doshiruchit12@gmail.com"
] | doshiruchit12@gmail.com |
4cbf6e3fcafd24fc240850a479e41ddfe6d770ac | d5b339d5b71c2d103b186ed98167b0c9488cff09 | /marvin/cloudstackAPI/deleteCondition.py | e6c1d13261e1a92194f4e5a345cf1351557e1bd8 | [
"Apache-2.0"
] | permissive | maduhu/marvin | 3e5f9b6f797004bcb8ad1d16c7d9c9e26a5e63cc | 211205ae1da4e3f18f9a1763f0f8f4a16093ddb0 | refs/heads/master | 2020-12-02T17:45:35.685447 | 2017-04-03T11:32:11 | 2017-04-03T11:32:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 705 | py | """Removes a condition"""
from baseCmd import *
from baseResponse import *
class deleteConditionCmd (baseCmd):
typeInfo = {}
def __init__(self):
self.isAsync = "true"
"""the ID of the condition."""
"""Required"""
self.id = None
self.typeInfo['id'] = 'uuid'
self... | [
"int-mccd_jenkins@schubergphilis.com"
] | int-mccd_jenkins@schubergphilis.com |
364356172473bbaedbfc17d1fa14802f452bec04 | 4493b3f0879000ab48cba198b1e059249198a740 | /dataset_config.py | 998d289cc0617edfa2f41a9eb2bfa6add1e656a3 | [
"BSD-3-Clause"
] | permissive | AGalassi/StructurePrediction18 | 7216a375d170bf27c12375af98c70a88f6f57985 | ae739e492e4ad55908b0275c49e54d7586a481da | refs/heads/master | 2023-06-08T15:54:04.424556 | 2023-05-24T09:17:21 | 2023-05-24T09:17:21 | 125,429,569 | 11 | 6 | BSD-3-Clause | 2023-03-24T22:24:10 | 2018-03-15T21:44:36 | Python | UTF-8 | Python | false | false | 17,951 | py | __author__ = "Andrea Galassi"
__copyright__ = "Copyright 2018, Andrea Galassi"
__license__ = "BSD 3-clause"
__version__ = "0.0.1"
__email__ = "a.galassi@unibo.it"
"""
output_units : (link classifier, relation classifier, source classifier, target classifier)
"""
dataset_info = {"AAEC_v2": {"output_units": (2, 5,... | [
"a.galaxy@outlook.it"
] | a.galaxy@outlook.it |
8f80e791626212567e6315fb22f46ac16819c206 | 59f2c160c6497ad60c5eb30ba9408942b46aabf1 | /smartcab/simulator.py | a6cd662855505b76698d98072e3aca0cd2ba276a | [] | no_license | atrij/ai_cabdriver | bfd11568471e9dc4d5e8e252e11d87526dae09ae | 5cbc5e6305ceaf1ff9eac10720de1d2f6a70ba29 | refs/heads/master | 2021-01-21T15:03:55.952261 | 2017-06-25T18:04:10 | 2017-06-25T18:04:10 | 95,374,182 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 25,166 | py | ###########################################
# Suppress matplotlib user warnings
# Necessary for newer version of matplotlib
import warnings
warnings.filterwarnings("ignore", category = UserWarning, module = "matplotlib")
###########################################
import os
import time
import random
import importlib
i... | [
"atrij.singhal@gmail.com"
] | atrij.singhal@gmail.com |
b4f5e476d9ed960c5b7c75ae3306646d0f653c4a | b519ebf4af176a53036373ba7c59552ed8a86505 | /modelo/datosVehiculo.py | 003af032d1b96ea3042c0e9a1cfb6e9f5e5274d8 | [] | no_license | cesarmcuellar/LavaOpita | f88dd260b306977c2bb92a5f95ede61eb1e04a89 | 70b0efa0b209b265fe93552b13c0fe5fd7c38c9c | refs/heads/main | 2022-12-27T01:09:16.940067 | 2020-10-10T22:25:34 | 2020-10-10T22:25:34 | 301,786,583 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 428 | py | from flask_mysqldb import MySQL
class DatosVehiculo():
def __init__(self, mysql):
self.mysql=mysql
self.cursor=self.mysql.connection.cursor()
def consultarPorPlaca(self, placa):
consulta="select * from vehiculos where vehPlaca= %s"
self.cursor.execute(consulta,... | [
"noreply@github.com"
] | cesarmcuellar.noreply@github.com |
95284482bae6b27e575c9dba31d4eb4b90091235 | 7a9b0a37b5f7519898e58237a46542b17dbdd0b1 | /bookmark/views.py | 9527727871930c2332f09f63d8769cdf47f12003 | [] | no_license | DDIPONG/devops | 39dc1c228dba441253839669eb9c922f43e1d0f1 | 40ffd9ab074bfc635ca1865dddac18c283569b64 | refs/heads/master | 2022-12-27T12:37:23.992065 | 2020-10-06T06:46:42 | 2020-10-06T06:46:42 | 299,507,706 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 574 | py | from django.shortcuts import render
# Create your views here.
from django.views.generic import ListView, DetailView
# In order to use a classed Generic View, Import ListView and Detailview
from bookmark.models import Bookmark
#Import class Model to search Table info.
class BookmarkLV(ListView):
model = Bookma... | [
"root@ip-192-168-114-129.ap-northeast-2.compute.internal"
] | root@ip-192-168-114-129.ap-northeast-2.compute.internal |
b8b31f2f8c5f2ae17653cf45b579c862992df144 | f5ba09db506abc4d356ad7b86fdb5ffa88de61dd | /homework/HW3.py | 041df4deff63f18a6cdddb586f5fc477b69eb366 | [] | no_license | bmlee-99/my_project | 698367a9ca7aed0bb765a326e9bd2e213f93be6a | b46ad8f2c3ea3bb995b124d2ba501a8f3aec86d2 | refs/heads/main | 2023-02-20T15:50:42.085015 | 2021-01-21T10:35:42 | 2021-01-21T10:35:42 | 322,453,121 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 927 | py | from pymongo import MongoClient
client = MongoClient('localhost', 27017)
db = client.dbsparta
import requests
from bs4 import BeautifulSoup
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64)AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36'}
data = requests.get('https://w... | [
"bm.lee@erpper.com"
] | bm.lee@erpper.com |
9fe7a328b27380a9afc1f19106fa9edd8aa1033c | 21208873652ce9a35035801cea488004e337b07b | /data_loader/__init__.py | 784c4dc41287ec0e8680637c3b93983f20eae44f | [
"Apache-2.0"
] | permissive | zlszhonglongshen/crnn.pytorch | 55321a6764a6143be7ab9d2c6b3bcafcdd9470e7 | bf7a7c62376eee93943ca7c68e88e3d563c09aa8 | refs/heads/master | 2022-11-07T22:57:28.983335 | 2020-06-19T03:01:35 | 2020-06-19T03:01:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,398 | py | # -*- coding: utf-8 -*-
# @Time : 18-11-16 下午5:46
# @Author : zhoujun
import copy
from torch.utils.data import DataLoader
from torchvision import transforms
def get_dataset(data_path, module_name, transform, dataset_args):
"""
获取训练dataset
:param data_path: dataset文件列表,每个文件内以如下格式存储 ‘path/to/img\tlabel’... | [
"572459439@qq.com"
] | 572459439@qq.com |
2f6d6fbdfda9f1bfcda1e71694f8a0666de5b492 | 8c0674a5e31d4de10235e6533145ab2e15a834d9 | /0x03-python-data_structures/8-multiple_returns.py | 43d1dafa6c062b66ad3d561443d9c24e91bf0136 | [] | no_license | jdanielue/holbertonschool-higher_level_programming | 1815f86b15490998c7ca7a9a22450c8cb6968f60 | aff477e3c7629da333e0675395e9a24fdaf4dc73 | refs/heads/master | 2023-04-16T23:01:28.961579 | 2021-05-06T13:48:48 | 2021-05-06T13:48:48 | 319,405,397 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 155 | py | #!/usr/bin/python3
def multiple_returns(sentence):
if len(sentence) == 0:
return 0, None
return len(sentence), sentence[0]
| [
"jdurregoe@gmail.com"
] | jdurregoe@gmail.com |
aa5eece40af1223be935846770e0a2e01e7a3ec4 | 732a0dcf738d220b320369cdcb7bd49368fde3fe | /PythonWebServerTemplate/src/controller/index.py | 7d942fc7e2404a9a0b9c534b381a9c8f990bbe46 | [] | no_license | RogerLai/Tools | 03c50dfecf3f730210aa0e89a63ba5e34f686f4a | 1e679ea4fa07cfe618d01037f171ad6bfcfc8ae0 | refs/heads/master | 2021-01-10T15:29:19.311679 | 2015-12-23T15:15:48 | 2015-12-23T15:15:48 | 44,651,691 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 816 | py | #!/usr/bin/env Python
#coding=utf-8
'''
Created on Apr 13, 2015
@author: rogerlai
'''
import tornado.web
from common import process
from common.config import TEMPLATE_PATH, STATIC_HOST, WEB_SERVER_ADDR
loader = tornado.web.template.Loader(TEMPLATE_PATH)
class WebGetIndexHandler(tornado.web.RequestHandler): ... | [
"laixingrong@egeio.com"
] | laixingrong@egeio.com |
b1595331ebd43ebd2cf3e52cfd1d6589b83e28b2 | 391dbe903b191fd2d439947a5bf5f73d3a19db7a | /pyocd/utility/hex.py | 01040beddb958dc07d06ca5ef2fef96a41ca14c0 | [
"MIT"
] | permissive | XIVN1987/RTTView | eb45b2e5c5d7fed3178980f5f118e91af640aa5f | 05d237f0baa8dd1107018a9d560eb205c6e5432e | refs/heads/master | 2023-03-06T07:52:47.345165 | 2023-02-08T09:53:43 | 2023-02-08T09:53:43 | 138,362,483 | 80 | 27 | MIT | 2021-10-19T05:09:31 | 2018-06-23T01:40:08 | Python | UTF-8 | Python | false | false | 1,689 | py | # pyOCD debugger
# Copyright (c) 2018 Arm Limited
# SPDX-License-Identifier: Apache-2.0
#
# 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
#
# ... | [
"XIVN1987@163.com"
] | XIVN1987@163.com |
a39d2cecc8e96bfe1de6ff608258dea96d977463 | a267b269c261656bdefe99586c7dc3fb9d7f4ad1 | /lesson1/price.py | cec3719bc3d56c01438dbc07d524f51f49849deb | [] | no_license | Sandello76/learn-python | 2e6785b9d716c8b32a24a2f2712091f2a82fea60 | 7309da4fa50ddb1ca311df46fa493d69024a84ca | refs/heads/master | 2023-05-06T17:39:46.223060 | 2021-05-29T00:31:59 | 2021-05-29T00:31:59 | 367,744,547 | 0 | 0 | null | 2021-05-29T00:32:00 | 2021-05-15T22:56:55 | Python | UTF-8 | Python | false | false | 516 | py | '''price = 100
discount = 5
price_with_discount = price - price * discount / 100
print(price_with_discount)
'''
def discounted(price, discount, max_discount=20):
price = abs(float(price))
discount = abs(float(discount))
max_discount = abs(float(max_discount))
if max_discount > 99:
raise ValueE... | [
"raue76@gmail.com"
] | raue76@gmail.com |
b89514586d2c8ef0a1fa99979861bca2c7fc1001 | 6d486cc1fc08b79111c701f5c9b0e74abf809e4f | /test/test_dml.py | 382d8f939676d32a8c02a99c4d958a5cf0f8e799 | [
"MIT"
] | permissive | albertvisser/a-propos | 1d16c122a7698e6e32a55767a1af9acbbf6c3ca2 | 31c89bc4560b93635a79ab3ab7d224b8d8f756fb | refs/heads/master | 2023-04-30T19:28:40.235949 | 2023-04-15T13:29:44 | 2023-04-15T13:29:44 | 219,269,688 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,736 | py | import pytest
from apropos import dml
def test_get_apofile(monkeypatch, capsys):
assert dml.get_apofile('') == dml.pathlib.Path('apropos.apo')
assert dml.get_apofile('test') == dml.pathlib.Path('test.apo')
assert dml.get_apofile('testing.pck') == dml.pathlib.Path('testing.apo')
def test_load_notes_file_... | [
"albert.visser@gmail.com"
] | albert.visser@gmail.com |
3f88cdeb167581de419c97c7d69a29b54ad556fd | c0c84529d07551bd6cac4fce3bbb44bb51e25ff1 | /CO1PG15.py | 25dd00b91fdba7afe96ab964fb945cf9cc1f1e42 | [] | no_license | Amalajoy/ProgrammingLab-Amala | 1c73d282afe922be4eb5541a34b525643e55c7e5 | 9229a764b40a589a19b5ee7e17e49c3b9b201d0d | refs/heads/main | 2023-03-13T02:58:36.138084 | 2021-02-17T18:34:36 | 2021-02-17T18:34:36 | 321,900,750 | 1 | 0 | null | 2021-01-11T07:26:15 | 2020-12-16T07:17:29 | null | UTF-8 | Python | false | false | 158 | py | color_list_1 = set(["White", "Violet", "Indigo","Blue"])
color_list_2 = set(["Blue", "Green","Yellow","White"])
print(color_list_1.difference(color_list_2)) | [
"noreply@github.com"
] | Amalajoy.noreply@github.com |
b8954b6cea35abb939ed06c8276b23e8b81f83d3 | b2e340f22a7f613dc33ea361ba87a393d65b723c | /LogicAnalyzer/config/config.py | f19d2b4e3d649ece283274df9b734d2dc8094f99 | [
"MIT"
] | permissive | CospanDesign/logic-analyzer | 6369cfc423f3fae050f9ab784a6ae94003422654 | 284ea339c001b4845a46fcb0672511487271c9c3 | refs/heads/master | 2021-01-20T18:58:53.477152 | 2016-06-24T02:22:04 | 2016-06-24T02:22:04 | 61,488,220 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,335 | py | import logging
import json
TRIGGER = "trigger"
TRIGGER_MASK = "trigger_mask"
TRIGGER_EDGE = "trigger_edge"
TRIGGER_BOTH_EDGE = "both_edges"
TRIGGER_REPEAT = "repeat"
TRIGGER_AFTER = "trigger_after"
CAPABILITY_NAMES = [
TRIGGER,
TRIGGER_MASK,
TRIGGER_EDGE,
TRIGGER_BOTH_EDGE,
TRI... | [
"cospan@gmail.com"
] | cospan@gmail.com |
f15b490903261f2afb007cd9301a5d6ac771bbba | 23e9bc3c6810b3cfa897653eefe74dadf5817d6b | /2020/day1-2.py | f7d4a87409d28ecaa1760d00e9dca9c543fe3416 | [] | no_license | LordBrom/advent-of-code | 3f68789b0fd31e22f840b26c7984cccdfc26e4c8 | f7165af7f03b3fb0d3db01191cdcff8a95474b8f | refs/heads/master | 2023-07-31T19:19:09.062740 | 2021-09-05T19:58:16 | 2021-09-05T19:58:16 | 319,400,695 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 338 | py | inputsArray = open("day1.in", "r").read().split("\n")
inputsArray.pop()
for i in range(len(inputsArray)):
for j in range(i, len(inputsArray)):
for k in range(j, len(inputsArray)):
if int(inputsArray[i]) + int(inputsArray[j]) + int(inputsArray[k]) == 2020:
print(int(inputsArray[i]) * int(inputsArray[j]) * int... | [
"mills.nate@gmail.com"
] | mills.nate@gmail.com |
cadcaf82134eb1b16eeb3991d6a5f168d62aaa56 | 714301f86767b075dd7a9132535e25689b7a7e4a | /Windows/src/LaZagne/softwares/databases/dbvis.py | 02efcb16ebc7402c9d8b1ab802b48ea5dfb0ee4c | [] | no_license | eddgomez/LaZagne | ebac0cc9a57786a064922380090fb3850492f876 | aafee7e88361db1466d3b5148838700b5fab36bc | refs/heads/master | 2021-01-15T21:39:36.390397 | 2015-02-20T15:18:27 | 2015-02-20T15:18:27 | 31,222,312 | 1 | 0 | null | 2015-02-23T18:24:15 | 2015-02-23T18:24:15 | null | UTF-8 | Python | false | false | 3,057 | py | from Crypto.Hash import MD5
from Crypto.Cipher import DES
import binascii, array, hashlib
import base64, re, os
import xml.etree.cElementTree as ET
from config.write_output import print_output, print_debug
from config.constant import *
from config.header import Header
class Dbvisualizer():
# ---- functions used to ... | [
"zanni.alessandro@gmail.com"
] | zanni.alessandro@gmail.com |
6063109ef967c55b97de6c5daf44a5c8e88ac02e | 11cfe900a2cd2363bca41c6e9fa45710e7c578cc | /backend/admin.py | b4bafb653197350b06e2e7238d5f15c9180d8a59 | [] | no_license | RENZOje/remote_learning | 2dd5a353733a49a080769740afad0ffe513731e5 | 8ce4ee4b2a832bea921be94f630101434024ec06 | refs/heads/master | 2023-06-10T21:31:29.423609 | 2021-06-11T15:58:54 | 2021-06-11T15:58:54 | 347,067,622 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,012 | py | from django.contrib import admin
from django import forms
from .models import *
from ckeditor_uploader.widgets import CKEditorUploadingWidget
# Register your models here.
admin.site.register(Quiz)
admin.site.register(Grade)
admin.site.register(Teacher)
admin.site.register(Section)
admin.site.register(Student)
admin.si... | [
"RENZOje@users.noreply.github.com"
] | RENZOje@users.noreply.github.com |
f80411d77a0e6127a5f80503c618a43932da409a | 29c39568880658d341ebc61202253a9a242327a8 | /sku/views.py | 169a8e90bf60b0bc666e1a53c19185a4d1b4457c | [] | no_license | thomaslzb/warehouse | e524937203452ddee0761ed296c6fd6a1605b3ec | 0dabda06e5898e0b82e63641f6055d229d83d4e8 | refs/heads/main | 2023-04-30T12:06:30.488162 | 2021-05-20T07:09:28 | 2021-05-20T07:09:28 | 287,015,619 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 17,003 | py | import datetime
import math
import xlrd
from django.core.files.storage import FileSystemStorage
from django.http import HttpResponseRedirect
from django.shortcuts import render, reverse
from django.views import View
from django.views.generic.detail import DetailView
from django.views.generic.edit import CreateView, Up... | [
"thomaslzbuk@gmail.com"
] | thomaslzbuk@gmail.com |
1935bfa537c5f257092b4e5689d56e2394be68bb | a09c10c29478fed167c94d83d5dff9371f9a1680 | /Client.py | ec5149235aa6288eed9ea16cd6590f770fc45567 | [] | no_license | batra98/Distributed-Web-Cache | 83e208689b18b95724dd0ba657b4ef89e9054d2a | 7e08dfe4dd6739c779c59da3ab7301f3cb33af6a | refs/heads/master | 2022-11-28T05:21:33.220922 | 2020-08-07T10:15:32 | 2020-08-07T10:15:32 | 285,793,260 | 2 | 0 | null | 2020-08-07T09:41:56 | 2020-08-07T09:41:56 | null | UTF-8 | Python | false | false | 1,157 | py | import socket
import sys
def send(ip, port, message):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect((ip, port))
try:
sock.sendall(bytes(message, 'ascii'))
response = str(sock.recv(1024), 'ascii')
print("Received: {}".format(response))
return r... | [
"sarthak.singhal@students.iiit.ac.in"
] | sarthak.singhal@students.iiit.ac.in |
2f5f68b3f678d84bdc6d49307107c175f3c16b8f | 4454e19d52e71e5fd1435e2a37dcfd074f944f83 | /utils/ms_ssim.py | 549732d887c62f8b861c54854093f878b64c3ca6 | [] | no_license | Emr03/deepInfoMax | 854d6c3289ae13b7aa1e8783a7a4db9f9946499f | b5c0182d71c88c1af872fcd78c51cffdbf10106e | refs/heads/master | 2022-11-02T16:06:27.899770 | 2020-06-16T21:21:53 | 2020-06-16T21:21:53 | 248,629,053 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,737 | py | import torch
import math
def ms_ssim(X_a, X_b, window_size=11, size_average=True, C1=0.01**2, C2=0.03**2):
"""
Taken from Po-Hsun-Su/pytorch-ssim
"""
channel = X_a.size(1)
def gaussian(sigma=1.5):
gauss = torch.Tensor(
[math.exp(-(x - window_size // 2) **
... | [
"elsa.riachi@mail.mcgill.ca"
] | elsa.riachi@mail.mcgill.ca |
02745dd02ec7954ea531da8ddfb292e43a976771 | 8a102033a266d39128e4b64aa0780cf67055e196 | /1330.py | 3fe9a718323d5727aeb4c2c1501dafb25b860ada | [] | no_license | yuseungwoo/baekjoon | 4dec0798b8689b9378121b9d178713c9cf14a53f | 099031e2c4401e27edcdc05bd6c9e6a558b09bb9 | refs/heads/master | 2020-09-03T15:25:40.764723 | 2018-10-08T02:35:27 | 2018-10-08T02:35:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 129 | py | # coding: utf-8
a, b = map(int, input().split())
if a > b:
print('>')
if a < b:
print('<')
if a == b:
print('==')
| [
"blacksangi14@naver.com"
] | blacksangi14@naver.com |
2fea730fbc2ed8ead8cdf20b0fe1527890efd6c7 | eee6dd18897d3118f41cb5e6f93f830e06fbfe2f | /venv/lib/python3.6/site-packages/scipy/sparse/bsr.py | 1627132c92f71edcadf2178965702a5a2e4adba9 | [] | no_license | georgeosodo/ml | 2148ecd192ce3d9750951715c9f2bfe041df056a | 48fba92263e9295e9e14697ec00dca35c94d0af0 | refs/heads/master | 2020-03-14T11:39:58.475364 | 2018-04-30T13:13:01 | 2018-04-30T13:13:01 | 131,595,044 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 23,024 | py | """Compressed Block Sparse Row matrix format"""
__docformat__ = "restructuredtext en"
__all__ = ['bsr_matrix', 'isspmatrix_bsr']
from warnings import warn
import numpy as np
from .data import _data_matrix, _minmax_mixin
from .compressed import _cs_matrix
from .base import isspmatrix, _formats, spmatrix
from .spu... | [
"georgeosodo2010@gmail.com"
] | georgeosodo2010@gmail.com |
fa8bf7a05bf66710fd0d1de3652d77a24a921dc4 | 732ea9c77c138ed29ac259618f3f75c2cfea7ae3 | /ds/subset.py | 36def3b8da5734584523f0155ee15379b968874e | [] | no_license | sharmak/python | 842ae452434247b62f2f43f25dce9ec88dc0ceff | 3218a8bad7a02bfde622d922e9e3fe8d5359e20a | refs/heads/master | 2020-04-28T00:28:11.692739 | 2015-11-29T17:13:17 | 2015-11-29T17:13:17 | 24,114,794 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,017 | py | # -*- coding: utf-8 -*-
"""
Created on Mon Dec 29 06:00:54 2014
@author: kishor
"""
# Subset problem
# Given a set find all the subset of the given set
# e.g. {1,2,3} => {{1},{2}, {3}, {1,2}, {1,3} {2,3}, {1,2,3}, {}}
# Solve the problem using backtracking
def is_subset_solution(n, k):
return n == k
def generat... | [
"kishor.iitr@gmail.com"
] | kishor.iitr@gmail.com |
d8f85667c90be108d54a8e925957d55331a8e7d5 | 5fc3a5fb73e4fef5a022f9f2fee83775af3d7b71 | /ems-cloud-mgmt-sdk/python/setup.py | d71a3cde5bf7d1107297182b72a15b7f587676ae | [
"MIT"
] | permissive | byblakeorriver/coinapi-sdk | f030267f4283a8ae9217217668bdbcfc75c2b89c | d786aed283c562b030a13d4efd3adbebe53d9b27 | refs/heads/master | 2023-03-10T21:31:38.381408 | 2023-02-23T04:54:38 | 2023-02-23T04:54:38 | 292,376,196 | 0 | 0 | MIT | 2020-12-31T17:03:42 | 2020-09-02T19:29:17 | C++ | UTF-8 | Python | false | false | 7,715 | py | # coding: utf-8
"""
EMS - REST API
This section will provide necessary information about the `CoinAPI EMS REST API` protocol. <br/> This API is also available in the Postman application: <a href=\"https://postman.coinapi.io/\" target=\"_blank\">https://postman.coinapi.io/</a> <br/><br/> Implemented Stan... | [
"support@coinapi.io"
] | support@coinapi.io |
b6c2f9db34a01f882c5076597ae485bcdb696cf9 | b597aca9f8ed351075ab6609a654ecf4d6f3d07e | /calc_pppkes_ind_stats.py | 4511c06677c688b277f1d104ecb8c3f01720a3d8 | [] | no_license | mcbarlowe/daily_scrape | e44b6d55304c63f2fa70a946cc5de49e9dcf56ed | 209f415179b40b1252a0ebc0eea045e3def34c30 | refs/heads/master | 2022-01-08T18:17:34.765264 | 2018-12-20T03:40:03 | 2018-12-20T03:40:03 | 185,601,600 | 7 | 2 | null | null | null | null | UTF-8 | Python | false | false | 50,181 | py | '''
This script calculates individual stats for both home and away team given
the strength state passed to the functions. It works for all strength states
except for all situations. Harry Shomers skater totals include the goalie so
if you wanted 5v5 you would actually pass 6 for each skaters. In cases where
the strengt... | [
"mcbarlowe@gmail.com"
] | mcbarlowe@gmail.com |
69fa3adebed46d0c5a9509edfcf765554631cdb7 | a16d3c43e455298c371ff853e14acd8eea1db8fd | /test/test_seq_util.py | fe03b10b9322e58fb0cd788fb1afa0724283ba64 | [] | no_license | TyloRoberts/fosvis | a17eebe9dc29a589ac38c902bf1b06841b0a9e53 | 992535b2799dc04334b7be97f81b64e986dcd0cf | refs/heads/master | 2023-02-19T00:38:36.931003 | 2021-01-21T22:19:05 | 2021-01-21T22:19:05 | 316,780,812 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,596 | py | from fosvis import seq_util
import unittest
from Bio.Seq import Seq
from Bio.SeqRecord import SeqRecord
import filecmp
import os
import pandas as pd
from pandas.testing import assert_frame_equal
import difflib
# Done
class test_remove_too_small_contigs(unittest.TestCase):
def test_remove_too_small_contigs(self)... | [
"troberts@shamwow.microbiology.ubc.ca"
] | troberts@shamwow.microbiology.ubc.ca |
ec48f6b5a8782524afec24561f65b13e75302679 | 0d3f9dc797c0ad1d72bfe25390284a7a2231ef75 | /chap4/45.py | ece8c684a747cd9a410d081d8c61fbdde63d8aad | [] | no_license | mocas-usr/tensorflow_primary | b71b90cc4c0690316ebafd20aa7f7644bc16e839 | e854f11026aea863a701e5691e1068b2648b4002 | refs/heads/master | 2022-11-02T18:04:31.538146 | 2019-11-01T08:25:35 | 2019-11-01T08:25:35 | 218,905,003 | 0 | 1 | null | 2022-10-24T03:15:05 | 2019-11-01T03:17:26 | Python | UTF-8 | Python | false | false | 1,328 | py | # -*- coding: utf-8 -*-
"""
Created on Wed Sep 25 14:59:46 2019
@author: HAX
"""
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
plotdata = { "batchsize":[], "loss":[] }
def moving_average(a, w=10):
if len(a) < w:
return a[:]
return [val if idx < w els... | [
"wangyuhang_mocas@163.com"
] | wangyuhang_mocas@163.com |
acb4347eff7bdd262db2056c03fe1aae4543962b | 30e2b17d954a73d6a6eade6ba12c6fdb3af57068 | /HackerRanck_Python_Challenges/Solutions/stringClassif.py | 5dcb1bc07c994dea19461e9dc93709d8759922a5 | [] | no_license | rock-feller/HackerRanck_Python_Challenges | 9c8a1447af7ee50faba9a05875e4f9eb1345d1eb | 35e176d0a498f537bf2b2f32907755c9a0f07a75 | refs/heads/master | 2020-07-02T08:59:51.201894 | 2019-08-09T14:09:35 | 2019-08-09T14:09:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 575 | py | """author = Rockefeller"""
import string
def unik(li):
el = []
for i in li:
if i not in el:
el.append(i)
return el
def perm(x , y):
al = string.ascii_lowercase
ind = []
ind2= []
s_x =unik(x)
s_y =unik(y)
for i in range(min(len(s_x) , len(s_y))):
... | [
"noreply@github.com"
] | rock-feller.noreply@github.com |
5a405a2cc937b4a389075317ae656d5cd0d8aaeb | 02bf59df060b4a680d4c4cdbd6c8780952f02d48 | /GetReferralCodeByDeviceId.py | 26f93e4e59278934ac76108f332d96691d81f001 | [] | no_license | EdwardWuYiHsuan/Referral-Code | c874b020899cf356214b436d6948cd532a9d446e | 88fb041b32eb9f494094dc1469aae2aa9f36e26f | refs/heads/main | 2023-06-09T19:10:32.555450 | 2021-07-01T09:23:18 | 2021-07-01T09:23:18 | 370,632,238 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 936 | py | import datetime
import redis
endpoint = "elasticache-savedeviceidandreferralcode.akto78.ng.0001.apne1.cache.amazonaws.com";
def lambda_handler(event, context):
print("[Info] Request : {}".format(event));
timestamp = datetime.datetime.utcnow().isoformat() + 'Z';
deviceId = event.get("device_id");
if deviceId is ... | [
"edwardwu@xrex.io"
] | edwardwu@xrex.io |
78ce4126165b88ced683f46c15d42dfb92e4f168 | f7c19bd02cfc09992d804ae35e293323d2ea99e4 | /classviews/migrations/0001_initial.py | fdb331a483de7545d040ba72ef362511027e225c | [] | no_license | jesusjamz100/cms_blog | e98c927c5f93ca12ef6f71748620b0168f25dcb8 | c08d6e1a063236bfd59d11e630254aa0043eaf17 | refs/heads/master | 2020-04-18T19:19:11.057386 | 2019-02-02T23:25:07 | 2019-02-02T23:25:07 | 167,709,187 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 672 | py | # Generated by Django 2.1.5 on 2019-01-28 02:10
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Contact',
fields=[
('id', models.AutoField(... | [
"jesusjamz100@gmail.com"
] | jesusjamz100@gmail.com |
0fbd545a8ceab1cdd8f34f23bbb35f2cfe068d26 | c08ffbe1a032611b32c865391b3a1043101f3182 | /DigitalJournal.py | 6414e25bb1ea873d6830a40bb5525b26985ee9f8 | [] | no_license | bseibo61/LastfmLocation | 3d35e5f2c84b788713818f577e266f4a486a7b03 | 612ae59231dad20b104cd4c1f4f5335d0767a717 | refs/heads/master | 2022-08-04T14:13:36.083976 | 2022-07-31T22:30:43 | 2022-07-31T22:30:43 | 231,705,835 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,431 | py | import pandas as pd
import glob, os, json
import datetime
import bisect
import itertools
import xml.etree.ElementTree as et
location_path = r'Data\GoogleData1-1-2020\Location History\Semantic Location History\2019'
smsPath = r'smsData'
all_files = glob.glob(os.path.join('', "*.json"))
def findkeys(node, kv):
if i... | [
"brseibol@buffalo.edu"
] | brseibol@buffalo.edu |
88e5196904ade4057d99bc9906f441c9cf1edb74 | 93257ad72659cf766e9d99fe24666f434c4ae40d | /users/migrations/0027_auto_20190814_1449.py | 8885e223728fd46844deeb633bb1aac30e809e89 | [] | no_license | AkshatLal16/myblog | 6ce01acabb91e75fe78b23a9b2ce7ed746fe2a08 | 66c71e16b8979711f5006d70895234dba034b7c5 | refs/heads/master | 2020-07-15T13:09:28.915594 | 2019-09-27T07:37:41 | 2019-09-27T07:37:41 | 205,569,274 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,354 | py | # Generated by Django 2.2.1 on 2019-08-14 09:19
import datetime
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
from django.utils.timezone import utc
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_depend... | [
"akshat@henryharvin.in"
] | akshat@henryharvin.in |
356a84ee74b58014400d3f8cd8a3a8ef23a75015 | 46738f59d6358042f879567788cfd8ae8192a7b6 | /lambda/save_sample_data/save_sample_data.py | 6e94006a92e7fed7df4f113536d6fbdd063da3cc | [] | no_license | perezbarbosa/hosting-compare | 8fb2d6f45b37d7101da592950749dbf3f2c30667 | 9c0cd1ed0e274b568277d153ab2f22bf45a8e75d | refs/heads/master | 2023-05-06T02:52:35.792340 | 2021-06-03T17:18:31 | 2021-06-03T17:18:31 | 273,340,583 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,202 | py | import boto3
import json
from pprint import pprint
import sys
def handler(event, context):
""" Loads sample data into local database
Expects to receive a payload with a list of json objects
formatted as dynamodb.put_item expects
https://boto3.amazonaws.com/v1/documentation/api/latest/r... | [
"noreply@github.com"
] | perezbarbosa.noreply@github.com |
1125e6f6ae45ed4a3a5edb239f269df89b29130e | 7937031274c8ebebd6f8391af245216421338cc7 | /myenv/bin/easy_install-3.8 | dd98319436e38a41ec73653bac068144f5feac69 | [] | no_license | ISLAMTU/Flappy_bird | fa621bfcf523ab7b255d416e9eb049abd448bdc5 | 37caacf3cbdab084ab5a65727abb46b802fd47c8 | refs/heads/master | 2023-03-10T07:22:43.186020 | 2021-02-16T21:25:39 | 2021-02-16T21:25:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 265 | 8 | #!/home/mohamed/Desktop/bird_game/myenv/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from setuptools.command.easy_install import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(main())
| [
"mohamedhisham694@gmail.com"
] | mohamedhisham694@gmail.com |
bf91de8bc79c94d76bf93ea0cc534b567dc2e161 | 4d9bd7874fc5a4f2ec56bb172f4e93a9601c4c83 | /main.py | 4864dd4bbecc043b09c96f4fb427a06e03a0c031 | [] | no_license | liziniu/Model-Uncertainty-in-Neural-Networks | ff65009b3c165c4fd82efb9759cb26d41f914a2e | 67c6042c52dd7e7a918ab42d34764bbb9a88c8a2 | refs/heads/master | 2020-05-04T00:26:47.315086 | 2019-04-06T03:19:47 | 2019-04-06T03:19:47 | 178,884,785 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,506 | py | from model1.default import get_config
from model1.model import Model
from utli import load_data, get_session, update_para
import argparse
def arg_parse():
parser = argparse.ArgumentParser()
parser.add_argument("--model", type=int, default=1)
parser.add_argument("--epochs", type=int, default=100)
parse... | [
"374387855@qq.com"
] | 374387855@qq.com |
014a6b6fc7c93c425ce7da5ad70dfce4b7273ee8 | 52b5773617a1b972a905de4d692540d26ff74926 | /.history/largestTime_20200903122053.py | 697fb00998e96926352a6433e5a6da6d088d57dd | [] | no_license | MaryanneNjeri/pythonModules | 56f54bf098ae58ea069bf33f11ae94fa8eedcabc | f4e56b1e4dda2349267af634a46f6b9df6686020 | refs/heads/master | 2022-12-16T02:59:19.896129 | 2020-09-11T12:05:22 | 2020-09-11T12:05:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 552 | py | from itertools import permutations
def Time(A):
# getting the different permutations
# get the one that falls between 0000 and 2359
# then place the semi colon in the proper place
# otherwise return an empty string
A = [str(i) for i in A]
perm = permutations(A)
newArray = []
for i... | [
"mary.jereh@gmail.com"
] | mary.jereh@gmail.com |
41812c6d4cc481ed2d7caedd0323b6ca88aa5b06 | e7003f13ad2e4b8cfeeb3d7bf6c5a393e8f38bf7 | /custom_components/sbanken/config_flow.py | da9dfdbc7429a3cbf5f541836a10efc984187ceb | [
"MIT"
] | permissive | toringer/home-assistant-sbanken | 5a620d49abb1807bbda968d2c561eec84f0361c7 | 7540960042df455cc7ce672d7891c134a9976251 | refs/heads/master | 2023-02-21T13:07:14.543789 | 2023-02-12T14:36:08 | 2023-02-12T14:36:08 | 124,766,061 | 3 | 5 | MIT | 2022-03-17T14:25:03 | 2018-03-11T14:42:43 | Python | UTF-8 | Python | false | false | 5,249 | py | """Config flow for Sbanken integration."""
from __future__ import annotations
import logging
from typing import Any
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.core import HomeAssistant
from homeassistant.data_entry_flow import FlowResult
from homeassistant.core import callback
... | [
"toringe@redalen.no"
] | toringe@redalen.no |
f825ef4df82e8584a89a77987d0e9dca9f38a446 | 23d43f570f5c99c9fea510bda5579116ea7fd1e5 | /main.py | 9d4fa83ab7f5e9cfda00a02b770230fe512e5cea | [
"Apache-2.0"
] | permissive | AM6SoftwareCompany/Azkhar | 4647e8469d5511c06b2ea6895fd4b7034b4f6057 | d86a4bd58ac956640bb1bee5fce64ff647c94a1b | refs/heads/main | 2023-06-09T22:57:08.494783 | 2021-07-09T10:01:04 | 2021-07-09T10:01:04 | 353,202,325 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 23,861 | py | import time
import datetime
import webbrowser
import pyperclip
import pyautogui
AzkharAlsabah = [
"اللَّهُمَّ أنْتَ رَبِّي لا إلَهَ إلَّا أنْتَ، خَلَقْتَنِي وأنا عَبْدُكَ، وأنا علَى عَهْدِكَ ووَعْدِكَ ما اسْتَطَعْتُ، أعُوذُ بكَ مِن شَرِّ ما صَنَعْتُ، أبُوءُ لكَ بنِعْمَتِكَ عَلَيَّ، وأَبُوءُ لكَ بذَنْبِي فاغْف... | [
"ahmed.abo.sita66@gmail.com"
] | ahmed.abo.sita66@gmail.com |
47213a723487f5382748a8d76a7546ee674ea1f5 | a26d91163fe40924c7c4f9d94fcd973989b68983 | /watchlist_app/migrations/0003_alter_movie_description.py | bed775bad8d30539b2b34f84c48a3511902e2b22 | [] | no_license | rcoffie/Django-Rest-Tut | a840ecb838098ed2d525c1b5321f042e0d29c5fb | 9925bfb11b92a49aa6973e3929b2d05d9528ee27 | refs/heads/master | 2023-08-25T06:43:41.019767 | 2021-10-27T15:27:06 | 2021-10-27T15:27:06 | 409,567,488 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 384 | py | # Generated by Django 3.2.5 on 2021-09-23 11:15
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('watchlist_app', '0002_rename_movies_movie'),
]
operations = [
migrations.AlterField(
model_name='movie',
name='descr... | [
"rcoffie22@yahoo.com"
] | rcoffie22@yahoo.com |
23e6461e758dbf032f5c96edf2252ec91d06e177 | cbd3c85d385d065ff48bfa8a6321d4bf160acb09 | /abjadext/cli/get_text_editor.py | 923d3bb47c4ecdda2a782bea3166a3c3b3177547 | [
"MIT"
] | permissive | DaviRaubach/abjad-ext-cli | 4b36424a9930bc9d04e53b763c8c63804baede2b | 4c2fa22f317ef0a3d5f0d6a8ea92f4375b8fc8eb | refs/heads/master | 2022-10-17T21:27:42.324333 | 2020-06-18T19:29:10 | 2020-06-18T19:29:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 242 | py | import os
import abjad
def get_text_editor():
text_editor = abjad.configuration["text_editor"]
if text_editor is not None:
return text_editor
elif os.name == "posix":
return "vi"
else:
return "edit"
| [
"trevor.baca@gmail.com"
] | trevor.baca@gmail.com |
fab423ac20ec004dccb37459a3fcde5478b15d1e | ac5042582ec4fb8f128a97ead4bb59d6bbf6cef5 | /tests/utils/test_prolang.py | f11790d225e44c2626e5efd7ca18fd0c49a53acc | [
"MIT"
] | permissive | optittm/bugprediction | 4be0e4c532e06c27ac4c9a3e7812bc9fc4f5a113 | 161628d504627d0623b584e7e92bb3130a24b8ef | refs/heads/main | 2023-08-22T04:20:57.039589 | 2023-07-19T09:39:46 | 2023-07-19T09:39:46 | 522,447,765 | 2 | 2 | MIT | 2023-09-14T10:10:08 | 2022-08-08T07:28:57 | Python | UTF-8 | Python | false | false | 612 | py | from tests.__fixtures__ import *
def test_guess_programing_language():
"""
Guess what is the programming language from a file extension
>>>guess_programing_language("php")
PHP
>>>guess_programing_language(".php")
PHP
>>>guess_programing_language(".hidden/test.h")
C
>>>gues... | [
"benjamin.balet@gmail.com"
] | benjamin.balet@gmail.com |
1259e4c9fd64611ee9165faa91df8c43bf9b224d | d77d0433c9db4b0f529c4066011c6b5eb037981b | /mpi-proxy-split/test/mana_test.py | b4683cd4ea33c53253eadb04c1fbe541d3d38ddc | [] | no_license | mpickpt/mana | bb11f4da82e01c2f6b37f0cb357bf1303cd720c1 | 8f341500f259187588dbede15bf152a0771a7022 | refs/heads/main | 2023-09-01T08:42:51.518528 | 2023-08-14T21:38:16 | 2023-08-31T18:25:31 | 179,736,099 | 26 | 23 | null | 2023-09-14T03:12:09 | 2019-04-05T18:37:56 | C++ | UTF-8 | Python | false | false | 3,058 | py | #!/usr/bin/env python3
import argparse
import sys
import subprocess
'''
This util is designed to be an argument parsing utility for C/C++ tests.
'''
class CustomParser(argparse.ArgumentParser):
def error(self, message):
sys.stderr.write('error: %s\n' % message)
self.print_help()
sys.exi... | [
"107428972+chirag-singh-memverge@users.noreply.github.com"
] | 107428972+chirag-singh-memverge@users.noreply.github.com |
9207f63b377b4990be34f2882127edcd256361e6 | 70e1d7c3e375ecff09df36e5a4ceda5691221968 | /tmp.py | 1936e8cb7425e44fc01199bc2937e82f0e03ce0a | [
"Apache-2.0"
] | permissive | doublechenching/ship_detection | 5b91aa4a7fbe6eb5a88389d1a517641a53740890 | 1ba4926e0d28043863df05ae8afc3d5b336b350d | refs/heads/master | 2020-04-06T17:53:23.855070 | 2018-11-15T08:47:02 | 2018-11-15T08:47:02 | 157,676,999 | 8 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,213 | py | Nucleoplasm 12885 0.25
Cytosol 8228 0.16
Plasma membrane 3777 0.07
Nucleoli 3621 0.07
Mitochondria 2965 0.06
Golgi apparatus 2822 0.06
Nuclear bodies 2513 0.05
Nuclear spe... | [
"vichenqin@gmail.com"
] | vichenqin@gmail.com |
92ad7068066c80a09e52e4efc9930ae95ea93b66 | 0223a85b6a3fecd453b9bd61368cb51c2978c30f | /Courses/1 month/4 week/day 2/Задача №2.py | 7b91a00c66d20af8e6336a4673389637c2148b5c | [
"MIT"
] | permissive | emir-naiz/first_git_lesson | 4cb502d13ead7f459a8e57333581d5256fd8de39 | 1fecf712290f6da3ef03deff518870d91638eb69 | refs/heads/main | 2023-01-05T12:29:02.905718 | 2020-11-10T06:00:19 | 2020-11-10T06:00:19 | 306,527,911 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 301 | py | # Функция которая перебирает все четные числа до указанного числа
def find_even_nums(number):
even_list = []
for i in range(1, number):
if i % 2 == 0:
even_list.append(i)
return even_list
print(find_even_nums(10)) | [
"naizabekoff@mail.ru"
] | naizabekoff@mail.ru |
e5d23091a1fc43d867a7d92b6d2aeaccf1d37eca | 09724c51f0012474eb322a676fd112d1bc102bb6 | /CodeBuilder/Valids.py | bb671f0840c37c2cab29f8c586e3505cbaf0c0cc | [] | no_license | danmarshall208/CodeBuilder | 53d4b72476d704a8290aeb5925975f10a184817f | 526f0d37b9ef11484eada691275b9ce71f5c2fab | refs/heads/master | 2021-05-09T07:53:15.845690 | 2018-01-29T11:33:51 | 2018-01-29T11:33:51 | 119,374,191 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 467 | py | valid_var_names = ['a', 'b', 'c', 'd', 'e']
valid_func_names = ['A', 'B', 'C', 'D', 'E']
valid_funcs = ['chr', 'float', 'ord', 'print', 'round', 'str', 'sum']
#valid_funcs = ['abs', 'bool', 'chr', 'float', 'id', 'len', 'ord', 'print', 'round', 'str', 'sum', 'type']
operations = ['object', 'add', 'subtract', 'multiply',... | [
"danmarshall208@hotmail.com"
] | danmarshall208@hotmail.com |
a34e7441458961ad75e663aec37218d89eee0fd6 | d400110ac8637883daa86aff7bce7fe49ad7f916 | /option.py | f5dae12031a9a66329aae84b829bfd4ab96ab63d | [
"MIT"
] | permissive | zdddw/SISN-Face-Hallucination | 59e7ba74f60c57e115bda26b15a7cdd543d7fef6 | a36d189e6e890f3a01e2a027ec54eec7b2db23a0 | refs/heads/main | 2023-09-03T20:36:51.860967 | 2021-11-08T08:07:20 | 2021-11-08T08:07:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,711 | py | import argparse
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument("--seed", type=int, default=1)
# models
parser.add_argument("--pretrain", type=str)
parser.add_argument("--model", type=str, default="SISN")
# augmentations
parser.add_argument("--use_moa", action="st... | [
"noreply@github.com"
] | zdddw.noreply@github.com |
49125a103d0ef8ad23344162256cf34b29c740c5 | 5c0506e42fc7f0325728994223f1b0be4f1187fc | /summa_py_textrank.py | 2fd1d59fa66724ab7ba0f6a9607be02ff57006a6 | [] | no_license | Trevahok/summarizer | 602d492385c3130c6c9f11dd82e71177541ede73 | cfd134e79ec5dfac3530081c6863421ab667207d | refs/heads/master | 2020-03-19T20:36:21.680650 | 2018-06-12T06:54:36 | 2018-06-12T06:54:36 | 136,908,134 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,124 | py | from urllib.request import urlopen
from summa.summarizer import summarize
from sys import argv
from bs4 import BeautifulSoup as bs
import PyPDF2
def from_link():
page=urlopen(argv[1])
soup=bs(page,'lxml')
text=soup.find_all('p')
text='\n'.join([ i.text for i in text])
print(summarize(text,ratio=0.2... | [
"vighneshss@gmail.com"
] | vighneshss@gmail.com |
c9708fe103af2012e13994b656c45ba4a852077c | abad82a1f487c5ff2fb6a84059a665aa178275cb | /Codewars/8kyu/8kyu-interpreters-hq9-plus/Python/solution1.py | bdd53cce40278d9d04a75b8b2e61e0cc09d79511 | [
"MIT"
] | permissive | RevansChen/online-judge | 8ae55f136739a54f9c9640a967ec931425379507 | ad1b07fee7bd3c49418becccda904e17505f3018 | refs/heads/master | 2021-01-19T23:02:58.273081 | 2019-07-05T09:42:40 | 2019-07-05T09:42:40 | 88,911,035 | 9 | 0 | null | null | null | null | UTF-8 | Python | false | false | 487 | py | # Python - 3.6.0
gets = lambda i: 's' if i != 1 else ''
HQ9 = {
'H': 'Hello World!',
'Q': 'Q',
'9': '\n'.join(
f'{i} bottle{gets(i)} of beer on the wall, {i} bottle{gets(i)} of beer.\nTake one down and pass it around, {i - 1 if i > 1 else "no more"} bottle{gets(i - 1)} of beer on the wall.' for i i... | [
"d79523@hotmail.com"
] | d79523@hotmail.com |
2f56eca6cc281d7aae80bae6b6e73ce086e853ba | 64564ad34eb88c9b366b23c21e90684dbbf0ba94 | /gen-py/livetex/livetex_service/__init__.py | e790cd5d759e1a7017e92a7f4b883ce35961affd | [] | no_license | hobbit-vt/livetex-fake-services | 53481fcc02190a14648ac6950eeb39b31087f9f2 | b595d912307148d1bc6b162f63608369256d9c43 | refs/heads/master | 2021-01-25T07:34:36.583297 | 2014-10-17T09:51:11 | 2014-10-17T09:51:11 | 23,706,391 | 1 | 1 | null | 2014-10-23T15:16:52 | 2014-09-05T14:42:37 | Python | UTF-8 | Python | false | false | 58 | py | # -*- coding: utf-8 -*-
__all__ = ['ttypes', 'constants']
| [
"viktor.g@livetex.ru"
] | viktor.g@livetex.ru |
703a8e40bd746970ed7d5c2e13f250617fe1a660 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02574/s746022410.py | 9331bad8a322a0b5502729d4fc4e2aa050191d05 | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,135 | py | import math,itertools,fractions,heapq,collections,bisect,sys,queue,copy
sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]
def LI(): return [int(x) for x in sys.stdin.readline().split()]
# def LF(): return [float(x) for x in s... | [
"66529651+Aastha2104@users.noreply.github.com"
] | 66529651+Aastha2104@users.noreply.github.com |
5a11bc517beebdc39fe586b47fc5f2a103dbdbb6 | a5de047e66a44459cbde9062d8d8d6c2da11d750 | /db_session.py | 84820499406b2f08a6647a194a09f4b0d3ee539a | [] | no_license | MrRomacka/diary | 515b1f4fc7732c936464827c1431ab14f300b32d | 219f9c0472ed933d71b7412e79b8ea6a8a77eb5d | refs/heads/main | 2023-01-22T14:23:02.251413 | 2020-11-13T13:41:42 | 2020-11-13T13:41:42 | 312,364,025 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 840 | py | import sqlalchemy as sa
import sqlalchemy.orm as orm
from sqlalchemy.orm import Session
import sqlalchemy.ext.declarative as dec
SqlAlchemyBase = dec.declarative_base()
__factory = None
def global_init(db_file: str):
global __factory
if __factory:
return
if not db_file or not... | [
"noreply@github.com"
] | MrRomacka.noreply@github.com |
5d360aaf3e6c4ec30b0ffd85d0c0fbd4ac6c452c | 501d8f799185f58af7ad864962f29ba3066a3a66 | /python/locate.py | 3dc7eb55c09872ed04993bce4e9ebd5b41d9887e | [] | no_license | liuyujyyz/learning | 55c866c3a0c4db3d4d5475c049785a3ad856aec3 | 299914b27fad9e3fc9175d68905760d939b06d2a | refs/heads/master | 2021-01-19T08:10:37.553429 | 2020-08-13T07:42:14 | 2020-08-13T07:42:14 | 87,607,931 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,605 | py | import cv2
import numpy as np
from decorators import timer
from cluster import Kmeans
from tqdm import tqdm
def extract(img):
img = cv2.resize(img, (16, 16))
U, S, V = np.linalg.svd(img)
return V[0]
@timer
def divide(img, window, stride=1):
h, w, _ = img.shape
parth, partw = window
out = []... | [
"liuyujyyz@gmail.com"
] | liuyujyyz@gmail.com |
b1718080973873c3be8fe613fdb2207a4ef59185 | 86bebcb32810b3af337f6fe0e4ce30ebb7fa7a16 | /ServerlessDjango/asgi.py | a30b4fcadfd0186624b55569e6e08e9bf7709d32 | [] | no_license | NimishVerma/ServerlessDjangoTemplate | 7bc665d043d656c4abaf1b076a38935f98390d41 | 9f1f8fba7a37867f90369feac0d4f215ec3ab53d | refs/heads/master | 2023-04-01T12:07:31.012179 | 2021-04-05T02:54:02 | 2021-04-05T02:54:02 | 354,104,152 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 409 | py | """
ASGI config for ServerlessDjango 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('DJA... | [
"nimishverma@ymail.com"
] | nimishverma@ymail.com |
6bac759d5e99e5cea3ef506eb72cad61410bf459 | 2a1b7c51756d692bc2d06d57f5e99d89e114a2e9 | /ANPP_code/preprocess/AliRepeat/convert_to_norm.py | aed6cc67fbb72482cd3a9a074e6657c8e216beb3 | [] | no_license | AnonymousOpenResearch/ANPP | fb66b506af9eef2f714d537c87af40f2a3256129 | e5a416a69998fdeda91aa767b0a430892f47c53c | refs/heads/master | 2023-01-11T12:29:15.289027 | 2020-11-06T13:51:05 | 2020-11-06T13:51:05 | 271,594,404 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,128 | py | import numpy as np
import pandas as pd
import os
import sys
import pickle
file_user_log = 'user_log_format1.csv'
file_user_purchase = "user_purchase.csv"
file_item_info = "item.csv"
min_user_count = 5
min_item_count = 5
purchase_action_type = 2
arr = sys.argv
folder_dataset = arr[1]
file_pkl_review = arr[2]
file_p... | [
"guyulongthu@gmail.com"
] | guyulongthu@gmail.com |
e7f2596520d3677c4a237c7632d8e1b51aad8246 | dcefbb67cfdc837a5b1016ea674ead66263f0af2 | /algorithm/BOJ_2442.py | 8e5b65e98dfb9ba6de506f7620715ecfc2770547 | [] | no_license | SeungYeopB/weekend-study | 0a5d5bdbb00a7d81f2ec7c6c5b2fc7b96d92c296 | 02651855bb91e26784611bbed34a01023f4ef307 | refs/heads/master | 2023-06-23T15:52:54.475077 | 2021-07-23T07:57:16 | 2021-07-23T07:57:16 | 382,514,062 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 156 | py | N = int(input())
for i in range(1,N+1):
for j in range(N-i):
print(" ",end="")
for j in range(2*i-1):
print("*",end="")
print() | [
"study0610@naver.com"
] | study0610@naver.com |
3f0e72af94251d7862f5e10f270251b0a1d37a48 | d3f0a0a8a4508dbc7ddd3c6251760672368c2cc9 | /word2vec_classif.py | e798ef6bcbba52c0ac03982abdb4582e689926b2 | [] | no_license | Jey1kRey/projet6 | 13883b1eac53dcea6639bde8461b48977e1428d1 | d7ae9b798fc631277fb62d1e14b57f25393b2822 | refs/heads/master | 2020-04-20T17:11:51.781883 | 2019-02-03T19:04:06 | 2019-02-03T19:04:06 | 168,981,810 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,622 | py | # -*- coding: utf-8 -*-
"""
Created on Fri Nov 30 08:42:39 2018
@author: Jérôme
"""
import pandas as pd
import gensim
import numpy as np
from gensim.models import word2vec
import re
from nltk.corpus import stopwords
from sklearn.preprocessing import MultiLabelBinarizer
from sklearn.ensemble import RandomForestClassif... | [
"jeyonizuka@hotmail.com"
] | jeyonizuka@hotmail.com |
b2432c7ce576836fc769e1c9a990bb2a1b00d91c | ef243d91a1826b490e935fa3f3e6c29c3cc547d0 | /cv2/cv2/MergeExposures.py | 7d68ec4c5e8da4d27c6ad8ddb544c23ea3973a7e | [] | no_license | VentiFang/Python_local_module | 6b3d0b22399e817057dfd15d647a14bb1e41980e | c44f55379eca2818b29732c2815480ee755ae3fb | refs/heads/master | 2020-11-29T11:24:54.932967 | 2019-12-25T12:57:14 | 2019-12-25T12:57:14 | 230,101,875 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,989 | py | # encoding: utf-8
# module cv2.cv2
# from F:\Python\Python36\lib\site-packages\cv2\cv2.cp36-win_amd64.pyd
# by generator 1.147
""" Python wrapper for OpenCV. """
# imports
import cv2.cv2 as # F:\Python\Python36\lib\site-packages\cv2\cv2.cp36-win_amd64.pyd
import cv2.Error as Error # <module 'cv2.Error'>
import cv2.cu... | [
"5149528+ventifang@user.noreply.gitee.com"
] | 5149528+ventifang@user.noreply.gitee.com |
a2ebf8c419bd0328ba823dd774d8ac2ef77bcca7 | a2b7e42a51003e4d97addbc7b5e269f0e7cc2b52 | /SMTP/smtp.py | 9087c60d0a73075b99d3ee449106ff2a5a5d18b1 | [] | no_license | aadamsaleem/Networking | 9160219d4cd868fbce396324cec2797bf2d31dbf | a67976f53ac3009e2fedee138a27099c7ecf8eb3 | refs/heads/master | 2016-08-12T08:30:37.572085 | 2016-02-13T22:35:38 | 2016-02-13T22:35:38 | 51,668,474 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,391 | py | import socket
import base64
msg = "\r\n I love computer networks!"
endmsg = "\r\n.\r\n"
# Choose a mail server (e.g. Google mail server) and call it mailserver
#Fill in start
mailserver = "smtp.gmail.com"
port = 587
#Fill in end
# Create socket called clientSocket and establish a TCP connection with mailserver
#Fill... | [
"aadam_saleem@yahoo.co.in"
] | aadam_saleem@yahoo.co.in |
a21f249ea161330a50ec05a4b83dc19d497cf0ba | c174895f234affe017233c64d90dd522b77aea46 | /core_1024/items.py | 29a4f00bd290f9661d10266ee66b1ef537477602 | [] | no_license | starplanet/core_1024 | 316321efd7c8aa0cbd1b6a90e0efa41f1c2386ca | d83e618a3f01d08e9c06ff0c79a6c617f226c07a | refs/heads/master | 2016-09-13T20:28:48.621859 | 2016-05-06T08:43:44 | 2016-05-06T08:43:44 | 58,192,243 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 548 | py | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html
import scrapy
class Core1024Item(scrapy.Item):
# define the fields for your item here like:
page_url = scrapy.Field()
title = scrapy.Field()
name = sc... | [
"zhangjinjie@jinjiedeMacBook-Pro.local"
] | zhangjinjie@jinjiedeMacBook-Pro.local |
874570360011745971d66be0be7251d3126ff31a | 658b10bae84ea77a13d25273266170d499bdad59 | /blog/migrations/0001_initial.py | 45e06cefd195c38b8cf0542f61d8802de048fd2c | [] | no_license | du4ok/my-first-blog | 9f1e117f41d4f8de4ccec82993d4498d4c464dd6 | a5b4a3ab870fa17b9e67793c89811500be56ea0e | refs/heads/master | 2020-07-20T17:46:00.119085 | 2016-11-14T20:31:22 | 2016-11-14T20:31:22 | 73,744,108 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 717 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2016-10-02 14:04
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='posts'... | [
"iriver87@gmail.com"
] | iriver87@gmail.com |
f87b02a9fd6d6f6edb041ee8e26bca60f2574e32 | 786f29dc7be151b716433bbe14db7552a683b8af | /bk3d_to_huxing_test.py | 75d1d7350a78108c6e2451b03995df5d9b457c98 | [] | no_license | Hengle/my_test_project | bfea2e32734b921ee7ff6da8d18956a24f0ad64f | a9f30f883a7bd906c7ed346c79bc8f1fd53db11d | refs/heads/master | 2023-03-22T08:36:32.102048 | 2021-03-08T08:10:25 | 2021-03-08T08:10:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 79,682 | py | #!/usr/bin/env python
# encoding: utf-8
bk_3d_data = {
"defaultMode": "",
"work": {
"user_id": 1000000022111887,
"project_id": "auto3d--dWuf-5Gjg_UBUYzi65czt",
"name": "贝壳·如视 | 真实,如你所视",
"is_active": True,
"title": "34a9d4021c7dfe48b2516fd9a98f2330",
"description": "",
"picture_url": "h... | [
"zhoukun@ehousechina.com"
] | zhoukun@ehousechina.com |
05a6db46acd058f904eeb21596b3a1e9c2fec67c | 62d489ced99e830920da02a0ba62572f144833cd | /Ques_21.py | 122805da78c4a6a67adf44ea9bf2a8962c96565d | [] | no_license | HarshSharma12/ProjectEulerPython | e8cc11d44a4ea917b5e7669667161aa1c635a0cd | c300a3d34fc99a0aa08047f1195eceaefd7d68c9 | refs/heads/master | 2016-09-06T17:07:23.183383 | 2014-10-12T13:56:51 | 2014-10-12T13:56:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,252 | py | # -*- coding: utf-8 -*-
"""
Created on Thu Sep 11 12:48:17 2014
@author: Harsh Sharma
Amicable numbers
Problem 21
Published on Friday, 5th July 2002, 06:00 pm; Solved by 74130
Let d(n) be defined as the sum of proper divisors of n
(numbers less than n which divide evenly into n).
If d(a) = b and d(b) = a, where a... | [
"mail.hs.harsh@gmail.com"
] | mail.hs.harsh@gmail.com |
fc788246df6e41781ddf6e555e8b07bfc9c393f7 | 4ac0643056138d9caf903b9ad051c75cf1447df6 | /src/learn/__init__.py | 47ea3bb4ca97dc7623be8755d2c7d20aca658fc8 | [
"MIT"
] | permissive | ssd04/ml-project-template | 361a5123518259020811f0b0a760b6e55ae81148 | cea040176c620fa27b7537c7c9ced50a78fb591e | refs/heads/master | 2023-08-25T18:34:57.973080 | 2021-10-26T21:23:05 | 2021-10-26T21:23:05 | 414,691,263 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 717 | py | from .classification.randomforest import RandomForest
from .classification.xgboost import XGBoost
from .regression.logistic import LogisticR
from .regression.xgboost import XGBoostR
class GetModel:
@classmethod
def get_model(cls, alg, conf=None):
if alg == "random_forest":
model = RandomFo... | [
"dariussuirab@gmail.com"
] | dariussuirab@gmail.com |
77f295368703e4c0c9e03efee7b637781e2efdc9 | 17ed1551bbb4435b6d816408bb69eafb27c7cc6d | /growl-http-proxy.py | f0d9a9ed5fe38e8c708b8549e25685afdb332c93 | [
"WTFPL"
] | permissive | brunobord/growl-http-proxy | 8622a2dc20e0bbcbf5c7481c659ab517c83a8be9 | 4e575e1ae9d395055eab9c3ef7f693068de88c1a | refs/heads/master | 2021-03-12T19:19:58.518156 | 2012-10-15T22:14:27 | 2012-10-15T22:14:27 | 6,206,709 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,446 | py | #!/usr/bin/env python
#-*- coding: utf-8 -*-
import argparse
from flask import Flask, request, abort, render_template
import Growl
import os
app = Flask(__name__)
APP_NAME = 'growl-http-proxy'
NOTIFICATIONS = ['update']
DEFAULT_ICON_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'static', 'icon.png')... | [
"bruno@jehaisleprintemps.net"
] | bruno@jehaisleprintemps.net |
7259ca3438f85859971f088f4b36164e0b9ba675 | 38d39a3c50b161e03599456ce8fb335bc3fb1b6e | /create-cpp-data.py | 2e5f9fa2a9091c93aca63c7866e22368c1eb757d | [
"LicenseRef-scancode-public-domain",
"CC0-1.0"
] | permissive | rymis/tz.js | 6e159e85c714286927eb55f52a7bb55d1014dcc4 | a1136c58fec5fe9c389b073b62d2296fbb5fe6a6 | refs/heads/master | 2020-07-14T18:22:01.711073 | 2019-09-06T15:13:01 | 2019-09-06T15:13:01 | 205,372,623 | 0 | 0 | NOASSERTION | 2019-09-06T15:13:02 | 2019-08-30T11:53:28 | Python | UTF-8 | Python | false | false | 2,612 | py | #!/usr/bin/env python
import json
import os
import sys
import shutil
INPUT_DIR = os.path.abspath(os.path.dirname(sys.argv[0]))
OUTPUT_DIR = os.path.join(INPUT_DIR, "output")
DATA_JSON = os.path.join(OUTPUT_DIR, "data.json")
INPUT_CPP = os.path.join(INPUT_DIR, "tzcpp.cpp.in")
OUTPUT_CPP = os.path.join(OUTPUT_DIR, "tzc... | [
"mikhail.ryzhov@kiwi.com"
] | mikhail.ryzhov@kiwi.com |
971c56d879a5de0f10578db694c2688ca82f4d73 | 87a83b426988e5d0762a48cffb73fe48deb985d9 | /roadrepair.py | 9b996b5d99df7e0dd25ffbaeb7963240f4d4db23 | [] | no_license | biswassampad/coding_challenges | 82049f31ffc87ffc8bd3d920cb0983e1ea711cf8 | 2a1d0e70231a7553b2c8093209741332df14b4be | refs/heads/master | 2022-12-31T21:54:12.358748 | 2020-10-26T07:17:49 | 2020-10-26T07:17:49 | 307,289,888 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 284 | py | def main():
crew_id = int(input("get the crewId"))
job_id = int(input("get the task id"))
distance = getMinCost(crew_id,job_id)
print('success')
def getMinCost(crew_id,job_id):
distance = job_id - crew_id
return distance
if __name__ == "__main__":
main() | [
"biswa.satpathy@iserveu.in"
] | biswa.satpathy@iserveu.in |
1b7268552686962f7e73c57ce2e1e80d69a6e9a8 | bfbe8a27ce6f46a7f2d03731b1de1e80cc6056c9 | /projects/programmers/easy/x_만큼_간격이_있는_n_개의_숫자.py | 1e54da1f59097679b655cb4c4b31a202adbfe45a | [] | no_license | paige0701/algorithms-and-more | 95175a18fd9d4a41659c50e3c5e314fe2bb23b8b | 763a4009f8fa87c24552b5e77375c72896672b58 | refs/heads/master | 2021-06-11T04:19:29.559758 | 2021-04-07T11:29:01 | 2021-04-07T11:29:01 | 184,376,577 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 191 | py | def test(a,b):
print([a*i for i in range(1, b+1)])
def main():
a = int(input('input a: \n'))
b = int(input('input b: \n'))
test(a,b)
if __name__ == '__main__':
main()
| [
"paigechoi0701@gmail.com"
] | paigechoi0701@gmail.com |
ad8c5d77245df03ba8f4e8cf1b8eac1ca17bbbb9 | 871c67ed1bd1ef90d88f7c46afefeab0bb4dc965 | /myProject/online/apps/courses/adminx.py | ec8d0265df9ef321db9f8ac447887c5146193838 | [] | no_license | Limenation/bishe | fb71f93a6c9d550db78bc6da1bf81f84bdf2169c | 371180932e34efb96005700424ccc6905f68344a | refs/heads/master | 2022-07-15T14:44:29.889204 | 2020-05-16T07:35:54 | 2020-05-16T07:35:54 | 262,919,067 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,204 | py | import xadmin
from .models import Courseinfo, Lession, Video, CourseResource, CourseBanner
from organizations.models import Organizationinfo
class LessonInline:
"""添加课程的时候可以顺便添加章节"""
model = Lession
readonly_fields = ['add_time']
extra = 0
class CourseResourceInline:
"""添加课程的时候可以顺便添加课程资源"""
... | [
"1448918377@qq.com"
] | 1448918377@qq.com |
df2331761715f4d8f86e9f4e234a7697f4d42221 | b3e95a6c6f7ce283c82c6357d2137ee7db3dbe11 | /hamming/hamming.py | 7e206bff426b98dda6e0689cf3f076f32fb778ec | [] | no_license | tarunkant/exercism_python | f3338353fc885c508f976bcb7ccd1565c7439522 | 1772acb5bc500ffa4cadc4be967f5bbd980b6295 | refs/heads/master | 2021-01-12T01:51:23.186012 | 2017-03-29T12:47:44 | 2017-03-29T12:47:44 | 78,438,642 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 382 | py | str1= raw_input("enter alphabets for comparing ")
str2= raw_input("enter alphabets fom which you want to compare ")
count=0
i=0
if len(str1)>=len(str2):
for i in range(len(str2)):
if str1[i]==str2[i]:
count +=1
else: i=+1
else:
for i in range(len(str2)):
if str1[i]==str2[i]:
count +=1
els... | [
"tarunkant05@gmail.com"
] | tarunkant05@gmail.com |
d40d4c0886ebeb7c5e6c46de7f421799756c92b7 | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_318/ch23_2019_03_27_15_00_44_973644.py | e268beaac58b3819e4295d3aa5d048c89b2d4156 | [] | no_license | gabriellaec/desoft-analise-exercicios | b77c6999424c5ce7e44086a12589a0ad43d6adca | 01940ab0897aa6005764fc220b900e4d6161d36b | refs/heads/main | 2023-01-31T17:19:42.050628 | 2020-12-16T05:21:31 | 2020-12-16T05:21:31 | 306,735,108 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 223 | py | def verifica_idade(x):
if(x>20):
print("Liberado EUA e BRASIL")
return x
if(x<21 and x>17):
print("Liberado BRASIL")
return x
if(x<18):
print("Nao esta liberado")
return x | [
"you@example.com"
] | you@example.com |
07e1e0e0c8bbfd406ceef507eed838493dee9eca | e82f28c2ff6312b027d6bfbda9c5c6585864dffd | /intown/apps/institutions/migrations/0005_auto_20150825_1927.py | 2cd6bbd9634fecb5d23b89b5905f2747c245fd82 | [
"MIT"
] | permissive | Elika-/intown-1 | a30435670c1bfcd6e3777ba41649cc045af31e7d | 50742a903cff7710cda305557ca33760b3fb2a0e | refs/heads/master | 2021-01-18T05:50:26.122554 | 2015-09-02T16:11:41 | 2015-09-02T16:11:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 887 | py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('core', '0004_auto_20150825_1909'),
('institutions', '0004_auto_20150825_1920'),
]
operations = [
migrations.CreateMo... | [
"ablx@posteo.de"
] | ablx@posteo.de |
3f982e8a36a779567542f4c382cd555febeef961 | ed10dc841d5b4f6a038e8f24f603750992d9fae9 | /lldb/test/API/lang/objc/foundation/TestFoundationDisassembly.py | bf9a40fc8da9b49c77e740cb835ab78aef313bfc | [
"NCSA",
"Apache-2.0",
"LLVM-exception"
] | permissive | WYK15/swift-Ollvm10 | 90c2f0ade099a1cc545183eba5c5a69765320401 | ea68224ab23470963b68dfcc28b5ac769a070ea3 | refs/heads/main | 2023-03-30T20:02:58.305792 | 2021-04-07T02:41:01 | 2021-04-07T02:41:01 | 355,189,226 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,449 | py | """
Test the lldb disassemble command on foundation framework.
"""
import unittest2
import os
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
@skipUnlessDarwin
class FoundationDisassembleTestCase(TestBase):
mydir = TestBase.compute_my... | [
"wangyankun@ishumei.com"
] | wangyankun@ishumei.com |
c46b8a2458a636eea1bde0cc9df07da0126d1e1c | 0c13891448e6c3136e2f651c776d1d11edee2577 | /src/template_method.py | 91d30a13953d467cfa30df4a7500ae59f97997f2 | [
"MIT"
] | permissive | MrRezoo/design-patterns-python | 31cb7b73ae05c5bd361eb3455df234c20529f465 | 8f8e2501ad8e05f1a75ce5be659d926c0ec99698 | refs/heads/master | 2023-08-01T22:01:01.186910 | 2021-10-02T07:57:49 | 2021-10-02T07:57:49 | 349,936,987 | 8 | 1 | MIT | 2021-04-07T14:55:10 | 2021-03-21T08:13:44 | Python | UTF-8 | Python | false | false | 1,178 | py | """
Behavioral pattern:
Template method
Example:
when we have static job between several classes use one ABC class
"""
from abc import ABC, abstractmethod
class Top(ABC):
def template_method(self):
self.first_common()
self.second_common()
self.third_require()
... | [
"rezam578@gmail.com"
] | rezam578@gmail.com |
af21a46323d7415dbd6a00afd00643952cdfb613 | e4309509368571a85439daed31a5467ab75d68a2 | /PyTrain-master/session1/json_work.py | e344f885d0846a0b3dfa535ab15b1942d9e1dac6 | [] | no_license | ragavendranps/Python | f3e66bebdf397deee9b3dff64974df2ac0760a92 | c67d6f571939f5f2ec81852b6741b3e07b72aa56 | refs/heads/master | 2022-11-05T10:52:34.008508 | 2020-06-22T18:03:10 | 2020-06-22T18:03:10 | 273,499,907 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 193 | py | import json
# some JSON:
x = '{ "name":"John", "age":30, "city":"New York"}'
# parse x:
y = json.loads(x)
print(type(x))
print(type(y))
# the result is a Python dictionary:
print(y["age"]) | [
"67148832+ragavendranps@users.noreply.github.com"
] | 67148832+ragavendranps@users.noreply.github.com |
dc7ba5b213781e5b0e36e68d28b93bc27e52c663 | d9503a748d51d6dbef6a76513382e19ad1c3107f | /第8日目/quantumWell_withBarrier_StarkEffect.py | df70897cc286330e945298578d845a0e9d51b218 | [] | no_license | quantumshiro/quantumcompute_python | 0446fbea0a79b7fba1b26b811763d776fcf8ccdb | 1092ceeea2737ddc6ad325ac603ae7618b13b12b | refs/heads/main | 2023-02-10T05:41:29.803979 | 2021-01-05T12:17:07 | 2021-01-05T12:17:07 | 326,984,405 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,544 | py | ############################################################################
# ポテンシャル障壁ありの無限に深い量子井戸に静電場を加えた電子状態
############################################################################
import math
import cmath
import matplotlib.pyplot as plt
import matplotlib.animation as animation
import scipy.integrate as ... | [
"noreply@github.com"
] | quantumshiro.noreply@github.com |
dbabe6ca1208d9ea8425eff6d26c6d13353f0b27 | 9124f0bd5e9c20f7e4bc44cf5b588b5953df195e | /DoutuWeb.py | ac1bad8e8e238dc60328fcce77e3c0be86f29b31 | [] | no_license | zhengquantao/crawl | d34d5704b0a1b772b97f63cc3074cdaf3bfdc1cc | dce7bfcf10c0080c2bc4d20465c5aba7687057ca | refs/heads/master | 2020-04-10T09:26:15.600629 | 2018-12-08T12:19:39 | 2018-12-08T12:19:39 | 160,936,237 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,253 | py | import requests
import re
import pymysql
db=pymysql.connect(host='127.0.0.1',port=3306,db='pysql',user='root',passwd='12345678',charset='utf8')
cursor=db.cursor()
cursor.execute("select*from images")
# print(cursor.fetchall())
def getHtml():
try:
for n in range(125, 151):
url = 'http://www.doutu... | [
"1483906080@qq.com"
] | 1483906080@qq.com |
da17794fd3bc959633b932fe700adc8c9e21337f | c08d383814f3becb750cb91ff890302bf098b3b0 | /lesson03/fib.py | 5a14545aad6fa6197efae6713877d901c3c9ce1d | [] | no_license | wangwei96/python_study | 03e137ce8808ca39c5bd19b8b1ea2424a167aaae | b355c0000d6aee3d9e846118d51128bcc9a3bc61 | refs/heads/master | 2021-05-06T13:13:46.826038 | 2018-01-02T07:25:06 | 2018-01-02T07:25:06 | 113,256,336 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 352 | py | #利用递归计算斐波那契数列第lim项的值
def fibnum(a=1,b=0,lim=4,lev=1):
if lev==lim:
return a
return fibnum(a+b,a,lim,lev+1)
#输入一个数字,调用求斐波那契数列该项数值的函数
def fib(i):
if i>0:
print(fibnum(lim=i))
else:
print('请输入正确的值!!!')
fib()
| [
"965158007@qq.com"
] | 965158007@qq.com |
56fbf2a47fa9865416f2c8ff06113e4b3ebbf002 | 934f170481a5f3807b14823f9e704fd877044d30 | /SAGAN.py | 5af51b32adb641eff5c37319b7332b3957d40e21 | [] | no_license | JustinLion83/Anime-GAN-tensorflow | c234bd28e197a801460683d07aa35d2d80cb96f9 | e3a5fd726aeaf08d01445d8176468d84cd3295f4 | refs/heads/master | 2020-07-03T06:36:25.765500 | 2019-08-17T19:37:04 | 2019-08-17T19:37:04 | 201,822,987 | 0 | 0 | null | 2019-08-11T22:45:42 | 2019-08-11T22:45:42 | null | UTF-8 | Python | false | false | 12,068 | py | from layers import *
import numpy as np
import time
from utils import util
import os
class SAGAN_model(object):
def __init__(self, args):
self.args = args
self.d_loss_log = []
self.g_loss_log = []
self.layer_num = int(np.log2(self.args.img_size[0])) - 3
# inputs
se... | [
"ccjdurandal422@163.com"
] | ccjdurandal422@163.com |
2260196e7fd923b0fd097df46a0ff059efad88ed | 7725595e01cdb454132ef8009726568f66148e86 | /untitled2.py | f2c99aa4ef051b5660df637d91e1f9846492dd97 | [] | no_license | chintugupta07/cabmanagementsystem | 0b2368efcf0ad19ede71fef3fd4434e78a185eca | 7714463a636928c01142f5d514a0adc919e02c35 | refs/heads/master | 2022-11-15T10:06:09.013704 | 2020-07-09T17:07:51 | 2020-07-09T17:07:51 | 278,423,716 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,816 | py | from tkinter import *
from tkinter import ttk
from tkinter import messagebox
import sqlite3
import re
class login:
a=0
b=0
c=0
mobile_no=0
def signup(self):
top=Tk()
top.title("create form")
top.geometry("500x450+425+75")
self.var... | [
"noreply@github.com"
] | chintugupta07.noreply@github.com |
4e49caf60862a2ba3e950e0b6ddc11b9b60b362c | d82c5af93dca23ee5b94458886e904c0fec6d9be | /appStatus/apps.py | 77b478ffcae53c40e159584871c57699c7a060c1 | [] | no_license | saiken86807/college-application-portal | ec6b5280f39c2da4063a60cf09a195cc73f9edee | c1f88809b90f70b8862c6d1b599c75aded0de1d7 | refs/heads/master | 2022-12-27T09:01:53.309254 | 2020-09-21T00:04:34 | 2020-09-21T00:04:34 | 290,922,203 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 93 | py | from django.apps import AppConfig
class AppstatusConfig(AppConfig):
name = 'appStatus'
| [
"stefanieaiken@Stefanies-MacBook-Air.local"
] | stefanieaiken@Stefanies-MacBook-Air.local |
481dbc7401b824b85be94529bba4c8899243e7a3 | 9f908092d78566d1c2f0d4b9d7b575c1b0a90266 | /01/flightscheduler/flights/urls.py | a848a69768d58cee1ca09090cb7ee7bf6bf59f0f | [] | no_license | FernandoDaflon/Django_Rest_Angular_8- | 478326d1677d53d67e090f0ebfd20efd2a3821f9 | 31be090910e80191fcde676473a15a316e1e11a2 | refs/heads/master | 2022-11-05T21:41:06.610890 | 2019-12-09T02:28:20 | 2019-12-09T02:28:20 | 226,766,189 | 0 | 1 | null | 2022-10-28T03:39:02 | 2019-12-09T02:18:09 | Python | UTF-8 | Python | false | false | 394 | py | from django.urls import path, include
from . import views
from rest_framework import routers
from django.conf.urls import url
# router = routers.DefaultRouter()
# router.register(r'users', views.UserViewSet)
urlpatterns = [
# path('', views.index, name='index'),
# path('', include(router.urls))
url(r'^$'... | [
"fernandodaflon@gmail.com"
] | fernandodaflon@gmail.com |
b9d7f5b0c705d83212e83386061033bed131b997 | ab8c7c35f89581045000028cac4fce3a0dc6ba07 | /chainer_maskrcnn/model/head/fpn_roi_keypoint_head.py | 1a163421ebc7c1510d8e9182239858413ef6e6a1 | [
"Apache-2.0"
] | permissive | katotetsuro/chainer-maskrcnn | 965b25c7b8e0411df7ab21841cfdf41c1a4c4b1b | f95eb067b99cdf555c5e9e90b34f1186df4ee342 | refs/heads/master | 2021-09-15T22:44:18.046410 | 2018-06-11T08:08:47 | 2018-06-11T08:08:47 | 115,767,724 | 20 | 1 | Apache-2.0 | 2018-04-22T13:59:07 | 2017-12-30T02:14:56 | Python | UTF-8 | Python | false | false | 4,304 | py | import chainer
import chainer.links as L
import chainer.functions as F
from chainer.links.model.vision.resnet import ResNet50Layers, BuildingBlock, _global_average_pooling_2d
import numpy as np
import copy
from chainer_maskrcnn.functions.roi_align_2d_yx import _roi_align_2d_yx
class FPNRoIKeypointHead(chainer.Chain):... | [
"nistetsurooy@gmail.com"
] | nistetsurooy@gmail.com |
9c0bf6f14b76ace7d83c6afd94b31c12d698f62b | dea486be1f69bc984632ff554e8c00280750bb49 | /lib/environ.py | c6af26b607d4e8225e2f1e4870889ba1446cbf7c | [] | no_license | cmkwong/RL_code | b20354a188c08d0a2c0cab78fb39577b7b425fa1 | 8b930747f4e9e54af6e8bf97b6bf109f7ab39b99 | refs/heads/master | 2022-04-13T14:46:40.094865 | 2020-03-14T14:25:15 | 2020-03-14T14:25:15 | 234,214,393 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,315 | py | import gym
import gym.spaces
from gym.utils import seeding
import enum
import numpy as np
import collections
from . import data
DEFAULT_BARS_COUNT = 20
DEFAULT_COMMISSION_PERC = 0.1
class Actions(enum.Enum):
Skip = 0
Buy = 1
Close = 2
class State:
def __init__(self, bars_count, commission_perc, re... | [
"47665725+cmkwong@users.noreply.github.com"
] | 47665725+cmkwong@users.noreply.github.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.