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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
94e8f0532da76c803b23fe2217b07dc8cf285710 | 97d527c71f883e1c624506af11de75637ffa2f81 | /day 16/univercityaddmision.py | 4070357a07387cffdfcbc0bb7e055be0e45f3c18 | [] | no_license | abhinavsoni2601/fosk_work | dd61fac7d6683c39dfc9f83430f896e65cc6412a | 92794f47da1343f001e92a8c3c68ab31af9128a5 | refs/heads/master | 2020-05-24T09:01:26.761529 | 2019-06-02T09:40:22 | 2019-06-02T09:40:22 | 187,195,295 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 899 | py | univercityaddmision.py | # -*- coding: utf-8 -*-
"""
Created on Mon May 27 17:38:50 2019
@author: User
"""
import numpy as np
import pandas as pd
dataset = pd.read_csv('University_data.csv')
print(dataset.info())
features = dataset.iloc[:, :-1].values
labels = dataset.iloc[:, -1:].values
from sklearn.preprocessing import LabelEncoder
la... |
f5d353694a719472320f4d6fa28bc9d2cc5a69b0 | 39efecfcea244992c58d158209d0f161e41d56c8 | /AAAA.000.000.py | fa0ea1f1fe461b157cf002a9af145290f120ad96 | [] | no_license | ridgerunner03/AI_project | 37fdd19063a7aa2b715762c57c2822af21f55904 | 83148c4e0d3b933eea0f9094075c91b16328cc94 | refs/heads/main | 2023-02-04T01:28:14.428342 | 2020-12-23T21:44:13 | 2020-12-23T21:44:13 | 324,004,891 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,505 | py | AAAA.000.000.py | # -*- coding: utf-8 -*-
"""
This is the very first A.I. in this series.
The vision is to devlop 'protocol droid' to talk to, to help with tasks, and with whom to play games.
The droid will be able to translate langages and connect ppl.
"""
import speech_recognition as sr
import pyttsx3
import pywhatkit
... |
27a12a0f5ea6120036b66ee1cdd903da868a037f | 0566cf76b456518875edecece15e763a36a4795f | /scrapers/hdmovie14_ag.py | fb976c7861e3e318d3ae29f3ce8197950759b12b | [] | no_license | theclonedude/Scraping_BeautifulSoup_phantomjs | 684b1f7a993e0d2555daa7a5455cf19bd29b0b1b | faf653feae46c21a72d13b2123cdebdb2f7c05d8 | refs/heads/master | 2023-03-16T19:36:14.867361 | 2018-06-14T14:21:02 | 2018-06-14T14:21:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,463 | py | hdmovie14_ag.py | # coding=utf-8
import base64
from sandcrawler.scraper import ScraperBase, SimpleScraperBase
class Hdmovie14Ag(SimpleScraperBase):
BASE_URL = 'http://www1.solarmovie.net'
OTHER_URLS = ['http://solarmovie.net', 'http://hdmovie14.ag']
SCRAPER_TYPES = [ ScraperBase.SCRAPER_TYPE_OSP, ]
LANGUAGE = 'eng'
... |
aba2a0a262c14f286c278f21ba42871410c174f0 | 67a0ff5f96f905803b42c106f42e9d776e0a46ab | /BookLibrary/book/views.py | 5de590ea8984d96ed0fb048d987ae306dc2a4a4e | [] | no_license | sparkle6596/djangoBookLibrary | 9ff00cb2dad1e8bdd657d00882f29563e98a4fac | d712e2587a8592be53a4ad2ebb677ab80cc85548 | refs/heads/main | 2023-07-02T22:42:26.080650 | 2021-08-01T08:58:00 | 2021-08-01T08:58:00 | 391,648,792 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,341 | py | views.py | from django.shortcuts import render
from django.shortcuts import redirect
# Create your views here.
from .forms import AddBookForm ,UpdateBookForm,BookCreateModelForm,SearchForm,RegistrationForm,SignInForm
from book.models import Books
from django.contrib.auth import authenticate,login,logout
def book_add(reques... |
d5903698eb8ed6be531b0cc522d4feff6b79da4e | a63ac40c96abcc7f1d7ec65ff1ba8188ea02e12a | /flashcards.py | 6b92065788cf9b70bf6a8364fe731fb6f1bbb6ef | [] | no_license | tristan-hunt/Flashcards | 952fd63f26263e4d4bd514929620b317dcfe32db | 822cd402c981b70eb43ddb8453c11443a93544e0 | refs/heads/master | 2022-12-29T07:14:04.911710 | 2020-10-20T04:06:58 | 2020-10-20T04:06:58 | 305,586,474 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,956 | py | flashcards.py | import argparse
import pandas as pd
import random
import time
class Deck:
def __init__(self, num_cols, front, back):
self.flashcards = []
self.num_cols = num_cols
self.front = front
self.back = back
class Flashcard:
def __init__(self, deck, front, back, column, row):
self.deck = deck
self.front = front
... |
48291ab3deb1ca1ba672d3e642d55635a7270171 | e8540869eef80b40e416b2cd1086869a115da92e | /robot_python/communication.py | 71df95c08d414ee868a1c647fcf196bd616479f4 | [] | no_license | alli5723/lennuk | 00f2884747ff0704606efc89a4568d313f809d5b | 5cf39955c5e74c6a64f7696cc48788df69b52e1e | refs/heads/master | 2021-09-03T19:59:16.129405 | 2018-01-11T15:10:37 | 2018-01-11T15:10:37 | 104,570,608 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 954 | py | communication.py | import serial
from settings import *
class CommunicationController:
def __init__(self):
global board
board = serial.Serial(ROBOT_SERIAL, BAUDRATE, serial.EIGHTBITS, timeout=0)
self.count = 0
print("Communication controller")
def sendCommand(self, right, back, left):
self... |
d7b0ff6549d854d21ad1d2d0f5a9e7f75f4ac1d5 | 1d701a241603d600dcbff926cae88a811b469041 | /backend/recruitmentapp/apps/core/tests.py | 8a5faf24151b019862d13a0279791db6fc728511 | [] | no_license | IV1201-VT18-G8/recruitment-app | 3b7fb5066d75c73de14d81a16fc40a7440bc07f7 | 7bb68cba0c7ebffb49f4bb770fdb6159e6c98fc2 | refs/heads/master | 2021-05-11T19:06:52.015041 | 2018-03-08T20:29:17 | 2018-03-08T20:29:17 | 117,850,299 | 0 | 0 | null | 2018-03-08T19:49:56 | 2018-01-17T14:53:05 | null | UTF-8 | Python | false | false | 760 | py | tests.py | from django.test import TestCase
from recruitmentapp.apps.core.models import Competence
class CompetenceTest(TestCase):
def setUp(self):
self.competence = Competence.objects.create(name='mining')
self.competence.set_current_language('sv')
self.competence.name = 'gruvarbete'
self.c... |
8457cdde8f8ad069505c7729b8217e5d272be41e | efb1eb654d3477b411f82f83762796372b5c803b | /tests/stubs.py | ebe103f7d2072d9627efd9c9d80aa71b0e24622c | [
"MIT"
] | permissive | Rydra/mastermind-api | d9bcc6857fe4e3ad2a77560babd64a5d8ded59b7 | 850963b472644dd66b042223ffd86726af60bcda | refs/heads/master | 2023-02-22T03:10:49.589415 | 2022-12-29T14:37:08 | 2022-12-29T14:37:08 | 192,472,100 | 0 | 0 | MIT | 2023-02-15T20:28:40 | 2019-06-18T05:33:59 | Python | UTF-8 | Python | false | false | 860 | py | stubs.py | from apps.mastermind.core.domain.domain import Color, Game
from apps.mastermind.infrastructure.mongo_persistence.uow import MongoUnitOfWork
from composite_root.container import provide
class GameMother:
async def a_game(
self,
num_slots: int,
num_colors: int,
max_guesses: int,
... |
690e7cc9047b3a445bf330524df52e2b359f1f13 | d78261a2f563ddf7085bcae1a52ccadff6173aee | /merge/DataDir.py | cae3befa78d75e0a1ea98f92e38527a837233784 | [
"Apache-2.0"
] | permissive | chanhou/track2 | d798b23ac3556dba6760bc9ff2d42360c714dff6 | 22c79eae5a1d3b58d9644bcea7929e37d17f4f83 | refs/heads/master | 2021-01-18T12:51:25.047410 | 2016-04-13T16:54:21 | 2016-04-13T16:54:21 | 44,422,788 | 0 | 0 | null | 2015-10-17T03:38:21 | 2015-10-17T03:38:21 | null | UTF-8 | Python | false | false | 190 | py | DataDir.py | AuthorPath = 'data/Author.csv'
PaperPath = 'buff/Paper.TitleCut.csv'
PaperAuthorPath = 'data/PaperAuthor.csv'
AffilListPath = 'buff/AffilList2.csv'
StopwordPath='InternalData/en.lst'
|
7a9515b1f8cc196eb7551137a1418d5a387e7fd3 | c3c352cd8fb8d58933b6303a16f37a1f8072ad8a | /Exercise 4/average_ratings.py | 1e2794f8fe35e71dbdd787dbdee20efa39afbaec | [] | no_license | NoNameAA/Data_Science_Exercise | a35c1d1344112124739ad7738bbecce90cc11f68 | 14e2209e8deab4fbe1d0a70b8bec5fbbebb77d31 | refs/heads/master | 2020-03-20T03:43:48.116513 | 2018-11-07T01:36:52 | 2018-11-07T01:36:52 | 137,157,427 | 0 | 1 | null | 2018-11-07T01:36:53 | 2018-06-13T03:26:24 | Jupyter Notebook | UTF-8 | Python | false | false | 1,255 | py | average_ratings.py | import pandas as pd
import numpy as np
import difflib as dl
import sys
def get_close(x):
if len(x) == 0:
return ""
return x[0]
list_file = sys.argv[1]
rating_file = sys.argv[2]
output_file = sys.argv[3]
movie_list = open(list_file).read().splitlines()
movie_data = pd.DataFrame({'movie': movie_list})
rating_data ... |
3649f25b952975e2c81f3abf6823378c34d3136a | 31f15c275a85ebc3855faf5456e7700b64fa58bb | /cnn_model.py | 14e380c804eb6d719b6677545c7dee32652b71ca | [] | no_license | Wenminggong/cnn-for-hand-gestures-recognition-pytorch | 563cb700fabced76822993b7814021c42f314184 | 3c9a761220688152c551254abcce2e88ef341abc | refs/heads/main | 2023-03-28T09:48:14.578112 | 2021-04-02T13:45:14 | 2021-04-02T13:45:14 | 354,010,658 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,269 | py | cnn_model.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Dec 15 13:47:07 2020
@author: wenminggong
cnn model
"""
import os
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.data as Data
import torchvision
import matplotlib.pyplot as plt
import math
# spatial pyramid poo... |
f620b12f12d6a24316549059e7ff8ef7031be10a | aebacedc43afabf8ce54bb25f4cbe040441dcba4 | /appscripts/appscripts-acer-120311/justSample.py | a33ade2e843eafc27fde21b1582d808aa61c37f0 | [] | no_license | swanandgore/rappertk | 84e968447597494645ac0c9868358fc6a194197a | d1a5d5e0d096dfc23237e29bfd983183ca1e2fbd | refs/heads/master | 2020-05-17T07:59:43.613762 | 2014-08-20T12:13:56 | 2014-08-20T12:13:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 509 | py | justSample.py | import os
from samplers import PhipsiSampler
cbDatapath = os.environ["RTKROOT"] + "/data/"
class PhipsiSamplerProvider :
def __init__(self) : self.samplers = {}
def get(self, resn) :
if not resn in self.samplers.keys() :
self.samplers[resn] = PhipsiSampler( cbDatapath + "/PhipsiWeightedProp... |
2af4f8514b0545edb035744b5a6d3280a2563279 | 0da2f4c529262c1152a4893c30a7fbbfa42a1717 | /Codes_Py/ProCheck.py | d01c35aa5f847cae5d4421824a064155fc8b16fa | [] | no_license | Pedro-Souza/My-Codes | d64dcdff275140aa19c2ce5f950f39dcb7995bfc | 054dd9349a12d172b2e295bbe1a5693892fee40c | refs/heads/master | 2021-09-08T15:46:00.724281 | 2018-03-10T21:24:08 | 2018-03-10T21:24:08 | 34,184,714 | 5 | 1 | null | 2017-01-10T12:48:22 | 2015-04-18T22:11:21 | Python | UTF-8 | Python | false | false | 2,821 | py | ProCheck.py | #!/usr/bin/env python
#_*_ coding:utf-8 _*_
from os import name, system
from urllib2 import urlopen
from re import findall
# Cores que serão usadas no script.
D, R, G = "", "", ""
proxy = open("proxys.txt", "a")
ColetedProxy = []
ProxList = ['http://dogdev.net/Proxy/BR/r/Pernambuco', 'http://dogdev.net/Pro... |
cbe1dbd33d5c715a32553532b4d4b208714e1664 | 897f6539ee95459ad619d6c23d4c5d9ab5482051 | /5-线性预测-线性拟合-协方差、相关矩阵、相关系数-多项式拟合预测-过拟合欠拟合-数据平滑/1-pred.py | 3dae10882dbe6959344d4450bbb17061f7396476 | [] | no_license | delaven007/Date-analysis | af2c797f30aa22015f63551110b6e2453b1f242c | a6a345525b04cc750659de4bc020d6e201dcbfc2 | refs/heads/master | 2020-07-31T03:59:56.599825 | 2019-09-24T01:08:23 | 2019-09-24T01:08:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,463 | py | 1-pred.py | """
加载文件
"""
import numpy as np
import matplotlib.pyplot as mp
import datetime as dt
import matplotlib.dates as md
def dmy2ymd(dmy):
#把日月年转成年月日
dmy=str(dmy,encoding='utf-8')
t=dt.datetime.strptime(dmy,'%d-%m-%Y').date()
s=t.strftime('%Y-%m-%d')
return s
dates,opening_prices,highest_prices,lowest_... |
0a30403d68176ad2d2ee65239f7cd24c9e866948 | 2fbc695dfceb334906d8488dcb698f20b5e8de16 | /pygame/pro/test.py | 859b6de8a4ae3fb91617a36f5967d41d1136dc88 | [] | no_license | reservedname/PythonLearning | 4ae85e32c8a6e672fea641c418ebf04fae4aa0a0 | efe69974873d9d8cfda853d500afff13f252abb1 | refs/heads/master | 2021-07-12T09:09:09.251948 | 2017-10-14T14:01:05 | 2017-10-14T14:01:05 | 103,725,797 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,689 | py | test.py | # 下面的报错是pycharm的bug
import math
import pygame
import sys
from datetime import datetime, date, time
from pygame.locals import *
pygame.init()
screenTitle = pygame.display.set_caption('Hello World')
screen = pygame.display.set_mode([1200, 650])
white = 255, 255, 255
blue = 45, 72, 200
black = 0, 0, 0
color = 255, 255... |
2adb38a6ea7a3513e52a05f8ae25880c695ed4cb | 447368b7c9a389300ea9d679b56190efbaa506cc | /main/functions.py | f577364e4c971a4742625d703bc6f75f8fc43810 | [] | no_license | bouncei/UserBot | b22cb8f0d6c5377e3c3ba2c679788e7a2c92847d | ea209eccef904bea9a1e1537cf0bf51caf96da3f | refs/heads/master | 2023-09-05T15:03:01.077308 | 2021-11-09T09:49:49 | 2021-11-09T09:49:49 | 364,433,524 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,836 | py | functions.py | from config import *
def forceReply():
markup = types.ForceReply(selective=False)
q = bot.send_message(admin, "Send me the message:", reply_markup=markup)
return q #return a force reply question to admin
def customImg(msg):
"""Confirming Custom Image """
global customImage
# Addi... |
0a50f122ea68e1d34188c357fcadd3476c44ce41 | d36546287721db2e97e0a4323e143163a14ce0b1 | /2016/16/test_wiper.py | 5d131e48913d9e27a05da1848ef0acd2fcccd78f | [
"Unlicense"
] | permissive | GeoffRiley/AdventOfCode | ca258edee05ad7a4b6e6db2e59b83e8879b48af0 | 567df9cb5645bc6cf4c22063a84a621039069311 | refs/heads/master | 2023-01-12T03:42:11.099541 | 2022-12-25T17:16:20 | 2022-12-25T17:16:20 | 225,139,440 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 137 | py | test_wiper.py | from wiper import wiper
def test_wiper():
a, b = wiper("10000", 20)
assert a == '10000011110010000111'
assert b == '01100'
|
4d4d182c753a04ee46514a4263ab1df2527e7711 | 93ab050518092de3a433b03744d09b0b49b541a6 | /iniciante/Mundo 02/Anotações das Aulas e Desafios/Aula 02 - 13/Desafio 054.py | 6d5857f73eace65a422b84cc6bd9d6b0200ee9ac | [
"MIT"
] | permissive | ggsant/pyladies | 1e5df8772fe772f8f7d0d254070383b9b9f09ec6 | 37e11e0c9dc2fa2263ed5b42df5a395169408766 | refs/heads/master | 2023-01-02T11:49:44.836957 | 2020-11-01T18:36:43 | 2020-11-01T18:36:43 | 306,947,105 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 737 | py | Desafio 054.py | """
DESAFIO 054: Grupo de Maioridade
Crie um programa que leia o ano de nascimento de sete pessoas. No final, mostre
quantas pessoas ainda não atingiram a maioridade e quantas já são maiores.
"""
from datetime import date
ano = date.today().year
pessoas = 0
for c in range(1, 7 + 1):
msg = 'Digite o ano de nascime... |
079f7a278da7969d5d3278a40ea19cc8f29a255f | 2e8bef33bb092a5b7194fe6d2dddd3193436cb70 | /DAY 1/sqrt.py | d057e4debc70d3e30ea3b1fcb06ecae3387cd5db | [] | no_license | KartikeyaGaur29/tathastu_week_of_code | e5e143b822af19f85d6350b7510fe5ca0d4f349f | 59a1bdbfbaa4ff6d2f8c7af85345cdb5afc9d3ac | refs/heads/master | 2022-10-10T02:40:18.424788 | 2020-06-04T19:42:15 | 2020-06-04T19:42:15 | 266,125,588 | 1 | 2 | null | 2020-05-25T19:17:24 | 2020-05-22T14:06:01 | Python | UTF-8 | Python | false | false | 144 | py | sqrt.py | num = int(input("Enter a number : "))
print("\n The number entered is :",num)
sqrt=(num**(0.5))
print("\n The square root of",num," =",sqrt)
|
9f4d273193222e73e8c1850860ff6587e620dbb5 | b886233d6d93d0d407112a491f9d5ab73ee81016 | /kdfs/kdfext.py | 1654d1473f498c282b4077ad1e9e2177ebafab52 | [
"MIT"
] | permissive | jonathan-lemos/easy-encrypt | 20ade61767643cd463765b5e62721c15a3014335 | 38d5985dbe5082edf0785d26aabdbe5475e1a61d | refs/heads/master | 2022-11-04T18:54:35.931931 | 2020-06-22T14:37:09 | 2020-06-22T14:38:12 | 266,265,733 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,627 | py | kdfext.py | from typing import Dict, List, Union, Iterable, Tuple, Optional
import b64
from kdfs.argon2kdf import Argon2Kdf
from kdfs.scryptkdf import ScryptKdf
from kdfs.kdf import Kdf
from math import floor, log2
import re
import log
from securerandom import rand_unique_bytes
def __parse_memory_unit(val: str) -> int:
if ... |
5f2f397cf8536a78b5c4c8cb8264e421c57ae873 | 77a78a9feeed0c2b10a6d89e6eac066372bc49a8 | /recipes/twitter-vaping/evaluate_models.py | c95396bf628e3d5b420d4d219e4943809fd2ef98 | [] | no_license | Twitter-R01/TwitterR01 | 1b32d9f95cce383cdd1e64c2c32e359d7851466d | d179fbb15054a029733e953d5af35ff71ed197fb | refs/heads/main | 2023-08-02T09:14:04.652766 | 2021-10-05T04:00:57 | 2021-10-05T04:01:05 | 341,318,142 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 19,695 | py | evaluate_models.py | from sklearn.base import TransformerMixin, BaseEstimator
from sklearn.calibration import CalibratedClassifierCV, calibration_curve
from sklearn.ensemble import RandomForestClassifier
from sklearn.feature_extraction.text import CountVectorizer, TfidfTransformer
from sklearn.linear_model import LogisticRegression, SGDCla... |
29c701b5cca84f55df9844e2d3ac5dd7f1cb16b0 | d2a30093e33f28a769bdddf71529a8b426c434a4 | /pipe1/DWItoRD.py | 069d15f780bda12bac6468505923df706abad913 | [] | no_license | arthurmmedeiros/scripts | 1eb12f8fc0aaa33201756aa9fc83be594ede19d8 | c81c1a20be6d8cccef388264c9670574c89f9c74 | refs/heads/master | 2020-12-29T01:00:50.230283 | 2015-06-11T18:10:30 | 2015-06-11T18:10:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,069 | py | DWItoRD.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# test2.py
#
# Copyright 2015 Andy <Andy@ANDY-PC>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
... |
ae984a7a1f4b9971196c1e61b5ae782390d6a660 | 1440dff537b6dd19d210ff6cfea425b2383a4949 | /PythonForEverybody/Ch7/Ex2_spamconf.py | ab859a80641d00a71d9f29fb6d8be6cc14854d5b | [] | no_license | kieranmcgregor/Python | 519b183d0e3a306cc515dc04f53325ae9a880922 | 4750e46316910492b3763369d0b0d85d0ead812b | refs/heads/master | 2020-07-07T00:19:51.597429 | 2018-06-17T05:29:45 | 2018-06-17T05:29:45 | 74,042,634 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 603 | py | Ex2_spamconf.py | file_name_empty = True
file_name = ""
while file_name_empty:
file_name = input("Please enter file name:\n")
try:
fh = open(file_name)
file_name_empty = False
except:
print ("File not found, please ensure file path is correct.")
continue
criteria = "X-DSPAM-Confidence"
conf... |
80939a7f81c036c219f96aae83a34781751e48ec | d5f7d99ee269584663ac872416d2605aa0c8fc6e | /A_Byte_Of_Python/code/for.py | f830d69e37abbb569b3ec1b78f6644a0b7a2f100 | [] | no_license | yikx/Python | c6ff67bcd67c93994ee27f621da12881258202e4 | 0441de7ca85bd088dc2d444808dedc40d5fbeff4 | refs/heads/master | 2020-03-16T07:29:09.830689 | 2018-05-08T12:38:10 | 2018-05-08T12:53:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 171 | py | for.py | # -*- coding: utf-8 -*-
"""
Created on Sat May 5 22:02:13 2018
@author: Administrator
"""
for x in range(1,5):
print(x)
else:
print("The for loop is over")
|
05415176a1b07fd6049f948fdb387c22732508d2 | b8c1ee67d1e770ca0a49771751df8cef6a5b6935 | /pythainlp/cli/__init__.py | 0d984d3c4b4a806f046020e57ea91cf7147f187f | [
"Apache-2.0",
"CC0-1.0",
"LicenseRef-scancode-public-domain",
"CC-BY-4.0"
] | permissive | PyThaiNLP/pythainlp | 2922c6e4723f1828d39793eb722dc163d141c4f2 | 43cd4f8029d2d9b0d3fd1e4cc30faab7e8052eeb | refs/heads/dev | 2023-09-04T03:42:44.488153 | 2023-08-20T04:10:28 | 2023-08-20T04:10:28 | 61,813,823 | 761 | 264 | Apache-2.0 | 2023-08-20T04:10:30 | 2016-06-23T14:57:26 | Python | UTF-8 | Python | false | false | 1,158 | py | __init__.py | # -*- coding: utf-8 -*-
# Copyright (C) 2016-2023 PyThaiNLP Project
#
# 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 a... |
28cbdd731543f10e8132d6e276f619fdc7ba781b | 89e4c3dd91ceb3a4a5e74cfaedbb795152ebd1f9 | /lc474_dp.py | c6091e55701f1791736ebc81436bab21aad9fd0d | [] | no_license | Mela2014/lc_punch | a230af2c9d40b1af4932c800e72698de5b77d61a | 498308e6a065af444a1d5570341231e4c51dfa3f | refs/heads/main | 2023-07-13T03:44:56.963033 | 2021-08-25T05:44:40 | 2021-08-25T05:44:40 | 313,742,939 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 732 | py | lc474_dp.py | class Solution:
def findMaxForm(self, strs, m, n):
xy = [[s.count("0"), s.count("1")] for s in strs]
@lru_cache(None)
def dp(mm, nn, kk):
if mm < 0 or nn < 0: return -float("inf")
if kk == len(strs): return 0
x, y = xy[kk]
return max(1 + dp(m... |
fea4b8f6a7dd9e1bba573d6bb6d60703ad69c60b | 95cb6b4690d6d73250dffcfe282469b3efb60796 | /src/constructor/views.py | be802d427143de28b372dd06ed62755ed3cfb015 | [] | no_license | stavenko/be-web.ru | f8c8b233e6e2edf0296c6b86876ad582af4ed42d | 8fc6350bd603b15a4d8c4d9df196549b1ef714ab | refs/heads/master | 2020-04-14T21:51:35.790680 | 2013-07-03T02:16:38 | 2013-07-03T02:16:38 | 10,022,480 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 243 | py | views.py | from django.views.generic import ListView, TemplateView
class ConstructorPage(TemplateView):
def get(self,req, *k, **kw):
self.template_name = "constructor/constructor_page.html"
return self.render_to_response({})
|
fd8a5fad948a74ca0abd3c1306188b40be3a8c86 | ee8b560ce342341ebf52e0561f4c0d030cf83646 | /psemplot/parse_args.py | 15cf2df0174ee344b5d0d47cbafbdf6aaef027f7 | [] | no_license | jlbeidler/psemplot | ae802048dba53781285ecd4d59846b67ede469ac | bdec8f3cb1412dbd18688a490dba7a5fc6d69fef | refs/heads/master | 2023-02-05T03:07:28.990187 | 2023-02-03T16:17:08 | 2023-02-03T16:17:08 | 196,240,042 | 5 | 1 | null | null | null | null | UTF-8 | Python | false | false | 5,509 | py | parse_args.py | """
Process the command line arguments and switches
"""
from optparse import OptionParser, OptionGroup
def parse_args():
parser = OptionParser(usage = 'usage: %prog INFILE OUTFILE [opts]')
data_group = OptionGroup(parser, 'Data Selection Options')
scale_group = OptionGroup(parser, 'Scale Definition Option... |
2372c2782470922345e13ee216f09b6e6fb9d085 | 42ece984bbd6d4e075dc0befdf59c4adfc6ae75f | /1-25/Problem_005.py | fddaddb2067c0b62526f742c02b2773e838c27b7 | [] | no_license | RutgerMoons/Rosalind | a56306ddbedf0b40276294df47fecc946d63b863 | 8a0f91d1e1ed53ef682caa4a4875fa4e3e0be858 | refs/heads/master | 2021-01-10T19:02:03.929207 | 2016-09-21T19:43:25 | 2016-09-21T19:43:25 | 18,223,821 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 593 | py | Problem_005.py | __author__ = 'rutger'
def gc(s):
if len(s) <= 0:
return 0
return (s.count("C") + s.count("G")) / len(s)
a = open("file_005.txt").readlines()
label = ""
sequence = ""
solutions = []
for line in a:
if line[0] == ">":
solutions.append((label, gc(sequence)))
label = line
sequen... |
5ec51b44d7cca11d9ab3e40fd5f25793c2ed4557 | d64d8fd155fcdfafaad53e931acbec63f2754510 | /U8SDK_20161219154412/U8SDKDemo/Unity/buildios/common/xcode_process.py | 5c2613f78d3ab5a9225e4d8e3346093d03669718 | [] | no_license | xiaoxun0808/U8SdkClient | e68b42f40d713572fbb6e467607602b224377d83 | 4f08089ad16207dc23a492ac7f3198b3f0178528 | refs/heads/master | 2023-03-15T02:24:00.411249 | 2017-06-01T09:58:56 | 2017-06-01T09:58:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 300 | py | xcode_process.py | # -*- coding: utf-8 -*-
'''
自定义XCode工程处理脚本,这个脚本将会应用于所有渠道
'''
# apply_mods
mods = {
}
def post_process(self, project, infoPlist, sdkparams):
project.enable_bitcode("NO")
infoPlist["NSAppTransportSecurity"] = { "NSAllowsArbitraryLoads": True }
#pass
|
6a143fa8c2daeff5145ce148dd61c9d6d65db04a | 712595954c3b01b7d3c8b2fd1a383755790b795d | /read_hdf5.py | f67f007361a2ca66ef4182a9017cd4b6f5df4ff6 | [] | no_license | akskuchi/vist-multi-encoder | 09decb3b6e31d62bad7a6c5a3b1d97495edad5c4 | 1bc901c0fc75b4f9fee07b520df802f2c29c57fc | refs/heads/master | 2020-03-15T12:10:30.738538 | 2018-06-26T17:10:14 | 2018-06-26T17:10:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,269 | py | read_hdf5.py | import h5py
import numpy as np
train_dataset0 = h5py.File('./dataset/image_embeddings_to_sentence/stories_to_index_train_split_00.hdf5', 'r')
train_dataset1 = h5py.File('./dataset/image_embeddings_to_sentence/stories_to_index_train_split_01.hdf5', 'r')
train_dataset2 = h5py.File('./dataset/image_embeddings_to_sentence... |
954fe092f27bb0e0dd4cc0a20d45eccd2a7e7eae | 0fe73c63c27e8880c7099154ca8dd69de1680529 | /apps/hora_extra/migrations/0002_horaextra_funcionario.py | c8b3c89de5fd10b38101bc432e6bc3d8b395297b | [
"MIT"
] | permissive | diegocostacmp/gestao_rh | 2eb792e0c2a3b43c96c881d803cc987129f7eb65 | 5fc6333aa1937ecbd05528ca01f4b9cb5f5eb895 | refs/heads/master | 2022-12-15T20:14:01.628034 | 2020-02-24T16:43:43 | 2020-02-24T16:43:43 | 169,488,754 | 0 | 0 | null | 2022-11-22T03:17:34 | 2019-02-06T22:48:54 | JavaScript | UTF-8 | Python | false | false | 643 | py | 0002_horaextra_funcionario.py | # Generated by Django 2.1.5 on 2019-02-08 00:06
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
("funcionario", "0002_auto_20190208_0006"),
("hora_extra", "0001_initial"),
]
operations = [
migratio... |
82e0bf2be45364ef8a0b1fede746cabde0b1031c | cffa05cbbe7aee147d194e856bdf6fb74e4846d6 | /kb_frontend/app/main/project/core/blueprints/admin/routes.py | a8fcff9eab209ea9a3483adacfca87426715a421 | [] | no_license | halcyonjuly7/bb_knowledge | f2faab15f626271355e252a3cead88042f06c314 | 881b101ae0093acf14185c91d9b986ae69dd5f4f | refs/heads/master | 2022-12-12T03:37:22.893411 | 2019-02-26T22:30:25 | 2019-02-26T22:30:25 | 172,800,808 | 0 | 0 | null | 2022-12-08T03:01:31 | 2019-02-26T22:29:35 | Python | UTF-8 | Python | false | false | 147 | py | routes.py | from . import admin
from flask import render_template
@admin.route("/", methods=["GET"])
def home():
return render_template("admin_home.html") |
5c96e56456f1582438ee470f603421fca1ca8955 | f02c310dfa8ee55f080e6d7e9c3292b496f26d86 | /Pretraga.py | 0bb75fb790c1a4547ac92047b6cb8e54451fe873 | [] | no_license | savotomic/Projekat_Python | fce4807c9ea0bd00066376c82c8d21cb9b081bbf | 303e0215855569ab4d5b4b47dbf66f25a528d607 | refs/heads/master | 2022-04-06T20:01:16.582506 | 2020-02-28T22:35:15 | 2020-02-28T22:35:15 | 241,101,433 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,198 | py | Pretraga.py | from Graf import *
from Parsiraj_HTML import nas_recnik
from Set import *
logickeOperacije = ["AND", "OR", "NOT","and","or","not"] #trebace mi za proveru da li se log operacije nalaze kod reci
def obicanUpit(rootdir, upit, graf): # u obican upit mozemo uneti obicne reci razdvojene razmakom
... |
a8f203bced05d02e7a7bcc51808bcbebc2061685 | 90143bd60088d4ecbe4dbcb8a01f3321d407d9c8 | /RazorPy_v1/support/SessionManager.py | 32ccf3686e0170d6b894ea79b66f776e6a6ef86f | [] | no_license | frostyaxe/RazorPy-older | 2be56f3e2d5dff6939fd804fa2b2c550ae8141dc | a7644b11b41e52c796925898ba78f49d95af7237 | refs/heads/master | 2023-01-06T17:13:13.029527 | 2020-10-21T15:50:20 | 2020-10-21T15:50:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,943 | py | SessionManager.py | '''
Created on Oct 3, 2020
@author: Sangeeta-Laptop
'''
from support.url_manager import URLManager
from utils.RestUtils import RestUtils
from urllib3 import make_headers
class SessionManager:
def __init__(self):
self.__teamcity_username = None
self.__teamcity_pass... |
c62dc66c9d81ddaef6f969d6b244617b125338f5 | dcec04dd075e60f0548045dc952fd9949061876b | /Aulas/Mundo 01 Fundamentos/Aula 4 - Desafio 03.py | 05cb5eabda5c438f245aa912c035bce1fdabd61e | [] | no_license | ElianMelo/python | 8395b1dcc1ccf67037e435c14b1fe815569a36c5 | 1e49905c594cf478a4a8da4829d33776f139bb49 | refs/heads/master | 2020-03-23T16:55:48.854162 | 2018-07-22T03:34:30 | 2018-07-22T03:34:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 168 | py | Aula 4 - Desafio 03.py | prm_num = int(input('Primeiro número '))
sgn_num = int(input('Segundo número '))
soma = int(prm_num + sgn_num)
print('A soma dos números deu: ', soma)
|
0bcb8bf168ad52128fa763a880f446cded4396b1 | e3365bc8fa7da2753c248c2b8a5c5e16aef84d9f | /indices/nnclang.py | 6230671362c187bd12843f73728701788c345f6f | [] | no_license | psdh/WhatsintheVector | e8aabacc054a88b4cb25303548980af9a10c12a8 | a24168d068d9c69dc7a0fd13f606c080ae82e2a6 | refs/heads/master | 2021-01-25T10:34:22.651619 | 2015-09-23T11:54:06 | 2015-09-23T11:54:06 | 42,749,205 | 2 | 3 | null | 2015-09-23T11:54:07 | 2015-09-18T22:06:38 | Python | UTF-8 | Python | false | false | 351 | py | nnclang.py | ii = [('TennAP.py', 2), ('AdamWEP.py', 1), ('WilkJMC2.py', 1), ('CarlTFR.py', 16), ('AinsWRR3.py', 1), ('RoscTTI2.py', 1), ('CoolWHM.py', 1), ('CrokTPS.py', 1), ('GilmCRS.py', 1), ('AinsWRR.py', 1), ('TalfTIT.py', 1), ('BackGNE.py', 1), ('EdgeMHT.py', 1), ('AinsWRR2.py', 1), ('RogeSIP.py', 1), ('DibdTRL.py', 1), ('Nort... |
0c3120fc8611c18b02b85a149ad7ac88d99bbe43 | 7a91286a3636ad9606d5933619401cc45bee1b10 | /lib/banking/name.py | 1edeb929c79d234d75e13fbde3aabc4eb0296fa9 | [] | no_license | phriscage/banking_application | d063bbb24c3e1061c2110c1aace1d67ae53e70cc | cc120437213a25e1864db14509c6d143b65d8102 | refs/heads/master | 2019-01-02T04:00:30.034945 | 2015-01-31T03:50:42 | 2015-01-31T03:50:42 | 30,099,098 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 644 | py | name.py | """
name class
"""
#pylint: disable=R0903
class Name(object):
""" the name class includes """
def __init__(self, name):
""" instantiate the class
Args:
name (str): name of a customer with a comma
"""
self.first = None
self.last = None
self._forma... |
22bdf7f4ca4b4975739e04de0bef3c784adb55ce | cf52b0aabd4c49915220a8e735ad194f5f8c6fe5 | /Question_4_4.py | 0e403974dc849a263e5ee59d528c002a38e44e36 | [] | no_license | adithyanarayanan/CTCI-Python-Solutions | 957a09297cc46d7e18cd550bfa4ad6d38854bd69 | c721477efd09a53fe8734925b05cf7c432665c13 | refs/heads/master | 2021-01-12T16:58:38.717247 | 2016-02-24T21:33:40 | 2016-02-24T21:33:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 666 | py | Question_4_4.py | import sys
from Generate_BST_With_Input import *
from Question_4_3 import *
def checkBalanced(root):
# Error code is defined as (-sys.maxint - 1)
return checkHeight(root) != (-sys.maxint - 1)
def checkHeight(node):
if node is None:
return -1
leftHeight = checkHeight(node.left)
if leftHeight == (-sys.maxint - ... |
cfebb2144c897c324433a2fdd16e27752a2eb32d | 06bd7bbc592ec086c48139cdcffe65b4946d96c9 | /Rogue-Like/venv/Include/Character.py | 6cbd7b0b857964c5a33079ddaf5f8a52809e9f24 | [] | no_license | QBoens/Projet-Python | 5b461830e386c31559944f34aeb9c25dd3c3932d | 07b0c847cb67a70b95275b8eaab2975457a16611 | refs/heads/master | 2020-08-26T14:50:49.759775 | 2019-11-24T15:42:17 | 2019-11-24T15:42:17 | 217,042,260 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 20,191 | py | Character.py | from Include.Inventory import *
from Include.Objects import *
from Include.Spells import *
from os import listdir
from random import randint
import json
class Character():
"""
Classe qui permet de créer les différents personnages du jeu
"""
def __init__(self, nom):
self.nom = nom
self.... |
4ab0b361c53ca0678419c1bbc9a188b661ea119a | 0f7a641aad9c8217cf6e59c43a2bd398438555fd | /app/serializer.py | f44e267405916b8a769ccaf63a2f0af2d7e75725 | [] | no_license | zk-python/ems | 7ead3b9f33bb91441195ca8708aa42a442c1fc82 | e35eb970d733a221622bd240014c3930b91b7f15 | refs/heads/master | 2023-02-13T15:50:23.325671 | 2021-01-11T02:56:14 | 2021-01-11T02:56:14 | 327,164,994 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,872 | py | serializer.py | from rest_framework import serializers
from rest_framework.serializers import ModelSerializer
from app.models import Book
# class BookModelSerializer(ModelSerializer):
# class Meta:
# model=Book
# fields=("book_name", "price", "pic", "publish", "create_time","id")
# # 指定查询深度 关联对象的查询 可以查... |
be3b6d23638641ad87cbd137f37610fd85232e0a | f234bbd72a0f25273097e1e711cc69331b2e942f | /api/resources/index.py | 8e97b705f1f1d3eb81077042b8cd4b8a34c29b2b | [] | no_license | visonforcoding/movie | 64c04d6de6289d2f629df9e53a177f14987cbefe | 3e132a627439fce8357a4604be6d961f915e39a2 | refs/heads/master | 2020-05-28T09:40:55.137486 | 2017-07-26T15:49:09 | 2017-07-26T15:49:09 | 93,996,821 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,924 | py | index.py | # coding=utf-8
from flask_restful import Resource
from model import base
from datetime import datetime
class Index(Resource):
def get(self):
res = {'ret': 0, 'data': None}
newMovies = self.getNewMovies();
ratingMovies = self.getRatingMovies();
res['data'] = {'new_movies': ... |
269bd4ba2f037b0b5a93aafefd0051884ec0b267 | a3d7756623f6ec0f27b2f3aa076eabad0b5ddf80 | /exercise_1/transforming/transform_readmissions.py | 25b048f5bb593857c204dd7bce350d3a29e560db | [] | no_license | maxyan/UCB_MIDS_W205 | 15798a3540d44527bf4b65597e030f527d7a9ba7 | 17ecc65472f465aef7b1d07b72a49454db06864b | refs/heads/master | 2016-09-11T03:14:07.388259 | 2015-12-17T12:21:18 | 2015-12-17T12:21:18 | 41,799,008 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 651 | py | transform_readmissions.py | from pyspark import SparkContext
from pyspark.sql import SQLContext
from pyspark.sql.types import *
sc = SparkContext("local", "weblog app")
lines = sc.textFile('file:///data/exercise1/hospital_compare/readmissions.csv')
parts = lines.map(lambda l:l.split(','))
schema_string = 'provider_id measure_id denominator score... |
1aa59372c02b0972b06678d3c9e241436a50f762 | dcd8341a0ac3cea26bb0902b5b78a3f635b05582 | /armstrongbetweenintervals.py | b62a4bbd39dbfbeec8f49a5e1ceaf938f557c09f | [] | no_license | VigneshPugalenthi/Codekata | a7e9392112f522f50fc4017a0017d5ba24cbec67 | 4a2c85f7a77c3ac88dd60ec99d4a583c20bf7b37 | refs/heads/master | 2023-03-11T06:32:38.374805 | 2019-01-29T10:48:41 | 2019-01-29T10:48:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 252 | py | armstrongbetweenintervals.py | a,b=map(int,input().split())
l=[]
for i in range(a+1,b):
c=i
s=0
while i>0:
d=i%10
s+=d**3
i=i//10
if s==c:
l.append(s)
for i in range(0,len(l)):
if i==len(l)-1:
print(l[i])
else:
print(l[i],end=' ')
|
7a2745df1d9cb807db7c6711e14f5cdec14e0e69 | 22c5435df93a873a20105e9d3af5e7ed21c673d1 | /queue_and_stack/dll_stack.py | 3222239ec99f1da31bbdffd524703f3ee65c6b70 | [] | no_license | VeraMendes/Data-Structures | 10a2a4fedc5efecd85ca432683f41a22a21846e8 | 01bc4b7db59dbc63f1495bc31a20879eba4cc376 | refs/heads/master | 2021-04-18T02:09:19.862511 | 2020-03-27T04:58:23 | 2020-03-27T04:58:23 | 249,301,283 | 0 | 0 | null | 2020-03-23T00:44:30 | 2020-03-23T00:41:53 | Python | UTF-8 | Python | false | false | 815 | py | dll_stack.py | import sys
sys.path.append('../doubly_linked_list')
from doubly_linked_list import DoublyLinkedList
class Stack:
def __init__(self):
self.size = 0
# Why is our DLL a good choice to store our elements?
self.storage = DoublyLinkedList()
def push(self, value):
# in stack, we alway... |
2612adecc676aa7216d5e8b55d2dc1d5666b5415 | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_210/ch17_2020_03_02_15_58_12_961617.py | ae340f51a335c45f0872efa73c197802f13e5043 | [] | 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 | 69 | py | ch17_2020_03_02_15_58_12_961617.py | import calendar
def eh_bissexto(ano):
return calendar.isleap(ano) |
27b50b5e55945f4af2024afd9e3ac5587c74aad6 | c490cc67ca8b1c38924194930264fed61ce9278a | /unet_module.py | 5487cb989706f641acbe6d55eef7b5dbadcf969d | [] | no_license | waggle-sensor/plugin-cloudcover | 7af3252eb7291fadacc27e6481d8596eafa9e681 | a188e51cf46a1c407c0a59a4e9ae919f0190dc04 | refs/heads/master | 2023-04-20T13:52:22.921440 | 2021-03-22T12:25:49 | 2021-03-22T12:25:49 | 305,801,024 | 0 | 1 | null | 2021-05-16T16:32:10 | 2020-10-20T18:36:43 | Python | UTF-8 | Python | false | false | 811 | py | unet_module.py | import torch
from torchvision import transforms
model_path = "wagglecloud_unet_300.pth"
image_size = 300
def preprocess(image):
f = transforms.Compose([
transforms.ToPILImage(),
transforms.Resize((image_size, image_size)),
transforms.ToTensor()
])
return f(image)
def postprocess... |
2b6da0e4d1688493003a4e25868ca50d0d45343f | ba862cff320bf095eeb7aa2d485a26ca2e1b87fc | /python/fastopen/server.py | d6cf7cf101769eb3fcbac15b7dd7a07b15315997 | [] | no_license | bigclouds/misccode | 92e30bdb894748abae2e6881780694223702cee7 | 15a5eab092dca023648516e211f91b7df554772f | refs/heads/master | 2023-03-19T23:11:13.479625 | 2022-09-21T12:50:57 | 2022-09-21T12:50:57 | 506,192,867 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 803 | py | server.py | # -- coding:utf-8 --
import socket
TCP_FASTOPEN = 23
def listen():
connection = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
connection.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
# 设置 TCP Fast Open 队列
connection.setsockopt(socket.SOL_TCP, TCP_FASTOPEN, 5)
connection.bind(('0.0.0.0'... |
956c675300a2fd68434389971e67fccc27ec71a1 | da6fa8149aa64e7ffda08fff41091e689aac187c | /agent.py | 5ee2d9990760489417126e751deed9922108690b | [] | no_license | tade0726/openai-gym-taxi-task | 564d3f434900045e929f25bcd0f08ed9ba579bdf | f54e88fedbddd4b04e6d11ede336d06dc28254c8 | refs/heads/master | 2020-04-10T06:42:20.012607 | 2018-12-08T10:33:28 | 2018-12-08T10:33:28 | 160,862,158 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,184 | py | agent.py | import numpy as np
from collections import defaultdict
class Agent:
def __init__(self, nA=6, alpha=0.1, gamma=0.65, epsilon=1):
""" Initialize agent.
Params
======
- nA: number of actions available to the agent
"""
self.alpha = alpha
self.gamma = gamma
... |
ec612b011c8e9790de35c8c1c99cd7e552195dc9 | 48ff42d365ca49871315f83eb6fc5dda84333ec3 | /Codes/Airflow.py | 31ab48fc8f0be369b2614fedf2681226aa6e16af | [] | no_license | flyingparantha/Airflow | af8431756bd1030f9850644ba61c3ada60cee35a | 7308f6a0e96281ae8552363ed2fc8d72bb996393 | refs/heads/main | 2023-07-04T11:19:59.362803 | 2021-08-08T16:31:56 | 2021-08-08T16:31:56 | 394,010,613 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,943 | py | Airflow.py | # sh pull_github_repository_airflow.sh Git_Repo master Dag_ID
from builtins import range
from datetime import timedelta
import airflow
from airflow.models import DAG
from airflow.operators.bash_operator import BashOperator
from airflow.contrib.operators.ssh_operator import SSHOperator
from airflow.operators.python_... |
203bc877592b07890b4d1456d337e37a5ef157a6 | 21451a6ad35d6b495e04f3862bf3ffece3a2a891 | /cambio/__init__.py | 32ac26e86df30be1cdb778c8dc2b4eb4d9500bc7 | [
"CC0-1.0"
] | permissive | DanielJDufour/cambio | 8f005f4556eba92467b08b8cc0ab3077fb1526c9 | 8668d1da35cd1ebb621216a48cd5ab9dc6e19a13 | refs/heads/master | 2021-02-09T01:46:15.565607 | 2020-04-20T04:11:48 | 2020-04-20T04:11:48 | 244,224,461 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,012 | py | __init__.py | #!/usr/bin/python
import re
from sys import argv
def clean_param_value(param_value):
if param_value.isdigit(): return int(param_value)
elif param_value.isdecimal(): return float(param_value)
return param_value
def get_declaration(variable_name, variable_value):
if (isinstance(variable_value, str)):
... |
826ee916c29dcb92e9ca373a5d690cefaa53eab8 | 6303f6b26920ab0d06729a5ceb0acab9b12c19c5 | /baidulvyou/BDLY.py | f9d7d803e2d217ee48c63baf1b4144e64da11a6e | [] | no_license | wyjss2015/Spider | 730618a64cabc6c4be56b9a7d918c601270bb4a7 | 7568d67f5a55fb6c2bae387869a60c6f60746745 | refs/heads/master | 2021-01-20T19:13:25.165847 | 2016-11-03T15:24:23 | 2016-11-03T15:24:23 | 59,949,574 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,713 | py | BDLY.py | #! -*- coding:utf-8 -*-
import urllib2
import urllib
import re
class Tool:
def __init__(self):
#删除超链接
self.removeAddr = re.compile('<a.*?>|</a>')
def replace(self,text):
text = re.sub(self.removeAddr,'',text)
return text.strip()
class BDLY:
#addr:
def __init__(self,baseUrl, addr):
self.index = baseUrl+... |
c113b5df31b52acf4d8392ed317d95a7e4c5a388 | ad984609f9a4dc39941d2b67db17a33c32700444 | /homework1/task02.py | ccbf87470c373208ce8edde193abb359ffabdd82 | [] | no_license | elsud/homework-repository | db1159844389ff1f4fbe2f54d38aec7c2dd74d26 | 4eba1b5c483ab66cfa73f4618cef02c8dd377714 | refs/heads/master | 2023-06-02T19:34:43.544932 | 2021-06-23T15:45:07 | 2021-06-23T15:45:07 | 356,004,562 | 0 | 1 | null | 2021-06-23T15:45:07 | 2021-04-08T18:02:37 | Python | UTF-8 | Python | false | false | 751 | py | task02.py | """
Given a cell with "it's a fib sequence" from slideshow,
please write function "check_fib", which accepts a Sequence of integers, and
returns if the given sequence is a Fibonacci sequence
We guarantee, that the given sequence contain >= 0 integers inside.
"""
from typing import Sequence
def check_fibonac... |
880e01cff4393ee2b222cc9147599e64b59f7d7d | b399e6761cfd38e321869c251e55721625bfefa4 | /tests/test_install.py | 61065de410b47a1694eaff9de20af39b1620a5ed | [] | no_license | Neutral-Network/django-app-enabler | e941fb5c77662b1dc9a4f5c160217af869a05a51 | 8410a0e87200ff72f487a4ebf156c2777ce11588 | refs/heads/master | 2023-02-07T22:04:12.813580 | 2020-12-27T19:32:05 | 2020-12-27T19:32:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,267 | py | test_install.py | import sys
from subprocess import CalledProcessError
from unittest.mock import patch
import pytest
from app_enabler.install import get_application_from_package, install
def test_get_application_not_existing():
"""Retrieving the main module from a non existing package returns None."""
assert get_application_... |
4357e413f0d6f0d8b034c6197691aead1af7c0d1 | f0b26c711fdf1f230c0937f3b3999a6549503937 | /sandbox/engine.py | 00f9c24de29ad4f685b4b472a994b5ac48995ec3 | [] | no_license | ntwong0/sjsu-cmpe-2014-2015-07-card | fb19351d266f8351446cc926dc9e64a34692fd2b | eda08e388929ae37e5c3646287b8f711eb543369 | refs/heads/master | 2021-01-25T09:00:19.800627 | 2015-05-06T05:11:36 | 2015-05-06T05:11:36 | 34,148,029 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,496 | py | engine.py | MAP_SIZE_PIXELS = 256
from PIL import Image
import time
import random
import signal, os
from getpid import getpid
time_start = time.time()
targetProcess = "node server.js"
pid = getpid(targetProcess)
while True:
# time.sleep(random.randint(1,5))
mapbytes = bytearray(MAP_SIZE_PIXELS * MAP_SIZE_PIXEL... |
38daab8ee7865e85970ee37bdff574a7d1edea52 | fc1b300556e42aa3eb031b09a1b2b775d9c81a30 | /Python基础/第03周/day14/code/05_复制文件.py | 528ed210e8098a2ab56d3e970951e1e11b47b8a0 | [] | no_license | fufuzzz/note | f4d55534ab350212bd9374ac16f86df6ca07360b | 6be85fc9bea7ef2117ca960b3647897774d83239 | refs/heads/master | 2023-05-06T22:01:52.720693 | 2021-06-01T07:46:15 | 2021-06-01T07:46:15 | 372,667,177 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 794 | py | 05_复制文件.py |
# 1、拷贝文件【考虑大文件拷贝,每次读取1024字节拷贝】
# 'C:\Users\ause\Desktop\2017101883游远东\学生(实训)总结.doc'
def copy_file(src_path, target_path):
fp1 = open(src_path, 'rb') # 读取 源文件
fp2 = open(target_path, 'ab') # 写入 目标文件
while True:
content = fp1.read(1024)
# 如果content为空: 则表示读完了
if not content:
... |
91c085378e2e1cdea8bc8fd8f3d8a01ad3ee5224 | 849f0d95474007bab353e9f843a26cf6940e4c89 | /crawler/controller.py | 6275322a832d9072205dddfb5428f58134ea566a | [] | no_license | jongmok1031/SBAprojects | f4db52b084951ff13b82c980ca486a07cba6d650 | 4c36b93d72f93217014743fd2fe5b0557fee0cdb | refs/heads/master | 2022-12-27T00:19:20.640572 | 2020-10-11T14:04:09 | 2020-10-11T14:04:09 | 297,247,331 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,089 | py | controller.py | import sys
sys.path.insert(0,'/Users/jongm/SBAprojects')
from crawler.entity import Entity
from crawler.service import Service
class Controller:
def __init__(self):
self.entity = Entity()
self.service = Service()
if __name__ == '__main__':
service = Service()
myurl = 'https://comic... |
0cd63932a2c231479a1171676860ef741bbe33d0 | cb084a4b95a55ba44cf3696357a16f080f25525c | /main.py | 76930278ad1aa5d1a66b7a5f5b84373f4d731ecf | [] | no_license | zakariarhiba/Login-System | 69ec672f106fd4bf2a46153c19c5e62863cacd3a | 8d2a5b41e18e5d5ea77f3399118713774ab2fcf0 | refs/heads/main | 2023-06-21T01:46:49.405987 | 2021-07-16T21:13:46 | 2021-07-16T21:13:46 | 386,319,709 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,949 | py | main.py | # import necessary librairs
# for application
import sys
from PyQt5.QtWidgets import QApplication, QDialog, QMainWindow, QStackedWidget, QMessageBox
from PyQt5 import uic,QtGui
# for DB connection
import info_DB as info
import psycopg2 as pg
# function for checking the connection with DB
def checkDbConnection():... |
6ba3c4a266a1b17927f26ad7eac37bd3b452c42c | 02baccbcbf803f857975ec0e9a2f544b78204262 | /FILE HANDLING/rename_file.py | 5602a7701505e730f42f54bd8d88cc15033e0b3c | [] | no_license | SARIBEG10/All_python_learnings | 4e8aed34b5defc53a409eccdd6370279017b5b5d | 5b6d3d0437de4a94dd7138d6aa22daac12c79eca | refs/heads/main | 2023-04-01T00:06:49.579528 | 2021-04-08T14:24:17 | 2021-04-08T14:24:17 | 355,934,606 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 43 | py | rename_file.py | import os
os.rename("sari.txt", "BEG.txt")
|
4e0522c26312f755acc6a6f2928e0bac479d754a | a5e7580e1c927a2fed322a181e1115aa31b977b7 | /config.py | 00831ee8d5e44da58f1675a85f32a868f6955a53 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | CareyFrancis/One-Minute-Pitch | d4841b72e389eb33bf63ff05ef21f2118689c5b5 | d3f52601e8697b22ff3462cbeeb269e4cca85c46 | refs/heads/master | 2020-04-21T17:53:40.661894 | 2019-02-15T11:24:57 | 2019-02-15T11:24:57 | 169,750,596 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 567 | py | config.py | import os
class Config:
SECRET_KEY = 'carexfm'
SQLALCHEMY_DATABASE_URI='postgresql+psycopg2://carey:carexfm.@localhost/pitches'
SIMPLEMDE_JS_IIFE = True
SIMPLEMDE_USE_CDN = True
class TestConfig(Config):
pass
class ProdConfig(Config):
SQLALCHEMY_DATABASE_URI = os.environ.get("DATABASE_URL")... |
19aad7d45416e311530aa2ce3e854cf1f65d18f5 | 78666cf594ab56c969ae1eb694cecfc729954187 | /ch03/3-4.py | 4efadf3f903d3af3c14384422eedaa879f66e214 | [] | no_license | rebornwwp/python-parallel-programmning | f17ee55a24850ae93be4f10e058ada997718344e | f1f9e4f85533e40301ca4305d1607947b80df30a | refs/heads/master | 2020-05-24T00:16:37.209239 | 2019-05-16T11:23:07 | 2019-05-16T11:23:07 | 187,013,231 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 315 | py | 3-4.py | import multiprocessing
import time
def foo():
time.sleep(0.1)
p = multiprocessing.Process(target=foo)
p.start()
print("process running: ", p, p.is_alive())
p.terminate()
print("process running: ", p, p.is_alive())
p.join()
print("process running: ", p, p.is_alive())
print("process exit code:", p.exitcode)
|
623bd858923d5f9cc109af586fdda01cd3d5fff3 | 30169504561e2c60d1a53995b317b542bd6ef586 | /wtform_fields.py | 4f524009869b703e929fae2e0fc6d2548b0e1431 | [] | no_license | SidhartK/CambiaAI | 9c86b56021ce262f55d755cd5a60b0dd5731ad63 | c691ed9d60cdc1d83637f304b750d9f01aea1d4f | refs/heads/master | 2023-02-25T23:46:03.242481 | 2021-01-27T10:24:23 | 2021-01-27T10:24:23 | 333,380,667 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,766 | py | wtform_fields.py | from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, SubmitField
from wtforms.validators import InputRequired, Length, EqualTo, ValidationError
from passlib.hash import pbkdf2_sha256
from models import User
def invalid_credentials(form, field):
''' Username and password checker '''
userna... |
9abc5f18e2eb07afe6bc31d6bd27298350707d1d | b6c09a1b87074d6e58884211ce24df8ec354da5c | /888. 公平的糖果棒交换.py | f01ca468eda0e30387f2712fd27700c89226f714 | [] | no_license | fengxiaolong886/leetcode | a0ee12d67c4a10fb12d6ca4369762ab5b090cab1 | 4c0897bc06a297fa9225a0c46d8ec9217d876db8 | refs/heads/master | 2023-03-18T22:16:29.212016 | 2021-03-07T03:48:16 | 2021-03-07T03:48:16 | 339,604,263 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 970 | py | 888. 公平的糖果棒交换.py | """
爱丽丝和鲍勃有不同大小的糖果棒:A[i] 是爱丽丝拥有的第 i 根糖果棒的大小,B[j] 是鲍勃拥有的第 j 根糖果棒的大小。
因为他们是朋友,所以他们想交换一根糖果棒,这样交换后,他们都有相同的糖果总量。(一个人拥有的糖果总量是他们拥有的糖果棒大小的总和。)
返回一个整数数组 ans,其中 ans[0] 是爱丽丝必须交换的糖果棒的大小,ans[1] 是 Bob 必须交换的糖果棒的大小。
如果有多个答案,你可以返回其中任何一个。保证答案存在。
"""
def fairCandySwap(A, B):
sumA, sumB = sum(A), sum(B)
setA, setB = set(A), se... |
6f698196e9391d73bd99cda0a098a5bf7a3832ff | 8abac3f19a797a95ea5f534ece0eabb4e3f48775 | /Assignment_Submission/sondp/lab/lab_6.py | c47577677581514b294c4199aa03c7b68218367e | [] | no_license | qhuydtvt/C4E3 | 77edecaf440f13e784a973a785c7263ba45854d5 | 343a7f515a98df00d67f69f683991cd038dc2967 | refs/heads/master | 2022-12-13T23:00:36.815374 | 2016-05-13T15:11:09 | 2016-05-13T15:11:09 | 52,881,390 | 0 | 3 | null | 2022-12-07T23:36:47 | 2016-03-01T14:08:27 | HTML | UTF-8 | Python | false | false | 160 | py | lab_6.py | from turtle import *
while True:
n=input("Right or left? ")
if n == 'right':
right(60)
forward(100)
elif n == 'left':
left(60)
forward(100)
|
b4d412e8b45722a855a16dd64b7bce9b303d0ffe | 2390ff16199c968da03afa979be8efdc45d7d1b5 | /eulerian-path/eulerian-path.py | 6667b4ce637054ef3607c70a4633a48d450f16b4 | [] | no_license | khzaw/algorithms | 314a71a661eb1edb5aa592a04b36f25e14b132d7 | ba4e3ac9e96f13e4b487cf1de1ba5b7e5f388d92 | refs/heads/master | 2022-12-25T06:59:55.768152 | 2022-12-18T16:27:55 | 2022-12-18T16:27:55 | 51,532,214 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 801 | py | eulerian-path.py | from collections import defaultdict
class Graph:
def __init__(self):
self._graph = defaultdict(list)
self._odd_vertices = []
def add_vertex(self, v):
if not v in self._graph:
self._graph[v] = list()
def add_edge(self, v1, v2):
self._graph[v1].append(v2)
... |
bab78e8a88f9a26cc13fe0c301f82880cee2b680 | 41db0cbd83d81e59c8ae09dce7e680362df061ec | /iris/admin.py | 4d693343281e979c0354f32fb2313b6a16a2188f | [
"MIT"
] | permissive | katiehouse/django-scikit-learn-tutorial | 7e5995e8e8d6340d577278acfcb74de452912291 | d7029ca6eea86939c6486bdda65785e39fb41fec | refs/heads/master | 2023-03-10T21:04:37.595911 | 2023-02-25T20:52:23 | 2023-02-25T20:52:23 | 295,431,444 | 29 | 14 | MIT | 2021-01-29T16:16:56 | 2020-09-14T13:52:53 | Python | UTF-8 | Python | false | false | 147 | py | admin.py | from django.contrib import admin
from .models import Predictions
@admin.register(Predictions)
class PredictionsAdmin(admin.ModelAdmin):
pass
|
fd450b5454b65ed69b411028788c587f9674760c | 0134f131eeecac937dd291993343c595c61b5053 | /polarization/generate_photon_effs.py | f9cad4f2eb3378532e77c7f2e4503f6a45369b59 | [] | no_license | tmadlener/chib_chic_polFW | f11e1874d63fae44b0e941fc4af98ad99e9541a1 | 9f3ac9dd9ce72a824660bde0224fead511259225 | refs/heads/master | 2021-08-29T05:15:38.819574 | 2021-08-13T09:51:48 | 2021-08-13T09:51:48 | 117,083,892 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,491 | py | generate_photon_effs.py | #!/usr/bin/env python
"""
Script that generates the photon efficiency curves and stores them in a root
file.
For the moment only the pT curves for the different eta bins are created
"""
import re
import json
import ROOT as r
r.PyConfig.IgnoreCommandLineOptions = True
import numpy as np
import sympy as sp
from utils... |
176ffac7ad47f5c43a24acc664631f8353ec5100 | e545ca0722f4213c217355965967b9291260749b | /A2/draw.py | a7fc334e131c17d02b366db5e042b94f084e7344 | [
"MIT"
] | permissive | ankurshaswat/COL819 | fa4fadeb02fa100af61ecdafb0624d55b5b6e7ba | 6de683bdafc695300cd5a031dd015d0a88895feb | refs/heads/master | 2022-04-20T17:15:18.623687 | 2020-04-12T14:16:19 | 2020-04-12T14:16:19 | 239,785,565 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,661 | py | draw.py | import matplotlib.pyplot as plt
import numpy as np
steps = 10
num_tests = 100
res = []
with open('txt.txt', 'r') as f:
data = f.readlines()
line = 0
for i in range(10, 110, 10):
agg = 0
for j in range(num_tests):
agg += int(data[line])
line += 1
res.append(... |
b3d26d01d45c073192d06c8e94c06f7eae267b14 | 8600fc1f76b5466d24da127d4a9bc702c23121b7 | /dote.py | c70ce25920d84cc89d9204e5a025973f6aef65a7 | [] | no_license | Nadenokk/intensivgraph | e4739f4f7d0a33ad409aa604eac4d7ab53521ea3 | 32a7e1693dea6fbb6b4ca19ad5be11924249a94a | refs/heads/master | 2023-04-22T23:45:17.732439 | 2021-04-26T20:35:04 | 2021-04-26T20:35:04 | 361,886,797 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 201 | py | dote.py | old_file = open("new.csv", "r")
new_file = open("new1,csv", "w")
for line in old_file.readlines():
cleaned_line =line.replace(',','.')
new_file.write(cleaned_line)
old_file.close
new_file.close |
aa13278a4686e9bab7948c2f212f87f9bd6eee00 | d87a535d822701448142d8b73365a59c24479841 | /recieve.py | cae8a495c9695fb9367cf56e4c66f518a0c009c0 | [] | no_license | maldo31/Huffman | 8fad609a93eb0cb7f8d5f7f08a02765ab9463eb3 | efd13c969586f138f28259bcff52e04a4594ea57 | refs/heads/main | 2023-04-21T11:56:21.367026 | 2021-05-18T00:54:39 | 2021-05-18T00:54:39 | 367,468,288 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,655 | py | recieve.py | import socket
END = bytearray()
END.append(255)
print(END[0])
def recvall(sock): # Odbiór danych
BUFF_SIZE = 4096 # 4 KiB
data = b''
while True: # odbieramy dane, pakiety 4KiB
part = sock.recv(BUFF_SIZE)
data += part
if len(part) < BUFF_SIZE:
# 0 lub koniec danych
... |
3ac63b456317dff14d191a16960472f8c8f65dfa | 8f68a08d09bb355b2c6be7966a5f4a22a5ebefa0 | /conv_nn/MDN_conv3d.py | 750ed23c574d736d5435b39b23acc7e2f5161f55 | [
"MIT"
] | permissive | ocetintas/deep-cancer | 02b99758cb6b592657de7c2c399e3ee98d1d21c8 | a8f7c85a801e6718743f79b110aed71742bc4f85 | refs/heads/master | 2022-12-18T09:07:57.226214 | 2020-09-22T08:42:13 | 2020-09-22T08:42:13 | 276,043,844 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,389 | py | MDN_conv3d.py | import numpy as np
import torch
import torch.nn as nn
from torch.nn import functional as F
from BatchLoader_conv3d import BatchLoader
class MDN(nn.Module):
"""
Implementation of a MDN based on "Mixture Density Networks" Christopher M. Bishop (1994)
Adapted from
Author: Conor Durkan
Date: 24.03.20... |
6d107719973871cce98414e9d47c497b8b5b3105 | 6ff84461c885817e699d06053ad3ee4a0bec2efa | /safeguardAPI.py | 1b9f282c83760b49c5a71932965efcc2df843554 | [] | no_license | deeox/safeGuard-codefundopp-1 | 45dfd1a579677b949d3d4adcc24764a6b766951f | 7258d071d76332d9da8659308be0024b95a44627 | refs/heads/master | 2020-04-15T21:59:26.364732 | 2018-10-26T08:40:21 | 2018-10-26T08:40:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,103 | py | safeguardAPI.py |
from flask import Flask, render_template, request, url_for
from flask_googlemaps import GoogleMaps, Map
import pandas as pd
from Utils import cluster
def fn():
global MasterMap
MasterMap = Map(
identifier="view-side",
lat=latCenter,
lng=longCenter,
markers=cluster(df),
... |
875a8587c05d65db8a79eee8201eada72e2939f2 | c6f950d2c07d7cc6fe2d8816f3f2812bdbc296fb | /app.py | 308224adac0940c9ef817a6c44f49e17359d95d7 | [
"Apache-2.0"
] | permissive | Candloid/auto_api | 903fc817435ce23d4b6a73766029f31b4d9a5f57 | 84d3428064afed965d6f48cc082a9bb4d0012a36 | refs/heads/master | 2022-08-26T01:22:48.190350 | 2022-08-01T07:06:53 | 2022-08-01T07:06:53 | 225,136,559 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 380 | py | app.py | from auto_api import AutoAPI
import os
if __name__ == "__main__":
host = '127.0.0.1'; port = 5000
os.system(f"rundll32 url.dll,FileProtocolHandler http://{host}:{port}")
api = AutoAPI(target='source', module_name='MainModule', prefix='', \
strict_parameters_resolution=False, ignore_defaults=False, host=host... |
9789938b1ed89db6bdc7afee6602928ae351e69e | 27841d259cadddb0864c1b6ee60fd87a5130e06d | /yolo/yolo_test.py | 49cc975551b456534a74247f3ae30bb1a0462926 | [] | no_license | dhfx3712/firstproject | c9b8e237bc105da29f37fe42642b9946c9012ac1 | a72c854e8cf1bb3600b606c544e2a0049fd74d5c | refs/heads/master | 2022-12-09T06:41:13.346105 | 2022-12-05T08:10:15 | 2022-12-05T08:10:15 | 245,648,878 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 749 | py | yolo_test.py | import torch
# model = torch.hub.load('ultralytics/yolov5', 'yolov5s')
# im = 'https://ultralytics.com/images/zidane.jpg'
model = torch.hub.load('ultralytics/yolov5', 'custom','/Users/admin/data/test_project/yolov5/yolov5s.pt')
im = '/Users/admin/data/test_project/coco128/images/train2017/000000000036.jpg'
# im = '/U... |
ea33cdc3cce0c691b27f1e5ef56de410fc5be5d1 | 1499271e6a4bc1ce4da16feb1d742b03e2f3668d | /Local/Esp/boot.py | 038da78fe6beea81ccd723af583ee925ba1ea134 | [] | no_license | pardalmachine/Monitoramento | 75ee592da7bb31b00078ad11581a82f9296be4b0 | e4f06cb2665a551da2dd08b072bdf68bf3ae0f1a | refs/heads/master | 2020-03-14T19:04:45.037701 | 2018-10-31T13:48:13 | 2018-10-31T13:48:13 | 131,754,751 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 500 | py | boot.py | import network
from main import main
import time
#import upip
station = network.WLAN(network.STA_IF)
station.active(True)
station.connect("rede", "senha")
ct=0
print("publicador funcionou")
while station.isconnected()==False:
time.sleep(0.5)
ct+=1
if ct>10:
print("nao conectou")
break
pri... |
76bd8df56e4ae2137c31d5cc48a0277cd9906d42 | 99cefe56491f9872e5736d89407f26a41854bbb0 | /ch4_list/lesson14.py | 0c9b45442b932dfd2e1885a58b5e97d4181866e4 | [] | no_license | scottwat86/Automate_Boring_Stuff_ | 416ad96d6c30fb4ff1036ad0ade18727dcddb669 | 81a87c1a1eea4405efe6ab91b7fe17c98b558602 | refs/heads/master | 2020-06-01T07:09:18.635781 | 2019-09-17T05:13:52 | 2019-09-17T05:13:52 | 190,692,907 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,191 | py | lesson14.py | ## Automate the Boring Stuff with Python 3
# Lesson 14 -
# for loop with lists
# multiple assignment
# augmented assignments operators
# RECAP
# For loops technically iterate over the values in a list
# The range() function returns a li... |
d7ace403d8d64c03ffaad3d5754c2f7bd74376fa | eb12120b6e31e68f59a9c32a7c2f7650de97e0cc | /pycqed/analysis_v3/randomized_benchmarking_analysis.py | 8e3bf519b5e4ed0a4356c3cffba5b19234f9162d | [
"MIT"
] | permissive | QudevETH/PycQED_py3 | 2c4aba99bc7bea4f67b79a34da23dcb8340ea28b | bc6733d774fe31a23f4c7e73e5eb0beed8d30e7d | refs/heads/qudev_master | 2023-08-21T15:12:51.262693 | 2023-08-11T08:56:03 | 2023-08-11T08:56:03 | 71,355,833 | 8 | 4 | MIT | 2022-01-28T09:15:26 | 2016-10-19T12:41:35 | Python | UTF-8 | Python | false | false | 65,189 | py | randomized_benchmarking_analysis.py | import logging
log = logging.getLogger(__name__)
import lmfit
import numpy as np
from scipy import optimize
from collections import OrderedDict
from pycqed.analysis import fitting_models as fit_mods
from pycqed.analysis_v3 import fitting as fit_mod
from pycqed.analysis_v3 import plotting as plot_mod
from pycqed.analys... |
78cb5f4020ee2e3bdb02715bb24c9374e95394f4 | c394ac71de07b1397bc60628d23df1e3f7c6e780 | /cart/models.py | f9a23828d7da8f24b4926852b2555803e8a01010 | [] | no_license | kcshafer/liwi-site | c9a515a6e1242e3cd10fb45d5ac38707a5e7c214 | 2b609b2b8f24d17b0c4823191fb79c1a3e05c97a | refs/heads/master | 2020-04-14T14:00:14.762856 | 2016-07-01T00:15:42 | 2016-07-01T00:15:42 | 20,358,859 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 622 | py | models.py | from django.db import models
class Cart(models.Model):
session_key = models.CharField(max_length=80)
user = models.ForeignKey('registration.User', blank=True, null=True)
created_date = models.DateTimeField(auto_now_add=True)
modified_date = models.DateTimeField(auto_now=True)
class Meta:
... |
eac44b1a5cbb4edb764acf3b73d514c8d8041acd | b03c071280afc41d4b6f5b443f93523134df2b72 | /test_mark.py | 9ce232200a72a243f70bdb4f9ca92cc21ea19b0e | [] | no_license | 22299999999999/Hotwork | 18ec928ae943c04614b024af229a5fe7de9ef50b | 9383cda1bd164a2999c149126efda1c00cd10b20 | refs/heads/master | 2023-02-02T11:21:13.458494 | 2020-12-23T11:51:52 | 2020-12-23T11:51:52 | 312,848,715 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 513 | py | test_mark.py | import pytest
@pytest.mark.demo
def test_one():
print("第一个用例")
@pytest.mark.smoke
@pytest.mark.demo
def test_two():
print("第二个用例")
# 执行 pytest -vs -m "smoke and demo" test_mark.py ,test_two()被执行
# 执行 pytest -vs -m "smoke or demo" test_mark.py ,test_one test_two()都会被执行
'''
消除warning的方法: 项目下创建1个pytest_ini... |
2165bbf9dccea959623e15e0eab82c07297c4cc7 | 05c5f5bbc2ddfa850d4ae28148f176c5d63a4a7b | /tbkt/apps/sx_summer/stu/paper.py | dc919ddc9dc2762f3db3823cc533265fe88d6968 | [] | no_license | GUAN-YE/hd_api_djs | f7234643c06f47c03c348c7740266d45989c5e77 | 1f08cbfccc1ae2123d92670c0afed9b59ae645b8 | refs/heads/master | 2020-03-25T02:32:03.613535 | 2018-08-02T12:52:45 | 2018-08-02T12:52:45 | 143,294,216 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,459 | py | paper.py | # coding:utf-8
from com.com_user import need_login
from libs.utils import ajax_json, Struct, db, ajax_try
from . import com_stu
from apps.sx_summer import common
@ajax_try({})
@need_login
def p_list(request):
"""
@api {post} /huodong/sx_summer/s/list [暑假活动 学生]试卷列表
@apiGroup sx_summer
@apiParamExample ... |
96c27e7ce748ca4a1fd0820810fcb7f0fb1a7d0d | f0f07a94d3876779d27c6b01e2c08c08391fbafb | /tensorflow_model_analysis/addons/fairness/metrics/lift.py | 9016fe72f9b4c7b429daace2a70d3415d45864b5 | [
"BSD-3-Clause",
"MIT",
"Apache-2.0"
] | permissive | tensorflow/model-analysis | 4ec2f637a657d49aa503f2f047bed45b82c93f7b | ee0d8eff562bfe068a3ffdc4da0472cc90adaf41 | refs/heads/master | 2023-08-18T22:51:47.404027 | 2023-08-17T22:39:56 | 2023-08-17T22:40:27 | 126,528,713 | 1,200 | 313 | Apache-2.0 | 2023-08-14T20:18:27 | 2018-03-23T19:08:49 | Python | UTF-8 | Python | false | false | 6,415 | py | lift.py | # Copyright 2021 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
31b456127adb222156c1ce9d3196a42432f1cd67 | 1e12c07d0aae244df099ca1bfc29c4d11e8fad6e | /Train.py | d18719cc0eef78c4da93cb83bfd1e388df9b16b4 | [] | no_license | rezvaya/DANN | 9d71d5a49cc5304073547d95412f5d75e9413025 | 44548d6c44e6a2717fe0e424035f86f494c8aedb | refs/heads/master | 2022-04-15T01:32:08.719471 | 2020-04-12T17:41:14 | 2020-04-12T17:41:14 | 255,093,500 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,559 | py | Train.py | import torch.nn as nn
from torch.autograd import Function
import torch.utils.data as data
from PIL import Image
import random
import torch.utils.data
import torch.backends.cudnn as cudnn
import torch.optim as optim
from torchvision import datasets
from torchvision import transforms
import numpy as np
from torchvision i... |
d501af42f7e426ba8e9eb1afc78d186880340455 | ae258abff5e5b81ba4848978cb6f8cb00b84a20e | /rest2backbone/resources.py | 43db473f972affe49bf5c49c9ac35a89e1a63a03 | [
"BSD-3-Clause"
] | permissive | kenjimakuda/rest2backbone | 2cf3a8c904297c38d49cce777e5bf7e7ea3188b3 | 439a69ad654213cad73c9c29e166df0df5eea529 | refs/heads/master | 2020-04-28T01:00:32.685135 | 2019-01-05T08:39:05 | 2019-01-05T08:39:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,986 | py | resources.py | '''
Created on Sep 9, 2013
@author: ivan
'''
import six
from rest_framework import serializers, viewsets, permissions, exceptions,\
routers, fields
from django.utils.translation import gettext_lazy as _
from django.db.models import Q
from rest_framework.relations import PrimaryKeyRelatedField
from rest_framework... |
f716f324532f2482832a6de3f0225e3c6a2e2915 | c45a98b314034696bb80402ead4597e8a59bfc2e | /Algorithms/Implementation/SockMerchant/sockMerchant.py | 55a1b95cf0e0a2cbd72a77168fb997cee5905e9b | [] | no_license | enizimus/hackerRank | 722350c1dcdbc1bc76aa5c4c0e28b43f16c253b2 | 801849e1d39320bee68c064021ea7d43a4a517c5 | refs/heads/master | 2021-09-12T12:39:53.049564 | 2018-04-16T18:52:35 | 2018-04-16T18:52:35 | 115,207,516 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 423 | py | sockMerchant.py | #!/bin/python3
import sys
def sockMerchant(n, ar):
pairs = {}
for i in range(0, n):
if ar[i] in pairs:
pairs[ar[i]] += 1;
else:
pairs[ar[i]] = 1
toSell = 0
for value in pairs.items():
toSell += int(value[1] / 2)
return toSell
n = int(input(... |
b39c3bf02310b1934945ec3b5aacee5a3c6634ca | 8ed9296cf14cbd48ad6c6ba977a4eddfb6158ec3 | /src/radiation/cam3/test_crm.py | ad862254caa63d180d180c893cf85f0c3f0d952f | [
"BSD-3-Clause"
] | permissive | JoyMonteiro/CliMT | 51191c8e44eef28057971dd29de8e40c0bd3ef97 | 0949ed3a3a125638072351d7277ae4b956956d35 | refs/heads/master | 2021-04-09T17:45:56.369908 | 2016-10-28T08:32:26 | 2016-10-28T08:32:26 | 28,734,117 | 2 | 0 | null | 2015-01-03T03:45:23 | 2015-01-03T03:45:22 | null | UTF-8 | Python | false | false | 3,786 | py | test_crm.py | #!/usr/bin/env python
# This script compares CliMT's version of NCAR's CRM with the original.
# To do the comparision:
# first build and run CRM out-of-the-box:
# - go to CliMT/src/radiation/ccm3/src/crm-2.1.2-ccm-3.6/bld and build CRM (you may need to modify Makefile)
# - go to ../bin and do ./crm < ../data/mls_clr.i... |
ba3ed9b02e0c90fcec217673e16ee20564439376 | 4dade4f29881e99d8602144744e09ed870bd1034 | /Python/probability/investment_utility.py | 0c8c50ea9725e4c12440ff5fb0eace761d805c0e | [] | no_license | alexbaryzhikov/codebase-archive | 9795347c19a82c098983c6d0fe4959c3162ca868 | c78c189002a26296a552f30078578cc0cf72e426 | refs/heads/master | 2023-02-19T21:54:21.310865 | 2021-01-11T15:47:50 | 2021-01-11T15:47:50 | 106,846,461 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 481 | py | investment_utility.py | from math import log
def Psucc(investment, payoff):
"""Given the investment required and potential payoff,
return the threshold probability of succes.
P * u(payoff - investmet) + (1 - P) * u(-investment) = u(0)"""
return (u(0) - u(-investment))/(u(payoff - investment) - u(-investment))
def u(x):
"... |
06cd3e151494ccd85a20b1d5a6cc1bca9ee2aaf4 | 2df4ffff570b72d1c15bcd217b6ae1087196dce1 | /create_corpus.py | 1a7dcb09624e2e0df67a9321902824e99b3c19ee | [] | no_license | giosal/UNIGE_Master_Thesis | 6fa5f2b969bee2bf386c430afed0132a1ad11120 | c3f48f096ef996f76858d0fcc4d3f90a014c494f | refs/heads/master | 2023-05-01T02:14:42.842363 | 2021-05-23T11:11:30 | 2021-05-23T11:11:30 | 344,776,679 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,045 | py | create_corpus.py | """
Creates a corpus from Wikipedia dump file.
Inspired by:
https://github.com/panyang/Wikipedia_Word2vec/blob/master/v1/process_wiki.py
"""
import sys
import time
from gensim.corpora import WikiCorpus
def make_corpus(in_f, out_f):
"""Convert Wikipedia xml dump file to text corpus"""
output = open(out_f, 'w')
p... |
4f12764c2b2e80aa0ae6e0f10ca83fb6c2940cc0 | 83d43c7b59c5cb5d7e5e793f76a26e588d52ffc2 | /eventex/subscriptions/tests/test_form_subscription.py | 819a967cd378fca3d5e052e5ceef10fb4fcc2036 | [] | no_license | rodrigoddc/wttd | ec548a13fdc5f6d7330daa2ce53b9e3fe3549bc6 | fd5b4587cd3851668be8b85cf519f59c194a631c | refs/heads/master | 2023-03-29T11:02:33.791149 | 2021-03-28T18:05:19 | 2021-03-28T18:05:19 | 342,949,928 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,243 | py | test_form_subscription.py | from django.test import TestCase
from eventex.subscriptions.forms import SubscriptionForm
class SubscriptionFormTest(TestCase):
def test_form_has_fields(self):
""" FORM must have 4 fields """
form = SubscriptionForm()
expected = ['name', 'cpf', 'email', 'phone']
self.assertSequenceEqual(expected, list(form... |
f14efcf1532a58e29b4ed7e23ca4ec7a5cfbd325 | d61e4f9040f3d238c9ddf3b14e0b87e85448c995 | /src/pub_sub_test.py | b5c5dd654ca532265f8b2d3d269cbd9eeba02231 | [] | no_license | JaeseongHan/rospy_experiments | 1ed666c941c9dba83b1c22f1acbf77f2d96c2266 | fba5e9e5b91898a90456977ad3c459dabb2dcc4c | refs/heads/master | 2023-03-16T10:25:36.700279 | 2016-10-28T16:57:41 | 2016-10-28T17:02:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,401 | py | pub_sub_test.py | #!/usr/bin/env python
from functools import partial
from pympler import tracker
from std_msgs.msg import String
import gc
import random
import rospy
import string
import threading
import progressbar
import time
def sub_cb(data, event):
event.set()
def run_test():
objects = []
samples = 100
bar = pr... |
bbf63faf9d5dc1849456486e7810f145e03dd82d | 259797f4528200d9f7cb7990378608983081b6ea | /untitled4.py | 5922a7fa04e0a23b2c2f2f4a8f6ccea81232cb2d | [] | no_license | David147258/codingape | ed0cb5a990d7a902288f9ede0a2b43560807c842 | 553736e4c9daa118b6f383554e4038f620e0a148 | refs/heads/main | 2023-02-25T13:44:21.821631 | 2021-02-05T07:52:10 | 2021-02-05T07:52:10 | 335,184,058 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 217 | py | untitled4.py | # -*- coding: utf-8 -*-
"""
Created on Mon Feb 1 11:35:54 2021
@author: USER
"""
from mcpi.minecraft import Minecraft
mc = Minecraft.create()
x=100.0
y=100.0
z=100.0
print(mc.player.setPos(x,y,z)) |
2300fdb40e96f483029c6ed04f71129e59fbfa81 | 0e4b76798711633f727383f4f4a808ac67b6a62a | /sorting.py | 3d1159bcebf5fb011b60bcb2376f8d88cda9c880 | [] | no_license | imdangodaane/sorting_deck | e4d336044eebbfc03cf02ec182db414138bb196d | c599acf01496c30ba3a18a894de0d0889074a669 | refs/heads/master | 2020-04-04T20:17:10.137989 | 2018-11-10T06:41:35 | 2018-11-10T06:41:35 | 156,240,848 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,710 | py | sorting.py | #!/usr/bin/env python3
import pyglet
import argparse
import time
from math import sqrt
def swap_next(pos, lst):
lst[pos], lst[pos + 1] = lst[pos + 1], lst[pos]
def bubble_sort(lst):
for _ in lst:
for i in range(len(lst) - 1):
if lst[i] > lst[i + 1]:
swap_next(i, lst)
... |
b0304e02087a7303b5f91da5fb99ee3fc4e89675 | 8fe37b4123cfbf7338c1d959591b78a9fa0c27ca | /tools.py | 98bdfa34fde4a3a95297f3ef4cbd0f8440a2d43c | [] | no_license | DenisStark77/biblo-api | 579b4a2b801849c95db51eeb88c32d31d6e8a449 | 1a338e33e32f44b754e980e44dda623fbcb0f01a | refs/heads/master | 2021-06-14T06:04:09.114005 | 2020-07-03T20:50:57 | 2020-07-03T20:50:57 | 254,477,712 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,499 | py | tools.py | import numpy as np
import cv2
import re
from google.cloud import vision
from google.cloud.vision import types
# Instantiates a client
vision_client = vision.ImageAnnotatorClient()
def ocr_url(url):
image = types.Image()
image.source.image_uri = url
return vision_client.document_text_detection(image=ima... |
e7807454b426f8ae3ef97b3b68f7e2e18618fb29 | 457afb0efcc97bf89d078432f73a8171aab204e7 | /backend/Flask Server/app/MaskRCNN/preprocess/parseData.py | a3e1aa8a771e1749b9a8c2774ccc465c52841152 | [] | no_license | BeomJinJeong/Proj_Ottega-Gaeanta | 39360f472b9318f8140ebedfdf4ec027317f1b54 | 85e3a5f057481f37ec434758078b490bd7de37ee | refs/heads/main | 2023-08-21T03:35:10.284776 | 2021-10-31T21:19:37 | 2021-10-31T21:19:37 | 422,614,884 | 0 | 1 | null | 2021-10-31T21:19:38 | 2021-10-29T14:55:39 | null | UTF-8 | Python | false | false | 995 | py | parseData.py | import json
import os
import numpy as np
train="./annotations/instances_train.json"
val="./annotations/instances_val.json"
imagaNames = os.listdir("./images")
trainList=[]
valList=[]
def getImgName(trainData):
temp=[]
for raw in trainData["images"]:
temp.append(raw["file_name"])
return temp
w... |
6fdb5b9243243b4d9e3044ee97cf6efacf0e8864 | dd814f1fb06f8b761e6ffa22b4998f3d88b9a94a | /twitter_app/api/admin.py | b415aed30458f7cc57461bbd8e098a4d81963821 | [] | no_license | kethanchauhan/innovaccer_twitter_api | 81badbacc22dd1f64ddc85c5ad171ec6334840c8 | c16d75fe7b2c514dacea0d068478ef4f894a28bc | refs/heads/master | 2022-12-15T03:48:37.190790 | 2018-02-25T10:28:54 | 2018-02-25T10:28:54 | 122,824,436 | 0 | 0 | null | 2022-12-08T00:55:18 | 2018-02-25T10:05:35 | Python | UTF-8 | Python | false | false | 119 | py | admin.py | from django.contrib import admin
from api.models import Tweet
admin.site.register(Tweet)
# Register your models here.
|
7a7eb9932e416ec77aa24afd0d050b9d98075ee5 | 4364068bae1b96f023b29df319fafc570ef82eae | /imboclient/url/url.py | 1d4a39e8f642fa80ebdb21af72e7da2b3d2d79ce | [
"MIT"
] | permissive | andreasrs/imboclient-python | a89a7a47a112ee9b82b251bad47ee64f776e1804 | b9f26ed2d5fc918058f188a15fa22fb314ea8280 | refs/heads/master | 2021-01-16T18:42:55.086673 | 2015-05-27T11:04:40 | 2015-05-27T11:04:40 | 36,119,066 | 0 | 0 | null | 2015-05-23T10:52:57 | 2015-05-23T10:52:56 | null | UTF-8 | Python | false | false | 1,872 | py | url.py | from imboclient.url import accesstoken
import urllib.parse
import json
class Url(object):
def __init__(self, base_url, public_key, private_key):
self._base_url = base_url
self._public_key = public_key
self._private_key = private_key
self._query_params = None
def __str__(self):
... |
3a6c25e6364c6ab8a0d493f835d0bb3fc77992d3 | fd40107bb4afda344300329e4a0168a5d3a0dcd1 | /sgmcmc/bnn/acquisition.py | 44fa3ecacd36c148e363da50f6442e90ebcb4e86 | [] | no_license | automl/sgmcmc | 27f8b469e8d3fe8714291b6c9f3cf617a6ab9d65 | 37f82137422a91888e13d601da1e5556af9c0b61 | refs/heads/master | 2023-05-31T11:34:04.305823 | 2018-07-25T08:53:13 | 2018-07-25T08:53:13 | 141,105,264 | 2 | 1 | null | 2018-07-16T07:53:41 | 2018-07-16T07:53:41 | null | UTF-8 | Python | false | false | 5,547 | py | acquisition.py | import theano
import theano.tensor as T
import lasagne
from ..utils import *
PI = T.cast(np.pi, theano.config.floatX)
SQRT2 = T.cast(np.sqrt(2), theano.config.floatX)
epsilon = T.cast(1e-10, theano.config.floatX)
def pdf(sample, location=0, var=1):
z = 0.5 * ((sample - location) ** 2) / var
return T.exp(-z) ... |
a630e5784abddd83050408d1d5188623e58df983 | 4539a0ebe6cea0f22759f4ff7aceef11f52c2cb8 | /constants_maze.py | 5df1fdc625de60bd3d3e7e6ce437f6df71b02f8d | [] | no_license | AaiBi/MacGyver | 4cfb3e2262268787d709911a5a276dd0c8b7aafa | eb8369352b76f49e1aa1842a0437a9060a592da7 | refs/heads/master | 2022-12-10T22:25:49.476155 | 2020-09-22T21:01:09 | 2020-09-22T21:01:09 | 284,871,960 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 619 | py | constants_maze.py | """Constants of the maze game"""
# window settings
NUMBER_SPRITES_SIDE = 15
SPRITE_SIZE = 30
WINDOW_SIZE = NUMBER_SPRITES_SIDE * SPRITE_SIZE
# window personalization
WINDOW_TITLE = "MacGyver"
# game image lists
MACGYVER_IMAGE = "ressource/MacGyver.png"
HOME_IMAGE = "ressource/home.png"
BACKGROUND_IMAGE = "ressource/... |
eb9a8d72e42ab0777824f9697e43bdc1b9f09c58 | bd7fb18654f769e8fd8c77c74404b5e08160d497 | /find_prok_rbs.py | 4c079d33dd19e1ee83233308bc7dd834f409f0db | [] | no_license | louiejtaylor/find-prok-rbs | f3f0f1e583b44320bdfaa5170619202f08e2ff39 | 41d0a9db7749c754d92c3103c2fc8058bbac0c4d | refs/heads/master | 2020-04-04T12:03:49.732762 | 2019-01-15T19:16:08 | 2019-01-15T19:16:08 | 155,912,751 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,073 | py | find_prok_rbs.py | # Script to analyze viral genome .gb to reproduce Krishnamurthy et al and extend to Redondoviruses. Writes in .csv format to stdout
# Louis Taylor
# 2018-09-28
# Viral genomes downloaded from RefSeq on 2018-09-28
# Search key (generated by NCBI):
# "Viruses"[Organism] NOT "cellular organisms"[Organism] NOT wgs[PROP... |
eef783a93b18b63b4322f1c8c12cffe92c30c7e0 | ac9771dd8eab1b7f48aed848c1f759df1331c9f2 | /config.py | 5047986a5fe9dddcab1806959dd5c02d35bc60e6 | [] | no_license | c-or/flask_test | 3b10f14bbb51e9d3f008585635812434d6702ea5 | 41190c5b92d308cd86086b7a8ee93fd7b515f48b | refs/heads/master | 2023-08-19T13:05:36.511858 | 2021-10-15T09:24:37 | 2021-10-15T09:24:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 617 | py | config.py | import os
CSRF_ENABLED = True
SECRET_KEY = 'you-will-never-guess'
OPENID_PROVIDERS = [
{ 'name': 'Google', 'url': 'https://www.google.com/accounts/o8/id' },
{ 'name': 'Yahoo', 'url': 'https://me.yahoo.com' },
{ 'name': 'AOL', 'url': 'http://openid.aol.com/<username>' },
{ 'name': 'Flickr', 'url': 'http... |
3e99b600467e7da1799ab89a4535e3e884dfb989 | 6b29dbfe527d9e1950d53fde913e05e2a58758ab | /server/tasks/audit.py | 4636242d6ec23e9f90c0bdf2aab0924f19601a23 | [
"Apache-2.0"
] | permissive | parijatsahai/camcops | d7b2843b77bedee87b8298138bc8a33fe66c5178 | 09c7000060b546ad22b908e4245b1ff02940dd63 | refs/heads/master | 2021-01-21T09:20:43.670032 | 2015-07-02T15:42:59 | 2015-07-02T15:42:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,780 | py | audit.py | #!/usr/bin/python2.7
# -*- encoding: utf8 -*-
"""
Copyright (C) 2012-2015 Rudolf Cardinal (rudolf@pobox.com).
Department of Psychiatry, University of Cambridge.
Funded by the Wellcome Trust.
This file is part of CamCOPS.
Licensed under the Apache License, Version 2.0 (the "License");
you may ... |