blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 283 | content_id stringlengths 40 40 | detected_licenses listlengths 0 91 | license_type stringclasses 2
values | repo_name stringlengths 3 135 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 68 | visit_date timestamp[ns]date 2015-07-25 20:53:29 2023-09-06 10:46:05 | revision_date timestamp[ns]date 1970-01-01 00:00:00 2037-05-03 13:00:00 | committer_date timestamp[ns]date 1970-01-01 00:00:00 2036-02-09 17:40:36 | github_id int64 1.61k 691M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 24
values | gha_event_created_at timestamp[ns]date 2012-06-03 10:21:33 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[ns]date 2008-03-27 23:40:48 2023-09-13 22:40:33 ⌀ | gha_language stringclasses 250
values | src_encoding stringclasses 27
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 6 10M | extension stringclasses 289
values | filename stringlengths 1 218 | content stringlengths 6 10M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c3dc4f10478785f683114d8b254297e4bc758ae5 | a87384e10f25d22e26ab13c5b410618c14a62df2 | /mysite/fwrule/models.py | 484a900a6bc317005f3284ab1dfa6234c81e2ce2 | [] | no_license | vinmazzi/Remote-Manager---UI | 7e7b7de7e24d158c939727639a2da40cbbe77709 | 13a3c596aaee7ab7a225be9698ddb2795dc28ceb | refs/heads/master | 2021-09-01T16:56:43.838029 | 2017-12-26T17:38:21 | 2017-12-26T17:38:21 | 115,570,393 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,133 | py | models.py | from django.db import models
from django.utils import timezone
from client.models import Client
from group.models import Group
import datetime
class Firewall_rule(models.Model):
group_fk = models.ForeignKey(Group, on_delete=models.CASCADE, default=0)
rule_name_text = models.CharField(max_length=150)
... |
daf987374322456f513fe4cc93500118015f068f | e497f01f30e896463881f7fce73318f920898e04 | /goat/model.py | d4a849b5a83f32faf78a8b6f33f900cb7b198bb2 | [] | no_license | zekarias-tilahun/goat | 0ac434fed040bdcd1dec0106940481ffe2343f42 | a2672dfbb9a7a3cc7c718ff213efa0ca99d922ac | refs/heads/master | 2021-04-02T13:01:24.169012 | 2020-12-21T10:53:35 | 2020-12-21T10:53:35 | 248,278,041 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,471 | py | model.py | """
Author: Zekarias Tilahun Kefato <zekarias@kth.se>
This module implements the core of the GOAT model.
GOAT is an acronym for the paper titled
Gossip and Attend: A Context-sensitive Graph Representation Learning
"""
import torch.nn.functional as F
import torch.nn as nn
import torch
class Goat(nn.Module):
... |
cc6967f4beab79f92312d66d52f11750f7e3b251 | 92c78eb9af70455ab664702b396a1bfcc96c92f8 | /traj_planner/OneRoadTestEnv/bertha/bertha.py | c0cc3b11cebb1c0f32c37dba377e5c4d7fc9cb5e | [] | no_license | mr-d-self-driving/AutonomousDriving | 83c42793d3acaf99a6c89f06f31086483219f316 | 94f9ee3d2af27f5849187699f3a66e30ebc24fc2 | refs/heads/master | 2022-01-03T03:50:37.299594 | 2018-03-15T17:53:21 | 2018-03-15T17:53:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 449 | py | bertha.py | """
This module contains the Bertha implementation class
"""
class Berhta:
"""
Implementation of the whole bertha optimization problem we need to setup
constraints, objective, boundaries, environment.
in essence this Class unites all.
"""
def __init__(self):
"""
Initialize an Op... |
c43f5949263eba68e3116ac86bef90d424c3b40a | d6bd507c6c179ad9436bfa6f447e87bdcaaf342d | /Code_Analysis/2D alt struc funk/plot_sf2D_A.py | a384b62044472275ca5cfbd32909cc32267aba84 | [] | no_license | JonasSinjan/DESY-Summer-Project-2019 | 0e41faa0da3171610c3f56f5fdfcffb21353c2da | fa34af53729044b4a042aa305802c4e3da9296e9 | refs/heads/master | 2022-10-25T22:37:33.722674 | 2020-06-19T12:07:53 | 2020-06-19T12:07:53 | 194,270,167 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 8,702 | py | plot_sf2D_A.py | import struct
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import ticker
from matplotlib import gridspec
niter = 5
def smoothing(xarr) :
lext = np.size(xarr,0)
sf2D_temp = np.zeros((lext,lext))
for iter in range (0,niter) :
for i in range (0,lext-1) :
for j in range (0,lext-1) ... |
1463eb0fb1078d17b1b556618cd624b5771727a8 | a04440959a32949810fae34b9d8913aaf9682045 | /library/core_scripts/normalize/normalize.py | 18500ed8e1d09fb6b75aa8fdb7e98d555675077f | [
"Apache-2.0"
] | permissive | zeromtmu/biojupies-plugins | f14fc32583207b802ba6afb5d60f95fd0283ba5c | e4c042f6024d627e3410c9c090e7124e96a49bb3 | refs/heads/master | 2020-04-06T23:41:05.237128 | 2018-11-14T20:09:07 | 2018-11-14T20:09:07 | 157,877,769 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,361 | py | normalize.py | #################################################################
#################################################################
############### Normalize Dataset
#################################################################
#################################################################
#####################... |
c5591c33c6063a9317f40896701c6f45f50e0052 | 907dcd106f51ad872c6a2247c6c65d71a297e0ee | /fasp/scripts/FASPScript7.py | 46f9aba25b49b502ed52ab234ece2cb9f2f49ffb | [
"Apache-2.0"
] | permissive | ahmedsadeque/fasp-scripts | 7a8d5a170c6c9fab51352caf115b96f252c1fa67 | 0fcabaaa3b304d8abcf567e2369de546fb918eba | refs/heads/master | 2023-01-28T02:15:14.366690 | 2020-11-20T17:43:25 | 2020-11-20T17:43:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,328 | py | FASPScript7.py | ''' Query to illustrate Anne's use case for variants related to a gene involved in a rare pediatric brain cancer'''
# IMPORTS
import sys
from fasp.runner import FASPRunner
# The implementations we're using
from fasp.loc import crdcDRSClient
from fasp.workflow import GCPLSsamtools
from fasp.search import BigQuerySea... |
888e19643a0af7b2e046f4a4fb829736ea68a06f | e478c7c68ecb602032433ac9dbcc74bc42d07ee2 | /controllers/func01.py | 772541a4796494b3de427a95e1c0f8d4a896c602 | [] | no_license | batscars/flask-template | cbbf5f8d9f80c80c030025d15a4394a24ec79b9e | f214855bbc49c6480d3c611ebbb2f94983e6d337 | refs/heads/master | 2020-08-10T15:22:01.214683 | 2019-11-04T08:13:15 | 2019-11-04T08:13:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 152 | py | func01.py | # -*- coding: utf-8 -*-
class Func01(object):
def __init__(self, **kwargs):
self.data = kwargs
def run(self):
return self.data
|
222c9a378a664742bae55f7c15685cfd5ea32033 | 1c3bc979614211b6df9a8757ee7f1a35d3da787c | /view/main.py | 20310588d4f8c1bd078a8ddf107b122051e81215 | [
"Apache-2.0"
] | permissive | rbzargon/py_flashcards | 5f8a8e49bfa6da075b1dd0a0535e240b6897184c | 69a154ac747484ed508565aa4cfb9871b68f6c7a | refs/heads/master | 2020-06-03T06:41:26.617163 | 2019-06-29T17:26:26 | 2019-06-29T17:26:26 | 191,483,053 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,059 | py | main.py | """
Cooper King
CS521
Due June 30, 2019
Term project
Flashcard application GUI - main view
"""
import tkinter as tk
from tkinter import ttk
from typing import Callable, Iterable
from .progress import ProgressView
from .question import QuestionView
from .answer import AnswerView
class MainView:
'''Main view with... |
0baee514316990b9661891b9d03640d38ba50fe4 | 46629ff6f29ff095ce42a3ff943f664055cb571e | /desafio86.py | de28ef30b672a108b15ca63aeb49e1ccf819fd03 | [] | no_license | alex-gsantos/cursos_em_video | 4640defb2a4467d0a76c09c62cc32354f14dd9be | 7dbd75300c66789239d51d6f063a06ed28c11f0f | refs/heads/main | 2023-06-23T11:11:57.627219 | 2021-07-09T19:13:59 | 2021-07-09T19:13:59 | 384,485,497 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 766 | py | desafio86.py | '''
Crie um programa que crie uma matriz de dimensão 3x3 e
preencha com valores lidos pelo teclado. No final, mostre
a matriz na tela, com a formatação correta.
'''
print('=' * 50)
print((' ' * 10), 'Programa \033[1;4mDESAFIO86\033[m iniciado.')
print('=' * 50)
lista = list()
num = list()
linha = 0
while l... |
e6d3e109008da975f857a4e4031ca6f1ac915b6e | 854da28d84bd8eea1bc9096d63fdec4d2c576230 | /s.py | e75874346991cf58b5421991b38c91876216bcf5 | [] | no_license | PosticaDenis/Self-Driving_Car | 0e2f3d1f67d6d6dc1316f5ca44a2dcbb824e0036 | a0497cd001009b2d5fef3cd6d5c485f88c1b2b29 | refs/heads/master | 2020-03-10T22:06:58.680852 | 2018-05-22T11:32:30 | 2018-05-22T11:32:30 | 129,611,347 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 782 | py | s.py | import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
TRIG = 26
ECHO = 19
print "Distance Measurement In Progress"
GPIO.setup(TRIG,GPIO.OUT)
GPIO.setup(ECHO,GPIO.IN)
try:
while(True):
GPIO.output(TRIG, False)
print "Waiting For Sensor To Settle"
time.sleep(2)
GPIO.outp... |
590526529f76fe9c101abddd0dc0a8b9d8ec13ad | afd7900769d53d45e6c949a322f7e8743c0b55bc | /vehicle_detect_extract.py | 6e1971f12ffa60d49a9ce3e662e1eb0a9560adff | [] | no_license | melonshreyas/Vehicle-Detection-and-Segmentation | edb62dcb0ba4233e2eb2b254c7de3a2722b517c8 | 6715ce1f6f217839d47c303ec47360c196a495c7 | refs/heads/master | 2021-10-27T18:33:19.245505 | 2019-04-18T16:40:18 | 2019-04-18T16:40:18 | 182,112,460 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,020 | py | vehicle_detect_extract.py | import cv2
import numpy as np
import os
import time
import shutil
car_cascade = cv2.CascadeClassifier(r'/home/melon/Desktop/project_dinu/cars.xml')
def Launch(video):
start = time.time()
cap = cv2.VideoCapture(video)
fps = cap.get(cv2.CAP_PROP_FPS)
totalFrames = int(cap.get(cv2.CAP_PROP_FRAME_COUNT)... |
e59bc2ff2e5c9e45692a789248f932cf52baef7b | f3fa3f9844e54f1253a1cfccba2e9988560d2833 | /gray/freelance.py | 7f4563f22ac91afeb7ec46cf52363ab831c213c2 | [] | no_license | grayskripko/python-robots | a8ccbfb6bd3e931ae7b83e688cda9775882be027 | debf07554c09195c9ee78618860e5bcb47214795 | refs/heads/master | 2021-01-10T10:55:15.613543 | 2015-12-02T09:16:53 | 2015-12-02T09:16:53 | 47,250,168 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,346 | py | freelance.py | import os
import time
from gray.common.data_utils import send_email, read_list, write_list
from gray.common.node_utils import Node, Provider
upwork_job_feed_url = "https://www.upwork.com/find-work-home/"
prev_attractive_file_name = "upwork/prev_attractive.csv"
delay_between_job_feed_refresh_sec = 30
delay_between_requ... |
cbd37832fdb3f38acf50ccf57c939d4ace39d139 | fc8c4d46dcad7c768a06e8ce31a8aa4ee32c8256 | /week2/Linkedlist_note.py | 6a6f0b9ff4516ca89209d8698d00e4b1dae20ff9 | [] | no_license | wangshuti/DSA | 75cfb34af69998a743b99d557b6a72ba96eb1f69 | 7a3380b06ace3c3a68ee93aff19f89799b5dc6b8 | refs/heads/master | 2020-07-30T19:27:55.810783 | 2020-01-10T04:13:26 | 2020-01-10T04:13:26 | 210,332,637 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,484 | py | Linkedlist_note.py | Python 3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 22:20:52) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> class ListNode:
def __init__(self, data):
# store data
self.data = data
# store the reference (next item)
sel... |
e2990726e888619e375175866a090d021936b8d0 | 1501b8685f7503f25e83450c2278bbe2ed3deae8 | /net/hourglass_sr8.py | 688b274d33e79db2b1f06ea1f824a80162a1611c | [] | no_license | lwx0724/SEDCN | f40a93a421da538da507e25e486b5e6dc2f3df63 | 127a30604d8ee3ab93bdac37e876121ed21a5470 | refs/heads/master | 2022-09-17T22:22:30.193093 | 2020-06-03T09:49:03 | 2020-06-03T09:49:03 | 269,037,624 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,974 | py | hourglass_sr8.py |
import torch.nn as nn
import torch
from net import common
import torch.nn.functional as F
def default_conv(in_channels, out_channels, kernel_size,stride=1, bias=True):
return nn.Conv2d(
in_channels, out_channels, kernel_size,stride=stride,
padding=(kernel_size//2), bias=bias)
class DecoderBase(nn... |
a063e8ede8776fddf6742c05eee7f4a2f74d0f07 | 5fb7c207c3398418b4c9389774841f8020d8bc5d | /main.py | 2ef36e893761930f4fe21d4bb1d5fc1e073284b7 | [] | no_license | KelwinTan/AIG_KnuckleBall | 84f64251bfedbf4410f8eb746ce6e4f1eeb6ff37 | a39881c5a6b45802d5c86b0ca359d539287753e5 | refs/heads/master | 2020-09-03T00:31:26.752387 | 2019-11-03T17:51:22 | 2019-11-03T17:51:22 | 219,341,251 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,718 | py | main.py | GlowScript 2.9 VPython
#this prevents accidental user scrolling
scene.userzoom=False
#gravitational field vector
g=vector(0,-9.8,0)
#these two lines make the ground
ground=box(pos=vector(0,-1.5,0), size=vector(10,.2,20), color=color.green)
line=box(pos=vector(0,-1.49,0), size=vector(.1,.2,20), color=color.white)
#t... |
39bb210da475968cf43b25195739376f481eeb47 | 83cfd4dec02d1bfe36663b1ef1c5344a9ac922ef | /tests/test_jobsetup.py | c6ec64cbd002cbbbaa451ba89d0dcb6aeeb9b932 | [
"MIT"
] | permissive | spirali/orco | f170a968725408caca08ec0915b835cebd19423d | 32c839b4d691a3eb83cfa379a1ec429adcf7f1b0 | refs/heads/master | 2021-07-22T11:41:19.430670 | 2020-06-10T08:56:17 | 2020-06-10T08:56:17 | 195,656,806 | 4 | 2 | MIT | 2020-07-13T08:40:46 | 2019-07-07T13:50:34 | Python | UTF-8 | Python | false | false | 1,353 | py | test_jobsetup.py | import orco
import time
def test_setup_exclusive(env):
@orco.builder()
def builder1(c):
time.sleep(1)
@orco.builder(job_setup=orco.JobSetup(exclusive=True))
def builder2(c):
time.sleep(1)
runtime = env.test_runtime(n_processes=2)
start = time.time()
runtime.compute_man... |
2a0510c1d98b2dce4a92ffaed2a9a735012ef4de | b4accbac1e9e45554f5d75a6b71cf5cd5d84f1d1 | /panels/__init__.py | ab9d8d862833500137872a0f6c0c5e5cab3160d8 | [] | no_license | cganterh/tornadoBoxes | 1fbd0b981635d9dee7247db548af9c42d8c678e5 | d03603b64011260e24b2eea6b75e2ae0cfb17690 | refs/heads/master | 2021-01-10T20:46:51.898880 | 2015-06-21T19:49:25 | 2015-06-21T19:49:25 | 29,992,197 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 201 | py | __init__.py | from controller import app, MSGHandler
from src.load import load_boiler_ui_modules, load_wsclasses
from logging import debug
load_boiler_ui_modules(__name__, app)
load_wsclasses(__name__, MSGHandler)
|
debf2b36bcadc7a7e25796693c975a49a1ff52a4 | fbf947f1ecfa570fb9a9c5d4e788196bb68899fa | /scraper.py | f85484c92b5a5257adff3bfc1fdf72f0fcf1b10e | [] | no_license | LHolmberg/webscraper | b7f5f1146c16a452c36b778f64d223be4103c82f | 6464abf19b9294f36284a8f06d0839a3ed068b0f | refs/heads/master | 2020-07-15T16:34:48.340569 | 2019-09-01T00:04:55 | 2019-09-01T00:04:55 | 201,313,013 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,185 | py | scraper.py | from selenium import webdriver
from bs4 import BeautifulSoup
import json
#Variable setup
SCHOOL = "school"
USERNAME = "username"
PASSWORD = "password"
MAIN_URL = "https://sms.schoolsoft.se/{}/sso".format(SCHOOL)
###############################################################
#Logging in to the website
driver = webdri... |
e333a50478b2a19cdf537069b018a395a59139be | c7f16cebd5d20ea26a4154a996544c822614ed6e | /ProblemSolving/Array/FindKthMax.py | 101f8a9c20c56822c1aedbeb4e8895235c752a74 | [] | no_license | abdulkaderm11/BlackMagician | c39aa03a8d30244e15cd7cd46b76810448f4d738 | 658dd8abd5171695c7f0cf1eba533bca5ef57f6d | refs/heads/master | 2022-12-05T13:41:23.025428 | 2020-08-24T13:53:31 | 2020-08-24T13:53:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 851 | py | FindKthMax.py | """
use quick sort to get the kth max value in the array
recursion return issue, very interesting:
https://www.jianshu.com/p/c1dcf423e128
"""
def swap(array, index1, index2):
p = array[index1]
array[index1] = array[index2]
array[index2] = p
def quicksort(array, low, high, k):
if (low > high):
return
key = ... |
9229837e45488ce1fb77af76179ce2ce3a806386 | 35bb05c0383405a2d5a6d41308f39c630ae6a76f | /catoclient/commands/runtask.py | 1d2a48d2ba09c533a2cc0c103a8e16845cd0c8fe | [
"Apache-2.0"
] | permissive | AsherBond/catoclient | b63104dfcf842b1f39a4909f7f0b649ba8a64213 | b1a88fc6c89704bb1bba7485ccd63aa9aa17fe6a | refs/heads/master | 2021-01-15T20:48:17.957595 | 2012-09-13T16:48:05 | 2012-09-13T16:48:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,929 | py | runtask.py | #########################################################################
# Copyright 2011 Cloud Sidekick
#
# 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... |
373c102018fdcc5211263304c368c2e8beef3257 | dc139f40f5ecd6dc8e128ab874d72d0af9ffc3b1 | /myapp/urls.py | 62faffac6596ccf681bd0717c7941ca1cc9d6776 | [] | no_license | SourcezZ/sywhy | 44aed1cdd78066655a0ceff191100b3b8265129e | ca71266e5be317cc1aee0b9ee3cbd7ad323de9e5 | refs/heads/master | 2022-01-25T08:42:35.487318 | 2021-04-12T06:11:02 | 2021-04-12T06:11:02 | 148,881,655 | 0 | 0 | null | 2022-01-15T04:01:06 | 2018-09-15T07:53:53 | JavaScript | UTF-8 | Python | false | false | 1,295 | py | urls.py | # -- coding: utf-8 --
from django.conf.urls import url
from myapp.view import views
from myapp.view import story
from myapp.view import img # 添加
from myapp.view import login
from myapp.view import tuling
from myapp.view import utilView
from myapp.view.wechat import wechat_modules
from myapp.view import router
urlpatt... |
622b388beb56eba85bbb08510c2bcea55f23da9a | ff037ef6400b8a02d8867a37706778fc268267b1 | /source-code/day_6/stringexample.py | f7ced0bb6c078a081580defa4ded401b3e2f297a | [] | no_license | learnwithlakshman/core-python | 87eeb74dc0e18b14878d2b835bfb0f026c2d2a28 | 9f63b0b29b467de6412b12d7d4a90cf6445ce6bf | refs/heads/main | 2023-05-31T16:26:37.140383 | 2021-07-09T15:55:43 | 2021-07-09T15:55:43 | 381,086,076 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 446 | py | stringexample.py | data = " Ramya , Deepa,LIRIL ,amma, dad, Kiran, 12321 , Suresh, Jayesh, Ramesh,Balu"
lst = data.split(",")
for name in lst:
name = name.strip().upper()
rname = name[::-1]
if name == rname:
print(name)
girlsdata = "Tanvi,Dhatri,Haadya,Deepthi,Deepa,Ramya"
# Name which start with DEE get those name... |
e1787fd4be66d19ab83ece44eacfd96cb488b504 | 3e846a5af03e64090839608dbe7acd627bde6c6b | /test4geeks/test4geeks01.py | 3853e9d405f702132bdbd9ea65715e0cdc7ddecf | [] | no_license | deep-droid/python | 2e3b8f6086052e6c6a3a54ff5f4d5c39c4e140de | 7fbff6b88e5a87abfd24964601a16b7817181032 | refs/heads/master | 2021-06-04T04:45:32.887460 | 2016-09-11T23:03:52 | 2016-09-11T23:03:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 552 | py | test4geeks01.py | with expression [as var]
#...BODY...
#object is the result of the expression and must have __enter__ and __exit__ methods
#result of the expression must be context manager - implements context management protocol
#https://www.python.org/dev/peps/pep-0343/
# This PEP adds a new statement "with" to the Python language... |
f3167d8f1a806c38fb10672605d8e94265d2fc9c | 39b0788f69d51720726cbc30fa45cb78e2067516 | /backend/models/event.py | 284d5bdc9f1af6e0b86eba253bea5d6a472eb0a3 | [
"Apache-2.0"
] | permissive | scorelab/DengueStop | 3d86b7b299592497d420d951a1d70a908d17f457 | e3fa55bfb4cd737a9fafd6a773e468aa0ce82186 | refs/heads/master | 2023-03-30T06:38:14.273906 | 2021-03-22T07:29:36 | 2021-03-22T07:29:36 | 268,936,761 | 3 | 14 | Apache-2.0 | 2021-03-22T07:29:37 | 2020-06-03T00:21:39 | JavaScript | UTF-8 | Python | false | false | 2,712 | py | event.py | from database import db
from database import ma
from datetime import datetime
from sqlalchemy import ForeignKeyConstraint
from models.admin import Admin, admin_limited_schema
from models.event_status import EventStatus, event_status_schema
from models.org_unit import org_unit_schema
class Event(db.Model):
# class ... |
a26cab29f0777764f014eeff13745be60e55b62d | 729f7f46e82c94a66de0d6d1c927c1d938db76a4 | /Tests/Scripts/pytest_example.py | 33810722b056d8c3e5446f2225534925a2e25826 | [] | no_license | miket1113/csec-380-skitter | ce8ec14f3e00136355251ec32d6e66f87b1ae3ed | 3d26560a2889a31ddd6fa406c0682dc99817efd0 | refs/heads/master | 2021-06-10T09:42:41.711846 | 2018-12-03T04:34:24 | 2018-12-03T04:34:24 | 148,395,763 | 0 | 1 | null | 2021-06-01T23:00:14 | 2018-09-12T00:09:03 | HTML | UTF-8 | Python | false | false | 193 | py | pytest_example.py | import requests
#try make the request
try:
r = requests.get('http://skitter.com')
print(r) # see the results
# catch a failue
except (requests.ConnectionError, requests.Timeout) as x:
pass |
de77edaccdaada785f41828135ad2da4ae2b403e | 9ec1000b65229efcaa9d9a8b61f05856a1aa3ef0 | /blogs/models.py | bb15997ed5a467b06685310cc280e9c52e47436c | [] | no_license | unixlamaster/test_blog_py | 1dd7b8956531ec4b5c98c7c8ec189fca10437e2e | ffb2df7880d9ab79902fd98cc6291ae9ae8480e4 | refs/heads/master | 2020-04-10T12:49:48.622101 | 2018-12-10T19:26:06 | 2018-12-10T19:26:06 | 161,033,426 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,657 | py | models.py | from django.db import models
from django.contrib.auth.models import User
from django.db.models.signals import post_save
from django.dispatch import receiver
from django.core.mail import EmailMultiAlternatives
from django.template import loader
from django.conf import settings
from django.contrib.sites.shortcuts import ... |
c3efaeab600ec9a7a9fffdfad5c9dc1faad8fee7 | 606d66d369e36d9a13e5b7f1293a38107394703a | /HoldPeak VC820/HoldPeak VC820.py | 88c58850c21bf20548af9068420794001098a968 | [] | no_license | Haschtl/RTOC-Plugins | 9b0b283e36a5d822ce209788c7d1b0098afa0257 | a66ed71a21b47ebe8335e33638443c6049d5397b | refs/heads/master | 2020-04-10T15:07:47.602267 | 2020-01-07T00:48:50 | 2020-01-07T00:48:50 | 161,098,013 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 5,193 | py | HoldPeak VC820.py | try:
from LoggerPlugin import LoggerPlugin
except ImportError:
from RTOC.LoggerPlugin import LoggerPlugin
from .holdPeak_VC820.vc820py.vc820 import MultimeterMessage
import serial
import sys
import traceback
from PyQt5 import uic
from PyQt5 import QtWidgets
import logging as log
log.basicConfig(level=log.INFO... |
776470546585257bf06073e2d894e8a04cf2376d | 3d86cbbe918712d461025018e130f779dfab3f2b | /python/test_duck_typing.py | b4429cbfc7034d25482cd6c726b7706aa3a10556 | [] | no_license | xiaotdl/Sandbox | 89a9632b01f92bb7e2b0acf2dbe2988af6c4a57d | 653d33345d8493264b4d5bba4361274ff86cc961 | refs/heads/master | 2022-12-21T06:56:51.771378 | 2019-04-23T01:43:35 | 2019-04-23T01:43:35 | 48,220,817 | 0 | 0 | null | 2022-12-08T02:18:51 | 2015-12-18T07:26:08 | HTML | UTF-8 | Python | false | false | 1,957 | py | test_duck_typing.py | """
Duck typing
Ref: http://www.voidspace.org.uk/python/articles/duck_typing.shtml
"""
##########
# mathmatic operator (syntactic sugar)
print 3 + 3
# same as >>>
print int.__add__(3, 3)
# <<<
# overload '+' operator
class Klass1(object):
def __init__(self, a, b):
self.a = a
self.b = b
def __a... |
60b5e515c7275bfa0f79e22f54302a578c2f7b79 | 344b2f91fe7343db5ee6699c6f63df897e481e33 | /Linked Lists/12_find_happy_number.py | 81cf8c586480d7a64ed12864b69e9f6dada295ee | [] | no_license | anatulea/Educative_challenges | 616f46c6e110fb99d32b6464943806ee7f58632d | d36c8089fc7fdacb4fbb2b7da3df52f4f79cf8f0 | refs/heads/master | 2023-03-20T09:56:21.815318 | 2021-03-11T00:46:57 | 2021-03-11T00:46:57 | 328,543,731 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 496 | py | 12_find_happy_number.py | def find_happy_number(num):
slow, fast = num, num
while True:
slow = find_square_sum(slow) # move one step
fast = find_square_sum(find_square_sum(fast)) # move two steps
if slow == fast: # found the cycle
break
return slow == 1 # see if the cycle is stuck on the number '1'
def find_square_... |
af1a6c6009b21962228fbe737f27c22bf9460762 | 8f081bced527da9a36663d39839bb4c82260a03b | /ping_pong_chat/communication.py | dae8e491e7f5dae1fb6c5a9b1a70859fec8bf556 | [
"LicenseRef-scancode-free-unknown",
"Apache-2.0"
] | permissive | fredo/aiogevent | 428a71aa388b1a7c1300ae753ee28982110cb29f | ca1fe4e4e96e3c7e321c1af5d9ae2e92ac19705b | refs/heads/master | 2022-10-12T01:11:25.076375 | 2020-06-10T15:00:03 | 2020-06-10T15:00:03 | 268,825,594 | 0 | 0 | Apache-2.0 | 2020-06-02T14:37:12 | 2020-06-02T14:37:11 | null | UTF-8 | Python | false | false | 404 | py | communication.py | from gevent.event import Event
from gevent.queue import Queue
from ping_pong_chat.aio_queue import AGQueue
received_event = Event()
leave_rooms_event = Event()
exit_event = Event()
output_message_queue = AGQueue()
input_message_queue = AGQueue()
matrix_to_aio_queue = AGQueue()
aio_to_matrix_queue = AGQueue()
sync_to_... |
ccb8268dc55b231cbc2d93f333647d3f2130f1f6 | 1dace8b9d8f523c0106d294ded5001e9711fa4a9 | /sessions_coding/migrations/0007_auto_20180709_2215.py | 79d02d53ed08fee35f767188558a2d35485c3e9b | [
"MIT"
] | permissive | cinai/teacher_discourse_form | b9edd158c5de6f3b3272372eb03d17b389433dae | 7d6863dbf8d628011c6b0653ae7ca4e218c2d3bc | refs/heads/master | 2020-03-22T18:10:26.137730 | 2019-01-29T14:57:12 | 2019-01-29T14:57:12 | 140,442,014 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 519 | py | 0007_auto_20180709_2215.py | # Generated by Django 2.0.7 on 2018-07-10 02:15
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('sessions_coding', '0006_auto_20180709_2207'),
]
operations = [
migrations.AlterField(
model_name='classroom_session',
... |
1db422717210c03edc3e3670ea69e325a6a5b3d2 | 808b1355163013c73f841365c2e691c32a7c2087 | /fd/models.py | fe139f9f12c648979dad92c69ae7ef813c319c9d | [] | no_license | Killoude/django_ex | 68f303df7265dfe92e7ea695ffd6fc127a984cc4 | ee88cbb705e3c1ff845b92d21d2ce42db2718413 | refs/heads/master | 2020-09-22T22:21:52.317901 | 2019-12-05T07:41:39 | 2019-12-05T07:41:39 | 225,333,417 | 0 | 0 | null | 2019-12-05T07:41:41 | 2019-12-02T09:17:05 | Python | UTF-8 | Python | false | false | 4,368 | py | models.py | import datetime
from django.db import models
from django.utils import timezone
class Users(models.Model):
username = models.CharField(max_length=11)
password = models.CharField(max_length=11)
role_type = models.IntegerField()
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models... |
8c4b7a0c22a1513fa916abb1c7ff7ab8e5566502 | 3ef9ce940c03b8c37df324ecea260dc6c2e8b9d2 | /nmag/source/example_touching/touching.geo.py | 4b745727d673d198ee5d82dc51f690d637a0c525 | [] | no_license | Venkat004/nmag-doc | bd5563dab996b9f64be3aa78c0666d66f1bb5b1c | a4d5de6bad0681511538d0103b3cc96a0e357cff | refs/heads/master | 2020-03-11T19:14:56.264051 | 2016-12-02T15:20:29 | 2016-12-02T15:20:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 387 | py | touching.geo.py | geo = """
algebraic3d
solid cube1 = orthobrick ( 0, -$L$, -$L$; $L2$, $L$, $L$) -maxh = $D$;
solid cube2 = orthobrick (-$L2$, -$L$, -$L$; 0, $L$, $L$) -maxh = $D$;
tlo cube1;
tlo cube2;
"""
L = 10
D = 5
var_vals = [("L", L), ("L2", 2*L), ("D", D)]
import sys
f = open(sys.argv[1], "w")
for var, val in var_vals:... |
ed0ad06185a1cfdf84666333c92b194e8b150b3e | b083afcaf9d439552b818ed159c8c87b86c436a1 | /3.features/features_ex.py | 8e5d17c587dcd6768b21000b7eac3d08f51bc050 | [] | no_license | meeyeong11/nlp-simple_tutorials | 5a6cb1ce167c17ca82a1e9f6b8230c9657bc8ed6 | 3df6063da93755e19828f4198cc1b1ae7dd29638 | refs/heads/master | 2020-03-08T20:14:43.654685 | 2019-08-30T13:26:05 | 2019-08-30T13:26:05 | 128,377,272 | 0 | 1 | null | 2018-11-27T09:29:44 | 2018-04-06T09:49:14 | Python | UTF-8 | Python | false | false | 1,382 | py | features_ex.py | #-*- coding: utf-8 -*-
def char_features(sent):
return list(sent)
def word_features(sent):
from nltk import word_tokenize
return word_tokenize(sent)
def stemmed_features(sent):
from nltk.stem.porter import PorterStemmer
stemmer = PorterStemmer()
return [stemmer.stem(w) for w in word_features(sent)]
def p... |
0311822c96d5ee5d4b570f6d460b1a800520efef | 98067be8930cf795da7b35275cdf86787656cca5 | /src/move_data.py | ab5c2c805e2364b39b0dcdb31812276044badaf7 | [] | no_license | akshay-sharma1995/let_it_flow | e9821b93a9f29f32267cd35a5491cba8ecca65e7 | 7ef2f9151eef9d940a332f07be79d8f5db973a34 | refs/heads/master | 2022-11-19T00:46:06.283215 | 2020-07-16T22:40:21 | 2020-07-16T22:40:21 | 246,896,482 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 984 | py | move_data.py | from glob import glob
import os
import random
import shutil
def main():
data_path = "/home/suhail/DL/let_it_flow/data/MCL-V/video_bitstream/data_pairs/"
train_path = "/home/suhail/DL/let_it_flow/data/train/"
test_path = "/home/suhail/DL/let_it_flow/data/test/"
if not os.path.isdir(train_path):
... |
ec0aac804bdf2ae0c7b3e9244a618500d63aa229 | f1c9b308375ad417a277ae308192123b52bc7e45 | /ttbar_getdata_script.py | 3411ad7efa5adc75f5dd62075d2010dd24c16246 | [] | no_license | kselvam21/GAN-ttbar | 429d0f2ced53dac2cc20de3132261ee28820612b | 6d726bd4a9a044223c567e2a0ac515034e91daa6 | refs/heads/master | 2021-09-03T02:48:42.567779 | 2018-01-05T02:19:18 | 2018-01-05T02:19:18 | 104,211,828 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,375 | py | ttbar_getdata_script.py | #Author: Kaviarasan Selvam
#This script gets all the datasets from the directory and saves them in 1 hdf5 file
#Note: Step 1 and Step 2 are done seperately. Comment Step 2 when doing Step 1 and vice versa
import numpy as np
import h5py
import glob
from ttbar_normalize import normalize
#******************************... |
0c5afa2d65d0a8cb8dea5c6c479f699e83e8ba71 | 291e75722ef30d07194742e8267352a42c040c43 | /backend/match_games/stores/views.py | 916cea900e2b984e4e1fdf3ae379d7ec4853dfab | [
"MIT"
] | permissive | flaviogf/match_games | 725942025bf21322ca6644d62f8b8a9ae4b4c1bb | 7d2c2f35749715f36855031911ba67690cea8cb1 | refs/heads/master | 2020-06-30T05:13:38.572135 | 2019-09-18T23:13:34 | 2019-09-18T23:13:34 | 200,736,834 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,202 | py | views.py | import secrets
from os.path import join
from flask import Blueprint, current_app, request, url_for
from match_games import db
from match_games.decorators import json, transational, validate
from match_games.models import Store
from match_games.pagination import create_pagination
from match_games.stores.serializers im... |
98df6e54380f1ce81e53dde9877ffcdf2e4885e3 | d2ba34f9d4f01c3e173c0b40e1b34742cb91cca1 | /scripts/case/test03.py | 62f5ab7f79de117e1527855c4e324ac66a55ccc1 | [] | no_license | wulimin523/pytestTest | adb6998793282b06e6577e4e0f6edf0451d69cae | d280994ce7a02e892f9476a454ce175aa1487233 | refs/heads/master | 2023-02-15T06:10:31.068251 | 2021-01-15T10:26:13 | 2021-01-15T10:26:13 | 329,856,273 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 870 | py | test03.py | # -*- coding: utf-8 -*-
"""
-------------------------------------------------
# @Project :pytestTest
# @File :test01
# @Date :2021/1/11 10:26
# @Author :吴利民
# @Email :wulimin523@163.com
# @Software :PyCharm
-------------------------------------------------
"""
import pytest
class Test03(object):
def s... |
a277550c48f00488f993305b2dadc52d86eedfc2 | 4d7273dfabf02a06189469e92cffab9e636f19ea | /CIS_2750/iCalendar/xcal.py | df4c255e7067329ce6c08cc2c6d210556704da33 | [] | no_license | karolzdebel/UoG_Projects | 4376c636e1b4f605ec9e6eb9bd7ad9432c1c020c | 09e30dcb1570d30b42497c7e2c87f8289b6dd11f | refs/heads/master | 2021-01-01T03:54:34.349560 | 2016-04-23T22:34:10 | 2016-04-23T22:34:10 | 56,943,264 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 43,437 | py | xcal.py | #!/usr/bin/python3
###################################################################
# xcal.py -- Front-end GUI for calcomp.
# Last updated: 1:01 PM Match-18-16
#
# Name: Karol Zdebel
# Student Number: 0892519
# Contact: kzdebel@mail.uoguelph.ca
###################################################################
... |
ae775059f3db9798ebc83f4a68af86bdd8726b17 | 95100d3a58122a81946eac46618b9e59bef1ba22 | /Bin/ConfigConstants/netflowTemplate.py | d78781643b1ca674b64be0c48d4a57f03c4707fa | [] | no_license | ayiya-hui/automation | 6fc65bf7168a2ca663d17ead66ad83adffb61cb4 | d100795db2275994a40199b8935296ae30a9eb0e | refs/heads/master | 2022-12-31T08:32:53.558207 | 2020-05-25T09:17:53 | 2020-05-25T09:17:53 | 135,518,107 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 145 | py | netflowTemplate.py | netflow_msg="""version=5,count=$flow_count,dstIp=$dest_ip,srcIp=$src_ip,option=srcPort,srcPort=9890,dstPort=80,nextHop=2.22.0.254,protocol=tcp""" |
cd3a1092ff8da4cd4202e5fcba5c957a8345a434 | 0f5b874ec64da180bfa584206a8ba5f519935f61 | /trove_query_parser/parser.py | 7031fc87a28abe21454007bcfe0a7f7a7ee2b7a2 | [
"MIT"
] | permissive | wragge/trove_query_parser | fb1c8d95935349b9c982703beee71d1e43fb8202 | 27f6c53edb331efdba8b7c4a43663710e216cee0 | refs/heads/master | 2023-04-12T23:29:50.594010 | 2021-10-05T00:36:09 | 2021-10-05T00:36:09 | 376,206,779 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,499 | py | parser.py | # AUTOGENERATED! DO NOT EDIT! File to edit: 00_parser.ipynb (unless otherwise specified).
__all__ = ['format_date', 'parse_query']
# Cell
from urllib.parse import urlparse, parse_qsl, parse_qs
import requests
import arrow
def format_date(date, start=False):
'''
The web interface uses YYYY-MM-DD dates, but t... |
1698d25bad0e6231cb7dfb73c6ff47727b1b21de | 70c4a1eb9431bb599db488d611d784ab0b02a609 | /helpers/proposal_service.py | 75c7f49395e40bdc053a71b3f9f22f69c81ac884 | [] | no_license | kdds22/marketplace_exemple | c0826aa8c1d1252f66e8c141aa3c9380a2b7f31e | 7fe19c3cfde7149b11cf10c5143b3253ec1c9136 | refs/heads/main | 2023-03-07T07:23:29.568572 | 2021-02-18T02:39:03 | 2021-02-18T02:39:03 | 338,462,468 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,889 | py | proposal_service.py | from datetime import datetime, date, timedelta
import requests
import json
import logging
from proposals.models import ProposalModel
from .client_service import ClientService
from .offer_service import OfferService
from proposals.serializers import ProposalSerializer
from django.db.models import Count
class Propos... |
6ca40d487aa7ccc76fc77efbb042830a3e7191cf | 3981f4e282fee760a86874ac6c3896be30585534 | /model code/test_file_new.py | 5e9181536dee703862304284af0f859302e37e03 | [] | no_license | RimiChen/Panel-Transitions-for-Genre-Analysis-in-Visual-Narratives | d972d6f6df2aed8d3c325867726bfa13e642aec4 | 38b1e891c88b5de60015924fd2010c6ab87cabc6 | refs/heads/main | 2023-04-11T07:07:04.363345 | 2021-04-18T00:51:15 | 2021-04-18T00:51:15 | 359,012,711 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,410 | py | test_file_new.py | # %%
#Loading up all libraries
import gc
import numpy as np
import tensorflow as tf
from keras.preprocessing.image import ImageDataGenerator, img_to_array, load_img
from keras.models import Sequential, Model
from keras.layers import Dropout, Flatten, Dense, Input, Lambda
from keras.layers.merge import Concatenate, ... |
c3ea3301c76a02fbc614047f0340e5c8e30f9358 | efc296e10b66eb7d6df700d4db972db9236cfc93 | /app.py | 10fa10ddf655b28fb87b505682399b5fa630639e | [] | no_license | AlonzoMorales/Python_SQLAlchemy | 1ebcabc3e5fb0242442b45beab16dcf4c526ffda | 302227f69466946b5c59446378949064a150d66d | refs/heads/master | 2020-08-14T06:52:04.993780 | 2019-12-05T05:10:22 | 2019-12-05T05:10:22 | 215,116,986 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,974 | py | app.py | import numpy as np
import sqlalchemy
from sqlalchemy.ext.automap import automap_base
from sqlalchemy.orm import Session
from sqlalchemy import create_engine, func, inspect
from flask import Flask, jsonify
import datetime as dt
# Database Setup
engine = create_engine("sqlite:///hawaii.sqlite", connect_args={'check_s... |
9f04b231d921eccee201a2175bf178ae943bc871 | ab3795d962804e801ac7b6898f5b1df7825f1a5e | /server/user_app/models.py | 55eaddce43a4305549e5e0c0a0eae8d0b3fffb55 | [] | no_license | wgoode3/fithub | de669b32c3021b3028052ea7a4e822fd80aa30de | 1dc7a304b52599dc586576b01d1128cff1bd7f4b | refs/heads/master | 2023-02-06T10:07:29.368698 | 2020-12-28T11:22:37 | 2020-12-28T11:22:37 | 324,980,946 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 697 | py | models.py | from django.db import models
from django.contrib.auth.models import User
User._meta.get_field('email')._unique = True
User._meta.get_field('email').blank = False
User._meta.get_field('email').null = False
class Profile(models.Model):
GENDERS = (
("MALE", "Male"),
("FEMALE", "Female"),
("OT... |
9118046a7d3a8a26c3b7e5b4829a0e6c95c9b92a | b6f4e585f806b9794446472c2023d96d825f291d | /V1 - Legacy/messageInterpreter.py | 7759a9a91869f80d9918a4819f755b9d28542c8f | [] | no_license | Frame1910/microbit-morse | fb41104cdc1be85f8ff9079eb6bea1cfe0d25fa6 | 3cbb4d5a0aabe760160000ca2e07aa2850b77e07 | refs/heads/master | 2020-03-25T09:25:14.107876 | 2018-09-03T02:43:34 | 2018-09-03T02:43:34 | 143,669,196 | 2 | 0 | null | 2018-08-10T01:59:45 | 2018-08-06T03:00:04 | Python | UTF-8 | Python | false | false | 2,526 | py | messageInterpreter.py | #Morse to English dictionary
morseToEnglish = {
".-": "a",
"-...": "b",
"-.-.": "c",
"-..": "d",
".": "e",
"..-.": "f",
"--.": "g",
"....": "h",
"..": "i",
".---": "j",
"-.-": "k",
".-..": "l",
"--": "m",
"-.": "n",
"---": "o",
".--.": "p",
"--.-": "q"... |
9b07cd2b4b7d7b00b70c10722830a9e6001efdec | d9e40ad9d6abae41bc35c3d70f3644dbe81788c2 | /D_practice/MiddlewareProject1_v100/m_app/views.py | bd57c18571b9a8198daf357fddd61ebb1f6a345f | [] | no_license | Sourabhlandge/Django-Practice | 7fe5ba69cb0846cdf7c6cdb16e0a9e10e781643d | 1b5df61945c23eab17c57ea3793ffa64f0396485 | refs/heads/main | 2023-06-29T16:47:39.222661 | 2021-07-27T10:10:34 | 2021-07-27T10:10:34 | 345,034,311 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 218 | py | views.py | from django.shortcuts import render,HttpResponse
# Create your views here.
def showIndex(request):
print('This line printed by views function')
print(10/0)
return HttpResponse("<h1>Custom Middleware</h1>") |
55dc2929e49c660b0962b06f8d034ee88154e55e | 212a92f46053f9e2fdf06165bb4bed8898aa2382 | /configCifar.py | 27bd32983f481df31ed2f931412d775853338d44 | [] | no_license | longhathuc/CharacterRecognition | 980cedfd9d633abbb9a9322a3ec1e9b0c8185bcb | 6688bdcdb720787baf3b2c2296f0b0b4f2f1ffd0 | refs/heads/master | 2021-01-20T03:17:17.092380 | 2017-04-26T19:37:27 | 2017-04-26T19:37:27 | 89,512,637 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 177 | py | configCifar.py | {
'verbose': True,
'from_pickle': False,
'pickle_data': '',
'folder': '/Users/alexandre/Projects/CharacterRecognition/CIFAR/train',
'img_size': (20, 20),
}
|
81fa96b5f74f84cf33fb16fa8eb87524b8a5314d | 71c2e57a3949ee3cbc3b96ab71e5a49695dd833d | /GettingStartedWithImages.py | 02b9ad992e067ec635747fb4ae22ae5957bf7ce2 | [] | no_license | noitazi/Tutorials | 7108752a3a0c0281e0270058b7cd57044bdd7f3f | d1fab5398fa93ab9613bb5e2b1db94b210e495b8 | refs/heads/master | 2020-05-21T08:51:33.242367 | 2016-10-10T15:50:09 | 2016-10-10T15:50:09 | 70,036,679 | 0 | 1 | null | 2016-10-06T04:41:41 | 2016-10-05T06:53:19 | Python | UTF-8 | Python | false | false | 447 | py | GettingStartedWithImages.py | import numpy as np
import cv2
img = cv2.imread("messi.jpeg",0) #画像の読み込み
cv2.imshow('image',img) #画像をWindowで出す。画像の大きさに併せて自動でだす。
cv2.waitKey(0) & 0xFF #keyboard binding function
if k == 27:
cv2.destroyAllWindows() #Windowをすべて消す。どれがでよければdestroyWindow()
elif k == ord('s'):
cv2.imwrite('messigray.png', img) #Save a... |
700d30510dc0ce51a3c7ed2e4e50823a35c9f1a5 | 4952413903d525207bc50b4229c4a488cd5f2ea4 | /patterns.py | 8f17d0ce8504e53e95e8af458504dfbfe75da5f4 | [] | no_license | cicarter/trading | 42b9e7f7a3530014a3ab5357d4817701a5aa5d88 | 3ca910f247deef1a024e8b4c6262969288832f84 | refs/heads/master | 2020-06-04T17:13:29.838484 | 2019-06-15T21:22:47 | 2019-06-15T21:22:47 | 192,120,408 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 574 | py | patterns.py | class Pattern:
__points = []
__runner_points = []
def __init__(self, points):
self.__points = points
@staticmethod
def id_run_direction():
print('Finish')
# Look for change in direction for significant points
def id_horizontal_resistance(self, buffer=.05):
for... |
4561e5016fea3c34a55add9375544b4b663a8f54 | 416783cb7722c851c78f4ad91b95607408922f2c | /Tareas de Progra/Tarea6 José González.py | b193ee37f3bf960e9b4bb1a166421bd3d23384d9 | [] | no_license | VoidRayXX/Progra-USM | bc8a26c0355273c0cc6b197c576e10b873e8925d | 04c45369336f8119ed154ba716751632e630bf6f | refs/heads/master | 2022-12-03T21:26:50.765218 | 2020-08-15T05:23:49 | 2020-08-15T05:23:49 | 287,679,989 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,382 | py | Tarea6 José González.py | '''
Incluya sus funciones a continuación
'''
def horas_ingresos(ingresos,nombre,fecha):
i = 0
a = 0
hora1 = ''
hora2 = ''
msj = ''
Flag1 = True
Flag2 = True
texto1 = ''
#i,aux,c y a son contadores
if nombre in ingresos and fecha in ingresos:
while i < len(ingresos):
... |
225ddd65740e9e083a7b03cf681955fa80dc1857 | 69713c090084d2f0df7f26e7b9ac87be47b48c2c | /Code Accdemy/Ranges.py | 85cd1348b91769f564ffc03162ff3fb4bfc123b9 | [
"Unlicense"
] | permissive | JackVoice/Testing | 7cf389fd0964a1fe5e1a3687422cbdce34de2ce7 | 11e1b83c7b2e51fa0a8cdde67c5c1eab650e018a | refs/heads/master | 2020-03-31T07:50:08.801880 | 2018-10-14T15:49:59 | 2018-10-14T15:49:59 | 152,035,752 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 86 | py | Ranges.py | list1 = range(9)
range1 = range(8)
nlist1 = range(5, 15, 3)
nlist2 = range(0, 40, 5)
|
c2ade7b81305fbcd7eab3b2d92e6cd72453d50e2 | f38b4c636a4a652460f220bf830a4ff29708c5cb | /cooltools/lib/_query.py | 4884639e2987c883e949dc79e61fb548e070333f | [
"MIT"
] | permissive | open2c/cooltools | fccacedf483c5ea49cd1f8c0888be568f96a0a7e | 0a0d8417099f182e1e24b3897fdf41de6b08844a | refs/heads/master | 2023-08-27T23:54:24.278300 | 2023-07-14T15:57:40 | 2023-07-14T15:57:40 | 82,413,481 | 73 | 24 | MIT | 2023-08-30T19:21:09 | 2017-02-18T20:18:00 | Jupyter Notebook | UTF-8 | Python | false | false | 5,854 | py | _query.py | from collections import defaultdict
import numpy as np
import pandas as pd
# from scipy.sparse import coo_matrix
from cooler.core import _IndexingMixin
def arg_prune_partition(seq, step):
"""
Take a monotonic sequence of integers and downsample it such that they
are at least ``step`` apart (roughly), pre... |
2b89574e6434cc0a14112bfa720740af1ad6f68c | cabe74741dba87e812d72abb0474837402de5bf9 | /servo_server.py | afef0ab4889868e47d3cb37d87f0656629e91e9a | [] | no_license | CRLS-MATE/underwater-robotics | 0254c101b186ca3c53e8c642b6540b887c69191a | e1d30663837b7a49bff1927a31cb6872173af037 | refs/heads/master | 2020-05-06T15:36:12.894783 | 2019-12-19T22:12:22 | 2019-12-19T22:12:22 | 180,198,795 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,584 | py | servo_server.py | #!/usr/bin/python3
# import only required components of flask library
from flask import Flask, jsonify, request, render_template
import serial
ser = serial.Serial('/dev/ttyACM0', write_timeout=.1) # open serial port
print(ser.name) # check which port was really used
# create a flask object
app = Flask(__nam... |
1a294db27580d1db968b7474dddc164bd701e6a5 | f2d77decc6a9caea8db2044a9d5fdc6c462419c0 | /thesis berry.py | 3484607b6d6fc95940de18d38c9afb19eb7dac02 | [] | no_license | alasseia100/Thesis-Berry-Surprise | be495d4a4ce65b36a87ff304a6ec3151cfadde4d | 60ddd73673d817a5377602a107143be5485c1003 | refs/heads/main | 2023-05-14T21:56:58.822432 | 2021-06-12T15:15:42 | 2021-06-12T15:15:42 | 376,319,897 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 236,127 | py | thesis berry.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This experiment was created using PsychoPy3 Experiment Builder (v2020.1.3),
on February 26, 2021, at 11:42
If you publish work using this script the most relevant publication is:
Peirce J, Gray JR, Simpson S, MacAskill M, Höchenberger R, Sogo H, Kastman... |
175f5a976686e39b8e6b0a26dc4b280edf8096eb | a0c9cf812d5276779804dc5b6edbf94071703321 | /cmdline_provenance/cmdline_provenance.py | 5ec7cdac2d2f87a66611176a26f08d82ae6fce1e | [
"MIT"
] | permissive | DamienIrving/cmdline_provenance | 063ad2acd5745e49f169736a9f2ee05dc88333b2 | 7df05856772b39bc9ba44f4118978fb69f15ee6d | refs/heads/master | 2021-06-06T14:37:07.012117 | 2021-04-16T05:02:19 | 2021-04-16T05:02:19 | 138,523,465 | 2 | 2 | MIT | 2020-02-11T09:35:07 | 2018-06-24T23:46:20 | Python | UTF-8 | Python | false | false | 2,855 | py | cmdline_provenance.py | import os
import sys
import datetime
import subprocess
import ipynbname
def isnotebook():
try:
ipynbname.name()
return True
except FileNotFoundError:
return False
def get_current_entry(code_url=None):
"""Create a record of the current command line entry.
Kwargs:
c... |
763ec52991530c0a843e956fdddebe224108592c | 409ca9cd8785510a5efd7f9c238bbf24e5ac39ab | /13_sorting/13.6_insert_interval.py | 327fe6283b9281086baa4666d93fd8a8f4c55c29 | [] | no_license | NoahTN/epi-workbook | f22bd335e0b908a295c5bc9aac1166de7153b8fe | 53b72de61704003d744fbc9a0c70594364ad5fcc | refs/heads/main | 2023-06-26T05:46:05.041699 | 2021-07-22T19:45:56 | 2021-07-22T19:45:56 | 343,575,008 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 531 | py | 13.6_insert_interval.py | # https://leetcode.com/problems/insert-interval
# O(n), O(1)
class Solution:
def insert(self, intervals: List[List[int]], newInterval: List[int]) -> List[List[int]]:
first, second = newInterval
left, right = [], []
for i in intervals:
if i[1] < first:
left.append(i)
... |
0bbc60c3f91b08f9852a22603ac4b4c7f9efe7ea | 4578be5ff20640cd0940faa27901489daa471ffe | /S08 - Padrões de projeto/composite/tocador_de_disco.py | 91927b7fe264608199bd45b3b3344aa3e2718a2e | [] | no_license | CAECOMP/provas | cd31c48a912ad5e73f5bf8b826db40cf895f46b1 | 3f5eb4ec63fc91ad2c2e4ae6e5b3ac87c09ca916 | refs/heads/master | 2023-07-07T11:53:38.798374 | 2023-04-27T03:13:57 | 2023-04-27T03:13:57 | 55,001,094 | 125 | 83 | null | 2023-07-04T21:21:05 | 2016-03-29T18:38:41 | HTML | UTF-8 | Python | false | false | 302 | py | tocador_de_disco.py | from componente_cancao import ComponenteCancao
class TocadorDeDiscos:
def __init__(self, lista_de_cancoes: ComponenteCancao):
self._lista_de_cancoes: ComponenteCancao = lista_de_cancoes
def obter_lista_de_cancoes(self):
self._lista_de_cancoes.mostrar_informacoes_da_cancao()
|
c4664c035ea139a1ea00c2b749f96258a9f85833 | cc8bba21aeac094dc3b2a648291911c50d7722e7 | /server/lib/python/cartodb_services/cartodb_services/metrics/config.py | 6ad260f93e4e956c777791671be5c74792cd64ba | [
"BSD-3-Clause"
] | permissive | johan--/dataservices-api | 9ba49af124f61ab9db406c2d526f5bb5b57adcee | 928d1111f3e37176f64458caebcb5c1a575bcf44 | refs/heads/development | 2023-05-25T02:04:18.165544 | 2017-07-20T10:01:58 | 2017-07-20T10:01:58 | 97,952,649 | 0 | 0 | BSD-3-Clause | 2023-05-23T07:19:57 | 2017-07-21T13:53:52 | PLpgSQL | UTF-8 | Python | false | false | 26,443 | py | config.py | import json
import abc
from dateutil.parser import parse as date_parse
class ConfigException(Exception):
pass
class ServiceConfig(object):
__metaclass__ = abc.ABCMeta
def __init__(self, redis_connection, db_conn, username, orgname=None):
self._redis_connection = redis_connection
self._u... |
d18bd3d3448957798d37d8d64770cda96d09e03d | 98562e958d9354b54163efc88bf98c6e5d89da30 | /heat/tests/test_instance.py | 7e12eff37caf90eeafc1d39045f8509dad59e400 | [
"Apache-2.0"
] | permissive | cha63506/heat | eb2f3e40a6889ed9d40c89d4c3c2e291964efbc9 | cbef4bef028df3d5868e98ae2c55e9dd88149ef0 | refs/heads/master | 2018-01-15T05:03:27.579281 | 2012-11-22T10:06:57 | 2012-11-22T13:16:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,408 | py | test_instance.py | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# 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... |
8a6183cf6692de025f3c1f4357ac786af514614c | 3ef7e725d360349d2c9e8f07c57cc686201e4f57 | /shanxidailyscrew/main.py | 247fd6c90eea2d81f0bfeecb63916b8e14739371 | [] | no_license | xiaoxie760125/dialyweb | 371890c053856da543359931416daea1224bee4f | 07ab2125df09b05f10271311e18f9f2c9caa518a | refs/heads/master | 2021-03-27T11:49:42.113577 | 2017-07-05T07:19:32 | 2017-07-05T07:19:32 | 96,290,259 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 257 | py | main.py | from scrapy.cmdline import execute
import sys
import os
import time
ppath=os.path.dirname(os.path.abspath(__file__))
print(ppath)
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
#execute(['cd',ppath])
execute(['scrapy','crawl','xzquhua'])
|
116fa236c56185b726dcc8c6f0d0fec31be87b72 | 5bd8754de7d1265b600abd914a5cc543b55924c4 | /src/cargo_mapping.py | c436c4be29121639d7843ab6a83f757028cc0921 | [] | no_license | AVI18794/TASK_CODE_TRIAL_NEW_ALGO | 656c0dee37c6de47aef86530b41f86b021819e24 | bb3a04a1135d5ec4ff7c31fe61ee9c4009c1a671 | refs/heads/master | 2021-01-26T11:55:20.457258 | 2020-02-27T04:56:37 | 2020-02-27T04:56:37 | 243,428,381 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,332 | py | cargo_mapping.py | # import all the required libraries
# Class to map the cargo and the truck
import json
from copy import deepcopy
class CargoMapping:
def __init__(self, cargos, trucks, truck_returns_to_home=False):
self.cargos = deepcopy(cargos)
self.trucks = deepcopy(trucks)
self.truck_returns = truck_re... |
4b37b74560bdc64610c834977e8180a0e9deb343 | 5d4cb679673d7e0336eaa2529930ed050f553df6 | /vyConfigFileBlock.py | 90b74a0cbdcbc55a613134d4e5217f350e0099f8 | [
"MIT"
] | permissive | niteshb/common.python.vyConfigFileParser | 253b63b209608374c7878c4b3f039f06d501c42a | 7b9a85c01a83ec58668e38cdd5e0fa84fa5cd52d | refs/heads/master | 2022-12-29T17:07:55.949601 | 2020-10-12T09:31:47 | 2020-10-12T09:31:47 | 301,943,814 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,699 | py | vyConfigFileBlock.py | import re
from vyTree import VyTreeLevelNode
class VyConfigFileBlock(VyTreeLevelNode):
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.indentLevel = 0
self.attribs = {}
@property
def subBlocks(self):
return self.childNodes
def appendChildBlock(self, child... |
88b8ee2f2f39222a63d6a8832c0375184765470b | 569177e9e94a6c3940d4c7d45a7e59487764f83b | /numeros_primos.py | 074d144cf3c60deec9e32aba4fab7f268d3c67d7 | [] | no_license | Benjarseen/INS121---Programaci-n-1 | 8397c2e7ae7ea4b6ee27fa77e262c97bae123f01 | 62bc9e5bfb3518e184d47dfe58bfe9d2ff11b2ca | refs/heads/master | 2020-03-14T20:53:59.289658 | 2018-05-10T03:20:58 | 2018-05-10T03:20:58 | 131,784,734 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 662 | py | numeros_primos.py | """"n = int(input("Ingrese un numero entero positivo: "))
if n > 0:
for i in range(2, n):
creciente = 2
esPrimo = True
while esPrimo and creciente < i:
if i % creciente==0:
esPrimo= False
... |
418eba036ace03d129a1a5a18eb83e452f0da362 | d77e27952696b9afaa37cba0282e16f558088d8a | /api/urls.py | dd7cc2217220f9743cf250ab8e2ebb508f4494ca | [] | no_license | richardhanksjr/django-heroku-docker-template | 4eb45f97d860284e003d8cc40c8a0c770e306bd4 | 59effb070971c6280eebd492ebf0802072672c08 | refs/heads/master | 2023-07-18T19:45:41.112105 | 2020-06-10T12:02:41 | 2020-06-10T12:02:41 | 270,388,019 | 0 | 0 | null | 2021-09-22T19:18:56 | 2020-06-07T17:58:54 | Python | UTF-8 | Python | false | false | 137 | py | urls.py | from django.urls import path, include
from .views import TestPath
urlpatterns = [
path('', TestPath.as_view(), name='test-path'),
] |
25ba51ed2b8986e73fdc09731d63c0d20a53d0d8 | efe4e07cef91d1c79483446402d5d7ff0dd3b5db | /Python/Functions/Functions.py | d2037c92fa0bdaec3bc161c45e23cc4df3386d14 | [] | no_license | rnikhil/Python | 99b887c97c3ce68a8f999269f243919ccd1854c9 | 7b467adbc1fb0aa277fe10a208c3baae03e0edd4 | refs/heads/master | 2021-01-20T13:33:50.781440 | 2017-05-07T01:30:59 | 2017-05-07T01:30:59 | 90,497,739 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,435 | py | Functions.py | """
Functions:
===========
Function is a group of related statements that perform a specific task.
Functions help break our program into smaller and modular chunks. As our program grows larger and larger,
functions make it more organized and manageable.
Furthermore, it avoids repetition and makes code reusable.
Syntax:... |
6c6631fadf819873beecca905d0df3a981232345 | 47c856a59c308717b5a900328d3de6841594d552 | /algorithm/DecisionTree.py | 163f515abc5260862d8a2b947d502632cb9f97d9 | [] | no_license | ZZZJane/toyplay | 20cbc2ee396dc52b614b7dd6d101398459083239 | c78ab9a67739412797f9311b2ddd70531d2f2684 | refs/heads/master | 2020-08-02T02:42:21.680433 | 2017-07-22T13:51:51 | 2017-07-22T13:51:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,033 | py | DecisionTree.py | # -*- coding: utf-8 -*-
"""
@version: 1.0
@author: clark
@file: DecisionTreeClassifier.py
@time: 2017/3/18 12:57
@change_time:
1.2017/3/18 12:57 Make a simple decision tree
"""
from utils import logger
from collections import deque
from graphviz import Digraph
from collections import defaultdict
from utils import for... |
7cb786c653acfbd706f198b0728f30400920535e | b563c4cf6b981662a9dc41007e3c2ca86c4b7cdf | /stereo_panning/panning.py | eabb957e661ff109d4e74fb2e402caaa4f2879ba | [] | no_license | ryukau/filter_notes | 4dd1784ae2b00eecd4ba7e020d6488f3e4a71fef | 6ec54e82011c98f42e392db3fb5153e2760fefc2 | refs/heads/master | 2023-07-08T04:07:52.565621 | 2023-06-30T08:04:20 | 2023-06-30T08:04:20 | 122,733,600 | 16 | 2 | null | null | null | null | UTF-8 | Python | false | false | 7,949 | py | panning.py | import numpy as np
import matplotlib.pyplot as plt
import soundfile
import functools
from pathlib import Path
def sinwave(samplerate=48000, duration=1, frequency=100, gainDb=-6):
nFrames = int(samplerate * duration)
phase = np.linspace(0, 2 * np.pi * frequency * duration, nFrames)
return np.power(10, gain... |
91838343a2d0a78b6bde8d0345063865e38a1b77 | e9b2ddf467cef18b8a676d86f72cf5596801cfad | /utility.py | 3c06a0689c7fc3b1dd890407924e60d6d5187cc1 | [] | no_license | raelyn9/Automatic-Dashboard-Deployment | 51a9595f6a42368eeee2a25855fef574fd25bddc | af7494198d498c609faea1a0ca0dbf0c852c3aae | refs/heads/master | 2020-07-29T16:15:53.223037 | 2019-09-20T23:39:40 | 2019-09-20T23:39:40 | 209,877,093 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,334 | py | utility.py | import json
import os
import argparse
import datetime
# construct the argument parser and parse the arguments
ap = argparse.ArgumentParser()
ap.add_argument("-c", "--conf", required=True,
help="path to the JSON configuration file")
args = vars(ap.parse_args())
config = args["conf"]
# json
def convertT... |
10a9944b26adcde2230150896a4fb5722d0706c1 | 6b4cc6f51a6b49b61e4e4a992b01273f23849497 | /ei_image_classification.py | 68145b95ab3059f708f4d77fe05b0f410e7dd963 | [] | no_license | resolver101757/portenta_ttn_micropython | a598e2136fe54b28ebfc08df474eb2ebcfb62a83 | b4de111aec769009ceb33f67966d36ac24a155d1 | refs/heads/main | 2023-05-09T21:16:42.875793 | 2021-06-15T19:46:03 | 2021-06-15T19:46:03 | 376,589,153 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,624 | py | ei_image_classification.py | # Edge Impulse - OpenMV Image Classification Example
# libaries to import
import sensor, image, time, os, tf, time
from pyb import LED
from lora import *
# setup lora object for UK frequency
lora = Lora(band=BAND_EU868, poll_ms=60000, debug=False)
print("Firmware:", lora.get_fw_version())
print("Device EUI:", lora.g... |
a24af9fb965282779a01e49b24851f4888ba6ea0 | 7fd38a97a5e4c0aa812ecd6e87932149ef3cccdb | /Diploma/train/losses.py | 9ae1d1c30073073a7409ac82203f556a38074bc0 | [
"MIT"
] | permissive | PVSemk/Emotion-Recognition-in-Video-with-Sound | 9f374335d8dee9d119e79fd375a2d363ed9f89e5 | 6ba5aea38b7fce5fcfcd8e547bf39bbad9b69bcd | refs/heads/main | 2023-08-26T12:43:18.581732 | 2021-10-25T11:56:53 | 2021-10-25T11:56:53 | 334,085,940 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,953 | py | losses.py | import torch
import torch.nn as nn
import numpy as np
import torch.nn.functional as F
class CCCLoss(nn.Module):
def __init__(self, digitize_num, range=(-1, 1)):
super(CCCLoss, self).__init__()
self.digitize_num = digitize_num
self.range = range
if self.digitize_num:
bi... |
31e49e7839ca20a922c96806b72bdc68ef172323 | 817bc7c74944fa5e3f507dabca0ab01c0b7266ff | /cogs/create_category.py | 233c59f67d7ccd92fd964edad0522cc3bcaaa45c | [
"MIT"
] | permissive | Mailstorm-ctrl/Threadstorm | 830925f7cc3874a60da80f9b9cf45456de9a965e | fdad7e76e0f16b7124f962e3298e66641423e8bd | refs/heads/master | 2021-07-10T17:12:59.845792 | 2020-10-17T02:40:51 | 2020-10-17T02:40:51 | 205,486,066 | 10 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,870 | py | create_category.py | import discord
import asyncio
from discord.ext import commands
class TB_Category_Creation(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.command(name='ccategory', aliases=['tcreate'], description='Create a custom category for the server')
@commands.has_permissions(manage_channel... |
ba38c5a22fa641bdc8ffce2e1213071388bdd1c3 | 42504a1fc480fab0e694637c05f952418f40a8fa | /Sales_ext/wizard/sale_order.py | 2b355e29a74cd74d5cd35f42ed69c6870a648e75 | [] | no_license | raumild-ept/Odoo-Pracs | 31390481b0a0ba5f2566988988594888a343e963 | 526df6729b7d70de3f95ac26da709bd630a2283f | refs/heads/master | 2023-03-15T07:38:08.375465 | 2021-03-23T06:10:14 | 2021-03-23T06:10:14 | 339,722,085 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 861 | py | sale_order.py | from odoo import api, fields, models, _
from odoo.exceptions import ValidationError
class Sales(models.TransientModel):
_name = 'sale.order.team.ept'
current_sales_team_id = fields.Many2one(comodel_name='crm.team')
current_sales_person_id = fields.Many2one(comodel_name='res.users')
sales_team_id = fi... |
3772b772223897c93bd38b71ecafed0cccf2692a | 388423cbbb776536b2e49815cc7fe12f2a95f3ab | /Honours Classification.py | c4bef5fdd9eb83c0653f6161b2b0601093346d29 | [] | no_license | morsh3d/python-portfolio | ec6e09025a5bb6ee362bae251d9b0ff6c6fec25e | 2e4954fc2477e46f90d7a9e23081d6b7f87cc1a5 | refs/heads/master | 2023-08-04T20:47:47.228117 | 2021-09-15T17:28:43 | 2021-09-15T17:28:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,552 | py | Honours Classification.py | def honours_classification(mark):
"""This function returns the honours classification
of the weighted average mark entered"""
if(mark>=70):
honours="First Class."
elif(mark>=60):
honours="Upper Second."
elif(mark>=50):
honours="Lower Second."
elif(mark>=40):
honou... |
a4d40d8aae43c8cbe491174b5b2223b5dfb09b0f | d2e822f47779dff3cec81e1c9e71f381a6ceb0f0 | /COURS/python/TP2/TP2 Ex1.py | 4604bbc211b9dd23a40765d6b1ae16e708332da7 | [] | no_license | BrandidiCH4O4/Code-des-cours | fe019ba211785ade42d54fc1238d4944bb178373 | ac9eb6bf9042f2ceaca5e8e5a6de49848395bffb | refs/heads/main | 2023-01-21T02:03:51.412532 | 2020-12-02T13:41:19 | 2020-12-02T13:41:19 | 309,106,429 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 280 | py | TP2 Ex1.py | "EX1"
a=float(input('Quel valeur de AB voulez-vous ? '))
b=float(input('Quel valeur de AC voulez-vous ? '))
c=float(input('Quel valeur de BC voulez-vous ? '))
if a<b+c and b<a+c and c<a+b:
print("Ceci est un triangle.")
else:
print("Ceci n'est pas un triangle")
|
2b8158ba0d6245f830bffba4734709fd4661b429 | 4c3ee33f6eb66fa14297d4fc400861434ca09aa5 | /kenlist/migrations/0002_auto_20210503_1436.py | 12d5d8ae0e8731fcc6ce2ecb0174ba56bac7c5b2 | [] | no_license | kennethdenaga/communityps | 0695db5ebd35ad01fff5e722569fd53ca72bd095 | c58bc25d4ea1dfdd86c77d3e0d3d2667e2b8c81f | refs/heads/main | 2023-06-11T08:42:16.619210 | 2021-06-26T03:15:36 | 2021-06-26T03:15:36 | 373,711,100 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 354 | py | 0002_auto_20210503_1436.py | # Generated by Django 3.1.6 on 2021-05-03 14:36
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('kenlist', '0001_initial'),
]
operations = [
migrations.RenameField(
model_name='item',
old_name='profname',
new_... |
3cb52a2741faf3af0e551ab907476511efbaf630 | 8466f8a7fd7eda76ef140e47b91add780eff6e8d | /score_image.py | b6386815e280b0f1ff46a955dfa1b58281a4bd6f | [] | no_license | andrewkam/aesthetics-match | 37f083a4ab4368e3544856396eb909d89fd1d954 | e97343e2968a8006378486b5259c097153ce172c | refs/heads/master | 2020-03-13T15:15:54.582040 | 2018-05-03T23:13:10 | 2018-05-03T23:13:10 | 131,173,766 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 6,101 | py | score_image.py | # Script to populate DB with object detection and color scores
# Object detection uses TensorFlow and is based off image recognition demo (https://github.com/tensorflow/tensorflow/tree/master/tensorflow/examples/label_image)
# Colorfulness detection uses OpenCV and is based off tutorial by Adrian Rosebrock (https://www... |
2f683d5175387707ffce9bfb2d4532db4d1ef222 | fe3e2cebbaa065864d20efa2b5739a59cadb2222 | /setup.py | 7553d290668d73655ce90df49a87c62eee4290e2 | [
"MIT"
] | permissive | Ribeiro-R/fast_vector | 641e6489f9e83c5709b3d26943106335bb933290 | 753ddc8dab786f1b8244fb73dd2828f17635c201 | refs/heads/master | 2023-09-04T11:49:38.233978 | 2021-10-26T12:36:48 | 2021-10-26T12:36:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,320 | py | setup.py | """ Main function to Installing/publishing Python Package"""
# python setup.py develop # Develop
# python setup.py install # "Final" package version
from setuptools import setup
CLASSIFIERS = """\
License :: OSI Approved
Programming Language :: Python :: 3.7 :: 3.8 :: 3.9
Topic :: Software Development
Operating Syste... |
b86314f8eceaec1aef8010ad97cb36097d19fd9c | 392d38907f2ff2af35b5d918f3ffa220f9310edd | /oracle.py | 08a9f4cca9ce3a8b962ab744241de23130eb0fb5 | [
"MIT"
] | permissive | vrngupta53/clustering-with-queries | db75bb7545ad0809e18deb2b57cc69bb21bf69c2 | 4ee2184db0b2d0035de00d8e1f0e36829d74d3e0 | refs/heads/main | 2023-03-04T23:46:47.594936 | 2021-02-15T11:39:50 | 2021-02-15T11:45:32 | 326,378,254 | 1 | 0 | MIT | 2021-02-15T11:45:33 | 2021-01-03T10:15:49 | Python | UTF-8 | Python | false | false | 1,876 | py | oracle.py | import os, random
import numpy as np
class Oracle:
def __init__(self, filename=None):
self.filename = None
self.X = None
self.y = None
self.n_samples = None
self.n_features = None
self.n_clusters = None
self.gamma = None
self.cost = None
self... |
9e1ac3194e2797f5be3d07dcf9b2d72b77606c49 | 4cd325a310c575de0427c43482bb0ad7e2cb5289 | /src/__main__.py | ce5925a93e1e6ed39db73df794c54643f7465420 | [
"MIT"
] | permissive | Haxk20/eco | 14ac828cc2a673c851b217b06b5841dcf68cc149 | 24bdb22fb8be4453809a8bf3f8e711f98d21f9ca | refs/heads/master | 2020-03-31T03:39:41.316523 | 2018-10-05T10:40:25 | 2018-10-05T10:40:25 | 151,872,973 | 0 | 0 | MIT | 2018-10-06T19:08:42 | 2018-10-06T19:08:41 | null | UTF-8 | Python | false | false | 1,261 | py | __main__.py | import sys
from random import randint
from time import sleep
def file_len(fname):
with open(fname) as f:
return sum(1 for line in f)
print("ECO c/cpp compiler")
print("Version 1.0")
if len(sys.argv) <= 1:
print("Compiled Nothing Successfully.")
print("Please pass in a file path to ensure failure.... |
ed80f5f898548ca012779543051ccff5b34e4fcc | eca7d0effebe40a231103f8d2ef550b222b4db7d | /MyApi/views.py | fd0811875a41829c1a4e65851781f334205398a3 | [] | no_license | namantam1/covid19-api | a7d8fa28a21160a06c652c604544ecf5821c1ef7 | 58c2d221a190794eb8f83aa821addf224692dba5 | refs/heads/master | 2023-08-01T17:12:33.376166 | 2021-07-31T09:39:00 | 2021-07-31T09:39:00 | 275,179,043 | 1 | 0 | null | 2021-09-22T19:19:40 | 2020-06-26T14:45:57 | Python | UTF-8 | Python | false | false | 1,783 | py | views.py | from django.shortcuts import render
import requests
from bs4 import BeautifulSoup
import json
from rest_framework.response import Response
from rest_framework.decorators import api_view,authentication_classes,permission_classes
from rest_framework import status
from django.contrib.staticfiles.storage import staticfiles... |
53fae0103168f4074ba0645c33e4640fcefdfc96 | 4c2c2640a927f4ad456737eda48311c9947c6150 | /Book/数据爬取/soho.py | 9ec0566f742a0fe909e5ab56eaffcad554ecda3c | [
"MIT"
] | permissive | NJHu/Python | a704ead6e1a3335db28a1c7c5096565ece9f12c6 | 5e299a192ddb6435af48ce70193326a9e2bb8dc7 | refs/heads/master | 2020-10-01T17:26:52.044218 | 2020-03-25T14:29:32 | 2020-03-25T14:29:32 | 227,586,773 | 6 | 2 | null | null | null | null | UTF-8 | Python | false | false | 4,181 | py | soho.py | from urllib.error import URLError
from urllib.request import urlopen
from bs4 import BeautifulSoup
import re
import pymysql
import ssl
from pymysql import Error
def decode_page(page_bytes, charsets=('utf-8',)):
"""通过指定的字符集对页面进行解码(不是每个网站都将字符集设置为utf-8)"""
page_html = None
for charset in charsets:
try... |
45fcafdd30f890ddf5eaa090152fde2e2da4dbef | fd4d0772bbd1fde43e8e82914a7691ade869a586 | /day19/tupleex.py | 938a5e4eea6a00ee8043377460954f9dff6649f0 | [] | no_license | alsdn82/pyworks | 00f7e4dff0bf8b90bae6f9c27abe2d9615e91692 | 773200e774b2206bf936175258343e5b2a24ae5c | refs/heads/master | 2023-09-04T23:26:22.891513 | 2021-10-22T03:57:37 | 2021-10-22T03:57:37 | 402,286,627 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 349 | py | tupleex.py | # 튜플(tuple) - 리스트와 구조가 비슷함
#변경, 삭제 할 수 없다.
t = ('코스모스', '민들레', '국화')
print(t)
print(t[:2])
print(t[1:])
#del t[0] - 삭제 안됨
#t[2] ="매화" - 수정 안됨
t2 = (1, 2, 3)
t3 = (4,) # 1개 추가하기 (쉼표를 붙임)
print(t2)
print(t3)
print(t2 + t3) # 요소 더하기
|
73e7e43e9cfb3c0884480809bc03ade687d641d6 | e4a424107374b13719f1c5598c3b1c513e7202c7 | /vis_odom.py | 75b6d898b68bd8e300497d812c051d78ae0317a8 | [] | no_license | Voilier-bsc/mono_vis_odom_python | 9639f24eec19d3c533a40b465d28d3b97463e6c8 | c455aac23bce5c364f9d0f0a7b1925b573a5764f | refs/heads/main | 2023-07-14T10:41:39.771761 | 2021-08-28T06:11:36 | 2021-08-28T06:11:36 | 388,704,489 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,081 | py | vis_odom.py | from os import wait
import cv2
import numpy as np
import math
import sys
import types
import operator
## orb 및 bf matcher 선언
orb = cv2.cv2.ORB_create(
nfeatures=5000,
scaleFactor=1.2,
nlevels=8,
edgeThreshold=31,
... |
d9538c030c0225c4255100da70d6bf23f550a64f | 24ce687bff17d8d2a67c38644744154d76caea02 | /sale_promotions/models/sale.py | f2bd5020748a43e23b0506c8c15060751cc377e9 | [] | no_license | GoContractPro/Odoo-GCP | c2eb980b9b1c9e61aca431221086a43749ba7eae | 73c8a29a182460e6a8f7a97bbc15f1847dbdd63e | refs/heads/master | 2021-01-22T08:49:15.991546 | 2015-07-27T14:44:09 | 2015-07-27T14:44:09 | 54,059,277 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,223 | py | sale.py | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2011 NovaPoint Group LLC (<http://www.novapointgroup.com>)
# Copyright (C) 2004-2010 OpenERP SA (<http://www.openerp.com>)
#
# This program is f... |
eb558644283d992af2c324d457dbe674b714235f | b2b4b41c47c8d4ff4c77d6252729b12b6df270ef | /db/knowdb/views.py | 1edb4a554a963d01c4dec38ac5a0bfebfbaa8636 | [] | no_license | yuanshuai0325/knowledge | fae8cf2760ee7244be51cbd9b0585ef82b3cd25e | 5c40f1fb89c0d3850f966026919780c6634ac7a3 | refs/heads/master | 2020-04-29T06:27:16.485710 | 2019-03-16T13:59:16 | 2019-03-16T13:59:16 | 175,916,537 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 843 | py | views.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.shortcuts import render
from django.http import JsonResponse
from knowdb.models import Knowledge
import random
# Create your views here.
def answer(request):
ret = {}
data = Knowledge.objects.all()
num = random.choice(range(1,int... |
40b6d62f1e360c0df19b7e98fcb67dbd578e709f | dfe5a9977ff0df80e7f30d70416379d0493ee98b | /Accounting_Statistics/sbin/read-csv-dict.py | 1a568fa993bd9dab025cdefbbf8ccfa9c527e9a1 | [] | no_license | knjosk/afi_uge | 7b8ec928dac7b96943c7d58630249ab3ae8800e0 | e11c9da0e4bcc0b7fe90f7b353e7743938171f81 | refs/heads/master | 2020-03-21T14:35:26.825598 | 2019-05-10T23:47:57 | 2019-05-10T23:47:57 | 138,664,684 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 699 | py | read-csv-dict.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
import csv
from collections import defaultdict
from docopt import docopt
__doc__ = """{f}
Usage:
{f} <used_file>
{f} -h | --help
Options:
-h --help Show this screen and exit.
""".format(f=__file__)
args = docopt(__doc__)
used_file = args['<used_file>']
... |
4e8a5b0ba13921fb88d5d6371d50e7120ab01265 | bbb489ed1b65d430d8e89fdcb84a91e0cd8b99f2 | /tests/test.metricsManager.py | 2edb7ca406a900d305ea11be0864fda670950661 | [
"MIT"
] | permissive | bongiovimatthew/jigsaw-rl | b98e8d32f35dbfe6ef332affba6bd7cc68c320db | e9589a78b62a7645fe9bc054f0411230eb249acf | refs/heads/master | 2021-06-04T05:58:13.596808 | 2018-09-17T18:15:48 | 2018-09-17T18:15:48 | 141,598,729 | 1 | 1 | MIT | 2018-09-17T18:15:49 | 2018-07-19T15:30:23 | Python | UTF-8 | Python | false | false | 217 | py | test.metricsManager.py | from metricsManager import MetricsManager
def TestDrawGraphs():
manager = MetricsManager()
manager.displayMetricsGraph()
return
def main():
TestDrawGraphs()
if __name__ == "__main__":
main()
|
f1f708f00e05941c9a18a24b9a7556558583c3c7 | 717d54031a33e302043417e12a8b22388ff8328d | /src/config.py | 3c859b6b07722765392757839fbf6d5c9987bb0d | [] | no_license | JackCordery-zz/Titanic | 5a9b277752f80fa6242f1c36d27435418ace1bba | 7af5cfb3f176a03d0be5e645f63f4f59f00dd3f6 | refs/heads/master | 2021-09-20T08:18:15.542880 | 2018-07-25T08:59:12 | 2018-07-25T08:59:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 247 | py | config.py | TRAIN_INPUT_PATH = "~/Projects/competitions/titanic/data/train.csv"
TEST_INPUT_PATH = "~/Projects/competitions/titanic/data/test.csv"
OUTPUT_PATH = "output/"
TRAIN_VAL_SPLIT = 0.75
RANDOM_SEED = 42
MODEL = "LOGISTIC_REGRESSION"
LOG_PATH = "logs/"
|
911631e96d21bdf22a219007f1bdc04a5e6965dc | 506d4dbe71a919f4d53e11b1205ef03322267e19 | /proxyPool/crawl.py | 7a83944d37803620d5204ef388dc4c89f0bfef27 | [] | no_license | guoyu07/ipProxyPool | 13c2bb32385b3eed07f6232027f3260656644800 | 4f9f9d6339bf9b29d825d10500c8964d01ab4d02 | refs/heads/master | 2021-05-10T16:24:00.228244 | 2017-10-08T12:09:31 | 2017-10-08T12:09:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,139 | py | crawl.py | __author__ = 'Administrator'
# 抓取IP的主要逻辑
from urllib import request
import urllib.parse
import logging
from multiprocessing import pool
from time import sleep
import random
from lxml import etree
def getRandomUserAgnet():
user_agents=[
"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Ge... |
bd4397931e0679b7f91bf85efd9d3b43a63e002b | 8a67378f0d49cc68bb928e3c53f9bd865683248f | /scrapper/models.py | 86a4e020078f17407996257ff73796ad0b188af0 | [
"MIT"
] | permissive | PEI-I1/Cinemas_Webscrapper | 2078c51a0686a0282ab918dacbacf99d9d196d65 | 9adeb44e4af9ae338c8204e076f56ba8fe360daa | refs/heads/master | 2022-12-09T02:52:58.781522 | 2020-02-06T10:55:46 | 2020-02-06T10:55:46 | 215,013,960 | 0 | 1 | MIT | 2022-12-08T03:27:12 | 2019-10-14T10:27:39 | Python | UTF-8 | Python | false | false | 1,609 | py | models.py | from django.db import models
class Cinema(models.Model):
""" Cinema
"""
coordinates = models.CharField(max_length=32, primary_key=True)
alt_name = models.CharField(max_length=64)
name = models.CharField(max_length=64)
city = models.CharField(max_length=32)
class Session(models.Model):
"""... |
452163727363994d82fe4e85e5566c964f7ac464 | 07b7387b31e60a6678b1cec79bf722dbef540ec2 | /scrapyCrawler/scrapyCrawler/settings.py | 3ddc7c1d60deae76f5fd1891e70836c1c6fac5a2 | [] | no_license | hkkenneth/charity-crawl | a1fd68ebc1108f99ba9cb22b7d0fb37e35d2d9ee | 3a879e408e836227c32579d8cedbe74e095f32a2 | refs/heads/master | 2020-05-19T11:38:34.529776 | 2014-11-12T12:47:00 | 2014-11-12T12:47:00 | 26,081,881 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 981 | py | settings.py | # -*- coding: utf-8 -*-
# Scrapy settings for scrapyCrawler project
#
# For simplicity, this file contains only the most important settings by
# default. All the other settings are documented here:
#
# http://doc.scrapy.org/en/latest/topics/settings.html
#
BOT_NAME = 'scrapyCrawler'
SPIDER_MODULES = ['scrapyCraw... |
53e55d177b6c5cd16cb4676d177a9b3f5f1d5ee7 | 5eb52c07e5b1bd00af77306f927f382b684cd6ff | /indy_node/test/nym_txn/test_create_did_without_endorser.py | ceb892b43228b4830f57c96d5d37d302cdb72e3a | [
"Apache-2.0"
] | permissive | hyperledger/indy-node | bce39486988f5114581cff4f6d14fc1b7684143c | e6bb87d4c605aff9914491d062248b6ec857334c | refs/heads/main | 2023-09-03T15:33:08.187153 | 2023-05-08T22:48:21 | 2023-05-08T22:48:21 | 77,021,566 | 691 | 783 | Apache-2.0 | 2023-05-09T15:42:43 | 2016-12-21T05:45:04 | Python | UTF-8 | Python | false | false | 6,529 | py | test_create_did_without_endorser.py | import json
import pytest
from indy.did import create_and_store_my_did
from indy.ledger import build_nym_request
from indy_common.authorize.auth_actions import ADD_PREFIX
from indy_common.authorize.auth_constraints import AuthConstraint, OFF_LEDGER_SIGNATURE, CONSTRAINT_ID
from indy_common.constants import CONSTRAINT... |
d9f36fe615c545869f0bde9aa03bfe7c2417a6ba | bfef5b16697b131d9b8b759193db1fac2a2a4103 | /decorator.py | f4dcd045c39ad668bc4edd6b10c897fe5c7e0e30 | [] | no_license | rajutamanglama63/programmer | b75ee6de5b667f74c43404a092a3aad39fa13df7 | 5546d91b23c4619816620677284e81b3e9ed5f98 | refs/heads/master | 2022-04-13T01:00:51.585843 | 2020-03-19T06:30:37 | 2020-03-19T06:30:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 738 | py | decorator.py | # from functools import wraps
# def test(anyfunction):
# @wraps(anyfunction)
# def inner():
# """hello inner function"""
# return "test"
# return inner
# @test
# def get():
# """hello get function"""
# return "success"
# print(get.__doc__)
# import calculato... |
ed5a7dc58d296735ca8f28d220e60a56929286d0 | 0259706eebc8c7c623580226fd9cd1bceda8759f | /4_Find_S_Algorithm.py | f0eeaca01e0d9a1484122ec21d58ae6f47f061fe | [] | no_license | anshul98ks123/ML-Algorithms | 015b670ea77ca71ef347109456f373aa25bcb8f6 | e20daad2246df215453d40b4bd4d04e5bba5db8d | refs/heads/master | 2022-10-07T11:38:51.514991 | 2020-06-10T14:52:13 | 2020-06-10T14:52:13 | 271,300,284 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,041 | py | 4_Find_S_Algorithm.py | import pandas as pd
def find_hypothesis(data, num_classes):
'''
finds hypothesis using Find-S algorithm
for all decision classes
'''
num_observations = data.shape[0]
num_attributes = data.shape[1] - 1
hypothesis = [[] for _ in range(num_classes)]
for i in range(num_observations):
animal_class... |
e04cd886ec5019d2d8a410a01f67fdab09a5436d | cf55a88a9c5829df1a492072ab14c76043f21959 | /src/analyzers.py | cbaf1f66839d057a90361d637c2a0de38079ad3a | [] | no_license | luciano-s/lalg_compiler | b69a4932c46190a7fffea9c5ed4ba964f5456cd6 | 4af278cc90210910d52305e3132b1f29c67ec5ed | refs/heads/master | 2023-03-13T04:25:45.800583 | 2021-02-26T23:22:55 | 2021-02-26T23:22:55 | 312,711,337 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 52,100 | py | analyzers.py | from src.analyzers_semantic import Analyzers2
from src.token_ import Token_
from src.tokens import Tokens
from src.validator import Validator
def Convert(a, ini):
d = {}
if ini - 1 <= 0:
ini += 1
for i in range(ini - 1, len(a)):
d[i] = a[i]
return d
class Analyzers:
symbol_tabl... |
684ea19eacbc5c9aec68a31cd6a1b8bf4f295d53 | ce596e0c3ead9e0db01ff062c546dd86596cebbb | /sorting_algorithms/merge_sort.py | 4eb43864059e1f6269dccd860aa31a5244239bc3 | [] | no_license | CrunchyPistacho/Algorithms | 7f21ae41e5822bdaf79d26015039c17b5875c1d7 | ab992e377dae2c8d6de4798cd7ae72135c47bed3 | refs/heads/master | 2020-12-04T06:55:04.266866 | 2020-02-25T07:30:18 | 2020-02-25T07:30:18 | 231,666,601 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 579 | py | merge_sort.py |
A = [5,3,4,2,1,10,8,15,22,6]
# x = array with 2 sorted arrays, from [p,q] and [q+1,r]
def merge(x,p,q,r):
L = x[p:q]
R = x[q:r]
L.append(float('inf'))
R.append(float('inf'))
i = j = 0
for k in range(p,r):
print(x)
if L[i] < R[j]:
x[k] = L[i]
i += 1
... |
0100a9e169ed7b37795f06c65dd63a9a8bbbc0be | 5665abc3582ce669a8197eadf261112616cde958 | /backend/src/testapi/models.py | 47f4ee899c687200a2f2971c11c04e8ac8ecc871 | [] | no_license | LisS666-netizen/test_raven | de11cfd601d6c33d6765f3a946c3c209949439de | 06f8e38ccbee9d6077ccea5b231bbd8a502af532 | refs/heads/master | 2023-01-07T06:21:55.752303 | 2020-11-04T15:32:17 | 2020-11-04T15:32:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 469 | py | models.py | from django.db import models
from django.conf import settings
class Project(models.Model):
"""
QA Project Model
"""
author = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE, related_name='leader')
name = models.CharField(max_length=150, blank=True, null=True)
descript... |
7a34e4e55dfef5cc13f1aa01b2b9de177872d822 | f78b446209d56ba5240ed1d9a19ce54d82cfe99e | /code/report/phoneme_set.py | b198e9952e948bd95d120bfef4ce42e97a1256bd | [
"MIT"
] | permissive | qingqingxu2020/multimodalSR | 5b49aaacf2ca97b35b59531af2053337cc137d67 | 1f614fb4dfbb421247077b28e14fe29268951871 | refs/heads/master | 2022-04-03T04:39:28.613914 | 2017-11-20T15:35:51 | 2017-11-20T15:35:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,315 | py | phoneme_set.py | # using the 39 phone set proposed in (Lee & Hon, 1989)
# Table 3. Mapping from 61 classes to 39 classes, as proposed by Lee and Hon, (Lee & Hon,
# 1989). The phones in the left column are folded into the labels of the right column. The
# remaining phones are left intact.
import logging
logger_phonemeSet = logging.getLo... |
dc76dc70439ecc280941461e2e717f5c994e21fb | 70d39e4ee19154a62e8c82467ef75b601e584738 | /sqlmap/nosqli/user_pass_enum_beta_.py | 39327300532f03e3b3a1a5206ca0adb1735f3b4b | [] | no_license | babywyrm/sysadmin | 6f2724be13ae7e5b9372278856a8c072073beffb | 2a5f3d29c7529bc917d4ff9be03af30ec23948a5 | refs/heads/master | 2023-08-16T03:50:38.717442 | 2023-08-16T03:05:55 | 2023-08-16T03:05:55 | 210,228,940 | 10 | 5 | null | 2023-05-01T23:15:31 | 2019-09-22T23:42:50 | PowerShell | UTF-8 | Python | false | false | 3,825 | py | user_pass_enum_beta_.py | # Exploit Title: Nosql injection username/password enumeration
# Author: Kalana Sankalpa (Anon LK)
# Websites: https://www.widane.com, https://blogofkalana.wordpress.com
# Blogpost: https://blogofkalana.wordpress.com/2019/11/14/nosql-injection-username-and-password-enumeration/
#!/usr/bin/python
##
##
import string
... |