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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bd16ce0ba1ff7f5dfe73f702e655bb1fcaf9d662 | fb58627ee71dffd54600b401e180581f071f6107 | /dailyReport/dailyrecord.py | d603f4bf43a763cf19f94f9e84c4562376188135 | [] | no_license | a214738076/genertec | 1aedc1c6793ac02e2280e6c337650e51bcb3d65a | bb53940e7357ffb060adeb69bf412b55933c2902 | refs/heads/master | 2021-02-20T10:05:33.655581 | 2020-03-12T05:21:29 | 2020-03-12T05:21:29 | 245,333,885 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,399 | py | dailyrecord.py | from django.http import JsonResponse
from dailyReport.models import tbdailyrecord
import json
# 日常数据录入
def insertDailyrecord(request):
tbdailyRecord = tbdailyrecord(
department = request.POST.get('department', False),
date = request.POST.get('date', False),
description = request.POST.get(... |
dc7e5159578ec7b6b44ef4bfb4c287662bee6e0b | a4ba28feaacf12d6274ef0e80c39667007da6465 | /pandas/old file.py | 58e2bae58fdf43543959dd6ac660e2a89426ea07 | [] | no_license | Cawinchan/Taiger_Interview | 813bd05d24e7f8d258df34df6100248c12d92d36 | 46e962d515f35dd7e64ee1b6e9bcb6f79534f2c4 | refs/heads/master | 2020-04-01T19:52:32.756613 | 2018-10-18T06:49:59 | 2018-10-18T06:49:59 | 153,575,974 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,364 | py | old file.py | import pandas as pd
from sklearn.feature_extraction.text import TfidfVectorizer, CountVectorizer
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import confusion_matrix, classification_report
from sklearn.model_selection import train_test_split
import nltk
nltk.download('punkt')
train = pd.r... |
de1d862114c872e5f09b54b5e1dc31c7351e789c | bfbc51d48bcf63751eeefbb63fd1101d3eeca1c4 | /2019/project1/group03/project/Classfication/wuyue/resnet.py | 5dd1caabfdfbc1a619a6d3c24a62078164392968 | [] | no_license | natibutu/deeplearning-math.github.io | b55cd1e6154f33db2b120003f1f0e487b9752d4d | a99407764f97291d351a618bb269dcd3b3294249 | refs/heads/master | 2023-01-30T11:27:18.038973 | 2020-12-16T11:46:59 | 2020-12-16T11:46:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,428 | py | resnet.py | from torchvision.models.resnet import ResNet, BasicBlock
import torchvision.models as models
from torchvision.datasets import MNIST
import time
from torch import nn, optim
import torch
from torchvision.transforms import Compose, ToTensor, Normalize, Resize
from torch.utils.data import DataLoader
import os
impo... |
7819433eb852ef026c1bf7c94bfbbe606ee4cb87 | 0c1cb2f68e72bed96a6d08580f03dabe82fc8f9c | /Lab2A_Loop_TFlesher.py | 2b8f0221fd1a3b41a45aff7bcb3426e0a6246876 | [] | no_license | PopTart-Destroyer/Python_MCCNeb | 049a00fe7aa160af24c7e1ef16062fdc69089b09 | 71e8125cc10e72acaac4759b950e41d3bf02bec7 | refs/heads/master | 2020-03-21T04:10:52.524798 | 2018-06-21T02:27:59 | 2018-06-21T02:27:59 | 138,095,293 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,018 | py | Lab2A_Loop_TFlesher.py | # T.J. Flesher
# Info 2900
# P. Phillips
# Lab2A - Try Looping
# Fahrenheit to Celsius or Celsius to Fahrenheit Converter
#display instructions
print("Enter 'C' to convert a Celsius temperature to Fahrenheit")
print("or")
print("Enter 'F' to convert a Fahrenheit temperature to Celsius")
#get user input
... |
b452552d63f17b8f046d96ed3eb2c06d518673d6 | d1cdaaecfdb110a5b6ea670293ee6bb8ce01daf3 | /album/models.py | 34d121d17a0f612bfce9ab48fe21eea074db197f | [] | no_license | lpanonymous/MemesAccesibles | 38253bb174483da9fe7ad568bcfb7e07cfb00c1c | da430686044788350dab495a60acc26b52c3e9e8 | refs/heads/master | 2023-02-12T06:44:18.507783 | 2021-01-11T23:50:43 | 2021-01-11T23:50:43 | 327,535,068 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,716 | py | models.py | from django.db import models
from django.db.models.signals import post_delete
from django.urls import reverse
from django.dispatch import receiver
class Category(models.Model):
""" Categorias para clasificar las fotos """
name = models.CharField(max_length=50, verbose_name="Nombre")
template = models.Ima... |
d54f004dcf833533659197f5624296cdb34f8b33 | 33ca5a05a6dfa1a4b37c9fd33c870743886cb87d | /11.盛最多水的容器.py | 93746859680c4c7de3827d7c551d0cb807352ca7 | [] | no_license | eadasfa/LeetCode | b6c06f57cc2db7a16d9e18661bb43b239ba48659 | 924b8643279c14bd32d3d8b4b982e463b23f162b | refs/heads/master | 2022-09-26T04:49:20.932243 | 2020-06-07T01:53:14 | 2020-06-07T01:53:14 | 255,844,958 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,747 | py | 11.盛最多水的容器.py | #
# @lc app=leetcode.cn id=11 lang=python
#
# [11] 盛最多水的容器
#
# @lc code=start
class Solution(object):
def maxArea(self, height):
"""
:type height: List[int]
:rtype: int
"""
# 左右两个指针,表示正方形范围
left,right = 0,len(height)-1
# 初始化最大为整个数组第0个和最后一个个的范围
max_ = ... |
9c668682059cb7ede3b0ae7b5041e4e8bfadcaca | bd995cf98d1314440306cdc310393367d3f7ef39 | /about/models.py | 1744b63b819a95f570a69ed803cd8c7c4216d0f8 | [] | no_license | josiahakinloye/citilamp_new | 127ac12c84ec1dcac0443c1d85e9d28dce5be042 | 8eceb2aea50512e272a142f1cc5115870f6ef597 | refs/heads/master | 2022-12-13T07:30:39.420658 | 2018-07-10T05:25:50 | 2018-07-10T05:25:50 | 134,711,221 | 0 | 0 | null | 2022-11-22T02:08:03 | 2018-05-24T12:18:59 | CSS | UTF-8 | Python | false | false | 1,774 | py | models.py | from django.contrib.auth.models import User
from django.db import models
from citilamp.models import City, Country
from tour.models import Tour, TourBooking
class TeamMember(models.Model):
date_created = models.DateTimeField(auto_now_add=True)
date_updated = models.DateTimeField(auto_now=True)
full_name ... |
2450bc3ca6dc2b3192313fb30eb47ab08fec9c36 | 609f5de6fc30f4ae3d01f8b902afe2739ea14106 | /mythread/MyGetPreBetDataThread.py | 15de02ad0355754ef0bfab1241ec4eb9500ec4e1 | [
"MIT"
] | permissive | anya-doctor/pycornucopia | 868c762c641b8d15619143b1b232dfb291caa753 | fcfb2d9c2a2ffacb68e47fd9b33e72e18a85c7ff | refs/heads/master | 2020-05-09T17:22:05.757420 | 2019-04-05T17:34:16 | 2019-04-05T17:34:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,782 | py | MyGetPreBetDataThread.py | # #coding:utf-8
import json
import logging
import requests
from PyQt4 import QtCore
from PyQt4.QtCore import *
from requests.exceptions import ReadTimeout
from common import common
from common.common import req_session
class MyGetPreBetDataThread(QtCore.QThread):
def __init__(self, mainWindow, console_instance,... |
67e0ee07b91381d7074bb8bc7099dc6fbb8f23d5 | 6308cd673685d29d1bfdc7a61765b82ddaa7cfdb | /twitter_list_fetcher.py | 78d8d7338dfc9d0868ed7d5488e00e36066ab846 | [] | no_license | sifue/twitter-user-to-csv | b19defa931e677d4113030e856811bcbee22bba4 | 24498bde4c550fe0a6c72d0a71dfa5f0358e4d14 | refs/heads/master | 2020-12-03T12:25:04.729118 | 2020-01-27T21:43:04 | 2020-01-27T21:43:04 | 231,315,590 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,302 | py | twitter_list_fetcher.py | #coding: UTF-8
import os
import csv
import twitter
import sys
args = sys.argv
print("Started args:")
print(args)
if len(args) < 5:
print("起動引数を[実行スクリプト名 リスト所有者名 リスト名 出力ファイル名 ラベル名]としてください。")
sys.exit(1)
# 取得したキーとアクセストークンを設定する
auth = twitter.OAuth(consumer_key=os.environ["CONSUMER_KEY"],
... |
cba5fedb2bd7963b926311528dcca3db3849964d | 979a6518599cac3fdb94c713a4f67a69c656f294 | /trainFinalModel.py | 84e290f22b09949fdfdb435cd137caf32578a8ba | [] | no_license | tim-day-387/titanic_classifier | 39ee24a56e515441f3150c627db5fd006d67ddac | c2cda5854f1ca878c78d15fdee330cd2c9b1a196 | refs/heads/main | 2023-05-18T01:02:58.242413 | 2021-06-11T03:25:04 | 2021-06-11T03:25:04 | 374,816,460 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,130 | py | trainFinalModel.py | # Imports
import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split, GridSearchCV
from sklearn.decomposition import PCA
from sklearn.svm import SVC
from sklearn.neighbors import KNeighborsClassifier
from sklearn.linear_model import LogisticRegression
from sklearn.ensemble import Random... |
d1b211a1f78f3a8177361833bcadee3b8f11cafb | 3b4a738479430e23dac3966039cbdfc6c666ad67 | /p3/task-6-python-struct-CapsLockAF/src/validate_subsets.py | a9a34765ab22dd5090d2608c4e7410b8adff84e4 | [] | no_license | CapsLockAF/python--tqa-hw-tasks | 2c121d3966edbf9b1a8212e8e4c410df6b7fa353 | 40ced4ee0106153a9d93ff37e09342fb5a5830d8 | refs/heads/main | 2023-05-09T11:00:28.282136 | 2021-05-31T10:23:45 | 2021-05-31T10:23:45 | 372,465,047 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 134 | py | validate_subsets.py | def validate_subsets(subsets, one_set):
for sub in subsets:
if not set(sub).issubset(one_set):
return False
return True
|
c34a38c2e323436bbc24ee896710e3a1eaa68e22 | 98965226148e8cff5dbac1ef76cc0dd20f34f236 | /API/parser/test_FileLoader.py | e930f2f16a4a549db2000e61ec590f5040bfa7c4 | [] | no_license | hpbl/WRITEME | 9217610b12c8cade914012a0cdb175d038841713 | d1b401d6711208b8d342c5b955e7f12733ef0a7a | refs/heads/master | 2023-01-21T03:01:39.403693 | 2021-06-24T15:31:32 | 2021-06-24T15:31:32 | 188,092,788 | 14 | 13 | null | 2023-01-06T13:21:06 | 2019-05-22T18:27:12 | JavaScript | UTF-8 | Python | false | false | 4,054 | py | test_FileLoader.py | import unittest
import csv
import os
import collections
from API.parser.FileLoader import load_csv_file, load_markdown_file, get_markdown_file_names
class FileLoaderTestCase(unittest.TestCase):
"""File Loader test case"""
nonexistent_csv_file_path = 'API/parser/nonexistent_file.csv'
existent_csv_file_path... |
7d37ec1140ea339ed665f4d3c2060301f4520d7a | 691163a903b96c0cc0518d65869385ac7b3c7c39 | /src/pySrvStats.py | 0afc0891c67170a7f125ab041fea75109b5a5b4c | [] | no_license | blunttester/serverstatus | f07f077031a20e7c033a5fbe4ec2ed7e269bddc0 | 91a6f7fd83392e42f445ab8e291da77c227c9ef7 | refs/heads/master | 2021-05-27T03:02:22.725156 | 2014-10-11T08:08:57 | 2014-10-11T08:08:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,530 | py | pySrvStats.py | '''
Created on 31.7.2013
@author: janmatilainen
'''
import subprocess
class SrvStats(object):
'''
classdocs
'''
def __init__(self):
'''
Constructor
'''
def cpu(self, appname):
self.appname = appname
"""Return float containing CPU -usage used by defined app... |
47b136f3dbf84282767253d700225ef9a19e3ee7 | ecd14dab1c8c988cb7734a937cf450b535528f8a | /result_handler.py | 8b10baee892172e2983444f4bbeb659fbf3e7d45 | [] | no_license | snirvt/GA_formulas_generator | d32e62e1c3d72f100ba59254567e445f8b2fbfe5 | ccd407959619fc19032da9add4f1f1b22724e44f | refs/heads/master | 2020-12-27T14:31:05.302930 | 2020-11-15T15:35:14 | 2020-11-15T15:35:14 | 237,936,320 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 905 | py | result_handler.py |
import pandas as pd
from openpyxl import load_workbook
class Result_Handler():
def __init__(self):
pass
def save_to_file(self, path, sheetName, df, append = False, header = False):
try:
book = load_workbook(path)
writer = pd.ExcelWriter(path, engine='openpyxl')
... |
2e1a66440b2ce1bc7cb911aa6a84867de2fd8637 | 8ed80561e1b3c0bcdb6201cae8af845d5da23edc | /guppe/exercicios_secao_5/ex_40.py | a37e87eaf43711e8a37425c4e5611c7a9e1bc78c | [] | no_license | Fulvio7/curso-python-guppe | 42d5a1ecd80c1f3b27dc3f5dad074a51c9b774eb | 98966963f698eb33e65ed58a84f96e28f675848a | refs/heads/main | 2023-08-28T13:31:12.916407 | 2021-10-09T19:03:17 | 2021-10-09T19:03:17 | 415,393,122 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 725 | py | ex_40.py | """
40- Leia o custo de fábrica de um carro novo e calcule o custo do
consumidor. Utilize a tabela abaixo:
CUSTO DE FÁBRICA COMISSÃO DISTRIBUIDOR IMPOSTOS
<= 12000 5% isento
> 12000 <= 25000 10% 15%
> 25000 15% 20%
"""
custo_fa... |
9e828ec338e6bb7832a6baf74e71743142aa9fe8 | 4f81a40ccb8043772e45ad4470747675de476e6e | /pi88reader/ni_analyser.py | ebe7ada1f1effbe15de5221a8bbbfb6cadbd408a | [
"MIT"
] | permissive | natter1/pi88reader | 5bc62c18ba581196f4dd359141d804a0863ad75f | 44e12716afbe43a6ce0bca4596597df5fe68f191 | refs/heads/master | 2022-11-06T20:05:14.997617 | 2022-11-03T12:53:44 | 2022-11-03T12:53:44 | 217,832,584 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,607 | py | ni_analyser.py | """
@author: Nathanael Jöhrmann
"""
import math
from typing import Iterable, Tuple
import numpy as np
from scipy.optimize import curve_fit
from pi88reader.pi88_importer import SegmentType
def calc_stiffness(fit_A, fit_hf, fit_m, h_max, **_):
S = fit_A * fit_m * (h_max - fit_hf) ** (fit_m - 1)
return S
def... |
bec4449a062acaba1f4c1faf17c36ba0f093252d | 2ed4a27966fc482784cc4fb23def538ca3e8679b | /build.py | 496a3e18dc62485ca21425c6bdf080c6cae7453a | [
"MIT"
] | permissive | hornercodingclub/hornercodingclub.github.io | ed44be1dadba4cd69eead7905f203ae480eeedc7 | 9c103974e1d3a5b184a050ed5518ce31221adf4f | refs/heads/master | 2021-06-14T01:12:24.466067 | 2020-12-02T16:29:26 | 2020-12-02T16:29:26 | 254,465,501 | 3 | 11 | MIT | 2020-05-26T23:45:39 | 2020-04-09T19:54:23 | HTML | UTF-8 | Python | false | false | 837 | py | build.py | import os
import subprocess
import sys
try:
import jinja2
except ModuleNotFoundError:
subprocess.check_call([sys.executable, "-m", "pip", "install", "jinja2"])
import jinja2
SOURCES = f"{os.path.dirname(os.path.abspath(__file__))}/src/"
FILES = {"index.html": {}, "projects-2019-2020.html": {}}
TEMPLATE = ... |
0c66278666ccb7a63a9dc6e4c457a027e6f01d8e | fb68c14ad4da2ae22b7fd63e76fdd4ef0920b829 | /python基础知识/text_put up.py | 97de0f9355cdc121c64b2fa2708b9cd287ab183e | [] | no_license | sunseayuy/Python-VScode | 6fd0b58f8ec1a3a068871815d40c086edd2c583d | 975b8acec7a744d756fa660e81e457a1146fd0d4 | refs/heads/master | 2022-12-30T00:33:42.566867 | 2020-10-14T13:50:04 | 2020-10-14T13:50:04 | 298,756,739 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 24 | py | text_put up.py | print("成功了吗!") |
3cc2a3151d4e5571626bfb907190015944970131 | 40518469f0b8ebb5129041f18c3c47ee5ffae72b | /mainsite/views.py | 24a7ed450c67788d2f703f1ee0ea358156f8b865 | [] | no_license | naziafakhruddin/playgroupsite | 2c17085b4b411f1bec6832eb7adca0f17b95018a | 2c078ba136a1461fcbb8af35940c0df056025429 | refs/heads/master | 2021-01-01T17:13:27.765314 | 2017-07-22T19:31:18 | 2017-07-22T19:31:18 | 98,027,817 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 279 | py | views.py | from django.shortcuts import render
# Create your views here.
def base(request):
return render(request, 'base.html')
def aboutus(request):
return render(request, 'About_us.html')
def ourteam(request):
return render(request, 'Our_team.html') |
e3964e8dddd14cb74254cb306f1d420a0fa44908 | 20e97864e2330c386a8385bd12982cddb140a55d | /Motivator/volunteering_module/migrations/0005_auto_20210425_1355.py | 3c0bd8ac956dc85d2aa0886f92eef7cc13b623c7 | [] | no_license | nnbzh/Motivator | 6624d75c281118bfc23f8a5ed5350d23c8149a83 | 86a4bb4f08524ef54ef4d3f88935b46e3c816e58 | refs/heads/main | 2023-04-30T04:05:21.472519 | 2021-05-13T14:55:52 | 2021-05-13T14:55:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 594 | py | 0005_auto_20210425_1355.py | # Generated by Django 3.1.6 on 2021-04-25 07:55
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('volunteering_module', '0004_auto_20210419_1736'),
]
operations = [
migrations.AlterField(
model_na... |
d32303b46d6296f3861bab78597dfe579d8a2408 | ec6bb98844f6eae0cad5c645eba4a181d9d7ba57 | /src/zope/traversing/tests/test_skin.py | 91b8d7ba1aadc150bcc9aba6553fc59f01643aa5 | [
"ZPL-2.1"
] | permissive | zopefoundation/zope.traversing | 005061dc8bcbcece5abe298317375b4f5382084d | a8f40cdc5af82baa9cc863568ad4a027dafdfa5c | refs/heads/master | 2023-06-21T18:54:28.478098 | 2023-03-30T06:15:06 | 2023-03-30T06:15:06 | 8,146,518 | 0 | 3 | NOASSERTION | 2023-01-09T15:38:42 | 2013-02-11T20:57:40 | Python | UTF-8 | Python | false | false | 1,833 | py | test_skin.py | ##############################################################################
#
# Copyright (c) 2001, 2002 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# TH... |
1c340e02aedbac4993b299bfd9d1f3e50d099f78 | c58354921b42a1551e05f7ac156064b76de8507e | /create_submit.py | 7f8265f2f91d77d38b59fe13837a2cf619068666 | [
"MIT"
] | permissive | sergiossc/lloyd-gla | 3aebe6e558bb3cc980838fa450a727a0e007872c | 34502046a0054cf262dc756d60b6712697186dad | refs/heads/master | 2023-03-08T12:52:49.275287 | 2021-02-20T21:59:08 | 2021-02-20T21:59:08 | 287,768,213 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,359 | py | create_submit.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@author: sergiossc@gmail.com
"""
import numpy as np
import uuid
import json
import os
from utils import *
import sys
if __name__ == '__main__':
profile_pathfile = 'profile.json'
with open(profile_pathfile) as profile:
data = profile.read()
... |
a5d316a6b508a79847f7ce187907cd0c8e91140f | 54547c62c4b4ccbf7b28007e34e4c239848d8411 | /RIPFall2014P1/part 3/question3_problem2.3.py | 71833e7ed9907dfe882919ec78920ac55fc904db | [] | no_license | btanikella/Robot-Intelligence-Planning | 28cb8c016d57552c27f0136c704064d7ad8c6ed2 | 12b3cbac80024eef912b64b789b2f1168f9abace | refs/heads/master | 2020-05-20T06:31:53.945017 | 2015-01-02T20:41:37 | 2015-01-02T20:41:37 | 28,724,039 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 644 | py | question3_problem2.3.py | #state representation of 3rd problem (Problem 2.3 from Homework)
#the places where the robot can move or access are E and F
world_map = ['WWWWWWWWWWW',
'WWWWWWWFEEW',
'WWWWWWWFWEW',
'WWWWWWWFWEW',
'WEREBEBEBEW',
'WEWEWEWEWWW',
'WEEEEEEEWWW',
'WWWWWWWWWWW'
]
print "Here is our representa... |
15728aef74ca80b8a8ee6de67f43994b14e9ead0 | 17821ba5f1345bcb5181092cec7808e08355abd0 | /PyQT_idea/template/main.py | 4d6936373bc68fc5c9336af519689737b2462007 | [] | no_license | Coni63/scripts_Python | be1a416dc702c919120645f2946596c68a6a3fbb | b1ac0bee706504abcc86fd7a72b8ec625ffa12b3 | refs/heads/master | 2021-07-11T16:50:56.719758 | 2018-02-25T12:19:29 | 2018-02-25T12:19:29 | 95,472,736 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 356 | py | main.py | from PyQt4 import QtGui, QtCore
import sys
import os
import Controller.functions as func
import Controller.classes as classes
if __name__ == "__main__":
SETUP = func.load_init()
app = QtGui.QApplication(sys.argv)
Main_Windows = QtGui.QMainWindow()
ui = classes.Window(Main_Windows, SETUP)
Main_Wind... |
09a012c7a391ff11071880932dbf6163210eb4f9 | 4c269c8eb1cb0f51036ea5918df5e6ebde4755f3 | /bbsQuestion/spiders/questioner.py | d94a3685b2fac83fd564816c49df28e063a8eaf6 | [] | no_license | heamon7/bbsQuestion | 8f67e104b5d5ea78b0b65482c38a12e937a40b98 | 837704411edd83975a096714be7df1796753838f | refs/heads/master | 2021-01-16T19:33:26.401501 | 2015-05-18T17:42:55 | 2015-05-18T17:42:55 | 35,657,914 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,782 | py | questioner.py | # -*- coding: utf-8 -*-
import scrapy
from scrapy.shell import inspect_response
from scrapy.http import Request,FormRequest
import re
import leancloud
from leancloud import Object
from leancloud import LeanCloudError
from leancloud import Query
from scrapy import log
from scrapy.exceptions import DropItem
from bbsQu... |
177fa81e81119e6e1fcb94a05e4a7dfb7b0e528c | bf4f3afec8b52518f0898a3d01605894c9d5f3de | /image_db.py | 2970f2e16168b32d6860af7f8059ef03fae6e7e6 | [] | no_license | ghkdxofla/KakaoRESTful | db55b33879197002413b0cf23eacf418d939e32e | 5474656701f61cadcccc271f292260d362a41e13 | refs/heads/master | 2020-03-29T15:03:02.196963 | 2018-10-04T09:54:27 | 2018-10-04T09:54:27 | 150,041,935 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,449 | py | image_db.py | '''
Date : 2018-09-28
Author: Hwang Taelim
Content: DB for famous paintings
'''
from pymongo import MongoClient
class DBConnect(object):
def __init__(self, host="127.0.0.1", port=27017, db="admin"):
print("--INIT MONGODB CONNECTION--")
self.client = MongoClient(host=host, port=port)... |
5d7093485b9c64ec88648441d933c9ca020153f4 | 487a889fb3083d7b7b146c919263ad9b4458dfc4 | /src/data_management/interface.py | bcfd75405bed4c3f2f582b32646a3cc12d6eb81f | [] | no_license | aladinD/WhatIfAI | 7819e9f70ef26683fa414756a7008ad70d4e9ecd | 1cb78161d64aa5bc454ae6e15aa8bfc7b10f9ffd | refs/heads/master | 2023-01-12T06:01:36.780374 | 2020-11-19T15:21:50 | 2020-11-19T15:21:50 | 314,286,586 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,752 | py | interface.py | """provides the interface for data_management"""
import os
from abc import ABCMeta, abstractmethod
import joblib
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
class PreprocessDataInterface(metaclass=ABCMeta):
"""Edit doxy !!!"""
NUMBER_ALGOS = 3
PCA = 1
S... |
16ff26675c384749c77bc2d044e13d184b2b12b9 | 8e26797edc5cb2bd3650fee5268d41f0bb8e0fbc | /api/serializers.py | 2911389229511e04f00afaf4e6d64611cadc0954 | [
"MIT"
] | permissive | jmaslanka/rss_scraper | 20289b966049624064a5612102943fc4a23db219 | f84a336c900aa5ccd7753da854fdc574c1f42720 | refs/heads/master | 2021-01-03T11:03:15.696292 | 2020-02-12T21:42:30 | 2020-02-12T21:42:30 | 240,053,121 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 232 | py | serializers.py | from rest_framework import serializers
from .models import ExchangeRate
class ExchangeRateSerializer(serializers.ModelSerializer):
class Meta:
model = ExchangeRate
fields = ('currency', 'rate', 'updated_at',)
|
925e4b134769bf2ac1c529e4516244b21cc38ea1 | 52a3da11250c51c3ad888fa5098f9ebab294d3ab | /尺度.py | 20e1b0f6a57b157e735c21fd606f2070c3d8b375 | [
"Unlicense"
] | permissive | BruceWayne2099/Python-Gui | fe4772894a5fdba66a6fc15014f3431c48916f97 | 0807fb6a5a0d2c97924f79f16f74f7b0c5a6d07a | refs/heads/master | 2022-04-19T12:53:04.860199 | 2020-04-19T09:57:49 | 2020-04-19T09:57:49 | 256,965,928 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 539 | py | 尺度.py | import tkinter as tk
window = tk.Tk()
window.title("尺度")
window.geometry("200x200")
l = tk.Label(window,bg="yellow",width=20,text="empty")
l.pack()
def print_selection(v):
l.config(text="当前选择的值是:" + v) #V就是传入值也是获取的长度
s = tk.Scale(window,label="想要多少台",from_=1,to=20,orient=tk.HORIZONTAL,length=200,showvalue=0,t... |
444f11b21590ee25642e28f2354bafaeeadc89fb | 595fc1045d5bd0e70edab755a355da2d6ba2e774 | /Bubble.py | 1caa85c55a1c4e10884ec87823529e5f19179d95 | [] | no_license | dablu123/python | 95bb179457ef55e3ec5f9c70c3c761b6f7fa59d5 | bbd4af906efcb436aaac94a0032deccf2dfaa351 | refs/heads/master | 2022-06-12T11:52:33.383778 | 2020-05-02T07:16:20 | 2020-05-02T07:16:20 | 260,630,392 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 261 | py | Bubble.py |
def sort(nums):
for i in range(len(nums)-1, 0, -1):
for j in range(i):
if nums[j] > nums[j+1]:
temp=nums[j]
nums[j]=nums[j+1]
nums[j+1]=temp
nums = [5,3,9,6,2,7]
sort(nums)
print(nums) |
12fd16ad03f1430667c0f68e54cc7670d9422782 | 0d397aabb4e0227481ec81df0c4376285b541c4e | /VASP/vasptool.py | b9893d9061a75e417a1cbf5ac5771133a37dee43 | [
"MIT"
] | permissive | The-Earth/PyGadgets | 6d6ddc32291ba3c8a02dd4786f28f272cf7eeac6 | b9da4748402d97e44b8b9962c5d719696ad74c3a | refs/heads/master | 2021-05-06T04:52:44.123257 | 2019-07-18T03:49:18 | 2019-07-18T03:49:18 | 114,991,754 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,395 | py | vasptool.py | from collections import OrderedDict
class OUTCAR:
def __init__(self, filename='OUTCAR'):
self.filename = filename
# get text
self.__text_list = list(open(filename, 'r'))
# find poscar
self.poscar = [] # TODO use POSCAR class
'''
poscar is inform:
[... |
4b94fac1602166fad80982528906513849c5f3f8 | 52b96f4ec73db379f5ea92ef754707d256ad4a44 | /tensorforce/agents/dpg.py | 9faff2cda2e1b4dd8b530fa8edb38a57e2ef3804 | [
"Apache-2.0"
] | permissive | JNC96/tensorforce | 26976a49c301ccf626c6eb3ba8df9bb7bd588b0f | f691d1b5cc4a328f18712a14105fd90335bd3d3c | refs/heads/master | 2020-07-28T18:53:24.083825 | 2019-09-11T22:41:30 | 2019-09-11T22:41:30 | 209,500,374 | 0 | 0 | Apache-2.0 | 2019-09-19T08:20:32 | 2019-09-19T08:20:32 | null | UTF-8 | Python | false | false | 3,629 | py | dpg.py | # Copyright 2018 Tensorforce Team. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... |
e6ecb226d24866912fd37edeec76961fa5850015 | 6d7acbfcb8c6ada0f76f9f31431d2c77c164f2d5 | /assignment 5.py | 4149e371b2c80f4c53082ad299076c5a7b611d17 | [] | no_license | saurav2525/python- | f1b11913c935fa44551b03c0ab7c76caaf90a621 | dd911ec14797b4e91f6632fe7e0c34c363c7754f | refs/heads/master | 2020-03-27T10:21:36.420646 | 2018-10-07T13:52:08 | 2018-10-07T13:52:08 | 146,414,653 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,198 | py | assignment 5.py | #Verify Leap Year
year=int(input("enter the year"))
if((year%4==0) or (year%400==0) and (year%100!=0)):
print("leap year")
else:
print("not a leap year")
#Check Whether the Given Dimensions Are of Square or Rectangle
leng=int(input("enter the length"))
brea=int(input("enter the breadth"))
if(leng==brea):
pr... |
28ab2dfca54e557b9513baffd6ce3678fc8e8003 | b0ce95ccbee016735b704b783aed34c04b777d0d | /requirements/lib/python3.6/operator.py | 3c02ace50aa0ff2249599411114d1a0f92ea959b | [] | no_license | claalmve/RL-Project-Materials | 5c34a7890c31c2e4d10c4c58b17ed2ad82e16597 | e62d26cc6ae94f0c7a92db5d25ac1b5ecab04814 | refs/heads/master | 2020-04-14T02:20:19.121790 | 2018-12-31T04:02:02 | 2018-12-31T04:02:02 | 163,580,818 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 49 | py | operator.py | /Users/calvin/anaconda3/lib/python3.6/operator.py |
69e7e618db4d750d384d43cebdbcaf373a4eea56 | b506789008cc5f4b29d94b737412d6d7bd303b83 | /src/recipeScraper/spiders/pingo_doce.py | de31012d1f9c8d1850bd95a0671d67bd6b2dad90 | [] | no_license | byTech-PGI-2018/RecipeScraper | 9560c617c0351f27fedd59d5bd5ae60707a9f132 | feffa49fb76557f32b81639e823c87cd1e3c0563 | refs/heads/master | 2020-12-09T13:34:13.164449 | 2020-01-31T22:14:37 | 2020-01-31T22:14:37 | 233,320,391 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 6,577 | py | pingo_doce.py | # -*- coding: utf-8 -*-
import scrapy, json
from scrapy.selector import Selector
class PingoDoceSpider(scrapy.Spider):
name = 'pingo_doce'
#allowed_domains = ['https://www.pingodoce.pt/receitas']
def __init__(self, pagestart='', pageend='', **kwargs):
# Create base URL's that crawler will visit,... |
acae6c63eda001dac83b1dfd7d0ce6dbf005c01b | f5fee29713f58e11cec4423f973ba5007d44e4cf | /first.py | 4419410637f7eadf0a47f78e563bac7fee383216 | [] | no_license | sixsymbols/Lesson1_GB | ff3571562f9796309d3d3d6016feabacc19fc2ba | c17d507027bd572f7b7fc2198c324b96f2a49d86 | refs/heads/master | 2022-12-26T06:04:19.510977 | 2020-09-29T10:12:48 | 2020-09-29T10:12:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 395 | py | first.py | name = "Саша"
age = 26
print("Меня зовут" , name , "Мне" , age)
string = input("Введите строку - ")
number = int(input("Введите число - "))
string2 = input("Введите вторую строку - ")
number2 = int(input("Введите второе число - "))
print("Ввведенные значения - ", (string, number, string2, number2)) |
3ec862d0080ebc1d60b0512ad3e5e063ee96c76d | 53b3d7f561874e33a19e545434cb5a1b71e694c6 | /storj/__init__.py | b8cbf83c98478a24273ee5398a442cfa093acd24 | [
"MIT"
] | permissive | steenzout/python-storj | 55a054c14b0d0e1691290033d18e512acd19d655 | cd2b5fa1a906e8cf8b49333e1b415893caa444a9 | refs/heads/master | 2021-01-17T06:12:31.201528 | 2017-08-12T06:46:49 | 2017-08-12T06:46:49 | 65,912,719 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,802 | py | __init__.py | # -*- coding: utf-8 -*-
"""Storj package."""
import io
import logging
from abc import ABCMeta
from .api import ecdsa_to_hex
from .configuration import read_config
from .http import Client
from .metadata import __version__
from .model import Bucket, File, Token
logging.getLogger(__name__).addHandler(logging.NullHa... |
5752f65d3ffe625652d1cf02581d2ce65f61cb87 | 61efd0ac2aa3ef8c12467296bd4e847a90484aa3 | /UsingEO.py | 3781d19596251cefb1c9f4119d040fc22ff0fb1e | [] | no_license | bjmvandijk/Eindopdracht | f82fd908b092eb1ba30b798c8f97dbdcdf25890b | 675ca1d154dca947b52979c769df03062b0322cc | refs/heads/master | 2021-01-22T22:53:21.215194 | 2015-07-03T14:07:22 | 2015-07-03T14:07:22 | 37,124,711 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 798 | py | UsingEO.py | from Eindopdracht import *
a = Constant(2.0)
b = Constant(3.0)
d = Constant(10)
c = ( ( a + b ) + d ) + (( a + d )+ b)
e = (( a * d) / b)
g = (( d * a) / b)
f = (( a + d) * (b ** d))
print(c)
w = Expression.fromString('1*5/9+10')
z = a * b / (d + a)
print(w,z, f)
expr = Expression.fromString('1+2+3/4')
expt = Expressio... |
09dcbbc8cb51f3eaabd334ed6d24ce60cca35caf | 26bebecc3d509c114aff27ad789f306d37165654 | /hacktoolkit/htkadmin/views.py | d30ba1a0d22fc244cf0f21cc226c89142a6c4351 | [
"MIT"
] | permissive | hacktoolkit/htk-django-skeleton | ff5c5e09ee4eae37a67df492a5e2c84f49e0c6f5 | dd1732bf7d5ab28f12d4f46859d32deeafaa8c8a | refs/heads/master | 2021-01-21T19:29:06.898984 | 2014-04-30T22:55:14 | 2014-04-30T22:55:14 | 15,925,122 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 482 | py | views.py | import json
from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_required
from django.shortcuts import get_object_or_404
from django.shortcuts import redirect
from django.views.decorators.http import require_POST
from hacktoolkit.htkadmin.decorators import htk_staff_required
f... |
bd3ced35446ba47b2abdd56a5d065695c76cad65 | c517a2f0e6cfaef0751b4cbb260810dec7685be0 | /overthewire/krypton/krypton6/decrypt.py | 76fe8c0a1486a8f026297dc1c071fdd57a29cf4e | [
"MIT"
] | permissive | GambuzX/Cybersecurity_Practice | a14f6b1a32a6d2746c6bc6dff68a2b43f562ed9c | 58ecc222816a1bda2742da9b2782cef25365692f | refs/heads/master | 2020-04-23T06:57:51.825858 | 2020-02-27T10:05:08 | 2020-02-27T10:05:08 | 170,991,772 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 696 | py | decrypt.py | #!/usr/bin python
dec1 = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
enc1 = "EICTDGYIYZKTHNSIRFXYCPFUEOCKRNEICTDGYIYZKTHNSIRFXYCPFUEOCKRNEI"
dec2 = "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"
enc2 = "FJDUEHZJZALUIOTJSGYZDQGVFPDLSOFJDUEHZJZALUIOTJSG"
with open("krypton7", 'r') as handle:
... |
105a95992992abf98bbf67dbd1e64b3c54d0efe7 | b53144eea942092d07490961d7ac4c5d2580a2f0 | /Computer_Vision/Extract_text_from_images/Extract information from forms or receipts.py | ee99381b49b2d53e08f2a348f8ff317a5e5c64ac | [] | no_license | anupam858/AI102Files | 0889da1c5e7bf98c7ddf913b288070e75edc2139 | 25a1b5e3c059787d4d75a72d1cb48e779e3d16e6 | refs/heads/main | 2023-08-20T14:34:32.992264 | 2021-10-24T10:51:03 | 2021-10-24T10:51:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,989 | py | Extract information from forms or receipts.py | import os
from azure.core.exceptions import ResourceNotFoundError
from azure.ai.formrecognizer import FormRecognizerClient
from azure.ai.formrecognizer import FormTrainingClient
from azure.core.credentials import AzureKeyCredential
key = "<enter your key here>"
endpoint = "<enter your endpoint URL here>"
form_recogni... |
bafae96c42ad7c9d728fa675fb07bfbeb9206524 | c57376701537dc6969939c3afb51d542d670db61 | /List/5_Slicing_List.py | e09baee9fc151a17ebe9f10387348a7121629e25 | [] | no_license | dangnam739/Learn_Python_Begin | d3f5f24504b3c703de4e981abb432f3734558e5d | 81764172475f26374a3e21d150395a99e8a183e6 | refs/heads/master | 2021-07-15T19:13:58.156215 | 2020-08-21T06:38:04 | 2020-08-21T06:38:04 | 200,081,663 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 623 | py | 5_Slicing_List.py | ##########Slicing of a List###############
#(Cat mot danh sach)
#Creating a List
List = ['P', 'Y', 'T', 'H', 'O', 'N', 'L', 'I', 'S', 'T']
print("Intial List: ")
print(List)
#print elements of a range using Slice operation
Sliced_List = List[3:8] #List[3] to List[7]
print("\nSlicing elements in range 3-8: ")
print(S... |
8cb1b72c1450f07e907bfd95e55c9a6c2017da80 | 42d8222d2d80a42f227b62994ff66cec0fa650f5 | /cases9_1.py | 90513ad1a934aaaf02d7ab5e712c6e1a0303380d | [] | no_license | translee/learn_python_answers | 637a1dc35e330850c9728f1fc3de5ce3d43eba0e | f792df40e7bbb04126baaf4029a321e18a51d2ab | refs/heads/master | 2022-08-17T05:33:18.966796 | 2020-05-26T01:08:44 | 2020-05-26T01:08:44 | 266,912,607 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 918 | py | cases9_1.py | class Restaurant():
"""餐厅"""
def __init__(self,restaurant_name,cuisine_type):
"""名称与类型"""
self.restaurant_name = restaurant_name
self.cuisine_type = cuisine_type
self.number_served = 0
def describe_restaurant(self):
"""打印上述两条信息"""
print("\nThe restaurant's name is "+self.restaurant_name.ti... |
fcbd3aac489799f492900f95ca7c523fad1c3759 | ac1c2e98f451cf3883727e4cfeb405df27a22e4d | /Flask/restapi/extensions.py | 7e5d6ce71caa54d120384b9f240dda57b38b4e2c | [] | no_license | BoshengW/PandoRec_MovieRecom | 0f5be591337138773374cb2f207e5ac98590ee34 | 9270c2d0cd22ee3a7610565c63f0798815051c33 | refs/heads/master | 2023-03-12T19:26:35.066031 | 2021-03-02T06:05:49 | 2021-03-02T06:05:49 | 342,953,652 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 103 | py | extensions.py | from flask_pymongo import PyMongo
from keras.models import load_model
import json
mongo = PyMongo()
|
676c80326322368fcaea45e1733a99b38dda1329 | 43ad431d6d4e5e8bf211ac4250c1f3fdd9c95209 | /test_login2x.py | 2d00e873ec3d0d216b789a53cc828a1150cfd655 | [] | no_license | rbillings/sumo-tests | 14f38985897773cbce2d3152d718fe89822c0462 | 477d4eab1d506834cb05d529773ee7227a161e26 | refs/heads/master | 2021-01-16T21:13:08.692255 | 2011-06-08T23:43:19 | 2011-06-08T23:43:19 | 1,735,435 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,752 | py | test_login2x.py | from selenium import selenium
import vars
import unittest
import sumo_functions
import sumo_test_data
class login2x(unittest.TestCase):
def setUp(self):
self.selenium = selenium(
vars.ConnectionParameters.server,
vars.ConnectionParameters.port,
vars.ConnectionParameters.browser,
... |
ca0d19bdf78e81319cb70210002934e7572843b6 | 1a6071d89061ebf1a1d12a9cec81fd678f0746bb | /Root/view.py | 7b1b28af6c8c01d2a7004a7b36e95d2ad145d299 | [] | no_license | xxRMxx/DBManager | 11ccc5f8d6d29f66675c6ae85749b85a31fcf96f | 71f3b5ae6a16381924e47f76704593eddad2b19f | refs/heads/master | 2020-03-07T23:22:15.458532 | 2019-03-31T21:38:38 | 2019-03-31T21:38:38 | 127,779,533 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,423 | py | view.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# import modules for database communication and system processes
from Tkinter import *
from ttk import *
from ScrolledText import *
from subprocess import Popen, PIPE
from shlex import split
from datetime import datetime
import tkMessageBox
import time
import os
import psy... |
8441cf24d2c0d9ecad4ff4cf4f30e90404dc0df9 | f52c7695a67630fd339c06c85c758e0b03569013 | /web/models/session.py | c5a2bbfe68b7980e1b9d74ae57934ea7f2253714 | [] | no_license | GAEBlog/blog | 3d9e5137e5a16b1ceab2e2d48b7c7f46727a0475 | cfe5e1ff1e2b3aba46fda6a728e1ba4ec8124266 | refs/heads/master | 2016-09-06T15:57:43.795234 | 2013-04-20T19:09:33 | 2013-04-20T19:11:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,888 | py | session.py | import pickle
import random
import logging
from google.appengine.api import memcache
_sidChars='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
_defaultTimeout = 10 * 24 * 60 * 60 # 10 days
class Session():
"""The Session class pickling itself into memcache"""
def __init__(self):
... |
85cca8b0aa6627eacace264dd685ccb091571e4e | a1aab583f4e82eae07e6b9ecd9a60756c9139df4 | /EXERCISE02/homework02.py | 517beb648d8e3a084db696441044c2e1152de4f6 | [] | no_license | Pu-ZH/compuationalphysics_N2014301020017 | c67ad9cd53b2108309c206916dc2a3f5d1e5f457 | 4c86abc1ead74b9dbb77455b69eec0429298f39e | refs/heads/master | 2020-07-03T17:10:22.923858 | 2017-01-03T17:04:04 | 2017-01-03T17:04:04 | 67,908,081 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 314 | py | homework02.py |
print 'aaaa aaaaaaa aa aa'
print 'aa aa aaaaaaa aa aa'
print 'aa aa aa aa aa'
print 'aa aa aa aaaaaaa'
print 'aaa aa aaaaaaa'
print 'aa aa aa aa'
print 'aa aaaaaaa aa aa'
print 'aa aaaaaaa aa aa'
|
394902565dd668a1cfa074c57367f9c4a728bb48 | f8ffa8ff257266df3de9d20d95b291e393f88434 | /Python from scratch/Zadania/zadania podczas zajęć/zajęcia13/zadanie01e2.py | c3cfd7050458526162e5fae99b50b1c49db5f628 | [] | no_license | janiszewskibartlomiej/Python_Code_Me_Gda | c0583c068ef08b6130398ddf93c3a3d1a843b487 | 7568de2a9acf80bab1429bb55bafd89daad9b729 | refs/heads/master | 2020-03-30T05:06:26.757033 | 2020-03-02T08:53:28 | 2020-03-02T08:53:28 | 150,781,356 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 338 | py | zadanie01e2.py | class Plecak:
def __init__(self, pojemnosc):
self.pojemnosc_plecaka = pojemnosc
self.kolor_plecaka = 'zielony'
def __repr__(self):
return f'Plecak koloru {self.kolor_plecaka} ma pojemność {self.pojemnosc_plecaka} L.'
p1 = Plecak(30)
print(p1)
p2 = Plecak(45)
p2.kolor_plecaka = 'kamufl... |
1012f7410dbaf892b2eeedffb7f8bc5ebfea76c7 | d856be1b0280a674cee736ac4d31d197765c8110 | /introduction-iris/12-run-walk-optimize.py | e145704ba08b2c1dbe4af7d2e827e554b3e4e86f | [] | no_license | jaimevalero/learning-machine-learning | 9a6ca1881bfd2702f76849aa6a720cee94669b32 | 4169b4b0f16e7b2dd10f6826a9aa69ada303420c | refs/heads/master | 2023-01-06T16:05:46.897737 | 2023-01-03T14:02:37 | 2023-01-03T14:02:37 | 86,103,808 | 1 | 2 | null | 2023-01-03T14:02:38 | 2017-03-24T19:27:57 | Python | UTF-8 | Python | false | false | 1,790 | py | 12-run-walk-optimize.py | from sklearn.linear_model import LogisticRegression
import pandas as pd
from sklearn.preprocessing import LabelEncoder
from sklearn.cross_validation import train_test_split
import numpy as np
from sklearn.preprocessing import StandardScaler
from sklearn.metrics import accuracy_score
from matplotlib.colors import Lis... |
fc2101655f022b981027edca04dc77bdad3a5d01 | 8150b5ed136a8c63f6bdfbb940b04b17f3a27639 | /Algorithms/easy/sorting/re_Counting Sort 2.py | 19d19fa1ea3da0b580165bb9f76519fa8c18901b | [] | no_license | ChaeSangJung/hankerrank_python | 9f0796585b89e5eeadda1c552e689f6c1bf285d3 | 239b2b88da46bfacff60ca168f151b2e83d1a96a | refs/heads/master | 2023-04-28T21:53:40.883395 | 2021-05-21T06:07:26 | 2021-05-21T06:07:26 | 357,388,835 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,295 | py | re_Counting Sort 2.py | https://www.hackerrank.com/challenges/countingsort2/problem?h_r=next-challenge&h_v=zen
def countingSort(arr):
cnt = [0] * (max(arr) + 1)
output = [0] * (len(arr))
for el in arr:
cnt[el] += 1
total = 0
for ind in range(len(cnt)):
old = cnt[ind]
cnt[ind] = total
... |
23baa200d4cfa660eea1e436aaeb54349b9fc0a6 | 39c1c076a376a9ff5d8def907c030bd7a5d1d29a | /VisionEngine/models/decoder.py | a8eaa8f12ae81218ba183b10ca4bbeeed1a9c182 | [
"MIT"
] | permissive | ietheredge/VisionEngine | 7fb3e2950bb979d519370679cf36d0b3495f43da | 271c8dcaef6eb574e9047fca436d7b13cab75d3b | refs/heads/master | 2023-02-22T16:46:25.772882 | 2021-01-27T07:49:29 | 2021-01-27T07:49:29 | 236,345,642 | 5 | 1 | null | null | null | null | UTF-8 | Python | false | false | 8,598 | py | decoder.py | """
Copyright (c) 2020 R. Ian Etheredge All rights reserved.
This work is licensed under the terms of the MIT license.
For a copy, see <https://opensource.org/licenses/MIT>.
"""
from VisionEngine.base.base_model import BaseModel
from VisionEngine.layers.spectral_normalization_wrapper import (
SpectralNormalization... |
8781ac60638d54177f90ad52c531d64f15e58e3f | ca2325df48c5b5e8484e8f0384196277c2a71841 | /blog/forms.py | f53a50f9e2cd8739e0daaa6a794e3db343838000 | [
"MIT"
] | permissive | LordK1/Socialist | c6e5f769da9dd7c71b962aa2fdeb494b9805bfbe | 775820db682b97b00caa47e3df6d5d63dd3f8b37 | refs/heads/master | 2021-01-10T16:56:19.253394 | 2015-11-22T13:14:11 | 2015-11-22T13:14:11 | 45,975,938 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,066 | py | forms.py | from django import forms
from django.core.exceptions import NON_FIELD_ERRORS
from blog.models import Post, Category
__author__ = 'k1'
class PostForm(forms.ModelForm):
title = forms.CharField(label='Title', help_text='this is required',
max_length=100,
widge... |
d01370bd4d273d0ea8bcfe9bd7f6c3057104e878 | 29cc0207767458e1d8e65e38034cf1de5b84658e | /patrace/python/patracetools/patracetools/trace_editor.py | bb28c6c98a136db8a91393559f219bd96c9d6d9b | [
"MIT"
] | permissive | ARM-software/patrace | 2383d6bf1d768d8fc0c165ce5d6746781a6ab5a1 | 06ab2eb1be315408f9ac652715f2f19c5c4b3182 | refs/heads/master | 2023-09-02T00:28:27.802988 | 2023-07-03T11:14:44 | 2023-07-03T11:14:44 | 158,373,051 | 60 | 33 | MIT | 2023-07-11T04:41:27 | 2018-11-20T10:41:28 | C++ | UTF-8 | Python | false | false | 1,573 | py | trace_editor.py | import os
import sys
from optparse import OptionParser
from patrace import InputFile
import json
def main():
# try to load PATrace module
if not os.curdir in sys.path:
sys.path.append(os.curdir)
# parse the argments
parser = OptionParser()
parser.add_option('-j', '--display_json', defau... |
41675a329a9b74f1b98e135a3378291a45c6fd9b | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2487/61046/273755.py | 1bc1e2c9ee3cf04c0d884d3ad9256eeafff1221a | [] | no_license | AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 426 | py | 273755.py |
# dict 和 set
num = int(input())
test = []
number = []
for i in range(num):
number.append(input())
test.append(input())
for i in range(num):
testList = test[i].split(' ')
count = {}
for x in testList:
if x in count:
count[x]+=1
else:
count[x]=1
name = s... |
c20baa019084b011a488596627c7dd5a5e638fa9 | b9c6a45a3757081dd98b906546e00b3f7f9e635d | /dataset.py | 9371f756dcc3d736268e90206dfa1104f0b22152 | [] | no_license | zyg1968/ZiGo | 1cf5aa80c8c06a10c2d22d8bda6bb043679ea43f | b5de2790b8878f2d5668dada034c1076059c4d1f | refs/heads/master | 2020-03-19T07:58:37.382639 | 2018-06-05T10:49:21 | 2018-06-05T10:49:21 | 136,165,207 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,050 | py | dataset.py | #!/usr/bin/env python3
#
# This file is part of ZiGo.
# Copyright (C) 2018 ZiGo
#
# -*- coding: utf-8 -*-
import numpy as np
import go
import board
import gzip
import struct
import threading
import math
import os
import time
import config
import random
import sys
import pyautogui as pag
from PIL import Image, Im... |
3b171a25a6dfe9669b67a810f8b06a138ccfa564 | 719b1c7f75b9f9ddaa9dd33fe8d3bbaeb0c2f28e | /Loops/herd-immunity.py | f7a2dcae89e82b74cafdb36cdbedad2f78a23aaf | [] | no_license | LopesAbigail/UFABC-BCC-2021 | 044fda95dfe45b6251dcb5f8c347141c745d4477 | 9bbfe2a221f6e4329cb6a638559f25b479b39dbf | refs/heads/main | 2023-04-19T07:17:31.890901 | 2021-04-26T22:18:58 | 2021-04-26T22:18:58 | 343,528,816 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,786 | py | herd-immunity.py | # Sejam:
# p a populacao de uma cidade
# txContagio a taxa de contagio por gripe nessa cidade
# ct(i) o numero de pessoas contaminadas em um dia i
# ct(0) = 1439
# ct(i) = Ct(i−1) ∗ txContagio (somente pessoas que foram infectadas no dia i−1 podem infectar pessoas no dia i)
# 0 < i ≤ numDiasImunidadeColetiva
# Qualque... |
9b4f8e323691fc15aba1d511bf7d8982f6129ccb | 2c04e2031837cb2882b7f2160aba694f167a0dd1 | /Microbit/microbit codes/microbit_eindopdracht.py | 3064833039b5811e04776da46362424c706c89c1 | [] | no_license | ColindeGroot/F1M1BO | 759c0f9d088a585091ab9886f93b8bc21c1c2522 | e64d512e9474e794f4b3df210b9bec83b7223ce8 | refs/heads/master | 2023-01-12T23:04:26.768633 | 2020-11-02T13:09:52 | 2020-11-02T13:09:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,675 | py | microbit_eindopdracht.py | from microbit import *
import random
# zorgt ervoor dat de waarde tussen de max en min zit
def check_bounds(val, min, max):
if val < min:
val = min
if val > max:
val = max
return val
dx = 50 # de x en y coordinaten van het bolletje
dy = 50
score = 0 # sc... |
3188d49723d5cf5e889f5386137ca915a4fb43f9 | 393711df7c34d9372447cb28cf5ad684c30afbac | /Python(Basic)/home_work_4/task1.py | c50fabd65508829dd708c9c16babfae548a83753 | [] | no_license | alferovyuriy/geekbrains | f8a1c1f4aa691e187c685368a4fdfc4bf4176c50 | 9ff77e05dacb223a36ea34d4202306e0fc7d8585 | refs/heads/master | 2021-06-21T14:58:34.950585 | 2021-04-12T20:41:20 | 2021-04-12T20:41:20 | 213,471,821 | 2 | 1 | null | 2021-04-12T20:41:21 | 2019-10-07T19:44:18 | Python | UTF-8 | Python | false | false | 476 | py | task1.py | from sys import argv
def calc_salary(hours, rate, bonus):
"""
рссчитывает зарабатную плату сотрудника
:param hours: int
:param rate: int
:param bonus: int
:return: int
"""
return hours * rate + bonus
try:
script_name, hours, rate, bonus = argv # параметры указываются при запуске скрипта
print(f'salary: {c... |
e87fce87d46d7678bc77431fd9b7fdaa44c2d838 | f80ec2eec86911b08ec9b3d6cf9695b49ec17757 | /book/5_datalist.py | fcdf36c5f0ee5d338394a3343d0285cd3055cbb8 | [] | no_license | kidaizero/scraping | 67c8a42bb53b3c35a946b5e90bc896c7fcd92d72 | 383ba455b7daf9d732d77d87b9c786ca8686838e | refs/heads/master | 2020-06-01T15:33:25.124060 | 2019-10-20T08:57:08 | 2019-10-20T08:57:08 | 190,835,466 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,147 | py | 5_datalist.py | import requests
from bs4 import BeautifulSoup
url = "https://en.wikipedia.org/w/index.php?title=List_of_Game_of_Thrones_episodes&oldid=802553687"
r = requests.get(url)
html_contents = r.text
html_soup = BeautifulSoup(html_contents,"html.parser")
#リストを使ってエピソードの一覧を保存する
episodes = []
ep_tables = html_soup.find_all("ta... |
2b3721af98a0b732601c7dac1566639542833980 | 9d4c88a3eac9e33e166b3a38cd53299126b89350 | /Lab1Python/app/models.py | 6b187f5ecdf4a15306db34836e2cea437d9dbfb9 | [] | no_license | ValtonUA/Lab1Python | 04c19103f806a52939bd66ebaa1d8ea0a2e69ebf | 9ddac91662c8562e260d83af3cb6821363d4d809 | refs/heads/master | 2020-05-06T15:39:54.604185 | 2019-04-08T17:44:25 | 2019-04-08T17:44:25 | 180,201,733 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 413 | py | models.py | class Date(object):
num = 0
def __init__(self, date, description, is_done=False, id=-1):
if id == -1:
self.id = Date.num
else:
self.id = id
Date.num = Date.num + 1
self.date = date
self.description = description
self.is_done = is_done
def as_json(self):
return {
"id": self.id,
... |
f19a048bbd5557d88d37615100c1dd1ffef24c30 | e38df6eba96e51de9d7a507adec34c45957a155d | /justin_quiros/call_center.py | 1e99b9c65d3b62a548ce5086dfd3b9f701074c48 | [] | no_license | jquiros2290/python_nov_2017 | 21e06f598887e24b98890b7d08c32b1eec5e853a | 8290ff1df333610c9b1e6b0be0873770239c1795 | refs/heads/master | 2021-05-07T19:42:02.490299 | 2017-11-21T13:32:08 | 2017-11-21T13:32:08 | 108,896,839 | 0 | 0 | null | 2017-10-30T19:12:07 | 2017-10-30T19:12:06 | null | UTF-8 | Python | false | false | 1,054 | py | call_center.py | from datetime import datetime
class Call(object):
uniqid = 1
def __init__(self, callname, callnum, callreas):
self.idnum = Call.uniqid
self.callname = callname
self.callnum = callnum
self.calltime = datetime.now()
self.callreas = callreas
Call.uniqid += 1
def call_display(self):
print self.idnum
p... |
f8a9ff28bd0352f9bf27bc9b4a2d63d2962330f2 | 840ef5b2f8882e3c40a90731791a738afc369abb | /util/test_polygon.py | 2330dcf9a82395a509d7e190f07250696088cf33 | [] | no_license | nukulele/dymaxion | 878db8f659130b6b94fd66fd4a62e08a621e5e61 | 8f879d85df5963652818fe7738d88987e589062f | refs/heads/master | 2021-01-15T14:29:30.625998 | 2013-06-12T20:14:59 | 2013-06-12T20:14:59 | 40,198,514 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,472 | py | test_polygon.py | import unittest
from util.space import v_x, v_y, v_z
from util.polygon import *
class TestPolygonConstruction( unittest.TestCase ):
def test_poly_create( self ):
'''create a polygon from a list of three vertices'''
poly = Polygon( ( v_x, v_y, v_z ), precalculate = False )
self.assertTrue(... |
d6ae8fbe3484105cebb053dba65dc33a95b341cc | 705c05124b6927fb17b799e8b8a4d1334d409480 | /tests/test_build_next_ufc_event.py | c77b4d5b5695f1aa2cd26b7b976e131e41250d0b | [] | no_license | RodriguesJD/next_event | 92cf8c8149bb9a07970dc340ad37b645087cfae0 | 7895f4255ee273d9cf059f45e7b07fea2fb5eef5 | refs/heads/master | 2021-08-19T01:07:19.066427 | 2020-07-27T19:18:31 | 2020-07-27T19:18:31 | 208,178,920 | 0 | 0 | null | 2019-10-08T02:12:44 | 2019-09-13T02:01:56 | Python | UTF-8 | Python | false | false | 380 | py | test_build_next_ufc_event.py | from build_next_ufc_event import NextUfcEvent
def test_main():
next_event = NextUfcEvent().main()
assert isinstance(next_event, dict)
event_date = next_event["event_date"]
assert isinstance(event_date, str)
for fight in next_event['fights']:
assert isinstance(fight, list)
for fig... |
e84ab7557b56d8afa8cd0a55355d74f397ef8022 | db599325879a7e6a930163a9a808f876decd4671 | /one_million.py | e784f71d57a587311aed44c5cc70c80da88f939e | [] | no_license | MrDrDAVID/Python-practice-book | 7098ec94191cea77f7ac32269978add37b7387ce | 9b9a3954656933f9b91c53ff2ab8cf62e334c838 | refs/heads/master | 2023-03-05T13:59:52.635721 | 2021-02-22T04:43:37 | 2021-02-22T04:43:37 | 329,142,776 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 130 | py | one_million.py | one_mil = list(range(1,1000001))
for num in one_mil:
print(num)
print(min(one_mil))
print(max(one_mil))
print(sum(one_mil))
|
213ae077329dcc310e3f401e5127519ac86dda6e | 696431b4e09e7b5ae7c9720b9ff8219accd6c494 | /test.py | 66e549d72c7e4bd5e3a1f68490057dc7a6ab96d5 | [] | no_license | mmmnic/Object-following-car | aa0d2bdf690e0c129d609b84bf8ad82692412892 | 0182938b29a121b9e8dd3026024c330b9715d5fd | refs/heads/master | 2020-05-17T07:56:59.337143 | 2019-12-03T01:37:15 | 2019-12-03T01:37:15 | 183,592,462 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,330 | py | test.py | from gpiozero import LED
from gpiozero import Button
from gpiozero import Motor
from time import sleep
from picamera.array import PiRGBArray
from picamera import PiCamera
import numpy as np
import cv2
#define parameters for speed and angle
#----------------- Speed ---------------
errS = 0
preErrS = 0
kPS = 0.65
kI... |
7a594648109c5ffd46e11fab73ea1282dfb54f02 | c8aea0c03e9f0a4584c4ac01a89323cdb00a61b4 | /apiai_assistant/widgets/option_info.py | b0b73f20a3bc93f8096812be899ebf08863f5397 | [
"MIT"
] | permissive | toasterco/apiai_assistant | 8403ab66bc76ddc0f0746c140c52252f275a0a4a | 7f3f0693c4c5aa9f1fd4486f85ebe05080505dc8 | refs/heads/master | 2020-12-02T22:55:54.650701 | 2017-11-01T11:07:27 | 2017-11-01T11:07:27 | 96,207,017 | 6 | 0 | null | null | null | null | UTF-8 | Python | false | false | 498 | py | option_info.py | from . import GoogleAssistantWidget
from . import InvalidGoogleAssistantWidget
class OptionInfo(GoogleAssistantWidget):
def __init__(self, key, synonyms=None):
if key is None and synonyms is None:
raise InvalidGoogleAssistantWidget(
'Please specify at least key or synonyms')
... |
59ca51c121711a7231c6ae7852b89e794d960aaf | e524cb9f24d3ab3b43cc3ec0b23b731760d98eaf | /Write a Python program to find the largest number from a list.py | f56cafa08eae2523b95474e83b552e16dab9c877 | [] | no_license | hoanglong1712/python-quick-and-dirty-sample-code | ee215826b05b323a3a4a5877a650ec284313176a | 1466f6d5364832a82956cb41890c3ccc49f52eea | refs/heads/main | 2023-05-11T03:06:40.884213 | 2021-05-29T14:50:25 | 2021-05-29T14:50:25 | 371,986,669 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 394 | py | Write a Python program to find the largest number from a list.py | # Write a Python program to find the largest number from a list.
def max_value_in_list(a_list) -> object:
if a_list is None or len(a_list) == 0:
return None
pass
max_value = a_list[0]
for item in a_list:
if max_value < item:
max_value = item
pass
pas... |
3b9b5722fe56ab11a2b38eeadd505b21837d88cb | 9743d5fd24822f79c156ad112229e25adb9ed6f6 | /xai/brain/wordbase/adjectives/_pastels.py | cc4c3fbb2a071821e6b857fc04a797b5a3006501 | [
"MIT"
] | permissive | cash2one/xai | de7adad1758f50dd6786bf0111e71a903f039b64 | e76f12c9f4dcf3ac1c7c08b0cc8844c0b0a104b6 | refs/heads/master | 2021-01-19T12:33:54.964379 | 2017-01-28T02:00:50 | 2017-01-28T02:00:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 248 | py | _pastels.py |
from xai.brain.wordbase.adjectives._pastel import _PASTEL
#calss header
class _PASTELS(_PASTEL, ):
def __init__(self,):
_PASTEL.__init__(self)
self.name = "PASTELS"
self.specie = 'adjectives'
self.basic = "pastel"
self.jsondata = {}
|
d5658aa337be25146d6c248f30a6de00ea43c71d | c1e8d24580396c9274699f62d3b64d22c996827b | /Wiki-reference-prediction/Results/workread.py | 28f9de20162849ab1ac1339eb3a0c4f5039e2d54 | [] | no_license | RakaDalal/Data_Science_Portfolio | a4c31a0647124d53ed3edc610dd219d3da071047 | 266bf1036a1ed6d3e43203424ffa52f7d45c3b95 | refs/heads/master | 2022-05-15T06:39:37.734420 | 2022-03-20T20:04:08 | 2022-03-20T20:04:08 | 149,050,674 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,575 | py | workread.py | import nltk
import sys
from nltk.collocations import *
import matplotlib.pyplot as plt
from nltk.metrics.spearman import *
import random
from collections import Counter
import math
import csv
import re
#import workdone
#import workreadexp
#from workdone import f_workdone
#from workreadexp import f_workreadexp
import li... |
ce530f51f437071eefd67fa80f70256a95af95e2 | f3db01c17883059b71f82feb17ebc9a5825321a9 | /Stack/stackoperation.py | e9adf21c22b9db32ae4f8315982cd550f676cb50 | [] | no_license | RoshanXingh/DataStructure | 14cebe54b52189e77bee58ec4461187e03ed898d | 716249f9ce91f97d7e9df2b2a9e1048fd7f96980 | refs/heads/master | 2023-03-20T22:49:04.362335 | 2021-03-03T11:33:38 | 2021-03-03T11:33:38 | 333,363,161 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,964 | py | stackoperation.py | #making stack using list and performing various stack operation
class stack_operation:
def __init__ (self,element):
self.element = element
self.stack = [None]*self.element
def get(self):
for i in range(self.element):
self.stack[i] = int(input("enter {} value:".form... |
77e20ad7419bb616291be84691d09641efd9cab5 | 59b18dec434fc54cdaf6fd6c224fea9c783f2043 | /MyBlog/blog/models.py | a03560cdc6056fd640157ecf9348afb43beafdfd | [] | no_license | InformationX/MyBlog | 00e95f27a78be39338fbaa462b1fa069cdfad3e6 | 2a5b15535c17b0eee0d1fa9bcebc5f7207dd46db | refs/heads/master | 2021-04-10T00:54:09.002419 | 2019-10-09T11:56:24 | 2019-10-09T11:56:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,699 | py | models.py | from django.db import models
from django.urls import reverse
from django.conf import settings
from slugify import slugify
class Article(models.Model):
"""文章"""
STATUS_CHOICES = (
('d', '草稿'),
('p', '发表'),
)
COMMENT_STATUS = (
('o', '打开'),
('c', '关闭'),
)
title = ... |
c5e72f4b777d7e44b19c94f9b6adee7e4e79ff2b | d015df42db1f748b60efdd26434703cdab7d80e8 | /Parser/scrapyEUR_getMessages.py | 87ab6bc8d6955a1c3ac08b265dca7b2a2d63c959 | [] | no_license | icea-dev/swim | 6cb0c18c4585bcfc4437da6956093a872ed58068 | c972258b087f41b79420609ea2a78784878f6de7 | refs/heads/master | 2021-01-23T07:55:26.377635 | 2017-09-05T19:48:59 | 2017-09-05T19:48:59 | 102,515,302 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,011 | py | scrapyEUR_getMessages.py | # coding=utf-8
import pickle
import requests
import time
from lxml import html
import sys, json
import selenium
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import TimeoutException... |
4f7844d2ba089d9d673ac6346684139ffef6bec0 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03611/s849621607.py | 9a9eedcddd25f278eb2ac7153e1ab11e55261a66 | [] | 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 | 174 | py | s849621607.py | N = int(input())
a = list(map(int,input().rstrip().split(" ")))
ans = [0] * (10 ** 5 + 3)
for i in a:
ans[i + 2] += 1
ans[i] += 1
ans[i + 1] += 1
print(max(ans))
|
e1470427c343beedf5b15eb15cdb344c606a3a9a | 9cc29f841160c68411faf973122f1719eab4fccc | /leet-code/1745. Palindrome Partitioning IV.py | 04ef6ecd6beda60821b3de6203a7d3ba77244f46 | [] | no_license | vishykaranth/ds-algo-python-2021 | fe781a2cb7d3bf0d122082cc0d840ea28aa27b54 | 56a0cea77723c5785a7321732a20fc1ab2fb8dd9 | refs/heads/master | 2023-05-07T03:02:08.619922 | 2021-05-28T05:08:24 | 2021-05-28T05:08:24 | 360,233,963 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 715 | py | 1745. Palindrome Partitioning IV.py | # https://leetcode.com/problems/palindrome-partitioning-iv/
# Let isp(i, j) be true iff s[i..j] is a palindrome. We can find it with a simple dp.
# Now for each i <= j, we can just check if isp(0, i-1) and isp(i, j) and isp(j+1, n-1).
class Solution:
def checkPartitioning(self, s: str) -> bool:
# @cach... |
4967fd5f7ddec9b4b60dd7f5ab34cf7c2fb9dff2 | 6750729a03fb223a57aa239952379105a35653f3 | /sql_client.py | b0c65e9d9d02cf5645bcde2d1e64560ccdda6c06 | [] | no_license | bopopescu/Marketplace | a6e8dee922844dc25b2aefb2632249f336011e65 | 351a780b97b7be5a6c81c7a03d51a02583dc92af | refs/heads/master | 2022-11-25T01:52:37.232077 | 2018-12-04T20:09:56 | 2018-12-04T20:09:56 | 281,795,953 | 0 | 0 | null | 2020-07-22T22:30:50 | 2020-07-22T22:30:50 | null | UTF-8 | Python | false | false | 9,580 | py | sql_client.py | import mysql.connector
from datetime import datetime
class MySqlClient():
def __init__(self):
self.mydb = mysql.connector.connect(
host="104.197.80.146",
user="cs6400",
passwd="xx", # please check with me the password
database="cs6400"
)
def get_... |
07e7c40df4727504cd561e9cfb9a6f90a7a28120 | c3ad27c5d2899f9c043413e137859cf84dca2693 | /app/api/__init__.py | 50f4f7c990eda2feecf568db39edcd813935421d | [
"Apache-2.0"
] | permissive | quanpower/sitp | c9f6857404820be644c5c6ad4c80ebf7e1fd0b38 | 082f244dd35c5e881b332a624d4808f3e9e81a96 | refs/heads/master | 2022-12-10T01:07:29.765934 | 2018-07-17T02:23:45 | 2018-07-17T02:23:45 | 138,897,639 | 0 | 0 | Apache-2.0 | 2022-12-08T00:46:05 | 2018-06-27T15:05:49 | JavaScript | UTF-8 | Python | false | false | 1,676 | py | __init__.py | from flask import Blueprint
api = Blueprint('api', __name__)
# from . import authentication, posts, users, comments, errors
from flask_restful import Api
from app.api.resources import Login, Logout, GetUser, Register, Users, Projects, Workers, TemperatureRealtime, TemperatureAlarm, TemperatureHistory, TemperatureReco... |
1783305a63617bd714c614b7d7055c59903fb4f7 | 5538cfe1fcc30d062c3f5591e8e6532d30bb16e3 | /task2_RecommenderSystem/code/MeanVarianceCalcBJ.py | 1caa05d054183fa50bbba2752195d1f311395bd5 | [] | no_license | codeOfJannik/DataMining_Projects | dbb582f3b85a026b1e00c56e04f57d02d824cccd | f1559906600c1780578a34d84eab80bb5e2bf1e5 | refs/heads/master | 2022-04-03T07:32:30.799044 | 2018-07-01T18:20:32 | 2018-07-01T18:20:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,439 | py | MeanVarianceCalcBJ.py | import numpy as np
import scipy.spatial as spatial
import scipy.stats as stats
import math
# Mittelwert:
# (1 + 2 + 3 + 4 + 5 + 6) / 6
# = 21 / 6
# = 3.5
# Varianz:
# ( (1-3.5)²+(2-3.5)²+(3-3.5)²+(4-3.5)²+(5-3.5)²+(6-3.5)² ) / 6
# = 17.5 / 6
# = 2.92
bVarcal = ((3 - 5.3) ** 2 + (3 - 5.3) ** 2 + (5 - 5.3) ** 2 + (6 - ... |
89af3158a057cc751aad145e2e1b413f80d6b52c | d705c58d15b4a1692186d292a148db546fba685d | /view/connection_dialog.py | f635246ca7ec6b2d0e4b4b5b298ad4992980e7b2 | [] | no_license | akhmeade/yanileda | ee23b14e121f760adf958c8189b38bef71220643 | 8cc1cb19193fef1bd959268a2d3a93f2cc55196f | refs/heads/master | 2022-12-14T19:09:24.623665 | 2020-09-02T07:03:40 | 2020-09-02T07:03:40 | 292,204,755 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 538 | py | connection_dialog.py | # This Python file uses the following encoding: utf-8
from PyQt5.QtWidgets import QDialog
from PyQt5 import uic
import utils
class ConnectionDialog(QDialog):
def __init__(self, url):
super().__init__()
uic.loadUi("forms/connection_dialog.ui", self)
self.url_label.setText(utils.create_url... |
17ff020354e247ec52a775c0e1e3a20f83e4189f | 288a00d2ab34cba6c389b8c2444455aee55a8a95 | /tests/data23/recipe-576477.py | 8fcb63e0f716ed24157960406f761a5471060081 | [
"BSD-2-Clause"
] | permissive | JohannesBuchner/pystrict3 | ffd77b7bbc378bd4d8f21b5c6bd69a0d64a52ddb | 18b0dd369082422f9bf0f89c72e7acb53a49849c | refs/heads/master | 2023-08-14T06:37:37.954880 | 2023-07-13T11:16:38 | 2023-07-13T11:16:38 | 268,571,175 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,401 | py | recipe-576477.py | """
File: signal.py
Author: Thiago Marcos P. Santos
Created: August 28, 2008
Purpose: A signal/slot implementation
"""
from weakref import WeakValueDictionary
class Signal(object):
def __init__(self):
self.__slots = WeakValueDictionary()
def __call__(self, *args, **kargs):
for key in se... |
f65d6c631d3b23fe7878d8133cc1759c66cbe8b1 | bd58b01502a10c728112f39f9d8e28a8fded04a9 | /set 7.62.py | 9cf022541b8d9178ef14f2a61dbd4b56c3e96485 | [] | no_license | SwathyChellappan/Swathy | 5b52e614c5cfa127715692769aba24913152581a | 02252374da351f4330f793a404e332b4de8274ec | refs/heads/master | 2020-04-22T11:20:50.506995 | 2019-08-10T05:33:59 | 2019-08-10T05:33:59 | 170,336,714 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 256 | py | set 7.62.py | def checkbin():
l=['0','1']
f=0
st=input()
for i in range(len(st)):
if st [i] in l:
continue
else:
f=1
break
if f!=1:
print('yes')
else:
print('no')
|
a3bc0a40867aec4ec48bd2f559df87e468995acb | fdd7bf7b462ef80064ae2230256301e63b8e488a | /sample.py | 95efc3f169f42acd4bcabfb5cdecdd49516d8588 | [] | no_license | wzmxiaoguang/lstm-generate-abc-notation-music | 636b78077380f6de8405d44cc61650fb7f9de080 | acb1da9a728e8bd25870e11fa89b10e9e3334205 | refs/heads/master | 2020-04-10T20:08:33.643328 | 2018-12-11T01:32:03 | 2018-12-11T01:32:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 947 | py | sample.py | import tensorflow as tf
from arguments import arguments
from utils import TextLoader
from model import Model
import os
class sample:
def __init__(self, secnum):
args = arguments()
self.sample(args, secnum)
def sample(self, args, secnum):
data_loader = TextLoader(args.data_dir, args.bat... |
b47bfe94f983ffb27cd6f3042f64048955b45344 | d4f9d45298ebbc88f9dfc71bcbe8a444e07f2f99 | /词法分析爬虫案例/py_client/def_houses/p_sanya_donggtai.py | c4eeab65c5e66068981622f36b429390b0dd55b7 | [] | no_license | andyczy/czy-study-py-ml-deepLearning | 9bdf8dcfd9ae1dce70ae07554a81af946e17d8d4 | e882b884c74c14fb2f550697202a923bcb3e0259 | refs/heads/master | 2020-03-26T02:00:22.106673 | 2019-07-18T06:58:38 | 2019-07-18T06:58:38 | 144,392,514 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,178 | py | p_sanya_donggtai.py | #encoding:UTF-8
# chenzy python
from def_commons import def_beautifulSoup #应用模块
from def_commons import def_io #应用模块
import shutil
import math
# BeautifulSoup : https://cuiqingcai.com/1319.html
# http://sanya.home898.com/ 爬取页面显示的三亚楼盘获取楼盘详情url地址
# http://www.home898.com/loupan/1748/ 爬取动态(http://www.home898.com/loup... |
ff68dce8a50dd58ef945ae3db97e3ecded91872d | ac7e3759d8e4a220b080e09c4e529198f90b29e7 | /pyCausalFS/CBD/tocsv.py | 451a9b5ce823a9efb29844f0b426814c0de66089 | [] | no_license | zhipengwang30105760/pyCausalFS | 7e2f9c0979320ef557be9815b8313c85046534ee | d5d4c2f898ccb0ff424ffdbefe24d2c6204c4f4a | refs/heads/master | 2022-11-25T08:49:34.318558 | 2020-08-07T14:51:02 | 2020-08-07T14:51:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 416 | py | tocsv.py | import pandas as pd
import numpy as np
for i in range(11):
j = 1
if j == 1:
snum = 500
elif j == 2:
snum = 1000
elif j == 3:
snum = 5000
if i == 0:
continue
txt = np.loadtxt('D:/data/ins5_data/Insurance5_s'+str(snum)+"_v"+str(i)+'.txt')
txtDF = pd.DataFrame(t... |
f75a776804dfb82b1b795519d0ca64a3bd9738b3 | de9f199dfb51dcce159bdde3b6116879c9817344 | /common/vi_scripts/ctypes2sv.py | 82d3dcc7d5329abde7539406d21331bcbbdd7cb5 | [] | no_license | chi-wei-fu-vi/fc32 | cd8414408a0bf79b2dccfc6c8e80061fb7b9a10a | 324605045d3db1fc7cf293f98f4be4dddf7c05bf | refs/heads/master | 2021-01-25T13:48:57.531848 | 2018-03-09T23:11:29 | 2018-03-09T23:11:29 | 123,621,464 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,667 | py | ctypes2sv.py | #!/usr/bin/env python2.7
import copy
import ctypes
from collections import OrderedDict
from pprint import pprint
import veriloglang
import re
import string
class ctypes2sv(object):
"""
ToDo: handle nonprintable char
"""
pythontype2bitlen=dict(
c_byte = ctypes.sizeof(ctypes.c_byte)*8, # 8
... |
d980ae3b916b1278d55c5618711ed26cd6abaaed | 940a12117220d51ab523e97a00f838b3ab3fbeb8 | /HMM/utils.py | dbe88ed6ba25eed30cfb6b7661ffcf2d779db395 | [] | no_license | lih0905/Sejong_corpus | 0845ce1fa03f6c96ca7bc9c7d6a6992e1a79ebef | a0de24f71f06fd12bafcd0b5544de9849c58c8fa | refs/heads/master | 2023-02-16T21:45:05.839896 | 2021-01-10T15:12:07 | 2021-01-10T15:12:07 | 325,585,821 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,085 | py | utils.py | from typing import List
def read_corpus(txt_path: str, num_lines: int = 0) -> List[tuple]:
"""클린 처리된 세종 코퍼스를 문장 단위로 다음과 같은 형태로 리턴하는 함수
[('프랑스', 'Noun'),
('의', 'Josa'),
('세계적', 'Noun'),
('이', 'Adjective'),
('ㄴ', 'Eomi'),
('의상', 'Noun'),
('디자이너', '... |
5d9a6add7ec60c13ef4a81fd1625a3719f46feb7 | 5b6ef523718898b49b2f4d5b973152057cfddcf6 | /help4vzl/migrations/0005_auto_20180731_1346.py | a68ffd0504ba8e4fad7982b3c0f649d54dbe336b | [] | no_license | dynarro/help4venezuela | 610f6a270d1f2650285968df997ce84ebc9d2f58 | 7c4d8835aca159939f3be5a4026755396268af4f | refs/heads/master | 2020-03-22T07:51:59.424311 | 2019-02-02T15:40:43 | 2019-02-02T15:40:43 | 139,729,513 | 4 | 1 | null | 2018-09-27T13:37:45 | 2018-07-04T13:59:53 | Python | UTF-8 | Python | false | false | 506 | py | 0005_auto_20180731_1346.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.14 on 2018-07-31 13:46
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('help4vzl', '0004_auto_20180724_1518'),
]
operations = [
migrations.RenameModel(
... |
c5dbc300d4c31b43d74e7fda04f3b5c00bafd972 | c4d9d047e44859a3e6ef77f4aeedb4eecc8f3b27 | /app/migrations/0002_vehiclepost_make.py | 73a115dfede133ef9875bec6616db87bf0a75cde | [] | no_license | Dannyp123/Django-Car-Store | 822d1ba9ead3dd8f86083eee5f8c94dd890f70b9 | 16bcfd4783b382bbb5dbf0082aafab9f41d60fae | refs/heads/master | 2020-05-02T16:27:52.862607 | 2019-04-09T20:42:09 | 2019-04-09T20:42:09 | 178,068,978 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 406 | py | 0002_vehiclepost_make.py | # Generated by Django 2.1.7 on 2019-03-28 20:53
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='vehiclepost',
name='make',
fiel... |
a87d0d00f6a34bc29cb48788541603001b6f9716 | 570d674592d6094a4f3cd3def37a5e2ba9f587c7 | /Riego2/webAppW/migrations/0003_valvulas.py | fc99b9942d69d0456ffb80ebaf1e9e91067813cf | [] | no_license | StephanyValarezo/AppRiego | 1027d9d7fa5451721d06e2f873ecdf5a93040983 | b1f8bd704fa45893c55b2ac628f299fe4436cc87 | refs/heads/master | 2022-11-30T20:34:28.632372 | 2020-08-17T05:25:02 | 2020-08-17T05:25:02 | 288,089,599 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 863 | py | 0003_valvulas.py | # Generated by Django 3.1 on 2020-08-16 23:13
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('webAppW', '0002_botones'),
]
operations = [
migrations.CreateModel(
name='Valvulas',
fields=[
('id', m... |
47f82dc0773433664fd8e3a6fc3fc4e883a3ba88 | 86f508e288087c4d134f6582b51ffbc2d84b7211 | /Hackerrank/ProjectEuler/test.py | a118f52ed05fe576e785e508ed9a3b89138bf5ae | [] | no_license | diwakar1911/codingame-solutions | f5284f2d4d3c3f6f75cdfa0a2ec1223dec98a51c | 5ff8b77af95828877c5f6e1e573b2ed26864c34c | refs/heads/master | 2021-01-20T06:04:45.827745 | 2016-08-27T12:05:06 | 2016-08-27T12:05:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 682 | py | test.py | def add_multiples_of_3n5(n):
return (sum(range(0, n, 3)) + sum(range(0, n, 5)) - sum(range(0, n, 15)))
def inaan_multiple(n):
max = 0
num = 0
nnum=0
i =0
while( max < n ):
num += max
i+=1
max = 3 * i
max = 0
i=0
while( max < n ):
num+= max
... |
17b2bc67df3627ea08bb8880ae095fc691693379 | a01c6abc214e740d0532df3188d5b931f4f0c8ba | /feladatok1.py | 28e0bc4e87c894171b38f1ccf1ab0a68a4ee8f63 | [] | no_license | JanosLaci/PythonTraining360PyCharm | 420beccf37f8aa5f2d5530c072a9034adbe7a20b | e8330e13cb705ff553ae58e8d7932712581e81f7 | refs/heads/master | 2023-03-14T17:13:28.928509 | 2021-03-20T13:55:06 | 2021-03-20T13:55:06 | 322,578,053 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,650 | py | feladatok1.py | # https://e-learning.training360.com/courses/take/python-alapismeretek/lessons/10508870-feladatok-egyszeru-utasitasok-kifejezesek-comment-print
szobaterület = 90
vödör = 15
vödörár = 5200
teljesszoba = szobaterület / vödör * vödörár
#print("A teljes szoba kifestése " + str(teljesszoba) + " Ft-ba fog kerülni.")
fest... |
4b7c9877b5dccef8e08828ae3229223932a1e6a5 | 359f377e3c3c44852247f82c6c88cc291e0eb736 | /extract.py | 9ba25b426bc22acf73f9e3a7cec2ab06997c5f6c | [] | no_license | Yukiya025/javascript_kindle_shakyo | 55322a0ef994a604284e0169f112e136e1cd44dc | a8f07a01053e6faf59b533849f200e6d353f1295 | refs/heads/master | 2020-03-25T09:10:50.360414 | 2018-08-06T02:23:24 | 2018-08-06T02:23:24 | 143,652,037 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 316 | py | extract.py | # -*- coding:utf-8 -*-
# codesフォルダのファイル名を取得
# [_]以降のファイル名を取得
# print() する
import glob
import os
filelistname = ""
index = 0
def extract_files(path, ext):
for file_name in sorted(glob.glob(path + "/*" + ext)):
print(file_name)
yield file_name
|
0c070415de61659aa88841d2891be790de0b5bba | 3c60c449b2fac0506ee511e4710b950759eaf62d | /oaresearch/misc_utils.py | cd12d3227bae0b2bd470ad2e661be1072eda6558 | [
"BSD-2-Clause"
] | permissive | eendebakpt/oaresearch | d3186cacd9409ad2bac27d1283aed0aab08c9ca1 | cb14cdae5cac7fa251a268682b693f47a43ebc76 | refs/heads/master | 2023-05-31T23:45:09.691480 | 2023-05-16T19:25:04 | 2023-05-16T19:25:04 | 154,567,423 | 1 | 1 | BSD-2-Clause | 2023-05-16T19:25:06 | 2018-10-24T20:49:21 | Python | UTF-8 | Python | false | false | 2,172 | py | misc_utils.py | import inspect
from bisect import bisect_left
def printd(text: str):
"""Debugging print function"""
frame = inspect.getouterframes(inspect.currentframe())[1]
filename = frame.filename
line = frame.lineno
function = frame.function
print(f"{filename}: {line}: {function}: {text}")
def index_sor... |
0017c32189faa30a6262266194a2426114b915c1 | 72e4f9b6237069495d547b8c855081db4a65638f | /amr_bugs/src/amr_bugs/wallfollower_state_machine.py | a1c8d0fe9c2f6269b06659b397209e69d64eec62 | [] | no_license | shehzi001/amr-ss | 83d10106b52a2653abe3d6babad756fcdca7ffb2 | 7668d332e4f4fe31252b8eb36a4cd168c442d946 | refs/heads/master | 2020-04-12T14:41:25.460665 | 2014-06-24T11:16:03 | 2014-06-24T11:16:03 | 30,924,785 | 0 | 1 | null | 2015-02-17T16:05:31 | 2015-02-17T16:05:31 | null | UTF-8 | Python | false | false | 8,089 | py | wallfollower_state_machine.py | #!/usr/bin/env python
"""
This module provides a single construct() function which produces a Smach state
machine that implements wallfollowing behavior.
The constructed state machine has three attached methods:
* set_ranges(ranges): this function should be called to update the range
rea... |
8de2d5f45c9b5407207982e5917dc7447567ba4e | 483a3188feb1e4567da920bf6957a5a215ae8a33 | /transform_input.py | 1b63d6e89b5c2142a4d82578f3782fd0c19d9df0 | [] | no_license | xoigac223/kidsguard | d04aa0e60302ea421cdea54f24417afe2ee869dc | f681edf759f34cc0ab97d3448c30f90a42281b2d | refs/heads/master | 2023-02-11T20:34:53.648788 | 2021-01-04T12:48:31 | 2021-01-04T12:48:31 | 324,069,414 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,289 | py | transform_input.py | from title import standardize_data
from non_title import standardize_tags
import pandas as pd
import pickle
from pytube import YouTube
from sklearn.preprocessing import StandardScaler
from dataframe_creator import create_matrix_pruned_tags
category_list={
'Film & Animation':1,
'Autos & Vehicles':2,
'Music'... |
26b055fe357ca7978f863aed05a0f8b302c492a7 | f1b3b632e603c71d74c99fc8f063e13199fd15d8 | /sbem_decoder.py | 43c55695664721627c7ad4bff5a2c2379b61c756 | [] | no_license | krebsalad/movesense-test-tools | a9e8d5d9393aeda1977ce1f5a9be197cebb78d94 | 64ebbde4c6a5122aba5b6bb616f519d944f3facb | refs/heads/main | 2023-03-07T08:42:05.599975 | 2021-02-23T09:38:17 | 2021-02-23T09:38:17 | 341,493,783 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,042 | py | sbem_decoder.py | import struct
# convert a description header containg a group tag to a list of ids
def getGroupFromDescriptorStr(descStr):
ids = []
if descStr.find('<PTH>') != -1:
return None
str_start = '<GRP>'
str_end = '\\x00'
ids = descStr[descStr.find(str_start)+len(str_start):descStr.rfind(str_end)].... |
1c40587a192dd8f1f41399e5799af0476098f7d3 | 72c4fed1993042fc0a15dee6f47f1190debed537 | /test1.py | bd2cea92f980f326552a9a405e699e6651ba13f9 | [] | no_license | labtest216/test | b045ba714d9e1090dbe4b71b7a6df9e0eb69c98c | 51ee62cd3df4c7cc50447ae8c0dcb407a4c68518 | refs/heads/main | 2023-07-26T17:44:30.785359 | 2021-09-09T10:59:14 | 2021-09-09T10:59:14 | 399,001,198 | 0 | 0 | null | 2021-09-09T10:55:37 | 2021-08-23T06:47:40 | Python | UTF-8 | Python | false | false | 39 | py | test1.py | import platform
print(platform.node())
|
677dc07acf050053ee7607a4206fdb4a1df52e7d | 78698daa7a14ba6c718b880a3b8b1adbda9dd541 | /FBAuth/facebook.py | a85a51670de0091fc97d693707e64725b0ddcb68 | [] | no_license | MarHelen/FBAuth | cb746cb1e07ea833ceeca1f5d5f8b2c4eab75c45 | 2c37fc62fe5ad1359838f5555c853ed0ba106182 | refs/heads/master | 2021-01-10T17:01:23.558374 | 2016-02-01T09:01:52 | 2016-02-01T09:01:52 | 50,283,544 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,843 | py | facebook.py |
from django.conf import settings
from django.shortcuts import redirect, HttpResponse, HttpResponseRedirect
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from django.contrib.auth.models import User
<<<<<<< HEAD
from social.exceptions import AuthCanceled, AuthAlreadyAssociate... |
2418e4ce46cea410315846fda160540cd4598f7b | 12ad26dbda0976bc00b6635583c985c9ce9ba600 | /src/_processing.py | 43fc18715e6a1f908eef6a58fd592a0b509fc8c1 | [] | no_license | bonopi07/2018-1_advML_project | c0c783aae7c159b4518c3bfb0bb63eaa2f949564 | ad209690af1a1fa54d6a960e51897248a71bd2a7 | refs/heads/master | 2020-03-16T01:09:13.091574 | 2018-06-11T13:37:25 | 2018-06-11T13:37:25 | 132,433,986 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,595 | py | _processing.py | import csv
import os
import pickle
import re
# function: 입력 경로에 대한 모든 파일 경로를 리스트로 반환하는 함수
def walk_dir(input_path):
result = list()
for path, _, files in os.walk(input_path):
for file in files:
file_path = os.path.join(path, file) # store "file path"
result.append(file_path)
... |
50cbce75a6dcfdce9e4c2e6bd76aaa5aa95e22a2 | a39725319fbe8fbc850bc2f7d8a5e615e7f42a8c | /SQLighter.py | cd3e96e280d5bc57fc0f521c9ff908b87eb2fad5 | [] | no_license | Mudoxy/foxBot | e3c2a8915c16937f2aa36c0fd9592e5ba9b906b7 | 209ed2815cc2ff45f45225ddd937cb9cf81160ee | refs/heads/master | 2023-01-10T17:11:34.139102 | 2020-05-16T11:51:36 | 2020-05-16T11:51:36 | 260,753,966 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,906 | py | SQLighter.py | #SQLighter
import sqlite3
import datetime
class SQLighter:
def __init__(self, database : str):
self.connection = sqlite3.connect(database)
self.name = database
self.cursor = self.connection.cursor()
self.cursor.execute("CREATE TABLE IF NOT EXISTS {} (message_id integer, chat_id in... |