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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7e62913db7e5d31c0b8e62e59fc93126abb0a4f5 | a92e0570adf2fa58114cc7b6731c4b1b99cf0627 | /tests/benchmark_compilation.py | a3607e3864d4ae15eac850a68000d68d5a49791e | [
"MIT"
] | permissive | ahartikainen/avroc | d2ba34ea8a902ae5315222b8638974e3e7eae4d8 | b64625ebcd51b10c788778ea146c0f6902187f4e | refs/heads/main | 2023-06-26T02:40:46.647696 | 2021-07-27T16:44:02 | 2021-07-27T16:44:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,830 | py | benchmark_compilation.py | import timeit
import io
import json
import sys
from fastavro import schemaless_reader, schemaless_writer
from avro.schema import parse
from avro.io import DatumReader, DatumWriter, BinaryDecoder, BinaryEncoder
from avroc.codegen.read import ReaderCompiler
from avroc.codegen.write import WriterCompiler
from tests.test_c... |
e39e17c26bdccc46c27fad21d8f67d77c71b7357 | 8655909600b85519b34b2d56bc498303b5f49e6d | /tests/unit/builtin_monitors/nginx_monitor_test.py | 95f90d54f8b7c78df4b1325b59701f322ef91c74 | [
"Apache-2.0"
] | permissive | scalyr/scalyr-agent-2 | 7ba794f7d1a7d80c07a3150c6d20a82b311ac9a2 | 5099a498edc47ab841965b483c2c32af49eb7dae | refs/heads/master | 2023-08-21T12:45:40.711445 | 2023-08-16T12:06:19 | 2023-08-16T12:06:19 | 23,852,161 | 75 | 76 | Apache-2.0 | 2023-09-11T20:44:43 | 2014-09-09T22:18:19 | Python | UTF-8 | Python | false | false | 3,932 | py | nginx_monitor_test.py | # Copyright 2014-2020 Scalyr Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... |
9ad07a5d212c417d1c73c93ed340284321da9a57 | ccabf93f27ba8283e0db08512bbe9593efbaa015 | /web/middleware/common.py | f1029d1896197866d891b95c579a3aa5cbb68e28 | [] | no_license | uktrade/icms | 562b5956af863da1de581593157e72d989241aae | 525361b4856004cf34397d6c86fe5d6b6ebd3a89 | refs/heads/main | 2023-09-01T15:39:43.246325 | 2023-09-01T10:13:06 | 2023-09-01T12:30:39 | 178,028,237 | 7 | 6 | null | 2023-09-14T13:11:23 | 2019-03-27T15:56:34 | Python | UTF-8 | Python | false | false | 1,062 | py | common.py | from web.utils.lock_manager import LockManager
class ICMSMiddleware:
"""Adds request.icms which is ICMSMiddlewareContext."""
def __init__(self, get_response):
self.get_response = get_response
def __call__(self, request):
request.icms = ICMSMiddlewareContext()
response = self.get... |
1abff9e65d0ba9aedd98edaca2ae88170629e3d4 | 8a1331827e1b8cc2e31b5a01e0dacd6f00a85fc4 | /website/forms.py | eca0fa47cae61bc45248e143064ebf312b836af0 | [] | no_license | firdavsDev/Django_register_login | 8b050640a27850789a51de7f6f33d9ca7f82e867 | 1d658a0671d582d2f0d19652046c01ddfc50b38f | refs/heads/master | 2023-08-21T20:11:00.526136 | 2021-09-23T09:48:01 | 2021-09-23T09:48:01 | 409,530,714 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 221 | py | forms.py | from django import forms
from django.db.models import fields
from .models import Member
class MemberForm(forms.ModelForm):
class Meta:
model = Member
fields = ['fname','lname','email','passwd','age'] |
65bac3fbfd5ec811af4bdf80721ea9bec0fafdcc | fdcaac9be6578aea2b081e1e74ca3bbe6989d7d7 | /computer_main.py | 4eead306256aa75fe44181d44f36214da4ecaa5f | [] | no_license | Tim881123/uj | b4ef7d5fd3be3faae6b60668ffc6b7e3f118db18 | 957f270d19684da323e7e19b1234ace5f5a586ea | refs/heads/main | 2023-07-14T19:20:03.363563 | 2021-09-01T06:32:38 | 2021-09-01T06:32:38 | 401,955,681 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,156 | py | computer_main.py | import sys
from computer_ui import Ui_MainWindow
from PyQt5 import QtWidgets
class Digcalculator(QtWidgets.QMainWindow, Ui_MainWindow):
lcdstring = ''
operation = ''
currentNum = 0
previousNum = 0
result = 0
def __init__(self, parent=None):
super(Digcalculator, self).__init__()
... |
623918870d8ce2a30d47c4b24556b52ccbe91486 | 595ffb7ca2a243a0cd96a499d235116812b89a3e | /q07_get_run_counts_by_match/build.py | 8d1d4bbd65bfd18b73790086fe475b26c29ad440 | [] | no_license | Hegde51/pandas_project | e37975275ba3f3c27cfca9857ef9c1744c72c978 | 2432d47873f401b3953231844e2ecc2f75da1010 | refs/heads/master | 2020-03-22T21:58:18.793561 | 2018-07-12T16:37:58 | 2018-07-12T16:37:58 | 140,725,210 | 0 | 0 | null | 2018-07-12T14:34:41 | 2018-07-12T14:34:41 | null | UTF-8 | Python | false | false | 584 | py | build.py | # %load q07_get_run_counts_by_match/build.py
# Default Imports
from greyatomlib.pandas_project.q01_read_csv_data_to_df.build import read_csv_data_to_df
import pandas as pd
# You have been give the dataset already in 'ipl_df'.
ipl_df = read_csv_data_to_df('./data/ipl_dataset.csv')
# Solution
def get_runs_counts_by_matc... |
f1799c08144aab0cd6bffa51cbb32bd138009519 | 92f4d954db8954298685add322e547d7fd4d25d6 | /synkrima.py | 80ac8dd1ba37bc698e8b122d1b6f8fa5fe51382e | [] | no_license | gibranhackjust/rima | 6b304affe12ee3329ac03a62ea0ba273521719b4 | cf8ed68ff231acd10f99456b5c85996260729275 | refs/heads/main | 2023-03-03T08:11:05.297746 | 2021-01-28T08:43:29 | 2021-01-28T08:43:29 | 333,697,573 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,865 | py | synkrima.py | clear
blue='\033[34;1m'
green='\033[32;1m'
purple='\033[35;1m'
cyan='\033[36;1m'
red='\033[31;1m'
white='\033[37;1m'
yellow='\033[33;1m'
sleep 3
echo
echo $green"No Wa : 085238506497"
echo $green"Email : gibranfancy@gmail.com"
echo $green"admin : gibran"
echo $green"autor : M SYAESAR GIBRAN"
echo
echo $cyan"PILIH MENU ... |
d1821f9071ff85cd3678fe2d9bc7694e591c8428 | 7b1bb87ceb5696b5b22b5a902673695e8c21850d | /arkane/main.py | 0bd01c2c12222f4d43664277813ff7c856fb6683 | [
"MIT"
] | permissive | Tingchenlee/RMG-Py | 543b3f3a28973fcc7e1e5d0f753910264fa6fd02 | c18ea8090d995e58e2428bfa87cd9036733a5fc0 | refs/heads/master | 2023-03-05T15:23:01.338692 | 2020-08-20T23:40:15 | 2020-08-20T23:40:15 | 289,320,277 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 21,690 | py | main.py | #!/usr/bin/env python3
###############################################################################
# #
# RMG - Reaction Mechanism Generator #
# ... |
b4ad9a11247ce96f0337b068d73f85f0bb010974 | 6a8b63eff9d006a5a92a3d71f93757d685642fdc | /config.py | 3739a5bf36ca55200880e4ddeb0c299badf700c8 | [] | no_license | panza238/flask | 68637d1ad3890f08639f572d7169de021a501909 | 70e529ede3a286023afc6bd35406fe3487b97ddf | refs/heads/main | 2023-05-01T10:17:41.350952 | 2021-05-31T05:03:05 | 2021-05-31T05:03:05 | 369,916,417 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,523 | py | config.py | # este file va a tener todas las configuraciones que antes guardaba como dict en app.config[config_name]
# Todas estas configuraciones las voy a crear como clases.
# Cada aspecto que quiera configurar, va a tener su propia clase.
import os
basedir = os.path.abspath(os.path.dirname(__file__)) # Esto me devuelve el path... |
4ff36edd3ed027ed1e5945ac7c2af25ec0ba8f89 | c11cafc6bfca2d72866a01127f56e416d4845d20 | /TAProject/accountTester.py | a93f13d828e019666cf380e67501a5dbb1c6effa | [] | no_license | chris724uwm/TAProjectDjango | 217e013d4c1bf67709e053007b9889a2a470c39b | 210b1edd9b4a1d316f59c353a6b1caf4e0960acf | refs/heads/master | 2020-04-06T20:07:04.625072 | 2018-12-15T22:16:24 | 2018-12-15T22:16:24 | 157,761,557 | 0 | 1 | null | 2018-11-27T05:56:31 | 2018-11-15T19:27:08 | Python | UTF-8 | Python | false | false | 4,189 | py | accountTester.py | from TAProject.account import Account
import unittest
user = Account('Snowman', '20181225', 'SnowJackal', 'backyard',
'merryXmas@winter.com', 414000111, 3) # does flag number matters here?
class TestAccountMethods(unittest.TestCase):
def setUp(self):
self.superAccount = Account('SuperUs... |
44b1c3729c89f12dbe36491ce543f8ab5dfec0b2 | 77164adfb117c2368c2eaa151afc170c45e92e4f | /articles/views.py | 355ffff2921f6ccf746962a9cca4e92b1dc9f449 | [] | no_license | AJAYKR00KJ/Django-Basics | 5ffbe516b8912f6a4418bca17c23e7890f6563f4 | 6e10ba26ecbf369ccfc9577da0b0d42d029501c5 | refs/heads/master | 2020-12-21T03:54:26.314882 | 2020-01-26T10:41:15 | 2020-01-26T10:41:15 | 236,297,493 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 769 | py | views.py | # from django.shortcuts import render
#
# # Create your views here.
# def article_list(request):
# return (request,'articles/article_list.html')
from django.shortcuts import render
from .models import Articles
from django.http import HttpResponse
from django.contrib.auth.decorators import login_required
def artic... |
f771fb5239bff1c525e4ed2fc5a5f9e72eb21295 | 5326f4145414e096f6f145a71f6c7e1669230e71 | /challenges/c26_MonthsToPayOffACreditCard/main.py | abf06e32a88d9c24e9250edc9c0f16413a57a33c | [] | no_license | andrew-rietz/FiftySeven_Coding_Challenges | a670bd6b1dcf6f99775c2100d297e01a26555af9 | 218894fbad8ac3389003ce7321fd4c4020239fd6 | refs/heads/master | 2022-10-17T15:41:01.705609 | 2019-10-03T05:27:45 | 2019-10-03T05:27:45 | 181,096,850 | 0 | 0 | null | 2022-09-16T18:10:31 | 2019-04-12T23:33:52 | Python | UTF-8 | Python | false | false | 98 | py | main.py | from months_to_pay_credit_card import months_to_pay_credit_card
months_to_pay_credit_card.main()
|
7d5aa9876e5886b9fedc724df4d0318bd9ce4229 | ca17b43f368ee7cda5bb1be6dd30f6be3818d310 | /web_scraper.py | d6d82e6c78ef94c5f859816881726b38b21efa90 | [] | no_license | Mahmoud-alzoubi95/Web_Scraping | a928885e91cb0c7b6bf30f6ff31430bcca834b10 | cfa4f4b50718afd8a01b3ce5d2b3aaf8cdc61016 | refs/heads/main | 2023-05-28T15:29:06.563503 | 2021-06-01T06:38:08 | 2021-06-01T06:38:08 | 372,500,493 | 0 | 0 | null | 2021-06-01T06:38:08 | 2021-05-31T12:33:47 | Jupyter Notebook | UTF-8 | Python | false | false | 1,060 | py | web_scraper.py | from bs4 import BeautifulSoup
import requests
def get_citations_needed_count(URL):
page = requests.get(URL)
soup = BeautifulSoup(page.content, 'html.parser')
soup = soup.findAll(text='citation needed')
return len(soup)
def get_citations_needed_report(URL):
page = requests.get(URL)
soup... |
4f6eb2fd4ec01b4719a4e81bd67d2e106e0c2bb3 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p02744/s002178141.py | c8e3f760cffcbc2d965baa220bc004c69d3f0ffc | [] | 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 | 243 | py | s002178141.py | from collections import *
def dfs(l):
if len(l)==N:
print(''.join(l))
return
for a in range(ord('a'), ord(max(l))+2):
l.append(chr(a))
dfs(l)
l.pop()
N = int(input())
dfs(deque(['a'])) |
be9822862119800097a162d241bf89abbfddb208 | 4d45c45155858d3e16d01a4548c8b302b07557a2 | /test_punto.py | 03319542d768aef968dd58323f79c8d1ab8ebcf4 | [] | no_license | ric-lopez/triangulacion | 2bb624291fccc65d815857cb8d8827c3f1546a4b | 8b11ff7bee7d2e318edfdadcc7c89e353fd21ba9 | refs/heads/master | 2021-01-20T08:01:21.887065 | 2017-05-19T14:21:34 | 2017-05-19T14:21:34 | 90,085,417 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 144 | py | test_punto.py | from util_geometry.punto import Punto
import math
p0 = Punto(0,0)
p1 = Punto(-10, 0.1)
p2 = Punto(10,0)
print(math.degrees(p0.angulo(p1, p2))) |
b03fe10650b07d9e08f359e955542455b8c71beb | 32025b6d3bbe76fa52e6018979d4b301a07d8dcb | /test.py | 99bc91d06d5a92f105635b496824f62bf60056d3 | [] | no_license | hqu-little-boy/zhihu2epub | d1a5ca2feeebdee1eda321d9e8b0e8523d34b53e | 1dcad2e0a58dd076e8142ef9fd66e3e50bee707e | refs/heads/master | 2023-07-18T12:40:36.589717 | 2021-09-07T06:20:00 | 2021-09-07T06:20:00 | 403,859,643 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,733 | py | test.py | import os
import time
from io import BytesIO
from mkepub import Book
import requests
import zhihu_oauth
# import zhihu_oauth.zhcls.people
from PIL import Image
from bs4 import BeautifulSoup
from icecream import ic
#########################################
from PIL import ImageFile
from PIL import UnidentifiedImageErro... |
8ded847f66e82c905f37bc7d0bfca6689da98304 | d859dace0463423496a6a1762d015292eb8b5704 | /ProblemSet1/PS1 Problem 3.py | 740f213e849898d6e54607e7d9e2613f1073c6dd | [] | no_license | sarski/6.00.1x | 67dcce8655d4167bb5be723bba56520bb930c40b | 5d91d034d2c6b546c0c13ca162b36055f82d5191 | refs/heads/master | 2021-01-10T04:05:34.493888 | 2015-11-05T21:29:16 | 2015-11-05T21:29:16 | 45,640,494 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 496 | py | PS1 Problem 3.py | letter_order = 'abcdefghijklmnopqrstuvwxyz'
substr = ''
ans = ''
max_count = 0
length = 0
idx = 0
for letter in s:
letter_idx = letter_order.index(letter)
if letter_idx >= idx:
substr += letter
length += 1
else:
if length > max_count:
max_count = length
ans = ... |
f09f2cd6c87a6e9102f709df4d4399faed1ff906 | c805dad5632f0d993c1eeeae9096c1efa27c57a1 | /cqen/tasks.py | 7e2b9da0745664e409f765ded55a29c74ff45889 | [] | no_license | yangyang198599/CQMB_Project | ad7afed26d3c4182868cf37eb1d8b3628f2acf7d | 230b18e6b792b2b9bd7785fc7313f5752900fd54 | refs/heads/master | 2022-08-14T13:44:19.537549 | 2019-07-07T08:09:05 | 2019-07-07T08:09:05 | 150,823,961 | 0 | 0 | null | 2021-06-10T20:50:12 | 2018-09-29T04:17:45 | Python | UTF-8 | Python | false | false | 2,122 | py | tasks.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from celery import shared_task
import datetime
import paramiko, time
import getpass, os
import telnetlib
from cqen.models import Nethost, Tasks, Floder
nowTime = datetime.datetime.today().strftime("%Y%m%d")
@shared_task()
def start_ssh_... |
c33f423603c0dd53deebaed3a4ba7025f922f237 | e592439e432acce6ab8fff6d15a3df8a228bfa65 | /tests/test_sync_websockets.py | 5302efffbab688baf51bbb79c8dab09bc8ea48b4 | [
"MIT"
] | permissive | zworkb/python-sync-db | 0112d3c64dfd1da1312e9a88c087a76cb873c350 | c05bf0110457aa4eaf949b8d2d7ada9e17e3e9ce | refs/heads/master | 2021-12-27T08:39:36.106265 | 2021-11-04T10:11:02 | 2021-11-04T10:11:02 | 226,151,354 | 0 | 0 | MIT | 2019-12-05T17:08:55 | 2019-12-05T17:08:54 | null | UTF-8 | Python | false | false | 16,513 | py | test_sync_websockets.py | import asyncio
import datetime
import logging
import json
import multiprocessing
import os
import time
import pytest
import sqlalchemy
import websockets
from sqlalchemy import and_
from dbsync import models, core, wscommon
from dbsync.client import PushRejected, PullSuggested
from dbsync.client.wsclient import SyncCl... |
4e2b7ebe44a9a11d673f32e3abd38fb2c771958f | 1bba1b71b9ce9ac6e983ab7f70d9daf82e52b23f | /contigs_filtering.py | 810523312070de18d4fbbf08b999c680ad8215f9 | [] | no_license | rodrigobacigalupe/metagenome_assembly | dd2e658d2c16e542b656d36e11773294c423b8b3 | ef38ab9822d3fd013e8ad0ca2b8259bbbd6f877a | refs/heads/master | 2021-05-27T10:19:42.928005 | 2013-08-14T11:45:54 | 2013-08-14T11:45:54 | 12,080,822 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,361 | py | contigs_filtering.py | # contigs_filtering.py
#---
# Written by Rodrigo Bacigalupe. MSc in Bioinformatics student.
# University of Edinburgh.
#---
# Filter contigs shorter than 300 bp for prediction of genes using Glimmer MG.
#-------------------------------------------------------------------------------------------------
# Modules to use ... |
8dfef0a4525328be8dfb4723f0a168dc22eb5eb2 | 471c6ad1386b7f4ec474d701d39420a1df06167c | /cogs/processDisplay.py | e114973ffc09b35c56e8363cedb136625ad45c38 | [] | no_license | JayDwee/CyclopsBot | 9b30472f268601abc237ce25d2f1ee1181797643 | 6143c60f97a984132870f4c40b74782e0c4b4c9d | refs/heads/master | 2021-06-19T02:19:43.586983 | 2021-03-24T18:20:47 | 2021-03-24T18:20:47 | 192,812,082 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,716 | py | processDisplay.py | #!/usr/bin/env python
"""
This is a Cog used to display processes/ programs running on the client to a discord text channel
Commented using reStructuredText (reST)
ToDo
create and use a database for multiple servers
"""
# Futures
# Built-in/Generic Imports
import os
import sys
import configparser
import shutil
... |
9c09309d23510aee4409a6d9021c2991afd2d349 | ef2365bf2231e200a9994b20b1718429bfa64e8e | /Utilities/Rumors/Source/Wizards/1. Extraction/titleStrip.py | e62c07f0a0893d2683d4c8470f70032ede37a9c9 | [] | no_license | RiasKlein/DnDGenerator | c8ae8db922eb6a568ac45fdd778d20f5f11026a7 | 3cc9424ad86de71bd41d5a0a10d81b27859f0ddb | refs/heads/master | 2020-04-10T10:08:41.352763 | 2016-07-30T12:48:47 | 2016-07-30T12:48:47 | 61,524,096 | 1 | 1 | null | 2016-07-20T15:18:15 | 2016-06-20T07:02:40 | Python | UTF-8 | Python | false | false | 2,061 | py | titleStrip.py | ################################################################################
#
# titleStrip.py
#
# Generates an output file with the titles of the input stripped
# Usage:
# python titleStrip.py [input filename] [output filename]
#
################################################################################
im... |
8f3abc5beaded94b6d7b93ac2cfcd12145d75fe8 | 8459bc0499cd4034bc371764cc9a7ff1483cc723 | /pythonic_thinking_notes/class2.py | ef59fcbffba8938c144bf1e2314bfb56562c4a73 | [] | no_license | kennyhe/elk_notes | 3df7485e7b836aa625d4c141e040810e80b3affa | b2a10d4ac8ef07269f545b32124ca20962431fe2 | refs/heads/master | 2023-07-07T09:44:47.117495 | 2021-08-16T15:34:26 | 2021-08-16T15:34:26 | 299,139,446 | 0 | 0 | null | 2021-08-15T22:29:40 | 2020-09-27T23:38:41 | Jupyter Notebook | UTF-8 | Python | false | false | 747 | py | class2.py | class Meta(type):
def __new__(meta, name, bases, class_dict):
print(f'* Running {meta}.__new__ for {name}')
print("Bases:", bases)
print(class_dict)
return type.__new__(meta, name, bases, class_dict)
class MyClass(metaclass=Meta):
stuff = 123
def foo(self):
pass
cl... |
6801d68ebcc6ff52d9be92efeeb8727997a14bbd | 142da5dac7715414517f37ad2fce1731f8a28dcb | /json/asav_config_retreival.py | 1cb8235e9cd0d2581bc28d7fa135a2929c21bbf0 | [] | no_license | t6fore/network-automation | fcd0b015922b654c69e38184383bae7bec42011c | a5124053b86334f714f2372ab44e214e81d78ce4 | refs/heads/master | 2022-12-10T18:08:36.482371 | 2022-12-04T14:37:40 | 2022-12-04T14:37:40 | 229,970,915 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 610 | py | asav_config_retreival.py | #!/usr/bin/env python
import json
import requests
from requests.auth import HTTPBasicAuth
if __name__ == "__main__":
auth = HTTPBasicAuth('cisco', 'cisco')
headers = {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
url = "https://asav/api/interfaces/physical/Gigab... |
6e3bb17696953256af6d8194128427acebf1daac | f8e3a602a6948595b58c0f228f6ecf1fc037032c | /module/generator.py | f4109702b08712b14bc257be8848fde88c329eea | [
"MIT"
] | permissive | fsj2001/ArithmeticProblemGenerator | 89d251e1ed32881c34ea23c19eb407560c56d75b | cb456c02235a0b417ee23d2ce15be44190dcb879 | refs/heads/master | 2022-12-22T08:21:38.270064 | 2020-09-30T03:14:24 | 2020-09-30T03:14:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,692 | py | generator.py | from random import randint, shuffle
class Generator:
opset = ['+', '-', '*', '/', '²', '√', 'sin', 'cos', 'tan']
@staticmethod
def generate(level):
"""
根据 level 生成指定等级的算术题
0:小学;1:初中;2:高中
"""
"""
生成操作数序列以及二元运算符序列
"""
length = randint(0 if le... |
297b2ff6c6022bd8aac09c25537a132f67e05174 | d3c9a3a22b9f80c8669994bcf6bef634c152cf75 | /utilities/terrain_generator/python_backup/get_cellmap.py | 1194ad4a131e66b799d570f79043001e6bf99c13 | [] | no_license | TApicella/castle-game | 556909c56b7f9ff80c9d23b3ad9e6a6c197c0f3d | 4c32c85df9a4c02381f8941e7f29920494597453 | refs/heads/master | 2021-05-16T05:55:22.166872 | 2017-09-26T03:46:25 | 2017-09-26T03:46:25 | 39,638,648 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 573 | py | get_cellmap.py | from PIL import Image
source = Image.open("map4.png")
img = source.load()
map_data = {}
curr_x = 1
curr_y = 1
#Go over each chunk and get the pixel info
for x in range(0, 100, 10):
curr_x = x+1
for y in range(0, 100, 10):
curr_y = y+1
chunk = str(curr_x)+"X"+str(curr_y)
if chunk not in map_data:
map_data[... |
83117000f5f34490cb14580a9867b1e871ccc2ae | cee4f816f51031c55ef7bc00cc1d35f370a77ffb | /teraserver/python/services/BureauActif/libbureauactif/db/models/BureauActifCalendarDataType.py | 2abf4e1b76854ba6b1f2affa776542388c010998 | [
"Apache-2.0",
"MIT",
"PostgreSQL",
"LicenseRef-scancode-other-permissive",
"Python-2.0",
"BSD-3-Clause"
] | permissive | uceflg/opentera | 10281b7d5c393bc0ea60314d871a0c0acce5bee8 | bfc4de672c9de40b7c9a659be2138731e7ee4e94 | refs/heads/main | 2023-08-19T07:39:39.758118 | 2021-09-22T12:16:43 | 2021-09-22T12:16:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,089 | py | BureauActifCalendarDataType.py | from services.BureauActif.libbureauactif.db.Base import db, BaseModel
class BureauActifCalendarDataType(db.Model, BaseModel):
__tablename__ = "ba_calendar_data_type"
id_calendar_data_type = db.Column(db.Integer, db.Sequence('id_calendar_data_type_sequence'), primary_key=True,
... |
639669174435492f43bf51680c2724863017e9d2 | 380ca82cd0196fdd32eba2bbe7b608c879d26293 | /source/freesprints/plugins.py | 7f99c62a5e26d5980b4c4c4c46a457e1e9e08064 | [
"MIT"
] | permissive | niklasberglund/freesprints | 59c2e899c351180d2f6864894dc20dd5086c99a6 | 358212d54d70768b99284a566141661bf1c42c0c | refs/heads/master | 2021-01-22T14:38:43.279043 | 2015-04-05T09:07:06 | 2015-04-05T09:07:06 | 23,545,298 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,160 | py | plugins.py | import helpers
import os
import os.path
import json
import imp
import source.freesprints
from pygame.locals import *
class PluginLoader:
available_plugins = None
def __init__(self):
self.checkAvailablePlugins()
def checkAvailablePlugins(self):
print helpers.pluginsPath()
... |
4462fec6e0edc25530c93ffeeae2372c86fef2cc | 70f1b2ee17fff64b8618fee30cee9c155ce0a751 | /rotate.py | 6f13f5437a9ec46ac6841cedac576c9bccc736b9 | [
"MIT"
] | permissive | RachyJ/python-opencv | c3bdff1f0a92dd26408036441a85f1334bbc102e | c4b18a8131e9f2bb102aca32928e662551cbba3e | refs/heads/master | 2021-02-05T03:08:48.189365 | 2020-03-08T10:21:35 | 2020-03-08T10:21:35 | 243,737,947 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 700 | py | rotate.py | import numpy as np
import imutils
import cv2
image = cv2.imread("D:\\Github\\python-opencv\\images\\trex.png")
cv2.imshow("Original", image)
cv2.waitKey(0)
(h, w) = image.shape[:2] # get height and width of the image
center = (w/2, h/2) # which point to rotate around
M = cv2.getRotationMatrix2D(center, 45, 1.0) # ro... |
934921b22d036bd611134ce74f6eba3a2710018e | 9d54ae0b93cbd25cc17f30a2d0acbc299e57725c | /camera examples/camera.py | 3a7299f013444d0b534a9b9ec15d49a6d40ada32 | [] | no_license | Esrakaraks/image-Processing-OpenCv | 7e3770baf2f0b146bb23beee868193cbd511f7ec | b102d5b11e49a9ee4fb81112b7f94eae1cf20868 | refs/heads/master | 2020-05-01T02:29:45.532378 | 2019-03-24T10:49:08 | 2019-03-24T10:49:08 | 177,219,936 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 312 | py | camera.py | import cv2
import numpy as np
result=cv2.VideoCapture(0)
while True:
ret,square=result.read()
area=square[100:200,100:200]
cv2.imshow("video",square)
cv2.imshow("video2",area)
print(square)
if cv2.waitKey(25) & 0xff == ord('q'):
break
result.release()
cv2.destroyAllWindows()
|
9a8c48f3d8873ddbb1c9d73be1e7468ffbfe5328 | 54683833d6b34bda00efd7f54d40653862e7d967 | /Memory.py | 12c63f009c175e12f8f592a9653a978844066a4e | [] | no_license | jmadrek/Python_IIPP | b07f3b9c75f9ea87e1e08deda8122261db952911 | 64ca6ac2ffd1acf2a4bebc7fe98224d211325b91 | refs/heads/master | 2020-05-17T08:08:07.262815 | 2015-02-16T06:02:42 | 2015-02-16T06:02:42 | 30,783,699 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,866 | py | Memory.py | # implementation of card game - Memory
#Participant clicks on two cards. If paired keeps them exposed
#If not then flips them over.
#ignore clicks on cards already exposed.
######################################
#Imports
import simplegui
import random
######################################
#Globals
#CONST
NUMBER_CARDS... |
d8e86e2e2bddb4a321ca2f74ecc563178a06dc0a | 1384fe518e1629f5db8260f6321418342ab65d9c | /setup.py | fe0837628db0b7606560b201b96c5a2ef9e234bc | [
"MIT"
] | permissive | linuxsoftware/ls.sampleproject | 439593493b4e75de30f94f153aad71d5aef22f7e | c39b38d998b9333ec70c3342e8ec168f5e9f4d04 | refs/heads/master | 2021-10-11T10:16:28.618730 | 2019-01-24T17:31:46 | 2019-01-24T17:31:46 | 126,095,595 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,381 | py | setup.py | # ----------------------
# ls.sampleproject
# ----------------------
import os
import io
from pathlib import Path
from setuptools import setup, find_packages
# allow setup.py to be run from any path
here = Path(__file__).resolve().parent
os.chdir(str(here))
with io.open("README.rst", encoding="utf-8") as readme:
... |
7a4f15eba20980d7a03afda1678b5eb418c70e55 | 04fa163b27fcd14618bb4619aba67b14a09a1714 | /scripts/container.py | 0b31064ebfc54f9f78c6c6c2ecf11f69515a1089 | [] | no_license | ankitjoshinitjsr/SummerInternship2017 | 72c5aaaf99d7ce3ed17a3569b64582f5855bff6a | 397fe302fae82ea52716d8e22203dfe40ec40fe6 | refs/heads/master | 2020-04-04T10:08:45.963158 | 2018-11-05T18:19:14 | 2018-11-05T18:19:14 | 155,844,030 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,246 | py | container.py | #!/usr/bin/python2
import cgi
import commands
print "content-type: text/html"
Os=cgi.FormContent()['image'][0]
Cname=cgi.FormContent()['cname'][0]
print "set-cookie: Container_Name={0}".format(Cname)
print
print Os,Cname
print """
<center>
<h1>CloudHat Web Services</h1>
<br/>
<hr/>
<h2>... |
07b9f7e9f11fa343714d7d614e64b5f40686d2d6 | 56bfc8db06815ce805a08a7c812e9de60822a457 | /get_limits.py | 32da75dbf6e7aaeaef05a1ad975e82341088c89e | [
"MIT"
] | permissive | nchaparr/Sam_Output_Anls | d66f3b616c4f575e88838c1736fb0ba8288f0401 | c6736f7863b36d09738ac95b7cbde19ba69526cf | refs/heads/master | 2020-04-03T20:15:01.501350 | 2016-09-21T20:40:33 | 2016-09-21T20:40:33 | 16,630,035 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,752 | py | get_limits.py | import numpy as np
from scipy.interpolate import interp1d
import matplotlib
import matplotlib.pyplot as plt
from Make_Timelist import *
#import sys
#sys.path.insert(0, '/tera/phil/nchaparr/python')
import nchap_fun as nc
from nchap_class import *
from matplotlib import rcParams
rcParams.update({'font.size': 10})
"""... |
08a7e549741299ffe99d7b3694cd28c49b9db3ae | 7aebeeb5055ab9185e63e74adf640bf36dcc20ec | /Blog/Controllers.py | 3c33b518a0767a226c33d0563f879b1dfcd94426 | [] | no_license | Halicea/HalRepository | 52eb6e6bb9899b0fad70efbc9a829d2c08f69eb6 | 1b493dd0637b7bf68780d30d59e0ede0211ef85a | refs/heads/master | 2021-01-21T23:14:24.309310 | 2011-11-24T02:07:06 | 2011-11-24T02:07:06 | 2,336,075 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,181 | py | Controllers.py | '''
Created on Aug 9, 2009
@author: Kosta Mihajlov
'''
########
import Models.BlogModels as bm
from google.appengine.api import memcache
import datetime as dt
from MyRequestHandler import MyRequestHandler
from Controllers.staticHandlers import NotAuthorizedHandler
from Controllers.baseHandlers import LoginHandler
fro... |
447756d998d9a34a803c9642c1165ce1efcd79cd | 01f535557c2275a0c0cd91687d52c644e8176d00 | /src/vtra/analysis/stats/network_stats_calculations.py | 1b025a07ded7852ce00ea6a12873d51dcca891ca | [] | no_license | mmc00/oia-transport-archive | a8eaf72751a2c11b2cc2dc475e6eed2421d75381 | f89cb686704fe76c1665697b35d14caccf37f3a1 | refs/heads/master | 2022-03-28T17:44:41.915217 | 2020-01-09T16:22:10 | 2020-01-09T16:22:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,266 | py | network_stats_calculations.py | """Summarise hazard data
Get OD data and process it
Author: Raghav Pant
Date: April 20, 2018
"""
import geopandas as gpd
import pandas as pd
import os
import igraph as ig
import numpy as np
import sys
import subprocess
from shapely.geometry import Point
from shapely.geometry import Polygon
from scipy.spatial import Vo... |
302cb2ff9d6e4127134fca3924135b13ec50570f | e29bafa302e37ef978e24b4fcf6b4b88baa25265 | /app/constants.py | e625c484544379f6f21cb282e3912ce30e60ef4c | [
"MIT"
] | permissive | tripatheea/alyssa | f4d22f27e071d76307609657a2f560d66e9d67a6 | 45132bc7ea8b8f683ccc1e05f49703d09ab61d78 | refs/heads/master | 2016-09-05T21:35:24.947641 | 2014-03-21T23:33:58 | 2014-03-21T23:33:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 596 | py | constants.py | term = '2014SP'
season = 'spring' # Write a helper method to find this out from date.
url = { 'classes' : 'http://coursews.mit.edu/coursews/?term=' + term, 'stellar': 'http://stellar.mit.edu/atstellar/'}
header = {'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64... |
a70bb53d737fc425b58fa2e5aa125aaedfd6b77b | aaf23be8495b13ba4cc5d024b9b69320e425371f | /rps.py | e09128fe879fbb9d86040e734c074890e9d1fe8e | [] | no_license | Param123865/python-programs | 35a830ed6c106a3ce6eaaf40240aa59cc05c899f | 71a44d101a0e3e1f0094d6369a45744ef50326d2 | refs/heads/master | 2022-08-31T19:41:03.187372 | 2020-05-21T05:17:50 | 2020-05-21T05:17:50 | 265,760,593 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,198 | py | rps.py | from tkinter import *
class Mybutton:
#constructor
def __init__ (self, root):
self.c = Canvas(root, bg="white", height=700, width=200)
#create a frame as child to root window
self.f = Frame(root, height=400, width=500)
#let the frame will not shrink
self.f.propagate(0)
#attach the fram to root window
se... |
579d2deddae7d265e44775621cd9489db07227b0 | 65bf4457115d07dac2cbca68cc0fbb4d6966f388 | /tf_HSM_upgraded_SciPy_Numpy.py | a052bd27417b7af8c820bc223f7e453a61c5b175 | [] | no_license | psailamul/HSMmodel | c5fb7ad6a6f354a8db6291ae9bc4f74a6ac9f381 | c55b99885920dc87635f1b9922d9011d34fdfd41 | refs/heads/master | 2021-03-24T13:25:15.527385 | 2019-01-23T19:40:30 | 2019-01-23T19:40:30 | 88,285,732 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,866 | py | tf_HSM_upgraded_SciPy_Numpy.py | import numpy as np
import tensorflow as tf
import param
from numpy.random import rand, seed
def logistic_loss(x,t=0.0, coef=1.0):
return coef * tf.log(1 + tf.exp(coef*(x-t)))
class tf_HSM():
"""
Model for fitting vision data to neural recordings.
params:
images: training input,
neural_... |
cc85cd01cffa073b98e5369c7194d2fd1c452053 | 1834dc68c7b370b8fdbeb227d14b04a68026ad71 | /python Tutorial/2.Variables/app.py | 34c1876ccde3090354e8f03987662794505bfed6 | [] | no_license | jaimit25/Python | a226d61c7327a786a13391b4a9b2467ad8a0949c | 6a02e40f2aa73ac5aa535732bc4218f2efe70009 | refs/heads/master | 2023-08-07T00:23:34.939802 | 2021-10-07T05:17:20 | 2021-10-07T05:17:20 | 414,061,564 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 144 | py | app.py | price = 10 # number
rating = 4.9 # float
name = 'Janavi'
is_published = True
print(price)
name = 'John Smith'
age = 20
new_patient = True
|
2531cb5917480c5e0ba8da69d5189b280b6294e9 | 215a7b5d0fcbfd85a3770a981fa2031f733e98db | /Interview Questions Practice/Leetcode week2/34 Find First and Last Position of Element in Sorted Array.py | 05dba07c794219bb9a611861396724a0e047fcad | [] | no_license | shivani-aradhya/Leetcode-DSA | 7b571de15ef216a5a17f91dbfc895bd69ce8789e | c73e3ed8112454167d381bd497665021e36d1257 | refs/heads/main | 2023-07-09T10:59:38.987614 | 2021-08-18T05:50:44 | 2021-08-18T05:50:44 | 334,694,883 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 930 | py | 34 Find First and Last Position of Element in Sorted Array.py | class Solution:
def searchRange(self, nums: List[int], target: int) -> List[int]:
left = 0
right = len(nums) - 1
res = [-1, -1]
while left <= right:
mid = (left + right) // 2
if nums[mid] == target:
res[0] = mid
# Look for fi... |
2841ac6829ee0d17f82be1529dbbb7f24aedab85 | 371541ed9d7c0375daa730901d1ff6a41b71c137 | /main_app/Point.py | 3cee3c8afd8d019691de9e5fa75b48104c8c50f9 | [] | no_license | zgoodman1/Spike_Board | daabdc3f94f6a039e6e9be694a979477119e1597 | 0ac05fbb7cdd7dcd15483493ea0a9eecfe80b089 | refs/heads/master | 2020-04-19T08:27:37.648265 | 2019-04-11T19:18:58 | 2019-04-11T19:18:58 | 168,077,396 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 300 | py | Point.py | class Point:
score = ""
server = ""
returner = ""
ace = False
pocket = False
miss = False
secondServe = False
secondAce = False
secondMiss = False
attacker = ""
attackOnNet = False
defensiveTouch = False
whoDT = ""
dTOn = False
winner = ""
|
3bf3078c5eaa2659f3bd6e508764dd222b418896 | 8f51a1d1bbb791114195f10fa54a71b07980091e | /Australia/cehsi.py | 89afb177b708ddecdc8dd68838f5c8c8c0764657 | [] | no_license | nanshaolmt/Australia | 6d5cbfda1fd71a50fbfa8a06e653aebdedb30474 | 0a0342d0ae30056d53da4468fb6efc95a80c4cfd | refs/heads/master | 2022-12-06T01:19:03.290023 | 2019-09-06T13:29:36 | 2019-09-06T13:29:36 | 206,795,844 | 2 | 0 | null | 2022-11-22T04:13:55 | 2019-09-06T13:06:48 | Python | UTF-8 | Python | false | false | 1,832 | py | cehsi.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@File : cehsi.py
@Author: ChenLei
@Date : 2019/7/15
"""
from pipelines import Mysql
import huilian_selenium
from time import sleep
from lxml import etree
with open(r'C:\Users\Administrator\Desktop\new 8.html', encoding='utf-8') as f:
response = f.read()
html... |
2417e757af295cef4101db42793d050507525bfc | 0fb0cce1b9c9ac944ac73176d8414a94d9cb305a | /amazon-transactions.py | 341a209ae048ef24a24c6c9004d79aa92493eec6 | [] | no_license | vruyr/scripts | 85949b119ee8b184aa9333be7b5294ed65a74e0e | 3b7ab713eac0016a2aaf3c55e97dd28ba2f1fd9f | refs/heads/main | 2023-08-21T14:45:27.243909 | 2023-08-10T00:41:17 | 2023-08-10T00:41:17 | 2,090,834 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,766 | py | amazon-transactions.py | #!/usr/bin/env python3
import sys, re, time, subprocess
open_amazon_order_page = """
-- https://alexwlchan.net/2020/06/using-applescript-to-open-a-url-in-private-browsing-in-safari/
on openUrlInNonPrivateWindow(urlToOpen)
tell application "Safari"
activate
tell application "System Events"
click menu item "N... |
77803d0212a4eedb57f13d0fcce16ba715cd6008 | ea1ce42173987f8c38ea14449b7da3278b6396c2 | /leetcode/2021_4/300.py | e6e6ad331d8ef816ab07143e93cca6c6a648961f | [] | no_license | rundun159/problem_solving | c6d8dc50dab4a3c1bbeb3cca8a122b7f90917397 | 4eb03e65be0391d977d8b7144063710082716be2 | refs/heads/main | 2023-04-15T14:39:34.120332 | 2021-05-01T01:42:30 | 2021-05-01T01:42:30 | 352,479,098 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,220 | py | 300.py | class TH:
def __init__(self, nums):
self.nums = nums
self.len = len(nums)
self.cache = [-1 for i in nums]
def dp(self, idx):
if idx == self.len:
return 0
if self.cache[idx] != -1:
return self.cache[idx]
ret = 1
for i in range(idx +... |
f94eb991bde57852095c53100015179fbac60ed0 | 519fff2f6f156e24ecc276b36f93439dee4d08fd | /20_K4/taskkill.py | ffe68977fd7a73fe0c027da8b1b0026be68e6048 | [] | no_license | the-koala-uncle/web_spider | bb1de2c34c6b2fb3f30584e6c1672a36bbfd7a93 | 544444a318a1a340ff1b907303fb99eabd48273c | refs/heads/master | 2021-01-01T15:56:11.348943 | 2018-06-02T14:59:51 | 2018-06-02T14:59:51 | 97,733,281 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 519 | py | taskkill.py | import psutil,os, configparser
def kill(path):
pidList = psutil.pids()
for pid in pidList:
pidDictionary = psutil.Process(pid).as_dict(attrs=['name']);
for keys in pidDictionary.keys():
try:
config.get('system',str(pidDictionary['name']))
except:
... |
66bb1446c2604e886ffef1a64a051edabb5dd486 | 645f2d42a3eeabc2c6a3bcbd796b2b9abd04559f | /models/model.py | 981c5f7218eb825bcbdc797b76f9f2ec5a454557 | [] | no_license | andymyzhang32/EATS | dd926e26f1749f36f442fa622563eb9bf35b3c69 | 1e7c73d69ca13260da499e69813049f629ea1d77 | refs/heads/master | 2022-11-18T19:21:23.929522 | 2020-07-16T07:34:59 | 2020-07-16T07:34:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,520 | py | model.py | import torch
import torch.nn as nn
from encoder import Encoder
from decoder import Decoder
class EETS(nn.Module):
def __init__(self,
phone_embedding_dim=128,
tone_embedding_dim=64,
prosody_embedding_dim=32,
seg_embedding_dim=32,
spk_embedding_dim=64... |
8159f17c9ae310d1482941d201b2d3e9d4dfbbdb | ddcfa90f34da011a36fcc90aaefe9fc1a5f96cce | /ap_process/h2v/handler.py | 550ccdac4949e5491d89b69bd1a2f0d7c0c4f4bc | [] | no_license | HorizonDeveloper/BillionaireProject | 5d04ad30222c5274adb572f7c9ae27c068467179 | ebcd43c71270395039ac6d6836435395274f6cc5 | refs/heads/master | 2022-07-24T23:10:03.456890 | 2020-05-16T07:20:18 | 2020-05-16T07:20:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,241 | py | handler.py | from h2v.player import PlayerStatus
from h2v.pack_pb2 import MessagePack
from h2v.x2_pb2 import FrameMessage
from h2v.action import ActionContainer
from h2v.global_info import GLOBAL_VARS
import base64
import math
import json
import threading
def send_kps(points):
GLOBAL_VARS.cl.acquire()
GLOBAL_VARS.kps_to_se... |
97e56b24781dcfc9eff914e515786529b70b82d6 | cf320f7edfa8895af83efd18408358ff61b39c2c | /upload_file_to_gcs.py | 54ec3a6cddaf6d91a1ca548a2ac65bd0cde6f090 | [] | no_license | coolpalani/backup-db-vm | c2e86440e8d74525e1c5548242b0a4b208f46c2e | b90696579c220b637134ceff69beddb4099bc8cb | refs/heads/master | 2021-05-30T23:25:51.921246 | 2016-04-11T04:50:52 | 2016-04-11T04:50:52 | 108,030,058 | 0 | 1 | null | 2017-10-23T19:34:47 | 2017-10-23T19:34:47 | null | UTF-8 | Python | false | false | 3,543 | py | upload_file_to_gcs.py | #!/usr/bin/env python
"""
Upload a file on a Google Cloud Storage bucket
"""
import argparse
import logging
import os
from googleapiclient import discovery
from googleapiclient import http
from oauth2client.client import GoogleCredentials
# Set logging
logging.basicConfig(level=logging.INFO,
for... |
b57fd7f634e2e4b3923e95298d54b7024ac2d060 | e514f8d806b791305a9df348d9c16f16706b9913 | /myPy/rockpaperscissors.py | 4af929bdfa3291fb711962a97fd7ac5a50551778 | [] | no_license | jasmineiris/jiDev | 2aeb2309fd81ae596536e48dcf09c62f8814bbdb | df8a62dcf6696ce8d799041cdb7cefe080af29cd | refs/heads/master | 2021-01-22T00:52:50.676175 | 2015-12-09T08:01:20 | 2015-12-09T08:01:20 | 45,960,897 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 938 | py | rockpaperscissors.py | from random import randint
RPS = ["rock","paper","scissors"]
def chooseMove():
print("Time to play.")
while (True):
choice = raw_input("Choose your move! Rock. Paper. Scissors.")
if choice.lower() in RPS:
return RPS.index(choice.lower())
def compMove():
choice = randint(0,2)
print("Computer chooses " +... |
6bcce058b1d5cb397419f3af3058adab7137d932 | 709bd5f2ecc69a340da85f6aed67af4d0603177e | /tests/test_postgresql_search.py | 055a8aa6a9849ca1db843db054007bd3e443983f | [
"BSD-3-Clause"
] | permissive | Kenstogram/opensale | 41c869ee004d195bd191a1a28bf582cc6fbb3c00 | 5102f461fa90f2eeb13b9a0a94ef9cb86bd3a3ba | refs/heads/master | 2022-12-15T02:48:48.810025 | 2020-03-10T02:55:10 | 2020-03-10T02:55:10 | 163,656,395 | 8 | 0 | BSD-3-Clause | 2022-12-08T01:31:09 | 2018-12-31T09:30:41 | Python | UTF-8 | Python | false | false | 10,654 | py | test_postgresql_search.py | from decimal import Decimal
import pytest
from django.urls import reverse
from saleor.account.models import Address, User
from saleor.order.models import Order
from saleor.product.models import Product
@pytest.fixture(scope='function', autouse=True)
def postgresql_search_enabled(settings):
settings.ENABLE_SEARC... |
93b381fa778f760575baf83e73b5af4dfe2b675a | 8d53a4ab8a862b3a1ddad6bb9af405b79402cf70 | /3_String1/4_Formatting.py | 45948aa6be774d3f69bb258278e1b86fab90bf5e | [] | no_license | jqu224/Fan_hhkr101 | 99fc533d1fb034372e551a49284d0911f27d5236 | 325b55926383404ab6b5b6a17c109eb0aac83d6b | refs/heads/master | 2020-04-27T04:56:19.480189 | 2019-08-20T20:12:54 | 2019-08-20T20:12:54 | 174,068,804 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 6,279 | py | 4_Formatting.py | 这题怎么做的不重要,w这行是为了下文对齐用的,这里重要的是进制
def print_formatted(number):
# your code goes here
w=len(bin(number)[2:])
for i in range(1,number+1):
print (str(i).rjust(w,' '),
str(oct(i)[2:]).rjust(w,' '),
str(hex(i)[2:].upper()).rjust(w,' '),
str(bin(i)[2:]).rjust(w,' '),se... |
d18779de5b69728c23de89bd446004ab520926d1 | e2681a43b92fa0ed10901644e98a5e7f6cd2e2c2 | /main.py | 78e684e3eff1fd246f6b59c16343da196046250c | [] | no_license | kbudukiewicz/tests_interface | 7683ac8598ec00e8c6fbecb8c784b5d67a476b03 | ea277a8e2df8edc1cc26f9c70ab76bba81dc1ce3 | refs/heads/main | 2023-05-02T17:01:13.055129 | 2021-05-27T14:27:11 | 2021-05-27T14:27:11 | 371,401,265 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 20,455 | py | main.py | import sys
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from PyQt5.QtCore import *
import numpy as np
class AnotherWindow(QWidget):
def __init__(self):
super().__init__()
self.setWindowTitle("Test")
self.setWindowIcon(QIcon('896689.png'))
self.score = 0... |
51ad6b97755f42f4a6deb754c47af902f3ab6e99 | 70811da75f0f38719703e02c9f99e2ce09e21d2a | /HMM/data_processing_scripts/plot_data_in_panda_df.py | ef620d5807b3afb97335abb234d4ae06605e9a13 | [
"BSD-3-Clause"
] | permissive | HongminWu/time_series_anomaly_detection_classification_clustering | 9d5e555c9bf37ee72770e127588f61f15139bd4e | 548b3799389ec7a96fc56c51360a6de89e0502a1 | refs/heads/master | 2020-03-11T04:44:00.113684 | 2018-08-16T06:38:57 | 2018-08-16T06:38:57 | 129,783,614 | 15 | 6 | null | null | null | null | UTF-8 | Python | false | false | 6,908 | py | plot_data_in_panda_df.py | from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
pos_plot = None
ori_x = None
ori_y = None
ori_z = None
ori_w = None
fx = None
fy = None
fz = None
mx = None
my = None
mz = None
def init_plots():
global pos_plot
global ori_x
global ori_y
global ori_z
global ori_w
global... |
8a5905dc2321526d31c076de30cfc03a674c7cd2 | cd3391d7009ce1975541b6377f3e7dca5c4a8c6c | /NLP_exercise/基础算法/sklearn_test/temperature_predict.py | fa61a742afe771d7a94e1ebde7d8b2ccbb0914af | [] | no_license | Jeff654/my_machine_learning | ee7399fb514e36859a406330820dac9b15a3e348 | cfca78f2d351caa58092ce5e6b955347aba6637e | refs/heads/master | 2022-11-29T21:50:05.018262 | 2019-11-26T12:04:34 | 2019-11-26T12:04:34 | 224,181,536 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,095 | py | temperature_predict.py | # -*- coding: utf-8 -*-
"""
预测未来气候
"""
import pandas as pd
import numpy as np
from matplotlib.pylab import plt
import requests
from sklearn.model_selection import train_test_split
from sklearn.ensemble import GradientBoostingRegressor
import io
# load dataset
url = "http://blog.topspeedsnail.com/wp-content/uploa... |
66672e3c2d6997bca34aae8da800692715a1bceb | b17a7f184418ee4930a2f45379a89eaf4bb1dec7 | /cryptoapi/config.py | f92d3cc8fbc42fe708ed97154987ffc1394a0a35 | [] | no_license | sjbitcode/crypto495 | 23351e5a06762995e071446e33c13932f1b394f2 | a220f162edcdff9002f3afce017d22c0d1790385 | refs/heads/master | 2022-12-11T04:03:19.780428 | 2019-06-03T13:24:17 | 2019-06-03T13:24:17 | 177,873,952 | 0 | 0 | null | 2022-12-08T04:54:44 | 2019-03-26T21:50:41 | Python | UTF-8 | Python | false | false | 293 | py | config.py | import os
BASEDIR = os.path.abspath(os.path.dirname(__file__))
class Config(object):
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(BASEDIR, 'cryptodb.db')
SQLALCHEMY_TRACK_MODIFICATIONS = True
PAGINATION_LIMIT = 50
ROOT_URL = os.environ.get('ROOT_URL', 'ROOT_URL')
|
0049f42383af26cd4c06bc6a9d44b2f182d81f85 | da2bf12728d9e5bfb6670f6b1f0b50bd7adba86b | /IOT/client.py | b5eb7c910a07c7f1e00c9219ecdab53862a6680a | [] | no_license | dlf412/temperature_monitor | f4161577d914e01e449c013cded4c213bb63527c | 34ca3fa5a7e32773f38339eba76df30e5405b497 | refs/heads/master | 2023-06-01T23:28:03.185544 | 2021-06-18T03:09:32 | 2021-06-18T03:09:32 | 378,019,837 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,846 | py | client.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2020/3/11 20:31
# @Author : Denglingfei
# @File : client.py
# 客户端
import socket
import time
import serial
import os, sys
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(BASE_DIR)
from IOT.utils import crc16
realdata ... |
66678a39f6df54679099c9c861bf4f54f2361b6c | a79da970b8ead00f9e0f707c064cfa41c062f62f | /scripts/send_messages.py | 075688f4f86252f613d1bcdd74ef90ad5d301618 | [] | no_license | mikelb/vagrant-synapse-test | ebd0405e95aeecf6fd68631d6f7e7dc80eaeb1b0 | b7b4ad6a881bb681febc1fe8c2c6531bfdfc613a | refs/heads/master | 2021-01-11T00:04:36.540813 | 2015-08-12T15:17:20 | 2015-08-12T15:17:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,314 | py | send_messages.py | """send_messages.py
Usage:
send_messages <input> <url> --interval=<n> --concurrent=<n>
"""
from docopt import docopt
from twisted.internet import defer, reactor
import json
import random
import treq
import yaml
import time
WINDOW = []
def sleep(seconds):
d = defer.Deferred()
reactor.callLater(seconds,... |
fde4f9884fce4a88445a64cac7e426eb180282ff | c00b800353d2d6222e6fac050a7fd95f40863b58 | /public_api/resizing.py | 2293158d39b736fef02d530c9fb270885d1b95aa | [] | no_license | HyeonJinGitHub/CodingHedgehog | c46e427525de6b1600d614f5910c49229bb7f3bd | 9ee3af688ea85ce32d5afeb708ae5ded40217979 | refs/heads/master | 2023-03-19T00:44:05.093558 | 2023-03-09T14:10:34 | 2023-03-09T14:10:34 | 228,132,998 | 8 | 4 | null | 2022-12-10T20:07:17 | 2019-12-15T05:21:57 | Python | UTF-8 | Python | false | false | 412 | py | resizing.py | # pip install pillow
import urllib.request
import requests
import os
from os import rename,listdir
from PIL import Image
outpath = "C:/GitHub/CodingHedgehog/public_api/data/"
#outpath = "C:/알약모양/"
if not os.path.isdir(outpath):
os.makedirs(outpath)
files = listdir(outpath)
for f in files:
image = Image.op... |
0d94bc0e609e410b77f932c1ca24e7b1f6e4296f | a5b417aa2e4ba1a8a0691061698c3c1aa8612a30 | /Yongzhe Yuan/PointNetLK/ModelNet40.py | dbfbb5cd8099823df49c2f3d675931a11b591c70 | [] | no_license | swjtzcy/Point-Cloud-Team | 1fa77767b1132b2ca16ab380bf5e9dfdeba1e12a | c671d82ab53c89f508b5f9f58d1893e3ebc0e7de | refs/heads/main | 2023-07-14T04:13:27.437982 | 2021-08-24T13:11:59 | 2021-08-24T13:11:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,556 | py | ModelNet40.py | from torch.utils.data import Dataset
import os
import glob
from read_off import getVertexsandMeshs
from torch.utils.data import DataLoader
import torchvision
import transforms
FILEPATH = r"E:\AI\Dataset\ModelNet40"
def get_classes(root):
""" 在{root}/路径下寻找所有类,并将所有类编号形成dict """
classes = [modelclass for modelc... |
2126e50fee8a65db8c522218b603ce5d37f0d8b3 | 74534cacf2b760a6c77ed8657b866cea61e55380 | /scripts/filtre_mail.py | c04f41d7fef62a23ac309a28b3a8e096989c2292 | [] | no_license | JofreyLuc/filtreSpam | 9b7bb044ced71ae5991ff736be932a035b8b1231 | 8d11bf1ef2af92517ba629c0458f07e77823678b | refs/heads/master | 2021-06-17T20:56:45.990871 | 2017-05-07T23:54:38 | 2017-05-07T23:54:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,618 | py | filtre_mail.py | #!/usr/bin/env python
"""
Prédit si un mail est un spam ou un ham à partir d'un filtre/classifieur
stocké dans un fichier (json) passé en argument.
"""
import argparse
from moduleUtils import is_valid_file, eprint
from moduleFiltreAntiSpam import charger_filtre, predire_message
from math import exp
def main() :
#... |
565888a9337da585e66e43a629cf16799e5957da | a47b410f23bd98b5214dffbed893def2f7855578 | /image_pyramids.py | b3ba9a2f417c260cefce3348a4df22d70b0667b7 | [] | no_license | ayushvrma/opencvtutorial | 84e2d55d76778f74f43f5dd432c8eff86952ea4f | f122fb138ff761ed65e395be40d64a6c227e0a6a | refs/heads/master | 2023-03-12T11:55:21.417478 | 2021-03-04T19:10:34 | 2021-03-04T19:10:34 | 317,747,444 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 963 | py | image_pyramids.py | """
a process to proccess images to different sizes
2types of pyramids: gaussian and laplasian
"""
import cv2
import numpy as np
img = cv2.imread("lena.jpg")
layer = img.copy()
gaussian_pyramid_list = [layer]
for i in range(6):
layer = cv2.pyrDown(layer) #to reduce the resolution of the image
gaussian_pyr... |
acb75a7290ba6da3ef1e43fb2d7126944f7c8042 | 8ccef441f9511111e269c4ed485672617203878b | /map-generator.py | 5504a0f062d724f40547d5e75c13367ff597b728 | [] | no_license | vyldr/map-generator | ce3e185de42102bd8684de82bb63da75cdf54448 | c72cd30d93e7f6d307b55c61eb13a83b917a2288 | refs/heads/master | 2023-08-08T05:52:21.933635 | 2021-09-18T00:44:28 | 2021-09-18T00:44:28 | 241,791,253 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 14,253 | py | map-generator.py | import random
from PyQt5.QtWidgets import QApplication, QMainWindow, QFileDialog
from PyQt5 import QtGui
from PIL import Image, ImageDraw, ImageOps
from PIL.ImageQt import ImageQt
from MainWindow import Ui_MainWindow
import mapgen
class MainWindow(QMainWindow, Ui_MainWindow):
def __init__(self, *args, obj=None,... |
d0d9d5cf383b8d717ffcc4ab7ca2f30ab3f8cfbb | 71c622cca520c2dc9b74f8d74fa911f0f730de14 | /tests/test_pandas_frames.py | 38f8b77b588b2c87d3447997258b41b0293d2e7b | [
"MIT"
] | permissive | bdilday/namedframes | 48d85230b5df01348b0ca8eb807a0e3e26f10d44 | c585eb3a563cca3533359cb29db24191772930e5 | refs/heads/master | 2023-01-21T13:29:32.027351 | 2020-11-16T03:41:37 | 2020-11-16T03:41:37 | 313,117,644 | 0 | 0 | MIT | 2020-11-29T00:44:23 | 2020-11-15T20:32:02 | Python | UTF-8 | Python | false | false | 445 | py | test_pandas_frames.py | import pytest
from namedframes import PandasNamedFrame
class ExampleDF(PandasNamedFrame):
x: int
y: float
class ExampleBogusDF(PandasNamedFrame):
x: int
y: float
extra: str
def test_pandas_dataframe(pandas_df):
example_df = ExampleDF(pandas_df)
assert isinstance(example_df, ExampleDF)
... |
69c45f448a074558f26b6e2456008d969aa91e7d | e70e5a71e67a5b87bd5c2e508e7ec400f4ae7bd0 | /python/allergies/allergies.py | d3a64853b6af995c93553fbce1fc0b8713e290f8 | [
"MIT",
"CC-BY-SA-3.0"
] | permissive | jca/exercism | 72b152d42fc54a840b7486ed641a1fe276ecd0f0 | ae420f38529644fe60d2b3d764766499e7ece8b6 | refs/heads/main | 2023-01-13T02:20:54.570962 | 2020-12-03T09:29:17 | 2020-12-03T09:29:17 | 247,668,241 | 0 | 0 | MIT | 2023-01-06T14:51:50 | 2020-03-16T10:03:16 | C++ | UTF-8 | Python | false | false | 548 | py | allergies.py | ALLERGIES = {
'eggs': 1,
'peanuts': 2,
'shellfish': 4,
'strawberries': 8,
'tomatoes': 16,
'chocolate': 32,
'pollen': 64,
'cats': 128
}
class Allergies(object):
def __init__(self, score):
self.score = score
def is_allergic_to(self, item):
if item not in ALLERGIE... |
175fd07cd2a6fbabaaf789031926f29befa4564a | 5a52ccea88f90dd4f1acc2819997fce0dd5ffb7d | /alipay/aop/api/response/AlipayCommerceIotModellistCreateResponse.py | 51cdc62b4524d3023f914c99004cd12c50070dc0 | [
"Apache-2.0"
] | permissive | alipay/alipay-sdk-python-all | 8bd20882852ffeb70a6e929038bf88ff1d1eff1c | 1fad300587c9e7e099747305ba9077d4cd7afde9 | refs/heads/master | 2023-08-27T21:35:01.778771 | 2023-08-23T07:12:26 | 2023-08-23T07:12:26 | 133,338,689 | 247 | 70 | Apache-2.0 | 2023-04-25T04:54:02 | 2018-05-14T09:40:54 | Python | UTF-8 | Python | false | false | 957 | py | AlipayCommerceIotModellistCreateResponse.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayCommerceIotModellistCreateResponse(AlipayResponse):
def __init__(self):
super(AlipayCommerceIotModellistCreateResponse, self).__init__()
self._duplicated_model_... |
f5e4bb310e08ea3c00caaaaba9293b970ec1e314 | e775aaad442a43e53c0daa56ca6c00aa45c196ce | /modules/CSVFormatter.py | c652fbfbe15c7108d4795dfde64d983f9c3f3026 | [] | no_license | JackMcKew/Air-Quality-Toolkit | c3ebcc6b296093d0a27076e8fe0d21450539778b | eaee6d06094c984d8215b2c39a89c6f243d1f9da | refs/heads/master | 2020-12-05T03:21:02.187877 | 2018-11-30T02:52:06 | 2018-11-30T02:52:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,723 | py | CSVFormatter.py | import os
import csv
import pandas as pd
import traceback
from PyQt5.QtWidgets import QMessageBox
from DialogBoxes import ErrorBox, InfoBox
"""
.. module:: CSVFormatter
:platform: Windows
:synopsis: A module containing functionality for formatting air quality modelling dumps.
.. moduleauthor:: Jack McKew <jac... |
a94bef63cfa98cc6d4ce99a48bb9e522c8f61763 | 6700c2e7d550e1aa40ab992ca0790219af64ea45 | /functions_advanced/even_or_odd.py | 39f739ee4d18a51e7bbc8c24f5b46c4ec9fc8d1f | [] | no_license | miroslav-kostov/python_advanced | d6137e14988ebdcfd32bded39a368c032e8ca3f7 | ae11622e972778c49d32090327821346ca69a9c4 | refs/heads/main | 2023-03-07T14:29:26.780186 | 2021-02-25T02:24:17 | 2021-02-25T02:24:17 | 328,550,681 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 775 | py | even_or_odd.py | # def even(number):
# if number % 2 == 0:
# return True
# else:
# return False
# def odd(number):
# if number % 2 != 0:
# return True
# else:
# return False
#
# def even_odd(*args):
# the_list = []
# result = []
# for i in args:
# if i == "even":
# ... |
2c8bcea1247bd3e2301adea5ef9d5e8ae1f57137 | 0a6c4a3fb1230ece2ea57d7dde00cfe08514ab61 | /main.py | 3af94c6b902102d7230093b7f6f472e369b63aec | [] | no_license | purvikshah/daiictpy | 03ee39cf166852610e7835cae9ed67b26a4a9247 | 5021e01038e7105d93678a09107bf35d6450815e | refs/heads/master | 2021-01-10T04:44:51.929580 | 2016-01-17T12:01:09 | 2016-01-17T12:01:09 | 49,815,434 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,025 | py | main.py | import os
import re
from string import letters
import jinja2
import webapp2
import hashlib
import hmac
import json
from urllib2 import URLError
from datetime import datetime, timedelta
from google.appengine.api import memcache
from google.appengine.ext import db
template_dir = os.path.join(os.path.dirname(__file__), 't... |
2bf6a106d1bafedb3682b282546a0889d7f58ba3 | a3fe3d04e0140744b8288dc52a4cd522296eec3d | /page_object/product_page.py | e64f5bf30be5b6787ad43f7151393587d54ace3a | [] | no_license | langlixiaobailongqaq/POM20210322 | 3bdf154333da13b8056af76231a35cae59e6e197 | 4141b43e94234d7dd2184b931f8abb68620c7295 | refs/heads/master | 2023-03-24T06:56:23.484613 | 2021-03-22T11:20:46 | 2021-03-22T11:20:46 | 350,311,537 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 451 | py | product_page.py | """
商品详细页面对象,实现商品详细页面添加商品到购物车的流程操作
"""
from selenium.webdriver.common.by import By
from base.base_page import BasePage
class Product(BasePage):
url = "http://39.98.138.157/shopxo/index.php?s=/index/goods/index/id/2.html"
button = (By.XPATH, '/html/body/div[4]/div[2]/div[2]/div[3]/div[3]/div/button')
def choose(s... |
63214c0e44b5e36cd215dfef8c9786d2086bfd9d | 92fbb2691151a6678e65fec529499676e77cfb20 | /hw9/SConstruct | 244c39a7870c9437122c079b12bbdc6555d6b9f7 | [] | no_license | dirkbaechle/hw9-dds-vfo | 94e45d17fff41ac3ac165838fb99d728b249578c | af10a51db0177ab690de081221e38bc864d6362e | refs/heads/master | 2022-10-20T02:47:52.863572 | 2021-09-23T18:24:42 | 2021-09-23T18:24:42 | 236,174,558 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 242 | SConstruct | env = Environment(tools=['default', 'noweb'])
env.Noweave('uni-dds-hw9.ltx', 'uni-dds-hw9.nw')
env.NoweaveHtml('dimmer.html', 'uni-dds-hw9.nw')
env.Notangle('uni-dds-hw9.asm', 'uni-dds-hw9.nw')
env.PDF('uni-dds-hw9.pdf', 'uni-dds-hw9.ltx')
| |
38119bc9366d66277e41b09e988df7524ddc45ef | d0cee5d99dc95049e73115f5443556d1223ffab8 | /20170913/lyrichu_20170913_01.py | 93e4fb4e55c3a9137360ab465be4b3969ee680d1 | [] | no_license | samarxie/Python-Machine-Learning-Homework | ad30e514c0a079b760f0b06d9086fb6756155822 | 52977a157e45d1ed6f176a1f6b5f9667b41fc745 | refs/heads/master | 2020-03-25T09:22:09.242727 | 2018-05-06T04:13:16 | 2018-05-06T04:13:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 709 | py | lyrichu_20170913_01.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2017/9/13 9:05
# @Author : Lyrichu
# @Email : 919987476@qq.com
# @File : lyrichu_20170913_01.py
'''
@Description:
Q1:
在字符串中寻找出,第一个只出现一次的字符。
举例:
"abaccdeff",则输出"b"。
'''
string = raw_input()
n = len(string) # 字符串长度
flag = False # 是否有只出现一次的... |
68c08181f9155d4ac8d357e137b6ab6be26702dd | a98c5b9d6116b5fa4536b3924fb9e3e6de609a74 | /newsapi/article/migrations/0001_initial.py | 3fb468b1423b27de1e20a18f0f72038081a8486b | [] | no_license | 18786683795/MyNEWS-master | 9edd2ce8f316627d23ce16c7f4cb1a396911a0eb | d65da9b493907d6d8c5b6af46f9fc7a860951577 | refs/heads/master | 2022-06-21T17:09:29.277306 | 2020-05-13T08:14:27 | 2020-05-13T08:14:27 | 263,565,874 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,383 | py | 0001_initial.py | # Generated by Django 2.0.2 on 2020-03-04 14:44
import DjangoUeditor.models
import datetime
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependen... |
2ca64c82ba02dd92ef058cb0095d0ddf26d294f8 | bf47c52fd1712650ed3501c0ead5f9298c59e17f | /app/ext/site/__init__.py | 6d3baf0c7c2d44565383b3141d2ce4d81049c59e | [] | no_license | FelipeSilva93/flask_login_page | 048d52a1eba59c6e61ca082bb53600ecb3472ff2 | fe6989f3cf8bd8a56dcda8401c983d4488821bab | refs/heads/main | 2023-06-05T14:04:24.897156 | 2021-07-02T11:27:03 | 2021-07-02T11:27:03 | 382,114,703 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 86 | py | __init__.py | from app.ext.site.views import bp
def init_app(app):
app.register_blueprint(bp)
|
86d5071745d28153328432b101875f97842d269b | a62f36f79937f73d82a898d5c27cb83704a510ef | /simulation_package/normal.py | d122152b9d04e5329dda67247c87dc564591b70b | [] | no_license | lipry/San-Francisco-Fires-Simulation | e6907833aed2f1236962e3a2736f451c366a02eb | 7d2fca62f66ebc25cdf28ab580c74bc53633528d | refs/heads/master | 2021-09-07T00:04:40.595912 | 2018-02-13T21:28:56 | 2018-02-13T21:28:56 | 119,970,631 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,600 | py | normal.py | import numpy as np
from scipy import random
from .distribution import Distribution
import math
class Normal(Distribution):
def __init__(self, mu=0.0, variance=1.0, t="bm", log=False):
super(Normal, self).__init__(varred=False)
self.mu = mu
self.sigma = np.sqrt(variance)
self.techn... |
b074bebfd989c90a5d15358cddfc2d4f8bac81ae | 9ca1294752fbdc599e80ec477b011c930da253b4 | /apps/main/tests.py | b3ecf733a344a77f2a9b0da327471076ce94caeb | [] | no_license | yeahframeoff/FortyTwoTestTask | 28b9f2998ced94779bcf9383ca84dd97bc84eaba | 7628533eb0a7d1293ff155daa9c76b5d9deecf8d | refs/heads/master | 2021-01-17T17:18:13.217844 | 2015-03-03T17:42:58 | 2015-03-03T17:42:58 | 29,750,832 | 0 | 0 | null | 2015-01-23T20:09:03 | 2015-01-23T20:09:02 | Python | UTF-8 | Python | false | false | 1,930 | py | tests.py | from django.test import TestCase, Client
from django.core.urlresolvers import reverse
from django.contrib.auth.models import User as AuthUser
from django.contrib.auth import authenticate, login
from django.test.client import RequestFactory
from PIL import Image
from sys import version_info
if version_info < (3,):
... |
c7db9d74431779d9413863d0938f2ed49388debd | 9240e14461b5e62303faeb507b6bb1219b74a513 | /Y5 Practical 4/q1_sum_series1.py | 2b9639c8f95626c876163ea933d5afa8f4908f69 | [] | no_license | 4wqre/cp2019 | 94aef48fe565e2a5040e95ed02ea937d8d46dc7d | 92dddaccd765c723fd6ca7f2fa1719ed008b89bc | refs/heads/master | 2021-06-28T13:26:37.299745 | 2020-10-08T01:53:32 | 2020-10-08T01:53:32 | 171,573,465 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 175 | py | q1_sum_series1.py | def sum_series1(i):
if i == 0:
return 0
else:
return sum_series1(i-1) + 1/i
number = int(input("Please enter a number: "))
print(sum_series1(number))
|
b0eed5570068190706213379fc534d29eb0255ae | 82d977146d2bf775dd50f4b564e3d000ed8d47eb | /calculator.py | 04b215788b2e253d3ce823f247a4e180ecb78bad | [] | no_license | Hibios/PyQt5-calculator | 8946a5c9866343f0457e36a65fc361b646fade78 | 9a50944830a7e19081e22fd7498020fe3252ee8f | refs/heads/master | 2020-06-12T22:53:24.582301 | 2019-06-29T22:23:59 | 2019-06-29T22:23:59 | 194,452,385 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,429 | py | calculator.py | import sys
# Импортируем наш интерфейс из файла
from kalkulator import *
from PyQt5 import QtCore, QtGui, QtWidgets
sys.path.append('D:\PyPrograms\Kalkulator\kalkulator.py')
#создаём класс наследующий от класса QtWidgets.QMainWindow
class MyWin(QtWidgets.QMainWindow):
#Значение firstNum оставляем неопределённым ... |
47fb6a4f98a1caa5039585109d1b7a65871fa1db | 05562a6dc0da3291c55cba3ea4fb773ff8958a16 | /PlayNLearn/migrations/0003_remove_user_u_dob.py | cf2ba60decb50a281274f2706d111c6e419c5d32 | [] | no_license | Imran-Jutt/Play_n_Learn | d2d9679fdf31263dac2d9469448ae42f0b8bcc80 | 5f5908ec5f1e655a3a99c059213a603d05ba5f4f | refs/heads/master | 2020-03-18T03:21:31.364869 | 2018-06-03T21:19:30 | 2018-06-03T21:19:30 | 134,236,512 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 328 | py | 0003_remove_user_u_dob.py | # Generated by Django 2.0.4 on 2018-05-17 09:16
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('PlayNLearn', '0002_auto_20180501_1126'),
]
operations = [
migrations.RemoveField(
model_name='user',
name='U_DOB',
)... |
4fe0b066dadaf5857c275fa73c0de6b73556bc6d | dfa8a7e1bafd51ef8910b965507c6dc2c073a22e | /metadata.py | b7503ce946d83029a291dda9f2deaf14e799087c | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | cloudacademy/django-tinymce4 | db4f1da8794c287e3d9e3bdcabf15421fd9eb204 | 1e54959489bc60cf0c667e3049d38b5750dd6bd8 | refs/heads/master | 2021-09-07T07:29:13.140615 | 2017-10-31T16:22:50 | 2017-10-31T16:22:50 | 54,880,637 | 2 | 0 | null | 2016-05-06T16:32:09 | 2016-03-28T09:11:34 | JavaScript | UTF-8 | Python | false | false | 95 | py | metadata.py | name = 'tinymce4'
authors = 'Joost Cassee, Aljosa Mohorovic'
version = '4.0'
release = version
|
76d166bc227986863db77aa784be3de8110437ff | 7243204ea101c8120948ef08ad7c421452812d92 | /strategy.py | 6e670ea1c3a854d885965bd8c39f734886d2f65a | [] | no_license | webclinic017/pcm_backtest | 2c6f6c6c1a480c277aeae6304484088c453a9cf8 | d369ea7e38802c889999797a84d0391daa95db54 | refs/heads/master | 2021-09-08T10:10:40.444328 | 2017-08-01T19:42:14 | 2017-08-01T19:42:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,586 | py | strategy.py | import logging, numpy as np, time, pandas as pd
from abc import abstractmethod
from kombu import binding
from tqdm import tqdm
from functools import lru_cache
from threading import Thread
from math import ceil
from copy import copy
from .pos import Position
from .base import BaseConsumer
from .event import SignalEven... |
3ae0149af78216d6cc85313ebaa6f7cd99185c05 | 6fa7f99d3d3d9b177ef01ebf9a9da4982813b7d4 | /xWW8PMuLN8hmAgLMJ_17.py | ac270b08b227e7f3ae3ba269eb105d2ea92f5ec0 | [] | no_license | daniel-reich/ubiquitous-fiesta | 26e80f0082f8589e51d359ce7953117a3da7d38c | 9af2700dbe59284f5697e612491499841a6c126f | refs/heads/master | 2023-04-05T06:40:37.328213 | 2021-04-06T20:17:44 | 2021-04-06T20:17:44 | 355,318,759 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 337 | py | xWW8PMuLN8hmAgLMJ_17.py |
def postfix(expression):
operators, stack = '+-*/', []
for item in expression.split():
if item not in operators:
stack.append(item)
else:
operand_1, operand_2 = stack.pop(), stack.pop()
stack.append(str(eval(operand_2 + item + operand_1)))
return int(floa... |
d95d899c6eae5a90c90d3d920ee40b38bf304805 | 9074f8cf3f48aa7a7d58ef9b70b362dac63c2cc2 | /lista2.py | afcaeff017b9d62915c228ba1d8c5073f7640c48 | [] | no_license | 0bill0/sist_emb_c_ubiquoa | 3a82c03a21544618cc29ff1d4c3a5d0e3da093c5 | 3e01b50b99b6f4f17054b68db72aacf4239f600b | refs/heads/main | 2023-06-08T09:37:19.417880 | 2021-06-27T13:32:20 | 2021-06-27T13:32:20 | 380,611,363 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 492 | py | lista2.py | #coding: utf-8
"""
1) Encontre em um texto os nomes próprios e os retorne em uma lista. Utilize o Regex (‘import re’) e a função findall(). Na versão básica, retorne todas as palavras que iniciam com maiúscula.
2) Apresente um plot de alguns segundos dos dados de acelerômetro do dataset:
https://archive.ics.uci.edu/... |
dd7ade05ef912f7c094883507768cc21f95f31f6 | 7ebc901dd6fa933c4b04cc828d38a272c383dc6f | /src/m00sic/constants.py | 7ab8bc7355c2a399253344d1cb63fd56a884dccc | [
"MIT"
] | permissive | cwolffff/m00sic | 7a721f2474e4c21842cab909b79d9dae7db8b29a | d8b0a1ec39aeb3fc4f146628b6027d0f09b5ac0d | refs/heads/main | 2023-08-04T19:58:35.287436 | 2021-09-27T04:08:26 | 2021-09-27T04:08:26 | 351,312,746 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,542 | py | constants.py | """
A module for constants.
"""
# fin adding notes for keys and uncomment
KEYS = [
"CM",
"GM"
# ,
# "DM",
# "AM",
# "EM",
# "BM",
# "FSM",
# "CSM",
# "Am",
# "Em",
# "Bm",
# "FSm",
# "CSm",
# "GSm",
# "DSm",
# "ASm",
]
NOTES_FOR_KEY = {
"CM": [... |
0c68bd65cac3c8b9fd080900a00991b2d19260ee | fcde80b4d0f96a68a267e280d84b479cfd419881 | /core/tests.py | da1d05366cb87a09e80f27737f280569522b6085 | [
"MIT"
] | permissive | mpyrev/lunchegram | 3deac38965d6f9f8085a66c57248358f343fc38b | 14a29da74e14a959be607e4fc76bbc2f181c5278 | refs/heads/master | 2022-12-26T18:35:45.162349 | 2020-10-27T08:59:29 | 2020-10-27T08:59:29 | 197,425,043 | 1 | 0 | MIT | 2022-12-08T05:53:44 | 2019-07-17T16:23:43 | JavaScript | UTF-8 | Python | false | false | 602 | py | tests.py | from django.test import TestCase
from core.factories import CompanyFactory, EmployeeFactory
from core.pair_matcher import MaximumWeightGraphMatcher
class PairMatcherTestCase(TestCase):
def setUp(self):
self.company = CompanyFactory.create()
def test_simple(self):
employees = EmployeeFactory.... |
32ed07a89a6f929a6c4b78fd79e687b85e01015b | 00e566d040fd0b9ccc4073c8007ebae958962ada | /forms.py | c4f0f7503f353d1e61fa2478c7c40e8edc08f26b | [] | no_license | SurabhiGupta1999/CollegeMinor | b9261a31ad1c1be267df3019c8ab0c32693fdd11 | e96f525dc99eb1a44d85db543062077562bf848d | refs/heads/master | 2022-11-19T06:24:18.179925 | 2020-07-19T15:19:53 | 2020-07-19T15:19:53 | 256,491,546 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,891 | py | forms.py | from flask_wtf import FlaskForm
from wtforms import StringField, SelectField,SubmitField, PasswordField, RadioField, MultipleFileField, SubmitField, TextAreaField
from wtforms.fields.html5 import EmailField, TelField, DateField
from wtforms.validators import DataRequired, Email, Length, InputRequired
class SignUpForm(... |
257f18db95e069c037341d2af372269e988b0a80 | a9084771b2c0d0ec1096d8257507f3730dcef5ad | /asset/migrations/0002_remove_balance_title.py | 58d1c88107a495d71bd3616103842657d1aafa01 | [] | no_license | seiya0723/assets_manager_03 | 7c6bb9c096897f99716b6890ec0b84c594c3af19 | 35140e31c73a87130d65588eae637a3f47f20ad0 | refs/heads/master | 2023-06-07T00:17:33.796275 | 2021-07-03T01:07:27 | 2021-07-03T01:07:27 | 382,284,952 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 315 | py | 0002_remove_balance_title.py | # Generated by Django 3.1.2 on 2021-07-02 05:38
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('asset', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='balance',
name='title',
),
]
|
74cb06ffa41748af431b46c9ff98eb91771a5015 | c0d05fca1b53d9915e7da8e3d436b5f6d4067be3 | /BOOK/MAIN/05-file-handling/chapter-5-examples/03-input-marks-write.py | 9b36f108da01b030d5e94b2a59ead5712694007e | [
"MIT"
] | permissive | kabirsrivastava3/python-practice | 071aa6c883a06087b62b09009f32e76334f661b9 | f56a4a0764031d3723b0ba4cd1418a1a83b1e4f5 | refs/heads/main | 2023-07-04T20:42:12.675180 | 2021-08-10T06:27:56 | 2021-08-10T06:27:56 | 382,329,267 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 497 | py | 03-input-marks-write.py | #Get roll numbers, name & marks of the students of a class(get from user) and store these details in a file- marks.txt
count = int(input("How many students are there in class? "))
fileObj = open('marks.txt',"w")
for i in range(count):
print("Enter details for student",(i+1),"below:")
rollNo = int(input("Rolln... |
955cf040aaf882328e31e6a943bce04cf721cb11 | 5b63608f58aecf9afafa06c695bc089792eec65c | /repos.py | c1418104633d8cf9b62511ad97f883fdf2254dd7 | [] | no_license | grahamfinney/ybd | 81a8fd36be657096c14a3855bdb2628fd0ec005b | 2bc8a5c93e6d1898041b791229f77ea798404d86 | refs/heads/master | 2021-01-15T16:05:04.459560 | 2015-04-01T09:17:54 | 2015-04-01T09:17:54 | 30,192,022 | 1 | 0 | null | 2015-02-02T14:57:31 | 2015-02-02T14:57:31 | null | UTF-8 | Python | false | false | 9,831 | py | repos.py | #!/usr/bin/env python3
#
# Copyright (C) 2011-2015 Codethink Limited
#
# 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; version 2 of the License.
#
# This program is distributed in the hope that... |
68a503b2a94304530e20d79baf9fb094024ba67e | fbf378950bcc324a63ee9942b3edeef393ef5124 | /spoticle/urls.py | fd2a1b36d208769304c7e346cc8ed3bc0d637ae8 | [] | no_license | hftf/spoticle | a58b8a104ee68a27afa97e475321affbef61ba50 | 03e2bdb38bdfb27010a42c93d6a9daf78df8bbfd | refs/heads/master | 2021-01-22T21:32:01.738444 | 2014-01-30T22:37:18 | 2014-01-30T22:37:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,678 | py | urls.py | from django.conf.urls import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
from django.conf import settings
from django.conf.urls.static import static
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from dajaxice.co... |
d0de455283773a0cf9f204e77919916782c44846 | 4dfd47f6b198090901fd049b8ea53cc8aed6864f | /Algorithms/2 Version/ZeroReplacedBy1.py | ca7683a161f0455b6cb79d8edf7d7196fba079d6 | [] | no_license | vaibhavg12/Problem-Solving-in-Data-Structures-Algorithms-using-Python3 | 7850c1ac70e5005cdeec6086fa324619ff58a3a9 | c7a62e598c28640fa1881280631af8157a16443e | refs/heads/master | 2020-03-22T13:48:40.727963 | 2018-06-29T23:08:42 | 2018-06-29T23:08:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 706 | py | ZeroReplacedBy1.py | def ZeroReplace(arr):
prev = 0
curr = 0
size = len(arr)
index = -1
maximum = 0
zeroIndex = -1
for i in range(size):
if arr[i] == 1:
curr += 1
elif arr[i] == 0:
if maximum < (prev + curr + 1):
maximum = prev + curr + 1
if... |
ede2df890cae7b4698a51da3afa392e7e9316194 | bab948a9048b3166723918f879afd588a411b35a | /page/__init__.py | d0d97fec17e93f711ed0a4e83770ac21317a98e6 | [] | no_license | Dearliqingmei/PO_APP-CRM- | 90fa99408148792a3d456b24d3755b5c8b2ca509 | b12461f4e18837aef15abd21d9bb51314b0582ae | refs/heads/master | 2020-04-11T14:46:48.907750 | 2018-12-15T08:38:45 | 2018-12-15T08:38:45 | 161,867,777 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 278 | py | __init__.py | from selenium.webdriver.common.by import By
loc_username = By.ID, "com.vcooline.aike:id/etxt_username"
loc_password = By.ID, "com.vcooline.aike:id/etxt_pwd"
loc_click = By.ID, "com.vcooline.aike:id/btn_login"
loc_login_txt = By.ID, "com.vcooline.aike:id/workbench_report_title" |
99acbf6bbd5a78a651811ded6da91df486084e64 | 607e5eaef7755e3417ea0cd93a1f2379d0fb5012 | /roda_purchase/api/serializers.py | 5c8e9b7b9fa7a13fbc7df412245423487884e294 | [
"MIT"
] | permissive | sanss021/roda_case | 17dde7191caa94ab5b7afbe43e5476d18e3736e2 | 1e8cf876ae6856615aea0a2f8946b8f542a42bc0 | refs/heads/main | 2023-07-30T10:11:33.116225 | 2021-09-15T04:43:30 | 2021-09-15T04:43:30 | 406,431,615 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 425 | py | serializers.py | from rest_framework import serializers
from roda_purchase import models
class PurchaseSerializer(serializers.ModelSerializer):
class Meta:
model = models.Purchase
fields = '__all__'
class ProductSerializer(serializers.ModelSerializer):
class Meta:
model = models.Product
fields ... |
6141560b7beadd91db41f02ae4bb31977e9383f3 | b143de2e5ae788b232230131a2bd69923ec733d1 | /variora/file_viewer/api/views_readlist.py | 6d94a413494d04183d31b82cf1ecb873bad2eb0f | [] | no_license | R-o-y/variora | 04b245366b5c0c6a4cba9b619f502d8dcbf3b267 | 55f13defcc01eeca40d20679a6a7e4df0440ad05 | refs/heads/master | 2022-09-19T21:25:35.967341 | 2022-01-24T13:43:18 | 2022-01-24T13:43:18 | 109,271,469 | 2 | 2 | null | 2022-08-30T22:32:02 | 2017-11-02T13:56:02 | JavaScript | UTF-8 | Python | false | false | 5,284 | py | views_readlist.py | from django.core.exceptions import ObjectDoesNotExist
from django.db.models import Count, prefetch_related_objects
from django.http import HttpResponse, JsonResponse
from django.views.generic import View
from variora import utils
from ..models import Document, Readlist
from .encoders import ReadlistEncoder, ReadlistL... |
94b0ba750fd924be3d22d1a1eefd8fd180dbd444 | c179315f75a68bfb619fed7234a9929f48bf4919 | /bot.py | 4db37205d6c4374c8d18b3897564523a868f306c | [] | no_license | wad-itmo-vnit/HW4-NMTrung | 3577b9c4831c7416336dbde19068e0e4f380583d | 0632a896752e89a488676cca718bbde7dca56150 | refs/heads/main | 2023-07-20T06:12:29.832297 | 2021-08-13T12:21:22 | 2021-08-13T12:21:22 | 395,637,969 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,518 | py | bot.py | import datetime
import random
def bot_answer(req):
req = req.lower()
if 'hi' in req or 'hello' in req:
return "Hello! Wish you had a good day :>"
elif 'name' in req:
return "You can call me Valrhona."
elif 'who' in req:
return "I'm a bot who you just created."
elif 'what' i... |
03ac5c7fa67ecd95547aa06cb51fca085457ec1b | 0795b3993bc8d5aea621616995c5caa7f0116330 | /tools/SimpleServiceForHttp.py | 29781c6eb894da30bd3a8e1163c1b442d46643ec | [
"Apache-2.0"
] | permissive | jAchillus/pythontools | 977a16675fa4bf33fe8bb97448fe1cb7223d4766 | 7e3029990d7a0e3be46009517b528b9ac0523a7b | refs/heads/master | 2022-05-02T21:09:22.956088 | 2022-04-25T15:41:09 | 2022-04-25T15:41:09 | 195,223,422 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,374 | py | SimpleServiceForHttp.py | # coding:utf-8
from http.server import HTTPServer, BaseHTTPRequestHandler
import sys
import threading
class RequestHandler(BaseHTTPRequestHandler):
def _writeheaders(self):
print(self.path)
print(self.headers)
self.send_response(200)
self.send_header('Content-type', 'text/html')
... |
12570add8641d09cd21936368a6be03f73b1a4d8 | 50fc8a5e5b7124586eaad4f71ce2e764469a974d | /robinhood.py | d7db305c84dbc3ccbfa75bf59b1d4023b6a5f4aa | [] | no_license | MisterReally/robinhood-account-analysis | fb45d1d441ec306cefd350af2c0b3e275cd54a67 | 3d016ce4da85a2fe6100edbbbac9561b50b1bc21 | refs/heads/master | 2022-12-01T21:03:15.843482 | 2020-08-13T01:00:11 | 2020-08-13T01:00:11 | 287,648,853 | 1 | 0 | null | 2020-08-15T00:23:05 | 2020-08-15T00:23:04 | null | UTF-8 | Python | false | false | 9,590 | py | robinhood.py | import robin_stocks as r
import pandas as pd
from datetime import datetime
import numpy as np
import requests_cache
import pandas_datareader as pdr
import matplotlib.pyplot as plt
import os
from dotenv import load_dotenv
import glob
# 1. Import environment variables and login to Robinhood account
load_dotenv()
userna... |
92f8ca0530f2acab5fe7ca1048edc1c250e266b4 | 86ba2e50fc95d90def1068b1f85faed996fc1792 | /cursodjango/aula3/views.py | edc85eda950166c7a1fb6bcfe5e387d043890a3a | [] | no_license | falbrito/cursodjango | 619769e26e73ed0d5400d45cae21915a2fe24ea4 | f32f2aca7b348e032030de71d8923fe9f87e2392 | refs/heads/master | 2016-08-11T06:37:03.403205 | 2015-10-23T17:39:59 | 2015-10-23T17:39:59 | 43,976,127 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,338 | py | views.py | # -*- coding: utf-8 -*-
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
# Exemplo passando parametro pela URL - por POST
#----------------------------------------------------------
@csrf_exempt # necessario para chamar a biblioteca, e é com @ mesmo!
def index(request):
if ... |
f36800b57f722b005d4e589921b8f0e0a3dc2f75 | 22f99fad8c647a48e7f39973092c9a0763324e35 | /src/AlarmApplet.py | fba2b227b4d1be5a216fa826a457d5294b994364 | [] | no_license | LucasLaughlin/smart-mirror | d77581ebbe435c58e03299883d060e152300ce13 | e1a3f5945c9a23cddfd5f8323f9838b7ad84ac02 | refs/heads/master | 2022-04-25T18:32:32.336285 | 2020-04-30T17:35:43 | 2020-04-30T17:35:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,096 | py | AlarmApplet.py | import datetime
from ClockApplet import ClockApplet
class AlarmApplet(ClockApplet):
def __init__(self):
super()
self.alarmMin = 0
self.alarmHour = 12
self.alarmOn = False
self.alarmTriggered = False
def toggleState(self):
# Switches the state of the alarm, used
... |
3ed76de9743ceb86925ab0f45ea7694ca56c008a | a14ec9b096ea50e2e02b4fef18a512b5ff94ab41 | /main.py | de0b14919fcd7d78da9d8493768b1a27427e5b53 | [] | no_license | yacherq/sms | b1f614e1a07535d6555002d185fecfb74d1441c1 | 6f583cf7502c3fb21cd40b153c19852ba88becac | refs/heads/master | 2020-12-28T11:22:18.722808 | 2020-03-14T20:38:59 | 2020-03-14T20:38:59 | 238,312,016 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 282 | py | main.py | import tkinter as tk
class Main(tk.Frame):
def __init__(self, root):
super().__init__(root)
if __name__ == "__main__":
root = tk.Tk()
app = Main(root)
app.pack()
root.title("Саймон))")
root.geometry("650x450+300+200")
root.resizable(False, False)
root.mainloop()
|