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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1ea60df85dea042236730724d749e15f748c87ce | dcf5b58781033b489a9181622f82e13843ace69a | /settings.py | ce321f0e561508de1c22f89ebf0f596e9f24e799 | [] | no_license | dvtkrlbs/DvtBot | 7a87f4a2dfbc9def5b8e21fda057109f39599ca4 | 414a54f75c2144e0ac0bfa1ee863d6a3280e5aa9 | refs/heads/master | 2021-06-26T07:36:52.960700 | 2020-10-29T20:00:56 | 2020-10-29T20:00:56 | 157,351,911 | 0 | 0 | null | 2020-10-29T20:00:57 | 2018-11-13T09:12:18 | Python | UTF-8 | Python | false | false | 149 | py | settings.py | from dotenv import load_dotenv
from os import getenv
load_dotenv()
DISCORD_TOKEN = getenv('DISCORD_BOT_TOKEN')
LOG_CHANNEL = getenv('LOG_CHANNEL')
|
6bdb0112b4ed991a3a5b81be7ee888deb18cfc3e | bdac2fe8a22f843b418b2f28e8e0aa38df5a8ffa | /DMS-QL/MSVR_train.py | 94f1237b59597131860d62e5cec3ad814bb4741e | [
"Apache-2.0"
] | permissive | FFFjx/DMS-QL | 4adecfb3eceb90f054900742edcff21426110784 | 3ca350ba7a5835ffc57db55431f80edf18f034ad | refs/heads/main | 2023-09-02T18:20:31.347287 | 2021-11-05T17:51:06 | 2021-11-05T17:51:06 | 398,566,882 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,647 | py | MSVR_train.py | import numpy as np
import pandas as pd
from sklearn.preprocessing import StandardScaler
from DMS.ipredictor import tools
from DMS.ipredictor.models.msvr.MSVR import *
from DMS.ipredictor.models import ANNI
if __name__ == "__main__":
# Seed switch
np.random.seed(36)
time_step = 6
gamma = 0.... |
4d6c03d7dc02ea9b84d1fdcf18e426e27dde207b | 6f16f22b7e824a0fb868181b6d55dc09906efc1a | /repositorio/services/buscador_service.py | 5f214e5a71e0ed8befaa6c6727b32b2437c28ca3 | [] | no_license | williamccondori/unsa_repositorio | dddeb91e94ee05d2725f43c75821df9d67a0a3d2 | 7929dbb9820d30baf1c12151e1750abaec3252d6 | refs/heads/master | 2020-03-22T22:22:31.416129 | 2018-08-02T21:06:33 | 2018-08-02T21:06:33 | 140,748,339 | 0 | 0 | null | 2018-07-26T22:46:11 | 2018-07-12T18:04:37 | Python | UTF-8 | Python | false | false | 977 | py | buscador_service.py | from repositorio.dtos.documento_dto import DocumentoDto
from repositorio.dtos.autor_dto import AutorDto
from repositorio.models import Documento
class BuscadorService(object):
def buscar(self, expresion):
documentos_dto = []
documentos = Documento.objects.filter(titulo__contains=expresion)
... |
8e082271951f18336f5be9431f0b480aea67efb7 | bcf4ffe1c3570582f82f1c9948edb04bbdd1b8c7 | /WaveNet/WaveNet_train/analysis.py | 4f220791cb18acf1c67b976b197127929d685684 | [] | no_license | mailsun/seismodinv | 34fac28c6832cc974b9df6ba662f061945e85f26 | 5d4d91e430184cf9a49d12ece4094315a078e06c | refs/heads/main | 2023-05-08T02:36:37.961911 | 2021-05-29T05:53:56 | 2021-05-29T05:53:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,851 | py | analysis.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Jun 11 15:40:02 2019
@author: bmoseley
"""
# This module defines helper functions for loading a trained WaveNet model and
# for loading a test dataset for a trained model. It is called by the Jupyter
# notebooks used to generate the final report plot... |
7f109e3dd4c9bd2da35ea9f2b79ce5aa4546a6f9 | 01cb1472ef30f1696f19d8d42ef896ba6209e5da | /TableStandalone.py | f1612e2ab0462cd9f092e7f81c129a4d44484853 | [] | no_license | bacon-GIT/USCert-Flask-Feed | f9eb354af0678495a092f15035314a76918e8a5f | 3b16090a8a0068f29fa5cbc548b269aa4b1fbbf0 | refs/heads/master | 2020-12-26T09:30:05.527485 | 2020-09-30T19:33:40 | 2020-09-30T19:33:40 | 237,465,708 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,344 | py | TableStandalone.py | import feedparser
import argparse
# parseAlerts grabs the (entry), extracts all necessary info, dumps the
# rest into "more_details" and returns a list.
def parseAlerts(entry):
# Parse all vulnerabilities into $feed
feed = feedparser.parse("https://www.us-cert.gov/ncas/alerts.xml")
# Sets $feed_entries t... |
030586b0c205210e09a04c62687e97d886f137e6 | 6612b2c652fac4954d8f61de5f284cd3d8ac83f8 | /contents/admin.py | 282496be8f79d960c0d86930a64565c181ae3673 | [] | no_license | LuckyValenok/CupOfSeries | fe28502177f1d32a73b4225d1c6ccf65344a3765 | 7e7dd71244e5f5bedc0ba1c85598b51df0f4e0ae | refs/heads/master | 2023-05-01T05:17:09.788031 | 2021-05-25T06:53:57 | 2021-05-25T06:53:57 | 365,823,594 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 255 | py | admin.py | from __future__ import absolute_import
from django.contrib import admin
from .models import Content
class ContentAdmin(admin.ModelAdmin):
model = Content
list_display = ('name', 'season', 'series')
admin.site.register(Content, ContentAdmin)
|
2fb2329a5ae83c1caebba6a737c800d17109aea0 | 5ec2513eeb80a4081ba65b3bd2697ee3698f5e6b | /tasks/utils.py | 1cc9c5022019c082c19f1735ccec70d089ab3edb | [] | no_license | rebeling/non-blocking-requests | b9367667e521cd40057602fa8f5373b2524d6e0e | 73d428f332df1893382be7cd2161312dfa7f8f56 | refs/heads/master | 2020-12-24T15:05:08.122247 | 2015-09-20T20:37:24 | 2015-09-20T20:37:24 | 34,674,953 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 200 | py | utils.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
def get_content(hit):
try:
return hit['hits']['hits'][0]['_source']['content']
except Exception, e:
print e
return None
|
a1897fee284d6d7c8d60b599111914c4b4c16820 | 7b6e1c0daec59653a5ec89cc1f20a47b49a61d7c | /sketches/server_data_base0.py | 65e523c6471229dc9c32cc5db4f0f1a4c77c847c | [] | no_license | skyris/GB_Python2 | ada7b4ca853b08579190e022e902c37d9193401f | 9db3ce1aee9eba883455230db693264fd211d1dd | refs/heads/master | 2020-12-31T05:24:47.006545 | 2017-04-20T23:45:14 | 2017-04-20T23:45:14 | 86,516,870 | 0 | 0 | null | 2017-03-28T23:20:56 | 2017-03-28T23:20:56 | null | UTF-8 | Python | false | false | 5,425 | py | server_data_base0.py | import datetime
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column, Integer, String, Sequence, DateTime, ForeignKey, Boolean
from sqlalchemy.orm import sessionmaker, backref, relationship
from sqlalchemy.sql import select
"""
2.а. Реализовать воз... |
8fe2bf7412ee2f64d5c18013e515abc8d8b49198 | 9672fa478478085b69c7ef8f02eaa7fa0bc7767b | /symphony/cli/pyinventory/api/service.py | 0b124d52478a18f16b3a52df38d38a597c21dc49 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | julianchr/magma | 437a1d86490ff5f1d279cf2cd3243bbd3f22f715 | f0b2ed7e08314208133cf722921d6e6ab7853825 | refs/heads/master | 2022-09-21T21:45:14.678593 | 2020-05-28T22:47:52 | 2020-05-28T22:49:52 | 267,723,888 | 0 | 0 | NOASSERTION | 2020-05-29T00:07:02 | 2020-05-29T00:07:01 | null | UTF-8 | Python | false | false | 6,029 | py | service.py | #!/usr/bin/env python3
# Copyright (c) 2004-present Facebook All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
from typing import Mapping, Optional
from pysymphony import SymphonyClient
from .._utils import PropertyValue, get_graphql_property_i... |
1c963852aa789d82500c2caf079919e9c92d71ab | 97641bc059df4391def86b82e49a8b753848b663 | /tests/test_tokenize.py | 9942c4583c4dc7cc35ad73ea76aecb5fec695f3b | [
"MIT"
] | permissive | redreamality/broca | d00298d68c27d233efcfe2a1b448d412e40ba5e3 | ac28e08022f81c8bb83b406887b3f00bc94db887 | refs/heads/master | 2021-01-15T18:32:20.263757 | 2015-08-02T03:21:36 | 2015-08-02T03:21:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,092 | py | test_tokenize.py | import unittest
from broca.tokenize import keyword, util, Lemma
class KeywordTokenizeTests(unittest.TestCase):
def setUp(self):
self.docs = [
'This cat dog is running happy.',
'This cat dog runs sad.'
]
def test_overkill(self):
expected_t_docs = [
[... |
57562543660e276c2577158a951b75c14ee0d3e3 | 43a09ebd38fbd2d41967ab59012111a5caff14ab | /faq/views/deep.py | 77d2a766991250e0e92e76839419b27c7b33e83b | [
"BSD-3-Clause"
] | permissive | mcoconnor/django-faq | 9283ff60a5a8e1fc5061f9a577094bc7db4a4620 | 19b97b7f5b0443ecc0d65919b8a31713895faae4 | refs/heads/master | 2021-01-18T05:19:21.902892 | 2016-05-05T22:03:40 | 2016-05-05T22:03:40 | 4,010,293 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 515 | py | deep.py | # -*- coding: utf-8 -*-
from faq.models import Topic, Question
from django.views.generic.detail import DetailView
class QuestionDetailView(DetailView):
model = Question
def get_context_data(self, **kwargs):
context = super(QuestionDetailView, self).get_context_data(**kwargs)
context['topic'... |
4b79c9238588a932c2da0b0bf5664be66420fdc0 | 3c20dd8a37f6694cea1c0cf2111524a5741cf94a | /Desafio022.py | ef30f56a98ee393ce524b02cb0d4ccd6b61999d9 | [
"MIT"
] | permissive | SheilaFernandes/Desafios-py | f3cdef561223960083655dda47ce2aa08570fcbb | d1dedc8d3111a4dd762409822bd0b5f8a416f728 | refs/heads/master | 2022-11-06T21:28:53.628632 | 2020-06-23T01:44:07 | 2020-06-23T01:44:07 | 272,025,309 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,262 | py | Desafio022.py | """nome = input('digite seu nome completo: ')
print(nome.upper())
print(nome.lower())
a =nome.split()
b = nome[0:]
print(len(b) - nome.count(' '))
print(len(a[0]))"""
#print(len(a[-1]) + len(a[1]) + len(a[2]) + len(a[3]) + len(a[4]))
# a contagem de todos as letras sem espaços não pode ser feita atraves do método spli... |
4cea498298ec52f69790dc8bc9bd7e7c6e1f87a5 | 60b320e3edb89e9d2c9798600377da21d74c4303 | /Ui.py | 71c2c8aad96052734f2e102e881933b984b8ee59 | [] | no_license | BenNorman1/TicTacToe21 | 6fa4ed2c55597069f81cedf337fe12d6040fb458 | 2c91135e40a757c438cede0963aa1866699179f7 | refs/heads/main | 2023-04-10T04:18:38.614018 | 2021-04-16T09:29:03 | 2021-04-16T09:29:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 610 | py | Ui.py | from abc import ABC, abstractmethod
from Game import Game
class Ui(ABC):
@abstractmethod
def run(self):
raise NotImplementedError
class Gui(Ui):
def __init__(self):
pass
def run(self):
print("Running the GUI")
pass
class Terminal(Ui):
def __init__(self):
... |
31f4a84c90973f26ec298ae79397873b724bcfe1 | 326e58cc44ebba305b37b7cb74387d9ac1e72703 | /unused/tf2_wide_deep/python/lib/joint.py | 5256a1f7e47ff0da52f601424cf903062b584923 | [
"MIT"
] | permissive | WenqiJiang/FPGA-Accelerator-for-Recommender-Systems | ef0d02abf75d522b511ee1b51bd5c2f591b6f79a | 6c3031487cd1447b7f5362483c14b108177387bb | refs/heads/master | 2021-07-07T22:23:13.270004 | 2021-06-09T21:46:22 | 2021-06-09T21:46:22 | 244,604,800 | 6 | 0 | null | null | null | null | UTF-8 | Python | false | false | 20,734 | py | joint.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: lapis-hong
# @Date : 2018/2/7
"""
TensorFlow Custom Estimators for Wide and Deep Joint Training Models.
There are two ways to build custom estimator.
1. Write model_fn function to pass to `tf.estimator.Estimator` to generate an instance.
easier to bu... |
84b381a518a8e7c66b5b1fc3a13fd6878cedc8b6 | 010b9586406dee7c0c18eefe4139c67c4ea64851 | /Final_deliverables/Iteration_3/feature_generation/tf_idf_features.py | 9a84e6ae37a34fa908b48159bdc931f6f6a4bfbb | [] | no_license | wsgan001/document-clustering | c6fcf40c96184b3068ee84a9afdab08e486d0f77 | 08cdb5461ba143277ad1a986ba916908bad3d68b | refs/heads/master | 2020-03-27T12:28:53.693435 | 2017-03-30T09:24:54 | 2017-03-30T09:24:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,880 | py | tf_idf_features.py | # -*- coding: utf-8 -*-
"""
Created on Tue Feb 28 09:26:08 2017
@author: anbarasan.selvarasu
"""
import numpy as np
from math import sqrt
from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer
class FeatureGeneration(object):
def __init__(self):
pass
... |
82fdf0face1d20f988ea922a3e24eafe66e1b563 | c10d30161af16219b59f4376a172d6e9013461ed | /generate_music_data.py | 11870fb1d442f942b89e3f73c665eceb6f99ed6e | [] | no_license | Adil-G/RickAndMortyHeadsGame | 1f854e034542720b283ba1f74e29a992dae7af3b | 1edbc2c33bab672b96db09d8489184ade763f83d | refs/heads/master | 2022-05-07T08:53:00.136221 | 2017-08-24T12:33:15 | 2017-08-24T12:33:15 | 101,022,693 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,045 | py | generate_music_data.py | import os
import json_handler
import song_class
import numpy
if __name__ == '__main__':
print "Generating Music Data:"
test_data = json_handler.load_json(".\TestData.json")
training_data = json_handler.load_json(".\TrainingData.json")
i = 0
for file_name in os.listdir('C:\Users\Tobe\Documents\P... |
3bebc927ba74610b46216cfd1842d411c8ef1ec4 | 1159fbcf629e6f140328bf9a525fe60be20b035e | /utool/util_cplat.py | 538d76056b3193be38947f24ae4bb69e088e4d47 | [
"Apache-2.0"
] | permissive | Erotemic/utool | 6da02c3266c4219832d3030143f17c159b70c6d5 | 6659d953b217748d0b15f0da4cd27fe789e3cd50 | refs/heads/main | 2023-07-23T16:03:23.508324 | 2023-01-29T02:24:40 | 2023-01-29T02:24:40 | 19,778,979 | 8 | 7 | Apache-2.0 | 2023-07-14T01:40:42 | 2014-05-14T12:42:17 | Python | UTF-8 | Python | false | false | 49,053 | py | util_cplat.py | # -*- coding: utf-8 -*-
"""
cross platform utilities
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import os
import pipes
import six
import sys
import platform
import subprocess
import shlex
from os.path import exists, normpath, basename, dirname, join, expanduser
from utool imp... |
25b65ee9f1093dac32d8cc81a9aa4005322faf8e | 00e2e9c320b942be01971f12a978f8d0a9f351f6 | /tryAndExceptAndFinal/finalExample.py | 139eb13f264f0813d4211187974b74922ef36dec | [] | no_license | NareshKurukuti/Python | cd9494f25178dc9475d52439c9ef496a80e75173 | 010bd6f608d2098f25c87c94c9e8b1a9f437c5f9 | refs/heads/master | 2023-04-05T07:01:27.148045 | 2021-04-12T11:30:05 | 2021-04-12T11:30:05 | 357,167,189 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 342 | py | finalExample.py | try:
print('try')
except:
print('except')
finally:
print('finally')
"""Example Four"""
try:
num = 5/0
except:
print("An error")
raise
"""Example Two"""
try:
print('try', name)
except:
print(unknow_var)
finally:
print('ok')
"""Example Three"""
name = "123"
raise NameError("... |
dbffd215baaaab0cef41ae183014232ccb416830 | dbd23b5c9ead096ea1b4c4ddd2acba3f6b4eb0db | /src/ngts_transmission/utils.py | 28fa4d7ebb429c456e334f8aafb43efe6056be3f | [] | no_license | NGTS/real-time-transmission | b067b9572d02ae99c7cbd6c569c4ac36eb14bc25 | f70901dbc9ae59515e7786d5d3a5978c46adc312 | refs/heads/master | 2020-06-07T16:11:45.860569 | 2018-02-26T11:15:49 | 2018-02-26T11:15:49 | 42,189,235 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 645 | py | utils.py | from contextlib import contextmanager
import bz2
from astropy.io import fits
import time
from ngts_transmission.logs import logger
@contextmanager
def open_fits(fname):
if '.bz2' in fname:
with bz2.BZ2File(fname) as uncompressed:
with fits.open(uncompressed) as infile:
yield i... |
cf272600ff5b0b082fa0bbaca38dd2f72cece9b2 | 44725a28e794da7efca6070defeba492470c3294 | /db_app.py | 41adf618e4d73dd6be157e1f8cbdf0d0649eae33 | [] | no_license | samuel025/Python-Tkinter | 4a3b1c01385b0e3947cba5c2dffbe84a93701269 | 3e1c00bfb509eafe5e739de4510c0a4c0a92392e | refs/heads/master | 2023-01-16T01:55:23.643186 | 2020-11-26T17:37:52 | 2020-11-26T17:37:52 | 316,289,283 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,333 | py | db_app.py | from tkinter import *
from PIL import ImageTk, Image
import sqlite3
root = Tk()
root.title('Sammy title')
#root.iconbitmap('c:/gui/codemi.ico')
root.geometry("300x400")
#Create database
conn = sqlite3.connect('address_book.db')
#create cursor
c = conn.cursor()
#create table
'''
c.execute(""" CREATE TABLE adresses... |
d63ca0ca90037502836d66cf56fdcd2a29a228e5 | 95629825eeeb6e2979b78c36ad068bf79bb49601 | /player/fibonaaci.py | 65b1250f0bf4a1593edf7aa0a2e34b6019dfaaef | [] | no_license | kaviyasriprabhakaran/python_programming | 3cb07ba0454b7fabfe5a2b30718e1080fd1e4c47 | 129df60e36b7c49a43f5d31ba9d9cf5ad8afcc4e | refs/heads/master | 2021-05-01T18:55:28.531554 | 2018-07-10T13:20:52 | 2018-07-10T13:20:52 | 121,011,863 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 125 | py | fibonaaci.py | n=int(input("enter the number:"))
n1=1
n2=1
count=0
for i in range(0,n):
print(n1)
nth=n1+n2
n1=n2
n2=nth
count+=1
|
0a34be05d1005e21dd608641ea5b71e87da80909 | 9be43b26bd6b4a86b7faba7e2117a9709b5a9bc3 | /scripts/archive/wp_backlog/medicine_report.py | b256111e9eae69ac4b4f8fc1f4da84a4f5e3a64a | [] | no_license | Wikimedia-Sverige/hostbot | b7f3ecc3e9675ecbf2e683d5bc0ad18de0cf4fa4 | 5359b875e9c22f2b517368b22e42e1304dd75bb3 | refs/heads/master | 2020-04-06T19:54:25.767507 | 2017-02-23T12:19:07 | 2017-02-23T12:19:07 | 58,548,637 | 2 | 0 | null | 2017-02-23T12:19:08 | 2016-05-11T13:44:39 | Python | UTF-8 | Python | false | false | 5,705 | py | medicine_report.py | #! /usr/bin/python
# Copyright 2013 Jtmorgan
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distri... |
1c0a1261250bcde0dda7aa9dab8125d1e8a65437 | 5c2f0f77922db152cedf5ee3435264898a4b2d62 | /partition3.py | 9698681a41549a7fd4004cf7834afd1fef08ee52 | [] | no_license | rcurran1221/Algorithmic_Toolbox | 5ab642b9c3fbafeec4f9421ff42a1940926ee3be | 7c21c53e98c1699c095d996e81c661f504aba2fc | refs/heads/master | 2020-04-06T16:58:35.351443 | 2018-12-16T19:54:03 | 2018-12-16T19:54:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,116 | py | partition3.py | # Uses python3
import sys
import itertools
def partition3(A):
for c in itertools.product(range(3), repeat=len(A)):
sums = [None] * 3
for i in range(3):
sums[i] = sum(A[k] for k in range(len(A)) if c[k] == i)
if sums[0] == sums[1] and sums[1] == sums[2]:
return 1
... |
cc036cb29c016b4b9f47156e6ec8b8e873c920a7 | 2f6546a99ba41ea9123245ed6183f3132c00abab | /Parser.py | 27bfad5abcf9151c12d6246a2102545c271960bb | [] | no_license | DmitrySavkin/calculator | 3a2274f3bfcab3e6a8ec2f43202a06f45ac222c5 | 5eac87870cb7b765f85b170f45641183256974ad | refs/heads/main | 2023-06-01T04:14:58.699616 | 2021-06-13T20:28:39 | 2021-06-13T20:28:39 | 376,634,652 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,031 | py | Parser.py |
class Parser:
def replacer(self, s, newstring, index, nofail=False):
# raise an error if index is outside of the string
if not nofail and index not in range(len(s)):
raise ValueError("index outside given string")
# if not erroring, but the index is still not in the correct ran... |
3e0aa735805fcc2d597394fc3661c1154b8099b4 | 42033b6285ea193656cd7b1c42db1e774f763465 | /weather_api.py | f8bd5a4cf9df0368c65d45b167b622c3d0e98a28 | [] | no_license | nija/python-bus-poc | 57132692fcf3f23f6895ce39038d9da4bbf8f8c0 | 40dd9ff8d785a13ea3a6ec56547e88f392c1d79b | refs/heads/master | 2021-01-01T05:24:09.023288 | 2016-05-27T21:06:09 | 2016-05-27T21:06:09 | 59,780,249 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 968 | py | weather_api.py | '''API wrapper class'''
# pylint: disable=I0011,C0103
import json
import urllib
import urllib2
class WeatherApi:
@staticmethod
def get_weather(api_key, location):
# uri = "http://api.openweathermap.org/data/2.5/weather?zip={},us{}".format(location, api_key)
# print uri
# response = ... |
6af3d7915a4ee7022bc341d030a96e1c5fb29e51 | 1caf1ed539e8e35745a1828c72719f400adc0cb1 | /prints.py | bb4c93c6f1b09fa1f8d35bc5282c95eb19485f06 | [] | no_license | MarkOrkenyi/Battleship-Python-Game | e5783af196ab1ae609c1904e2cb00715d4293122 | 28bf22e76319cc4c1830f13a764b0f54bf548aaf | refs/heads/master | 2021-01-23T07:43:54.786828 | 2017-03-30T21:33:58 | 2017-03-30T21:33:58 | 86,435,978 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,820 | py | prints.py |
def player2won():
'''Displays that player number 2 won the game'''
print()
print()
print()
print(" ██╗ ██╗██╗███╗ ██╗███╗ ██╗███████╗██████╗ ")
print(" ██║ ██║██║████╗ ██║████╗ ██║██╔════╝██╔══██╗")
print(... |
b340bc7bf40d773bcd78c4c8698833ff809e64a4 | 74b79d7d8c226ff4b39d24978c1f72060429722f | /code/fgb/Tester/interfaces/testUART.py | c62713adba74661769bfd49657fb9b3d4316b818 | [
"CC-BY-3.0",
"BSD-3-Clause"
] | permissive | biomimetics/biomimetic-millisystems-lab | ddfa9ddea38c7acf93c4909e403d7eba44e81c0d | 92d6ca49c528c6f630a2e931c652665c2b6747d6 | refs/heads/master | 2021-01-11T09:59:42.864322 | 2017-01-05T08:19:51 | 2017-01-05T08:19:51 | 77,898,821 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 735 | py | testUART.py | #
# Testing UART:
# Sending 256 ASCII characters and checking the returned character for a match.
#
# Created on 2010-3-1 by fgb
#
import serial, sys
# Check and parse arguments
if len(sys.argv) < 2:
print "Not enough arguments given. Need serial port."
sys.exit()
port = sys.argv[1] # serial port for the cur... |
cc815e4ebfdd4e7d6da5cee3464ca4b13b38ebb9 | 88a81e5f8f0b18412e25b34e5b16ba74cc0df59e | /src/epi/arrays.py | 7f5372dc8b3cd5e87778d7dc943e3333ebbfbfa2 | [
"MIT"
] | permissive | thejohnjensen/data-structures | b83feadaef1d0f11a2520d32cf574042d27fb8af | 94e1d1cd4ac793e995910812d78fa1b46fd88a4d | refs/heads/master | 2021-09-09T09:48:44.526977 | 2018-03-14T21:34:28 | 2018-03-14T21:34:28 | 111,492,248 | 0 | 0 | MIT | 2018-02-27T04:13:27 | 2017-11-21T03:09:04 | Python | UTF-8 | Python | false | false | 1,739 | py | arrays.py | """Module for chp 5 arrays."""
import unittest
def dutch_flag_part(a, p):
"""."""
pivot = a[p]
s = []
e = []
b = []
for val in a:
if val > pivot:
b.append(val)
elif val == pivot:
e.append(val)
else:
s.append(val)
return s + e + b... |
106eb40d41335699c055e672530558f31f98b476 | cf5bfac1e203ae0da1802cf539f32250b57e7224 | /3.Advance features/With Context.py | 7e5a7fe24f5d82e80d1277a8439c3eab0afd2c20 | [] | no_license | jnepal/OReilly-Python-Beyond-the-Basics-OOP | fba2229ffd31b87e2ceab48c6c3f7f445ab47493 | 05050a7ecd0db5c9f18cc6e5ae49a07ddf6054cf | refs/heads/master | 2021-05-01T07:16:26.957247 | 2018-02-11T18:16:36 | 2018-02-11T18:16:36 | 121,152,291 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 510 | py | With Context.py | '''
with will automatically run cleanup routine
like with open() as file will close the file handle
'''
class MyClass:
def __enter__(self):
print('Entered')
print(self)
def __exit__(self, exc_type, exc_val, exc_tb):
print("Exited")
print(self)
def say_hi(self):
... |
7f17afb022b8baf8f23ab8c54a78c22a6f2b3fd9 | 8e695536f696f960292c89c9dcd89fddd02923d4 | /Guitk/Gui1.py | 9ce1a5130b1e122ef04758406c30afbcef7b1501 | [] | no_license | Vittorio47/Puropy | 589061a3f30963fdacbda5a734ef2f1892900217 | d27b968c2acf2ece1874be1d47cb1e7d698197d0 | refs/heads/master | 2021-01-10T14:32:43.297024 | 2016-02-29T23:40:02 | 2016-02-29T23:40:02 | 52,812,855 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 159 | py | Gui1.py | import tkinter as tk
from tkinter import ttk
win = tk.Tk()
win.title("Python GUI")
ttk.Label (win, text = "A label").grid (column= 0, row = 0)
win.mainloop()
|
a91ae9050a5a407ce8261e3a172cce78b24e2648 | f1230affa3a7691e2701dcea27ab4784e9d6f4de | /first_positive/app.py | 4b42e5bee98f30b690789c93782d9b16a175b7dd | [] | no_license | benilton02/tdd_python | 4791db1ad2cd3deb94900589d987148aeb55fdf1 | d97d4fa67d110746a98f8261206288f65d8cb980 | refs/heads/master | 2023-04-08T21:47:13.752615 | 2021-04-13T15:58:22 | 2021-04-13T15:58:22 | 356,141,993 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 712 | py | app.py | '''
Tenho que fazer um código em que o OUTPUT seja o primeiro número
inteiro positivo faltante em uma sequencia
Por exemplo, na seguinte lista, o output seria o valor 2
numeros = [1, 3, 10, -2, -14, 20]
'''
from typing import List
from operator import le, gt, ne
def app(values: List[int]):
if le(sum(values)... |
bbddf43c2a16bd637c76b025ff5ca94c9c573e3d | 9490cea5320cc8b2754e914693997a948d502f59 | /HW/7/task_7_2.py | e62623243d947b022127abd69a0b86e1e59e991d | [] | no_license | IlyaNazaruk/python_courses | 4deac0aeca163f78f44a45247783049cc8fd503f | 645c586af07058867df9f860cecb45118e1a339e | refs/heads/master | 2022-02-13T16:01:57.282921 | 2019-04-29T17:01:04 | 2019-04-29T17:01:04 | 177,451,915 | 0 | 1 | null | 2022-02-01T13:16:52 | 2019-03-24T18:17:21 | Python | UTF-8 | Python | false | false | 2,084 | py | task_7_2.py | def inch_to_cm(n):
inch = n * 2.54
return inch
def cm_to_inch(n):
cm = n / 2.54
return cm
def miles_to_km(n):
ml = n * 1.609
return ml
def km_to_miles(n):
km = n / 1.609
return km
def pound_to_kilo(n):
kg = n / 2.204
return kg
def kilo_to_pound(n):
pound = n * 2.204
... |
b8d5153b991f1aaa95eb4351380add356e58e2bb | 5615f555acea4dba64f7d1b68c0d499982dfd05c | /hr_cgrae/models/resCompany.py | 69a7154f59b24d0172a3b0068db7504e02a90780 | [] | no_license | soulbadguy00/modules | 9020dd352f32e1756bf447060d55989bd2842e7c | 79a9b13da9cf0eeb210acbed7c948bdc82962bcf | refs/heads/master | 2023-06-28T20:40:33.352485 | 2021-07-27T20:48:46 | 2021-07-27T20:48:46 | 390,121,743 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 518 | py | resCompany.py | # -*- coding:utf -*-
from odoo import api, fields, models, _
class ResCompany(models.Model):
_inherit = "res.company"
def _getTotalCGRAE(self):
for res in self:
total = res.tx_cgrae_employee + res.tx_cgrae_employer
res.tx_cgrae_total = total
tx_cgrae_employee = fields.... |
906b5b78f102dc735408a097b5d9d034ef65189f | f76314b881b29e7fcac259fd0083319932bd84c3 | /20-str-format.py | eff977261ea5da6bb781278c96b58437d69a9ea3 | [] | no_license | foxli180/PythonLearning | 0ddc7c1ffe37b69898ce51befc3a3bd4f850f988 | 465bb31fa2d7400ca38bd0a8a0e90a1194076f44 | refs/heads/master | 2021-01-10T20:29:19.209872 | 2012-09-14T15:27:29 | 2012-09-14T15:27:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 325 | py | 20-str-format.py | age =25
name = 'Swaroop'
print ('{0} is {1} years old'.format(name,age))
print ('Why is {0} playing with that python'.format(name))
print ('{0:.3}'.format(1/3)) # 输出1/3的值, 精确到小数点后三位
print ('{0:_^11}'.format('Hello')) #将 Hello 在__符号中居中(^)显示 总共11个字符 :___Hello___
|
6e679717e67b758e84cacde9ccb223ad52d1ae9e | 075770383615fae86b7b354443f5b1edd3b45eda | /python_data_structure/queue/queque-printer.py | aebc7a64e81f41f878ed1e8e92706f3821e50d2d | [] | no_license | ShoutangYang/python-DataStructure-Algorithm | b4a4b554414046655bef24c4702cbc3d5104d541 | d316064d166bd4d15ad9efd49a486df2e0b88e70 | refs/heads/master | 2020-03-19T03:01:23.742048 | 2018-07-07T15:34:06 | 2018-07-07T15:34:06 | 135,686,286 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 191 | py | queque-printer.py | from queue import Queue
class Printer:
def __init__(self, ppm):
self.pagerate =ppm
self.currentTask =None
self.timeRemaining =0
def tick(self):
|
c6e68cb8c7851cf461d91757455b412af45feea5 | 800d501e396765125f8aa28fa72e61c2ce9aab86 | /scikit-learn/image_feature.py | 4cd2dd811d383ef283e7f6193942a1a5ea7f02c5 | [] | no_license | WeihanSun/ML | 601d4b93fef059f8e4754e24fbf689c0f606bab2 | aa3a7f1da1fed1ee3fca7e722d2f0adbdb1b368b | refs/heads/master | 2020-03-18T20:51:38.284823 | 2018-07-01T13:59:51 | 2018-07-01T13:59:51 | 135,243,010 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 902 | py | image_feature.py |
import numpy as np
import matplotlib.pyplot as plt
from skimage.feature import corner_harris, corner_peaks
from skimage.color import rgb2gray
import skimage.io as io
from skimage.exposure import equalize_hist
def show_corners(corners, image):
fig = plt.figure()
plt.gray()
plt.imshow(image)
y_corner, ... |
44a48319d6ee14ec249080d37b55b815daff845e | 311814eb90ed89c466b3ca7e5e47bbd5ff471d70 | /pymarkdown/plugins/rule_md_035.py | be3f2a92cd35ef3216991bf431c2ba6fefb4f13f | [
"MIT"
] | permissive | jackdewinter/pymarkdown | cbf78a0887e78970875ac81abd29e02ce3a7c269 | 2b5f72910ca0a7dfab022bc9b037bb1aeab9fe77 | refs/heads/main | 2023-09-01T16:24:41.757093 | 2023-08-30T04:53:38 | 2023-08-30T04:53:38 | 236,387,810 | 43 | 12 | MIT | 2023-09-14T08:24:36 | 2020-01-26T22:54:10 | Python | UTF-8 | Python | false | false | 3,482 | py | rule_md_035.py | """
Module to implement a plugin that looks for inconsistent styles for thematic breaks.
"""
from typing import cast
from pymarkdown.plugin_manager.plugin_details import PluginDetails
from pymarkdown.plugin_manager.plugin_scan_context import PluginScanContext
from pymarkdown.plugin_manager.rule_plugin import RulePlugi... |
ff69c53ff63c3335cb810d23691b31d13b7f88b3 | 642d65c4606d2ea56be7a2544e33471b1ad7e300 | /backend/admingym/memberships/urls.py | 4a6079aa42bd540163fe1d00b613949dc21fd7aa | [
"MIT"
] | permissive | Manuelhra/AdminGym | dec2889c32cb4412f39a54333c0ed59ef2c5679c | caf2b6f5e9a0ed9e98567a036bec9a34b44ecf13 | refs/heads/master | 2022-12-11T10:06:17.513032 | 2020-09-14T17:28:00 | 2020-09-14T17:28:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 411 | py | urls.py | """Urls membership module."""
# Django
from django.urls import include, path
# Django REST framework
from rest_framework.routers import DefaultRouter
# Views
from admingym.memberships.views import MembershipViewSet
router = DefaultRouter()
router.register(r'memberships/(?P<slug_name>[a-zA-Z0-9_-]+)/clients', Member... |
6c306fc9640956e6ebc07656ba96138ed02485c3 | a149044762566830b4356343c062ee84c8056471 | /healthid/tests/preferences/test_timezone.py | ae7920425dc695d973b4cbad76c8741d9733791f | [] | no_license | malep2007/healtid-web-api | 23fbe8b34a3c5256cbb60cf15205f65cc035df13 | d9e88b4d8fe1dbc297b61bb007d4182928e515d4 | refs/heads/dev | 2022-12-12T03:24:37.537569 | 2019-12-17T16:26:59 | 2019-12-17T16:26:59 | 228,655,076 | 0 | 1 | null | 2022-12-08T05:25:00 | 2019-12-17T16:17:27 | Python | UTF-8 | Python | false | false | 1,834 | py | test_timezone.py | from healthid.apps.preference.models import Timezone
from healthid.tests.base_config import BaseConfiguration
from healthid.tests.test_fixtures.preferences import (timezone_query,
timezones_query,
update_timezone... |
7f1c1287b6b1313296e8e29bc3da67713c65314a | 0a2c61de76f8576b6d3a7c9fab6c91e06d26a6ef | /app/finances/incomes/resource.py | 728f06865bd73e272173ef9910c2bbe97cbfe695 | [] | no_license | biancarosa/easylife-api | 86b6c94f9984fd8f649e956275d1489260a9c72e | 390f1a65d8186b8ef3880a1a04a64028aab87e86 | refs/heads/develop | 2021-07-08T08:16:47.779160 | 2018-02-01T00:16:47 | 2018-02-01T00:16:47 | 98,951,679 | 0 | 0 | null | 2019-06-09T03:36:24 | 2017-08-01T02:43:39 | Python | UTF-8 | Python | false | false | 601 | py | resource.py | from flask import jsonify
import flask_restful as restful
from .model import Income
class IncomesResource(restful.Resource):
def post(self):
req = self.request.json()
income = Income()
income.amount = req.get('amount')
income.reference_month = req.get('reference_month')
in... |
0e4c82d6eb77d2b6357925c9aab516bcc3310a4c | 1591ce916bf8dcbccdd347471a338617d535279d | /Advance Python - Object Oriented Programming/05_Encapsulation.py | afa546b4f2970bc37f2d139eeabbad83c958e028 | [] | no_license | pavanpandya/Python | 8ea9d06d3a1d0c42fd6edf9b2e3490e29a486bc8 | 58d3f2b7534d4a6a6e9f88867e2290f299c6ecd3 | refs/heads/main | 2023-05-07T04:28:38.713726 | 2021-05-15T08:00:20 | 2021-05-15T08:00:20 | 367,570,942 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,549 | py | 05_Encapsulation.py | # 4 Pillars of OOP:
# 1. Encapsulation: Encapsulation in Python is the process of wrapping up variables and methods into a single entity.In programming, a class is an example that wraps all the variables and methods defined inside it.
# 2. Abstraction: Abstraction in Python is the process of hiding the real implementat... |
26d14bc74d893f6f14ee7405280f4af41854c544 | 483964d52653bfc4cb857ace6ab92d3b5806bc0b | /source/ExportPascal2txt.py | fa986b12ca52feb1febfc37400361373d8035017 | [
"MIT"
] | permissive | grantrosse/PyImageRoi | a5be991f8d5b55bb583d67e71babe09de38456db | fc95d48f33e3dcde308a027f1f0dc5ee6d9a3919 | refs/heads/master | 2023-06-15T15:34:18.940267 | 2019-10-09T01:26:40 | 2019-10-09T01:26:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,750 | py | ExportPascal2txt.py | import os
import glob
import pandas as pd
import xml.etree.ElementTree as ET
import argparse
import numpy as np
def run(path, output):
#xml_df = xml_to_csv(path)
#xml_df.to_csv(output, index=None)
# for filename in os.listdir(path):
# base_file, ext = os.path.splitext(filename)
# print(bas... |
3b1426e0f29093e1e462765bcf1d351a064b9639 | bcdaa75201fb739ea600afa52c10e1bfa65a322c | /GSAS-II-WONDER/GSASIIfpaGUI.py | 7a062d512fefa6aadef53c5db6620b1d8c618d79 | [
"MIT"
] | permissive | WONDER-project/GSAS-II-WONDER-WIN | 381f9dcad58a76c4218145faa03c70aaf14615a9 | 6e788f5de928568f57296f933b8e4444cb9649c8 | refs/heads/master | 2020-12-19T20:33:57.928182 | 2020-03-04T17:51:10 | 2020-03-04T17:51:10 | 235,844,330 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 30,478 | py | GSASIIfpaGUI.py | # -*- coding: utf-8 -*-
########### SVN repository information ###################
# $Date: $
# $Author: $
# $Revision: $
# $URL: $
# $Id: $
########### SVN repository information ###################
'''
*GSASIIfpaGUI: Fundamental Parameters Routines*
===============================================
This module contain... |
4652cd5548b550cc21d126fc4fbe3e316ecb71b2 | 2df8afa5cf1c8640857ec73b8cd9061b3fe399ec | /disanfang/third_party/app.py | ca4fa091f269d22739753ec21b0c0b52c1e8222e | [] | no_license | Ojmin/fengkong | 93466f7bee891ddbc8ba7214d0f4e77f015c6b35 | 8d1f74650d6016ca7aabc12ee2b8e008c155834d | refs/heads/master | 2022-12-08T21:19:59.683026 | 2018-12-11T03:01:36 | 2018-12-11T03:01:36 | 161,153,576 | 0 | 1 | null | 2022-06-21T21:35:25 | 2018-12-10T09:56:26 | Python | UTF-8 | Python | false | false | 2,080 | py | app.py | import json
import requests as requests
from flask import Flask
from flask import request
from tools import AESCipher, tokenId, TokenKey, appId
from tools import TCApplyNeedleUrl, TCCreditNeedleUrl, TCWJNeedleUrl
app = Flask(__name__)
@app.route('/', methods=['POST'])
def hello_world():
if reques... |
b88af16693eca10d0bd78fd706389f5468c9b99b | 0519c78c15ebb7d9b9077f391676eda2ba333cfc | /jobs/urls.py | 1cba4a00b9e38dc1acf369e518e6737fcc5e3525 | [] | no_license | kkthecompguy/admin-umojabiz | 53fdf747a96034e46cf36096a67029ec6f203a63 | f052d6895ee338d26b03704bd9113330d334e4f0 | refs/heads/master | 2023-01-24T07:42:50.731314 | 2020-06-06T10:52:35 | 2020-06-06T10:52:35 | 318,789,530 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 445 | py | urls.py | from django.urls import path
from .views import job_upload_view, job_view, job_applicants_view, posted_job_view, bussiness_list_view
app_name = 'jobs'
urlpatterns = [
path('', job_view, name='job-index'),
path('applicants/', job_applicants_view, name='job-applicants'),
path('posted/', posted_job_view, name='job-... |
43bad38d209b5c326cb9f17ba1ae135d06320e97 | 9c2acf0db528340443812fe7bd4a56283cd944f5 | /apis/views.py | ff9a3426badba596f588482e134cf8d408abaa92 | [] | no_license | junaidikhlaq/django-api-details | 6cec946279be28b81a5561b827f1266db27a2686 | 348ea65bfb5c8c18f5b6b036cdaa5d8ae704742b | refs/heads/master | 2023-06-04T17:10:14.604323 | 2021-06-27T18:10:33 | 2021-06-27T18:10:33 | 380,806,957 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,424 | py | views.py | from rest_framework import filters
from rest_framework.generics import ListAPIView
from rest_framework.permissions import IsAuthenticated
from rest_framework.viewsets import ModelViewSet
from apis.models import Contact, Address, InvoicePosition, Country, Invoice
from apis.serializers import ContactSerializer, AddressS... |
1429524b0ae3b679bc3d4386dd17ed50b0fff381 | c2b23218125a756a14996e97a8f75d30b0085f6f | /week2/problem-1.py | a56082cbf19b24c1c5d5f67ab6ab8a2f9c8d93e3 | [] | no_license | ziweiwu/MIT-introduction-in-computer-science | 6ddfece8322c2eba892abe7879a81d78aa86bbd5 | a927b81951f14476f14ec67931eb99fc8f38b0ca | refs/heads/master | 2020-12-24T10:40:34.312005 | 2016-11-08T01:47:14 | 2016-11-08T01:47:14 | 73,137,792 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 257 | py | problem-1.py | balance=42
annualInterestRate=0.20
monthlyPaymentRate=0.04
monthlyir = annualInterestRate/12
rb=balance
for i in range(12):
mp = monthlyPaymentRate * rb
rb=rb-mp
rb=rb+rb*monthlyir
print('remaining balance: ',round(rb,2))
|
cef4568b4568bceeedca6d57c0ccacfaae67c061 | befcdc27779a1bbd7fc0af80a62f8f0e53a56bed | /MultipleMovieTimer/main.py | 608e9ed46f15cdfadc8ff4a79039bcb3c4ce4b58 | [] | no_license | tmwbook/small-projects | 9b6c3a7fa45bd0a1ed31587d5d1e29c56f0eac20 | 48204de37b57b6b067c84a99416d125b0607bd43 | refs/heads/master | 2016-09-10T15:17:04.728953 | 2014-10-22T04:41:01 | 2014-10-22T04:41:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 26,199 | py | main.py | from time import time
import threading
import os
#hh:mm:ss
movie1Time = "00:00:00"
movie2Time = "00:00:00"
movie3Time = "00:00:00"
movie4Time = "00:00:00"
movie5Time = "00:00:00"
timer1Start = None
timer1Time = "00:00:00"
timer1Running = False
timer2Start = None
timer2Time = "00:00:00"
timer2Running = False
timer3Star... |
051bd11c42815ec8f8ece8eae9d33890da77129c | efb60258270c70d0b16581e8b6fe32001015b16b | /modules/services/dbservices/community/get_communities_by_offset_service.py | 47b25795c50931d039c2ba0e1a566b8dfc099adb | [
"LicenseRef-scancode-public-domain"
] | permissive | signeus/API-Web | bd48177201007e2091828458da3572fde4f24755 | b9fe99465a178666299a079f99a42dafc80c5bb7 | refs/heads/master | 2021-01-11T20:30:50.964928 | 2017-05-19T09:31:01 | 2017-05-19T09:31:01 | 79,131,449 | 1 | 1 | null | 2017-04-07T08:42:55 | 2017-01-16T15:25:05 | Python | UTF-8 | Python | false | false | 434 | py | get_communities_by_offset_service.py | # -*- coding: utf-8 -*-
from services.interfaces.i_service import IService
from services.dbservices.db_service import DBService
class GetCommunitiesByOffsetService(IService):
def __init__(self, core, parameters):
super(GetCommunitiesByOffsetService, self).__init__(core, parameters)
def run(self):
... |
03f73a55e0a0773bbdbb0d5e29a2db598ba2e080 | 27aabbcf0818b85db1bf6e3e27501fae0a368638 | /.gitignore/stuff.py | ff25e0297d93a87802af640f620a574c59179845 | [] | no_license | AntiAnecdote/PythonTest1 | 60a6b63640b579861e387f1ffc5266c4540ddd3f | d135715f9b2eda1a6060144826eec0b0d6dc6c3e | refs/heads/master | 2022-02-12T17:46:50.055660 | 2018-10-23T14:53:25 | 2018-10-23T14:53:25 | 149,605,434 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,433 | py | stuff.py | #Week 5
#Task 1.1
a = 13
b = 14
calculation = a + 1 <=b
calculation2 = a + 1 >=b
calculation3 = a + 1 !=b
print (calculation)
print (calculation2)
print (calculation3)
#Task 1.2
myage = input("How old are you : ")
print ("Hi there, You are " +myage+ " years old")
#Task 1.3
num1 = input("Enter the first number : ")
num2... |
0b6cecb1e115ec037b7695d1107799607d0f9f8a | 9bf48e330e94d658f00db2d14fa50c7b8eec6685 | /PTR/newactor.py | 028fcd3d37d8fa79befc4f66797f67f0a924e275 | [
"Apache-2.0"
] | permissive | xdbdilab/ppdrl | 2d3b48cb32e710afdfc4b31b6d22bebb7c257bf0 | 64eab7c4d9bcbd3cc74e2b6e096575e5cf306c9c | refs/heads/master | 2020-05-21T14:31:07.257127 | 2019-05-31T14:25:16 | 2019-05-31T14:25:16 | 186,077,462 | 12 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,251 | py | newactor.py | # -*- coding: utf-8 -*-
import tensorflow as tf
distr = tf.contrib.distributions
from tensorflow.contrib.rnn import LSTMCell,LayerNormBasicLSTMCell,BasicLSTMCell
class Actor(tf.keras.Model):
def __init__(self, config):
super(Actor, self).__init__()
with tf.variable_scope('actor... |
7944fd1c4de52db099e0319f75b9da442d815be8 | cb7c8558d3393f96e9e95c7632f06ebfdd123017 | /python2/ref_alt_ratio_by_coverage.py | e061e0e37932afa9995c7b6c632fe02356623f34 | [] | no_license | myourshaw/pypeline | b523f47be3c1a89ca459b85ad6d2a75bf6a21b3a | 99234ca37ff706edfb14c56d5d3e2058928d7e51 | refs/heads/master | 2016-09-05T14:30:17.491788 | 2015-05-21T21:50:15 | 2015-05-21T21:50:15 | 32,175,948 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,331 | py | ref_alt_ratio_by_coverage.py | #!/usr/bin/env python
#!/usr/bin/env python
import sys
import os
import re
import traceback
from optparse import OptionParser, OptionGroup
import glob
import array
import numpy
usage = "usage: %prog [options] <list of pileup files in consensus format>"
parser = OptionParser(usage=usage)
parser.add_option("-o", "--ou... |
fa6221e8a6bff0630131afa88bbb5f18d4cc9334 | 9da53333d631f21cd3017a8314124eec219516aa | /create_mongo_db/schema_conversion/aoo.py | b253be28a46731a4e2f0fd1b5772cd5d5d05c416 | [] | no_license | chrisneal/charity-base-data | 51260a428d85b63fdbf716f7b3ce38aa557da0db | fd6ebbe00b9fe65114b55f582d492b1ccedd3246 | refs/heads/master | 2020-03-21T17:41:55.677324 | 2018-06-28T15:28:44 | 2018-06-28T15:28:44 | 138,847,665 | 0 | 0 | null | 2018-06-27T07:46:29 | 2018-06-27T07:46:29 | null | UTF-8 | Python | false | false | 2,591 | py | aoo.py | import logging
from sqlalchemy import and_, func, ARRAY
from pymongo import UpdateOne
from pymongo.errors import BulkWriteError
from helpers.format import stripped_or_none, boolean_on_value
from schema.models import ExtractMainCharity, ExtractCharityAoo, ExtractAooRef
def update_aoo(session, charity_collection, lower_... |
a52e2316b2b69ef87dd79eafcbadd90b07053b02 | 5f31338afc2bbb6e876b416ada5c5e3ec645a198 | /lectures/source/lecture_05/lecture_05_example_1.py | 5c6a45b46f88628956f68ab045458f3b6002cead | [
"MIT"
] | permissive | NikolaosPanagiotopoulos/PythonLab | ae3f857c55c86308ae9e703137228638c43351a8 | 23741034c15834da49f59a20db06ef2b58c1ccb8 | refs/heads/main | 2023-02-26T08:26:49.572747 | 2021-01-06T21:47:19 | 2021-01-06T21:47:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 144 | py | lecture_05_example_1.py | list = []
i = 0
while i < 5:
num = int(input("Δώσε στοιχείο για την θέση %d: " % i))
list.append(num)
i += 1
|
5b1dc54fd95a706bb9d5106153e212568bbd38c7 | 75858b0ce5ad1d8733b35263cab9d4e1aa1df495 | /Contents.py | 0a99ec2abe7a98c0c93c169fb947c85b9821a5ec | [] | no_license | coleslaugh/StPetersburgAI | da5d65a1badf5da023aa27a1ee46f7f5cd52363c | 177472dfdf5839dda204797472104bee5ff1ec76 | refs/heads/main | 2023-08-18T09:27:40.638138 | 2021-10-13T14:55:29 | 2021-10-13T14:55:29 | 398,843,604 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 37,424 | py | Contents.py | #----------------------------------------------------------------------------------------------------------------------------------------------------------
# St. Petersburg Machine Learning Simulation
# Contents - Contains Global Variables for all Classes
# Author: Mike Slaugh
#-----------------------------------------... |
4e192dc7c80781db08d8fbe5dec0b6049a875033 | e4fc5b6cc64ca7f00ebea87dde6eb206a0d99f82 | /y2020/d19/day19.py | fecac61abaea4c2e98d5e2776f2570ea6ad940c3 | [] | no_license | Zahariel/adventofcode | 2c077592c79b4048c1fc6e48e05845a02ff43150 | 57c84bab1a7f28183b151d3cdf1c2acbbcd0ec2f | refs/heads/master | 2023-04-13T16:11:59.059321 | 2023-04-09T06:57:01 | 2023-04-09T06:57:01 | 162,377,245 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,524 | py | day19.py | import re
class Rule:
def __init__(self, tokens):
self.possibilities = []
poss = []
for t in tokens:
if t == '|':
self.possibilities.append(poss)
poss = []
else:
poss.append(int(t))
self.possibilities.append(pos... |
17fd6907dbb72ef5499f06ec26add292af56e73b | b72ed932fa5848218d6794b25233c44fd8a86364 | /lib/python2.7/copy_reg.py | cdae01c2ca06995dd776a031f59debf7364264b2 | [] | no_license | ZHAO0189/FYP_v1.0 | 75d58913c9108ab843d3cb946f05904e8fa9cc3c | 64b60d07bfbeb662cf14fccf63cd63c8d66ff2db | refs/heads/master | 2021-01-23T02:15:27.949518 | 2017-04-02T06:48:43 | 2017-04-02T06:48:43 | 85,973,021 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 52 | py | copy_reg.py | /Users/zhaozinian/anaconda/lib/python2.7/copy_reg.py |
ba1628857e5ccc4851d1cd2fcfa774a755d9ef9c | dae0e42001c646c81385c9c4ae03da775544f6a4 | /convert/map-blocks-to-hoods.py | 480d3e81d67da1f822161c4740abc8499f97dcf3 | [
"MIT"
] | permissive | hackoregon/urbandev-etl | 0c71f80368a8ee56aebe8504b0f8c0df166dc5d5 | f3ef343737a6111849b340151dc3370b5287d911 | refs/heads/master | 2021-01-21T04:47:53.136178 | 2016-06-20T02:14:46 | 2016-06-20T02:14:46 | 54,170,508 | 7 | 9 | null | 2016-06-10T07:30:55 | 2016-03-18T03:20:06 | Python | UTF-8 | Python | false | false | 1,927 | py | map-blocks-to-hoods.py | #
# Match census blocks to their neighborhoods
#
# Output is CSV. To save output redirect to file. To sort by neighborhood-id,
# use: python map-blocks-to-hoods.py | sort -t, -k2 -n
#
# Import GIS libs
import fiona
from shapely import speedups
speedups.enable()
from shapely.geometry import shape
import rtree
def ... |
0c101a62a6446ebfe3e303bb9107e51b17bd5c8c | b9530376364f795d9926134fd4c0479c436bce6f | /pyweb/account/migrations/0005_assignment_location.py | addb5393d292e56f265e35bc135ae96fe56e1dd4 | [] | no_license | bomohit/web_grading | 397e56cef7c2085218e5f679c7a1b683b2cf20ee | 770abf85db825fad1d2e36304b1269189e2c1299 | refs/heads/main | 2023-05-24T14:41:34.767502 | 2021-06-17T13:38:14 | 2021-06-17T13:38:14 | 377,843,459 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 439 | py | 0005_assignment_location.py | # Generated by Django 2.2.24 on 2021-06-10 05:05
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('account', '0004_assignment'),
]
operations = [
migrations.AddField(
model_name='assignment',
name='location',
... |
e16e149e5116525e0c31d54ce2d93bfe8a7defa8 | 896a27b36f130909e2b80b8ab6c6159971e1c025 | /labs/week4/lab4.py | 6664d3b17ff2cfc54d595e9bd67da6ccee56bef2 | [] | no_license | viraj1327/Django | f4f671e712bda77a4bcf5f9ec1e11c872b405f3c | b70acf3582fa96626a5406925f156290e47c44b0 | refs/heads/master | 2021-04-30T00:55:38.753020 | 2018-03-06T22:04:20 | 2018-03-06T22:04:20 | 121,467,521 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,337 | py | lab4.py | """
Viraj
lab2.py
Feb 13, 2018
"""
def squared(num_list):
"""
square numbers is num_list
num_list:list of numbers squared
Returns: list of these numbers squared
>>> squared([1, 2, 3])
[1, 4, 9]
>>> squared([])
[]
>>> squared([-1, -2])
[1, 4]
"""
new_list=[]
... |
eb28eb8e552f545b85f20fb6933fbc47d6e551d9 | 07095cba7db2ede53214cc43c6c16ee6817c7da0 | /2-modulo-fundamentos-data-science/gráficos/desafios/2525/ancilliary_funcs.py | 3efaad1e397004d58dfec165f9f9edabb66ef6cb | [] | no_license | carlosjoset/data-science-desafio | 39a2b07be7eee1c64634870c41bee3a55ee9fdd9 | 69a4e93c56ab81183527a3c8b362267d2b2c2987 | refs/heads/master | 2022-04-10T17:57:02.962638 | 2020-03-06T22:28:05 | 2020-03-06T22:28:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,802 | py | ancilliary_funcs.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
File: ancilliary_funcs.py
Author: Luis Alfredo Porras Paez
Email: lporras16[at]gmail[dot]com
Github: https://github.com/lporras
Description:
"""
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import scipy.stats as ss
def desafio_2(data_frame):... |
97c00c6f4637037337604e92ebd23bb0066b3d20 | 9251a22c510cc8d179d7f40de9a0fb8ba5bf73d9 | /RelationRecognition/train.py | 7e270a25fadc1dbedfef5a77d72f6748d3b22765 | [] | no_license | nippleshot/CV_Relation_Recognition | af95b419bde960515ae0f521be2aab4e92977139 | d51f692904595ec5c973f74c7d8e1ad6391452ba | refs/heads/master | 2023-08-24T16:06:48.724599 | 2021-11-03T15:06:52 | 2021-11-03T15:06:52 | 273,929,586 | 0 | 0 | null | 2021-09-08T02:12:21 | 2020-06-21T15:16:41 | Python | UTF-8 | Python | false | false | 3,769 | py | train.py | import os
import yaml
import torch
from model import Classifier
from dataset import VRD
class Container:
def __init__(self, model, dataset, cfg):
self.model = model
self.dataset = dataset
# use gpu
self.device = 'cuda' if torch.cuda.is_available() else 'cpu'
# hyper-para... |
64d7416fb3d84b9b666b92819477e80661ec4206 | c54f5a7cf6de3ed02d2e02cf867470ea48bd9258 | /pyobjc/PyOpenGL-2.0.2.01/OpenGL/Demo/tom/conesave.py | d8afc9ad32c24fb9cc80cca7b0820c802f7ee125 | [] | no_license | orestis/pyobjc | 01ad0e731fbbe0413c2f5ac2f3e91016749146c6 | c30bf50ba29cb562d530e71a9d6c3d8ad75aa230 | refs/heads/master | 2021-01-22T06:54:35.401551 | 2009-09-01T09:24:47 | 2009-09-01T09:24:47 | 16,895 | 8 | 5 | null | null | null | null | UTF-8 | Python | false | false | 2,361 | py | conesave.py | #!
# This is statement is required by the build system to query build info
if __name__ == '__build__':
raise Exception
import string
__version__ = string.split('$Revision: 1.6 $')[1]
__date__ = string.join(string.split('$Date: 2003/02/15 02:11:32 $')[1:3], ' ')
__author__ = 'Tarn Weisner Burton <twburton@users.sou... |
2e33dba0816b0ec62a1d701c703a3b35d124cc16 | fbf82e9a3d6e7b4dbaa2771eed0d96efabc87b3b | /platform/imageAuth/imageAuth/db/image_repo_old.py | ce46370b7fd9b3c5f96f28d4410e537fb1d902f7 | [] | no_license | woshidashayuchi/boxlinker-all | 71603066fee41988108d8e6c803264bd5f1552bc | 318f85e6ff5542cd70b7a127c0b1d77a01fdf5e3 | refs/heads/master | 2021-05-09T03:29:30.652065 | 2018-01-28T09:17:18 | 2018-01-28T09:17:18 | 119,243,814 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 19,316 | py | image_repo_old.py | #!/usr/bin/env python
# encoding: utf-8
"""
@version: 0.1
@author: liuzhangpei
@contact: liuzhangpei@126.com
@site: http://www.livenowhy.com
@time: 17/2/13 18:54
"""
import time
import uuid
from sqlalchemy import or_, func, desc
from common.logs import logging as log
from imageAuth.db.db import ImageRepository, R... |
de2eb5513bd50211320e18ed7dac5597ba532232 | c2bb597e44e636d5336f68c353085e314f93b825 | /week6/1-Who-Follows-You-Back/client_settings.py | 183d4f046910a10b9ea65b5bd23c0e503379d107 | [] | no_license | mavridiSS/Programming101-3 | 80934d08a9d370416276e54c97261f45c35c4b4b | bc4843db7f0e21aa45d9e1aeeadcaf854d366d53 | refs/heads/master | 2022-07-22T06:58:23.078079 | 2015-06-13T14:24:53 | 2015-06-13T14:24:53 | 32,859,704 | 0 | 1 | null | 2022-07-06T19:59:50 | 2015-03-25T11:12:07 | Python | UTF-8 | Python | false | false | 94 | py | client_settings.py | CLIENT_ID = "dccff0533d607d6e324d"
CLIENT_SECRET = "25e001ef61924040d31a16dfcb8816e9a8a15570"
|
a52217f96f7df623fe52487cbe9a736670a654d5 | 43e3a3ab514a6065c65858ed3aa531fbec12dbd7 | /app/Data/migrations/versions/ceb74a11d5c4_create_customer_cars_table.py | 3b9c7c87cf4fd7d89a182218312d346f5f02bb7f | [] | no_license | OskarHal/Project_Relationship_Database | 6754fc2ec92dadc3bd71124ee50d32338388cfb9 | 80c3bbca2492851c7e247f676affb3545226df39 | refs/heads/master | 2023-01-31T16:46:13.727632 | 2020-12-11T14:57:05 | 2020-12-11T14:57:05 | 311,336,819 | 2 | 2 | null | 2020-12-11T14:57:06 | 2020-11-09T12:49:38 | Python | UTF-8 | Python | false | false | 939 | py | ceb74a11d5c4_create_customer_cars_table.py | """Create customer_cars table
Revision ID: ceb74a11d5c4
Revises: c48c0aebb460
Create Date: 2020-11-24 13:18:35.243361
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'ceb74a11d5c4'
down_revision = 'c48c0aebb460'
branch_labels = None
depends_on = None
def upgr... |
b1af8e86652c9fca3d97d8385eeaa6c30ee4cab8 | 02084c4ede470fef331531b23c68e1daabff9dc7 | /lab7_14.py | 84bfdabf17d8c62150d2edf9c06ffa6f0fadeb6a | [] | no_license | IvanDanyliv/python | 9180ed526f20652b14de6219d7f6fc6743cbe135 | 8da5a7dacbae1e1b1ff9bf9eab957b612c984848 | refs/heads/master | 2020-03-28T10:27:42.008086 | 2019-01-11T15:42:54 | 2019-01-11T15:42:54 | 148,111,342 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 239 | py | lab7_14.py | #!/usr/bin/env python3
def is_valid_email(email: str) -> bool:
splited = email.split('@')[1].split('.')
return len(splited[-1]) > 1 and email.count('@') < 2 and len(splited) > 1
print(is_valid_email(input("Input your email: ")))
|
6ee44ca30fa4c73375e9a064333f64723cb78ac0 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p03543/s062360184.py | b2cfc65030a8f7b5e7fb546b4aeb9c0063c49eed | [] | 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 | 93 | py | s062360184.py | n=input()
print('Yes' if n[0]==n[1] and n[1]==n[2] or n[1]==n[2] and n[2]==n[3] else 'No')
|
2da217ef34016d7441c17f84de80547a8ccd9212 | 6dbca1fe94ff2e56bf50b153eeff1274567c8976 | /pn2v/training.py | f2e251a324faf998a5ef4c787fbf8f41c0feba80 | [] | no_license | dogeplusplus/PPN2V | 92ce9c092794257c0de021b7c983f22c7d9c5399 | c7899572adaf37840936f3a1cc90f4be3e595062 | refs/heads/master | 2022-12-03T19:26:26.737452 | 2020-08-22T11:41:24 | 2020-08-22T11:41:24 | 265,483,055 | 0 | 0 | null | 2020-05-20T07:18:45 | 2020-05-20T07:18:44 | null | UTF-8 | Python | false | false | 16,144 | py | training.py | import torch.optim as optim
import os
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
from collections import OrderedDict
from torch.nn import init
import numpy as np
import matplotlib.pyplot as plt
import torchvision
from pn2v import utils
######... |
bd0e8430088b4803d151225953b05464e4c06d53 | f52e16451aa4aad4ce9c34bbd92458ee18ee0383 | /main.py | 8a2a5d2069d99614aa8652dbd0071204cb8e6c84 | [] | no_license | ArianaYahia/yahia_ariana_sound | 9deeaa16cfa66022754c73020ad98495c0cf81e8 | 39dd57fa66523d90ee377614f849e45f84832bec | refs/heads/master | 2023-02-22T19:12:01.114601 | 2021-01-19T16:26:47 | 2021-01-19T16:26:47 | 329,021,690 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 118 | py | main.py | music.play_melody("E Db B A Ab E F# E E E E E Db B A Ab E F# E E", 120) |
bcc6e0e0e95bf9e66127128b0514e7baca8fb27f | ee98026b0fb9cc018ea258ba3ff431bf0e325132 | /python/setup.py | 0f24a2225cfeeffbbb0bf1f6af653e0aa59ab3ae | [
"Apache-2.0"
] | permissive | joshlk/vtext | 0dcc45c3d4ccbe1a35d1e70f74b6663e9f0ac4cd | 908f9dd53b4c779b03e5b1081f77e101839bcba2 | refs/heads/master | 2022-11-22T13:51:14.176629 | 2020-06-18T21:00:31 | 2020-06-18T21:00:31 | 262,565,305 | 0 | 0 | Apache-2.0 | 2020-05-09T12:24:24 | 2020-05-09T12:24:23 | null | UTF-8 | Python | false | false | 831 | py | setup.py | # Copyright 2019 vtext developers
#
# Licensed under the Apache License, Version 2.0,
# <http://apache.org/licenses/LICENSE-2.0>. This file may not be copied,
# modified, or distributed except according to those terms.
from setuptools import find_packages, setup
from setuptools_rust import RustExtension
with open(".... |
f740bc3537edd0d6d822d076b860f842d677d901 | d25ffb1590069a7433dcba275d59cea759e0cb8d | /community/urls.py | 332778ebfb1da02d4887fe41a516892736f108df | [] | no_license | Code-Institute-Submissions/MSP4-CrossFitCommunityApp | 1717efe251d78a01b4df3c4d1b81b123db07394d | 830afb16e420a68463cffd5a77b189f890ab07b7 | refs/heads/master | 2023-03-04T02:55:53.773243 | 2021-02-16T21:38:45 | 2021-02-16T21:38:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 759 | py | urls.py | from django.contrib import admin
from django.urls import path
from . import views
urlpatterns = [
path('', views.community, name='community'),
path('setGroupSelect/', views.setGroupSelect, name='setGroupSelect'),
path('resetStats/', views.resetStats, name='resetStats'),
path('lazyLoadGroup/', views.laz... |
4ebd988c09f5cf282e9213fe9484dfd16e47c856 | 45c6de32b4ddc024588edf0ab99f28ca928e5862 | /Тест/6.py | 6b662a53680a303dfe670312defe6cbf4da71988 | [] | no_license | MusaevMalik/Note | 8b5a9af3dbe9114f676c9bc4756a553e8fbd06ef | ff713773b2a6ffb314c47630caa96d08ec24ac15 | refs/heads/main | 2023-04-12T15:31:09.483965 | 2021-05-09T17:41:19 | 2021-05-09T17:41:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,473 | py | 6.py | # Вопрос №6
# Под инкапсуляцией понимается сокрытие деталей реализации, данных и т.п. от внешней стороны.
# Например, можно определить класс “холодильник”, который будет содержать следующие данные:
# производитель, объем, количество камер хранения, потребляемая мощность и т.п., и методы:
# открыть/закрыть холодильник... |
85db6c8718dd9b6be7c18c804b60aeeb453c9877 | 3cab9a41f855e4b6a7a9ef8df047672df4339c4d | /content/Nenniltoz/Collection/migrations/0032_auto_20210419_2020.py | 30824b3cac4dafc155a17eaf7d19bec068272428 | [] | no_license | DustinWPernell/AppStateCapstone | 6f3509e9c9fe09f20c75aed6b7fca0fa10255a12 | 7c111ad800588cf200b9b6d8e5a815ebce4047b1 | refs/heads/master | 2023-04-29T13:20:16.434835 | 2021-05-03T01:17:12 | 2021-05-03T01:17:12 | 294,268,667 | 2 | 0 | null | 2021-03-31T19:31:11 | 2020-09-10T01:18:11 | Python | UTF-8 | Python | false | false | 668 | py | 0032_auto_20210419_2020.py | # Generated by Django 3.1.7 on 2021-04-20 00:20
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('Collection', '0031_auto_20210419_1717'),
]
operations = [
migrations.AlterField(
model_name='cardidlist',
... |
96e5180ca084956473c64b6caf27c3391bd3308d | ea95e88f0dfcd5a21f875b2c453d9e5ee095f16f | /day5/part1.py | 7e7d3cd791c0d0624c0dc126538ece6559dc288d | [] | no_license | jadeen/advanceofcode-2k20 | 40a54db6daf846c8a6b3cfd55147810fc66d05cc | 50f94372ce724ef99149a4683202a1d46085844e | refs/heads/main | 2023-01-22T15:41:33.646962 | 2020-12-10T13:11:17 | 2020-12-10T13:11:17 | 320,275,975 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 658 | py | part1.py | f = open("input.txt")
input = f.read()
raws = input.split('\n')
def get_id(raw):
line = raw[:-3]
line_bin = ''
seat = raw.replace(line, '')
seat_bin = ''
for index, value in enumerate(line):
if line[index] == 'F':
line_bin += '0'
else:
line_bin += '1'
... |
55cfe4ea8ccd276a4b47804c6850a4464d11891c | 0b32b2dbccd6c30baeafb266b53240f390cfa999 | /box.py | cfdf0865520966ce767ce1ee8867df947c5da571 | [] | no_license | ALEXJAZZ008008/physics_simulation | 95207b078a9a3b46fb6cd206c517ffaac3853ed4 | 265fbcf963b60096652e240e01a76292602dcc20 | refs/heads/master | 2020-04-04T20:34:00.199399 | 2018-12-11T14:20:57 | 2018-12-11T14:20:57 | 156,250,152 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 207 | py | box.py | class Box(object):
def __init__(self, origin, limit, elasticity, friction):
self.origin = origin
self.limit = limit
self.elasticity = elasticity
self.friction = friction
|
48488825b22f27c087cd120c1e0ee7a793205966 | 40e1d599e9847718e1facfa5ccda67d9c31ff6f3 | /Productos/models.py | ed1bdf56c9bcdba616e79d7fb87b9440184baf7f | [] | no_license | Abner-22/BISystem | 90483da760c8797c2b126bdb8430ba1d4651e578 | 62ec112df655b9e7a0c31a319b305cec63188322 | refs/heads/master | 2023-01-04T04:08:50.645430 | 2020-10-31T06:45:19 | 2020-10-31T06:45:19 | 308,821,279 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,913 | py | models.py | from django.db import models
from django.utils.safestring import mark_safe
# Create your models here.
class Producto (models.Model):
opciones_tipo = (('A', 'Amueblado'), ('M', 'Mueble'), ('S', 'Silla'), )
tipo = models.CharField('Tipo de producto', max_length = 1, choices = opciones_tipo,
... |
78d907b21b4c1c667cd4899a8be4dfe84c99b1ec | 50df55fcf81726ac3b7f19ddad0cfcf6c017d817 | /multiply_ui/ui/__init__.py | 01ade9e4e010846c087c64ffd030acb00582555e | [
"MIT"
] | permissive | multiply-org/multiply-ui | 19ab38940ad025f8837812e58eadcacb85cb48b0 | 0d854cb40a2df040f12838f431adf0eda5b5d77a | refs/heads/master | 2021-06-19T01:37:46.255910 | 2021-03-08T14:26:07 | 2021-03-08T14:26:07 | 187,641,281 | 0 | 1 | MIT | 2019-12-20T18:52:39 | 2019-05-20T13:00:46 | Python | UTF-8 | Python | false | false | 69 | py | __init__.py | from .jswidgets import LabeledCheckbox, Spinner
from .mui import mui
|
b09fbade4602e6dfecd7a8ae28dc2d83fae58d8b | 184f124268f5529824df591c3d731049b0fc0a79 | /testsuites/listener/shared/client_sg/test_changes.py | e4db2c4eea3467f123594c599ffd5fa66d1b455a | [] | no_license | couchbaselabs/mobile-testkit | a1d154de28a88cee94036e5975a86f84dc37a0b4 | 9d78bd43665de2a0099d3e2ecf94495f3379f8fa | refs/heads/master | 2023-08-27T00:51:59.482087 | 2023-07-31T14:41:18 | 2023-07-31T14:41:18 | 45,864,773 | 15 | 15 | null | 2023-07-31T14:41:20 | 2015-11-09T20:28:01 | Python | UTF-8 | Python | false | false | 2,919 | py | test_changes.py | import pytest
from concurrent.futures import as_completed
from concurrent.futures import ThreadPoolExecutor
from keywords.utils import log_info
from keywords.MobileRestClient import MobileRestClient
from keywords.ChangesTracker import ChangesTracker
@pytest.mark.sanity
@pytest.mark.listener
@pytest.mark.syncgateway... |
081821adb27005c5d81905f79427d8472e6df744 | 4ecf0f51ec5390524d1ef381f73dce705b037db2 | /ctc/ch02-linked-lists/5-sum-digits.py | 4ac8c4d12d656abd6d264e09ade800f1224a8648 | [] | no_license | skailasa/practice | 6f055a74f08230c450df6d04071134de42bfa2be | 09d75e3ec63308d3b8be0b07748043cde79a62a1 | refs/heads/master | 2021-06-16T07:00:54.752038 | 2020-09-30T14:22:49 | 2020-09-30T14:22:49 | 153,641,729 | 5 | 0 | null | 2021-03-25T22:24:40 | 2018-10-18T14:54:20 | Python | UTF-8 | Python | false | false | 1,826 | py | 5-sum-digits.py | """
You have two numbers represented by a linked list where each node
contains a single digit. Digits stored in reverse order, so ones are stored
in first index/head of list.
Write a function that dds two numbers and returns the sum as a linked
list
"""
class Node:
"""
Node to store data, and pointer to next... |
3e8ee77430a1cee718f38a583c9bb9d6a454d7fa | 33a3db0fb1c20015ac7b7946bdb5bdf44da7d883 | /00_reference_code/04_AlexeyNoskov_02th_code/util/data.py | ce58f281663bc370dd3d6e40a0e7be57c3125a2d | [] | no_license | apmfifty/outbrain-click-prediction | 14ce768e95453154a2087c9f23c4f8ef3de208bd | 4bec3a1abe548513026dad3dc54d9cce7093d7cf | refs/heads/master | 2020-03-19T04:01:53.038161 | 2018-06-04T11:49:56 | 2018-06-04T11:49:56 | 135,788,628 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 812 | py | data.py | import pandas as pd
import numpy as np
import os
from .meta import input_dir, cache_dir
def read_events():
return pd.read_csv(os.path.join(cache_dir, 'events.csv.gz'), index_col='display_id', dtype={'document_id': np.uint32, 'platform': np.uint8, 'region': np.uint32})
def read_documents():
return pd.read... |
beebb58d891a42b625f1543ba94aef302f1783f3 | aeb15668c4882fbf37b8d879f9588e6c54ef1833 | /ptero_petri/implementation/petri/actions/expire.py | d231bd196154942aa046f54f5a72c1c80661613c | [] | no_license | genome/ptero-petri | 852727b993370b40cfb5f6dd84e40c1b4e59fc68 | 775604fef313614eb8cb343e87c9dc5312aa0259 | refs/heads/master | 2021-01-18T21:08:54.244773 | 2016-03-23T17:44:07 | 2016-03-23T17:44:07 | 17,668,033 | 1 | 4 | null | 2016-03-23T17:44:07 | 2014-03-12T13:34:54 | Python | UTF-8 | Python | false | false | 609 | py | expire.py | from .base import BasicActionBase
from ptero_common import nicer_logging
LOG = nicer_logging.getLogger(__name__)
class ExpireAction(BasicActionBase):
def execute(self, net, color_descriptor, active_tokens):
LOG.info("Expiring net <%s> in %s seconds",
net.key, self.ttl_seconds, extra={'ne... |
c2fd363177e56bbe0be66639d44250a5eac5fd23 | 29551192e66f330648fd6562f3be89e9ffc19544 | /ex3.py | 999b78b619f8865e66cc05bd6d1e8aec1d44664a | [] | no_license | Knowlifyer/Python | 6d31781fd979c8abb327c5abd1e71be9691a6ed1 | 98bc4f0905b76d435379f8587d4c9c0f58d2c9d6 | refs/heads/master | 2020-04-08T03:26:42.994959 | 2018-11-24T22:04:13 | 2018-11-24T22:04:13 | 158,975,993 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 530 | py | ex3.py | print " I will now count my chickens:" #Prints out the text
print "Hens", 25 + 30 / 6 # Prints the word in "" and shows immidete result# Text with result
print "Roosters", 100 - 25 * 3 % 4 #Prints out The word Rooester aand shows the result #Text with result
print "Now I will count the eggs:" #Prints the text in... |
015fce9d535452ba8b66e2bb85764604d9ec0585 | bf241575696d5288917ab849c5219ba7daaaf448 | /source/python_packages/staging_file_builder/__init__.py | 571349f4b18e7946b1f0865da5c915bdd220d1f1 | [] | no_license | nilanbais/automatisering_storingsanalyse | 2637486b3489314255b3bbf73c1d0f00ad4414cb | a60d9316a2112dd9192379fceeeb0afed837c5da | refs/heads/main | 2023-08-30T18:54:40.169328 | 2021-11-08T09:25:07 | 2021-11-08T09:25:07 | 421,374,469 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 22,439 | py | __init__.py | """
Class for building the staging file.
Because the use of a staging file is a temporary solution, we build the Staging File Builder with a robust
architecture. It's gonna be deleted in a future update.
This script is used to generate a staging_file in which the maintenance engineers have to set a value manually.
A ... |
28331e14a1e5ea5ea77089f3441fe86277febe2a | 77c45a7bc6d3aa3b8d700cd845f30af7a3df48ba | /codecheff/june18/shkstrafter.py | 461c6afe0ff0acb347a66dbf4fcb29b689e12e1f | [] | no_license | sudarshan-baliga/competitive-programming | bf9de8bdbe0bc88aba8793511c3d383e9441e53b | 886215940821070f49d8a52df05e03fdefbbca0e | refs/heads/master | 2023-05-28T03:14:18.040459 | 2019-11-13T12:25:23 | 2019-11-13T12:25:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,864 | py | shkstrafter.py | # https://www.codechef.com/JUNE18B/problems/SHKSTR
class TrieNode:
def __init__(self):
self.children = [None] * 26
self.isEndOfWord = False
class Trie:
def __init__(self):
self.root = TrieNode()
def _getIndex(self,ch):
return ord(ch) - ord('a')
def insert(self, key):
... |
13e2cc1d74234bb91e80b70221117fe2e25cca93 | f3742db13a2110c9cb141c65a78a8da3b381fd3c | /competitions/migrations/0004_individualevent_team_id.py | d8299a7c1a3000cdc5d7c103c4d9267b8413749c | [] | no_license | sahil00199/MI-Competitions-Backend | 385e41684ce9d7ca18dd4570e0964afc9a207b2a | 20df596c005c01a73fc720e737babf44fdb75391 | refs/heads/master | 2021-04-12T12:04:13.033775 | 2017-08-01T21:58:21 | 2017-08-01T21:58:21 | 94,548,434 | 0 | 1 | null | 2017-09-17T10:46:16 | 2017-06-16T13:50:57 | Python | UTF-8 | Python | false | false | 461 | py | 0004_individualevent_team_id.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-07-22 10:12
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('competitions', '0003_auto_20170627_1741'),
]
operations = [
migrations.AddFie... |
982f1b6260b6ff65fd73570ef1cc9d2dfdac4050 | 9745e5d8acae70bcdd7011cc1f81c65d3f5eed22 | /problem-solving/Strings/Pangrams/solutions.py | 30026fbe0863198adacb4515b6ed832c3a0daf65 | [] | no_license | rinleit/hackerrank-solutions | 82d71b562d276ec846ab9a26b3e996c80172f51e | 519a714c5316892dce6bd056b14df5e222078109 | refs/heads/master | 2022-11-10T05:08:11.185284 | 2020-07-02T01:34:35 | 2020-07-02T01:34:35 | 254,403,657 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 492 | py | solutions.py | #!/bin/python3
import math
import os
import random
import re
import sys
# Complete the pangrams function below.
alphabets = 'abcdefghijklmnopqrstuvwxyz'
def pangrams(s):
s = filter(lambda c: c != ' ', map(lambda c: str(c).lower(), s))
if set(s) == set(alphabets):
return 'pangram'
return 'not pangr... |
85c93c6eb14fdc95ef2f277bd4dc742c18a9ca03 | 0ee8d583360eec55ba1819a919aa874bf11495fa | /lesson_2/lesson2.2_step3.py | 1a690f27cd1b6d56d6d7d06269a70ef09f4dd02c | [] | no_license | JeanPonomarev/StepikCourseAutomatization | 81d4ed355e3330f19093b6cefe792262e3ba1d23 | f39c02ea4f133eaf917dba6d0fb28dfa908d2492 | refs/heads/master | 2021-07-17T16:47:11.319053 | 2020-04-11T14:03:58 | 2020-04-11T14:03:58 | 249,610,030 | 0 | 0 | null | 2021-06-02T01:26:34 | 2020-03-24T04:09:21 | Python | UTF-8 | Python | false | false | 608 | py | lesson2.2_step3.py | from selenium import webdriver
from selenium.webdriver.support.ui import Select
import time
link = "http://suninjuly.github.io/selects1.html"
try:
browser = webdriver.Chrome()
browser.get(link)
x_element = browser.find_element_by_id("num1")
x = int(x_element.text)
y_element = browser.find_elemen... |
a4d10e528ecb0f49983c4aa51e8f0fd149ccc0e0 | 84a7b0c4291e2b4147c43f6b859321e66918bb99 | /nlputils/DatasetTools.py | 511ddb7c4f3192267923907cc899e8bcb9eba752 | [] | no_license | sjebbara/NLPUtils | 2669a3d137d4f517768f5cbe6a575ee0f46687f9 | 9748280b788a6c455ad2cadf8bdd389417920ce1 | refs/heads/master | 2020-12-24T20:10:31.096092 | 2018-07-10T08:37:43 | 2018-07-10T08:37:43 | 86,241,565 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 23,850 | py | DatasetTools.py | import numpy
from nlputils import LearningTools
def train(model, instances, vectorizer, batch_size, n_instances, raw_data_name=None, verbose=1, prefix=None,
sample_weight_fn=None):
train_log = LearningTools.TrainingTimer()
train_log.init(1, n_instances)
batch_generator = BatchGenerator(instanc... |
93f6a213b2167a08cf69c22d845722372e6f0e42 | 9260ff19a9a59dddc9d2d2f0a9a326f5b6c1b279 | /spark/Python/seitzjon/sqltojson.py | e4b22b76e0a18e5ef813f607c780edbd47d7ee99 | [] | no_license | j0nnyyy/BA_Project | a86b8eeb7f53266fb94f35db44f310ada968eaeb | afbd723a236003cd0b08055a876bee811f28c908 | refs/heads/master | 2020-04-24T09:52:46.923517 | 2019-07-10T09:21:42 | 2019-07-10T12:47:03 | 171,875,862 | 0 | 0 | null | 2019-02-21T13:22:37 | 2019-02-21T13:22:36 | null | UTF-8 | Python | false | false | 1,645 | py | sqltojson.py | inpath = "/scratch/wikipedia-dump/categorylinks.sql"
outpath = "/scratch/wikipedia-dump/categorylinks.json"
#test data
#inpath = "/home/ubuntu/BA_Project/spark/Python/seitzjon/test_data.sql"
#outpath = "/home/ubuntu/BA_Project/spark/Python/seitzjon/test_json.json"
class Entry:
def __init__(self, id):
sel... |
5f0211f67e98a054e802e681e28f491e7f8e4002 | 3716aa6720239f203677d83e8ddd0ba39871b7b3 | /utils.py | a321cbb2c563593886d64394b310fa627ab81b93 | [] | no_license | TarzanZhao/stucture | 97aa122fe24bacd42513ba053e72eb9632f74a58 | ebcba436fc185cb5b56f48b5411766a6e141ba8f | refs/heads/main | 2023-09-03T19:10:44.006519 | 2021-10-27T12:53:09 | 2021-10-27T12:53:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,231 | py | utils.py | import os
import logging
import numpy as np
import matplotlib.pyplot as plt
import os
import logging
import numpy as np
import matplotlib.pyplot as plt
def create_logger(save_path='', file_type='', level='debug', console=True):
if level == 'debug':
_level = logging.DEBUG
elif level == 'info':
... |
f173189ff1627ec45a50405a9ac9162dc9610415 | dfc3d9c13ce850dacd7b82c2a98d9893570c5fb9 | /feed/feed.home.apcups.py | 88b3dd3f8ef10a2a54fd7c2b7877771ec50f1b11 | [
"Apache-2.0"
] | permissive | SentientHome/SentientHome | 25f9631ecd4fe3c7bb1aa61c25ea33cf6450a6e5 | 6800c5919bfea726abb2080fd909b27e9ed8b6ee | refs/heads/develop | 2022-01-24T07:00:29.425375 | 2022-01-11T23:05:44 | 2022-01-11T23:05:44 | 24,443,985 | 34 | 6 | Apache-2.0 | 2022-01-11T23:05:45 | 2014-09-25T04:43:05 | Python | UTF-8 | Python | false | false | 5,347 | py | feed.home.apcups.py | #!/usr/local/bin/python3 -u
"""
Author: Oliver Ratzesberger <https://github.com/fxstein>
Copyright: Copyright (C) 2016 Oliver Ratzesberger
License: Apache License, Version 2.0
"""
# Make sure we have access to SentientHome commons
import os
import sys
try:
sys.path.append(os.path.dirname(os.pat... |
ebe08675ccd44b34b1d3b2ea4e63ddf064145543 | 7830616a783d35ce27ea9515e0dfbcfb54c855ad | /Exercicios_resolvidos/21. Funções (parte 2) - ex103 - Ficha do jogador.py | 890b0b1d897e1611edf163be29f56943402bd8da | [
"MIT"
] | permissive | hitalojta/Exercicios_Python_CeV | 638fe88d5a29dd0f528cffe72bce3953a5297aba | 00d2d9a58737760d017c05c9a46ff20cb25547fb | refs/heads/master | 2023-07-26T08:33:22.673318 | 2021-09-05T00:50:43 | 2021-09-05T00:50:43 | 402,876,038 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 577 | py | 21. Funções (parte 2) - ex103 - Ficha do jogador.py | """
Faça um programa que tenha uma função chamada ficha(), que
receba dois parametros opcionais: o nome de um jogador e
quantos gols ele marcou. O programa deverá ser capaz de mostrar
a ficha do jogador, mesmo que algum dado não tenha sido
informado corretamente.
"""
def ficha(nome="<desconhecido>", gols=0):
prin... |
b0999d1c47dac39a51096d26f555f7cfaa964793 | 43f6736ebc78b34e2440067d8b3f48bfd3c9dbd1 | /src/VanillaGAN.py | 14e87661d0a02283a5e0f93b787fdefb8ea7aa11 | [] | no_license | CharlotteMagister/GenerativeImageInpainting | 40ea21fe30be49a80f61ebf7347a6a94e5ab3585 | c7a9138342dc6eb6b7dc73ec121fe7b9ad4a5168 | refs/heads/main | 2023-03-08T14:14:33.701146 | 2021-02-20T10:16:02 | 2021-02-20T10:16:02 | 340,622,904 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,683 | py | VanillaGAN.py | #
# Vanilla GAN based on the original paper: Generative Adversarial Networks by Ian Goodfellow et al.
# Python functionality learned from: https://medium.com/ai-society/gans-from-scratch-1-a-deep-introduction-with-code-in-pytorch-and-tensorflow-cb03cdcdba0f
#
# pytorch modules required
import torch
from torch import n... |
c428fd00100275798fde85d3a217ac952e4e9ffa | 9ba173666b43279c8326276fb4039fa7fc233129 | /ch05/dht/DHT11.py | 96529ff7681f5312092b288a14d2d5a4495d3d93 | [] | no_license | YuLim2/Raspberry-Pi | 350548e36df6df060e2040cef5ef86ea30d3edf4 | 9b18014985a2bc3bad5665937581538473a3fad7 | refs/heads/main | 2023-08-28T15:38:00.271836 | 2021-11-09T07:09:37 | 2021-11-09T07:09:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 274 | py | DHT11.py | import Adafruit_DHT
class DHT11:
def __init__(self):
self.sensor = Adafruit_DHT.DHT11
self.pin = 18
def getdht(self):
hum, temp = Adafruit_DHT.read_retry(self.sensor, self.pin)
print(hum, temp)
return [temp, hum] |
883cb6adccb63b4a5fcd78f13bb9b1fc41ce6204 | 560590cd6394c4d5880833789ee3fc1c0aca499d | /checkout/migrations/0009_auto_20210912_0144.py | bf83a526acbe1db023a5e9ace329e0172a0d3443 | [] | no_license | Code-Institute-Submissions/fixit_v1 | 4671d3764611a5de8413ae2cfe8618417f3f9a04 | d864591bdbfc6bb0b45497d6ada41267038644ee | refs/heads/master | 2023-08-01T01:38:22.140949 | 2021-09-12T19:54:35 | 2021-09-12T19:54:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,344 | py | 0009_auto_20210912_0144.py | # Generated by Django 3.2.6 on 2021-09-12 00:44
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('checkout', '0008_auto_20210912_0135'),
]
operations = [
migrations.AlterField(
model_name='order',
name='address',
... |
a0cc1df0c1d8184bb47d6fe2d760c9e63f918d60 | e010d6addba40cd7830142761b9237bdf5f2b62e | /db/mysql/HotRegionHisStatisDataHandler.py | ffd5f23ee9f850c243f0e642e798425e941be245 | [] | no_license | WIndyGirl/WebCrawler | c7b6ece4a2db728973a82255f058215dfbfda4b7 | fa7025c1a8b5dd1914c145acfed8411d601be962 | refs/heads/master | 2021-01-21T04:26:41.711904 | 2016-07-21T15:47:22 | 2016-07-21T15:47:22 | 42,043,835 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 444 | py | HotRegionHisStatisDataHandler.py | from DBHandler import DBHandler
def insert_hot_region_his_statistics_data(conn, values):
sql = 'insert into hot_region_his_statistics_data(insert_date, region_name, region_avarage_price, on_sale, deal_in_90_days, added_in_7_days, daikan_in_7_days, deal_in_last_month, deal_compare_last_month, deal_compare_last_year) v... |
0a03e2f406dbf9f77e201fe69a79b87e4a76171d | 1ef1c392fb5212589147f910cde24e9ec597d214 | /instagram/part 2/extraction.py | 3914408f1b5e18b709cc7bcebc9df362b910006e | [] | no_license | skillypy/ig_scrape | 3bf71c82802d960cb7884e332526fb4ffbad8f3e | dff261e98fbe4006c69f709caf962b9c6fcd8e30 | refs/heads/main | 2023-02-21T23:02:38.142184 | 2021-01-29T06:02:48 | 2021-01-29T06:02:48 | 326,313,059 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,934 | py | extraction.py | import requests
import json
import time
import csv
url = 'https://www.instagram.com/graphql/query'
short_code = input('Please enter the shot code: ')
endcursor = ''
count = 0
counter_file = 1
jml_per_file = 1000
writer = csv.writer(open('hasil_csv/{} {}.csv'.format(short_code, counter_file), 'w', newline=''))
heade... |
49daed39123e84d68c9baa37e48845c83792009e | b456842b4292c9a9535d209e36585635d8df9a91 | /mystuff/ex33.py | d1a891ed97c21336733d50b4edd69ece197f3fd6 | [] | no_license | vandann/lpthw | 98338f392fa2e4a79c0d9c323167cc8e77c1b51a | 88a21b0fb8498e8599ecbac741aa5aab84cdb4a2 | refs/heads/master | 2021-05-23T15:03:21.798945 | 2020-04-27T16:14:02 | 2020-04-27T16:14:02 | 253,351,451 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,530 | py | ex33.py | # var set to zero
i = 0
# variable set to empty list
numbers = []
# while loop that runs as long as i is less than 6
while i < 6:
# outputs f-string with the current i variable value
print(f"At the top i is {i}")
# adds a single argument 'i' to the end of the numbers list
numbers.append(i)
# also known as i +... |
b456f701d765ae7bd589b0b95cff2f88c9cc3c40 | 939ea5f94a77d66e0d06d0812a6712ae7586fa02 | /3_Conditionals_Fun_Modules/Functions/Return_Contribution.py | c6b6b1da939f4613224de499c198a4782c3eb8c5 | [] | no_license | JaydevVadachhak/Python-Basics | 68f96838e0add07f693a533f02a7f67af33bc336 | d6f5ac6292a5e3907db6faf58389c10759603639 | refs/heads/master | 2023-04-17T05:47:11.222476 | 2021-05-01T04:38:24 | 2021-05-01T04:38:24 | 363,319,052 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 297 | py | Return_Contribution.py | def food(f):
tip = 0.1*f
f=f+tip
fperson = f/num
return fperson
def movie(m):
return m/num
num = int(input("no of friends:"))
ftotal=float(input("food bill total:"))
mtotal=float(input("movie bill total:"))
x=food(ftotal)
y=movie(mtotal)
print("per person total is:",x+y)
|