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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
01510d001ff4e1730138baad478fb586615abcd1 | 2bda7591991e5be48f36fb22d562cc843d03ba73 | /src/rewrite_data.py | b89e115bd446cc531bc20c9a866c5c6b5ce964cd | [] | no_license | julflore000/Thermo-Final-Project | b95857a1d35480f934fb5747d7fa8fe4f57eb852 | 8930a4126e6cc7e9348a55af8bba3904116eae23 | refs/heads/main | 2023-02-02T19:05:58.586166 | 2020-12-12T00:47:25 | 2020-12-12T00:47:25 | 316,055,706 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,213 | py | rewrite_data.py | import pandas as pd
from netCDF4 import Dataset
import numpy as np
import csv
import time
import time as stopWatch
import matplotlib.pyplot as plt
import matplotlib.backends.backend_pdf
import math
import datetime
massRate = .15
massFlowData = list()
length = 150 #feet
depth = 18 #feet
area = math.pi *length * depth / ... |
c58a986372757d628c708a9b78fd2c8af794fbd1 | 7e05f1c22453521438029cb1051c1890dc8c3b94 | /Exercise/Commodity-information/answer.py | e81c6d9bfa1006bdd4ec1a079ab95e528ef2014a | [] | no_license | longcd/Crawler | 6c827784352bc3a6b46c11daa1b70d00573a11db | b79ba15a322fd3cf4973525743d46b3a8e52cddb | refs/heads/master | 2021-05-16T03:33:18.782471 | 2017-11-29T14:27:46 | 2017-11-29T14:27:46 | 105,516,136 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,485 | py | answer.py | from bs4 import BeautifulSoup
path = './homework-required/index.html'
with open(path, 'r') as wb_data: # 使用open函数打开本地文件
soup = BeautifulSoup(wb_data, 'lxml') # 解析网页内容
# print(soup)
images = soup.select('div.col-sm-4 > div.thumbnail > img')
titles = soup.select('div.col-sm-4 > div.thumbnail > div.capti... |
e8a59cbf08eb307af6552ba42927a610dc67d37d | e02ee1f6217e4dc8b2f8c2bbf2a536fd89b88729 | /Card.py | 8d462605f2cbbb63d749b5c70b9bb5dbe136e64d | [] | no_license | cameronk/uno.py | 344573a61731a7568eedf259bd1830b108f6b1dd | a046694556d141adfe467af10dca2a2f8475304d | refs/heads/master | 2020-03-30T08:13:16.718640 | 2018-10-03T22:35:45 | 2018-10-03T22:35:45 | 150,998,653 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 347 | py | Card.py | class Card:
def __init__(self, number, color, id):
self._number = number
self._color = color
self._id = id
def __repr__(self):
return "|{} {}|".format(self._color, self._number)
@property
def color(self):
return self._color
@property
def number(self):
... |
baf794b7ba35912db6f9a902f5ae8fabd9620725 | 69c451c702fb7d476de80a7255bc1101107b8459 | /csv_parser.py | 4cf6a55cf1a94d4ab3f109edd9100efe64b35558 | [] | no_license | afituri/svg | 8dca9adf0f4c6e9d61ca1f9a8f93cdb608c6e125 | c836652644218568c337508cc217589003c6a479 | refs/heads/master | 2021-01-17T05:46:38.293126 | 2015-03-03T08:39:25 | 2015-03-03T08:39:25 | 31,587,849 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,192 | py | csv_parser.py | # -*- coding: utf-8 -*-
import csv, codecs
class Candidates(object):
w={}
reader = codecs.open("candidates.csv", 'r', encoding='utf-8')
i=0
for line in reader:
line=line.split(',')
Full_Name = line[14]
Race = line[39]
Constituency = line[6]
Sub_District = line[4... |
953954cfd1af04f49fd0845fb5b4d744386aa74b | 91a9aa4bce51933882e970cb74347f92bdf22d9e | /2016_double_bh/scripts/plot_summary.py | 01fb68599468668e253787d9a183443bef31654c | [] | no_license | orlox/mesa_input_data | 1d4a312e4cb63d618a4ed6b58dc24197fc8217da | c346846d26292b87756081b8d132a4612ba49fca | refs/heads/master | 2023-03-07T00:44:05.543952 | 2023-03-01T11:24:39 | 2023-03-01T11:24:39 | 46,872,703 | 4 | 3 | null | null | null | null | UTF-8 | Python | false | false | 49,472 | py | plot_summary.py | #!/usr/bin/env python
import numpy as np
from pylab import *
import matplotlib.pyplot as plt
from matplotlib import rc
rc('text', usetex=True)
import matplotlib.patches as patches
from scipy.interpolate import griddata
import math
import scipy
from matplotlib import ticker
import sys
import os
from mesa import *
import... |
88f94e7eb7e1d515464af51a58f68c30a9df50cc | 3fb042540a62670300a668ab79381e7cc7739a5e | /src/Aula11.py | 25b981fcda80f7e31e22bd2fc482bfa8ccec5900 | [
"MIT"
] | permissive | maberf/python | 830a18986a86cb6da05a991c4886dbc9685ce60a | 8c72074e4c6bd631c524d79b443428b20460b8d8 | refs/heads/master | 2023-04-18T20:40:55.664409 | 2023-04-01T23:48:34 | 2023-04-01T23:48:34 | 295,516,393 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 541 | py | Aula11.py | #print('\033[0;33;44mOlá Dummie!\033[m')
#print('\033[7;33;44mHello Dummie!\033[m') #inverte
#print('\033[1;30mOlá Kid!\033[m')
#print('\033[7;30mHello Kid!\033[m') #inverte
#
#nome = 'Creusa'
#print('Olá, {}{}{}!'.format('\033[1;31;43m', nome, '\033[m'))
#
nome = 'Creusa'
cor = {'limpa':'\033[m',
'vermelha':'\... |
1339f4bb605fb4547c59b089f31d00be8fd9b2e0 | fcacc25298912b626f49f104c069511d339f9779 | /HTML semi-completo/studants/migrations/0009_auto_20200826_1307.py | 4bfd346191406222e8e07002b57cab0340485e4d | [] | no_license | daniel-root/CRUD-Estudantes | 72f23f0e6334cf2e5da97e603a85f51bd3eaa789 | 690e661588a87e155431886e2f40436109c4aa8b | refs/heads/master | 2022-12-15T18:18:05.580695 | 2020-09-10T01:33:12 | 2020-09-10T01:33:12 | 290,911,961 | 7 | 2 | null | null | null | null | UTF-8 | Python | false | false | 433 | py | 0009_auto_20200826_1307.py | # Generated by Django 3.0.7 on 2020-08-26 16:07
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('studants', '0008_auto_20200826_1307'),
]
operations = [
migrations.AlterField(
model_name='studant',
... |
b62523f06ae3e4981b306b09f4d8f48b5be1b049 | 43b7066d2cf5b438a4c9f5401c7d4857a0ae2472 | /src/models/sg_sem_cont/evaluate/fetch_results_sr.py | e1cf7f2f5d7d5ff3427a035446f9fd884fcb95c7 | [] | no_license | lavoiems/Cats-UDT | 3823e4aa9badfe0e097ecc0f6dc4e30c1ca1c225 | f5d718a0d993e60057b045a1a27166befe16781a | refs/heads/master | 2022-12-24T01:45:18.224966 | 2020-10-02T20:21:13 | 2020-10-02T20:21:13 | 300,720,296 | 6 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,684 | py | fetch_results_sr.py | import torch
from ..model import Generator, MappingNetwork, semantics
import torchvision.utils as vutils
from common.loaders.images import dataset_single
from common.util import get_args
def save_image(x, ncol, filename):
x = (x + 1) / 2
x.clamp_(0, 1)
vutils.save_image(x.cpu(), filename, nrow=ncol, paddi... |
f1e0cb537cd3f4c9aae28c0864d29e54a8f6e7f0 | a59ec95fddc064ea9a554ad41e4ac8e82376701a | /xadmin/demo_app/picture/migrations/0001_initial.py | fcba92d0f4284d6b4177b3074d6de4a176d14f06 | [
"BSD-3-Clause"
] | permissive | Nicholas86/PythonDemos | 449c08713c7c03633719a4ae7287b127783d7574 | 4f06639cc65a5e10cc993335d3d34e2d60aac983 | refs/heads/master | 2021-01-22T21:07:11.457179 | 2017-08-18T06:40:44 | 2017-08-18T06:40:44 | 100,681,216 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,649 | py | 0001_initial.py | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2017-07-17 06:58
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import picture.fields
class Migration(migrations.Migration):
initial = True
dependencies = [
('shop', '0016_goodsat... |
30e9d9520e492ecf469a29e0bf220e5bf0db1ff6 | 12ffb0cf2c4dd95b05bd5cea48a3f83d5cfd02d6 | /Hackerrank/Algorithms/serviceLane.py | 4d479fee725a7086699c534fe94477873b1b7807 | [] | no_license | Prashant-mahajan/Python-Codes | a5631aeba3f71a32d7517c4ce84fe539b1c97d86 | 479aa2a47adc9246d0bd65c07c108d9076e142ed | refs/heads/master | 2021-01-11T12:18:25.515450 | 2019-01-21T03:14:43 | 2019-01-21T03:14:43 | 76,477,397 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 455 | py | serviceLane.py | # Problem: https://www.hackerrank.com/challenges/service-lane/problem
#!/bin/python3
def serviceLane(cases, width):
for i in range(len(cases)):
a, b = cases[i][0], cases[i][1]
select = width[a:b+1]
print(min(select))
n, t = map(int, input().split())
width = list(map(int, input().rstrip().... |
425c89d7181a5a5c08aee3d77f8c73b05df01caa | c902ecc1b8217deb40fbd4de14368d7e0201001d | /2015/day02/test_day02.py | 8e7f6331d18473d3b04f41e0ff481804659dea74 | [] | no_license | AleksVassiliev/AdventOfCode | 1a9ee7faf44846f0b15b21ef433522b5f062767d | 59aeef22ec5c2501a5958750460852e3c51bbf91 | refs/heads/master | 2022-12-24T07:07:37.115149 | 2022-12-21T17:37:17 | 2022-12-21T17:37:17 | 145,608,817 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 378 | py | test_day02.py | import pytest
import day02
@pytest.mark.parametrize('dimensions, result', [('2x3x4', 58), ('1x1x10', 43)])
def test_part1(dimensions, result):
assert(day02.calculate_papper(dimensions) == result)
@pytest.mark.parametrize('dimensions, result', [('2x3x4', 34), ('1x1x10', 14)])
def test_part2(dimensions, result):... |
cc23cb369997ca15ac7b10833a25dc61b5b2156d | 16ad33d42e387ae04a88b972f15cc0f5366b9b58 | /account/models.py | 24aa50fb2d16711c149437837652170045f9b5b7 | [] | no_license | saikrishnareddy1104/College-Commute | eb01a6cbe8416177731f162c4954589456b509bf | 4e84953376d3270aad5102e8d9a4bc11c94842e7 | refs/heads/master | 2022-11-21T22:53:00.692826 | 2020-07-25T09:30:15 | 2020-07-25T09:30:15 | 282,412,489 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 818 | py | models.py | from django.db import models
from django.utils import timezone
from datetime import datetime
# Create your models here.
class offerride(models.Model):
userid=models.CharField(max_length=100)
startingpoint = models.CharField(max_length=100)
destination = models.CharField(max_length=100)
datetime = model... |
822ed08e0e5396602d8fa76dbb8d27ab7543073b | 5a27847651aac84e474b5a5aecf1e88b9aea3d66 | /Random_Questions.py | 567d647d94f4221bca59f858faf25b05450d6cf0 | [] | no_license | Moses-A/COMPTIA-Test-Questionare | 3d6dabb21d540a41728c72bd065a189823753c85 | b33ba3fca3ffdd8727f1937e2f22230f72ddc954 | refs/heads/master | 2021-06-10T18:36:20.889847 | 2017-02-26T05:29:52 | 2017-02-26T05:29:52 | 60,039,516 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,442 | py | Random_Questions.py | #!/usr/bin/env python2
# written by Moses Arocha
from random import randint
record = 0
def main():
while (record == 0):
randomnumber = randint(0,5)
print "\n Random Question Number ", randomnumber
if 0 == randomnumber:
print "\n\n Sara, the security administrator, must configure t... |
0453e06b2ab5664abd6ddb6e732f0097bae66dcc | 09ac5476e94122bf8ccdb0b404175dff0820c8a7 | /598 范围求和 II.py | fb726fea4f0eb3ce8a363221ab1802aee4c8be9d | [] | no_license | wxke/LeetCode-python | df27c456ad0c7042e3bfcf2a697e3958d3b85f1f | 37a66e426e9c7e279928d2f6fcdecb9641f4121c | refs/heads/master | 2020-04-29T14:03:22.554357 | 2020-03-10T12:38:24 | 2020-03-10T12:38:24 | 176,185,448 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 304 | py | 598 范围求和 II.py | 范围求和 II
class Solution:
def maxCount(self, m, n, ops):
"""
:type m: int
:type n: int
:type ops: List[List[int]]
:rtype: int
"""
for i in ops:
m = min(i[0],m)
n = min(i[1],n)
return m*n
|
f85a24ceb3627b3e005631b8413c06a2d06a7a7a | b814b6bfd1d67d0b90421af2afe444f1fd6ad2a2 | /checkerboard.py | f0af37f937222273c8910e2095315d0f54df370f | [] | no_license | sjsilverstein/Python | ab86ff882e2bcb617681a2583d49e01149c2b184 | 489fb542fddf8280faaec474e97386599f4515e4 | refs/heads/master | 2021-04-26T23:24:31.980937 | 2018-03-07T02:02:15 | 2018-03-07T02:02:15 | 123,988,253 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 65 | py | checkerboard.py | num = 0
while num < 4:
num+=1
print "* * * *"
print " * * * *" |
2fa137d19b8390a4f051191e0dadd466c70471a4 | 9c1317c6d57672424f8dcf6341ff0b4d43243e37 | /p22.py | 92426e78b23c1f14d51fc024bb7b2cf5a906d81d | [] | no_license | RZachLamberty/project_euler | dbdf310dbf04625c77d913c69b9c3e380043b58a | 9fe0c9839e7e40ecc7c0207b503f2acebe8db14d | refs/heads/master | 2016-09-06T12:41:07.072901 | 2014-03-14T04:36:53 | 2014-03-14T04:36:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,023 | py | p22.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
module: p22.py
author: Zach Lamberty
created: 2014-02-16
Description:
Using names.txt (right click and 'Save Link/Target As...'), a 46K text file
containing over five-thousand first names, begin by sorting it into
alphabetical order. Then working out the a... |
d55597931368b9626701286f5c12d4aacf70a0fb | 11f1f604887ce1c04c8595c3501daa518695bc4f | /test-sel.py | 9028a04eebf268c0fbcf8226f22f9e31a012ae64 | [] | no_license | svosti13/PetFriendTests | e81f022bc97e9a55dca030ff9687bcf9a2fc5c0f | 890c2ad13c8350e8a5b77a1e1f6364802a59705a | refs/heads/main | 2023-02-25T23:07:47.232274 | 2021-01-31T11:17:08 | 2021-01-31T11:17:08 | 334,636,514 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,715 | py | test-sel.py | from selenium import webdriver # подключение библиотеки
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import pytest
@pytest.fixture(autouse=True)
def testing():
pytest.driver = webdri... |
84d723b04cef1a391bbf201b58c07f2a65957061 | b31d5d0ffdcfc840e95cf269252db8b8f67c0465 | /Prints.py | bb36121fe2d4bfad568e315989fe231d8f722195 | [] | no_license | MrRonakBhatt/SQL-Injection-Patcher | 35bd3c4bf3d648dcd6291b742953421cb2df425f | d730c85b0b6987ec86f971175bc75a5e1da0853d | refs/heads/master | 2022-07-10T02:27:51.140595 | 2020-05-19T07:25:53 | 2020-05-19T07:25:53 | 260,863,381 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,421 | py | Prints.py | class Prints:
def project_Title():
print ("---------------------------------------------------------------------------------------------------------------")
print (' -----\ || || ||----- //\\\\ ||-----')
print (' -- || ... |
06c92feaec0c610aff1d05e809760218e49ea074 | e97bf174b866c561f5e527dfb3fc6b7698d1f3c6 | /webdemo/api/controllers/root.py | 41d893f0ff3f0d8588c4160ed4159a27792fc1b8 | [
"Apache-2.0"
] | permissive | sunausti/mywebdemo | 688db2c279a0c19bdb3e8a2321bef430f3401070 | 884bcf3b68e0063dcb08c602f0dc784753ec8a87 | refs/heads/master | 2020-03-22T12:44:38.604295 | 2018-07-08T02:59:55 | 2018-07-08T02:59:55 | 140,059,321 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 386 | py | root.py | from pecan import rest
from wsme import types as wtypes
import wsmeext.pecan as wsme_pecan
from webdemo.api.controllers.v1 import controller as v1_controller
from webdemo.api import expose
class RootController(rest.RestController):
v1 = v1_controller.V1Controller()
@expose.expose(wtypes.text)
# @wsme_pecan... |
c195ae0c6fd2ff619093a95069b756b7f5354da7 | c735247bc7bafe7bf902010bfad20fc8930faca5 | /shortening/shortening.py | 059e4cf2afe2a8c8749bcd0b53f008d2876eedd9 | [] | no_license | FServais/IEEEXtreme-2015 | 2f6ad5d1a932a608a361ab6dae1fdacf88e82e0d | ac1de7ca3b4ca56ed6d0ea9f4c4c145673e7e78e | refs/heads/master | 2021-01-10T17:16:52.302139 | 2015-11-10T23:02:05 | 2015-11-10T23:02:05 | 44,904,753 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,171 | py | shortening.py | from operator import xor
from math import ceil
__author__ = 'Romain'
def encode(number, base=62):
ALPHABET = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
converted = []
while number > 0:
converted.append(ALPHABET[number % base])
number //= base
return ''.join(rever... |
3e29dec59a8cfd394b1ec707f040fb6e6ee9ca05 | 6e0d8d91dd22e2275cd713822679d5cabbc9331a | /thespian/system/transport/UDPTransport.py | 9b746706fa86e7cbc832ebd5dae79593b573bb5f | [
"MIT"
] | permissive | kquick/Thespian | 711712eb0a9ad3370f1013c8393cc461b9541dfe | dfc6d3e865c05f929328b85e98671a5c8fc3a54a | refs/heads/master | 2023-05-26T15:51:57.959690 | 2023-05-22T15:08:00 | 2023-05-22T15:08:00 | 78,292,621 | 203 | 32 | MIT | 2021-06-22T14:42:09 | 2017-01-07T17:18:27 | Python | UTF-8 | Python | false | false | 15,528 | py | UDPTransport.py | """Simple UDP sockets.
Each actor has a UDP IPv4 port / socket that it listens for incoming messages on.
Actors are capable of creating sub-actors and addressing them without
requiring intervention from the Agency.
There is no guarantee that messages have been delivered. Send
failures can be returned, but the lack ... |
90fd4b8396a5528c3343887175202c7195e2f401 | 5a03ddc1ae5d473c71af50634520aa61a0ba1e14 | /opencv/08-图像的旋转.py | fa02c2d9ddbd00f6d511f3e1dab757526f0a601c | [] | no_license | gqxiaofang/learn | ac0ba150b54679d66201361197b64c62e015a2f4 | 8bb8c8424fe2afda1f97250ad82d47cea9df1769 | refs/heads/master | 2023-03-08T15:36:23.241680 | 2021-02-13T06:03:13 | 2021-02-13T06:03:13 | 335,853,943 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 396 | py | 08-图像的旋转.py | #-*- coding = utf-8 -*-
#@Time : 2021/2/7 下午9:38
#@Author : 小方
#@File :08-图像的旋转.py
#@Software : PyCharm
import cv2 as cv
import numpy as np
import matplotlib.pyplot as plt
kids = cv.imread("./image/kids.jpg")
rows, cols = kids.shape[:2]
M = cv.getRotationMatrix2D((cols/2, rows/2), 45, 0.5)
res3 = cv.warpAffine(kids... |
36019d7f0f085db7e46c6b19b9a7639b29a0c3ca | 22bad01cccc0f4b6ff8eaa5e3d7170f5ee1b8928 | /students/Y2337/Evseev_Artem/practical_works/blogfspo/blog/urls.py | 6078bab16e3ed2fc0cff2ef17cd3cfcebf9bd1dc | [] | no_license | EvseevArtem26/ITMO_FSPO_PP_web_development_2020-2021 | 3e3a4025a202c90a3bb67414b5bccff3dcf58062 | 9e42e5649abe1dd096b6b7142e020758a95f7845 | refs/heads/main | 2023-06-03T04:42:40.822261 | 2021-04-20T11:43:51 | 2021-04-20T11:43:51 | 337,383,864 | 0 | 0 | null | 2021-02-09T11:33:08 | 2021-02-09T11:33:07 | null | UTF-8 | Python | false | false | 713 | py | urls.py | from django.urls import path
from . import views
from .views import CarList
from .views import CarView
from .views import CarCreateView
from .views import CarUpdateView
from .views import CarDeleteView
urlpatterns = [
path('owner/<int:owner_id>/', views.detail),
path('owner/all/', views.owner_list_view),
p... |
760c03f52cfc2297a457be39e9fdd8e80a636110 | 4d395980fb17785544c11475808d8f1c224aed55 | /ventas/urls.py | a067b6ab2f5f2d05489468f9ebc4ef11262287eb | [] | no_license | LauserK/leonux-paseo | 2fb409677f5044dc2ad19ce1f8e49e4ed4c3cfce | cfc971619c7299a5684cadf2696f506ad25f8db8 | refs/heads/master | 2023-08-31T10:56:02.064218 | 2021-11-09T02:26:04 | 2021-11-09T02:26:04 | 116,137,853 | 0 | 0 | null | 2023-07-16T12:38:53 | 2018-01-03T13:06:41 | Python | UTF-8 | Python | false | false | 1,375 | py | urls.py | from django.conf.urls import url
from .views import HomeView, EstacionesView, EstacionesEditView, EstacionesAddView, EstacionesDestroyView, DispositivoView, DispositivoEditView, DispositivoAddView, DispositivoDestroyView, PlatcoCSVAddView, JornadaVerifyView
urlpatterns = [
# Home ventas
url(r'^$', HomeView.as_... |
bd4a236a17c0180e48f0b1fa47786b217548a258 | e7a60280cb1be50454d3fb840fb815b29a3f2ebc | /bioinformatics/rosalind-problems/OverlappingGenome/OverlappingGenome.py | ad331b01991f4f22356ed95d884443ee0af6be8f | [
"MIT"
] | permissive | Larkenx/coursework | f471b349d34a8c065407b624cb9c2b65fa6d97e9 | 54eb3b69b622a3c593ed349aed95d42a424cd0a2 | refs/heads/master | 2021-01-19T13:37:53.260582 | 2017-06-23T11:48:14 | 2017-06-23T11:48:14 | 82,436,308 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 171 | py | OverlappingGenome.py | f = open("data.txt", "r")
content = [x.strip('\n') for x in f.readlines()]
result = content[0]
for i in range(1, len(content)):
result += content[i][-1:]
print result
|
d6841d092ea4c426265944c02dfd5934f9505345 | b5feb5d4a73a62e0da14a6b294a1c7a88c29c7ab | /tests/unit/test_000_meta.py | 9f30365f988178742286863cfe0a7491d50f484f | [] | no_license | andresliszt/laholio | df11671245dcda252c2bbbd22307db8d7942ceb0 | 901133e78b221699e93f87479f1676d59665eb0a | refs/heads/master | 2022-11-18T07:57:49.681717 | 2020-07-17T12:35:05 | 2020-07-17T12:35:05 | 280,416,792 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 452 | py | test_000_meta.py | # -*- coding: utf-8 -*-
import pytest
def test_import():
import laholio
meta = laholio.__meta__
assert meta
@pytest.mark.parametrize(
"name",
[
("name"),
("version"),
("description"),
("author"),
("license"),
("home-page"),
("author-email"... |
64d4ad462c8f9007ad6172e0eb75def36e57360b | 75b1c205d6d410d80fb881bca184c0be089ba68c | /hash/ransom_note1.py | 2111a580ccb16711f6d77741806684750a16cb75 | [] | no_license | KushagraChauhan/HackerRank | f3ca64c9fcab4c22d55affa4485fdf684b5f5eec | ddb1f9a036c96cb5c17df41396956ac2c3253800 | refs/heads/master | 2020-07-06T10:16:11.805669 | 2019-08-23T06:48:55 | 2019-08-23T06:48:55 | 202,983,440 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 505 | py | ransom_note1.py | from collections import defaultdict
def ransom_note(magazine, note):
dict1 = defaultdict(int)
for word in magazine:
dict1[word] += 1
for word in note:
if dict1[word] == 0:
print("No")
return False
dict1[word] -= 1
print("Yes")
return True
if __name__... |
a81077e3ecd1ebc13ff8ff442f587c31cf807e21 | 9b4766afec1dc2bf08f8baf9003d87594d0c9fc7 | /ml/yaraku_ml/__init__.py | d1ebd0ed044089fe3127aff23e00a38fa4c25aa2 | [] | no_license | benrbray/yaraku-test | 3e9859da9dd4bed75e9f118edb0153a5dda7207b | 737074241b3dd1c2dbcab922ad8eba8fb3ff9af2 | refs/heads/master | 2022-07-10T04:49:12.340445 | 2020-02-18T06:31:24 | 2020-02-18T06:31:24 | 241,290,353 | 0 | 0 | null | 2021-03-20T02:57:57 | 2020-02-18T06:37:17 | Python | UTF-8 | Python | false | false | 3,648 | py | __init__.py | import flask;
from flask import Flask, escape, abort, jsonify, request;
from . import models;
from . import database;
from .database import redis;
import json;
from werkzeug.exceptions import HTTPException;
import os, sys, traceback;
#### HELPER FUNCTIONS ##########################################################
d... |
3a5492532816561455f7e6bf8a01a13168bf3054 | 47ed6fe3ac34bf89eb0487695f86d0d0d90ee57a | /SOP_01_GP_Classification/GP_5D_method_from_Hsieh/Get_Fits.py | a8b2af555c1e79f09269dae7531d7a74b07beff1 | [] | no_license | ShihPingLai/YSO_Hunters | 44be344f8bf27db92965809a126170d7a530be30 | 00b83de9ceee258075edcd8bf3a9e63d4ce8cf96 | refs/heads/master | 2021-08-02T07:56:54.692301 | 2021-07-28T09:49:43 | 2021-07-28T09:49:43 | 134,792,297 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 2,917 | py | Get_Fits.py | #!/usr/bin/env python
'''----------------------------------------------------------------
This program is a part of program for Step6 (Image_Check)
Input : catalog_to_Image_Check with (ra/dec) , wcs , imagetype
Output : Fits_and_shape directory with different bands' mosaics
------------------------------------------... |
b50098ad3d6d9df2a2229d0cf2fb0086c527f99b | ea3d98f95429a463f34452827e90a2335e97e789 | /synonyms.py | d003da4991955574f814618521855d2015b2408a | [] | no_license | Boot-Error/Poem-Titler | 528369fb6187929bae8e356c704558171e8ab248 | 3334021612948a5dc4710b66d7be8781b94fcb81 | refs/heads/master | 2020-05-17T21:51:03.677211 | 2015-05-10T17:51:29 | 2015-05-10T17:51:29 | 28,665,243 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 600 | py | synonyms.py | import urllib
from bs4 import BeautifulSoup
#Method to get synonyms
def get_synonyms(query):
#Website url to search with
url = 'http://www.thesaurus.com/browse/{}'.format(query)
#opening the website
response = urllib.urlopen(url)
document = BeautifulSoup(response.read())
#Finding out the synonyms
try:
words ... |
321f580d4051da137fe28eacb2da47884fde8792 | 51f6f32f58b6c242c08622f989b8287efc17845d | /blockchainDapp/blog/views.py | 958a1abcda96c8142ba78c95e640074e6c3006d1 | [] | no_license | Dachkar/Blockchain-Dapp | 5e80756f825a6f9b2bccab81093693be8fe8e962 | 2d2c3b1a4f10a6968bdef727b5300e2333b4b8f5 | refs/heads/master | 2020-04-23T08:44:05.312155 | 2019-02-19T01:43:32 | 2019-02-19T01:43:32 | 171,046,653 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,987 | py | views.py | from django.shortcuts import render, redirect
from .models import Post, Transactions
from django.contrib import messages
from django.views.generic import ListView, DetailView, CreateView, UpdateView, DeleteView
from django.contrib.auth.mixins import LoginRequiredMixin, UserPassesTestMixin
from django.urls import revers... |
81236db7dff3d77e2d0a849deacdc74753b0ddc2 | cecda1dff33ee46f1ef508b5d30d3a0f0a7e0f5b | /bglib/protocol/networkplayer.py | bb935b5d40334e735c0e814c9f598ac0feb9520c | [] | no_license | bgnori/bglib | a79d61c328a0cf6033bff79125b1078357744b89 | 1e616441ac0db48ce6e636e184e0e4d5a563467f | refs/heads/master | 2020-05-29T10:54:44.846874 | 2012-02-11T01:35:43 | 2012-02-11T01:35:43 | 1,808,493 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,710 | py | networkplayer.py | #!/usr/bin/python
import socket
import select
import time
import os
import wx
'''
sock = socket.socket()
addr = get_addr()
sock.bind(addr)
sock.listen(1)
conn, address = sock.accept()
while True:
line = f.readline()
print line
conn.send(line)
#time.sleep(1)
'''
class StreamWindow(wx.TextCtrl):
def __init... |
274b91dd56e4b9057aad3b1fcd0d369656969e6c | ea68a7bb5aacadfd67cb33a2b5f41affa318c7c3 | /src/python/gluclient.py | bcd91f5b540a2b758a4d2cbcd83de8c31a4f00d3 | [] | no_license | rossmason/glu | f601cfdf6b4fe7ba23202964d176c2618b6165a9 | e97f6a5a07bad39403ebb0b435f8e055298839d3 | refs/heads/master | 2021-01-16T21:24:14.325002 | 2010-05-14T01:25:19 | 2010-05-14T01:25:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,435 | py | gluclient.py |
import sys
import json
import types
import urllib
from glu.core.parameter import *
class GluResource(object):
"""
Encapsulate information about a resource.
"""
def __call_service_function(self, service_name, service_url, kwargs):
"""
Issue the REST call to the server for this servic... |
2e6d6c1e4b8c8ac564a0959a393581ad6a081060 | 15f321878face2af9317363c5f6de1e5ddd9b749 | /solutions_python/Problem_96/1176.py | 3c3580efa5481a65c845fb9ad5008ae487340fa6 | [] | no_license | dr-dos-ok/Code_Jam_Webscraper | c06fd59870842664cd79c41eb460a09553e1c80a | 26a35bf114a3aa30fc4c677ef069d95f41665cc0 | refs/heads/master | 2020-04-06T08:17:40.938460 | 2018-10-14T10:12:47 | 2018-10-14T10:12:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 667 | py | 1176.py | #!/usr/bin/python
# Google Code Jam 2012 - Qualification Round - Problem B - Mateusz Kurek
import io
t = int(input())
for i in range(1,t+1):
line = [int(value) for value in input().split()]
n, s, p, *results = line
atLeastP = 0
maybeSupprising = 0
for res in results:
#get unequivocal decomposition result to r... |
e7946b3699654a56c6c3239b1e2d6627dc241d37 | 15e27a96fee7c6443022317b0523b69e64d29624 | /itsonedb_wrapper/utils/create_loc.py | 0e797a4a05fbcb8771882e73500b40bbacdb1889 | [] | no_license | ibiom-cnr/itsonewb | e425f7332b17c0e2db187e0a4de64d04d55a41d5 | 0d4d1fd63ede77e0402d0955b45abeb2fcf935e6 | refs/heads/master | 2023-05-27T03:43:12.559920 | 2021-06-03T07:30:35 | 2021-06-03T07:30:35 | 258,443,973 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,754 | py | create_loc.py | #!/usr/bin/env python
import ast
import argparse
#______________________________________
def cli_options():
parser = argparse.ArgumentParser(description='Galaxy Central Management Tool script')
parser.add_argument('action', choices=['accession', 'specie', 'taxon'], nargs='?', help='Loc to be create')
parser.ad... |
75cff5723044b66d51b3fe26fcac8ca7e5bb2aba | 7c0fca5f59a000554964011f5f6432168c16aad2 | /stubs/docker/types/services.pyi | 8fd53f9f1b869aca4483a58c5d64c787a41678cd | [] | no_license | denbeigh2000/ezhost | 4a6cbaa625f07e94b49111c39cdb897f734f376d | f9342e38190bfe6ee5442c19b916662e5651fbd2 | refs/heads/master | 2023-08-29T21:27:23.937449 | 2021-10-18T00:40:49 | 2021-10-18T00:40:49 | 418,221,560 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,189 | pyi | services.pyi | from .. import errors as errors
from ..constants import IS_WINDOWS_PLATFORM as IS_WINDOWS_PLATFORM
from ..utils import (
check_resource as check_resource,
convert_service_networks as convert_service_networks,
format_environment as format_environment,
format_extra_hosts as format_extra_hosts,
parse_b... |
d7cf25aa3e69e66982acb970a655c8f6773a7170 | 293de691cb804c8ac401821c1de9c7e4de17a6b8 | /cvlearing/cv2_3.py | 46e14937f3879803744bad44eaf79c2700d6d07d | [] | no_license | Nicolasios/PythonLearn | 4d3e3ff17ea84e7951d631756b0336a483d7302f | afdced3a4cfebfde9c47e37d8cd0bc9fcde0fe1a | refs/heads/main | 2023-01-18T15:24:50.045551 | 2020-11-24T05:58:37 | 2020-11-24T05:58:37 | 308,682,839 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 202 | py | cv2_3.py | import cv2 as cv
import numpy as np
path = "C:\\Users\\TY\\Pictures\\Saved Pictures\\LinYoga.jpg"
src = cv.imread(path)
cv.namedWindow("initial image",cv.WND_PROP_AUTOSIZE)
cv.imshow("initial",src)
|
3a3d3ad541edab78475dc6e7a34d04f457d0c2a4 | da611195ef2ac00cb55394aab6397d42c53a5642 | /Metrics/Delete Kerning Pairs Smaller Than Popup.py | 60dcedc9ac3ef420932a8ad9b4d4b0f2336739b4 | [
"Apache-2.0"
] | permissive | laerm0/wei-glyphs-scripts | 8926db9e1ddd750b377fabdd54f350714eab5007 | d2e53004805847722f4ba07072fa50400a7cc4d6 | refs/heads/master | 2020-09-23T13:19:47.455101 | 2019-12-03T02:10:18 | 2019-12-03T02:10:18 | 225,510,002 | 0 | 0 | Apache-2.0 | 2019-12-03T02:10:43 | 2019-12-03T02:10:43 | null | UTF-8 | Python | false | false | 2,718 | py | Delete Kerning Pairs Smaller Than Popup.py | #MenuTitle: Delete Kerning Pairs Smaller Than #
# -*- coding: utf-8 -*-
__doc__="""
Delete all kerning pairs equal to or smaller than # in selected master
"""
import vanilla
import GlyphsApp
class deleteKerning( object ):
def __init__( self ):
self.w = vanilla.FloatingWindow( (200, 110), "Delete Kerning", minSize=... |
af4daf7412e9eb010c1090665e822a9be1121128 | c5224851ed1e410bb6e60138e47141411c1cc7b0 | /modulo.py | 532929d3ad2be48d8d4ac234555ec6b0682b7b51 | [] | no_license | rvidalh/python3.x | 29649881e93013a4d1d6341af087ccf1670c592e | d9c5593e02ab0a45fc7d02bcbc6a83d740494a79 | refs/heads/master | 2020-05-05T08:04:45.991985 | 2019-05-25T04:00:20 | 2019-05-25T04:00:20 | 179,849,631 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,324 | py | modulo.py | # Módulo
# Se verá la forma de utilizar archivos que contienen funciones,
# y como importar sus funciones desde otros archivos
# De ésta forma tambié se puede utilizar funciones de un módulo,
# este módulo y funcionalidad de creó para imprimir
from my_function import my_print
# Se utilizará el código del archivo c... |
b52742f0b18651c4eab402285d1a5c1a6877a129 | 1966da2130595bc7814e5a584797f9d508095a4f | /VSGNet-master/scripts/dataloader_vcoco_anlaysis.py | 1b780181f9391fcd35c914ce1c1267f88f28eae9 | [
"MIT"
] | permissive | sinaenjuni/GAN_projects | 8d26e6ac4e6fee009e5235a82e4b36b9bbbf9eb2 | d3e97158b6945ae5e3ee44214aaf277f16d51e17 | refs/heads/master | 2023-08-30T16:31:04.526680 | 2021-10-22T12:15:49 | 2021-10-22T12:15:49 | 413,645,878 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,258 | py | dataloader_vcoco_anlaysis.py |
from __future__ import print_function, division
import json
import os
import torch
import pandas as pd
from skimage import io, transform
import numpy as np
import matplotlib.pyplot as plt
from torch.utils.data import Dataset, DataLoader
from torchvision import transforms, utils
import helpers_preprocess as labels
from... |
edd70f55e76418911d304d6eb41a6d2a93005a58 | 4b3cf3600904ef3ad28f2c2ec30cda0554748462 | /player.py | bf104136d80380801b688df462cc5ec7b3ae38d3 | [
"MIT"
] | permissive | OmarSalah95/Lambda-Treasure-MUD-Automation | 7432d29d6e85b6e5d7dc35ca8ca60830ca0ea1d6 | 2297dac79ca32e83c860cd75de7459bf0a420bb4 | refs/heads/master | 2020-12-06T09:50:10.472222 | 2020-01-14T20:36:16 | 2020-01-14T20:36:16 | 232,428,615 | 0 | 0 | MIT | 2020-01-14T16:33:57 | 2020-01-07T22:23:15 | Python | UTF-8 | Python | false | false | 14,914 | py | player.py | from api import url, key, opposite
import requests
import json
import time
import os
from miner import mine
from cpu import *
class Player:
def __init__(self):
data = self._get_status()
time.sleep(data['cooldown'])
self.name = data['name']
self.cooldown = data['cooldown']
s... |
e14bea6376c8649bf9c9c5759d530af773664cd4 | b78f9ba1f13aad2cd50874254496b13ddd6205be | /create_apriori_input.py | 7d7d005ef0a1525aab551895dc60c9e15eea9867 | [
"MIT"
] | permissive | NCBI-Hackathons/pheno_geno_ataxia | 035f061e2f266dc8576ea4d870385161bd32e69f | 7c9850c837670243847b661e4fe5a7d01e00edd4 | refs/heads/master | 2020-04-22T17:57:35.977054 | 2019-02-27T17:17:52 | 2019-02-27T17:17:52 | 170,560,327 | 2 | 0 | MIT | 2019-02-25T23:33:14 | 2019-02-13T18:46:50 | HTML | UTF-8 | Python | false | false | 756 | py | create_apriori_input.py | #!/usr/bin/env python3
import pandas as pd
import csv
def get_apriori_input(input_file,output_file,sample_col="Sample",gene_id_col="Gene_ID"):
df=pd.read_csv(input_file,sep="\t")
sample_names=df[sample_col].unique()
with open(output_file,"w") as out:
csv_writer=csv.writer(out,delimiter="\t")
... |
462d73195680118d19a3d4e8a855e65aaeecb3c6 | db3bb0d601299005e0bc52b5d6d22b0bb8d45c92 | /main.py | 334e7d39844bf2190116061479daeac2e54a74d6 | [] | no_license | ongtm/CADeptOfEducation | 34043aa1c95752f734b9efabf8d43c6cf614a212 | 35b0258312b3cf3221b890dde00b305dcdea3b00 | refs/heads/master | 2023-03-25T18:43:43.490993 | 2021-03-21T13:57:59 | 2021-03-21T13:57:59 | 350,014,264 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,238 | py | main.py | import time
class DISTRICT:
def __init__(
self, cdcode, county, district, street, city, zipcode,
state, mailstreet, mailcity, mailzip, mailstate, phone, extphone,
faxnumber, email, admfname, admlname, admemail, lat, long,
distrownercode, doctype, statustype, lastup... |
e884825325ceb401142cab0618d9d4e70e475cf5 | d64dc7a5dac439fd7bb0095fdd39ce92633da9d0 | /mapper1.py | ac8305a72d59a267414f74cdeb61d2807d3fc098 | [] | no_license | amitvasz/Word-co-occurrence-wordcount-Hadoop | 25e3485bbeaba28c0b68e04615bb3c06defd36d5 | 0b76da551a3510fbeaceaec8d3930d273953ce91 | refs/heads/master | 2020-05-14T23:51:14.339626 | 2017-07-03T19:36:36 | 2017-07-03T19:36:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 316 | py | mapper1.py | #!/usr/bin/env python
import sys, re
window = 2
for line in sys.stdin:
line = line.strip()
twits = line.split()
i = 0
while i <len(twits):
j = 0
while j <len(twits):
if i!= j:
print("%s%s\t%d" % (twits[i]+' ', twits[j], 1))
j+=1
i+=1 |
9d6b5baa8462b2996e4518dd39b5bb1efde1fd9d | 47ac0cabb4897fe1b947852461987f0dc8e9fabc | /10Days_of_Statistics/Day_1_Quartiles.py | db184f06fea4b60303163ceff6c41bb83050703a | [] | no_license | stlover25/Hackerrank_exploration | 4ad6f20e8faa83fd7f65f06e59cb32cbd60fa771 | c89edb7dcf72456bc2ecc2ced5c934c09be27e7c | refs/heads/main | 2023-03-25T11:56:17.716365 | 2021-03-24T07:23:20 | 2021-03-24T07:23:20 | 343,641,614 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 728 | py | Day_1_Quartiles.py | # -*- coding: utf-8 -*-
# Enter your code here. Read input from STDIN. Print output to STDOUT
n= input()
vals= list(map(int,input().split()))
def median(values):
n=len(values)
values = sorted(values)
if n%2==1:
return values[(n+1)//2 - 1]
else:
return int(sum(values[int((n/... |
624b34d160ea6db4f5249544f1614a20f506ca9e | 2bac6790547a964cd1e3c95571692afcb06c0a9b | /limite/tela_cliente_listar.py | 95c05fd34598d258fd533e9e38976636555488ec | [] | no_license | silveiraluisf/trabalho-DSO | 6daf7f265b8d48453505155fc2e760bcfa51a3b5 | 2bfb8f7ddf139610869bc4d3404b2425c6120b27 | refs/heads/main | 2023-04-21T01:55:17.051211 | 2021-05-18T22:30:03 | 2021-05-18T22:30:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 593 | py | tela_cliente_listar.py | import PySimpleGUI as sg
class TelaLisatrClientes():
def __init__(self):
self.__window = None
def init_components(self, lista_clientes):
layout = [
[sg.Text('Dados do cliente')],
[sg.Listbox(values=lista_clientes, size=(60, 10))],
[sg.Submit()]
]
... |
d9156c20e046f608563bc6779575e14cc60f4c25 | ff66d7b1cb60751c11bff42f1a790b145992f7c6 | /keptar/utils.py | 0a4921c67fc350f8b32cf9fea7b71cf6b1341054 | [] | no_license | dyuri/djkeptar | 3c5e67232446982f477681c8f1f0dd3ebbfc94c2 | 07781276098fc3e1c5f8c18b8362af50ea5aefd2 | refs/heads/master | 2023-02-16T11:35:46.128397 | 2023-02-11T12:29:37 | 2023-02-11T12:29:37 | 203,550,952 | 0 | 0 | null | 2023-02-11T12:29:38 | 2019-08-21T09:25:27 | Python | UTF-8 | Python | false | false | 4,468 | py | utils.py | from django.core.urlresolvers import reverse
from keptar import settings
import os, os.path
import Image
try:
from collections import OrderedDict
except ImportError:
from keptar.odict import OrderedDict
class AccessDenied(Exception):
pass
class FileNotFound(Exception):
pass
class NotDirectory(Excepti... |
5193de15052f81460a23d993cfa039fa90c9de5e | 6aada3ba825ee7a9513235db857ae54de2dd46ad | /webserver.py | 7cd6e499d3fb639c6a85e7b1d2bf1b8bbd28ee77 | [
"MIT"
] | permissive | jillh510/video_story_arcs | 005822c88fea9e2b973a3ae141e012445b156299 | f2c27785d05a6e18b23ce8ae0ee6d0567504082b | refs/heads/master | 2020-12-24T08:40:43.143505 | 2016-08-29T22:40:12 | 2016-08-29T22:40:12 | 24,538,140 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,315 | py | webserver.py | """
Copyright (C) 2014, Jill Huchital
"""
# test comment
from flask import Flask
from flask import render_template
from flask import jsonify
from flask import request
from playlists import get_all_playlists, create_playlists, get_all_categories, add_new_category, add_new_topic, get_all_topics
from db import connect_... |
acbe9a9501c6a8532249496f327c2470c1d2f8e0 | 4ab20c7970c16e8aca11e1d9e93ebd0ff5d94daa | /strategies/Volume.py | 02e012aa160cf765da230f04ff7b5f474e801279 | [] | no_license | webclinic017/stockbot-12 | c7575fe626d70364a2cb926ed29d88292c14d18e | e7255b479ca35c51392f2fed9839e7520942f52d | refs/heads/main | 2023-07-24T22:18:35.450479 | 2021-09-06T04:07:27 | 2021-09-06T04:07:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 760 | py | Volume.py | import math
import backtrader as bt
from datetime import datetime
from bots.TelegramBot import TelegramBot
import logging
class Volume(bt.Strategy):
params = (('avg_volume_period', 10), ('ticker', 'hpg'), ('ratio', 1.25))
def __init__(self):
self.mysignal = (self.data.volume / bt.ind.Average(self.data... |
e37f4422c1063df50453f7abf72a0a9a31156d8b | 71acb7214efd91c0d327f6d8958e1798eadb4401 | /locations/spiders/scooter_hut_au.py | 0c3a2f6fc9ba6b7394b546a5b7df4dee450a359f | [
"CC0-1.0",
"MIT"
] | permissive | alltheplaces/alltheplaces | 21b9f8b4ace1352e52ae7b8f8825a930d2cb033e | 1bcbb55cfcf06f2c714465570711f6e83f205c22 | refs/heads/master | 2023-08-30T19:45:35.098658 | 2023-08-30T17:51:54 | 2023-08-30T17:51:54 | 61,166,935 | 453 | 176 | NOASSERTION | 2023-09-14T17:16:40 | 2016-06-15T01:09:18 | Python | UTF-8 | Python | false | false | 351 | py | scooter_hut_au.py | from locations.storefinders.stockinstore import StockInStoreSpider
class ScooterHutAUSpider(StockInStoreSpider):
name = "scooter_hut_au"
item_attributes = {"brand": "Scooter Hut", "brand_wikidata": "Q117747623"}
api_site_id = "10112"
api_widget_id = "119"
api_widget_type = "product"
api_origin... |
500ec0f5440deec12c81e1981e772faf4d97328b | cc4f426bbf1b57b798596bb3da76ce34df137060 | /MNIST/TensorFlow/mnist_tf.py | c8a5d7ff300567faf4e4ff46fbd015bced951848 | [] | no_license | chanyoungs/Machine-Learning | e685b39075a2e3bd9e7872f8f8c332d20244742d | 17e08096a14f3f1c21ffe16182bb35202ce0ca25 | refs/heads/master | 2020-04-25T22:15:01.115424 | 2019-05-09T21:23:39 | 2019-05-09T21:23:39 | 173,105,181 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,408 | py | mnist_tf.py | # Import useful libraries.
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
from tensorflow.examples.tutorials.mnist import input_data
# Global variables.
log_period_samples = 20000
batch_size = 100
# Import dataset with one-hot encoding of the class labels.
def get_data():
return input_da... |
ee4eeedd0b370aaa0bb5648d63cba84da8fff434 | 35f1e7b906136f63a852f29625d43c7bed5b1f9d | /spectrumuc/spectrumuc.py | 4b31e688d2ba7f3ae5df63e55b47e6b704ca64be | [] | no_license | sudouc/spectrumuc-cli | 0500244f924cb156d81ec9696a2371ec6e1b454b | e5c27161efb55fc8af2df5e9cf952f8e7cb51055 | refs/heads/master | 2020-06-12T23:32:08.448114 | 2016-12-03T14:05:03 | 2016-12-03T14:05:03 | 75,477,395 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 966 | py | spectrumuc.py | """spectrumuc.spectrumuc: provides entry point main(), calls subcommands in their own modules"""
from __future__ import print_function
__version__ = "0.0.0"
import sys
import argparse
from . import nodes
from . import projects
def main():
"""
Run the program
"""
print ("Executing spectrumuc versi... |
40713412383d14ef0e0c1017c766401c603eaed0 | d55c88c0e5a8269414fdec6640c6a54e3ab8b2bf | /main.py | f4482b3f830aafb6e3101f7aa1fecaea340f99d6 | [] | no_license | th3n0y0u/C2-For-Loops | d67f01300e9fa57473c00a45eeba6ad9e171d1a8 | f0bb4603d2b54b062368553b0c11710a448d0e58 | refs/heads/master | 2023-03-27T12:57:26.328967 | 2021-02-25T23:27:28 | 2021-02-25T23:27:28 | 349,246,525 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 197 | py | main.py | counter = 1
# default start number is 0
for counter in range(1, 11):
print(counter)
# using a for loop, print numbers 1 - 100, but only evens
for counter in range(0, 102, 2):
print(counter)
|
56b1ada3aa752cab5b88b4b6e4d7e78deaf727ca | c76f9c9427f008b44d8313cc5f31c2beb26baedc | /src/python/sketches/wiki_pageviews.py | a7acdd049e75d8fbb611d3c5d4061899f4f2a3f8 | [] | no_license | spaghetti-open-data/visualizing-self-diagnosis | 25baeb4238f9bc061d4c96ed2d9332acedca5ccc | 81b066d58dbf225c2dca0d64e7fe7bc4d574d789 | refs/heads/master | 2021-01-10T03:39:07.327515 | 2016-03-01T16:29:37 | 2016-03-01T16:29:37 | 48,648,568 | 7 | 2 | null | 2016-03-01T16:29:37 | 2015-12-27T14:45:21 | HTML | UTF-8 | Python | false | false | 1,374 | py | wiki_pageviews.py | """ Script for collecting views data from Wikipedia.
Python requirements:
- pip pip install mwviews
References:
- https://github.com/mediawiki-utilities/python-mwviews
"""
from mwviews.api import PageviewsClient
from wiki_medicine_pages_get import getMedicinePageUrlsFromDump
from pprint import pformat
... |
768e901664b6ae27a871ae78c6b57cd5cfe0004a | 6c229bba5264e0610e96dc28b81d980c2397f657 | /source/utils/messages/generator.py | 5e3dc3a6f698dfc5abc7a2512f5e30092d0b17c4 | [
"MIT"
] | permissive | csgobotDiscord/csgobotdiscord | 340659ace6356f25f8bfcaa03309e791c3edecdd | df2c23e9a92184a957f6cc6e051b8dd8c04836ab | refs/heads/main | 2023-02-05T04:34:26.197804 | 2020-12-26T06:47:38 | 2020-12-26T06:47:38 | 323,920,332 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 845 | py | generator.py | """
Утилита для генерации сообщений о статусе выполнения команды.
"""
import discord
from discord.ext import commands
from source.resources.config import config
async def generate_message_success(status: str, ctx: commands.Context) -> discord.Embed:
embed: discord.Embed = discord.Embed(color = config["bot"]["me... |
0813a7b944e70300f862e21530b1afda3f64bbb1 | cb6745a49326ea23146a8ccc2defe1e78ba766b8 | /Mathematics/Number-theory/Stirling-numbers-first-kind.py | 5f1477573dd9d07e72280daea4887934ddfc76ab | [] | no_license | 02021997/Competitive-programming-in-Python | 13a7046531c851b8181b787a6267fdf91cdcf7db | 8bd20488fe3d6899186898cac72bd1abee6c4f2e | refs/heads/master | 2022-12-26T12:10:38.989234 | 2019-05-26T16:56:04 | 2019-05-26T16:56:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 679 | py | Stirling-numbers-first-kind.py | '''
Stirling number of first kind s(n, k) is the number of permutations of length n having exactly k cycles.
'''
#########################################################################
# Works modulo MOD
def Stirling(n, k, MOD):
if k > n:
return 0
s = [[0 for _ in range(k+1)] for _ in range(n... |
19a28a9a06e8c4881874a10792c6938dc7b2bed9 | 921ab2ceacb5ecf8b7d90047fe396193044135bd | /eye_check.py | 3db3a9746967bfca52627dba0e5fdd7680145bd6 | [] | no_license | yeonghyeonSeok/Online-Test-Project | c7b7dc20b1478d0da2840d585951c4f7357613a8 | 16033f32db54c4c44245a19403e3579a1debf183 | refs/heads/master | 2023-01-21T07:20:40.179850 | 2020-11-25T00:39:34 | 2020-11-25T00:39:34 | 293,441,510 | 1 | 1 | null | 2020-11-25T00:39:35 | 2020-09-07T06:29:12 | Python | UTF-8 | Python | false | false | 15,263 | py | eye_check.py | import cv2
import numpy as np
import dlib
from math import hypot
#웹캠
cap = cv2.VideoCapture(0)
font = cv2.FONT_HERSHEY_COMPLEX_SMALL
#전면부 얼굴 인식
detector = dlib.get_frontal_face_detector()
#얼굴의 각 특징을 예측하는 모델
predictor = dlib.shape_predictor("C:/Users/user/py38_tensorflow/shape_predictor_68_face_landmarks.dat... |
33db3735010e03fec40c3decac6a3b64358c85b9 | 6de139b6a5d01ff60d7401850ee0f5107ae8c146 | /check.py | b63b162fc3e0a57c4b42acc42117e437f33ce40d | [
"Unlicense"
] | permissive | georgjaehnig/fifa-pairings | 61324a78098101cc5dd241c875e36ca1b8b503d6 | 67ba8a8d47f25305d2537d7501b0470e70cbd8ff | refs/heads/master | 2016-09-11T03:34:59.169036 | 2014-06-22T12:59:58 | 2014-06-22T12:59:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 793 | py | check.py | #!/usr/bin/env python
f = open('/usr/share/dict/words')
words = f.readlines()
f.close()
# trim
words = map(lambda w: w.strip(), words)
# only with 6 letters
words = filter(lambda w: len(w) == 6, words)
# all lowercase
words = map(lambda w: w.lower(), words)
codes = {}
f = open('country_codes.txt')
for line in f.re... |
6e162863ee7d901e63c9f10678d106159488dfd6 | a0ec9530ccf8ebe43e5335a929c5e6253bc2dae0 | /setup.py | eda4dbf737fd5e1bb7876008c16b1a0a0cdc7951 | [
"MIT"
] | permissive | volnt/22board | 024f8b39b440147d48d388ebbc6e3ae76f6992fa | 66c854fe428fc6766bf44a7a48018c18d06054c4 | refs/heads/master | 2020-06-02T01:06:38.067628 | 2014-11-04T15:17:38 | 2014-11-04T15:17:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 404 | py | setup.py | from setuptools import setup, find_packages
from os.path import join, dirname
from app import __version__
setup(
name='22board',
version=__version__,
packages=find_packages(),
long_description=open(join(dirname(__file__), 'README.md')).read(),
include_package_data=True,
install_requires = [
... |
0e15c938d7f4857d8a55cae8b4102e7183c2a2df | bf7ceda28eacc4e68dadff5d35224a13e7467d4d | /sentence_classifier.py | ed6fb3f8e3954e13903e87c48a6c3e6add443fe5 | [] | no_license | katryo/task_search | 83983d61618d7755c474a9ed9c39ec6ca5621641 | 20c1985ca27253f64f4f9c124b36166c86bcf2d0 | refs/heads/master | 2020-05-09T10:04:11.155557 | 2014-03-25T04:10:25 | 2014-03-25T04:10:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,109 | py | sentence_classifier.py | # -*- coding: utf-8 -*-
import pdb
class SentenceClassifier():
"""
文字列でのマッチングだけでは無理なのでめんどいけどmecabでのマッチングもする
ください 動詞,非自立,*,*,五段・ラ行特殊,命令i,くださる,クダサイ,クダサイ
下さい 動詞,非自立,*,*,五段・ラ行特殊,命令i,下さる,クダサイ,クダサイ
ましょ 助動詞,*,*,*,特殊・マス,未然ウ接続,ます,マショ,マショ
う 助動詞,*,*,*,不変化型,基本形,う,ウ,ウ
なさい 動詞,非自立,*,*... |
c54ede2d17883f25d518ae077691bf35bd491806 | dedd0b15bdf5ab18462f45aba95f0631615df308 | /acshaproxy/registry/events.py | 6af4d4049d45606f31549075d9932bb6a999836c | [
"Apache-2.0"
] | permissive | aiminickwong/acs-proxy | d933a27b130a11675ddd816bb3085a757fb5d52f | 379e5db1ef24ada73a24892b780bfbc548f8115c | refs/heads/master | 2020-03-18T16:35:21.980478 | 2017-11-07T03:01:11 | 2017-11-07T03:01:11 | 134,974,788 | 1 | 0 | null | 2018-05-26T15:52:07 | 2018-05-26T15:52:07 | null | UTF-8 | Python | false | false | 994 | py | events.py | import logging
import sys
import etcd_info
logger = logging.getLogger("haproxy")
class Events(object):
def __init__(self):
self.message_handler = None
def on_message(self, handler):
self.message_handler = handler
def run_forever(self, *args, **kwargs):
etcd_client = etcd_info.g... |
455bbf28960b06d7dd5ec7af7d45ffadb88a86cc | cb1226c63fdf1e5cd38cd2e3f8e44a80a27d4a45 | /Python/list_comprehension.py | 37d1747eae8ef70acb273cec49ab84c22ecac13a | [] | no_license | esarnb/coding_practice | 3a4a39cba92bb9a8733cd06e2d9e5e407b11528f | 03f32d84f43f3224b68ccf34a514bb0ac3523ae7 | refs/heads/master | 2020-11-27T12:55:50.225994 | 2020-01-12T18:53:06 | 2020-01-12T18:53:06 | 229,450,167 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 297 | py | list_comprehension.py | # List Comprehension
# # # [result for variable in list]
mylist = [(1,2), (3,4), (5,6)]
# Get multiplied values for each tuple given
res = [x * y for (x,y) in mylist]
# # # Converting for loops into list comps
mylist = []
c = 6
for a in b:
mylist.append(c * a)
mylist = [c * a for a in b] |
fcc0fcf7c64b58fc6408dca28fd2bb22cce70476 | 006ff11fd8cfd5406c6f4318f1bafa1542095f2a | /FastSimulation/Configuration/python/Customs.py | 977a6a6c140c1bd3ab1a8610ba75ac60ff550abc | [] | permissive | amkalsi/cmssw | 8ac5f481c7d7263741b5015381473811c59ac3b1 | ad0f69098dfbe449ca0570fbcf6fcebd6acc1154 | refs/heads/CMSSW_7_4_X | 2021-01-19T16:18:22.857382 | 2016-08-09T16:40:50 | 2016-08-09T16:40:50 | 262,608,661 | 0 | 0 | Apache-2.0 | 2020-05-09T16:10:07 | 2020-05-09T16:10:07 | null | UTF-8 | Python | false | false | 597 | py | Customs.py | #####################################
# a bunch of handy customisation functions
# main functions: prepareGenMixing and prepareDigiRecoMixing
# author: Lukas Vanelderen
# date: Jan 21 2015
#####################################
import FWCore.ParameterSet.Config as cms
def disableOOTPU(process):
process.mix.maxBu... |
7f44e6d196da1641b8442ede5c592f407a8861f1 | dd1de114256ec7517d96362a892a52f32369d082 | /apps/users/base.py | 5e55c45708dfa7574bb68992d82a15c8a9f6dbce | [] | no_license | zerc/besttrick.ru | 4e3128ed44a30e03eebd2ca77197bb87c0b4eb9b | 2a273d1537721167188d6db003a93b35717f154e | refs/heads/master | 2020-04-08T07:58:09.299785 | 2013-09-21T18:53:31 | 2013-09-21T18:53:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,952 | py | base.py | # coding: utf-8
"""
apps.users.base
~~~~~~~~~~~
Низкоуровневая логика хранится сдесь
:copyright: (c) 2012 by zero13cool
"""
from functools import wraps
from flask import g, redirect
from project import app
from apps.common import get_user_rating
from .models import User, LOGINZA_FIELDS_MAP
def use... |
0137aea4ff8a608958cc68e1390d9d1c0c5f7dab | 122f4cb452611e62a7dea3f8baf7303441a23dcc | /api_testing/tests/test_get_user_information_api.py | f90d2006c4c765d05b3b996011a37198c83f7017 | [] | no_license | aloknag/flasky-api-test | fac57e1a1f811c1c468da6eec2ffc6d67ac2a589 | e1e8fc8f066c7ea8a04d4b9db5dd6a8474bd048a | refs/heads/master | 2021-01-01T20:53:26.641756 | 2020-02-09T17:01:56 | 2020-02-09T17:01:56 | 239,334,567 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,153 | py | test_get_user_information_api.py | from api_testing.api_framework.api_interface import ApiInterface
from api_testing.tests.conftest import read_config_file
import pytest
import unittest
import allure
class TestGetUserInfo(unittest.TestCase):
valid_credentials = None
base_url = None
token = None
api = None
@classmethod
def set... |
1b34ceb09de95b3c3b447e89de7d165702316213 | b42b8dfeef850d601b871a13fc6c16929677070c | /figures/plotgen/radial_distance_plot.py | e7bc5c7a21270120dd925c2203c8980546afadf2 | [] | no_license | JBorrow/lagrangian-transfer-paper | b21aa985e7fd206dadb508cd8a19d71e3fcf13c3 | ce30669939f10e2385b168a390877e170643b716 | refs/heads/master | 2020-03-25T17:48:50.796249 | 2019-12-03T16:40:05 | 2019-12-03T16:40:05 | 143,997,443 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,633 | py | radial_distance_plot.py | """
Uses data files:
+ radial_distance_analysis_gas.npy
+ radial_distance_analysis_star.npy
+ radial_distance_analysis_gas_stderr.npy
+ radial_distance_analysis_star_stderr.npy
+ radial_distance_analysis_radial_bins.npy
This script makes a plot that is the fraction of mass from given components
as... |
ab83f2e2273359dc1a392d43924c479f7eb413c0 | 5e8da53a5260ace0817a69a3f63ecc3c011075c5 | /src/string/valid_anagram.py | 99fece246f6b6ba32832f396a14aef905b3009e2 | [] | no_license | filozyu/leetcode-journey | f4aca641ac8e382ddf331b1da418448f16328fea | 9b4ee51c24a05f4995927274bcacfa501e2ed0b7 | refs/heads/master | 2022-12-02T11:11:21.252087 | 2020-08-05T23:19:27 | 2020-08-05T23:19:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 918 | py | valid_anagram.py | # dictionary
def isAnagram(s, t):
"""
Time: O(m) m, n = len(s), len(t)
Space: O(1) since ch_count is at most of size 26, when only considering the lower case letters
"""
if len(s) != len(t):
return False
ch_count = {}
# construct ch_count from s
for i in range(len(s)):
if... |
b6691477c445a6185da96de7c80dcf20809e84ee | 63362c2deea34a09fbe574fc94337318dae6c464 | /lab1/python/GUI.py | f913eaa34f7d048271f08b5d8a144cef44e915eb | [] | no_license | JIongbaiLiu/Senior_Design | d2c0e101cab04ad0a580a433ff21d05129b3cd8b | b1b0f4cc9b15090ea1b8f0bff558416403299e83 | refs/heads/master | 2020-04-20T08:03:56.809100 | 2019-05-03T17:03:32 | 2019-05-03T17:03:32 | 168,728,332 | 0 | 0 | null | 2019-05-02T15:32:21 | 2019-02-01T16:39:50 | C++ | UTF-8 | Python | false | false | 4,214 | py | GUI.py | from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
from tkinter.ttk import Frame
import tkinter
from SerialManagement import SerialManagement
# Sets up GUI.py
class Window:
max_temp = 0.0
sent_max_sms = False
need_to_reset_max_sms = False
min_temp = 0.0
sent_min_sms = False
need_... |
c57e83082e6598f2df53d43c7df62269743c2cb9 | 18f00dc116a1ac345c6fbf1cba3c28c0b163abeb | /Minecraft Python Scripts/Sphere Generator.py | a8856302bffdf249a094bf981ce23300cd354f21 | [] | no_license | MSpaceDev/RandomPythonProjects | 576bb16848ca25a1e34d025d918fe44786a23520 | dd912c8fd4ce2fa1038065e4e4cb393bd632678a | refs/heads/master | 2020-03-27T11:41:05.674911 | 2018-09-06T01:45:17 | 2018-09-06T01:45:17 | 146,501,921 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 519 | py | Sphere Generator.py | import math
radius = 500
block = "stained_glass 0"
replace = ""
selector = "@a"
coords = []
for phi in range (0, 314):
for theta in range (0, 628):
x = radius * math.sin(phi / 100) * math.cos(theta / 100)
y = radius * math.sin(phi / 100) * math.sin(theta / 100)
z = radius * math.cos(phi /... |
c2dc53572e144ad9e583cd87d771605f25906a51 | 4189c080680b64ce9f152a496cbfbb69c0e3f270 | /publish/merge_md.py | 515bfe3d62b1bb590c3cbe15b0c670cccd988abe | [
"Apache-2.0",
"CC-BY-3.0"
] | permissive | kevinleeex/notes-for-mlcc | 876c1437fc019b95b1300da274d3547e08768a3e | 05ff5f502a0aaccc171b8edf5bc463ed848326b0 | refs/heads/master | 2020-04-07T21:42:01.001923 | 2018-12-31T07:47:33 | 2018-12-31T07:47:33 | 158,737,780 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 969 | py | merge_md.py | #!/usr/bin/env python3
# author: Kevin T. Lee<hello@lidengju.com>
# description: merge the markdown files
import os
import glob
ignores = ['导航', '返回目录']
latex_head = """
---
title: "Notes for MLCC"
subtitle: "谷歌机器学习速成课程个人笔记"
author: [Kevin T. Lee]
date: "2018-11-23"
keywords: [MLCC, Notes]\n
logo: "./meta/tf.png"
log... |
20b0f17a581ee361ccf732942121518b65f22bca | dae875bc04bb02ab94a62dffd29530336b9231a0 | /Session-6/my_flask_app/welcome.py | 97da2ce2b677f2c85b7e7bfb9a5baac9f8e908ec | [] | no_license | DimitriBelikov/Swabhav_Technologies | ea75da6415d93068e04189a1337e8af61780c42f | d5c025162c6a4ffcc173eda14d1e599fda3d72cf | refs/heads/master | 2023-03-08T02:38:05.802491 | 2021-02-26T12:01:13 | 2021-02-26T12:01:13 | 336,963,506 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 222 | py | welcome.py | from flask import Flask
from datetime import datetime
app = Flask(__name__)
@app.route("/")
def welcome():
return f'Welcome to my Webapp {datetime.now()}'
@app.route('/', methods=['GET'])
def add_contact():
pass |
b9d15ec83985f1fb9b791cb35d20e258ef4f042c | fded98cb7634b2f3a57b63cd0fc5163a59522cef | /edge_detection/misc/convert_db_to_mp4.py | 533dcdecdeab36a6f254a4c7562df61405fae252 | [] | no_license | RachitKataria/av-query | 7c27ec139eda2ffd37307de8f3d9a9d68c1fe8ac | 5d7787b18a29be64339359c4db2b7eab7690fdc1 | refs/heads/master | 2020-09-22T05:17:26.420205 | 2019-12-11T20:30:35 | 2019-12-11T20:30:35 | 225,060,678 | 0 | 0 | null | 2019-12-09T22:02:05 | 2019-11-30T19:33:17 | Python | UTF-8 | Python | false | false | 878 | py | convert_db_to_mp4.py | import imageio
import ffmpeg
import json
import sys
import numpy as np
import os
def main():
# Load in cache/videos.npy
videos = np.load('../cache/videos.npy')
# Load in cache/video_to_index.json
with open('../cache/video_to_index.json') as file:
video_to_index = json.load(file)
for k, v... |
c9adef20a107f4c5dcc10e1929dd073566163cc2 | 5307e395b0c593102d934101f36f3422c5971af9 | /PythonUtilities/Export_Alarms/exportAlarm.py | df08ba89751f03fd0f9ce6c6fcbfce2f7a795981 | [
"Apache-2.0"
] | permissive | Guillem78/HPEIMCUtils | 01db4a46218ac27b41fac66d341c588d952295f6 | f67c2c641933f5b07fac2230d54942a224ebaf6a | refs/heads/master | 2020-05-04T17:01:42.802339 | 2018-09-19T19:37:54 | 2018-09-19T19:37:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,798 | py | exportAlarm.py | #!/usr/bin/env python3
# author: @netmanFabe
"""
Copyright 2016 Hewlett Packard Enterprise Development LP.
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/lic... |
5cd4daef6e5e26ee8f47c0f7e50d83d90abaf139 | 63efb13760eabfc09c288d29264adfff0da6622a | /LeetCode/57_insert_interval.py | 42ad4f132fd3d5404fa391cbfc68fe863454d287 | [] | no_license | KKosukeee/CodingQuestions | 59f0002ace13ebbe3a4a36976277bcb0d3766dbd | 01fe893ba2e37c9bda79e3081c556698f0b6d2f0 | refs/heads/master | 2020-05-16T04:22:31.578974 | 2020-03-30T00:27:51 | 2020-03-30T00:27:51 | 182,775,403 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,099 | py | 57_insert_interval.py | """
Solution for 57. Insert Interval
https://leetcode.com/problems/insert-interval/
"""
import bisect
class Solution:
"""
Runtime: 88 ms, faster than 91.51% of Python3 online submissions for Insert Interval.
Memory Usage: 17.2 MB, less than 8.00% of Python3 online submissions for Insert Interval.
"""
... |
2eab6bd657807270e667a06cd0629eb123c762ca | 9edaf93c833ba90ae9a903aa3c44c407a7e55198 | /travelport/models/profile_create_rsp_2.py | 24841558ecf4726cf16f1b60e8b0d67c550a7ece | [] | no_license | tefra/xsdata-samples | c50aab4828b8c7c4448dbdab9c67d1ebc519e292 | ef027fe02e6a075d8ed676c86a80e9647d944571 | refs/heads/main | 2023-08-14T10:31:12.152696 | 2023-07-25T18:01:22 | 2023-07-25T18:01:22 | 222,543,692 | 6 | 1 | null | 2023-06-25T07:21:04 | 2019-11-18T21:00:37 | Python | UTF-8 | Python | false | false | 659 | py | profile_create_rsp_2.py | from __future__ import annotations
from dataclasses import dataclass, field
from travelport.models.base_rsp_5 import BaseRsp5
from travelport.models.profile_2 import Profile2
__NAMESPACE__ = "http://www.travelport.com/schema/uprofile_v37_0"
@dataclass
class ProfileCreateRsp2(BaseRsp5):
"""
Response with the ... |
73de96ad686e385b6e8cb5e4387b7fab618efdb8 | 03dea4ff9e24a763912fc0214af8a7974476924d | /Class10/class10hw.py | 10888d863f3da55f8ecb69dcea74848c927e2370 | [] | no_license | jasonzheng412/Python | 900d251ae944153c09a63d3a31ac6afc18d52b05 | dddc60b7897a582e4c448bf1c5a6533ad5c908c6 | refs/heads/master | 2022-12-06T12:41:44.871475 | 2020-08-23T22:55:05 | 2020-08-23T22:55:05 | 273,794,459 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 949 | py | class10hw.py |
import os
from os import path
content = """
Joe Mama.
Bababooey.
"""
file_name = 'class10hw.txt'
with open(file_name , 'w') as f:
f.write(content)
f.write('Spider Cock!')
new_content = """
This is new content.
It will replace the old one.
"""
with open(file_name, 'w') as f:
f.write('Nani!')
with open... |
ea6e39506623ae95c7d268385118274001dbb7eb | a925ef09106b44d825d8967c9013fa54a49b0e98 | /retro/views.py | e66fcd2360ff1b4259139e1edc589236d6aa4cec | [
"MIT"
] | permissive | WSMathias/Retro360-API | 520e256d99a639afc661e7cfa0ddfb8ec21b83ec | 995470c0ac196520c42048be593100970f6eaf61 | refs/heads/master | 2021-01-25T09:44:59.659884 | 2018-03-23T10:16:43 | 2018-03-23T10:16:43 | 123,317,168 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,189 | py | views.py | from django.shortcuts import render
from django.views.generic import (
FormView,
TemplateView,
ListView,
DetailView,
CreateView,
UpdateView,
DeleteView)
from .forms import UserForm, RetroUserForm
from django.contrib.auth import authenti... |
996aea3dffdd3020bf4b787cc9d9fd2f003f1812 | bebcea35518aa5d92b0b4c1dbe7245f3d7fe64df | /read_skysports_fixtures_page.py | 6d1acffc8df92433c64acf459d0c9f5e69e16438 | [] | no_license | alyshan-j/email-footy-fixtures | 79f42a3b3112892303501ec28e072109e984fe96 | 9b61f5837424f67d8463caf17c5fe09529578a6e | refs/heads/master | 2020-04-03T00:51:15.152213 | 2019-08-13T16:59:14 | 2019-08-13T16:59:14 | 154,910,774 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,274 | py | read_skysports_fixtures_page.py | import sys
import re
import json
"""
Crawler to read fixtures from https://www.skysports.com/premier-league-fixtures
Usage: python3 read_skysports_fixtures_page.py <input> <output>
<input> html page dump of the skysports fixtures page
<output> output file for the json dump of the fixtures
"""
if len(sys.argv) < 3:
... |
36787fb0cbfb73ab5c07d670411f3c554a6e01c2 | 6c83737845eb49faec65b875312796d87acb04de | /feature_importance_plot.py | 4e8f2bdc661c18f06ef17a8219feda388b003836 | [] | no_license | kejarowe/enron_poi_classifier | 1bd33c4b12e134ee9d7974ca588aad72810e2b43 | 3b4cf82944af2598c1c6a4e2a638089f9d308bea | refs/heads/master | 2021-01-01T03:47:32.207646 | 2016-04-28T00:40:27 | 2016-04-28T00:40:27 | 56,947,363 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 837 | py | feature_importance_plot.py | import pickle
import matplotlib.pyplot as plt
import numpy as np
with open("my_feature_list.pkl","r") as feature_in:
feature_list = pickle.load(feature_in)
with open("trained_classifier.pkl","r") as trained_classifier_in:
clf = pickle.load(trained_classifier_in)
features = feature_list[1:]
importances = clf.f... |
5115d5d8bffd25403659d00586954ceb760d1d55 | 9c3b7147c45c3ace1f6cf5c9cfeb58f43b7ef2f8 | /analysis/candle_data.py | 185068c8d7af61ce4d581a5a06c234a02825288c | [
"MIT"
] | permissive | astraetech/Binance-Portfolio-Management | 5d2d79deb6c9b2f7cf883af01dfdbebb2fb7daee | 8ceb8eaa285852e837a5f1b39b45c81d85f588d4 | refs/heads/master | 2023-08-13T22:37:13.670151 | 2021-09-27T10:38:44 | 2021-09-27T10:38:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 755 | py | candle_data.py |
"""
Class to handle loading data from the sqlite3 database once ./get_trading_data.py has been run to aquire the candlestick data
Author: Alfred Holmes, https://github.com/alfredholmes
"""
import sqlite3, datetime
class Candles:
def __init__(self, database='data/candles_1h.db'):
self.conn = sqlite3.connect(datab... |
ec4ef52ec15de9e3d595531d84a1562c6273a3c3 | 6173148eef10650af8c428fba4922136d2e442c0 | /MiniPascal/mpaslex.py | d1d94f1f11e91ee97ba9f91ffcda85af8ae2ed9a | [] | no_license | joalcava/College-projects | 447d0f892146041565728b8bee45537a12df7005 | e10bf9df7b2811f991744b0599fea3b0293abf18 | refs/heads/master | 2021-01-17T18:44:26.685566 | 2016-06-19T15:38:19 | 2016-06-19T15:38:19 | 53,275,914 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,095 | py | mpaslex.py | import ply.lex as lex
# -----------------------------------------------------------------
# TOKENS
# -----------------------------------------------------------------
# Palabras reservadas
keywords = (
'FUN', 'BEGIN', 'WHILE', 'IF', 'THEN', 'END', 'PRINT', 'AND',
'WRITE', 'READ', 'RETURN', 'SKIP', 'BREAK', 'E... |
21efdc8b4a07bdda5282f526dfa254515fa562ee | f3e1423c27467e2501a5443a8767a40141752acc | /rx/core/operators/lastordefault.py | 884a28dbfceca49c1d8d476928140d2c74c817f5 | [
"MIT"
] | permissive | py-lab/RxPY | a08a16cbb381aed08485e0e2c36098884f3ba903 | ce12560f9481dbd0d072911e12ff2ed30be328bf | refs/heads/master | 2020-08-09T10:25:38.111773 | 2019-10-05T20:44:32 | 2019-10-05T20:44:32 | 214,068,251 | 0 | 1 | MIT | 2019-10-10T02:28:10 | 2019-10-10T02:28:09 | null | UTF-8 | Python | false | false | 1,782 | py | lastordefault.py | from typing import Callable, Any, Optional
from rx.core import Observable
from rx.core.typing import Predicate
from rx.internal.exceptions import SequenceContainsNoElementsError
from rx import operators as ops
def last_or_default_async(source: Observable,
has_default: bool = False,
... |
30879ad583556379063f3d3dc42f08fc8df67de0 | 7b5e508f4a341258d4eb439db3a04f0b78b8e7d5 | /Modules/dataCleaning.py | b1db0ca76d25a021ce284a6dd702bc19dc45bedc | [] | no_license | akshitsharma6178/machine-learning-big-database-analasis | 0d19c48cb44ca2ee5f5d7d5b466d45636fa41f40 | 8c18d539fafc7274eee4422ff7af2ec556a2ab90 | refs/heads/master | 2022-10-26T02:02:02.556224 | 2018-08-19T12:49:25 | 2018-08-19T12:49:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,067 | py | dataCleaning.py | #to remove ';', ',' and split it if a single colum has , seperate values
def clean_merge(row):
name = row['name'].replace(';',',').strip()
names = name.split(',')
names.append(row['coach'])
names = sorted(names)
return ' '.join(names)
def country_names(dataFrame):
code_name = {}
name_code... |
b3affc9e14ca783f25925b42eee1d535085b316e | 04dd152258ce50222141893acd10e496af2eaf69 | /tracker/forms.py | a4b2a6004ddae08bfb814d7d673ee8acf4eac5a9 | [] | no_license | sheergun-01/Price-Tracker-Application | f5026e9e22ada2b0ae6a7e6a4591e486c1a8164b | 37a4d5c6532f1ee19bab730871db6c1eab48097f | refs/heads/master | 2022-12-12T18:40:06.289649 | 2020-09-10T02:14:54 | 2020-09-10T02:14:54 | 294,273,714 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 174 | py | forms.py | from django import forms
class AddNewItemForm(forms.Form):
url = forms.CharField(max_length=600)
budget_price = forms.IntegerField()
# email = forms.EmailField() |
74a36f7658f5c4c92eb6fd8c491519394c01c2b3 | 91ce4969c2a7bb83df622c36e270d32c947465ab | /code/run_mydfnn.py | 000c5c7480e26dd92b0d74a00bcd25ab7060ac64 | [] | no_license | Ningshiqi/deepffm-for-multivalues | eac31d00b62c2870518b7a2ab292c5563cbc5bda | 4c59f1048e9e2956cb1cf182cbd4650fb3eb170e | refs/heads/master | 2020-06-10T19:42:35.434363 | 2018-06-13T03:26:48 | 2018-06-13T03:26:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,882 | py | run_mydfnn.py | import numpy as np
import pandas as pd
import gc
import torch
from myDeepFMM import DeepFM
import h5py
def load_category_index(file_path,field_size):
f = open(file_path,'r')
cate_dict = []
for i in range(field_size):
cate_dict.append({})
for line in f:
datas = line.strip().split(',')
... |
08ecac381d5c6242bcd9a9f619168af8be279648 | f1aefc43086b222ceb9f6f006f10e7480b52cd48 | /src/blockchain/TSanPoint/test.py | d3348d707ca835d35669a66bb67a9edd7d74f8d1 | [] | no_license | kookmin-sw/capstone-2020-6 | 1273a08718daa051f0802808c245349c24054454 | b1bd05fc55bdec9ff2012dff50a7fca8709fbbe4 | refs/heads/master | 2023-01-09T19:17:13.034354 | 2021-07-15T10:49:14 | 2021-07-15T10:49:14 | 246,232,100 | 6 | 2 | null | 2023-01-05T19:36:58 | 2020-03-10T07:13:07 | Python | UTF-8 | Python | false | false | 376 | py | test.py | import TSanPoint
#발행된 포인트 총량 확인
print(TSanPoint.totalSupply())
#남은 포인트 확인
print(TSanPoint.balanceOf('owner'))
print(TSanPoint.balanceOf('kookmin'))
##전송
TSanPoint.transferFrom('owner','kookmin',100)
##생성
TSanPoint.supply(1000)
##보상
d = {'kookmin':100, 'jihee':200, 'aaa':1000,'bbb':20000}
TSanPoint.transferReward(... |
5b2470443a99b7043e17a00b214b835f2572d7a9 | d2e76cf29eff1e3a09790828e2cb3070aef53e6d | /CareHub/Clinics/migrations/0017_auto_20190212_1352.py | ffd2cb8916d618dfb4aee18ade241b03fa74864e | [] | no_license | ganzourii/SE2018G10 | 2774e0dde00ba0d8ea990ac3db26fd8c0b744ca5 | 22d314494bca84550a4cbbdcc7dbf713491588ed | refs/heads/master | 2020-03-30T19:26:31.679332 | 2019-02-17T08:48:34 | 2019-02-17T08:48:34 | 151,542,753 | 0 | 7 | null | null | null | null | UTF-8 | Python | false | false | 729 | py | 0017_auto_20190212_1352.py | # Generated by Django 2.1.2 on 2019-02-12 11:52
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('Clinics', '0016_auto_20190212_1347'),
]
operations = [
migrations.AlterField(
model_name='reser... |
cd25524ebe27eadb1f5b730fb56d832d322c3452 | 3ac24492bdd6ecc1c4763b87983b2cf57bfcdfc4 | /mobile_server/app/device.py | 830fa3070fafa76f371009295bf5f6b453c5430b | [] | no_license | zytjm/tornado-mongo-based-webserver | 6c4a1b0ede0b41c725cc5a534b6911c7cf0cb3f0 | 763c893eb2d4dd697714fbd03cba2227fe55eb7f | refs/heads/master | 2020-05-17T02:42:33.842111 | 2013-04-25T08:10:38 | 2013-04-25T08:10:38 | 12,154,857 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,713 | py | device.py | # -*- coding: utf-8 -*-
from db import mongo
import tornado
import urllib
from bson import objectid
from lib.memsession import MemcacheStore
from lib.session import Session
import datetime
from libs import BaseHandler
import pymongo
from pymongo import Connection
class StartHandler(BaseHandler):
def get(self):
... |
7c86cb05282ae7311953360241448e8a2ab11954 | 6f8494d4d9f7585f93d14476abda16ba6ff8ae44 | /verbs/Utils.py | 2bed6cf7a5772c259843fdbe0aac7693099aaed8 | [
"MIT"
] | permissive | melling/Spanish_Verbs | 39c51a9bca6b8e80ac5fa00ae096db8ff71e0c3d | a7f662d7a9fad12f4462527bcef7f09cf4373cf0 | refs/heads/master | 2022-03-17T13:32:25.284955 | 2022-03-14T13:37:12 | 2022-03-14T13:37:12 | 171,981,871 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 354 | py | Utils.py |
# https://stackoverflow.com/questions/2556108/rreplace-how-to-replace-the-last-occurrence-of-an-expression-in-a-string
def rreplace(s, old, new, occurrence):
li = s.rsplit(old, occurrence)
return new.join(li)
if __name__ == "__main__":
print("Starting Utils...")
verb = "preferir"
v1 = rreplace(... |
537d43c1314098a7e29738e9b0b1e23ab7e6444f | 2c0ef5122a39d20eac652d9170932e94d0f3204e | /xgboost_demo/xgb_sklearn.py | b939004c235c55ebdbcc820f0762aef46c0acfcd | [] | no_license | lxgithub24/machine_learning | 618de03b3dd681c7eaa8d113d08b7a940cd43cdb | 9f65511f26bf8973b2534e195ea55f642da4b7b2 | refs/heads/master | 2022-03-24T14:27:30.055588 | 2019-11-24T04:06:38 | 2019-11-24T04:06:38 | 64,016,167 | 3 | 2 | null | 2019-11-03T07:27:59 | 2016-07-23T12:55:06 | Python | UTF-8 | Python | false | false | 1,832 | py | xgb_sklearn.py | # -*- coding: utf-8 -*-
# @Time : 2019/8/7 20:51
# @Author : RIO
# @desc: TODO:DESC
from . import X, X_train, X_test, y, y_train, y_test
from xgboost.sklearn import XGBClassifier
clf = XGBClassifier(
silent=0, # 设置成1则没有运行信息输出,最好是设置为0.是否在运行升级时打印消息。
# nthread=4,# cpu 线程数 默认最大
learning_rate=0.3, # 如同学习率... |
3cabfbac36ef5443376c40de59bc85acf8aa5ba3 | 18fcab7af89ca53f042e00d87b25d4581e16b437 | /p1804-2/5.py/学生班级.py | 49685f9c0124c5e31b446329d1310d27eb31e1e0 | [] | no_license | lishujing99/lishujingjing | c130cb43130d97bc0ea156789eac43ca28be933c | 3693ca02d44c5d5c8f7cb8cc16c8c2587df94420 | refs/heads/master | 2020-03-15T23:31:09.515776 | 2018-06-20T01:03:55 | 2018-06-20T01:03:55 | 132,395,540 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,434 | py | 学生班级.py | class Banjilei:
def __init__(self,banzhuren,banjihao):
self.banzhuren=banzhuren
self.banjihao=banjihao
self.studentlist=[]
def addinfo2(self):
self.studentlist.append(self.banzhuren)
self.studentlist.append(self.banjihao)
def __str__(self):
return '班主任是:%s 班级编... |
3a69650c2981cdc0020c9ef96a071cd22bfe2c6a | e95ec3c471351c4f9e15e42a77e33172c5a61c5a | /p10/02.py | bd087847f8ab23a24e9e024cc9672075d96c150a | [] | no_license | chinaliuyuhao/reply | 4f8e93c137b780764b4e0330635463ef8099de08 | 360dc45973c114cc8b568b37e6be1cfba65c5421 | refs/heads/master | 2020-07-06T03:46:22.112575 | 2019-08-17T13:03:04 | 2019-08-17T13:03:04 | 202,879,189 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 775 | py | 02.py | # -*- coding: utf-8 -*-
# @Time : 2019/8/16 0016 17:30
# @Author : Mat
# @Email : 15092306271@163.com
# @File : 02.py
# @Software: PyCharm
import json
with open('data.json','r',encoding='utf8')as f:
end = json.loads(f.read())
b={}
def func(src):
if isinstance(src,dict):
fo... |
833464a1d6bf60235ac39fbfc45cc03bf1792920 | 82175c00086af3cf479e603e273bd765d0275f4b | /01 OOP/class_employee.py | d61369ddd720ab83b0e6d1e7a691c5e8daaf3ab7 | [
"MIT"
] | permissive | davzoku/pyground | abfc61e4b969e911ad0100ee055d97fb0cdd0c1d | 983f3670915346a1a8c27fb563ac91bdb5b45cf9 | refs/heads/master | 2021-05-06T03:01:27.510874 | 2018-01-08T13:28:31 | 2018-01-08T13:28:31 | 114,764,804 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,292 | py | class_employee.py | # https://www.youtube.com/playlist?list=PL-osiE80TeTsqhIuOqKhwlXsIBIdSeYtc
# lesson 1 : Class and Instance
## lesson 2: Class Variables
### lesson 3: classmethods, staticmethods
#### lesson 4: Inheritance & subclasses
#####
###### lesson 6
import datetime
class Employee:
## create class variables
raise_percent... |
e877cbad8f61884b73b183eb00fd920a524e0e99 | d0d15f19bd1d7beed3346916d1ba85628caa17df | /lib/pinn.py | 17de05fc084cd1ca0addb88126a8c85982ed27b8 | [
"MIT"
] | permissive | bva99/PINN-KS | 0cffb4745bd16403df2ab13661c466b7a39c39e3 | da2de335c3d8740341e1caf9af21b904528fb3a9 | refs/heads/main | 2023-06-14T10:25:34.631450 | 2021-07-06T18:22:19 | 2021-07-06T18:22:19 | 383,469,812 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,487 | py | pinn.py | import tensorflow as tf
from .layer import GradientLayer
class PINN:
"""
Build a physics informed neural network (PINN) model for the Kuramoto-Sivashinsky equation.
Attributes:
network: keras network model with input (t, x) and output u(t, x).
grads: gradient layer.
"""
def __ini... |
2e333e4c48efa4f4f9914a49e193bc23a7de9c20 | 7e002be6a1ba145984fe3f827c7a4cda8a1f11eb | /PYTHON basic/단어변환.py | c23f05889c6455ea728b50b50ab91849f7a053f6 | [] | no_license | ok2qw66/TIL | ed17712de266291e93b37c5bc700b0fe222656c3 | f0e623f0ff231edec1088a96d87d26644c7cfb0b | refs/heads/master | 2023-06-22T20:23:21.311599 | 2021-07-22T07:08:24 | 2021-07-22T07:08:24 | 290,894,578 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,109 | py | 단어변환.py | def solution(begin, target, words):
# 애초에 답이 없는 경우
if target not in words:
return 0
# 다른 글자의 수 반환하는 함수
def find_diff(a,b):
count = 0
for idx in range(len(a)):
if a[idx] != b[idx]:
count += 1
return count
answer = 0
# 사용 확인
... |
e4ee8262ab72666e7ca2020d95019b3eb6fd31b5 | 61d4f5c9671bc8a05314c85128db65eed660f5b2 | /harrison/timer.py | 3a9c3bfbc8336ac626f1a5a88425f17a92063965 | [
"GPL-3.0-only",
"BSD-2-Clause"
] | permissive | paulmelnikow/harrison-fork | 549c326873aca6f14a4efce2956ba17529bceac8 | 2c6d388a547580650c10f6801650ff776cd215e1 | refs/heads/master | 2022-02-23T11:43:14.899256 | 2019-08-28T16:34:41 | 2019-08-28T16:39:01 | 108,194,739 | 0 | 0 | BSD-2-Clause | 2019-08-29T17:30:23 | 2017-10-24T23:24:48 | Python | UTF-8 | Python | false | false | 2,658 | py | timer.py | import datetime
class Timer(object):
"""Time a block of code.
"""
def __init__(self, desc='', verbose=True):
self.desc = desc
self.start_time = None
self.stop_time = None
self._verbose = verbose
@property
def description(self):
return self.desc
def star... |
a9639ba7566dfcbdafc05f7673659fb4f4e7b444 | a13b703cce02cdcb3ca7eaa9b95940b38fdb23f5 | /demo_5_2.py | 825b6c9dafd920c2fd5b74d3f8914ba6b193586c | [] | no_license | mirkcale/learn_py | a20154626fbff8655a9b3b9a87421d97c28c35d9 | 021669e22cc40deb5d69b5c50f61757db4aba8af | refs/heads/master | 2020-03-16T05:44:24.591688 | 2018-05-14T10:33:54 | 2018-05-14T10:33:54 | 132,539,261 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 415 | py | demo_5_2.py | #!/usr/bin/env python3
from Animal import Animal
class Student (Animal) :
def __init__ (self,name,score):
self.name = name
self.score = score
def get_grade(self):
if self.score >= 90:
return 'A'
elif self.score >= 60:
return 'B'
else:
... |
e75fb64b1430840fd7d9b32518582afeb6269a0b | 3ba314ca88e89dded85a3448e730e215c47f3ceb | /allSkyImagingModule/skyImaging/swhtImaging.py | 33cdb643de2fce1e56cc05e24a11c18cd61bd396 | [] | no_license | David-McKenna/allSkyImaging | 9f3dc5984541a6d39617dd5fd583654d0901d685 | e20a4bb48cca7814c32326177c121e149664764c | refs/heads/master | 2021-07-06T11:28:58.345222 | 2019-02-06T13:21:06 | 2019-02-06T13:21:06 | 166,459,844 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,267 | py | swhtImaging.py | """Generate full sky images with the SWHT methodology.
"""
import astropy.coordinates
import astropy.units as u
import numpy as np
import scipy.constants
import multiprocessing as mp
from healpy.sphtfunc import Alm as almMap
import healpy.newvisufunc
import matplotlib.pyplot as plt
from workers import swhtWorker
fro... |
79cbcf78f5c3b7553c17a1972f0d96d5112cf403 | b95150eb104c714cfbcafec593650d26d9b4fdbb | /bankapp/urls.py | a97e60a265d0b53cee4254989bf8ebca374a5878 | [] | no_license | samshultz/BankMgtApp | 927e5e62e7100985f37cbc91d97edc45fe97f054 | dfbc9f7f25117b35d15d80f12526bcd1c2579069 | refs/heads/master | 2022-12-11T11:28:49.957433 | 2020-08-30T00:23:10 | 2020-08-30T00:23:10 | 286,082,413 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 179 | py | urls.py | from django.urls import path
from .views import DashboardView
app_name = "bankapp"
urlpatterns = [
path("accounts/dashboard/", DashboardView.as_view(), name="dashboard"),
] |
2143c0c8c81c246d58f21d66c7789c8d4dc8c2fe | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02659/s931484870.py | 1916bb159b43b61baea9ba9592e17fa31c459649 | [] | 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 | 104 | py | s931484870.py | A, B = map(str, input().split())
A = int(A)
B = int(B[0]+B[2]+B[3])
x = A * B
x = x // 100
print(int(x)) |