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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
52504666ca928e0a8abcf50a58a0b9576d16e3db | 4d1a546ca7fbb40bd6e320ada8fe1a1b0f34acf1 | /setup.py | 4cda1b3b9b223ff7752fd8a647a2a2705417ea9c | [] | no_license | elunico/CSVTea | 6e58f15ff1dec31407fe0e15d233aa8ea16cbf4e | a30aebd544fa27ef685b1f07e6edee213454c034 | refs/heads/master | 2023-06-07T09:18:49.704058 | 2021-07-03T04:48:18 | 2021-07-03T04:48:18 | 381,203,360 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 735 | py | setup.py | import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="csvtea-elunico",
version="3.0.2",
author="Thomas Povinelli",
author_email="tompov227@gmail.com",
description="A flexible, extensible, pluggable, slightly-out-of-spec CSV ... |
3f830ef08c2792757fbe19a741977fa0fe328a35 | 87fa69e74149db635c1d29139aa90b970470a3c4 | /server/server.py | e626dad73dcaf569dfc4e4de772e7c8113c4859c | [] | no_license | linamiladinova/Socket-Python | ab338bbfab609744fb0ab7221338f44d8c09cf74 | 95dc642d69915a1efa5f9b73a7046cef3c803c0c | refs/heads/main | 2023-06-05T02:09:18.395263 | 2021-06-21T07:59:48 | 2021-06-21T07:59:48 | 378,654,521 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,077 | py | server.py | import socket
import os
from _thread import *
import threading
ServerSocket = socket.socket()
host = '130.204.10.84'
port = 6666
ThreadCount = 0
try:
ServerSocket.bind((host, port))
except socket.error as e:
print(str(e))
print('Waitiing for a Connection..')
ServerSocket.listen(5)
global clients
clients = se... |
77bcf01f2ba8524471862443fa993a6e5793d61f | 92a7f8f32d0948e83cd957456838ab74c3e32476 | /main.py | 128b81bd69d996e591bb6d79c866677bd43bd31a | [] | no_license | MsKay101/blogz | 9f760fb142669406342830136b37572c4fdb25c2 | 23e0cdd6126d7555f78a6822b03a454d79b11da8 | refs/heads/master | 2020-05-18T21:56:17.364612 | 2019-05-10T08:27:36 | 2019-05-10T08:27:36 | 184,676,798 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,114 | py | main.py | from flask import Flask, request, redirect, render_template, session
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__)
app.config['DEBUG'] = True
app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql+pymysql://blogz:password@localhost:8889/blogz'
app.config['SQLALCHEMY_ECHO'] = True
db = SQLAlchemy(app)
class B... |
a654889227d889e2e55311143a969fa8130cdf0c | 0b0bd0bb84b67fdfcab78b42e5f01c11c1a0b996 | /src/main.py | 3bbe191409744fd3a5fa478d8d465de9c5275d19 | [] | no_license | zachkendrick/COS429_Final_Project | b0ef8d9aa20debb4f61bc8d544b5263b08076a07 | 4bb0de52c1ac92c629ffbb07fda1b8d1d262cadd | refs/heads/master | 2021-01-12T08:43:00.207427 | 2017-01-14T04:50:42 | 2017-01-14T04:50:42 | 76,673,957 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 6,268 | py | main.py | """
Authors: Zachary Kendrick, Chloe Song, Katy Ho
Class: Princeton University COS429
Project: Augmented Reality
This file provides the primary functionality for the AR
project. It initializes a video capture sequence that takes
in a USB port as a parameter. Port 0 should be the port
for most forward facing c... |
59cefaf3783a033cdbabbd49ae7b1dd7e4650409 | c2781975109506f40d6ce1d5e2f3ae9c52fce592 | /django2/automaty/apps.py | 8c0f44836a314dd0db6074fc82b7723071ef4b3a | [] | no_license | duch1234/HelloWorld | dc3caef591c57621c2f1a3f301674d547785c4d5 | 2527555bb7a0b593c860b7f2dd0b03ea0b85131f | refs/heads/master | 2021-01-11T18:31:00.918646 | 2017-02-01T19:46:46 | 2017-02-01T19:46:46 | 79,558,792 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 132 | py | apps.py | from __future__ import unicode_literals
from django.apps import AppConfig
class AutomatyConfig(AppConfig):
name = 'automaty'
|
9c598055498397e71f421d16ee3b88d3cc5f6b1b | 61cd805bb2ab1895609f690bf7ef1a8b97940688 | /data_augmentation_with_graph_features.py | a8fb86161eed73654052eba311ad9707054b7303 | [] | no_license | wangsuiche/Question-Pairs-Matching | ad3e97d91d56ebaa697072c1f0dae0191f0b2d7b | db4d1e93120945d1dde06f1ff4836e91318d2168 | refs/heads/master | 2020-04-25T19:22:55.504706 | 2019-02-28T02:20:17 | 2019-02-28T02:20:17 | 173,018,164 | 0 | 0 | null | 2019-02-28T01:25:54 | 2019-02-28T01:25:54 | null | UTF-8 | Python | false | false | 4,645 | py | data_augmentation_with_graph_features.py | '''
利用图特征来做数据增强:获取更多的训练数据
数据增强原则:
(1)如果q1,q2相似,且q1,q2在同一个连通图,则连通图的问题都相似
—— 利用connected components得到
—— 组合后一共3796821个问题对,太多了
—— 我们取 1<graph_distance<5 的问题对 (之所以要大于1,是因为等于1的是从训练数据来的)
(2)如果q1, q2不相似,且存在连通图cc1包含q1,和cc2包含q2,则cc1和cc2的任意组合均不相似
—— 利用independent groups得到
—— 注意一共有119475717个,太多了!!! 限... |
1e23917088002d0c48cc90c8e9a94b2c957d5e03 | 8800895962f53d771bef8f13080ee5274a50e567 | /wsgi/openshift/minesweep/views.py | 62c42fd4b1eccf4b925ccd0fdf524969c5d12074 | [
"MIT"
] | permissive | snocorp/meansweep | 3b45da25a1c83a8f8f49ba39ed72a6dca4afffc6 | a4c04ecc16c38f142b0b5d27977755ed6b8a3670 | refs/heads/master | 2021-01-10T19:37:38.621325 | 2015-09-28T02:25:45 | 2015-09-28T02:25:45 | 19,413,546 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,577 | py | views.py | from django.http import HttpResponse
from django.utils import timezone
import datetime
import json
import random
import logging
import logging.handlers
from minesweep.models import Field, Grid
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(asctime)s - %(name)s - ... |
e5c2a98b20e9583daf4915809047709630cbdb94 | 7428933f6a5ae1af58f65d2a5ceff72a8810ee9e | /apps/users/views.py | 2837da34607c616a6228f9ed1ad8d2df840661a2 | [] | no_license | ADITYA-RAY/RobotixWeb21 | ad9aaf7628e7960a840c1cf21a4c746d71212e55 | ffc590cda1d1cd66eae9fa1a825be5422f9d8991 | refs/heads/master | 2023-08-31T15:37:02.553912 | 2021-09-27T14:10:44 | 2021-09-27T14:10:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,875 | py | views.py | from django.shortcuts import render
from django.contrib.auth import authenticate
from rest_framework import viewsets, permissions, generics, status, views
from rest_framework.response import Response
from rest_framework_simplejwt.tokens import AccessToken
from rest_framework.permissions import IsAuthenticated
from .uti... |
0c50b35ad7fe9e61cc8632521c38ad1a3d3a381c | 45ad0f9f92fbab247d2d924df505c9342531486b | /ANCAdmin/urls.py | cd6f5a5fd398d30198141e1cd7b3130bc3e5b137 | [] | no_license | Horbarz/ancAdminPanel | 7b5f27890277594d45f9209ffa5ffb53dd4d0b75 | e52aa2150aba04298f3fdb8c1c2b14374795e3f6 | refs/heads/master | 2020-07-28T12:08:52.317535 | 2020-01-10T11:49:18 | 2020-01-10T11:49:18 | 209,405,563 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,230 | py | urls.py | """ANCAdmin URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-base... |
4c0cc0cb7a5a31f1b90243db78fa21da9dc64c7e | 1dcc9a23cc38ffe0438d5bc6b4c62977595d1028 | /code/model/gica.py | c4429dfa52f3080e60e60802cde7c9262f5837fd | [] | no_license | hejiaz/multi_srm | cf01373bf62cdfd7e5d927478b10dd142b22ef13 | 75c96112c2367df6b7ea77393927de148f062302 | refs/heads/master | 2021-06-19T14:13:07.221704 | 2017-05-20T15:51:30 | 2017-05-20T15:51:30 | 88,994,030 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,207 | py | gica.py | #!/usr/bin/env python
# Group ICA for multisubject fMRI data alignment
# data is a list, but each subject must have the same number of voxels
import numpy as np
import scipy, math
from .sklearnica import FastICA
from collections import deque
from sklearn.utils.extmath import randomized_svd as svd
from sklearn.utils.e... |
cde928747f36390b6a5175f690f975cd3735a709 | 3b331932c084924652c80866da990d9cb7b9e1f2 | /Prelab05/.svn/text-base/text_utils.py.svn-base | bdb23ef39fdca5acc19b25a0a77f9b20f034bd52 | [] | no_license | herozhao/Python-Learning | 50d9e3a866fdb95e918b53429825175aa52b8e80 | 79666a31b14714f39ae6904272eb2637392e86e5 | refs/heads/master | 2020-05-14T13:26:44.803921 | 2018-12-10T20:41:00 | 2018-12-10T20:41:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,013 | text_utils.py.svn-base | from collections import namedtuple,OrderedDict
WordPosition = namedtuple('WordPosition','word idx')
def get_distinct_words(words):
a = []
for b in words:
if b not in a:
a.append(b)
yield b
def get_first_appearances(words):
b = []
i=0
for word in words:
if word... | |
02deb6cc7ba351c8003575029aa9ebaf629e5a5a | 098f97502e1a8fc3057560e0f55971bd60378d8f | /BasicKnowledge/test_20180804.py | 4d48858a9f8a30fe094a7941ee243d572cfd0f6c | [] | no_license | dyfloveslife/SolveRealProblemsWithPython | 3f08b2dcb19dfbdfb6e88841ccea240c3486325d | 57a20129bb6c7488906725373c56bb9d1ac6f387 | refs/heads/master | 2020-03-21T07:06:01.960574 | 2019-11-18T03:07:53 | 2019-11-18T03:07:53 | 138,260,433 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 978 | py | test_20180804.py | # a = [i ** 2 for i in range(1, 10)]
# k = [n for n in range(1, 10) if n % 2 == 0]
# z = [letter.lower() for letter in 'ABCD']
# d = {i: i + 1 for i in range(4)}
# g1 = {i: j for i, j in zip(range(1, 6), 'abcde')}
# g2 = {i: j.upper() for i, j in zip(range(1, 6), 'abcde')}
# letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g'... |
580bee4cfeed247ba86ea4c90f88fb4a3109b994 | 75cf213f833aa517f0c2be67e9457ed0effb7a67 | /20_Aug_2019/Pandas/Gender.py | 68b7207c6d9b0a08c1d14e06e24c4b694da0edef | [] | no_license | AbhiGupta06/Machine_Learling_with-Python | ae6947ca66672c8851ec4de3dde7451c008bad70 | ca3d6f5701483d3f94eb6b0e28b08510eb4743a7 | refs/heads/master | 2020-07-18T17:51:09.516393 | 2019-09-25T05:20:03 | 2019-09-25T05:20:03 | 206,287,365 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 282 | py | Gender.py | # -*- coding: utf-8 -*-
"""
Created on Tue Aug 20 15:11:58 2019
@author: BSDU
"""
import pandas as pd
data = {'Gender': ['f', 'f', 'm'], 'Emp_id': ['2001', '2002', '2003' ], 'Age' :[10,20,30]}
df = pd.DataFrame(data,columns = ['Emp_id', 'Gender', 'Age'])
print(df) |
9e85d74be0615f3867597170b2a17acf6ebf856b | f176ae8fcd2d514b40a616963735e269d0300d68 | /connect_img.py | c991e694f20d7eb07fefbff477432a70f5942da1 | [] | no_license | zu00423828/my_Tracknet_and_Trajectory-Analysis | a050da0bde08c213683df6d0cd999e8093c1f259 | 7fbf295302aa911bc15ff90cac27c2080aab276b | refs/heads/master | 2023-03-25T16:44:18.856953 | 2021-03-22T13:00:31 | 2021-03-22T13:00:31 | 350,343,313 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,774 | py | connect_img.py | import numpy as np
import cv2
#上方圖片合成
img1 = np.zeros((320,1280,3), np.uint8)
img1.fill(50)#黑底
#img1.fill(255)#白底
#cv2.seamlessClone(src, dst, mask, center, flags) 合併在圖檔中
#src 目標 , dst 背景, mask 目標位置, center 產生位置, flags
#选择融合的方式,目前有NORMAL_CLONE、MIXED_CLONE和MONOCHROME_TRANSFER三种方法
center=((1050,250),(1050,50... |
cbeb1f1ebdb4a7d6b205e45e8380cf4e054be6b3 | e774cf5a7b99db6113a996afa1e2eb3c5582032d | /file-renamer/file-renamer.py | 4da066376bddbc4420d6723e633e4d8f4fcb5d0f | [] | no_license | LRS4/python-automation | e86e0451a71c4c19048637a78d15fa4436facd98 | f4534d068e91e868d960389a761a52bd003a6664 | refs/heads/master | 2022-12-06T06:37:31.884129 | 2021-11-10T12:23:49 | 2021-11-10T12:23:49 | 193,134,438 | 1 | 1 | null | 2022-11-22T04:59:11 | 2019-06-21T17:09:20 | Python | UTF-8 | Python | false | false | 840 | py | file-renamer.py | import os
def rename_files_in_directory():
path = r"C:/Users/test/Documents"
replacements = ["_dualforecast", "_narrative", "_pf1", "_summary", "_txn"]
search_terms = ["CLAIM", "NARRATIVE", "PF1", "SUMMARY", "Txn"]
os.chdir(path)
count = 0
i = 0
for file in os.listdir():
... |
459b73f8ddd9fb168e7ddfbc86e5a5c8a26e7011 | 68a5fab2dd617f7bb9e8587cbf3b77b6c5470a9f | /models/simple_AE.py | 344bdf5d4b02891c9f29a2ccdccb41eafdff2e31 | [] | no_license | mslovett21/gantt_charts_final | cede54131942c263885a3383e9717e4ee76c848f | cacfbe3d88144fe8cfb96f83b96ee50daee2b288 | refs/heads/main | 2023-08-25T03:52:23.080964 | 2021-10-07T18:55:38 | 2021-10-07T18:55:38 | 401,943,599 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,638 | py | simple_AE.py | import torch
from torch import nn
from torch import optim
import torch.nn.functional as F
from torchvision import datasets, transforms, models
class Encoder(nn.Module):
def __init__(self,deep_layer, shallow_layer, z_emb_size, features, var_stride):
super().__init__()
self.net = nn.Sequential(
... |
8d0b3950d7fbeffae09971e557e8e964037a4085 | b94542818f13557a6f65b9f77494b79d4eed987d | /Contents/Code/sitePuba.py | c7382c6c81a8af05a4c805ca819d6dad460863f0 | [] | no_license | PAhelper/PhoenixAdult.bundle | aeb74e7c24e9f8def4870b8cb0089cf6ce05afcc | 2703bf712c998367f2b4e8da4c99fd7df59dd2ea | refs/heads/master | 2023-08-23T23:51:51.673913 | 2023-08-18T06:51:32 | 2023-08-18T06:51:32 | 159,734,129 | 392 | 301 | null | 2023-09-14T01:31:26 | 2018-11-29T22:12:43 | Python | UTF-8 | Python | false | false | 4,076 | py | sitePuba.py | import PAsearchSites
import PAutils
def search(results, lang, siteNum, searchData):
sceneID = searchData.title.split(' ', 1)[0]
if unicode(sceneID, 'UTF-8').isdigit():
searchData.title = searchData.title.replace(sceneID, '', 1).strip()
else:
sceneID = None
searchResults = []
if sc... |
75aa8b4cd4a972ee0331117ed57ec4e0c21067bb | 247031b6bc0a1a4da14649ca73104a482e081353 | /webgame/controller/APIController.py | 1bfa2beac765c85a3e5afbfda13ad8e0aac342f4 | [
"Apache-2.0"
] | permissive | xiaojieluo/webgame | 5a136e3d30051ca509e03f306123d862795d7722 | c1e10550ca7a400bd55277de8844348f61f231d3 | refs/heads/master | 2021-07-17T22:06:49.623362 | 2017-10-25T03:44:39 | 2017-10-25T03:44:39 | 107,995,760 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 145 | py | APIController.py | from .BaseController import BaseController
class index(BaseController):
def get(self, requests):
return self.text("This is api v1")
|
f6570b406d2c01dd1463b6dd172e8bab29cb6a5d | 88f9c2bdc5d1d9c800ac04d0756c1016985a4234 | /pgcomments/migrations/0002_create_functions.py | 17a2eea5846369f614288b50deb702b33ae82d59 | [
"BSD-2-Clause"
] | permissive | ihabhussein/django-pgcomments | 92c0d9cdfd4625b41525b4f6fd7630c25ada6e6d | 5463fb52086e486eb48ba85aca20ae043833b80c | refs/heads/master | 2021-08-16T13:04:40.354824 | 2020-03-25T08:03:58 | 2020-03-25T08:03:58 | 134,983,584 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,105 | py | 0002_create_functions.py | FUNCTIONS = [
("pgcomments_add_comment (integer, integer[], text, text)", "void", "SQL", """
WITH X AS (
SELECT '{' || array_to_string(array_append($2, NULL), ',children,', '') || '-1}' AS path,
jsonb_build_object('author', $3, 'text', $4, 'created_at', now(), 'children', '[]'... |
328b8e2335135f16827a44348a8dabf1a83b6762 | f967e3d4ca36f3b9c74efea79ded8675aba5c8ed | /impl/predict.py | 04e3307af9e430d40d51128bed09252218546734 | [] | no_license | nataemi/titanic_survival | 82cb53e61c31592a420560930304c8e3f24eb506 | 492fb20c6528e7f48aaac7952829d7ea24f2b901 | refs/heads/master | 2023-03-06T11:12:24.554833 | 2021-02-14T16:51:16 | 2021-02-14T16:51:16 | 338,441,974 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,130 | py | predict.py | import json
import numpy as np
from tensorflow.python.keras.models import model_from_json
sexMap = {
'M' : 1,
'F' : 0
}
class Predict:
def __init__(self):
with open('model/model.json', 'r') as infile:
self.model = model_from_json(json.load(infile))
def predict(self, userinput):
... |
96d1c5480d1bc673cee9e6bb6a289f3252c734aa | 89f9c730074927b6492cb516f2011fae60b294cf | /spelling_modules_testing.py | fc8b0cc1bddb5a61c94d3e7e4b45d8b3a2d0deab | [] | no_license | daniel-li-djl87/cicada_query_correction | dc26cb0d165fc9c9803b103b63c28e36b06bd73f | 99fcdc8e7f748c77744b0d78e9ed1c3b77a88c3e | refs/heads/master | 2023-06-21T19:37:05.171030 | 2021-07-14T18:27:34 | 2021-07-14T18:27:34 | 383,550,504 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,613 | py | spelling_modules_testing.py |
import nlpaug.augmenter.char as nac
import nlpaug.augmenter.word as naw
import nlpaug.augmenter.sentence as nas
from collections import defaultdict
import json
import pkg_resources
from symspellpy import SymSpell, Verbosity
from spellchecker import SpellChecker
from textblob import TextBlob
import re
# 1.) parse jso... |
102181a2a6fde573bae49eb93cd79e7c8695beb8 | 5f99ef204a110f55963af34030d6fc1e4cf1b780 | /src/fairy.py | 81fbb0194c524a842c0d74e1b1b6644134ecc348 | [] | no_license | HaowenLee/cartoon_ee | fb998c0cc637f43ce1e7bf7e53801e0a24b92b89 | 7ddb6b01af410a5973603de9954f3e18a46f70e4 | refs/heads/master | 2020-12-04T12:42:07.601390 | 2020-01-04T13:31:01 | 2020-01-04T13:31:01 | 231,768,547 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,980 | py | fairy.py | import base64
from urllib import parse
from Crypto.Cipher import AES
import requests
from contextlib import closing
import src.keys as keys
import json
headers = {
"User-Agent": "Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0; HTC; Titan)"
}
# 解密后,去掉补足的空格用strip()去掉
def decryp... |
596a8623f229c3b536e251b26ced0e1c8785efdc | 1664888d5f951065adab919afd7c9eeeed64da4d | /tests/testing_utils.py | 8d577b7cd67d661af9062216852c9171413d7e08 | [] | no_license | VladimirZorin1986/password_manager | f1a10212890824f39cecab0422c81bcf7ce17690 | 1ff7fb2a9ed0f8ae0d4bd90fb38962a0a773d3a6 | refs/heads/main | 2023-04-15T14:59:35.854033 | 2021-04-28T13:22:40 | 2021-04-28T13:22:40 | 360,927,921 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 999 | py | testing_utils.py | import unittest
from src.utils import *
class UtilsTest(unittest.TestCase):
@classmethod
def setUpClass(cls) -> None:
cls.password = create_password()
def test_create_password(self) -> None:
self.assertEqual(len(self.password), 10)
self.assertRegex(self.password, r'[0-9a-zA-z]{10}... |
3a9d619ebeaf2972556812930f273f8905155319 | 416108a9e20635b36f8e82de4ea3aaed00d9a3e7 | /applications/telapi/scenario_callout_answer.py | 1fbd22c07297a6562f1b3273c5cd77472757c8a7 | [] | no_license | annoviko/sandbox | b2cfb11ce24bb477a188e1cc5f71a92835ff1b91 | bc9d89f4b37984ffa052a252639e6535fb88a308 | refs/heads/master | 2023-08-30T23:43:12.940520 | 2023-08-19T11:20:10 | 2023-08-19T11:20:10 | 72,368,789 | 6 | 0 | null | null | null | null | UTF-8 | Python | false | false | 796 | py | scenario_callout_answer.py | import time
from telapi import tas_api
from database import db
api_caller = tas_api(db.phone2.accountId, db.phone2.mailboxId)
api_callee = tas_api(db.phone1.accountId, db.phone1.mailboxId)
session_id, caller_party_id = api_caller.callout(db.phone2.deviceId, db.phone1.number, assertion=True)
callee_party_i... |
ed470d87c2f7559e32fa057f5c1616f36770d3a2 | 14de475589567c4ae6e65e70be6b4ee6a702ea12 | /test/test_helpers.py | 102d6cd36185b6b3d7b407fa0cceb808eccdf78d | [
"MIT"
] | permissive | HIIT/hybra-core | 7924305b399962e53021eaf849a6dac2fe1da466 | 39257fe35bbafb8d1d7ab52a0701ec50db80b00f | refs/heads/master | 2021-01-20T01:59:16.646782 | 2020-02-19T16:23:57 | 2020-02-19T16:23:57 | 89,355,138 | 2 | 1 | MIT | 2018-05-18T15:58:56 | 2017-04-25T11:56:19 | Python | UTF-8 | Python | false | false | 10,155 | py | test_helpers.py | # coding=UTF8
import pytest
from hybra import core
import datetime
import os
from helpers import filters
from helpers import counters
from helpers import urls
from helpers import exporter
class TestTextFilter:
def setup(self):
self.dataMedia = core.data('news', folder='', terms=['yle.json'])
s... |
0d1fcee43ca1c47068cf2ee6b9d7203919740abf | 59f72c993638b0d662dde25d89b5b432ca79b507 | /back/products/migrations/0002_auto_20170830_1404.py | fa6037f28dd7246857d284acef2a3e1183e6b03b | [
"MIT"
] | permissive | drf-forms/ember_sample | 8f3db5ad35aadbda582ea3013df97e5866b7daa3 | 7c31f889afe241bedacb98353e7d85634642367d | refs/heads/master | 2021-04-28T23:16:34.437427 | 2018-05-07T12:59:19 | 2018-05-07T15:05:21 | 77,737,913 | 9 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,304 | py | 0002_auto_20170830_1404.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-08-30 14:04
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('products', '0001_initial'),
]
operations = [
migrations.AddField(
... |
cb5a649c65aae69487baaa64c419d8aa5675638b | 5201e237c0d58cdfdbc2fdf8103f9141161eb9f8 | /itkLabelMapOverlayImageFilterPython.pyi | 770fd093c94cb0df96b9feced0c495a4dd5c4212 | [] | no_license | hjmjohnson/itk-stubs | 704f5b92a755e55b81d02fcad62a366143e125f3 | 771951d007ae425b758e088eae6f9e4ca0e4afb1 | refs/heads/main | 2023-01-22T05:50:33.649088 | 2020-12-04T01:31:09 | 2020-12-04T01:35:06 | 318,368,028 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,813 | pyi | itkLabelMapOverlayImageFilterPython.pyi | import itk.itkImageToImageFilterCommonPython
from itk.support import itkHelpers as itkHelpers
from typing import Any
class _SwigNonDynamicMeta(type):
__setattr__: Any = ...
def itkLabelMapOverlayImageFilterLM2IUC2IRGBUC2_New(): ...
class itkLabelMapOverlayImageFilterLM2IUC2IRGBUC2(itk.itkLabelMapFilterPython.itk... |
b943804a1cc2f10d467027ee71f9f6c6de4395a4 | d3285d417eee873c7569d24243294a19a6b20e85 | /Code/Basura/LonLat_ML_variables.py | 05844cecf9b4ddb567b15da4914fbb2dd022e0d7 | [] | no_license | juandag97/DS4A-Project | 27756341f39467efddedee52f97d3d046200fc13 | b0a3dba431d3b0d9b2371c9a6dc49b1443593e65 | refs/heads/master | 2023-07-28T05:36:47.106157 | 2021-09-04T22:00:38 | 2021-09-04T22:00:38 | 372,054,900 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,991 | py | LonLat_ML_variables.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Benjamin Leon - DS4A cohort 5
"""
Script generates folium html map with markers on meteorology station locations
Coordinate list may be updated to include more stations
Data from LocationYearAverage creates data per year per station for custom heatmap
"""
import ... |
939ab00f061bb640790b96dd85de9465a593b4c3 | 49afba2b0fbba15056d9dc96ad823d2dd0527e4e | /ApkTest/ApkTest.py | 11972947844d6d55b77e662e133f7674b4a3c156 | [] | no_license | AnikiKun/MonkeyRunner_ApkTest | 25231c3f4fca1fb255eed9f1fd9bcb715742d038 | 99adccad6cf9615883c1f2f16f77240930d8b1d9 | refs/heads/master | 2021-01-10T21:36:58.158333 | 2014-05-23T15:58:15 | 2014-05-23T15:58:15 | 20,104,892 | 29 | 20 | null | null | null | null | UTF-8 | Python | false | false | 2,547 | py | ApkTest.py | #!/usr/bin/env monkeyrunner
# -*- coding: utf-8 -*-
import time
import sys
import os
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice, MonkeyImage
#设置应用包名和入口Activity名
pakageName = 'com.hujiang.cctalk'
componentName = 'com.hujiang.cctalk/.MainActivity'
#APP启动时等待时间(秒)
startTime = 5
#获取年月日时分秒
now = time... |
ba70b6c632acaf483fe5b8c767a9ddf55b2b8d14 | 93ab27e6262948954f7ba7bb0065871de30092f9 | /my_portfolio/app_portfolio/views.py | f8d0ef6a446ee39142d2cb9716f68d56ba05fc46 | [] | no_license | iamMahmudul/portfolio-MHR | f331a634f399d0c6c4f945e605a2a3cfe48bb592 | ccdc26352e33ed36b7b171f8f98c54ec5bbfcaf5 | refs/heads/main | 2023-03-08T07:06:10.132823 | 2021-02-22T15:06:31 | 2021-02-22T15:06:31 | 340,588,761 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 448 | py | views.py | from django.shortcuts import render
# Create your views here.
def home(request):
return render(request,'home.html')
def education(request):
return render(request, 'education.html')
def skills(request):
return render(request, 'skills.html')
def projects(request):
return render(request, 'projects.html... |
5f06320ea1348040f92e9b3d949bae91e0e5f7a1 | deb08f802e3fdfbe9e1918ff12cc755cbd2a679f | /2_CH/Keyword.py | 746a45836ddb422b186b3a26e7470b24f7240581 | [] | no_license | t-a-y-l-o-r/Effective_Python | b6cf9d197664b64635f131fab503494387b13257 | 84ac7b1fb3e3a8ce7c64b865f7e5fbfb03159368 | refs/heads/master | 2021-01-24T19:38:43.985278 | 2018-03-22T23:24:33 | 2018-03-22T23:24:33 | 123,243,530 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,397 | py | Keyword.py | '''
Author: Taylor Cochran
Book: Effective Python
Ch: 2
goal: Enforce clarity with Keyword-only arguments
'''
# division that ignores errors
# requires the user to remember the position of each argument
# possibly resulting in sublte bugs down the line
def safe_division(number, divisior, ignore_overflow, ignore_zer... |
4c550c3f582d4c90da759e7eddda10cd6d2fdd77 | ccdab7f9bdb52e2a2fd2a65e8613adfd36d40e80 | /Email.py | 0ab8ac379c5e26594dbc37343823b03a24f30242 | [] | no_license | bleach1425/Project | 6c12036a920ac806512b74a3a73bb115f138af0f | 00b33e46a5a58c845af2250f3369f8980c434e7b | refs/heads/main | 2023-02-09T03:56:31.476475 | 2020-12-29T07:11:32 | 2020-12-29T07:11:32 | 317,485,868 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,050 | py | Email.py | # #!/usr/bin/python
# # -*- coding: UTF-8 -*-
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
import json
import pandas as pd
from datetime import datetime
already_list=[]
already = pd.read_json('XXX.json', encoding='utf-8')
for n in already.iloc:
already_list.ap... |
f68bb82da49ad9cb95b9012e2a64c6c09fb2f443 | 8bbe0f2dc59630b04c542dea40ebc96068e50a95 | /panop/apps/loader/admin.py | 98380a480bde4872505470fe39d8c8ca14bed49a | [] | no_license | sysras0000/panop | 2cbaab6720fe4c5d45c4ae85eba193195860fb01 | 6024ffdf772e274e49ec548d4318a1287b10c8a7 | refs/heads/master | 2020-03-11T16:32:04.632684 | 2018-04-19T14:59:23 | 2018-04-19T14:59:23 | 130,119,652 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 182 | py | admin.py | from django.contrib import admin
from panop.apps.loader.models import Campaign, BatchData
# Register your models here.
admin.site.register(Campaign)
admin.site.register(BatchData) |
198640b7c0db78121e0f9e588c9528ff6f97070a | 313bb88c43d74995e7426f9482c6c8e670fdb63c | /15_Unit_Tests/test_student.py | 233030c642d8caafd853ece374cdc7e1c9e666fa | [] | no_license | martakedzior/python-course | 8e93fcea3e9e1cb51920cb1fcf3ffbb310d1d654 | 3af2296c2092023d91ef5ff3b4ef9ea27ec2f227 | refs/heads/main | 2023-05-06T07:26:58.452520 | 2021-05-26T16:50:26 | 2021-05-26T16:50:26 | 339,822,876 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,308 | py | test_student.py | import unittest
from student import Student
class TestStudent(unittest.TestCase):
def setUp(self):
print('setUp')
self.obj_anna = Student('anna', 'kowalska', 4.0, None)
self.obj_arek = Student('arkadiusz', 'nowak', 3.8, None)
def test_email(self):
print('email')
self... |
8137f6be1a341fc0cbc89e3ebadd67a0a3b14b91 | 6ed48bf3c72e61fe53144a3545ab305112c93501 | /infra/tools/metric_tool/test/data/other_tests.py | b2cc92a034a119911bb45b47f1b3055a2dce2139 | [
"BSD-3-Clause"
] | permissive | eunchong/infra | ee5f7a9379977de8c814f90dbba3f6adbf06a75c | ce3728559112bfb3e8b32137eada517aec6d22f9 | refs/heads/master | 2022-11-27T06:26:57.415805 | 2016-04-08T12:34:36 | 2016-04-08T12:34:36 | 55,699,880 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 566 | py | other_tests.py | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""This file is meant to exercise weird cases in metric_tool.py"""
import infra_libs
def nice_function():
# Calling of function as an attribute which is ... |
ef262ad83214bc2817d4d74f09a45307abca63d3 | d433d2a515553cd9d14405fe9df0416a99de1252 | /main.py | cf4e3ba41f64ec38d5e3af4195171c0338d6f2db | [] | no_license | FrankBKU/Test | 11173403c44772dd2fc4bdef170cda023f21d976 | b78441b8b24f7cf02bc4895b5c456a8d2b4a94a8 | refs/heads/main | 2023-05-31T11:33:07.386706 | 2021-06-13T12:09:39 | 2021-06-13T12:09:39 | 376,521,287 | 0 | 0 | null | 2021-06-13T12:09:40 | 2021-06-13T11:15:43 | Python | UTF-8 | Python | false | false | 91 | py | main.py | print('Hello Frank')
print('You are update for main resporatory')
print('Create conflict')
|
8260a6d208563674949ea0900cf9ab7217461dff | e7e87d4d8becb6af2f3fcbacf055bdcf25032b15 | /Project/proxy.py | bf4fe663f480f7e75d8b5815fbd9dbf7aff6425d | [] | no_license | Xuanphu108/MyWork | 239fc214fae87ebb12af17b09d570e9a858b26c5 | a1d9d4711be99dc0a605075025a7cc674f7ec0d5 | refs/heads/master | 2020-03-16T19:23:30.544455 | 2018-05-10T15:19:53 | 2018-05-10T15:19:53 | 132,913,827 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,047 | py | proxy.py | #!/usr/bin/python
from selenium import webdriver
import time
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
profile = webdriver.ChromeOptions()
profile.add_argument('--proxy-server=153.149.168.38:3128')
#firefox_capabilities = DesiredCapa... |
35a6ab886b382a7b5a4da3977d5f9118ef57130a | 38bffb2258b5373b45d85321edb6012c32b7acc4 | /Practice/Problem Solving/Data Structures/2DArrayDS.py | 567308df98c17875fadd4960ab6df05bd0f2b3dd | [
"MIT"
] | permissive | aviral36/HackerRank-Solutions | c1b66a417634b6567fd13539109d72998b34eb5d | 699451518dfd9e41e222f8b5ca25d4c34f611168 | refs/heads/master | 2021-07-26T13:36:47.151443 | 2021-06-17T14:45:55 | 2021-06-17T14:45:55 | 139,997,738 | 1 | 2 | MIT | 2020-10-01T04:59:16 | 2018-07-06T14:54:13 | Python | UTF-8 | Python | false | false | 346 | py | 2DArrayDS.py | #!/bin/python
import sys
arr = []
for arr_i in xrange(6):
arr_temp = map(int,raw_input().strip().split(' '))
arr.append(arr_temp)
sumArr=[]
for i in range(4):
for j in range(4):
tempsum=arr[i][j]+arr[i][j+1]+arr[i][j+2]+arr[i+1][j+1]+arr[i+2][j]+arr[i+2][j+1]+arr[i+2][j+2]
sumArr.append(t... |
4bfddab6164eddd37f0b719ea3c7c5a0491727d2 | 36fa699c171f875825f4b9fb521a0fcb7a5400ee | /9day86/MRBS/app01/views.py | 6ef20a258dc8c7d03f3416a1dfa50a581d88b0b8 | [] | no_license | qiu957919102/oldboy | e5b7e2afa985e05b4c0c743fa982ed5c9a32c072 | 0d1fb870a59e21526481c4718a6a17ef2494e726 | refs/heads/master | 2020-11-29T10:45:43.435447 | 2019-01-07T09:33:21 | 2019-01-07T09:33:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,100 | py | views.py | from django.shortcuts import render, HttpResponse, redirect
from django.contrib import auth
# Create your views here.
from .models import *
import datetime
def index(request):
date = datetime.datetime.now().date()
time_choices = Book.time_choices
room_list = Room.objects.all()
book_list = Book.objects... |
6464d8e17eed8bce04affc13e5362c08b0af8d6f | 29370120366d0eb7720fe6238d5296f99bd4c92c | /Arrays/Kth Row of a pascal triangle.py | 881d8221a180288df3f3c5ca13a7ab2ce917651c | [
"MIT"
] | permissive | deathlyhallows010/Interview-Bit-Python | c4ed7e0ef24d22525f4dba37459ac4a03010d5e6 | 8593330f7caa781cc06d53df4ced94e0a5e45a94 | refs/heads/master | 2020-12-23T18:53:28.870860 | 2020-01-31T12:44:54 | 2020-01-31T12:44:54 | 237,239,034 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 552 | py | Kth Row of a pascal triangle.py | # https://www.interviewbit.com/problems/kth-row-of-pascals-triangle/
# Kth Row of a pascal's triangle
# NOTE : k is 0 based. k = 0, corresponds to the row [1].
class Solution:
# @param A : integer
# @return a list of integers
def getRow(self, A):
if A <= 0:
return [1]
result =... |
1ed7fb0dd5f0fa5e60c855eceaaf3259092918ef | 7968e9de640495cf078b8086e20a662bfa5f52cd | /beginer/set-9/82-area-of-farm.py | c23b52e248c734ad941a8b06d2e224411364c649 | [] | no_license | n20084753/Guvi-Problems | 72b42b07065bfec53d6cf644b18e9de61b6be18f | 64e7aefc602c149de129a9ea382db0c699b9a6bd | refs/heads/master | 2021-05-09T12:15:41.597053 | 2018-02-07T08:25:34 | 2018-02-07T08:25:34 | 119,007,568 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 60 | py | 82-area-of-farm.py | x, y = [float(x) for x in raw_input().split(" ")]
print(x*y) |
b1a1287c2c3b624eb02f2955760f6e9eca8cdcf9 | 3528f1e453bd09e40457818be3500b5c6cfffc3a | /python_3.py | de55f991325acc6839b494f3600320945525ac32 | [] | no_license | falseych/Initial | 2d8b9e9068137f68c7cb394e01c99bccd82964da | 677a9602f345f7c1505b86de992daa2479e1f8bc | refs/heads/master | 2023-02-24T04:16:45.594177 | 2023-02-15T04:34:06 | 2023-02-15T04:34:06 | 142,635,018 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 197 | py | python_3.py | cars=100
drivers=30
passengers=70
print "There are",cars,"cars available."
print "There are only",drivers,"drivers available."
print "Each driver needs to drive",passengers/drivers-1,"passengers."
|
e68d872232b3eab4c33cbbe4376be7dd788888e2 | 11b6cc8bc358762b9ba40076535ad85806295d1a | /placyk_app/migrations/0001_initial.py | f95b72ffc1f392db59273eabfae600db87b69783 | [] | no_license | MagdaZawora/placyk.pl | 67184ea0a05202ef381a15a6fe6b56125545293c | d03bfa42f15b83ed171f470a8ef8448fbfe39314 | refs/heads/master | 2022-12-13T19:11:10.212289 | 2017-09-03T14:23:24 | 2017-09-03T14:23:24 | 98,431,855 | 0 | 0 | null | 2022-12-08T00:42:47 | 2017-07-26T14:26:29 | HTML | UTF-8 | Python | false | false | 4,014 | py | 0001_initial.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-07-20 08:05
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
depe... |
df39a97db25f03aca8ebd501283fd6a7c486db8c | 1705e97ef5613685e142e3f78a2057399b09858c | /Code/asiportal/projects/models.py | e2a49c8baf78ccfb0d2c5117723878d68e83edc4 | [] | no_license | FIU-SCIS-Senior-Projects/Academic-Success-Initiative---ASI-PantherCentric-1.0 | 0b956175efb031022ed32412195531c7f0c162c5 | 8ee64b58e2634384d5905defd3701a453b49b966 | refs/heads/master | 2022-11-24T00:07:52.458186 | 2017-08-02T01:36:32 | 2017-08-02T01:36:32 | 91,715,982 | 0 | 0 | null | 2022-11-22T01:31:04 | 2017-05-18T16:37:10 | SQLPL | UTF-8 | Python | false | false | 1,744 | py | models.py | from __future__ import unicode_literals
from django.db import models
from django.contrib.auth.models import User
from django.core.exceptions import ValidationError
from django.utils import timezone
from timesheets.models import TimeSheet
from channels import Group
class ProjectTS(models.Model):
class Meta:
... |
f80de2b069cf1dee2e665556262c6e84ce04b208 | a2e638cd0c124254e67963bda62c21351881ee75 | /Extensions/_AppWorkspaceTools_py/FPythonCode/FAppWorkspaceDesignerNodes.py | 10ca5ddd54520cb66b8c731a7887cf7e4134173b | [] | no_license | webclinic017/fa-absa-py3 | 1ffa98f2bd72d541166fdaac421d3c84147a4e01 | 5e7cc7de3495145501ca53deb9efee2233ab7e1c | refs/heads/main | 2023-04-19T10:41:21.273030 | 2021-05-10T08:50:05 | 2021-05-10T08:50:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,893 | py | FAppWorkspaceDesignerNodes.py | """ Compiled: 2020-09-18 10:38:52 """
#__src_file__ = "extensions/AppWorkspaceTools/etc/FAppWorkspaceDesignerNodes.py"
""" Compiled: 2018-06-07 17:06:19 """
#__src_file__ = "extensions/AppWorkspaceTools/etc/FAppWorkspaceDesignerNodes.py"
import acm
import FUxCore
import Contracts_AppConfig_Messages_AppWorkspace as Ap... |
b6df9414f99294c7986d3eb5332d40288f059cd1 | 74a4f74283b8405f80aa101b62e505df53a53afe | /samples/python/default_locations.py | f12c69ee0bbc119834784a5db65e9a3895e29aaf | [] | no_license | HephyAnalysisSW/StopsDilepton | 34dcb923b5ba7da2f3bdbdad77ece98b68dc58c2 | 94682dab0ee3575a86eaa6e3725af2f81dfa4a08 | refs/heads/101X | 2022-12-13T15:23:04.548790 | 2020-09-17T23:11:28 | 2020-09-17T23:11:28 | 45,471,753 | 0 | 4 | null | 2019-06-06T09:10:55 | 2015-11-03T14:26:03 | Python | UTF-8 | Python | false | false | 1,723 | py | default_locations.py | class default_locations:
mc_2016_data_directory = "/afs/hephy.at/data/cms06/nanoTuples/"
mc_2016_postProcessing_directory = "stops_2016_nano_v0p23/dilep/"
data_2016_data_directory = "/afs/hephy.at/data/cms07/nanoTuples/"
data_2016_postProcessing_directory = "stops_2016_nan... |
122c4f3a2949ee675b7dd64b9f9828e80cbe5610 | eb1bed34b310cca87eb65bf572a6e0d786ba20a3 | /src/TestData.py | e087f567a37267545a511f5c2777d2b76860d4c3 | [] | no_license | OsD977/road-segmentation-eth-cil-2020 | 3b2dad1389beaed071c71c752ef7feebe468ae82 | b0a953f740e4ea94c8cc6d3f96ce95354de5e677 | refs/heads/master | 2022-12-25T20:17:51.662279 | 2020-08-01T05:54:48 | 2020-08-01T05:54:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 474 | py | TestData.py | import cv2
import os
import re
class TestData:
def __init__(self, image_path= '../../data/test_images/'):
test_names = os.listdir(image_path)
self.images = []
self.numbers = []
self.treshold = .25
for name in test_names:
self.images.append(cv2.imread(... |
23236cd8262eb414666db88215c01d973abf1d97 | e9065af233c2efc4cfb2b7e3d3e51da9ac9b7b14 | /PUBG_Mobile_config_file_converter.py | cf2d5ae2d06bb991d69c12e58dc912956d3c59fa | [
"MIT"
] | permissive | Sydiepus/PUBG-Mobile-configuration-converter | ee33112304a3db70db1c79cd4742b0703b5a6591 | fd367d1ed5d4c75a251bc2bd367f2d71478dd49d | refs/heads/master | 2021-08-28T04:31:00.214906 | 2021-08-19T18:50:34 | 2021-08-19T18:50:34 | 217,857,338 | 5 | 6 | null | null | null | null | UTF-8 | Python | false | false | 2,147 | py | PUBG_Mobile_config_file_converter.py | decoded = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p"... |
7aa6bba8483082354a94ed5c465e59a0fc97fe23 | a69f551e9dcc118e730c4e85e096993535fa0c70 | /Codeforces/900/A. Contest for Robots.py | 45a0f42573b8a22a92064cd7bee868f920dc59b4 | [] | no_license | DHaythem/Competitive-Programming-Solutions | ef30c9418f47e522b8f5096f6077c487ed247500 | 5c4e6b78ee9657ee46abd1fce082ef11acd6a13c | refs/heads/master | 2021-07-07T16:29:55.013246 | 2021-03-18T22:12:03 | 2021-03-18T22:12:03 | 229,136,575 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 296 | py | A. Contest for Robots.py | #https://codeforces.com/problemset/problem/1321/A
n=int(input())
r=list(map(int,input().split()))
b=list(map(int,input().split()))
l=[0]*n
x=0
y=0
for i in range(n):
if r[i]-b[i]==1:
x+=1
elif r[i]-b[i]==-1:
y+=1
if x==0:
print(-1)
else:
print(y//x+min(y%x+1,1))
|
4c9f2b6fd119daa58b7f1dd7153c90df747e62cb | 2aed0ce4de9e6b913c926edaa7773cadc6cc82ff | /feature/MA.py | 7a538ab30f2ed1872c0e7e9e76d6ac367916c6bb | [] | no_license | fashi-github/MLQuant | fe6144a219bd739562ac57b940b0a21a8d98726e | 2d740e2d45723cd36bd60569523a326034787a91 | refs/heads/master | 2023-07-03T01:42:45.550890 | 2021-08-12T09:08:53 | 2021-08-12T09:08:53 | 391,791,228 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,899 | py | MA.py | # Moving Averages Code
# Load the necessary packages and modules
import pandas as pd
import matplotlib.pyplot as plt
import data.stock as st
# Simple Moving Average
def SMA(data, ndays):
SMA = pd.Series(data['close'].rolling(ndays).mean(), name='SMA')
# SMA = pd.Series(pd.rolling_mean(data['close'], ndays),... |
a83ba1d6ed903636dac921ea00ac9ecbe2abf794 | 1fc44d8c63eadbf2c9a0466fbec02f9e7a14fd23 | /articles/forms.py | 98a49801b373f267ff48ca4f51cc9ccedfb31a1c | [] | no_license | JiteshSingh1947/News-Website | 63424b91aee205009c6530fee98c7691c641f5cb | cc66d843872ebf295c3654a5973e3e5487c0850c | refs/heads/master | 2020-11-27T17:56:40.046511 | 2020-01-10T12:28:56 | 2020-01-10T12:28:56 | 229,552,504 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 503 | py | forms.py | from django import forms
from . import models
class CreateArticle(forms.ModelForm):
class Meta:
model = models.Article
fields = ['title', 'body', 'slug', 'thumb',]
def __init__(self,*args,**kwargs):
super(CreateArticle,self).__init__(*args,**kwargs)
self.fields['title'].widget.attrs['class']='form-control'
... |
a290d5a80e84a028ac80cdbee04597f7474787e5 | 5bbc7dafb930389199cac46f755c856648b82cd2 | /src/train.py | e187e7460a9b13e80ebca1d140f982efb3ef1787 | [
"MIT"
] | permissive | dibschat/Acoustic-Scene-Classification | 1526d4d22712e6b9ebad5644aba90b04a1789de0 | cf410f14a1efb3e3dd2bbc240c24882969be98a9 | refs/heads/master | 2022-08-22T23:30:14.240386 | 2020-05-24T02:49:54 | 2020-05-24T02:49:54 | 163,265,735 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,487 | py | train.py | #---------------train the CNN or the ensemble-----------------
#importing required libraries and modules
import os
import sys
import cv2
import numpy as np
import tflearn
from preprocess import Preprocess
from data_split import Load
from conv_net import CNN
from ensemble import Ensemble
def load_nu... |
88f1cb7bba76528405b6fda468d926c125325717 | 4af620bdc5db93fdfa4e799a6c508ae855ca4ea8 | /utils/custom_transfrom.py | cadb91c754af23bea44ad7fd43a04efe9d647744 | [
"MIT"
] | permissive | wonbeomjang/mobile-hair-segmentation-pytorch | 9f3517543d73822f24bdafb2ceefa560bac82634 | b5a4ce20f2fa7156cde6da750a12119378cfc262 | refs/heads/master | 2023-02-18T16:39:43.143214 | 2023-02-16T08:19:02 | 2023-02-16T08:19:02 | 163,425,814 | 128 | 22 | MIT | 2022-07-11T15:27:54 | 2018-12-28T15:45:25 | Python | UTF-8 | Python | false | false | 476 | py | custom_transfrom.py | class UnNormalize(object):
def __init__(self, mean, std):
self.mean = mean
self.std = std
def __call__(self, tensor):
"""
Args:
tensor (Tensor): Tensor image of size (C, H, W) to be normalized.
Returns:
Tensor: Normalized image.
"""
... |
8dd9e969e2763fb5a4d7a4ade05d2b854365fc34 | 513b218bcfd0496e40810893e9504c26452853fa | /my_challenge/download_file.py | e2223dda33d1133aee9eb518a11d51eb70ca79e6 | [] | no_license | Adam1348/NBS_Data_Engineer_Challenge | 7c4addda95c1a5ac1be973fa69913d5fceb9c360 | 5d73bdbc39719f7ae9dde433c78aa357942b3dec | refs/heads/master | 2022-12-23T07:14:35.942018 | 2019-04-04T04:11:28 | 2019-04-04T04:11:28 | 166,130,253 | 0 | 1 | null | 2022-12-12T13:07:52 | 2019-01-17T00:00:45 | Python | UTF-8 | Python | false | false | 3,414 | py | download_file.py | import requests
import sys
import os
import csv
import gzip
from io import BytesIO
from datetime import datetime, timedelta
def pre_delta(start, end, delta):
curr = start
while curr <= end:
yield curr
curr += delta
def url_generator(args):
"""
python download_file.p... |
f887bbc8d0a688479f3ea81bf3b2753f29c7c8e8 | bc8edfb56d83c3227bad4834fb9d348d6132aa0f | /chargebee/models/addon.py | 171337765dbaa17deffa1ae3199bc4bc6cd6936c | [
"MIT"
] | permissive | techiev2/chargebee-python | 8b89287b52e19863aebc174049373e8fd1c17400 | ccaa5257e952ed9492bcd5c7998d51c9fcfe6f5e | refs/heads/master | 2020-12-25T11:20:49.196466 | 2013-08-10T06:49:12 | 2013-08-10T06:49:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 501 | py | addon.py | import json
from chargebee.model import Model
from chargebee import request
from chargebee import APIError
class Addon(Model):
fields = ["id", "name", "invoice_name", "type", "charge_type", "price", "period", "period_unit", \
"unit", "status", "archived_at"]
@staticmethod
def list(params=None, env=N... |
01936eae454e31fdb551d422c19b8fd400c7f037 | 83d30fd71aed81e391efa95b77cad4e3ab0f9522 | /Копия task1_4_Factorial function.py | 0e7686eb468bc411cce4db2835bb61b702fbd47d | [] | no_license | jooker33/learning_tasks | b59a8daceb3592871c86873ed2d0522ad9d7927b | 072212540e9b3ab98978e2e2801796e2c1174a89 | refs/heads/master | 2023-08-28T06:09:05.908910 | 2021-11-01T15:57:12 | 2021-11-01T15:57:12 | 390,347,899 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 701 | py | Копия task1_4_Factorial function.py |
import math
# Факториал
def factorio_calculatus(num):
x=1
for i in range(1,num+1):
x=x*i
return(x)
#Определили квадратный корень по приколу
def sqrt(var):
return(var**(1/2))
#Попробуем по приколу также определить число пи
def pi():
result2=0
for g in range(1,10000):
result2+=(4/(2*g-1))*((-1)**(g+1))
... |
70b0cb7799ffc2fe9a59318aeeba11275d412428 | 415d1a3c99c7385aaf7cf6434557be3110651bbc | /mootiro_komoo/apps/main/mixins.py | cc41040da6af35791fb66d4e1648e6a805763f9b | [
"MIT"
] | permissive | LuizArmesto/mootiro-maps | d09c5a68412da7495d7dd45a1dff8bfad32192ff | ead274f45af4aa7e338e816268e5e0a2d21c6974 | refs/heads/master | 2021-01-18T10:26:37.569448 | 2013-09-02T04:13:38 | 2013-09-02T04:13:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,833 | py | mixins.py | # -*- coding: utf-8 -*-
import simplejson
from django.db import models
from .utils import to_json
class BaseModel(models.Model):
"""
Base Model provides:
- a DAO interface for abstracting de ORM
- easy table references
examples:
```
class MyModel(BaseModel):
pa... |
1150ba387c90b8f4c1804422e24a249a26f40437 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02788/s654586931.py | 3f5c1ee69750d70cf6f3de46b8c49215725dae9d | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 970 | py | s654586931.py | import bisect
import itertools
import sys
input=sys.stdin.readline
def main(args):
n, d, a = map(int,input().split())
monster = [0]*n
pos = [0]*n
for i in range(n):
x, h = map(int,input().split())
monster[i] = (x, -(-h//a))
pos[i] = x
pos.sort()
monster.sort()... |
b60ab6ebcd4426138f90fe6842bb4569147bd9bb | 14ca143de2cf1747f3a176f65c9ded5f1f6d8fbe | /auctions/migrations/0007_auto_20170303_1257.py | 47700c1e3ed9b7d75051e266a73036a657367028 | [] | no_license | raj231992/kpl | b3ecf54f189dd0cccc094a3ce1be0f2ccd108266 | 69e7826b5396e4d46b7cd11099ee1cc28cdd46f3 | refs/heads/master | 2021-01-11T17:44:49.728958 | 2017-03-09T05:11:03 | 2017-03-09T05:11:03 | 79,831,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,037 | py | 0007_auto_20170303_1257.py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-03-03 07:27
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('auctions', '0006_auto_20170301_2202'),
]
operations = [
migrations.AlterFie... |
9892d652481a82f60cf4c97ff9c376dd2eeb909f | 926c0560f650ad33e552f0d4a03161b8a3570268 | /cov_vec_bprop.py | f5dd357dbf4e5ab8ae6fb496375be38e56c9ec85 | [
"MIT"
] | permissive | steveli/gp-adapter | 1699b5fec4015bb49f03a5142b6d48ad6ea2e223 | 361fdfbc97f9691b1cc1b422953536b3673e5ee0 | refs/heads/master | 2021-01-20T11:38:39.674056 | 2017-08-29T22:29:34 | 2017-08-29T22:29:34 | 101,679,303 | 14 | 4 | null | null | null | null | UTF-8 | Python | false | false | 13,157 | py | cov_vec_bprop.py | import numpy as np
import theano
from theano.tensor import as_tensor_variable
from theano.gof import Op, Apply
from theano.gradient import DisconnectedType
from gp_kernel import kernel, symbolic_kernel
from fast_gp_block import post_mean, grad_post_mean
from fast_gp_block import post_cov_ys, grad_cov_ys, post_cov_y, gr... |
be65397bca8085d2a5dee5b8b372e344eabdf0d0 | 22c7ae9a0a7a4b2f3488f3544e6d5bae3c0fba9b | /1543.py | 1eb6a2f065bfb16af1ae9547321ba4f2d7c09a4d | [] | no_license | bigsaigon333/BaekjunOnlineJudge | 51cc9611d3cb96b5111013068f1f1edabbdf1470 | e892c9f87b03718d3081dd79ed8d61784edc1072 | refs/heads/master | 2022-12-30T22:24:13.146636 | 2020-10-20T14:58:44 | 2020-10-20T14:58:44 | 284,076,063 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 492 | py | 1543.py | # Date: 2020-09-02 Wed 18:52
# Comment: 의잉?! Best Solution을 보고 든 생각. python의 built-in function은 어마어마하구나..
# Best Solution: https://www.acmicpc.net/source/4380386
import sys
S, T = [s.strip() for s in sys.stdin.readlines()]
# print(S, T)
def match(S, T):
count = 0
while True:
i = S.find(T)
... |
ac42cb63fe6ba293bde94f77450a0055d29a1bc0 | 72429f7a9c0fb50b5d6605af401e93402b225da3 | /backend/__init__.py | 197d8d0ed0a9070d74d484c46a8453810cc404f4 | [
"MIT"
] | permissive | asteroidb612/audino | 2ba08c0e76a1b19253625cdfcac69dd8b1adb7e2 | bea2d973af5fbf6a3454d0224f56d2560f4398f1 | refs/heads/master | 2022-11-12T10:21:25.449542 | 2020-06-25T20:24:27 | 2020-06-25T20:24:27 | 275,007,612 | 0 | 0 | MIT | 2020-06-25T20:21:06 | 2020-06-25T20:21:05 | null | UTF-8 | Python | false | false | 1,121 | py | __init__.py | import os
from pathlib import Path
from flask import Flask, jsonify
from flask_jwt_extended import JWTManager
from flask_migrate import Migrate
from flask_sqlalchemy import SQLAlchemy
from flask_redis import FlaskRedis
from werkzeug.exceptions import HTTPException, default_exceptions
from backend.config import Confi... |
784755a0487bc0a8c7af311abe7cde73faa906aa | 138c424e366b18b1a1ae687bd568e13644ed0c1f | /PyBank/main.py | 401d21bcf93795fe0905459363324b3d8652cf8d | [] | no_license | paoestefan/python_challenge | dfd9a2ff5f99afb08f504719feb44dc8a5b09be4 | 816b71fbd55f7d278175f94fae3452a49e542ba7 | refs/heads/main | 2022-12-18T11:26:02.789345 | 2020-10-06T23:20:52 | 2020-10-06T23:20:52 | 301,830,193 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,445 | py | main.py |
import os
import csv
budget_csv=("Resources/budget_data.csv")
Date=[]
ProfitLoss=[]
average=0
with open(budget_csv,"r") as csvfile:
csvreader=csv.reader(csvfile,delimiter=",")
csv_header=next(csvreader)
#* The total number of months included in the dataset
for row in csvreader:
Date.append(ro... |
353fc567bddd1f149894bfff36bab41b10dbe4a9 | 1a5e655e8a60a9a252f1496281d0549df1e93f91 | /examples/GRC_examples/top_block.py | 0ed3cc6b41318957f07ff6c5f97c0f8da0eab60b | [] | no_license | luwangg/gr-PWF | 9bba56d306a48dd41e90ab93532a7c33a42ecbc9 | ce1b00ace57ab76c51c2b867ee4291d9d4ab064b | refs/heads/master | 2020-03-24T21:31:16.060959 | 2017-07-19T05:16:56 | 2017-07-19T05:16:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 17,134 | py | top_block.py | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
##################################################
# GNU Radio Python Flow Graph
# Title: Top Block
# Generated: Mon Jul 17 21:55:07 2017
##################################################
if __name__ == '__main__':
import ctypes
import sys
if sys.platform.sta... |
08cb0dd4e6764bf4537ebd19390eb3aa553dbe62 | 5070a9c95cf48858bda5721820d5a9efc5276257 | /performanceplatform/utils/data_parser.py | c8c8f50b1edc30a5307eacb87c6f0fc67fe09124 | [
"MIT"
] | permissive | alphagov/performanceplatform-collector | 07a249c302c6e99939cacbbb9ab2bed2596cfda1 | de68ab4aa500c31e436e050fa1268fa928c522a5 | refs/heads/master | 2020-12-25T18:23:24.514049 | 2018-08-13T10:39:55 | 2018-08-13T10:39:55 | 19,826,689 | 4 | 7 | MIT | 2019-06-04T07:12:20 | 2014-05-15T16:24:24 | Python | UTF-8 | Python | false | false | 8,136 | py | data_parser.py | from performanceplatform.utils.datetimeutil \
import to_datetime, to_utc
import logging
import base64
import re
class DataParser(object):
def __init__(self, data, options, data_type):
# it would be nice to have some json schemas or something to validate
# for now here are some docs
"""... |
3c4313fa0e2921f4babb37f9565ed313486c8920 | e013c4a476f9f9c137ac0fad7c4e41fb563a167a | /brandenburg/models/lead.py | 5b33648b47a28f2da7faf2f23dcc9becc110bcd5 | [
"BSD-3-Clause"
] | permissive | sixcodes/brandenburg | ca93b83850215dfdbe34d34e9d93178f7f140744 | bb360590e5763456a1e54201a1960a3e0b01b16c | refs/heads/develop | 2023-05-19T18:38:34.948639 | 2021-05-26T17:35:52 | 2021-05-26T17:35:52 | 271,821,617 | 3 | 2 | BSD-3-Clause | 2021-05-26T17:35:53 | 2020-06-12T14:46:51 | Python | UTF-8 | Python | false | false | 2,545 | py | lead.py | # Standard library imports
from typing import Tuple, List
# Third party imports
from pydantic import BaseModel, validator, EmailStr, Field
# @doc.consumes(
# doc.JsonBody(
# {
# "name": doc.String("The name of the user."),
# "phone_number": doc.String("The user phone number."),
# ... |
bb7c87685b8a90cc360e6be7ba265b0ee9bbdb7f | 57ec473eaf1f7898de0d77d184cb0bd7f3309433 | /empower/apps/wifinetworkmanager/wifinetworkmanager.py | 2d94171dd65aee2631147255cf2711b993c3631e | [
"Apache-2.0"
] | permissive | ericbrinckhaus/empower-runtime-modified | fc8bac0234c648572709cc58ef6e605c8321918f | ecd7c1e9f1c19a629abdcb5c55257377313246ea | refs/heads/main | 2023-03-18T08:20:10.291517 | 2021-02-28T21:21:35 | 2021-02-28T21:21:35 | 307,206,977 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 21,248 | py | wifinetworkmanager.py | """WiFi Nwtwork Manager Primitive."""
import time
import math
from datetime import datetime
from construct import Struct, Int8ub, Int16ub, Int32ub, Bytes, Array
from construct import Container
import empower.managers.ranmanager.lvapp as lvapp
from empower.core.ssid import WIFI_NWID_MAXSIZE
from empower.core.ethera... |
d296f702718acb367dfd29215be4ec985350a196 | f070384aef558fb0a3c50cd7d475b428d05896e6 | /same_thing/exceptions.py | 9ae0c846ae76e26c285d4febc841bd6e7134266b | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | aolieman/dbp-same-thing-service | ad6f8bacda3222a6ae0f77090f895661b927a9f8 | 1fea54d3ee37f4e663a9ee96ab15b50f7b6c0fdf | refs/heads/master | 2022-07-30T07:20:44.610543 | 2019-08-22T13:19:48 | 2019-08-22T13:19:48 | 137,934,974 | 1 | 1 | Apache-2.0 | 2022-07-06T19:56:40 | 2018-06-19T19:16:49 | Python | UTF-8 | Python | false | false | 40 | py | exceptions.py |
class UriNotFound(Exception):
pass
|
1412cff7178f4517a076b5a7fd505ae248aa2834 | e694c3558d24ca542dee82aac82eafc0a163ec0d | /sed/amostra/migrations/0004_auto_20161210_1419.py | c5ce03037ecdb7b4796480008a03dc7ed7a829ac | [] | no_license | Fabio343/Sediment-Cataloging-System | b897ec161557e55cf8ae92f1d7f18dc3511226bc | 1c2867fdd729d5f10fb7659238fc9d47a9433f3d | refs/heads/master | 2021-09-07T15:48:42.041964 | 2018-02-25T12:42:12 | 2018-02-25T12:42:12 | 69,267,190 | 1 | 0 | null | 2017-03-22T18:00:03 | 2016-09-26T16:01:16 | HTML | UTF-8 | Python | false | false | 1,112 | py | 0004_auto_20161210_1419.py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-12-10 16:19
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('amostra', '0003_auto_20161210_1355'),
]
operations = [
migrations.RemoveFie... |
6c05c19c1aa32c58a3f0807728931ce1af7a6a35 | bcd2e40a159abb89295aeb5bac4d0adaed7c1e52 | /database/create.py | 803403ec157949b5faab2ffd6fce80a9b82799db | [] | no_license | devdee0809/A_level_project_DressSelector | 4a32ca7c4f0f0ea656322755f829b99d518360ba | 98a0a1aa68d558a66c448d386b0921a367161a8b | refs/heads/master | 2023-04-13T02:29:58.212159 | 2021-04-24T10:33:53 | 2021-04-24T10:33:53 | 330,463,942 | 1 | 1 | null | 2021-03-11T08:54:28 | 2021-01-17T18:55:53 | Python | UTF-8 | Python | false | false | 2,351 | py | create.py | """
Table rows have a 64-bit signed integer ROWID which is unique among all rows in
the same table. We will use this as the unique PK for all tables
"""
import sqlite3
from pathlib import Path
class DataBase:
def __init__(self, database_name):
self.cnxn = sqlite3.connect(database_name)
print("da... |
1063da1716b23213f0f80e11485f096b7d050916 | e9e484d6821745cd56af8324065334148628c66d | /Курсовая работа по программированию/31 Задача (2 часть курсовой)/example_31.py | a4f0a33741f7cc0028aeaecc7a08a3bffd6f7361 | [] | no_license | TushinIE/cource-work | c14b1ba7236581377cb7f009e0cdb98f101bb84f | c24bc2e5b8f25ddba1c9b828a4a369280cd78af5 | refs/heads/master | 2020-05-27T19:44:33.591225 | 2019-05-27T14:13:50 | 2019-05-27T14:13:50 | 188,766,135 | 0 | 0 | null | 2019-05-27T03:39:16 | 2019-05-27T03:39:16 | null | UTF-8 | Python | false | false | 1,278 | py | example_31.py | #имя проекта: numpy-example
#номер версии: 1.0
#имя файла: example_31.py
#автор и его учебная группа: И.Тушин, ЭУ-142
#дата создания: 20.05.2019
# дата последней модификации: 20.05.2019
#связанные файлы: пакеты numpy, matplotlib
# описание: Создать прямоугольную матрицу A, имеющую N строк и M столбцов со
# случ... |
7ff1f0ae72bca1606667807a3bcebd80ef98b0fd | 812b589fb2d74874ef805467606c39a15321b74f | /packages/timer/resources/tables/_packages/f3kp/competition/action/create_voice.py | 7e97ed0eb412de06bed65e131a3876af3c185464 | [] | no_license | Giammi77/f3kcompetizioneDeploy | 4d5c031d97304fd2f83233d81c7734cee1a691df | 6fd80342a5264fac3a0487e979a64be6cae386e5 | refs/heads/master | 2023-03-29T00:28:34.983162 | 2021-04-05T09:34:52 | 2021-04-05T09:34:52 | 318,653,594 | 1 | 1 | null | 2020-12-24T13:22:00 | 2020-12-04T22:53:42 | Python | UTF-8 | Python | false | false | 3,847 | py | create_voice.py | from gnr.web.batch.btcaction import BaseResourceAction
import f3kvoice as voice
caption='Make Voice' #nome del menu del batch
tags='admin' #autorizzazione al batch
description='Make voices for the competition' #nome più completo
class Main(BaseResourceAction):
batch_prefix = 'AS'
batch_title = 'Make Voice'
... |
26b1e82c29395d590d361e1b582ee749bdb715e9 | 5d6fa9b45f4ae2731edc02a98ea1e9e8241b6d79 | /test_html/views.py | a80887ce45a1a3adceadfd274d3be0790e3fef76 | [] | no_license | zwx-1578/HIS | 9a7946d30beb5cd126b51d5e45908327ec42770d | 2c3ffe672fe8b9077acd99724a4f5b552798d14b | refs/heads/master | 2020-06-30T13:20:22.721018 | 2019-08-06T11:32:52 | 2019-08-06T11:32:52 | 200,837,869 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,303 | py | views.py | from django.shortcuts import render
# Create your views here.
# 首页
def index(request):
return render(request,'index.html')
# 挂号信息管理
def registration_index(request):
return render(request,'registration/index.html')
# 住院办理
def hospital_index(request):
return render(request,'hospital/index.html')
# 住院结算... |
499044c77fa3ff52d308f6ee0f01db19864b8031 | aee50ab79ba87a5923a84824399ad90ed65cc226 | /main.py | b3897e16e7fedf8af5ae665617cd1a34a47573ae | [] | no_license | priyalpanda008/hirst_painting | c4cf2f87f583294618ae91568f6e593db55a5e76 | 129f2e055b0bad81fc73b18eaeb793a93f31d611 | refs/heads/main | 2023-06-01T04:30:27.977650 | 2021-06-19T16:57:22 | 2021-06-19T16:57:22 | 378,445,111 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,013 | py | main.py | #import colorgram
#rgb_colors = []
#colors = colorgram.extract('image.jpg', 6)
#for color in colors:
# r = color.rgb.r
# g = color.rgb.g
# b = color.rgb.b
# new_color = (r, g, b)
# rgb_colors.append(new_color)
#print(rgb_colors)
#[(245, 243, 237), (248, 241, 244), (238, 240, 246), (201, 164, 11... |
2f7fa011f86b81bace77d281ddefc34d2695dcfd | 9e01456de909dcf0442ff954cf4274b2b4c9821b | /src/data/musdb_amss/separate.py | 6d7a8206249e43351ea5c34731c5895693fdb8ac | [
"MIT"
] | permissive | ws-choi/AMSS-Net | 3b7fe9d03569c27f36dad7f3c6dfb721c1e63d32 | 9e906f64365526dbb184340ac9565ac8bc32f830 | refs/heads/main | 2023-06-19T05:49:55.959956 | 2021-07-04T08:50:51 | 2021-07-04T08:50:51 | 362,757,659 | 0 | 0 | MIT | 2021-04-29T09:13:08 | 2021-04-29T09:13:07 | null | UTF-8 | Python | false | false | 2,142 | py | separate.py | import random
from itertools import combinations, permutations
import numpy as np
from src.amss.amss_desc.abstract import Selective_Audio_Editing
from src.utils.functions import normalize
targets = ['vocals', 'drums', 'bass']
def get_target_index(target):
return targets.index(target)
class Musdb_Separate(Sel... |
ece71b40ba332627f6780477283c92bb80a08992 | 5ef5a7f4e1f933956c94e12dc24d5aedbf850550 | /hsm_software/sw/diamondhsm_console.py | 5c4bb567d8bfa3460ad54b1608f782240541da84 | [
"BSD-3-Clause"
] | permissive | DiamondKeySecurity/HSM | 637359524bf1751bb2d9e1e1669c7e6c4bf179d2 | 6b6a0d691a22863411e048c7c211ac63bf9ffaa7 | refs/heads/master | 2020-07-31T19:05:32.240008 | 2019-09-18T16:42:18 | 2019-09-18T16:42:18 | 210,720,411 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,130 | py | diamondhsm_console.py | # Copyright (c) 2019 Diamond Key Security, NFP
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# - Redistributions of source code must retain the above copyright notice,
# this list of condit... |
53f8dd7c75633261e839efcaf955e90351cdd029 | e8b7fa5fb38e49c01bf61a36d70514fb969130bd | /CortexAI/send_test.py | 6dc7574ec786d673188be316262fcc9a2ff3d83a | [] | no_license | TaehoLi/Embedded-system-design | 42354745413e59177c1025bae5c89031fd60b756 | c15298894b78d10d2b45eb1452e21cbf47cb4466 | refs/heads/master | 2020-04-30T07:35:39.480442 | 2019-06-12T07:19:51 | 2019-06-12T07:19:51 | 175,757,500 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 929 | py | send_test.py | # 0. 사용할 패키지 불러오기
from keras.datasets import mnist
import serial
port = "COM3"
baud = 115200
ser = serial.Serial(port, baud, timeout=1)
# open the serial port
if ser.isOpen():
print(ser.name + ' is open...')
# 1. 데이터셋 생성하기
# 훈련셋과 시험셋 불러오기
(x_train, y_train), (x_test, y_test) = mnist.load... |
77be84630410be36ea64602c0b8ada109e51136f | f644312c309a07b64f6b7eb629648df33a8b7999 | /algorithm/summa.py | d0c6fe4ab8c70ff2d2be03b5539859c355ab4e49 | [
"MIT"
] | permissive | yildirimyusuf/FlaskAPI | 68baf8f0abf04dcd2834f613ea05ba4884e98f92 | b52dc09aa3c0272b6c1c3cfc035f3843046b1439 | refs/heads/master | 2022-11-07T23:12:06.340708 | 2020-06-25T11:33:10 | 2020-06-25T11:33:10 | 241,899,202 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 358 | py | summa.py | from summa import keywords
from flask import jsonify, request
from flask_restful import Resource
class Summa(Resource):
@staticmethod
def post():
posted_data = request.get_json()
text = posted_data['text']
text = (keywords.keywords(text).split('\n'))
return jsonify({
... |
f6abe24d6e4608443d58cfcfd86f9a593884c042 | 26319903e854244b303c78d9b5b9954cda5201e3 | /wsgi/myproject/myapp/migrations/0002_auto_20171213_1600.py | 59f28bb6ef0710d8b5ed6795ecd521183a865f6e | [] | no_license | geekkun/fin | c08e1dfe24722b902a647c0f3802028b4a593f6b | 4fbbf9cb088c989f819c02791a08a3590c92931f | refs/heads/master | 2021-08-29T10:46:52.926779 | 2017-12-13T19:07:06 | 2017-12-13T19:07:06 | 114,157,273 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 564 | py | 0002_auto_20171213_1600.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-12-13 16:00
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('myapp', '0001_initial'),
]
operations = [
migrations.AlterField(
... |
f2df1ee7bc91947da02742ede8fb661a23f2d155 | cbb0904fd22012362b341672c94433bb94b197f7 | /data.py | b619dcbaf3c8610512bafd81bf7a677b22fcab65 | [] | no_license | claudiaqw/uh-trec-covid | c0f43e6d57fdb3f2ae71952f641099b3a700018e | 52b0d3000820987f9ec419c0ba3142a8189516e7 | refs/heads/master | 2022-09-10T21:17:52.118395 | 2020-06-04T01:16:43 | 2020-06-04T01:16:43 | 266,202,694 | 0 | 0 | null | 2020-06-04T01:16:44 | 2020-05-22T20:36:52 | null | UTF-8 | Python | false | false | 2,031 | py | data.py | #!/usr/bin/env python
# coding: utf-8
import re
import os
import json
import gzip
import tarfile
import itertools as itt
from xml.etree import ElementTree
from tqdm import tqdm
METADATA = "./data/round2/metadata.csv"
TOPICS = "./data/round2/topics-rnd2.xml"
VALID_DOCS = "./data/round2/docids-rnd2.txt"
QRELS = "./dat... |
83079896ddd8defc67780f4bf4fff2127d2c1dc5 | 39a8eac0b7569e5d52becc1b232a6e203ed3c221 | /models.py | 5bc929c66a10bb07816c34ceca9ecc18ed8c9c89 | [] | no_license | samilAyoub/word-frequency-calculator | 50a3ad5dc9977bf1776ea0fba1fb191eca04d17a | b9c536c668a19830c396981db81d27406edc1dc8 | refs/heads/master | 2022-12-30T09:59:28.622914 | 2020-10-21T20:18:54 | 2020-10-21T20:18:54 | 303,203,371 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 431 | py | models.py | from flask_sqlalchemy import SQLAlchemy
from sqlalchemy.dialects.postgresql import JSON
db = SQLAlchemy()
class Result(db.Model):
__tablename__ = "results"
id = db.Column(db.Integer, primary_key=True)
url = db.Column(db.String())
result = db.Column(JSON)
def __init__(self, url, result):
... |
f12768dbc738c9b0fa8b42f5bfe27f645cd93d49 | b28be3a68cdacc613c177af9c8430883b302575a | /lib/map_germany.py | 114ae0465b04b31253b60c24e8face999574b16d | [
"BSD-2-Clause-Views"
] | permissive | gerard/energynet | 6768a4424ac200f7f5fdb779afe42a1f70113772 | 9baf8ff7d1b0bf59ccc2c81616d9df4e72bc37db | refs/heads/master | 2021-08-23T03:02:46.379497 | 2017-11-26T09:50:54 | 2017-12-02T18:51:48 | 109,525,265 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,620 | py | map_germany.py | # pylint: disable=too-many-statements
from lib.map import Map
class MapGermany(Map):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.city("Schwerin", (468, 205))
self.city("Rostock", (514, 121))
self.city("Hamburg", (351, 202))
self.city("Hannover... |
a488fc9fb88872f93e512cdc7299e7d9fd8304ba | 985448c613e1c3264922c6de200c0905b8ed1196 | /Lw3/Lw3.3/Lw3_3.py | a993cc7b6a3c13ab1f1569f21cb10db8fbbf1c83 | [] | no_license | pavels-k/Numerical-methods | 76a248eae9ce2c4afd157c16cc400232eb5def58 | 1d97114c6e073fba4a249bca8214fa5d98f8bf0c | refs/heads/master | 2020-05-22T00:58:25.709927 | 2020-01-16T10:31:29 | 2020-01-16T10:31:29 | 186,183,564 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,810 | py | Lw3_3.py | import argparse
import numpy as np
import matplotlib.pyplot as plt
from numpy.linalg import inv
def get_points(file_name):
with open(file_name) as f:
x = [float(num) for num in f.readline().split()]
y = [float(num) for num in f.readline().split()]
return x, y
def mls(k, x, y):
x = np.arr... |
e081a260aaf8304a2d2a5700e337fcd15615abdb | c16a06c6a35b9409d4a38a2d9c2e57fd7faf34c7 | /notes/migrations/0018_auto_20161107_1902.py | 3fd6f628517f496afdd2a3e8870121fb2b0401cd | [] | no_license | plasmatiger/My-Note | f008714ad88f15b23e826bc5c6010a8abf762648 | 27d2ca77544391b1964377e88b3fc3718126fb2d | refs/heads/master | 2021-06-23T08:53:51.105585 | 2017-08-15T07:07:49 | 2017-08-15T07:07:49 | 100,347,652 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,329 | py | 0018_auto_20161107_1902.py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-11-07 19:02
from __future__ import unicode_literals
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('notes', '0017_auto_20161105_0634'),
]
operations = [
migrat... |
10936530840d6dce9c9394b0c927a119a3ddae6c | 23ab29a95be2a509a52c39997bbe7f3af3c48180 | /project/mouse_click_dot_nowhile.py | a0ea063cfb8b6be0f3049a440e27ddcdad62b1d6 | [] | no_license | kig6347/vision | 6a68b3a808ba186fa170775b3314d07a2e89a0e6 | f6896339bcf70002f948e636a58d4ffffce3ffea | refs/heads/main | 2023-02-04T12:45:50.458733 | 2020-12-28T08:41:21 | 2020-12-28T08:41:21 | 323,661,172 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 568 | py | mouse_click_dot_nowhile.py | import numpy as np
import cv2
# 마우스 이벤트 콜백 발생 시 함수 실행
def mouse_callback(event, x, y, flags, param):
if event == cv2.EVENT_LBUTTONDOWN:
cv2.circle(img, (x, y), 10, (255, 0, 0), -1) # 도형함수
print("키눌림")
cv2.imshow('image', img)
img = np.zeros((512,512,3), np.uint8)
# 마우스 이벤트 콜백 받을 윈도우 창
cv2.name... |
98b2a04a82e7ee194794633554dc4ff18f830811 | 91d9f072f39a1ae0ca27f9878ae4c2941173e75a | /Problem 46 - Tic Tac Toe.py | 789edd74bc2e755123b7f5f8babd67b5f4dcc024 | [] | no_license | Hazmo/CodeAbbey | af6fb43fcc517ce26f307e4c449f110bfe807e55 | d02616c1e3cb82c633168e1ffda59abfea2ff92e | refs/heads/master | 2021-01-20T08:48:52.502469 | 2015-07-07T14:20:07 | 2015-07-07T14:20:07 | 38,216,358 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,265 | py | Problem 46 - Tic Tac Toe.py | def move(x, mark):
row = (x - 1) / 3
col = (x - 1) % 3
board[row][col] = mark
def checkFor3(list):
if 0 in list:
return False
elif all(x == list[0] for x in list):
return True
else:
list = []
return False
def checkBoard():
checkList = []
for row in range(3):
if checkFor3(board[row]):
ret... |
14d94c5cf12376b26cb551f72b7693cc01a3e663 | ef8961faa5b274b279cdd4e9e9140cdad578107e | /mcat/models.py | 3d6c663a46cf6a69e98c6990607cdfd5c775002e | [
"MIT"
] | permissive | synw/django-mcat | 5c9ededfd85fe1d57ef4c4644c16fb6a42e873b5 | 1c52512c490fad0e1ac3ea4e08b3203e98f315c8 | refs/heads/master | 2020-04-06T14:35:57.436453 | 2017-05-29T13:27:47 | 2017-05-29T13:27:47 | 54,891,379 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 12,693 | py | models.py | from __future__ import print_function
from collections import OrderedDict
from django.core.urlresolvers import reverse
from django.db import models
from django.utils.translation import ugettext_lazy as _
from mptt.models import TreeForeignKey, MPTTModel
from jsonfield import JSONField
from mbase.models import MetaBaseO... |
624327b20e65db78e727a43974dafe55fd04e8dc | f7ac0f4e0493cacc0fbbf7961b92d0bd53702445 | /Project Euler/p40-50/p41.py | ae981605053b146e9275c7d3463ef1feee7a735b | [] | no_license | shankarapailoor/Project-Euler | 40a2bf023a059636ea6a3f4371e305e8cb517a48 | 00c30ecfb5b95885fcd63db0b9b19a4426e86735 | refs/heads/master | 2016-09-11T05:57:45.582231 | 2013-07-15T01:05:58 | 2013-07-15T01:05:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,170 | py | p41.py | #We know that any 9 digit pandigital number is divisible by 9
#since the sum of the digits is equal to 45.
#Similarly and 8 digit pandigital number is divisible by 3
#Thus the solution space is reduced to finding any 7 digit
#pandigital number. If there weren't any I would just go down to 6
from copy import deepcopy
... |
002bbd4efb6d890df019b332d5ad5e0a377ba307 | b52a9882826d16bf7aae14f19858236c77630176 | /P17/p17p5.py | 0474369ff82232f37ce3899cf381c1803f7fbd5a | [] | no_license | dan-mcm/python-practicals | 4966ca1fc4bb338a5e7144bb52c16f43da9998e6 | e35b2e3248253faa640eac91d532818a9ca0fd29 | refs/heads/master | 2021-09-04T06:47:13.157812 | 2018-01-16T21:27:08 | 2018-01-16T21:27:08 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,453 | py | p17p5.py | # Psuedocode
##
##def isPalindrome(s): //creates function to check if input is a string
## '''checks whether a string s is a palindrome'''
## if type(s) == str: //if input is a string return true otherwise return false
## print('About to return True from isPalindrome as input is string')
## re... |
a2b1a457559b33483e4a11990b7689770774810c | 80301f1cffc5afce13256e2ecab6323c5df00194 | /cn.sc/py/T2100.py | 0ec70707d3df59704a93f4cf7bf0cc939d4a6391 | [] | no_license | ZhenjianYang/SoraVoiceScripts | c1ddf7c1bbcb933243754f9669bd6b75777c87b9 | 94a948090aba0f63b10b2c69dc845dc99c822fc4 | refs/heads/master | 2023-04-18T04:54:44.306652 | 2023-04-06T11:15:17 | 2023-04-06T11:15:17 | 103,167,541 | 43 | 11 | null | 2021-03-06T08:52:54 | 2017-09-11T17:36:55 | Python | UTF-8 | Python | false | false | 237,861 | py | T2100.py | from ED6SCScenarioHelper import *
def main():
SetCodePage("gbk")
# 卢安
CreateScenaFile(
FileName = 'T2100 ._SN',
MapName = 'Ruan',
Location = 'T2100.x',
MapIndex = 1,
MapDefaultBGM = "ed60012",
Flags ... |
2db1f667efac513d6cb18584d0c86c1e02b33c6f | 57490f8c2eb80cb2858a171e6d9df88339267f96 | /media/migrations/0102_auto_20201117_1600.py | f73b821f908f0d83ff9e3e8c2d581771f9506fd5 | [] | no_license | thomas76943/MediaDB | 41435d84b9cfe9bc26b662f8ee9d568540d5a1da | 3658ae30512bf93bb75ae18657607a2545acb88a | refs/heads/master | 2023-04-10T07:32:42.194838 | 2021-04-24T16:28:53 | 2021-04-24T16:28:53 | 306,884,726 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 919 | py | 0102_auto_20201117_1600.py | # Generated by Django 3.0.3 on 2020-11-17 16:00
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('media', '0101_auto_20201117_1548'),
]
operations = [
migrations.RemoveField(
model_name='televisiontagmapping',
name... |
a08a0320ffb3ffbe7cfc055b9cff3e0e35a8253a | ef00ac7eafaa41b9c5d929d1d6364e1899eb4895 | /robot_smach_states/src/robot_smach_states/world_model/get_show_map.py | 5d2e67de246412ff47fd4e61f61a8155146bc047 | [] | no_license | tue-robotics/tue_robocup | e9b1eca810ea1176425ac3f62aab66625f92622b | 092a354315b9b2c08e32cdc049791d82dfd47745 | refs/heads/master | 2023-08-15T10:44:13.593468 | 2023-08-08T18:10:59 | 2023-08-08T18:10:59 | 27,433,386 | 39 | 14 | null | 2023-09-06T07:00:59 | 2014-12-02T13:21:13 | Python | UTF-8 | Python | false | false | 4,969 | py | get_show_map.py | import cv2
from datetime import datetime
import os.path
from PyKDL import Vector
import rospy
import smach
from robot_smach_states.human_interaction.show_image import ShowImage
from robot_smach_states.util.designators import check_type, is_writeable, VariableDesignator
class GetMap(smach.State):
def __init__(
... |
3e61f81a8107a8075c99a7247565d1fe2ba30376 | 240d0255fd3dcc2b81b2e38f3afaf4c8009bdf8a | /rans/rans_test.py | 776022e8832192e6639f20d4871ec6e4ea955cd9 | [] | no_license | katalinic/bbans | ab8895c73c07d83beeacb9e37e95b1302dc4bdf1 | ff757d92b78fa3b703a4e3a754725d8622ba2285 | refs/heads/master | 2020-07-21T20:08:38.370373 | 2019-09-23T17:04:36 | 2019-09-23T17:04:36 | 206,963,895 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 863 | py | rans_test.py | import numpy as np
import rans
def test():
rng = np.random.RandomState(0)
K = 8
L = 1000
starts = rng.randint(0, 2**K, size=L)
freqs = rng.randint(1, 2**K, size=L) % (2**K - starts)
freqs[freqs == 0] = 1
assert np.all(starts + freqs <= 2**K)
print("Exact entropy: {:.2f} bits.".format... |
89317baacfbbd356af823d157505e1e254e40334 | 27aeb5fa6fea40e784e38a93026d338db2feac3d | /python/nlp100-2015/nlp100_py2/chapter4/code/make_mecabfile.py | 38650056eac1e158b6a233be19c855ecbc5e9b83 | [] | no_license | teanakamura/Training | 110cfa189d624e0d5c20544af585d7622d888209 | 20d1d8cb9b5777dcbad86ef81246d75634a6c285 | refs/heads/master | 2023-01-24T13:42:57.825891 | 2019-06-17T02:51:38 | 2019-06-17T02:51:38 | 192,236,355 | 0 | 0 | null | 2023-01-19T10:32:53 | 2019-06-16T20:59:00 | Python | UTF-8 | Python | false | false | 633 | py | make_mecabfile.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import MeCab
w_t_rel = os.path.dirname(__file__)
t_s_rel = '../data/neko.txt'
w_s_rel = os.path.normpath(os.path.join(w_t_rel, t_s_rel))
print(w_s_rel)
with open(w_s_rel) as source_f:
with open(os.path.join(os.path.dirname(w_s_rel), 'neko.txt.mecab'), 'w') ... |
ed2858b438dd53b26c3f0461450e36de91557717 | bc4d367d0f8ae98bfe8114466fba5810349a826b | /day3/unnitTestDemo.py | 560c605c509651794a43cd306d47cd54ca6dc4fc | [] | no_license | zhangkaili1/pythondemo | 791720bf496557e909d0ef78e1b83ffaf4d75e36 | 1440eb3b964685496c142032059385fd9dabfc19 | refs/heads/master | 2021-08-23T04:13:29.502924 | 2017-12-03T06:57:30 | 2017-12-03T06:57:30 | 112,907,611 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 913 | py | unnitTestDemo.py | #测试框架是干什么用的
#最主要的用途是组织和执行测试用例
#1、导入unittest框架
import unittest
#2.继承unittest中的父类
#python中的继承直接用小括号表示
class Unittestdemo(unittest.TestCase):
def setUp(self):
print("这个方法将会在测试用例执行前先执行")
def tearDown(self):
print("这个方法将会在测试用例方法之后执行")
#编写测试用例方法
#只有以test开头命名的方法才是测试用例的方法
#测试用例方法,可以直接被运行
#普通... |
de9fefd00fa3924065f75120c98ce97e4d207a99 | 9b87b8c608e9ae60b47b657137194dcb0e3bee9e | /content/models.py | 316f0d4082ce0d0928c0ba7e7150679e74db36e0 | [] | no_license | spankratov/Codium | 5ad3b771ceb6bbced79092f26c9550a6e7b290a1 | cc1a51bda0db52e06a6f00551e3886fb8dc62dfa | refs/heads/master | 2021-01-17T05:38:15.344215 | 2016-03-25T16:53:51 | 2016-03-25T16:53:51 | 46,814,961 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,144 | py | models.py | """This module provides basic structure of content database.
Tables:
| Attribute: attributes of characters (health, mood, motivation, money, etc.
| Event: random events like finding cash and non-random like losing one's job.
| Action: actions like eating food, going to a party or sleeping.
| Property: ... |
13017c41920d9747250d5a6c532ee66bff5817b8 | f0a293f73accc35674fe977f77c3a83df39153a8 | /gym_vehicle/__init__.py | 4adc80045345960108fe9fc22459950617663585 | [] | no_license | xpharry/gym-vehicle | 2c20c72a2b8f144ae4fcfcd22ec809b1f76167ab | 862687c327c1307af7e710109f7d9e3ba041bcc8 | refs/heads/master | 2021-05-09T10:55:30.782977 | 2018-02-14T22:59:53 | 2018-02-14T22:59:53 | 118,980,005 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 824 | py | __init__.py | import logging
from gym.envs.registration import register
logger = logging.getLogger(__name__)
# Gazebo
# ----------------------------------------
# Catvehicle envs
register(
id='GazeboCircuitLargeCatvehicleLidar-v0',
entry_point='gym_vehicle.envs.catvehicle:GazeboCircuitLargeCatvehicleLidarEnv',
# More ... |
62867c524f4c47118bfebd746658bc115a43a16f | 2de64f83c5868b87c62facfee3be7d49eb4a2fc7 | /watch-pi.sh | c52770cf9650ba4d9f4f61c08f01e512d5ce31a3 | [
"MIT"
] | permissive | syntithenai/snips_rasa | b8778902ed5fdd6ce9b2793a5e69a1b8940ccd67 | 786c50a604784abe9df014e9f75795c2d9714235 | refs/heads/master | 2022-12-05T18:18:32.903781 | 2017-12-09T19:26:06 | 2017-12-09T19:26:06 | 110,387,073 | 2 | 3 | MIT | 2022-11-19T16:33:01 | 2017-11-11T22:55:15 | HTML | UTF-8 | Python | false | false | 1,606 | sh | watch-pi.sh | #!/usr/bin/env python
#encoding: utf-8
try:
import paho.mqtt.client as mqtt
except:
raise Exception("Please install paho-mqtt: pip install paho-mqtt")
import sys
sys.exit(1)
try:
import simplejson as json
except:
raise Exception("Please install simplejson: pip install simplejson")
import s... |
fee7e2989e5a4471d5a03863be75c4659028bf17 | 30fab5883483e593e6db502b36ab3a6b563120f0 | /PythonBasics/065.tuple/tuple03.py | f02dbbab01e39368722ef75a9ce98c63912f939e | [] | no_license | kzthrk/LearningPython | 46f68afeb45962ab9302cf26ed8fc46d4296c846 | 7cfc128c97787f45194d9b459ce8251d2a99dea0 | refs/heads/master | 2022-12-13T06:43:59.106531 | 2021-05-01T01:09:37 | 2021-05-01T01:09:37 | 235,022,442 | 0 | 0 | null | 2022-12-08T07:44:30 | 2020-01-20T05:02:02 | Python | UTF-8 | Python | false | false | 88 | py | tuple03.py | #!/usr/bin/env python3.8
tuple1 = ("1", "2", "3", "4", "5")
print(":".join(tuple1))
|
e31040ab56cd0a68ca66b83382e5be6cb0f099f6 | c5b4d174ace61dd5914ca99fb0f2c710d0182324 | /pypes/anat/__init__.py | 6d69f9833c1bd3365cb1d8e124c72401a1ee33fd | [
"Apache-2.0"
] | permissive | erramuzpe/pypes | 636c6b31023747a571af90390fd85b2dd6806dea | 3922d3162dc633b30961c036efdeb5d221ab1bfb | refs/heads/master | 2020-12-24T06:43:15.063955 | 2017-04-05T19:51:05 | 2017-04-05T19:51:05 | 73,461,509 | 0 | 0 | null | 2016-11-11T08:54:15 | 2016-11-11T08:54:14 | null | UTF-8 | Python | false | false | 127 | py | __init__.py | # -*- coding: utf-8 -*-
from .preproc import attach_spm_anat_preprocessing
from .cortex import attach_ants_cortical_thickness
|